/* OpOrd — opord.co. One stylesheet for every page. Tokens first; light and dark themes. */

/* ---------- Fonts (self-hosted, SIL OFL; see assets/fonts) ---------- */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --sunken: #F0EFE9;
  --ink: #172126;
  --muted: #53616A;
  --accent: #236B60;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3EEEB;
  --line: #DADFDA;
  --line-strong: #B9C2BE;
  --warn-soft: #F4EBDD;
  --warn-ink: #7A5A1E;
  --bad-soft: #F7E4DF;
  --bad-ink: #8E3324;
  --night: #0E1417;
  --shadow: 0 1px 2px rgba(23,33,38,.06), 0 8px 24px rgba(23,33,38,.05);
  --shadow-lg: 0 2px 4px rgba(23,33,38,.06), 0 24px 60px rgba(23,33,38,.12);
  --display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 66ch;
  --w: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141A1D; --surface: #1C2428; --sunken: #182024; --ink: #EEF1EF; --muted: #A3B0B5;
    --accent: #5FB3A3; --accent-ink: #0F1A18; --accent-soft: #1F3531;
    --line: #2C373C; --line-strong: #46545A;
    --warn-soft: #34301F; --warn-ink: #E4C98A; --bad-soft: #3A2420; --bad-ink: #F0A396;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141A1D; --surface: #1C2428; --sunken: #182024; --ink: #EEF1EF; --muted: #A3B0B5;
  --accent: #5FB3A3; --accent-ink: #0F1A18; --accent-soft: #1F3531;
  --line: #2C373C; --line-strong: #46545A;
  --warn-soft: #34301F; --warn-ink: #E4C98A; --bad-soft: #3A2420; --bad-ink: #F0A396;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.45);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0; padding: 0; }
img, video, svg { max-width: 100%; }
img { height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
.wrap { max-width: var(--w); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: var(--measure); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 4px; z-index: 100; text-decoration: none; }
.skip:focus { left: 12px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* type roles */
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -.005em; }
.h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02; }
.h1-sub { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.04; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.08; }
.h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .8rem; }
.num { font-variant-numeric: tabular-nums; }
.mt-s { margin-top: 12px; } .mt { margin-top: 18px; } .mt-l { margin-top: 28px; } .mt-xl { margin-top: 40px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 20px; border-radius: 6px;
  font: 600 15.5px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s, filter .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(.94); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled] { opacity: .6; cursor: progress; }
.textlink { font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.textlink:hover { border-color: var(--ink); }
.actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 32px; }

/* sections */
section { padding-block: clamp(64px, 9vw, 120px); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.sticky-head { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 800px) { .sticky-head { position: static; } }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.wordmark { font-family: var(--display); font-size: 1.6rem; letter-spacing: .005em; line-height: 1; padding-bottom: 3px; }
.descriptor { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; margin-left: 4px; }
.links { display: flex; gap: 26px; list-style: none; }
.links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding-block: 6px; border-bottom: 1.5px solid transparent; }
.links a:hover { color: var(--ink); }
.links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-end { display: flex; align-items: center; gap: 10px; }
.nav .btn { padding: 10px 16px; font-size: 14.5px; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 6px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn .x { display: none; }
.nav-open .menu-btn .x { display: block; }
.nav-open .menu-btn .bars { display: none; }
@media (max-width: 1000px) { .descriptor { display: none; } }
@media (max-width: 860px) {
  .links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav .btn .l { display: none; }
  .nav-open .links {
    display: grid; gap: 0; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px var(--gutter) 16px;
  }
  .nav-open .links li { border-bottom: 1px solid var(--line); }
  .nav-open .links li:last-child { border-bottom: 0; }
  .nav-open .links a { display: block; padding: 14px 0; font-size: 17px; color: var(--ink); border: 0; }
  .nav-open .links a[aria-current="page"] { color: var(--accent); }
}
@media (min-width: 861px) { .nav .btn .s { display: none; } }
@media (max-width: 380px) { .nav .btn { padding: 10px 12px; } .wordmark { font-size: 1.45rem; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .h1 { margin-top: 18px; max-width: 14ch; }
.hero .h1 em, .page-hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { margin-top: 22px; max-width: 54ch; }
.qualifier { margin-top: 18px; font-size: .92rem; color: var(--muted); }
.watch { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); text-decoration: none; }
.watch .dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: border-color .15s, background-color .15s; }
.watch .dot svg { width: 11px; height: 11px; margin-left: 2px; }
.watch:hover .dot { border-color: var(--accent); background: var(--accent-soft); }

/* the month strip */
.month { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 20px 16px; box-shadow: var(--shadow); }
.month-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.month-head .h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day {
  aspect-ratio: 1 / 1; display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 5px 6px; border-radius: 4px; border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.day.chase { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }
.day.cutoff { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; position: relative; }
.day.cutoff::after { content: "cutoff"; position: absolute; left: 6px; bottom: 5px; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.day.blank { border-color: transparent; }
@media (max-width: 480px) { .day { padding: 3px 4px; font-size: 11px; } .day.cutoff::after { display: none; } }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .k-chase { background: var(--warn-soft); }
.legend .k-cut { background: var(--accent); }
.caption { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- Film ---------- */
.film-sec { padding-block: clamp(48px, 7vw, 96px); }
.film-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.film-head .h2 { margin-top: 14px; }
.film-head .lead { max-width: 44ch; }
.film { position: relative; margin-top: 32px; border-radius: 14px; overflow: hidden; background: var(--night); box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; isolation: isolate; }
.film video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--night); }
.film .play {
  position: absolute; left: 50%; bottom: clamp(14px, 3vw, 28px); transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(14,20,23,.62); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 600 15px/1 var(--sans); cursor: pointer; transition: background-color .15s, transform .15s;
}
.film .play:hover { background: rgba(14,20,23,.8); }
.film .play .ic { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--night); display: grid; place-items: center; }
.film .play .ic svg { width: 11px; height: 11px; margin-left: 2px; }
.film .play .len { font-weight: 500; color: rgba(255,255,255,.75); }
.film.playing .play { display: none; }
.film-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--muted); }
.script { margin-top: 18px; border-top: 1px solid var(--line); }
.script summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 14px 0; font-weight: 600; font-size: .98rem; }
.script summary::-webkit-details-marker { display: none; }
.script summary::after { content: "+"; font-family: var(--display); font-size: 1.35rem; color: var(--accent); line-height: 1; }
.script[open] summary::after { content: "–"; }
.script ol { list-style: none; display: grid; gap: 8px; padding-bottom: 18px; color: var(--muted); max-width: var(--measure); }
.script li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; }
.script li span { font-variant-numeric: tabular-nums; color: var(--line-strong); font-size: .9rem; padding-top: 1px; }

