:root {
  --bg: #FAF6F0;
  --surface: #FFFFFF;
  --ink: #16130F;
  --ink-2: #5C544A;
  --muted: #8A8073;
  --line: #EAE1D4;
  --line-2: #DDD2C2;
  --accent: #E4551C;
  --accent-ink: #B8430F;
  --accent-soft: #FBF3EA;
  --cur: #3B7DB8;
  --proj: #F56300;
  --paid: #3B7DB8;
  --good: #1E7F4F;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28,28,26,.04), 0 6px 24px rgba(28,28,26,.06);
  --font-ui: "Public Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-ed: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}
/* Tabular figures only where numbers line up; on Lora the feature also widens word spaces. */
input, output, table, .hero-number, .stat .v, .bench-row .v, .fact .v, .chart text, .today-summary, .roi-block { font-feature-settings: "tnum" 1; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--font-ed); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); line-height: 1.12; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
em { font-style: normal; color: var(--accent-ink); font-weight: 600; }
[hidden] { display: none !important; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--ink); color: #fff;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .01em; }
.brand img { width: 34px; height: 34px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  font: inherit; font-weight: 600; font-size: .9rem;
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); text-decoration: none; display: inline-block; }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.primary { background: var(--accent); color: #fff; padding: 12px 24px; font-size: 1rem; text-decoration: none; display: inline-block; }
.btn.primary:hover { background: var(--accent-ink); }

/* ── Layout ──────────────────────────────────────────── */
.page { max-width: 1180px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px) 32px; }
.hero-intro { max-width: 820px; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent-ink); margin-bottom: 10px; }
.lede { font-size: 1.1rem; color: var(--ink-2); margin-top: 14px; max-width: 700px; }
.biz-inline { color: var(--accent-ink); }
.biz-field { display: block; margin-top: 18px; max-width: 420px; }
.biz-field span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }

.grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.col { display: grid; gap: 20px; min-width: 0; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.card-head p { margin-top: 4px; font-size: .92rem; }
.step {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem;
}

/* ── Fields ──────────────────────────────────────────── */
.field { display: block; margin-bottom: 14px; min-width: 0; }
.field .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.field-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 480px) { .field-grid { grid-template-columns: 1fr; } }

