:root {
  --ink: #0a2540;
  --paper: #f6f8fb;
  --white: #ffffff;
  --signal: #0f766e;
  --line: #d3dce6;
  --muted: #4b5d73;
  --amber: #92400e;
  --amber-bg: #fef3e2;
  --serif: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, 'Iowan Old Style', Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }
.band { padding-block: clamp(56px, 9vw, 112px); }
.band-white { background: var(--white); }
.band-ink { background: var(--ink); color: var(--paper); }

h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.015em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.7rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--muted); margin-top: 24px; max-width: 46ch; }
.section-intro { margin-top: 18px; color: var(--muted); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 0.95rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.btn {
  display: inline-block; padding: 0.8em 1.35em; background: var(--ink); color: #fff;
  border: 1.5px solid var(--ink); border-radius: 2px; font-weight: 600; text-decoration: none;
}
.btn:hover { background: var(--white); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { padding: 0.55em 1em; font-size: 0.95rem; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: clamp(32px, 6vw, 72px) clamp(40px, 7vw, 88px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.slip { margin: 0; background: var(--white); border: 1.5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.slip-block { padding: 22px 24px; }
.slip-title { margin: 0 0 12px; font: 600 0.95rem/1.3 var(--sans); color: var(--muted); }
.slip-list { margin: 0; }
.field { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.field:last-child { border-bottom: 0; }
.field dt { color: var(--muted); font-size: 0.95rem; }
.field dd { position: relative; margin: 0; padding: 0 4px; font-family: var(--serif); font-size: 1.05rem; }
.bar { position: absolute; inset: -1px 0; background: var(--ink); transform-origin: left center; animation: cover 0.55s cubic-bezier(0.7, 0, 0.3, 1) both; }
.bar-1 { animation-delay: 0.9s; }
.bar-2 { animation-delay: 1.15s; }
.bar-3 { animation-delay: 1.4s; }
.bar-4 { animation-delay: 1.65s; }
@keyframes cover { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.slip-answer { background: var(--signal); color: #fff; border-top: 1.5px solid var(--ink); }
.slip-answer .slip-title { color: #d6f1ee; }
.slip-answer .field { border-bottom-color: rgba(255, 255, 255, 0.28); }
.slip-answer .field dt { color: #d6f1ee; font-family: var(--mono); font-size: 0.9rem; }
.slip-answer .field dd { font-family: var(--mono); font-size: 0.98rem; font-weight: 600; }
.slip-note { margin-top: 22px; font-size: 0.88rem; color: var(--muted); max-width: none; }

.status { border-left: 4px solid var(--amber); background: var(--amber-bg); padding: 16px 20px; }
.status p { max-width: 80ch; font-size: 0.98rem; }
.status strong { color: var(--amber); }

/* how it works */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--signal); margin-bottom: 14px; }
.steps h3 { margin-bottom: 8px; font-size: 1.15rem; }
.steps p { font-size: 0.98rem; color: var(--muted); }
.steps-end { margin-top: 40px; font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem); max-width: 40ch; }

/* who sees what */
.table-scroll { position: relative; margin-top: 40px; overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: 0; }
.sees { width: 100%; min-width: 560px; border-collapse: collapse; }
.sees caption { text-align: left; padding-bottom: 14px; color: var(--muted); font-size: 0.95rem; }
.sees th, .sees td { padding: 16px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.sees thead th { border-top: 0; border-bottom: 2px solid var(--ink); font-family: var(--serif); font-size: 1.1rem; }
.sees tbody th { font-weight: 600; width: 34%; }
.sees td { width: 22%; }
.cant { display: block; height: 1.1em; width: 4.2em; background: var(--ink); }
.can { color: var(--signal); font-weight: 700; }

/* built for, details, status lists */
.rows { margin: 40px 0 0; }
.row { display: grid; grid-template-columns: minmax(150px, 1fr) 2.4fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font-size: 1.4rem; }

.pairs { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 64px; }
.pairs h3 { margin-bottom: 8px; }
.pairs p { color: var(--muted); }

.where { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
.where h3 { margin-bottom: 14px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 7px 0 7px 26px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 0.95em; width: 12px; height: 12px; border: 2px solid var(--signal); background: var(--signal); }
.ticks-todo li::before { background: transparent; border-color: var(--muted); }
.standards { margin-top: 36px; color: var(--muted); }

/* contact */
.band-ink h2 { max-width: 20ch; }
.band-ink .section-intro { color: #c4d1df; }
.contact-links { list-style: none; margin: 40px 0 0; padding: 0; max-width: 640px; }
.contact-links li { border-top: 1px solid rgba(246, 248, 251, 0.3); }
.contact-links li:last-child { border-bottom: 1px solid rgba(246, 248, 251, 0.3); }
.contact-links a { display: block; padding: 20px 0; font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.6rem); text-decoration: none; }
.contact-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.band-ink :focus-visible { outline-color: #7fd6cc; }
.contact-direct { margin-top: 28px; color: #c4d1df; }

.foot { padding-block: 32px; font-size: 0.92rem; color: var(--muted); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot a { color: inherit; }

/* privacy and 404 pages */
.doc { padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 104px); }
.doc h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 22ch; }
.doc h2 { font-size: 1.5rem; margin-top: 44px; max-width: none; }
.doc p { margin-top: 14px; }
.doc .updated { color: var(--muted); margin-top: 18px; }

@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .slip { box-shadow: 6px 6px 0 var(--ink); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .steps, .pairs, .where { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar { animation: none; }
}

/* interactive demo */
.demo-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.demo-steps { list-style: none; margin: 0; padding: 0; counter-reset: ds; }
.demo-steps li { counter-increment: ds; position: relative; padding: 16px 0 16px 54px; border-top: 1px solid var(--line); transition: opacity 0.3s; }
.demo-steps li:last-child { border-bottom: 1px solid var(--line); }
.demo-steps li::before { content: counter(ds); position: absolute; left: 0; top: 14px; width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--ink); font-family: var(--serif); font-weight: 700; }
.demo-steps li.on::before { background: var(--signal); border-color: var(--signal); color: #fff; }
.demo-steps li.done::before { content: '\2713'; background: var(--ink); color: #fff; }
.demo-steps h3 { font-size: 1.08rem; margin-bottom: 4px; }
.demo-steps p { font-size: 0.95rem; color: var(--muted); }
.demo.js-on .demo-steps li:not(.on):not(.done) { opacity: 0.45; }

.hint { max-width: 520px; margin: 0 auto 22px; font-weight: 600; color: var(--signal); min-height: 3.2em; }
.hint:empty { display: none; }
.stage { display: grid; gap: 38px; justify-items: center; }
.device { position: relative; width: 100%; display: flex; justify-content: center; }
.device-site .browser { max-width: 520px; }
.turn { display: none; position: absolute; top: -14px; right: 50%; margin-right: -250px; z-index: 3; background: var(--signal); color: #fff; font: 700 0.8rem var(--sans); padding: 4px 10px; border-radius: 2px; }
.device-phone .turn { margin-right: -128px; top: -12px; }
.stage[data-focus="phone"] .device-phone .turn, .stage[data-focus="site"] .device-site .turn { display: block; }
.stage[data-focus="site"] .browser { border-color: var(--signal); box-shadow: 8px 8px 0 var(--signal); }
.stage[data-focus="phone"] .phone { border-color: var(--signal); box-shadow: 8px 8px 0 var(--signal), inset 0 0 0 6px var(--signal); }

.browser { width: 100%; max-width: 520px; background: var(--white); border: 1.5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1.5px solid var(--ink); background: var(--paper); }
.dots { width: 44px; height: 10px; background: radial-gradient(circle, var(--line) 4px, transparent 5px) 0 0 / 15px 10px repeat-x; }
.url { font: 0.82rem var(--mono); color: var(--muted); }
.browser-body { padding: 22px 24px 26px; display: grid; gap: 12px; }
.app-name { font: 700 1.5rem var(--serif); }
.app-sub { color: var(--muted); font-size: 0.92rem; margin-top: -8px; }
.inp { border: 1px solid var(--line); padding: 9px 12px; font-size: 0.95rem; color: var(--muted); }
.gate { border: 1.5px dashed var(--ink); padding: 14px 16px; min-height: 112px; display: grid; gap: 10px; align-content: start; }
.gate-title { font-weight: 600; font-size: 0.95rem; }
.gate > div { display: none; align-items: center; gap: 10px; font-size: 0.92rem; animation: fade 0.35s both; }
.gate-d { color: var(--signal); }
.gate-d strong::before { content: '\2713\00a0'; }
.gate-msg { font-size: 0.9rem; color: var(--amber); font-weight: 600; }
.gate-msg:empty { display: none; }
.fake-btn { display: inline-block; padding: 0.55em 1em; background: var(--ink); color: #fff; font-weight: 600; font-size: 0.9rem; border-radius: 2px; }
button.fake-btn { border: 0; font-family: inherit; cursor: pointer; }
button.fake-btn:hover { background: var(--signal); }
.create { justify-self: start; opacity: 0.35; }
.codefield { width: 10ch; padding: 0.5em 0.7em; border: 1.5px solid var(--ink); border-radius: 0; font: 600 0.95rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; background: var(--white); color: var(--ink); }
.stage[data-step="0"] .gate-a { display: flex; }
.stage[data-step="1"] .gate-b { display: flex; }
.stage[data-step="2"] .gate-c { display: flex; }
.stage[data-step="3"] .gate-d { display: flex; }
.stage[data-step="3"] .create { opacity: 1; }

.phone { position: relative; width: 236px; height: 440px; border: 2px solid var(--ink); border-radius: 38px; background: var(--white); box-shadow: 8px 8px 0 var(--ink), inset 0 0 0 6px var(--ink); overflow: hidden; display: flex; flex-direction: column; text-align: center; }
.phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 74px; height: 20px; background: var(--ink); border-radius: 12px; z-index: 2; }
.phone-status { display: flex; justify-content: space-between; align-items: center; padding: 14px 30px 0; font: 600 0.78rem var(--sans); }
.phone-icons { width: 34px; height: 10px; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 4px 4px no-repeat, linear-gradient(var(--ink), var(--ink)) 8px 100% / 4px 7px no-repeat, linear-gradient(var(--ink), var(--ink)) 16px 100% / 4px 10px no-repeat, linear-gradient(var(--ink), var(--ink)) 26px 0 / 8px 10px no-repeat; }
.phone-screen { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 24px; }
.phone-brand { font: 700 1rem var(--serif); color: var(--signal); margin-bottom: 26px; }
.phone-home { width: 84px; height: 4px; background: var(--ink); border-radius: 2px; margin: 0 auto 14px; }
.phone-screen > div { display: none; animation: fade 0.35s both; }
.p-line { font-size: 0.95rem; margin: 0 auto 14px; }
.p-small { font-size: 0.82rem; color: var(--muted); margin: 14px auto 0; }
.p-big { font: 700 2rem var(--mono); letter-spacing: 0.1em; margin: 6px auto 0; }
.p-done .p-big { color: var(--signal); }
.nums { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.num { width: 56px; height: 56px; display: grid; place-items: center; border: 1.5px solid var(--ink); background: var(--white); color: var(--ink); font: 700 1.3rem var(--mono); cursor: pointer; }
.num:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.stage[data-step="0"] .p-idle { display: block; }
.stage[data-step="1"] .p-code { display: block; }
.stage[data-step="2"] .p-ask { display: block; }
.stage[data-step="3"] .p-done { display: block; }
.replay { margin-top: 14px; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 880px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } .turn { right: 12px; margin-right: 0; } .device-phone .turn { right: calc(50% - 128px); margin-right: 0; } }
@media (prefers-reduced-motion: reduce) { .gate > div, .phone-screen > div { animation: none; } .demo-steps li { transition: none; } }

/* scenario tabs */
.tabs { display: none; flex-wrap: wrap; gap: 4px 28px; margin-top: 32px; border-bottom: 1px solid var(--line); }
.demo.js-on .tabs { display: flex; }
.tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 12px 2px; font: 600 1rem var(--sans); color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--signal); }
.scenario { margin-top: 22px; font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.4rem); max-width: 52ch; min-height: 3.2em; }

/* layout: steps left, website and phone side by side */
.demo-grid { grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.demo-grid > div { order: 0; min-width: 0; }
.demo-steps { order: 0; display: block; }
.demo-steps li { padding: 14px 0 14px 46px; }
.demo-steps li::before { position: absolute; left: 0; top: 12px; width: 30px; height: 30px; margin: 0; }
.demo-steps h3 { font-size: 1rem; }
.demo-steps p { font-size: 0.88rem; }
.hint { max-width: none; margin: 0 0 24px; min-height: 3.2em; }
.stage { grid-template-columns: minmax(0, 1fr) 236px; justify-content: stretch; align-items: start; gap: 32px; }
.device { width: auto; }
.device-site { width: 100%; }
.device-site .browser { max-width: none; }
.turn, .device-phone .turn { right: 12px; margin-right: 0; }
.device-phone .turn { right: -8px; }
.slip-note { text-align: left; max-width: none; }
.replay { display: block; margin: 14px 0 0; }
@media (max-width: 1000px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .demo-grid > div { order: 1; }
  .demo-steps { order: 2; }
  .stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 38px; }
  .device-site .browser { max-width: 520px; }
  .device-phone { justify-content: center; width: 100%; }
  .device-phone .turn { right: calc(50% - 128px); }
  .slip-note { text-align: center; }
  .replay { margin: 14px auto 0; }
}

/* Persona chooser */
.chooser-band { padding-bottom: 8px; }
.persona { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.persona-tab { display: block; padding: 18px 20px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); text-decoration: none; }
.persona-tab strong { display: block; font-family: var(--serif); font-size: 1.25rem; margin-bottom: 6px; }
.persona-tab span { display: block; font-size: 0.95rem; color: var(--muted); }
.persona-tab:hover { background: #f1f5f9; }
.persona-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.persona-tab[aria-selected="true"] span { color: #c4d1df; }
.persona-tab:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.panel[hidden] { display: none; }
.soon { margin-top: 24px; color: var(--muted); font-style: italic; }
.panel-cta { margin-top: 28px; }
#setup .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .persona { grid-template-columns: minmax(0, 1fr); }
  #setup .steps { grid-template-columns: minmax(0, 1fr); }
}
