/* Turnflow: shared styles for the public site, client workspace and operator pages. */

:root {
  --paper: #ffffff; --surface: #ffffff; --sunk: #f3f3f1; --ink: #0b0b0c; --ink-2: #3a3a3e; --muted: #6c6c70;
  --rule: #e6e6e3; --rule-strong: #cbcbc6; --accent: #d6390b; --accent-2: #b02e07; --accent-soft: #ffe7dd; --on-accent: #fff;
  --bright: #ff5a24;
  --green: #12723f; --green-bg: #e3f4ea; --amber: #8a5000; --amber-bg: #fbefd9; --red: #b42318; --red-bg: #fde8e6;
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--display); /* kept as a name so page styles that use it still resolve */
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}
/* Dark tokens: the whole site in dark mode, plus the always-dark bands (.ink, page heroes, the header over them). */
.ink, .page-hero, .masthead.over-ink {
  --paper: #0b0b0c; --surface: #141416; --sunk: #1c1c1f; --ink: #f2f1ee; --ink-2: #c9c8c3; --muted: #8f8e89;
  --rule: #26262a; --rule-strong: #3b3b40; --accent: #ff6a3d; --accent-2: #ff8b66; --accent-soft: #2e170f; --on-accent: #0b0b0c;
  --green: #6fd19a; --green-bg: #12261b; --amber: #f0b45a; --amber-bg: #2b2111; --red: #f58a7e; --red-bg: #301713;
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0b0c; --surface: #141416; --sunk: #1c1c1f; --ink: #f2f1ee; --ink-2: #c9c8c3; --muted: #8f8e89;
    --rule: #26262a; --rule-strong: #3b3b40; --accent: #ff6a3d; --accent-2: #ff8b66; --accent-soft: #2e170f; --on-accent: #0b0b0c;
    --green: #6fd19a; --green-bg: #12261b; --amber: #f0b45a; --amber-bg: #2b2111; --red: #f58a7e; --red-bg: #301713;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; transition: color .2s; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--bright); color: #0b0b0c; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------------------------------------------------------------- Header */
.masthead { background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  position: sticky; top: 0; z-index: 20; view-transition-name: masthead; transition: background .35s, border-color .35s, color .35s; }
.masthead.over-ink { background: var(--paper); border-bottom-color: transparent; }
.masthead .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.wordmark { font: 700 19px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; }
.wordmark:hover { color: var(--ink); }
.wordmark .mark { width: 22px; height: 22px; color: var(--bright); }
.wordmark .mark path.tick { stroke-dasharray: 44; stroke-dashoffset: 0; }
.wordmark:hover .mark path.tick { animation: retick .9s var(--ease-out); }
@keyframes retick { from { stroke-dashoffset: 44; } }
.wordmark small { font: 500 13px/1 var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.nav { display: flex; gap: 2px; font-size: 14.5px; position: relative; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; position: relative; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); view-transition-name: nav-indicator; }
.masthead .spacer { flex: 1; }
.who { font-size: 14px; color: var(--muted); }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .who { display: none; }
  .menu-btn { display: inline-flex; padding: 8px 14px; font-size: 14px; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--paper); border-bottom: 1px solid var(--rule); }
  .nav.open { display: flex; animation: drop .3s var(--ease-out); }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--rule); font: 600 22px/1.2 var(--display); letter-spacing: -.02em; }
  .nav a[aria-current="page"] { background: none; color: var(--accent); }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------------------------------------------------------- Type */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 72px); line-height: 1; margin: 0 0 22px; letter-spacing: -.045em; }
h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; margin: 0 0 16px; }
h3 { font-size: 21px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.02em; }
p { margin: 0 0 14px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.eyebrow, .kicker { font: 500 14px/1.4 var(--sans); color: var(--muted); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.kicker .dot, .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bright); flex: none; }
.kicker .dot { animation: beacon 2.4s var(--ease-in-out) infinite; }
@keyframes beacon { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bright) 55%, transparent); } 60% { box-shadow: 0 0 0 9px transparent; } }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13.5px; font-weight: 400; }