/* ---------- Pain ---------- */
.beats { display: grid; gap: 22px; margin-top: 8px; }
.beat { display: grid; grid-template-columns: 28px 1fr; gap: 16px; align-items: start; }
.beat .tick { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.beat p { font-size: 1.05rem; }
.example { margin-top: 32px; padding: 22px 24px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.example p { font-family: var(--display); font-size: 1.35rem; line-height: 1.3; }
.example .caption { margin-top: 12px; font-family: var(--sans); font-size: 12px; }

/* ---------- Proof ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
@media (max-width: 720px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px 22px; }
.tile .big { font-family: var(--display); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.01em; }
.tile .big small { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.tile p { margin-top: 12px; color: var(--muted); font-size: .98rem; }
.source { margin-top: 18px; font-size: .85rem; color: var(--muted); }

/* ---------- Offer list ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--display); font-size: 1.3rem; color: var(--accent); }
.steps strong { font-weight: 600; }
.steps span { color: var(--muted); }
.closing { margin-top: 26px; font-weight: 500; }

/* ---------- Diagram ---------- */
.diagram { margin-top: 40px; }
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.diagram svg { display: block; width: 100%; height: auto; }
.d-wide { min-width: 880px; }
.diagram .d-tall { display: none; }
@media (max-width: 760px) { .diagram .d-wide { display: none; } .diagram .d-tall { display: block; max-width: 420px; } .diagram-scroll { overflow: visible; } }
.d-legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--muted); }
.d-legend span { display: inline-flex; align-items: center; gap: 8px; }
.d-legend .k { width: 22px; height: 12px; border-radius: 3px; border: 1.5px solid var(--muted); display: inline-block; }
.d-legend .k.h { background: var(--accent); border-color: var(--accent); }
.d-legend .k.d { border-style: dashed; }
.diagram text { font-family: var(--sans); }

/* ---------- How it works ---------- */
.path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: 40px; }
@media (max-width: 820px) { .path { grid-template-columns: 1fr; } }
.stage { border-top: 2px solid var(--ink); padding-top: 18px; }
.stage .eyebrow { color: var(--muted); }
.stage .h3 { margin-top: 10px; font-family: var(--display); font-weight: 400; font-size: 1.5rem; }
.stage p { margin-top: 12px; color: var(--muted); }
.stage .then { margin-top: 14px; font-size: .9rem; color: var(--accent); font-weight: 600; }
.support { margin-top: 32px; }

/* ---------- Control ---------- */
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; margin-top: 36px; }
@media (max-width: 720px) { .controls { grid-template-columns: 1fr; } }
.control { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; }
.control svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.control p { color: var(--muted); margin-top: 4px; }