input[type="text"], input[type="number"], select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,99,0,.18); }
.input-wrap { position: relative; }
.input-wrap.prefix input { padding-left: 26px; }
.input-wrap.suffix input { padding-right: 32px; }
.input-wrap::before, .input-wrap::after { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-wrap.prefix::before { content: attr(data-prefix); left: 12px; }
.input-wrap.suffix::after { content: attr(data-suffix); right: 12px; }

.bench { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bench .use {
  font: inherit; font-size: .75rem; font-weight: 700; color: var(--accent-ink);
  background: var(--accent-soft); border: 0; border-radius: 999px; padding: 2px 9px; cursor: pointer;
}
.bench .use:hover { background: #FFE3CC; }
.bench .src { color: var(--muted); text-decoration: underline dotted; }

.today-summary {
  margin-top: 6px; padding: 12px 14px; background: var(--bg); border-radius: 10px; font-size: .92rem; color: var(--ink-2);
}
.today-summary strong { color: var(--ink); }
.data-note { display: block; margin-top: 6px; font-size: .78rem; color: var(--accent-ink); }

/* ── Sliders ─────────────────────────────────────────── */
.scenarios { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  font: inherit; font-size: .85rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: #fff; border: 1px solid var(--line-2); color: var(--ink-2);
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.slider { margin-bottom: 20px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.slider-head label { font-weight: 600; font-size: .95rem; }
.slider-head output { font-family: var(--font-ed); font-size: 1.35rem; font-weight: 600; color: var(--accent-ink); }
.slider-foot { font-size: .82rem; color: var(--muted); margin-top: 4px; }

input[type="range"] { width: 100%; margin: 0; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); margin-top: -8px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
input[type="range"]:focus-visible { outline: 3px solid rgba(245,99,0,.35); outline-offset: 2px; border-radius: 999px; }

/* ── Advanced ────────────────────────────────────────── */
details.advanced summary { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; list-style: none; }
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary .step { background: var(--ink-2); }
details.advanced[open] summary { margin-bottom: 18px; }

/* ── Results ─────────────────────────────────────────── */
.results { padding: 0; overflow: hidden; }
.hero { padding: 28px 24px 22px; background: var(--ink); color: #fff; }
.hero .eyebrow { color: #FFB27A; }
.hero-number { font-family: var(--font-ed); font-size: clamp(2.6rem, 2rem + 3vw, 4.2rem); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.hero-sub { color: rgba(255,255,255,.7); margin-top: 6px; font-size: .95rem; }
.hero-line { margin-top: 14px; font-size: 1.02rem; color: rgba(255,255,255,.92); max-width: 560px; }
.hero-line strong { color: #FFB27A; }

.chart-block { padding: 20px 24px 6px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-2); }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw.cur { background: var(--cur); }
.sw.proj { background: var(--proj); }
.sw.paid { background: var(--paid); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font-ui); }
.chart .bar { transition: width .35s ease; }
.chart .bar:hover { filter: brightness(1.08); }
.chart .row-label { font-size: 13px; fill: var(--ink-2); font-weight: 600; }
.chart .val { font-size: 12px; fill: var(--ink-2); }
.chart .val.strong { fill: var(--ink); font-weight: 700; }
.chart .delta { font-size: 12px; fill: var(--good); font-weight: 700; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.funnel-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: .95rem; }
.funnel-table th, .funnel-table td { padding: 10px 24px; text-align: right; border-top: 1px solid var(--line); }
.funnel-table th:first-child, .funnel-table td:first-child { text-align: left; }
.funnel-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-top: 0; font-weight: 700; }
.funnel-table td.chg { color: var(--good); font-weight: 700; }
.funnel-table tr.total td { font-weight: 700; background: var(--accent-soft); }
.funnel-table tr.total td.chg { color: var(--accent-ink); }
.funnel-table td.proj { font-weight: 600; }

.roi-block { margin: 10px 24px 22px; padding: 16px 18px; background: var(--bg); border-radius: 12px; display: grid; gap: 12px; }
.roi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { }
.stat .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.stat .v { font-family: var(--font-ed); font-size: 1.5rem; font-weight: 600; margin-top: 2px; }
.stat .v.good { color: var(--good); }
.stat .v.bad { color: #B42318; }
.stat .s { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ── Benchmarks & market ─────────────────────────────── */
.bench-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.bench-row:first-child { border-top: 0; padding-top: 0; }
.bench-row .k { font-weight: 600; }
.bench-row .v { font-family: var(--font-ed); font-size: 1.25rem; font-weight: 600; text-align: right; white-space: nowrap; }
.bench-row .q { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-2); }
.bench-row .q a { color: var(--muted); }
.bench-row .q .quote { font-style: italic; }
.bench-row .use-inline { margin-left: 6px; }
.bench-group { margin-top: 18px; }
.bench-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font-ui); font-weight: 700; margin-bottom: 4px; }

.market-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.fact { padding: 14px; background: var(--bg); border-radius: 12px; }
.fact .v { font-family: var(--font-ed); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.fact .k { font-size: .85rem; color: var(--ink-2); margin-top: 4px; }
.market ul { margin: 0; padding-left: 18px; font-size: .92rem; color: var(--ink-2); }
.market li { margin-bottom: 6px; }
.market .src-line { font-size: .78rem; color: var(--muted); margin-top: 10px; }

/* ── CTA / notes / footer ────────────────────────────── */
.cta { padding: 28px 24px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid #FFD9BC; text-align: center; }
.cta h2 { margin-bottom: 8px; }
.cta p { max-width: 520px; margin: 0 auto 16px; color: var(--ink-2); }
.notes { margin-top: 24px; }
.notes ol { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); font-size: .92rem; }
.notes li { margin-bottom: 4px; }
.footer { text-align: center; padding: 24px 16px 40px; font-size: .8rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--accent-ink); }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--ink); color: #fff; font-size: .8rem; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow);
}
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 60; box-shadow: var(--shadow); }

@media (max-width: 560px) {
  .funnel-table { font-size: .85rem; }
  .funnel-table th, .funnel-table td { padding: 8px 10px; }
  .funnel-table th:first-child, .funnel-table td:first-child { padding-left: 16px; }
  .chart-block, .hero { padding-left: 16px; padding-right: 16px; }
  .roi-block { margin-left: 16px; margin-right: 16px; }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .no-print, .topbar-actions, .biz-field, .cta { display: none !important; }
  .topbar { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page { padding: 12px 0; max-width: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card { box-shadow: none; break-inside: avoid; padding: 14px; }
  .hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  input[type="range"] { display: none; }
  details.advanced { display: none; }
  .funnel-table th, .funnel-table td { padding: 6px 14px; }
}

/* ── Paid channels (v1.2) ────────────────────────────── */
.channel { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.channel.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,99,0,.08); }
.channel-head { display: flex; align-items: center; gap: 12px; }
.channel-head label.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; flex: 1; }
.channel-head input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.channel-head .cite { font-size: .75rem; color: var(--muted); }
.channel-sub { font-size: .82rem; color: var(--muted); margin: 4px 0 0 30px; }
.channel-body { margin-top: 12px; }
.channel-body .field-grid { gap: 4px 12px; }
.channel-body .field .label { font-size: .85rem; }
.channel-live { margin-top: 6px; padding: 10px 12px; background: var(--accent-soft); border-radius: 10px; font-size: .88rem; color: var(--ink-2); }
.channel-live strong { color: var(--ink); }
.channel-live.off { background: var(--bg); }
.suggest { font-size: .8rem; color: var(--muted); }
.suggest .use { margin-left: 4px; }
.sup { font-size: .7em; vertical-align: super; color: var(--accent-ink); text-decoration: none; margin-left: 2px; font-weight: 700; }
.sup:hover { text-decoration: underline; }

.paid-results { padding: 16px 24px 4px; }
.paid-results .chart-head { margin-bottom: 4px; }
.paid-table th, .paid-table td { padding: 8px 12px; font-size: .9rem; white-space: nowrap; }
.paid-table th:first-child, .paid-table td:first-child { padding-left: 0; white-space: normal; }
.paid-table th:last-child, .paid-table td:last-child { padding-right: 0; }
.paid-table td.ret { font-weight: 700; color: var(--good); }
.paid-table td.ret.bad { color: #B42318; }
.paid-table tr.total td { background: transparent; border-top: 2px solid var(--line-2); font-weight: 700; }
.paid-table td .cite { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; white-space: normal; }
.paid-note { margin: 8px 0 6px; }

.topics { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 4px; }
.topics th, .topics td { padding: 6px 8px; text-align: right; border-top: 1px solid var(--line); }
.topics th:first-child, .topics td:first-child { text-align: left; padding-left: 0; }
.topics th:last-child, .topics td:last-child { padding-right: 0; }
.topics thead th { border-top: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.topics-src { font-size: .78rem; color: var(--muted); margin-top: 8px; }

.sources { margin-top: 20px; }
.sources ol { margin: 10px 0 0; padding-left: 22px; font-size: .85rem; color: var(--ink-2); columns: 2; column-gap: 32px; }
.sources li { margin-bottom: 6px; break-inside: avoid; }
.sources li a { color: var(--accent-ink); text-decoration: none; }
.sources li a:hover { text-decoration: underline; }
.sources li .q { display: block; color: var(--muted); font-style: italic; }
@media (max-width: 700px) { .sources ol { columns: 1; } }
@media print { .sources ol { columns: 1; } .channel { break-inside: avoid; } }
.paid-close { padding: 12px 14px; background: var(--bg); border-radius: 12px; margin-bottom: 12px; }
.paid-close .hint + .hint { margin-top: 6px; }
.ads-slider { padding: 12px 14px 8px; background: var(--accent-soft); border-radius: 12px; margin-bottom: 12px; }
.ads-slider .slider-head output { font-size: 1.5rem; }
.ads-switch { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 12px; background: #fff; }
.ads-switch.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,99,0,.08); }
.ads-switch .toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.ads-switch input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.ads-switch .big { font-family: var(--font-ed); font-size: 1.25rem; font-weight: 600; }
.ads-switch .channel-sub { margin-left: 34px; }
details.breakdown summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent-ink); padding: 6px 0 12px; list-style: none; }
details.breakdown summary::-webkit-details-marker { display: none; }
details.breakdown summary::before { content: "▸ "; }
details.breakdown[open] summary::before { content: "▾ "; }
.channel-head .incl { display: none; }
.guide-more { font-family: var(--font-ui); font-size: .85rem; font-weight: 600; margin-left: 10px; color: var(--accent-ink); }
