/* SlateProof content pages (guides, tools, states, sportsbooks, exchanges, trust).
   One stylesheet for every page the site layout renders (headless/edge/site/layout.mjs).
   Same material as the dashboard (styles.css, DESIGN-BRIEF.md): slate-night ground, graphite
   plates, mint for the one accent, Geist and Geist Mono. Tokens are copied, not imported.
   Mobile first; checked at 390px with no horizontal page scroll. Dark only.

   CLASS NAMES (write page bodies with these; every value inserted into markup goes through esc())

   Page shell, written by the layout (do not repeat in a body):
     .skip .site-header .brand .site-nav .crumbs .page-head .updated .page-body .prose .toc .site-footer
     (.prose wraps every body: paragraphs, lists, headings and callouts stay about 68ch wide;
      tables, cards, calculators and anything marked .wide use the full 1120px column)

   Text:
     h2 / h3 / h4    Headings. Give an h2 an id and a page with four or more of them gets a table of contents.
     .lede           The opening sentence or two, larger. Answer the page's question here.
     .eyebrow        Small mono caps label above a heading.
     .fine           Small muted print (sources, "checked on" dates, caveats).
     .muted .nowrap .num .mono .wide   Utilities (.num = tabular figures; .wide = no 68ch cap).
     strong, em, code, kbd, blockquote, hr: styled. Plain ul/ol (no class) get bullets and numbers.
     .steps          <ol class="steps"> numbered steps with circle counters.

   Callouts and facts:
     .note           Helpful aside, mint rule.            <aside class="note"><p>...</p></aside>
     .warn           Risk or caution, amber rule.         <aside class="warn"><p><strong>...</strong> ...</p></aside>
     .callout-title  Optional mono-caps first line of a .note or .warn.
     .keyfacts       <dl class="keyfacts"><div><dt>Label</dt><dd>Value</dd></div>...</dl>  key-facts box.
     .faq            <div class="faq"><details><summary>Question?</summary><p>Answer</p></details>...</div>
     .cta            Panel that sends the reader on (use .btn-row inside).  <div class="cta"><p class="cta-title">..</p><p>..</p>
                     <div class="btn-row"><a class="btn btn-primary" href="/">..</a></div></div>

   Tables (wrap every table so a phone scrolls the table, not the page):
     <div class="table-wrap" tabindex="0" role="region" aria-label="..."><table class="data"> ... </table></div>
     th scope="col" headers are mono caps; first-column th scope="row" is bold and sticks while scrolling;
     td.num / th.num right-align numbers; .pos (mint) and .neg (red) colour a figure.

   Cards and tiles (hubs, related links):
     .cards > li.card  with h3.card-title > a.card-link (the whole card is the link) and a p; .card-meta for badges.
     .tiles > li > a.tile  with .tile-name and .tile-meta (compact, for the 51 states).

   Badges and marks:
     .badge  plus .badge-sportsbook | .badge-exchange | .badge-contested | .badge-assumed
     .dot[data-venue="draftkings"]  small venue colour dot (draftkings fanduel betmgm fanatics betrivers hardrock).

   Buttons and links:
     .btn  plus .btn-primary (mint) | .btn-ghost (outline);  .btn-row groups buttons.

   Calculators (tools reuse these; labels are always visible):
     .calc           Plate that holds a calculator form.
     .calc-grid      Responsive grid of fields.
     .field          <div class="field"><label for="x">Stake</label><input class="input" id="x" type="number" inputmode="decimal"></div>
     .input          Pill text/number input (aria-invalid="true" turns it red).  .select  styled <select>.
     .input-group    Input with a prefix/suffix:  <span class="input-group"><span class="affix">$</span><input ...></span>
     .seg            Segmented choice from radios:  <div class="seg" role="radiogroup" aria-label="..."><label><input type="radio" name="n" value="a"><span>A</span></label>...</div>
     .hint .error    Help and error text under a field.
     .result         Result panel (put aria-live="polite" on it):  .result-label  .result-big (+ .is-neg | .is-muted)
                     .result-grid > div > (dt.result-label + dd) for the smaller figures;  .result-note.
*/