/* ---------- Fit ---------- */
.fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
@media (max-width: 720px) { .fit { grid-template-columns: 1fr; } }
.fit-col { padding: 24px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.fit-col.yes { border-color: var(--accent); }
.fit-col ul { list-style: none; margin-top: 14px; display: grid; gap: 10px; color: var(--muted); }
.fit-col li { padding-left: 18px; position: relative; }
.fit-col li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1.5px; background: var(--line-strong); }
.fit-col.yes li::before { background: var(--accent); }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 40px); align-items: center; }
@media (max-width: 640px) { .founder { grid-template-columns: 1fr; } }
.portrait { width: clamp(148px, 22vw, 220px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--sunken); box-shadow: var(--shadow); flex: none; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait.lg { width: 100%; max-width: 380px; border-radius: 14px; }
.founder p { font-size: 1.12rem; }
.sig { margin-top: 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sig .name { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; }

/* ---------- FAQ ---------- */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.5rem; color: var(--accent); line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 20px; color: var(--muted); max-width: var(--measure); display: grid; gap: 10px; }

/* ---------- CTA band ---------- */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-inner { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.band .h2 { max-width: 20ch; }
.band .lead { margin-top: 14px; max-width: 52ch; }

/* ---------- Sub-page hero ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 92px) clamp(28px, 4vw, 48px); }
.page-hero h1 { margin-top: 14px; max-width: 18ch; }
.page-hero .lead { margin-top: 18px; max-width: 60ch; }
.page-hero .meta { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.page-body { padding-block: 0 clamp(64px, 9vw, 120px); }

/* ---------- Prose (legal, long-form) ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } }
.toc { position: sticky; top: calc(var(--header-h) + 28px); font-size: 14px; }
@media (max-width: 900px) { .toc { position: static; } }
.toc p { font-weight: 600; margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.toc a.on { color: var(--ink); border-left-color: var(--accent); }
@media (max-width: 900px) { .toc ol { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-left: 0; gap: 0 16px; } .toc a { padding-left: 0; border-left: 0; } }
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.55rem, 2.6vw, 1.95rem); line-height: 1.15; margin-top: 44px; padding-top: 4px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; font-weight: 600; margin-top: 26px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; display: grid; gap: 8px; }
.prose li::marker { color: var(--accent); }
.prose .note { color: var(--muted); font-size: .95rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose strong { font-weight: 600; }
.callout { padding: 18px 20px; border-radius: 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.callout p + p { margin-top: 8px; }
.callout.plain { background: var(--surface); border-color: var(--line); }

/* ---------- Cards and grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 3vw, 28px); }
.card .h3 + p { margin-top: 8px; color: var(--muted); }
.card .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.card .ic svg { width: 20px; height: 20px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; font-size: .98rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

/* ---------- SMS samples ---------- */
.samples { display: grid; gap: 14px; margin-top: 18px; }
.sample { display: grid; gap: 6px; }
.sample .who { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bubble { justify-self: start; max-width: 54ch; background: var(--sunken); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 12px 16px; font-size: .97rem; line-height: 1.45; }
.keys { display: grid; gap: 0; margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.key { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.key:last-child { border-bottom: 0; }
.key b { font-family: var(--sans); font-weight: 600; letter-spacing: .06em; color: var(--accent); }
.key p { color: var(--muted); font-size: .97rem; }
@media (max-width: 420px) { .key { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); position: relative; }
.form-head { margin-bottom: 18px; }
.form-head .h3 { font-size: 1.1rem; }
.form-head p { margin-top: 6px; color: var(--muted); font-size: .95rem; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 16px/1.4 var(--sans); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 11px 12px;
  -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2353616A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--bad-ink); }
.field .err { font-size: 13px; color: var(--bad-ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); margin-bottom: 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.check span { font-size: .95rem; line-height: 1.5; }
.check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.form-foot .small { max-width: 40ch; }
.fine { font-size: 13px; color: var(--muted); margin-top: 14px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.status { margin-top: 16px; padding: 14px 16px; border-radius: 8px; font-size: 15px; background: var(--warn-soft); color: var(--warn-ink); }
.status.ok { background: var(--accent-soft); color: var(--ink); }
.status a { color: inherit; }
.done { text-align: left; padding: 8px 0; }
.done .tick { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 16px; }
.done .tick svg { width: 22px; height: 22px; }
.done h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.done p { margin-top: 10px; color: var(--muted); }

/* contact layout */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.reach { display: grid; gap: 22px; }
.reach h2 { font-size: 1.05rem; font-weight: 600; }
.reach .item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.reach .item svg { width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }
.reach .item p { color: var(--muted); }
.reach .item a { font-weight: 500; }
address { font-style: normal; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding-block: 48px 40px; font-size: 14.5px; color: var(--muted); background: var(--bg); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 2fr)) minmax(0, 3fr); gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand, .foot-reach { grid-column: 1 / -1; } }
.foot-brand .brand { margin-bottom: 12px; }
.foot-brand p { max-width: 34ch; }
.foot-grid h2 { font-size: 12.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; }
.foot-grid ul { list-style: none; display: grid; gap: 8px; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-reach p + p { margin-top: 6px; }
.legal-line { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: 13px; }

/* ---------- 404 ---------- */
.nf { min-height: 56vh; display: grid; align-content: center; }
.nf .links-list { list-style: none; display: flex; gap: 12px 24px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Print ---------- */
@media print {
  header.site, footer.site .foot-grid, .toc, .film, .menu-btn, .band, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
  .page-hero { padding-block: 0 12pt; }
  .doc { display: block; }
}
