:root {
  color-scheme: light;
  --bg: #E6E2DA;
  --fg: #161213;
  --fg-muted: #57524C;
  --rule: #BFB8AC;
  --rule-soft: #D4CDC2;
  --paper: #F2EFE8;
  --bp-bg: #161213;
  --bp-fg: #FFFFFF;
  --bp-muted: #B8B1A9;
  --bp-rule: #34302C;
  --hivis: #F6B81A;
  --hivis-fg: #161213;
  --accent: #185CA7;
  --danger: #9B2C2C;
  --ok: #1F6F43;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 64ch;
  --pad: clamp(1.25rem, 5vw, 4rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #12100F;
    --fg: #E8E4DC;
    --fg-muted: #ABA49C;
    --rule: #302C29;
    --rule-soft: #201D1B;
    --paper: #181513;
    --bp-bg: #0B0A09;
    --bp-fg: #FFFFFF;
    --bp-muted: #B8B1A9;
    --bp-rule: #2A2622;
    --accent: #5B9BD8;
    --danger: #E28778;
    --ok: #78C59A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12100F; --fg: #E8E4DC; --fg-muted: #ABA49C; --rule: #302C29; --rule-soft: #201D1B; --paper: #181513; --bp-bg: #0B0A09; --bp-fg: #FFFFFF; --bp-muted: #B8B1A9; --bp-rule: #2A2622; --accent: #5B9BD8;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #E6E2DA; --fg: #161213; --fg-muted: #57524C; --rule: #BFB8AC; --rule-soft: #D4CDC2; --paper: #F2EFE8; --bp-bg: #161213; --bp-fg: #FFFFFF; --bp-muted: #B8B1A9; --bp-rule: #34302C; --accent: #185CA7;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--hivis); outline-offset: 3px; }
p, h1, h2, h3, dl, ul, ol { margin-top: 0; }
img, svg { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; }
.tt-wrap, main, footer { width: 100%; max-width: 78rem; margin: 0 auto; padding-inline: var(--pad); }
main { padding-block: clamp(2.5rem, 5vw, 3.75rem); }
.tt-page main { display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2.25rem); }
.tt-measure, .page-copy, main > p, main > ul, main > ol, main > h1, main > h2, main > h3 { max-width: var(--measure); }
.tt-label, .small, .meta, .tag { font-family: var(--mono); font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.small, .meta { letter-spacing: .04em; text-transform: none; font-size: .82rem; }
h1, h2 { text-transform: uppercase; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; margin-bottom: 1rem; line-height: 1.02; }
h1 { font-size: clamp(2.4rem, 6.8vw, 4.7rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .02em; }
.banner { background: var(--hivis); color: var(--hivis-fg); padding: .4rem 1rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.tt-hero, .tt-book, .page-hero { background-color: var(--bp-bg); background-image: linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; color: var(--bp-fg); border-bottom: 1px solid var(--bp-rule); }
.tt-hero .tt-label, .tt-book .tt-label, .page-hero .tt-label { color: var(--bp-muted); }
.tt-masthead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.5rem; border-bottom: 1px solid var(--bp-rule); }
.tt-lockup { display: inline-flex; align-items: center; gap: .6rem; color: var(--bp-fg); text-decoration: none; }
.tt-mark { width: 1.85rem; height: 1.85rem; flex: 0 0 auto; display: block; }
.tt-wordmark { font-size: 1.0625rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.tt-wm-a { color: var(--bp-fg); } .tt-wm-b { color: #4C93D8; }
.nav-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.nav-links a { color: var(--bp-muted); font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.nav-links a:hover { color: var(--bp-fg); }
.tt-hero-body { display: flex; flex-direction: column; gap: 1.5rem; padding-block: clamp(3rem, 7vw, 5.5rem); }
.tt-hero h1 { font-size: clamp(2.6rem, 7.6vw, 5.15rem); line-height: .94; max-width: 15ch; margin: 0; }
.tt-lead { font-size: clamp(1.0625rem, 1.9vw, 1.3rem); line-height: 1.5; color: #D9D3CB; max-width: 46ch; }
.page-hero-body { padding-block: clamp(2.4rem, 6vw, 4.5rem); }
.page-hero h1 { color: var(--bp-fg); margin: .35rem 0 0; }
.tt-section { display: flex; flex-direction: column; gap: 1.25rem; }
.tt-body-text, .page-copy { display: flex; flex-direction: column; gap: 1rem; max-width: var(--measure); }
.tt-dim { position: relative; height: 1px; background: var(--rule); margin-block: clamp(.5rem, 2vw, 1.25rem); }
.tt-dim::before, .tt-dim::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--rule); }
.tt-dim::before { left: 0; } .tt-dim::after { right: 0; }
.tt-punch { list-style: none; margin: 0; padding: 0; max-width: var(--measure); border-top: 1px solid var(--rule-soft); }
.tt-punch li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .5rem; align-items: start; padding-block: .85rem; border-bottom: 1px solid var(--rule-soft); }
.tt-tick { font-family: var(--mono); font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--fg); padding-top: .28rem; }
.tt-table-scroll { overflow-x: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tt-table, table.tools, .calc-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tt-table th, .tt-table td, table.tools th, table.tools td, .calc-table th, .calc-table td { text-align: left; padding: .7rem 1rem .7rem 0; border-bottom: 1px solid var(--rule-soft); font-size: .9375rem; vertical-align: top; }
.tt-table th, table.tools th, .calc-table th { font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.tools-wrap { overflow-x: auto; border-block: 1px solid var(--rule); }
.tt-free, .tag { display: inline-block; background: var(--hivis); color: var(--hivis-fg); padding: .15rem .4rem; margin-left: .5rem; white-space: nowrap; }
.ph, .note, .draft, .ok, .err { border-left: 4px solid var(--rule); background: var(--paper); padding: .8rem 1rem; max-width: var(--measure); }
.draft, .err { border-left-color: var(--danger); }
.ok { border-left-color: var(--ok); }
.sample { border: 1px dashed var(--rule); padding: 2rem; text-align: center; color: var(--fg-muted); max-width: var(--measure); }
.gate, .calculator, .assessment-card { border: 1px solid var(--rule); background: var(--paper); padding: clamp(1rem, 3vw, 1.4rem); margin: 1.5rem 0; max-width: var(--measure); }
.gate h3, .calculator h2, .assessment-card h2 { margin-bottom: .5rem; }
.gate form, .tt-form { display: flex; flex-direction: column; gap: .75rem; max-width: 34rem; }
.gate label, .calculator label { display: block; font-weight: 600; }
.gate input[type=email], .calculator input, .calc-table input, .tt-input { width: 100%; min-width: 0; font-family: var(--sans); font-size: 1rem; padding: .9rem 1rem; color: var(--fg); background: var(--bg); border: 1px solid var(--rule); border-radius: 0; margin-top: .2rem; }
.gate button, .tt-submit, .assessment-actions button, .opts button, .button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .9rem 1.4rem; color: var(--hivis-fg); background: var(--hivis); border: 1px solid var(--hivis); border-radius: 0; cursor: pointer; text-decoration: none; }
.gate button:disabled, .assessment-actions button:disabled { opacity: .5; cursor: not-allowed; }
.consent { font-family: var(--sans); font-size: .9rem; font-weight: 400 !important; color: var(--fg-muted); }
.consent input { width: auto; margin-right: .4rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; max-width: 68rem; }
.results { background: var(--bg); border: 1px solid var(--rule-soft); padding: 1rem 1rem 1rem 2rem; }
.assessment-page { max-width: 48rem; margin: 0; }
.placeholder-card { border-color: var(--hivis); }
.estimate { display: block; margin: .75rem 0; font-weight: 600; }
.assessment-actions { display: flex; gap: .75rem; justify-content: space-between; margin-top: 1rem; }
.assessment-actions button { background: transparent; color: var(--fg); border-color: var(--rule); }
.stepper { position: relative; min-height: 260px; overflow: hidden; }
.step { padding: 1rem 0; }
.opts button { display: block; width: 100%; text-align: left; margin: .5rem 0; background: var(--bg); color: var(--fg); border-color: var(--rule); justify-content: flex-start; white-space: normal; }
.opts button:hover, .opts button.sel { background: var(--hivis); color: var(--hivis-fg); border-color: var(--hivis); }
.bar { height: 6px; background: var(--rule-soft); border-radius: 0; }
.bar>div { height: 6px; background: var(--hivis); transition: width .4s; }
.result-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); border: 1px solid var(--rule); margin: 1rem 0; }
.result-summary div { padding: .75rem; border-right: 1px solid var(--rule); }
.result-summary dt { font-family: var(--mono); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.result-summary dd { margin: 0; font-weight: 700; }
.tt-book { border-block: 1px solid var(--bp-rule); margin-top: clamp(1rem, 3vw, 2rem); }
.tt-book-inner { display: flex; flex-direction: column; gap: 1.25rem; padding-block: clamp(3rem, 7vw, 5rem); }
.tt-book h2 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: .95; color: var(--bp-fg); }
.tt-book p { color: var(--bp-muted); max-width: 52ch; }
.tt-titleblock { border: 1px solid var(--rule); display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin-block: clamp(2rem, 4vw, 3rem) 0; padding: 0; }
.tt-cell { padding: .8rem 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tt-cell:last-child { border-right: 0; }
.tt-cell dt { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); margin: 0 0 .3rem; }
.tt-cell dd { font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; margin: 0; color: var(--fg); }
.tt-colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.25rem clamp(2.5rem, 6vw, 4rem); }
.tt-rise { opacity: 0; transform: translateY(.7rem); animation: tt-rise-in .6s cubic-bezier(.22,.61,.36,1) forwards; }
.tt-rise:nth-child(2) { animation-delay: .06s; } .tt-rise:nth-child(3) { animation-delay: .12s; } .tt-rise:nth-child(4) { animation-delay: .18s; } .tt-rise:nth-child(5) { animation-delay: .24s; }
[x-cloak] { display: none !important; }
@keyframes tt-rise-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tt-rise { animation: none; opacity: 1; transform: none; } * { scroll-behavior: auto; transition: none !important; } }
@media (max-width: 680px) { .tt-masthead { align-items: flex-start; } .nav-links { width: 100%; } .tt-table, table.tools, .calc-table { min-width: 42rem; } .assessment-actions { position: sticky; bottom: 0; background: var(--bg); padding: .5rem 0; } .opts button { font-size: 1rem; padding: 1rem; } }