:root {
  color-scheme: dark;

  --ground: #0b1118;
  --ground-2: #0f1620;
  --graphite: #141b24;
  --graphite-2: #1b2430;
  --graphite-3: #222d3b;
  --rule: #263241;
  --rule-2: #334152;

  --frost: #eef3f7;
  --frost-2: #c9d3dc;
  --mist: #93a1b0;

  --ti: #e3e8ed;
  --carbon: #10161d;
  --steel: #56616d;

  --mint: #5ce6cf;
  --mint-hi: #8ff0df;
  --mint-deep: #076d5d;
  --on-mint: #052a23;

  --caution: #f2c46d;
  --loss: #ff9387;

  --dk: #53d769;
  --fd: #4d9cff;
  --mgm: #d9b77e;
  --fan: #ff7aa8;
  --br: #39c6e8;
  --hr: #b48cff;

  --key: 235 244 250;
  --fill: 92 230 207;
  --shade: 3 7 11;
  --e1: 0 1px 1px rgb(var(--shade) / .35), 0 2px 6px rgb(var(--shade) / .3), 0 14px 30px -18px rgb(var(--shade) / .7);
  --e2: 0 1px 2px rgb(var(--shade) / .4), 0 6px 14px rgb(var(--shade) / .35), 0 28px 48px -22px rgb(var(--shade) / .8);

  --sans: "Geist", ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --t-prose: clamp(16px, .25vw + 15.2px, 17.5px);

  --gutter: clamp(16px, 4vw, 40px);
  --column: 1120px;
  --measure: 68ch;
  --bar-h: 64px;
  --out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(70vw 48vh at 70% -4%, rgb(var(--key) / .06), transparent 70%),
    radial-gradient(120vw 70vh at 50% -12%, var(--ground-2), transparent 72%),
    var(--ground);
  background-repeat: no-repeat;
  color: var(--frost-2);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
p, li, dd, blockquote { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--mint); color: var(--on-mint); }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 12px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--frost); color: var(--carbon); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--column); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- header */

.site-header { background: rgb(11 17 24 / .96); border-bottom: 1px solid rgb(255 255 255 / .06); z-index: 40; }
.site-header-in { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; text-decoration: none;
  color: var(--frost); font-weight: 600; font-size: 18px; letter-spacing: -.015em;
}
.brand-mark { width: 28px; height: 28px; border-radius: 8px; box-shadow: var(--e1); flex: none; }
.site-nav { min-width: 0; margin-inline: calc(var(--gutter) * -1); }
.site-nav ul {
  display: flex; gap: 2px; padding: 6px var(--gutter) 10px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
}
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block; padding: 9px 14px; border-radius: 999px; white-space: nowrap; text-decoration: none;
  color: var(--mist); font-size: 14px; font-weight: 500; transition: color .16s var(--out), background .16s var(--out);
}
.site-nav a:hover { color: var(--frost); background: rgb(255 255 255 / .05); }
.site-nav a[aria-current="page"] { color: var(--frost); background: rgb(255 255 255 / .08); }
.site-nav a[aria-current="true"] { color: var(--frost); box-shadow: inset 0 -2px 0 var(--mint); border-radius: 999px 999px 4px 4px; }
.site-nav li:first-child a { color: var(--mint); }
.site-nav li:first-child a:hover { color: var(--mint-hi); }