/* ---------------------------------------------------------------- Buttons */
button, .btn { font: 600 15px/1 var(--sans); display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .35s var(--ease-out); }
button:hover, .btn:hover { border-color: var(--ink-2); color: var(--ink); background: var(--sunk); }
button:active, .btn:active { transform: scale(.97); }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover, button.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); }
.btn.small, button.small { padding: 8px 14px; font-size: 14px; }
.btn.google { background: #fff; color: #1f1f1f; border-color: #cfcfcb; padding: 14px 22px; }
.btn.google:hover { background: #f1f1ef; color: #1f1f1f; }
.btn.google svg { width: 18px; height: 18px; }
.btn .arrow, a.more .arrow { display: inline-block; transition: transform .45s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
a.more { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; color: var(--ink); }
a.more:hover { color: var(--ink); }
a.more:hover .arrow { transform: rotate(-45deg); }
button[disabled] { opacity: .6; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; border-radius: 0; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { background: none; color: var(--ink); }

/* ---------------------------------------------------------------- Notices, panels, forms */
.notice { border-left: 3px solid var(--rule-strong); background: var(--surface); padding: 12px 16px; margin: 0 0 20px; }
.error { border-left: 3px solid var(--red); background: var(--red-bg); color: var(--red); padding: 12px 16px; margin: 0 0 20px; }
.ok { border-left: 3px solid var(--green); background: var(--green-bg); color: var(--green); padding: 12px 16px; margin: 0 0 20px; animation: rise .5s var(--ease); }
main.page { padding: 40px 0 80px; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 22px; margin-bottom: 18px; }
.panel h2 { font-size: 22px; margin-bottom: 12px; }
label { display: block; font-weight: 500; margin: 0 0 6px; }
input[type=text], input[type=email], textarea { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--rule-strong);
  border-radius: 6px; background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
input[type=text]:focus, input[type=email]:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 76px; resize: vertical; }
.field { margin-bottom: 18px; }
.drop { border: 1.5px dashed var(--rule-strong); border-radius: 8px; padding: 18px; background: var(--paper); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.drop input[type=file] { width: 100%; font-size: 14px; }
.files { list-style: none; padding: 0; margin: 10px 0 0; font: 13px/1.6 var(--mono); color: var(--ink-2); }
.files li { overflow-wrap: anywhere; animation: rise .35s var(--ease) both; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 5px; accent-color: var(--accent); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }

/* ---------------------------------------------------------------- Progress, tables, pills */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 10px; }
.steps div { position: relative; padding-top: 9px; font-size: 12.5px; color: var(--muted); }
.steps div::before, .steps div::after { content: ""; position: absolute; top: 0; left: 0; height: 3px; border-radius: 2px; }
.steps div::before { right: 0; background: var(--rule); }
.steps div::after { width: 0; background: var(--accent); transition: width .8s var(--ease); }
.steps div.done, .steps div.now { color: var(--ink-2); }
.steps div.now { color: var(--ink); font-weight: 600; }
.steps div.done::after, .steps div.now::after { width: 100%; }
.js .steps:not(.go) div::after { width: 0; }
.steps div:nth-child(2)::after { transition-delay: .15s; } .steps div:nth-child(3)::after { transition-delay: .3s; } .steps div:nth-child(4)::after { transition-delay: .45s; }
.steps.go div.now::after { animation: pulse 2.4s var(--ease-in-out) 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font: 600 13px/1.3 var(--sans); color: var(--muted); }
.table-wrap { overflow-x: auto; }
.pill { font: 600 12px/1 var(--sans); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.pill.FAILED { background: var(--red-bg); color: var(--red); }
.pill.NEEDS_REVIEW, .pill.review { background: var(--amber-bg); color: var(--amber); }
.pill.PROCESSING, .pill.QUEUED { background: var(--sunk); color: var(--ink-2); }
.pill.DELIVERED, .pill.ready { background: var(--green-bg); color: var(--green); }
.pill.PURGED, .pill.CANCELLED { border: 1px solid var(--rule); color: var(--muted); }
.pill.AWAITING_PAYMENT { background: var(--amber-bg); color: var(--amber); }
.late { color: var(--red); font-weight: 600; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { dl.kv { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Footer */
.colophon { border-top: 1px solid var(--rule); padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.colophon .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.colophon h4 { font: 600 14px/1.3 var(--sans); color: var(--ink); margin: 0 0 12px; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin: 0 0 8px; }
.colophon a { color: var(--ink-2); text-decoration: none; }
.colophon a:hover { color: var(--ink); text-decoration: underline; }
.colophon .brand { font: 650 17px/1 var(--sans); letter-spacing: -.02em; color: var(--ink); margin-bottom: 10px; }
.colophon .legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 13px; }
@media (max-width: 760px) { .colophon .cols { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- Marketing page frame */
.page-hero { background: var(--paper); padding: 104px 0 80px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -12vw; top: -30%; width: 55vw; height: 160%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bright) 40%, transparent), transparent 70%); opacity: .55; filter: blur(20px);
  animation: drift 14s var(--ease-in-out) infinite alternate; }
@keyframes drift { to { transform: translate(-6vw, 8%) scale(1.1); } }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(46px, 7.6vw, 112px); line-height: .94; letter-spacing: -.055em; max-width: 13ch; margin-bottom: 28px; }
.page-hero .lead { max-width: 56ch; }
section.block { padding: 96px 0; border-bottom: 1px solid var(--rule); }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; }
.label-col .num { font: 500 14px/1 var(--sans); color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.label-col .num::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bright); }
.label-col h2 { font-size: clamp(28px, 3vw, 38px); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
@media (max-width: 860px) {
  .page-hero { padding: 64px 0 48px; } section.block { padding: 64px 0; }
  .split { grid-template-columns: 1fr; gap: 20px; } .two { grid-template-columns: 1fr; }
}
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 14px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }
ul.plain li:first-child { border-top: 0; padding-top: 0; }
ul.plain li strong { color: var(--ink); font-weight: 600; }

.next-page { padding: 0; }
.next-page .wrap { max-width: none; padding: 0; }
.next-page a { display: flex; justify-content: space-between; align-items: center; gap: 24px; text-decoration: none; color: var(--ink);
  padding: 64px max(32px, calc((100vw - 1240px) / 2 + 32px)); position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--rule); }
.next-page a::before { content: ""; position: absolute; inset: 0; background: var(--bright); z-index: -1; transform: scaleY(0); transform-origin: bottom;
  transition: transform .6s var(--ease-out); }
.next-page a:hover::before { transform: none; }
.next-page a:hover, .next-page a:hover .k { color: #0b0b0c; }
.next-page .k { font: 500 14px/1.4 var(--sans); color: var(--muted); display: block; margin-bottom: 8px; transition: color .3s; }
.next-page .t { font: 600 clamp(36px, 6vw, 88px)/1 var(--display); letter-spacing: -.045em; }
.next-page .arrow { font: 400 clamp(36px, 5vw, 72px)/1 var(--sans); transition: transform .6s var(--ease-out); }
.next-page a:hover .arrow { transform: rotate(-45deg); }
@media (max-width: 640px) { .next-page a { padding: 44px 16px; } }

/* ---------------------------------------------------------------- Home: hero */
.x-hero { position: relative; min-height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; background: var(--paper); padding: 120px 0 64px; margin-top: -1px; }
.ribbon { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.x-hero .wrap { position: relative; width: 100%; max-width: 1400px; }
.display { font: 600 clamp(54px, 11.2vw, 184px)/.88 var(--display); letter-spacing: -.06em; margin: 0; max-width: none; text-wrap: initial; }
.display em { font-style: normal; color: var(--bright); }
.display .ln { display: block; overflow: hidden; padding: 0 .04em .07em 0; margin-bottom: -.07em; }
.display .ln > span { display: inline-block; }
.js .display .ln > span { transform: translateY(108%) rotate(4deg); transform-origin: left bottom; animation: lift 1.1s var(--ease-out) forwards; }
.js .display .ln:nth-child(2) > span { animation-delay: .09s; } .js .display .ln:nth-child(3) > span { animation-delay: .18s; }
@keyframes lift { to { transform: none; } }
.js .rise { opacity: 0; transform: translateY(16px); animation: rise .9s var(--ease-out) forwards; animation-delay: calc(.25s + var(--i, 0) * 90ms); }
.x-hero .under { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; margin-top: 44px; padding-top: 28px;
  border-top: 1px solid var(--rule-strong); }
.x-hero .under p { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 52ch; margin: 0; }
.x-hero .cta { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.x-hero .cta .error { flex-basis: 100%; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; width: 22px; height: 34px; border: 1.5px solid var(--rule-strong); border-radius: 12px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); animation: wheel 1.8s var(--ease-in-out) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@media (max-width: 860px) {
  .x-hero { padding: 88px 0 56px; min-height: calc(92svh - 64px); }
  .x-hero .under { grid-template-columns: 1fr; gap: 24px; } .x-hero .cta { justify-content: flex-start; }
  .scroll-cue { display: none; }
}

/* Home: format marquee */
.marquee { background: var(--bright); color: #0b0b0c; overflow: hidden; padding: 22px 0; border-block: 1px solid #0b0b0c; }
.marquee .track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee span { font: 600 clamp(28px, 4vw, 56px)/1 var(--display); letter-spacing: -.04em; white-space: nowrap; }
.marquee i { width: 18px; height: 18px; flex: none; background: #0b0b0c;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: spin 6s linear infinite; }
@keyframes marquee { to { transform: translateX(calc(-50% - 18px)); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Home: the sticky story, where the sample fills in as you read */
.story { padding: 40px 0 120px; }
.story .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 72px; align-items: start; }
.chapter { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .5s var(--ease); }
.chapter.on { opacity: 1; }
.chapter .step { font: 500 14px/1 var(--mono); color: var(--accent); margin: 0 0 18px; }
.chapter h2 { font-size: clamp(34px, 4.4vw, 60px); line-height: .98; letter-spacing: -.045em; }
.chapter p { font-size: 18px; color: var(--ink-2); max-width: 44ch; }
.stage { position: sticky; top: calc(50vh - 220px); }
.stage .caption { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 940px) {
  .story { padding: 0 0 80px; }
  .story .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage { order: -1; top: 64px; z-index: 2; background: var(--paper); padding: 16px 0 10px; margin: 0 -16px; padding-inline: 16px; }
  .stage .caption { display: none; }
  .chapter { min-height: 62vh; justify-content: flex-start; padding-top: 32px; }
  .chapter h2 { font-size: 32px; }
}

.specimen { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 40px 80px -40px rgba(11, 11, 12, .35); }
.specimen .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px;
  font: 12.5px/1.3 var(--mono); color: var(--muted); background: var(--sunk); }
.specimen .bar > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.specimen .state { font: 600 12.5px/1 var(--sans); color: var(--accent); white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.specimen .state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: beacon 1.6s infinite; }
.specimen .state.done { color: var(--green); }
.specimen .state.done::before { animation: none; }
.specimen .meter { height: 3px; background: var(--rule); }
.specimen .meter span { display: block; height: 100%; width: calc(var(--p, 1) * 100%); background: var(--bright); transition: width .8s var(--ease-out); }
.specimen table { font-size: 13.5px; }
.specimen th { background: var(--surface); font: 500 12px/1.3 var(--mono); color: var(--muted); padding: 9px 12px; }
.specimen td { padding: 14px 12px; transition: background .6s; }
.specimen td.ref { font: 12px/1.5 var(--mono); color: var(--muted); white-space: nowrap; }
.specimen td.ans { font-weight: 600; white-space: nowrap; min-width: 64px; }
.specimen .cite { font: 12px/1.6 var(--mono); color: var(--ink-2); min-height: 3.2em; }
.specimen .cite b { font-weight: 500; color: var(--ink); }
.specimen tr.scan td { background: color-mix(in srgb, var(--bright) 12%, transparent); }
.specimen tr.flag td { background: color-mix(in srgb, var(--amber-bg) 70%, transparent); }
.specimen tr.blank td { background: var(--sunk); }
.specimen .blankcell { color: var(--muted); font-weight: 400; font-style: italic; }
.specimen .stamp { display: inline-block; margin-top: 8px; font: 600 11.5px/1 var(--sans); padding: 5px 9px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 13%, transparent); }
.js .specimen .stamp { opacity: 0; transform: scale(.6); }
.js .specimen .stamp.on { animation: pop .55s var(--ease-out) forwards; }
.specimen .stamp.v { color: var(--green); } .specimen .stamp.x { color: var(--amber); } .specimen .stamp.b { color: var(--muted); }
@keyframes pop { 60% { opacity: 1; transform: scale(1.12); } to { opacity: 1; transform: none; } }
.skeleton { display: block; height: 9px; border-radius: 4px; margin: 6px 0; background: linear-gradient(90deg, var(--sunk), var(--rule), var(--sunk));
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.caret::after { content: ""; display: inline-block; width: 7px; height: 1.1em; margin-left: 1px; vertical-align: -2px; background: var(--bright); animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 560px) { .specimen th:nth-child(1), .specimen td.ref { display: none; } .specimen td { padding: 10px 8px; } .specimen table { font-size: 12.5px; } }

/* Home: a paragraph that lights up word by word as you scroll */
.scrub-block { padding: 120px 0; border-top: 1px solid var(--rule); }
.scrub { font: 600 clamp(30px, 4.4vw, 64px)/1.08 var(--display); letter-spacing: -.04em; margin: 0; max-width: 22ch; color: var(--ink); }
.js .scrub .w { opacity: .14; transition: opacity .25s linear; }
.js .scrub .w.on { opacity: 1; }
@media (max-width: 640px) { .scrub-block { padding: 72px 0; } }

/* Home: numbers */
.numbers { border-block: 1px solid var(--rule); }
.numbers .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.numbers .num { padding: 56px 32px 48px 0; }
.numbers .num + .num { padding-left: 32px; border-left: 1px solid var(--rule); }
.numbers b { display: flex; align-items: baseline; font: 600 clamp(72px, 10vw, 150px)/.9 var(--display); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.numbers b small { font-size: .42em; color: var(--bright); margin-left: 4px; letter-spacing: -.02em; }
.numbers p { color: var(--ink-2); max-width: 26ch; margin: 18px 0 0; }
@media (max-width: 760px) { .numbers .wrap { grid-template-columns: 1fr; } .numbers .num, .numbers .num + .num { padding: 36px 0; border-left: 0; border-top: 1px solid var(--rule); } .numbers .num:first-child { border-top: 0; } }

/* Home: big link rows that fill with colour on hover */
.bigrows { padding: 96px 0; }
.bigrows a { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 24px; align-items: center; padding: 26px 20px; margin: 0 -20px;
  border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); position: relative; isolation: isolate; overflow: hidden; }
.bigrows a:last-child { border-bottom: 1px solid var(--rule); }
.bigrows a::before { content: ""; position: absolute; inset: 0; background: var(--bright); z-index: -1; transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--ease-out); }
.bigrows a:hover::before { transform: none; }
.bigrows a:hover, .bigrows a:hover .d { color: #0b0b0c; }
.bigrows .t { font: 600 clamp(36px, 6.4vw, 96px)/1 var(--display); letter-spacing: -.05em; transition: transform .55s var(--ease-out); }
.bigrows a:hover .t { transform: translateX(12px); }
.bigrows .d { color: var(--muted); font-size: 15px; text-align: right; transition: color .3s; }
.bigrows .arrow { font: 400 44px/1 var(--sans); justify-self: end; transition: transform .55s var(--ease-out); }
.bigrows a:hover .arrow { transform: rotate(-45deg); }
@media (max-width: 760px) { .bigrows a { grid-template-columns: minmax(0, 1fr) 40px; } .bigrows .d { display: none; } .bigrows { padding: 56px 0; } }

/* Home: closing band */
.x-close { position: relative; overflow: hidden; background: var(--paper); padding: 140px 0 120px; }
.x-close .wrap { position: relative; max-width: 1400px; }
.x-close .display { font-size: clamp(50px, 9.4vw, 152px); margin-bottom: 44px; }
@media (max-width: 640px) { .x-close { padding: 88px 0 72px; } }

/* Inner pages: closing band (dark, like the home page's) */
.closing { background: var(--paper); color: var(--ink); padding: 128px 0 120px; border: 0; }
.closing h2 { font: 600 clamp(40px, 6.2vw, 96px)/.96 var(--display); letter-spacing: -.045em; max-width: 17ch; margin: 0 0 40px; text-wrap: balance; }
.closing h2 a { color: var(--bright); text-decoration-thickness: .06em; text-underline-offset: .12em; }
@media (max-width: 640px) { .closing { padding: 84px 0 76px; } }

/* ---------------------------------------------------------------- How it works: pipeline + timeline */
.pipeline { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 26px 20px; margin-top: 36px; }
.pipeline svg { width: 100%; height: auto; overflow: visible; }
.pipeline .node rect { fill: var(--paper); stroke: var(--rule-strong); stroke-width: 1.2; transition: fill .5s, stroke .5s; }
.pipeline .node text { font: 500 13px var(--sans); fill: var(--ink); }
.pipeline .node text.sub { font: 11px var(--mono); fill: var(--muted); }
.pipeline .node.lit rect { stroke: var(--accent); fill: var(--accent-soft); }
.pipeline .wire { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; }
.pipeline .flow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 10; animation: flow 1.1s linear infinite; opacity: 0; transition: opacity .6s; }
.pipeline .flow.reject { stroke: var(--amber); }
.pipeline.in .flow { opacity: 1; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.pipeline .legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; font: 12px/1.4 var(--mono); color: var(--muted); }
.pipeline .legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--accent); }
.pipeline .legend i.a { background: var(--amber); }
.pipeline-mobile { display: none; }
@media (max-width: 700px) { .pipeline svg { display: none; } .pipeline-mobile { display: block; } .pipeline .legend { display: none; } }
.pipeline-mobile ol { list-style: none; margin: 0; padding: 0; }
.pipeline-mobile li { padding: 10px 0 10px 22px; border-left: 2px solid var(--accent); position: relative; font-size: 14.5px; }
.pipeline-mobile li::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.pipeline-mobile li span { display: block; font: 12px/1.4 var(--mono); color: var(--muted); }

.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 56px; counter-reset: step; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.timeline .progress { position: absolute; left: 15px; top: 6px; width: 2px; height: calc((100% - 12px) * var(--p, 1)); background: var(--accent); }
.timeline > li { position: relative; padding: 0 0 52px; counter-increment: step; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: -56px; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 500 11.5px/1 var(--mono); border: 2px solid var(--accent); color: var(--on-accent); background: var(--accent);
  transition: border-color .4s, color .4s, background .4s; }
.js .timeline > li:not(.reached)::before { background: var(--paper); border-color: var(--rule-strong); color: var(--muted); }
.timeline h3 { font-size: 24px; margin-bottom: 8px; }
.timeline p { color: var(--ink-2); max-width: 64ch; }
.timeline .meta { font: 12px/1.4 var(--mono); color: var(--muted); display: inline-block; margin-top: 4px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 4px; }
.timeline .aside { margin-top: 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; font-size: 14.5px; color: var(--ink-2); }
.timeline .aside code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }

/* ---------------------------------------------------------------- Deliverable: anatomy + before/after */
.anatomy { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 26px; }
.anatomy .line { font: 15px/1.9 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.anatomy .line span { border-bottom: 2px solid var(--rule-strong); padding: 1px 2px; border-radius: 2px; transition: background .25s, border-color .25s; cursor: default; }
.anatomy .line span.on { background: var(--accent-soft); border-color: var(--accent); }
.anatomy .parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; border-top: 1px solid var(--rule); }
.anatomy .parts div { padding: 14px 14px 0 0; border-top: 2px solid transparent; margin-top: -1px; transition: border-color .25s; cursor: default; }
.anatomy .parts div.on { border-color: var(--accent); }
.anatomy .parts b { display: block; font: 600 13.5px/1.6 var(--sans); color: var(--ink); }
.anatomy .parts p { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; }
@media (max-width: 760px) { .anatomy .parts { grid-template-columns: 1fr 1fr; } }

.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .compare { grid-template-columns: minmax(0, 1fr); } }
.sheet { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 8px; overflow: hidden; }
.sheet .bar { padding: 9px 12px; border-bottom: 1px solid var(--rule); font: 12px/1.3 var(--mono); color: var(--muted); background: var(--sunk); display: flex; justify-content: space-between; gap: 10px; }
.sheet .bar > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet table { font-size: 13px; width: 100%; table-layout: fixed; }
.sheet td, .sheet th { padding: 10px; overflow-wrap: anywhere; }
.sheet th:nth-child(1) { width: 40%; } .sheet th:nth-child(2) { width: 22%; }
.sheet td.empty { background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--sunk) 6px 7px); }
.sheet td.filled { font-weight: 600; }
.sheet td.note { font: 11.5px/1.5 var(--mono); color: var(--ink-2); }
.js .sheet.after td.fresh { color: transparent; background: var(--accent-soft); transition: color .6s var(--ease), background 1.2s var(--ease); }
.js .sheet.after.in td.fresh { color: inherit; background: transparent; }
.js .sheet.after.in tr:nth-child(2) td.fresh { transition-delay: .25s; } .js .sheet.after.in tr:nth-child(3) td.fresh { transition-delay: .5s; }

.rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--rule); }
.rules > div { padding: 26px 26px 26px 0; border-bottom: 1px solid var(--rule); }
.rules > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.rules > div:nth-child(even) { padding-left: 26px; }
.rules .k { font: 600 14px/1.2 var(--sans); color: var(--accent); display: block; margin-bottom: 8px; }
.rules p { color: var(--ink-2); margin: 0; font-size: 15px; }
.rules .eg { font: 12.5px/1.6 var(--mono); color: var(--muted); margin-top: 10px; }
@media (max-width: 720px) { .rules { grid-template-columns: 1fr; } .rules > div, .rules > div:nth-child(even) { padding: 20px 0; border-right: 0; } }

table.formats td:first-child { width: 30%; color: var(--muted); }
table.formats td { padding: 16px 12px 16px 0; font-size: 15px; }

/* ---------------------------------------------------------------- Security: retention timeline */
.retention .bar { display: grid; grid-template-columns: 2fr 7fr 7fr; height: 46px; border-radius: 6px; overflow: hidden; border: 1px solid var(--rule); }
.retention .seg { display: flex; align-items: center; padding: 0 12px; font: 500 12px/1.2 var(--mono); white-space: nowrap; overflow: hidden; transform-origin: left; }
.retention .seg:nth-child(1) { background: var(--accent); color: var(--on-accent); }
.retention .seg:nth-child(2) { background: var(--accent-soft); color: var(--ink); }
.retention .seg:nth-child(3) { background: var(--sunk); color: var(--ink-2); }
.js .retention .seg { transform: scaleX(0); transition: transform .9s var(--ease); }
.js .retention .seg:nth-child(2) { transition-delay: .35s; } .js .retention .seg:nth-child(3) { transition-delay: .7s; }
.js .retention.in .seg { transform: none; }
.retention .marks { display: grid; grid-template-columns: 2fr 7fr 7fr auto; margin-top: 10px; font: 12px/1.4 var(--mono); color: var(--muted); }
.retention .marks span:last-child { text-align: right; color: var(--red); }
@media (max-width: 640px) { .retention .seg { font-size: 10.5px; padding: 0 6px; } .retention .marks { font-size: 10.5px; } }

