/* SlabRoute: Graded Navy palette, Manrope / Inter / JetBrains Mono. Mobile-first. */
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-latin-var.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --navy: #0B2545; --teal: #0E9F94; --teal-text: #0B7D75;
  --gain: #15803D; --fee: #B91C1C;
  --ink: #1E293B; --muted: #475569; --line: #CBD5E1;
  --bg: #F8FAFC; --surface: #FFFFFF; --dark: #08142B;
  --gain-dk: #4ADE80; --fee-dk: #F87171; --ink-dk: #E2E8F0;
  --amber-bg: #FEF3C7; --amber-ink: #78350F;
  --radius: 14px; --shadow: 0 1px 2px rgba(11,37,69,.06), 0 4px 16px rgba(11,37,69,.06);
  --head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.5 var(--body); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-text); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--head); color: var(--navy); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.num, .money { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 800 1.35rem/1 var(--head); letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; }
.brand .slab { color: var(--navy); } .brand .route { color: var(--gain); }
.nav { display: flex; gap: .25rem .9rem; flex-wrap: wrap; font-size: .92rem; }
@media (max-width: 639px) { .site-header .wrap { padding-top: .5rem; gap: .25rem; } .nav { width: 100%; justify-content: space-between; } }
.nav a { color: var(--ink); text-decoration: none; padding: .5rem .25rem; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { color: var(--navy); border-bottom-color: var(--teal); }

/* Hero */
.hero { background: var(--dark); color: var(--ink-dk); padding: 2.5rem 0 4.5rem; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero h1 .accent { color: var(--gain-dk); }
.hero p { font-size: 1.1rem; max-width: 40rem; color: var(--ink-dk); }
.hero .chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.hero .chips li { border: 1px solid #23395e; color: var(--ink-dk); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; }

/* Calculator layout */
main { padding-bottom: 3rem; }
.calc { margin-top: -3rem; display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend, label, .label { font-weight: 600; font-size: .95rem; color: var(--ink); display: block; margin-bottom: .35rem; }
.hint { font-size: .85rem; color: var(--muted); margin: .25rem 0 0; }
.field { margin-bottom: 1rem; }
.money-input { position: relative; }
.money-input span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--mono); pointer-events: none; }
input[type="number"], select { width: 100%; font: 500 1rem var(--body); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: .7rem .85rem; min-height: 48px; }
.money-input input { padding-left: 1.9rem; font-family: var(--mono); }
#price { font-size: 1.5rem; min-height: 60px; }
input:focus, select:focus { border-color: var(--teal-text); outline: none; box-shadow: 0 0 0 3px rgba(14,159,148,.25); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; text-align: center; padding: .7rem; cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.seg input:checked + label { background: var(--navy); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--teal); outline-offset: -3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
details.more { border-top: 1px solid var(--line); padding-top: .75rem; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--teal-text); min-height: 44px; display: flex; align-items: center; }
details.more[open] summary { margin-bottom: .75rem; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 500; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }

/* Results */
.verdict { border-left: 5px solid var(--gain); padding: .25rem 0 .25rem 1rem; margin-bottom: 1rem; }
.verdict .k { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 0; }
.verdict .big { font: 800 clamp(1.4rem, 5vw, 1.9rem)/1.2 var(--head); color: var(--navy); margin: .15rem 0 .25rem; }
.verdict .big .money { color: var(--gain); font-weight: 500; }
.verdict p { margin: 0; color: var(--ink); }
.gain { color: var(--gain); } .fee { color: var(--fee); }

table.rank { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rank caption { text-align: left; font-size: .85rem; color: var(--muted); padding-bottom: .5rem; }
.rank th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: .5rem; border-bottom: 2px solid var(--line); }
.rank td { padding: .75rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.rank .r-num { font: 800 1.1rem var(--head); color: var(--navy); width: 2.5rem; }
.rank tr.best { background: #F0FDF4; }
.rank .pname { font-weight: 700; color: var(--navy); }
.rank .pvar { color: var(--muted); font-size: .9rem; }
.rank .net { font: 500 1.15rem var(--mono); color: var(--gain); white-space: nowrap; text-align: right; }
.rank .fees { font-family: var(--mono); color: var(--fee); white-space: nowrap; text-align: right; }
.rank .fees small { display: block; color: var(--muted); font-family: var(--body); }
.rank th.right { text-align: right; }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.badge { font-size: .72rem; font-weight: 600; border-radius: 999px; padding: .1rem .5rem; border: 1px solid var(--line); color: var(--muted); background: #fff; }
.badge.est { background: var(--amber-bg); color: var(--amber-ink); border-color: #FCD34D; }
.badge.auc { color: var(--navy); border-color: #93C5FD; background: #EFF6FF; }
.badge.real { color: #065F46; border-color: #6EE7B7; background: #ECFDF5; margin-right: .3rem; }
.badge.promo { color: #6B21A8; border-color: #D8B4FE; background: #FAF5FF; }
.bd-toggle { background: none; border: 0; padding: .25rem 0; font: 600 .9rem var(--body); color: var(--teal-text); cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; gap: .3rem; text-decoration: underline; text-underline-offset: 2px; }
.bd-toggle::after { content: "▸"; text-decoration: none; display: inline-block; }
.bd-toggle[aria-expanded="true"]::after { content: "▾"; }
.rank td.more { white-space: nowrap; }
.rank td.more .aff { display: block; }
.rank tr.bd-row td { padding-top: 0; }
.rank tr.bd-row .bd { max-width: 560px; margin-left: 2.5rem; padding: .5rem .75rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.rank tr:has(+ tr.bd-row:not([hidden])) td { border-bottom: 0; }
.bd dl { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; margin: .5rem 0; font-size: .88rem; }
.bd dt { color: var(--ink); } .bd dd { margin: 0; font-family: var(--mono); text-align: right; white-space: nowrap; }
.bd dd.neg { color: var(--fee); } .bd dd.pos { color: var(--gain); }
.bd .tot { border-top: 1px solid var(--line); padding-top: .25rem; font-weight: 700; }
.bd ul { margin: .25rem 0 .5rem; padding-left: 1.1rem; font-size: .85rem; color: var(--muted); }
.bd .estnote { background: var(--amber-bg); color: var(--amber-ink); border-radius: 8px; padding: .4rem .6rem; font-size: .85rem; }
.aff { display: inline-block; margin-top: .25rem; font-size: .88rem; font-weight: 600; }
.unavail { font-size: .9rem; color: var(--muted); margin-top: .75rem; }

/* Mobile: table rows become cards */
@media (max-width: 639px) {
  .rank thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .rank, .rank tbody, .rank tr, .rank td, .rank caption { display: block; width: 100%; }
  .rank tr { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: 0 .5rem; padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .rank td { border: 0; padding: 0; }
  .rank td.r-num { grid-row: 1; grid-column: 1; }
  .rank td.plat { grid-row: 1; grid-column: 2; }
  .rank td.net { grid-row: 1; grid-column: 3; }
  .rank td.fees { grid-row: 2; grid-column: 2 / 4; text-align: left; margin-top: .25rem; }
  .rank td.fees small { display: inline; margin-left: .35rem; }
  .rank td.fees::before { content: "Fees "; font-family: var(--body); color: var(--muted); font-size: .85rem; }
  .rank td.more { grid-row: 3; grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: center; }
  .rank td.more .aff { display: inline-block; margin: 0; }
  .rank tr.bd-row { display: block; padding: 0 0 .75rem; }
  .rank tr.bd-row[hidden] { display: none; }
  .rank tr.bd-row td { padding: 0; }
  .rank tr.bd-row .bd { margin-left: 0; }
}

/* Sections */
.section { margin-top: 2rem; }
.sources ul { padding-left: 1.1rem; } .sources li { margin-bottom: .3rem; }
.verified { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; color: var(--navy); background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 999px; padding: .2rem .75rem; font-size: .9rem; }
.ad-slot { border: 1.5px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .8rem; text-align: center; padding: 1.25rem .5rem; margin: 1.5rem 0; background: repeating-linear-gradient(45deg, #fff, #fff 8px, #F1F5F9 8px, #F1F5F9 16px); }
html[data-ads="off"] .ad-slot { display: none; }
.soon { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.soon ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.75rem; }
.page-head { background: var(--dark); color: var(--ink-dk); padding: 2rem 0; margin-bottom: 1.5rem; }
.page-head h1 { color: #fff; margin: 0 0 .25rem; font-size: clamp(1.75rem, 6vw, 2.5rem); }
.page-head p { margin: 0; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.plain { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 520px; }
table.plain th, table.plain td { border-bottom: 1px solid var(--line); padding: .5rem; text-align: left; vertical-align: top; }
table.plain td.n { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.plain th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
code { font-family: var(--mono); font-size: .9em; background: #EEF2F7; padding: .05em .35em; border-radius: 4px; }
.callout { background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }

/* Footer */
.site-footer { background: var(--dark); color: var(--ink-dk); padding: 2rem 0; font-size: .9rem; }
.site-footer a { color: var(--ink-dk); }
.site-footer .cols { display: grid; gap: 1rem; }
.site-footer p { margin: 0 0 .5rem; }

@media (min-width: 640px) {
  .wrap { padding: 0 1.5rem; }
  .card { padding: 1.5rem; }
  .site-footer .cols { grid-template-columns: 2fr 1fr; }
}
@media (min-width: 960px) {
  .calc { grid-template-columns: 340px 1fr; align-items: start; }
  .calc .inputs { position: sticky; top: 1rem; }
  .hero { padding: 3.5rem 0 5rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* v0.2: grade selector, grade estimate, price premiums */
.seg3 { grid-template-columns: repeat(3, 1fr); }
.seg3 label { padding: .55rem .35rem; font-size: .9rem; line-height: 1.2; flex-direction: column; }
.seg3 label small { font-weight: 500; font-size: .75rem; opacity: .85; }
#grade-field[hidden] { display: none; }
.row3 { display: grid; grid-template-columns: 1fr; gap: 0 .75rem; }
@media (min-width: 640px) { .row3 { grid-template-columns: repeat(3, 1fr); } }
.prem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; margin: .5rem 0 .75rem; }
@media (min-width: 640px) { .prem-grid { grid-template-columns: repeat(4, 1fr); } }
.prem-grid label { font-size: .85rem; font-weight: 600; }
.prem-grid .conf { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); }
.prem-grid input:disabled { background: #F1F5F9; color: var(--muted); }
.btn-quiet { font: 600 .9rem var(--body); color: var(--teal-text); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: .55rem .9rem; min-height: 44px; cursor: pointer; }
.btn-quiet:disabled { color: var(--muted); cursor: default; opacity: .7; }
.grade-table tr.sel { background: #F0FDF4; font-weight: 600; }
.grade-table td small { display: block; color: var(--muted); font-weight: 400; }
.verdict .alt { margin-top: .4rem; padding-top: .4rem; border-top: 1px dashed var(--line); }
.verdict .big .tag { font: 600 .8rem var(--body); vertical-align: middle; }
.rank .sale { font-size: .82rem; color: var(--muted); }
#grade-form { margin-top: 1rem; }

/* Newsletter signup */
.signup { margin: 0; }
.signup-title { font-size: 1.15rem; margin: 0 0 .25rem; }
.signup-copy { margin: 0 0 .6rem; }
.signup-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.signup-row input { flex: 1 1 14rem; min-width: 0; font: 500 1rem var(--body); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: .65rem .8rem; min-height: 48px; }
.signup-row input:focus { border-color: var(--teal-text); outline: none; box-shadow: 0 0 0 3px rgba(14,159,148,.25); }
.signup-row input[aria-invalid="true"] { border-color: var(--fee); }
.signup-row button { font: 700 1rem var(--head); color: #fff; background: var(--teal-text); border: 0; border-radius: 10px; padding: .65rem 1.2rem; min-height: 48px; cursor: pointer; }
.signup-row button:hover { background: var(--navy); }
.signup-row button:disabled { opacity: .6; cursor: wait; }
.signup-interests { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .5rem 0 0; }
.signup-interests label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-size: .9rem; margin: 0; min-height: 36px; }
.signup-interests input { width: 18px; height: 18px; accent-color: var(--teal-text); }
.signup-fine { font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.signup-status { margin: .5rem 0 0; font-weight: 600; min-height: 1.2em; }
.signup-status[data-state="success"] { color: var(--gain); }
.signup-status[data-state="error"] { color: var(--fee); }
.signup-status[data-state="pending"] { color: var(--muted); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup-section { border-left: 5px solid var(--teal); }
.signup-section .signup-title { font-size: 1.3rem; }
.site-footer .signup-title { color: #fff; font-size: 1rem; }
.site-footer .signup-copy, .site-footer .signup-interests label { color: var(--ink-dk); font-size: .88rem; }
.site-footer .signup-fine { color: #94A3B8; }
.site-footer .signup-row input { border-color: #23395e; }
.site-footer .signup-row button { background: var(--teal); color: var(--dark); }
.site-footer .signup-row button:hover { background: #fff; }
.site-footer .signup-status[data-state="success"] { color: var(--gain-dk); }
.site-footer .signup-status[data-state="error"] { color: var(--fee-dk); }
.site-footer .signup-status[data-state="pending"] { color: #94A3B8; }
@media (min-width: 640px) { .site-footer .cols { grid-template-columns: 1.3fr 1.5fr .7fr; } }
.signup [hidden] { display: none !important; }