@media (min-width: 860px) {
  .site-header { position: sticky; top: 0; -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
  html { scroll-padding-top: calc(var(--bar-h) + 20px); }
  .site-header-in { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; height: var(--bar-h); padding-top: 0; }
  .site-nav { margin-inline: 0; }
  .site-nav ul { padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
}

/* ------------------------------------------------------ title and crumbs */

.page-head { padding-top: clamp(20px, 4vw, 44px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; color: var(--mist); }
.crumbs li + li::before { content: "/"; content: "/" / ""; margin-right: 8px; color: var(--rule-2); }
.crumbs a { color: var(--mist); text-decoration: none; }
.crumbs a:hover { color: var(--frost); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--frost-2); }
.page-head h1 {
  margin-top: 14px; max-width: 24ch; color: var(--frost); font-weight: 600;
  font-size: clamp(30px, 4.4vw + 12px, 56px); line-height: 1.06; letter-spacing: -.035em;
}
.updated { margin-top: 14px; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); }
.page-body { padding-top: clamp(20px, 3vw, 32px); padding-bottom: clamp(24px, 5vw, 56px); }

/* --------------------------------------------------------- table of contents */

.toc {
  max-width: var(--measure); margin: 0 0 clamp(28px, 4vw, 40px); padding: 16px 20px; border-radius: 16px;
  border: 1px solid var(--rule); background: var(--graphite);
}
.toc-title { margin-bottom: 10px; font: 500 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.toc ol { display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 12px; align-items: baseline; padding: 5px 0; color: var(--frost-2); text-decoration: none; font-size: 15px; }
.toc a::before { content: counter(toc, decimal-leading-zero); flex: none; font: 500 12px/1 var(--mono); color: var(--mist); }
.toc a:hover { color: var(--mint); }

/* ------------------------------------------------------------------ prose */

.prose { font-size: var(--t-prose); line-height: 1.68; color: var(--frost-2); }
.prose :where(p, ul, ol, h2, h3, h4, blockquote, .note, .warn, .faq, details, .lede, .callout-title) { max-width: var(--measure); }
.prose .wide { max-width: none; }

/* every block opens a little below the one before; the first block of a section does not */
.prose :where(p, ul, ol, dl, blockquote, pre, figure, details, aside, .table-wrap, .cards, .tiles, .keyfacts, .steps, .calc, .cta,
  .faq, form, .btn-row) { margin-top: 1.1em; }
.prose :where(section, aside, div, li, details, blockquote, article) > :first-child { margin-top: 0; }
.prose section:not(:first-child) { margin-top: clamp(40px, 6vw, 64px); }

.prose h2 {
  margin-top: 2.3em; color: var(--frost); font-weight: 600; font-size: clamp(24px, 1.2vw + 19px, 32px);
  line-height: 1.2; letter-spacing: -.028em; scroll-margin-top: 24px;
}
.prose h3 { margin-top: 1.9em; color: var(--frost); font-weight: 600; font-size: clamp(18px, .5vw + 17px, 21px); line-height: 1.3; letter-spacing: -.012em; }
.prose h4 { margin-top: 1.6em; color: var(--frost); font: 500 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose :where(section, div) > h2:first-child, .prose > h2:first-child { margin-top: 0; }
@media (min-width: 860px) { .prose h2 { scroll-margin-top: calc(var(--bar-h) + 20px); } }

.prose a:not([class]) {
  color: var(--mint); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgb(var(--fill) / .45); transition: color .16s var(--out), text-decoration-color .16s var(--out);
}
.prose a:not([class]):hover { color: var(--mint-hi); text-decoration-color: currentColor; }
.prose strong { color: var(--frost); font-weight: 600; }
.prose em { color: var(--frost); }
.prose ul:not([class]), .prose ol:not([class]) { padding-left: 1.35em; }
.prose ul:not([class]) { list-style: disc; }
.prose ol:not([class]) { list-style: decimal; }
.prose ul:not([class]) li::marker, .prose ol:not([class]) li::marker { color: var(--mist); }
.prose :where(ul, ol):not([class]) li + li { margin-top: .45em; }
.prose :where(ul, ol):not([class]) :where(ul, ol) { margin-top: .45em; }
.prose code, .prose kbd, .mono {
  font-family: var(--mono); font-size: .88em; padding: .12em .4em; border-radius: 6px; background: rgb(255 255 255 / .06);
  color: var(--frost); overflow-wrap: anywhere;
}
.prose pre { overflow-x: auto; padding: 14px 16px; border-radius: 14px; background: var(--graphite); border: 1px solid var(--rule); }
.prose pre code { padding: 0; background: none; }
.prose blockquote { padding: 4px 0 4px 18px; border-left: 3px solid var(--rule-2); color: var(--frost); }
.prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--rule); }
.prose img { height: auto; border-radius: 14px; }

.lede { font-size: clamp(18px, .6vw + 16px, 21px); line-height: 1.5; color: var(--frost); max-width: 62ch; }
.eyebrow { font: 500 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.fine { font-size: 13.5px; line-height: 1.5; color: var(--mist); }
.muted { color: var(--mist); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--mint); }
.neg { color: var(--loss); }

.steps { list-style: none; counter-reset: step; padding: 0; }
.steps > li { position: relative; counter-increment: step; padding-left: 46px; min-height: 32px; }
.steps > li + li { margin-top: 1.1em; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--rule-2); background: var(--graphite); color: var(--mint); font: 600 13px/1 var(--mono);
}