/* ---- Ward polish 2026-10-14 ---- */
.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; }
.gate { color: var(--fg); }
.gate h3 { color: var(--fg); }
.gate p { color: var(--fg); }
.gate-inline { background: transparent; border: 0; padding: 0; margin: .25rem 0 0; max-width: 36rem; color: var(--bp-fg); }
.gate-inline .gate-label { color: var(--bp-muted); margin: 0 0 .75rem; }
.gate-inline .consent, .gate-inline .tt-fine { color: var(--bp-muted); }
.gate-inline .ok, .gate-inline .err { color: var(--fg); }
.tt-field-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.tt-input, .gate .tt-input { flex: 1 1 15rem; width: auto; margin: 0; background: #F2EFE8; color: #161213; border: 1px solid var(--rule); }
.tt-input::placeholder { color: #6E6860; }
.gate-inline .tt-input { border-color: transparent; }
.tt-submit { flex: 0 0 auto; }
.tt-submit:hover, .button:hover { filter: brightness(1.08); }
.tt-fine { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); margin: 0; }
.consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; line-height: 1.45; }
.consent input { margin: .2rem 0 0; accent-color: var(--hivis); flex: 0 0 auto; }
.tt-book .gate-inline { margin-top: .5rem; }
.tt-lead-dark { font-size: 1.15rem; line-height: 1.5; max-width: 52ch; }
/* calculators */
.calculator { background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--hivis); }
.calculator > .tt-label:first-child { margin-bottom: .75rem; }
.calculator .grid { gap: 1rem 1.25rem; margin: 1rem 0 1.5rem; }
.calculator label { font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
.calculator input, .calc-table input { font-family: var(--mono); font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--fg); background: var(--bg); border: 1px solid var(--rule); padding: .7rem .8rem; margin-top: .35rem; width: 100%; }
.calculator input:focus-visible, .calc-table input:focus-visible { outline: 2px solid var(--hivis); outline-offset: 1px; border-color: var(--fg); }
.calculator .note { max-width: none; font-size: .95rem; }
.results-label { margin: 0 0 .5rem; }
.results { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--fg); background: var(--bg); }
.results li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--rule-soft); font-size: .95rem; }
.results li:last-child { border-bottom: 0; }
.results strong { font-family: var(--mono); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.results .small { flex-basis: 100%; }
.tt-page main > p:first-child a { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.assessment-actions button, .assessment-page button { color: var(--fg); border-color: var(--fg); }
