/* One small stylesheet for the whole site. No framework, no build step.
   Colors are variables at the top so a rebrand is a five-line change.
   The site's Content-Security-Policy blocks inline styles, so every style lives in this file. */

:root {
  --bg: #fafaf7;
  --card: #ffffff;
  --text: #1d2327;
  --muted: #5b6670;
  --line: #dcdcd4;
  --accent: #1f5f4a;
  --accent-text: #ffffff;
  --warn-bg: #fff6e0;
  --warn-line: #e3c36a;
  --err: #a1261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181a;
    --card: #1c2225;
    --text: #e8ecee;
    --muted: #9aa5ad;
    --line: #2d363a;
    --accent: #5fbf9f;
    --accent-text: #0e1513;
    --warn-bg: #2a2410;
    --warn-line: #7a6620;
    --err: #ff8a80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }

/* ---- header and footer ---- */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.92rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 48px; color: var(--muted); font-size: 0.88rem; }
footer p { margin: 0 0 10px; }

/* ---- type ---- */
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; margin: 40px 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 44px 0 12px; }
h3 { font-size: 1.1rem; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 22px; }
.fine { font-size: 0.86rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--muted); margin: 40px 0 0; }
.eyebrow + h1 { margin-top: 6px; }

/* ---- boxes ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin: 16px 0; }
.card h3 { margin-top: 0; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 12px 16px; margin: 16px 0; font-size: 0.93rem; }
.notice p:last-child { margin-bottom: 0; }

/* ---- forms ---- */
label { display: block; font-weight: 600; margin: 14px 0 4px; }
input[type="text"], input[type="email"], select {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field-error { color: var(--err); font-size: 0.9rem; margin: 4px 0 0; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { padding: 0; }
.choices label { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 6px 0; }
.choices input { width: auto; }

button, .button {
  display: inline-block; padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px; text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.08); }

.signup { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.signup input[type="email"] { flex: 1 1 15rem; }
.signup-note { margin: 4px 0 0; }

/* The decoy field for bots. Moved off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* ---- calculator result ---- */
.big { font-size: 2.3rem; font-weight: 700; line-height: 1.1; margin: 4px 0; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--warn-line); background: var(--warn-bg); }

details { border-top: 1px solid var(--line); padding: 10px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 4px; }

ul.sources { font-size: 0.92rem; color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .big { font-size: 1.9rem; }
}