/* -------------------------------------------------------- callouts, facts */

.note, .warn {
  padding: 14px 18px; border-radius: 14px; border: 1px solid var(--rule-2); border-left-width: 3px; border-left-color: var(--mint);
  background: rgb(255 255 255 / .03); font-size: .95em; line-height: 1.55;
}
.warn { border-color: rgb(242 196 109 / .32); border-left-color: var(--caution); background: rgb(242 196 109 / .06); }
.note p + p, .warn p + p { margin-top: .6em; }
.note strong, .warn strong { color: var(--frost); }
.callout-title { margin-bottom: 6px; font: 600 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }
.warn .callout-title { color: var(--caution); }

.keyfacts {
  display: flex; flex-wrap: wrap; max-width: none; background: var(--graphite); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden;
}
.keyfacts > div { flex: 1 1 10.5rem; min-width: 0; padding: 14px 18px; box-shadow: 0 0 0 .5px var(--rule); }
.keyfacts dt { font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.keyfacts dd { margin-top: 6px; font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--frost); font-variant-numeric: tabular-nums; }

.faq details { border-top: 1px solid var(--rule); max-width: var(--measure); margin-top: 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  position: relative; cursor: pointer; list-style: none; padding: 16px 40px 16px 0; color: var(--frost); font-weight: 600; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--mist);
  border-bottom: 2px solid var(--mist); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--out);
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:hover { color: var(--mint); }
.faq details > :not(summary) { margin-top: 0; padding-bottom: 16px; }
.faq details > :not(summary) + * { margin-top: .8em; }