/* ---------------------------------------------------------------- FAQ */
.faq details { border-top: 1px solid var(--rule); padding: 20px 0; interpolate-size: allow-keywords; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font: 600 18px/1.4 var(--sans); letter-spacing: -.01em; list-style: none; display: flex; justify-content: space-between; gap: 16px; transition: color .2s; }
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 14px; height: 14px; margin-top: 6px;
  background: linear-gradient(currentColor, currentColor) center/14px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center/1.5px 14px no-repeat;
  color: var(--muted); transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(135deg); color: var(--accent); }
.faq details::details-content { height: 0; overflow: clip; transition: height .4s var(--ease), content-visibility .4s allow-discrete; }
.faq details[open]::details-content { height: auto; }
.faq details p { color: var(--ink-2); margin: 12px 0 0; max-width: 70ch; }
.faq .group { font: 650 15px/1.4 var(--sans); color: var(--ink); margin: 48px 0 8px; }
.faq .group:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Page transitions (cross-document View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .3s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in .6s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }
::view-transition-group(nav-indicator) { animation-duration: .45s; animation-timing-function: var(--ease-out); }

/* ---------------------------------------------------------------- Reduced motion: everything lands in its final state */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .rise { opacity: 1; transform: none; }
  .js .scrub .w { opacity: 1; }
  .chapter { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
