/* Optimal web: same identity as the app. Charcoal + cream, one orange accent, condensed numbers,
   ledgers instead of card stacks. Fonts are served from this site (no third-party requests). */
@font-face { font-family: Barlow; src: url(/fonts/Barlow_400Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/Barlow_600SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/Barlow_700Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(/fonts/BarlowCondensed_700Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/JetBrainsMono_500Medium.ttf); font-weight: 500; font-display: swap; }

:root {
  --cream: #f3f0e8; --card: #fbfaf6; --line: #ddd8cc; --ink: #14181f; --muted: #4a4f57; --muted2: #62676f;
  --charcoal: #11151c; --dark-card: #1a202b; --dark-line: #2a3140; --on-dark: #f3f0e8; --on-dark-muted: #b8bec8;
  --accent: #ff5f1f; --accent-text: #a8360a; --dot: #8a909a;
}
@media (prefers-color-scheme: dark) {
  :root { --cream: #0e1117; --card: #161b24; --line: #2a3140; --ink: #f3f0e8; --muted: #b8bec8; --muted2: #8e95a0; --charcoal: #1b212c; --dark-card: #232a37; --dark-line: #323b4c; --accent-text: #ff8a5c; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.5 Barlow, system-ui, sans-serif; }
a { color: var(--accent-text); }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
header.top { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.wordmark { font: 700 22px 'Barlow Condensed', sans-serif; color: var(--ink); text-decoration: none; letter-spacing: 0.2px; }
header.top nav a { font-weight: 600; font-size: 15px; text-decoration: none; }

h1 { font: 700 44px/1.02 'Barlow Condensed', sans-serif; margin: 28px 0 10px; letter-spacing: -0.3px; }
h2 { font: 700 28px/1.1 'Barlow Condensed', sans-serif; margin: 40px 0 8px; }
.lede { color: var(--muted); font-size: 18px; margin: 0 0 24px; }
.data { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: 2px; text-transform: uppercase; }

/* Form as a ledger */
.ledger { border-top: 2px solid var(--ink); }
.row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.row label.q, .row .q { display: block; font-weight: 600; margin-bottom: 8px; }
.hint { color: var(--muted2); font-size: 14px; margin-top: 6px; }
.num { display: flex; align-items: baseline; gap: 8px; }
.num input { width: 140px; font: 700 34px 'Barlow Condensed', sans-serif; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.num span { color: var(--muted2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 600; font-size: 15px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #14181f; }
.chips label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
button.go, a.go { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; width: 100%; margin: 20px 0 8px; border: 0; border-radius: 14px; background: var(--accent); color: #14181f; font: 700 18px Barlow, sans-serif; cursor: pointer; text-decoration: none; }
button.ghost { min-height: 44px; border: 1.5px solid var(--on-dark-muted); border-radius: 12px; background: transparent; color: var(--on-dark); font: 600 16px Barlow, sans-serif; padding: 0 16px; cursor: pointer; }

/* The one dark panel: the result */
.result { background: var(--charcoal); color: var(--on-dark); border-radius: 24px; padding: 20px; margin: 24px 0; }
.result .label { color: var(--accent); font-weight: 600; font-size: 15px; }
.result h3 { font: 700 34px/1.05 'Barlow Condensed', sans-serif; margin: 6px 0; }
.result .big { font: 700 76px/1 'Barlow Condensed', sans-serif; color: var(--accent); margin: 6px 0 4px; }
.result p { color: var(--on-dark-muted); margin: 6px 0; }
.split { margin: 14px 0 6px; }
.split .bar { display: flex; height: 30px; gap: 2px; }
.split .fat { background: var(--accent); border-radius: 8px 0 0 8px; min-width: 4px; }
.split .water { flex: 1; border: 1.5px dashed var(--on-dark-muted); border-radius: 0 8px 8px 0; display: flex; align-items: center; padding: 0 10px; font: 500 11px 'JetBrains Mono', monospace; letter-spacing: 1px; color: var(--on-dark); white-space: nowrap; overflow: hidden; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.reasons span { border: 1px solid var(--dark-line); background: var(--dark-card); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
details.math { margin-top: 12px; color: var(--on-dark-muted); }
details.math summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.math table { width: 100%; border-collapse: collapse; font-size: 15px; }
.math td { padding: 6px 0; border-top: 1px solid var(--dark-line); }
.math td:last-child { text-align: right; font: 500 14px 'JetBrains Mono', monospace; color: var(--on-dark); white-space: nowrap; padding-left: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* Plain sections */
.facts { border-top: 2px solid var(--ink); }
.fact { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact b { display: block; font-size: 17px; }
.fact span { color: var(--muted); }
.cite { color: var(--muted2); font-size: 13px; }
form.waitlist { display: grid; gap: 10px; margin: 12px 0; }
form.waitlist input[type=email] { font: 500 18px Barlow, sans-serif; padding: 12px 14px; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.consent input { width: 22px; height: 22px; margin-top: 2px; }
.hp { position: absolute; left: -9999px; }
.ok { font-weight: 600; }
footer { margin: 48px 0 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted2); font-size: 14px; }
footer p { margin: 6px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 380px) { h1 { font-size: 38px; } .result .big { font-size: 64px; } }