.cta {
  padding: clamp(18px, 3vw, 26px); border-radius: 20px; border: 1px solid var(--rule-2);
  background: linear-gradient(162deg, var(--graphite-3), var(--graphite) 62%, #10161e); box-shadow: var(--e2);
}
.cta-title { color: var(--frost); font-size: clamp(19px, .8vw + 16px, 24px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.cta p + p { margin-top: .5em; color: var(--frost-2); }
.cta .btn-row { margin-top: 16px; }

/* ----------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 16px; background: var(--graphite);
  max-width: 100%;
}
.table-wrap:focus-visible { outline-offset: 2px; border-radius: 16px; }
table.data { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }
table.data caption { padding: 12px 16px; text-align: left; font-size: 13px; color: var(--mist); }
table.data th {
  padding: 12px 16px; text-align: left; vertical-align: bottom; font: 500 11px/1.3 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--mist); background: var(--graphite-2); border-bottom: 1px solid var(--rule-2);
}
table.data td, table.data tbody th {
  padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--rule); color: var(--frost-2);
  font: inherit; letter-spacing: normal; text-transform: none; background: transparent;
}
table.data tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--graphite); color: var(--frost); font-weight: 600; white-space: nowrap; }
table.data thead th:first-child { position: sticky; left: 0; z-index: 2; }
table.data tbody tr:last-child > * { border-bottom: 0; }
table.data tbody tr:hover > td, table.data tbody tr:hover > th { background-color: rgb(255 255 255 / .02); }
table.data th.num, table.data td.num { text-align: right; }
table.data td.num { white-space: nowrap; }
table.data tfoot td, table.data tfoot th { border-top: 1px solid var(--rule-2); border-bottom: 0; color: var(--frost); font-weight: 600; }

/* ------------------------------------------------------- cards and tiles */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 14px; max-width: none; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; border-radius: 18px; min-width: 0;
  background: linear-gradient(162deg, var(--graphite-2), var(--graphite)); border: 1px solid var(--rule);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04); transition: border-color .16s var(--out), transform .16s var(--out);
}
.card:hover { border-color: var(--rule-2); transform: translateY(-2px); }
.card:focus-within { outline: 2px solid var(--mint); outline-offset: 3px; }
.prose .card > * { margin: 0; }
.card-title { font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; color: var(--frost); }
.card-link { color: inherit; text-decoration: none; }
.card-link:focus-visible { outline: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card p { font-size: 14.5px; line-height: 1.5; color: var(--mist); max-width: none; margin: 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card .card-meta { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 10px; max-width: none; }
.tile {
  display: block; height: 100%; padding: 12px 14px; border-radius: 14px; text-decoration: none; background: var(--graphite);
  border: 1px solid var(--rule); transition: border-color .16s var(--out), background .16s var(--out);
}
.tile:hover { border-color: var(--mint); background: var(--graphite-2); }
.tile-name { display: block; color: var(--frost); font-weight: 600; line-height: 1.3; }
.tile-meta { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--mist); }

/* ----------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rule-2);
  font: 500 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--frost-2); white-space: nowrap;
}
.badge-sportsbook { background: rgb(255 255 255 / .05); }
.badge-exchange { color: var(--mint); border-color: rgb(var(--fill) / .4); background: rgb(var(--fill) / .08); }
.badge-contested { color: var(--caution); border-color: rgb(242 196 109 / .45); background: rgb(242 196 109 / .08); }
.badge-assumed { color: var(--mist); border-style: dashed; }

.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--mist)); vertical-align: baseline; }
.dot[data-venue="draftkings"] { --dot: var(--dk); }
.dot[data-venue="fanduel"] { --dot: var(--fd); }
.dot[data-venue="betmgm"] { --dot: var(--mgm); }
.dot[data-venue="fanatics"] { --dot: var(--fan); }
.dot[data-venue="betrivers"] { --dot: var(--br); }
.dot[data-venue="hardrock"] { --dot: var(--hr); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid transparent; background: none; font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background .16s var(--out), border-color .16s var(--out), color .16s var(--out), transform .16s var(--out);
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary { background: var(--mint); color: var(--on-mint); box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 8px 20px -10px rgb(var(--fill) / .7); }
.btn-primary:hover { background: var(--mint-hi); }
.btn-ghost { border-color: var(--rule-2); color: var(--frost); }
.btn-ghost:hover { border-color: var(--mist); background: rgb(255 255 255 / .04); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; max-width: none; }

/* ------------------------------------------------------------ calculators */

.calc {
  max-width: none; padding: clamp(18px, 3vw, 28px); border-radius: 22px; border: 1px solid var(--rule);
  background: linear-gradient(162deg, var(--graphite-2), var(--graphite) 55%, #10161e); box-shadow: var(--e2);
}
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 16px 18px; }
.calc-grid + .calc-grid { margin-top: 16px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > label, .field-label {
  font: 500 12px/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist);
}
.input, .select {
  width: 100%; min-width: 0; height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ground); color: var(--frost);
  box-shadow: inset 0 0 0 1px var(--rule-2); font: 600 17px/1 var(--sans); font-variant-numeric: tabular-nums;
  transition: box-shadow .16s var(--out);
}
.input::placeholder { color: var(--steel); font-weight: 400; }
.input:hover, .select:hover { box-shadow: inset 0 0 0 1px var(--mist); }
.input:focus-visible, .select:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--mint); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--loss); }
input.input[type="number"], .input-group input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.input::-webkit-outer-spin-button, .input::-webkit-inner-spin-button,
.input-group input::-webkit-outer-spin-button, .input-group input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.select {
  padding-right: 44px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: var(--ground) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 6 4.5 4.5L12.5 6' fill='none' stroke='%2393a1b0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center / 14px;
}
.input-group {
  display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px; border-radius: 999px; background: var(--ground);
  box-shadow: inset 0 0 0 1px var(--rule-2); transition: box-shadow .16s var(--out);
}
.input-group:hover { box-shadow: inset 0 0 0 1px var(--mist); }
.input-group:focus-within { box-shadow: inset 0 0 0 2px var(--mint); }
.input-group .affix { color: var(--mist); font-weight: 600; font-size: 16px; }
.input-group input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; outline: none; color: var(--frost);
  font: 600 17px/1 var(--sans); font-variant-numeric: tabular-nums;
}
.hint { font-size: 13px; line-height: 1.45; color: var(--mist); }
.error { font-size: 13px; line-height: 1.45; color: var(--loss); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 999px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--rule-2); }
.seg label { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span {
  display: block; padding: 10px 16px; border-radius: 999px; color: var(--mist); font-size: 14px; font-weight: 600; line-height: 1;
  transition: background .16s var(--out), color .16s var(--out);
}
.seg label:hover span { color: var(--frost); }
.seg input:checked + span { background: var(--frost); color: var(--carbon); }
.seg input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 2px; }

.result { margin-top: 20px; padding: clamp(18px, 3vw, 24px); border-radius: 18px; background: var(--ground); border: 1px solid var(--rule); max-width: none; }
.result-label { font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.result-big {
  margin-top: 8px; color: var(--mint); font-size: clamp(40px, 9vw, 64px); font-weight: 600; line-height: 1; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.result-big.is-neg { color: var(--loss); }
.result-big.is-muted { color: var(--frost); }
.result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 16px 24px; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--rule); max-width: none;
}
.result-grid dd { margin-top: 6px; color: var(--frost); font-size: 20px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.result-note { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: var(--mist); }

/* ----------------------------------------------------------------- footer */

.site-footer { flex: none; margin-top: clamp(40px, 8vw, 96px); padding: 40px 0 56px; border-top: 1px solid var(--rule); color: var(--mist); font-size: 14px; line-height: 1.55; }
.foot-top { display: grid; gap: 28px 32px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.foot-brand .brand { margin-bottom: 12px; }
.foot-brand p { max-width: 36ch; }
.site-footer .lbl { margin-bottom: 12px; font: 500 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.site-footer nav ul { display: grid; gap: 8px; }
.site-footer a { color: var(--frost-2); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--frost); }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.foot-legal { display: grid; gap: 12px; padding-top: 28px; max-width: 78ch; }
.foot-legal strong { color: var(--frost); font-weight: 600; }
.foot-help { color: var(--frost); font-size: 15px; }
.foot-help a { color: var(--mint); font-weight: 600; }
.foot-copy { font: 12px/1.4 var(--mono); letter-spacing: .04em; }

@media (min-width: 560px) { .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (min-width: 860px) {
  .foot-top { grid-template-columns: minmax(16rem, 1.7fr) repeat(auto-fit, minmax(9rem, 1fr)); }
  .foot-brand { grid-column: auto; }
}

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover, .btn:active { transform: none; }
}
