/* BEX Workstation landing page.
   Direction: "Type and nothing else", teal on paper, Anton over Work Sans (both SIL OFL, vendored
   in fonts/ so the page makes no outside request). Built on tasteskill's base.css. */

@font-face { font-family: "Anton"; src: url("fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #f7f9f8;
  --surface: #ebf0ee;
  --ink: #06525c;
  --muted: #2f737d;
  --accent: #06525c;
  --accent-strong: #043d45;
  --accent-ink: #f7f9f8;
  --field-1: #06525c;
  --field-1-ink: #f7f9f8;
  --field-deep: #043a41;
  --mark-1: #d3e6e2;
  --mark-2: #bcd9d3;

  /* The examiner's three calls keep the product's meanings: green, red, amber. */
  --call-match: #1a7f37;
  --call-nomatch: #c21f2b;
  --call-inc: #8a5a00;

  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-text: "Work Sans", system-ui, sans-serif;

  /* Five sizes do the work. */
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1rem + 0.6vw, 1.5rem);
  --step-head: clamp(2.75rem, 1.4rem + 4.2vw, 5.25rem);
  --step-display: clamp(3.25rem, 7.4vw, 7.5rem);
  --step-giant: clamp(10rem, 18vw, 18.75rem);

  --margin: clamp(1.25rem, 3.3vw, 3rem);
  /* The page margin, grown so content never runs wider than 104rem on a large screen. */
  --frame: max(var(--margin), calc((100% - 104rem) / 2));
  --gutter: clamp(1rem, 1.7vw, 1.5rem);
  --section: clamp(5rem, 11vw, 11rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul[class] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; background: var(--surface); }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nums { font-variant-numeric: tabular-nums; }
p { text-wrap: pretty; }

/* ---------- type ---------- */
h1, h2 { font-weight: 400; text-wrap: balance; }
.display, .head { font-family: var(--font-display); text-transform: uppercase; letter-spacing: -0.01em; }
.display { font-size: var(--step-display); line-height: 0.88; }
.head { font-size: var(--step-head); line-height: 0.92; }
kbd { font-family: var(--font-text); font-weight: 600; padding: 0.05em 0.4em; background: var(--surface); }

/* ---------- layout ---------- */
/* The page rides above the footer, which waits underneath and is uncovered at the end. */
.hero, main { position: relative; z-index: 1; background: var(--bg); }
.wrap { padding-inline: var(--frame); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.button--paper { background: var(--field-1-ink); color: var(--field-1); min-width: 12.5rem; min-height: 3.5rem; }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); }
  .button--paper:hover { background: var(--mark-1); }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- hero: the comparison, then the statement on the axis ---------- */
.hero { height: 100svh; min-height: 46rem; max-height: 72rem; grid-template-rows: auto minmax(0, 1fr) auto; row-gap: clamp(1.5rem, 3vh, 2.5rem); padding-top: 2.25rem; padding-bottom: 3rem; align-items: start; }
.wordmark { grid-column: 1 / 6; grid-row: 1; font-family: var(--font-display); text-transform: uppercase; font-size: var(--step-lead); line-height: 1; text-decoration: none; padding-top: 0.6rem; }
.hero__links { grid-column: 6 / 10; grid-row: 1; display: flex; gap: 2rem; padding-top: 0.75rem; }
.hero__action { grid-column: 10 / 13; grid-row: 1; justify-self: end; }
.hero__stage { grid-column: 1 / -1; grid-row: 2; align-self: stretch; }
.hero__aside { grid-column: 1 / 6; grid-row: 3; align-self: end; }
.hero__lead { max-width: 40ch; font-size: max(1.125rem, var(--step-body)); }
.hero__title { grid-column: 6 / 13; grid-row: 3; align-self: end; margin-bottom: -0.06em; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.lines [data-line] { display: block; }

/* ---------- the call: two specimens compared ---------- */
.call { padding-top: var(--section); }
.call__intro { row-gap: 2rem; align-items: start; }
.call__title { grid-column: 1 / 7; }
.call__text { grid-column: 7 / 13; max-width: 40rem; }
.call__text p { max-width: 58ch; }
.call__controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1.5rem; }
.choice { display: inline-flex; gap: 0.6rem; align-items: center; min-height: 3.25rem; padding: 0 1.1rem; background: var(--surface); font-weight: 600; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.choice:active { transform: scale(0.97); }
.choice[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .choice:hover { background: var(--mark-2); } .choice[aria-pressed="true"]:hover { background: var(--accent-strong); } }
.call__next { min-height: 3.25rem; padding: 0 0.25rem; font-weight: 600; }
.call__noscript { margin-top: 1rem; }

.stage { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); min-height: 0; overflow: hidden; }
.choice kbd { background: var(--bg); }
.specimen { display: flex; flex-direction: column; gap: 0.75rem; min-height: 0; }
.specimen figcaption { font-weight: 600; }
.specimen__source { font-weight: 400; }
.specimen__frame { flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.specimen__frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; background: #fff; }

.verdict { position: absolute; inset: 2.5rem 0 0; display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; pointer-events: none; }
.verdict[hidden] { display: none; }
.verdict > * { pointer-events: auto; background: var(--bg); }
.verdict__word { font-family: var(--font-display); text-transform: uppercase; font-size: var(--step-display); line-height: 0.9; padding: 0.12em 0.18em 0.04em; }
.verdict__panel { padding: 1rem 1.25rem 1.25rem; max-width: 26rem; }
.verdict__status { font-weight: 600; }
.verdict__actions { display: flex; gap: 0.75rem; margin-top: 0.85rem; flex-wrap: wrap; }
.verdict__button { min-height: 2.75rem; padding: 0 1rem; background: var(--surface); font-weight: 600; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.verdict__button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .verdict__button:hover { background: var(--mark-2); } }
.verdict[data-call="match"] { align-items: flex-start; justify-content: flex-start; }
.verdict[data-call="inconclusive"] { align-items: center; justify-content: center; text-align: center; }
.verdict[data-call="nomatch"] { align-items: flex-end; justify-content: flex-end; text-align: right; }
.verdict[data-call="match"] .verdict__word { color: var(--call-match); }
.verdict[data-call="inconclusive"] .verdict__word { color: var(--call-inc); }
.verdict[data-call="nomatch"] .verdict__word { color: var(--call-nomatch); }
.verdict[data-call="inconclusive"] .verdict__actions { justify-content: center; }
.verdict[data-call="nomatch"] .verdict__actions { justify-content: flex-end; }

/* ---------- working models of the workstation ---------- */
.screen { margin-top: clamp(2.5rem, 6vw, 6rem); }
.screen__caption { margin-top: 1.25rem; max-width: 52ch; }

/* Inside a model the workstation's own conventions hold: its borders, its small tracked labels, its
   colours for the three calls. Everything is scoped to [data-ui]. */
[data-ui] { --ui-ink: #1f2933; --ui-dim: #4e5a68; --ui-line: #d0d7de; --ui-panel: #f3f5f7; --ui-blue: #0969da; --ui-cyan: #0aa5c2;
  font-family: var(--font-text); font-size: var(--step-small); line-height: 1.4; color: var(--ui-ink); }
[data-ui] button { cursor: pointer; }
[data-ui] kbd { background: none; padding: 0; font-weight: 400; color: var(--ui-dim); }
[data-ui] .ws__code { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
[data-ui] .ws__label { text-transform: uppercase; letter-spacing: 0.08em; color: var(--ui-dim); margin: 1rem 0 0.5rem; }
[data-ui] .ws__label:first-child { margin-top: 0; }
[data-ui] .ws__subj { color: var(--ui-blue); text-transform: uppercase; letter-spacing: 0.06em; }
[data-ui] .ws__cand { color: #8a5a00; text-transform: uppercase; letter-spacing: 0.06em; }
[data-ui] .ws__panehead, [data-ui] .ws__panefoot { color: var(--ui-dim); padding: 0.4rem 0.5rem; }
[data-ui] .ws__panefoot { font-variant-numeric: tabular-nums; }
[data-ui] .ws__status { border-top: 1px solid var(--ui-line); padding: 0.5rem 0.75rem; color: var(--ui-dim); background: #fff; }
[data-ui] .ws__status b { color: #1a7f37; font-weight: 600; }
[data-ui] .ws__viewport { position: relative; overflow: hidden; background: #fff; touch-action: none; }
[data-ui] .ws__viewport img { width: 100%; height: 100%; object-fit: contain; background: #fff; transform-origin: 50% 50%; transition: transform 240ms var(--ease-out), filter 120ms linear; user-select: none; }
[data-ui] .ws__reset { margin-top: 0.75rem; min-height: 2.25rem; padding: 0 0.75rem; border: 1px solid var(--ui-line); background: #fff; border-radius: 3px; }
[data-ui] .ws__call { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 3rem; padding: 0 0.85rem; margin-bottom: 0.4rem; border: 1px solid; border-radius: 3px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; transition: transform var(--t-press) var(--ease-out); }
[data-ui] .ws__call:active:not(:disabled) { transform: scale(0.98); }
[data-ui] .ws__call--match { color: #116329; border-color: #2ea043; background: #dafbe1; }
[data-ui] .ws__call--inc { color: #7d4e00; border-color: #d29922; background: #fbf3e0; }
[data-ui] .ws__call--no { color: #a40e26; border-color: #da3633; background: #ffebe9; }
[data-ui] .ws__call[aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: 2px; }
[data-ui] .ws__call:disabled { opacity: 0.45; cursor: not-allowed; }

/* the comparison screen */
[data-ui].ws{ border: 1px solid var(--ui-line); background: var(--ui-panel); }
[data-ui] .ws__top{ display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.9rem; background: #fff; border-bottom: 1px solid var(--ui-line); }
[data-ui] .ws__brand{ font-weight: 600; color: var(--ui-blue); text-transform: uppercase; letter-spacing: 0.06em; }
[data-ui] .ws__who{ color: var(--ui-dim); }
[data-ui] .ws__tx{ display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.5rem 0.9rem; background: #fff; border-bottom: 1px solid var(--ui-line); }
[data-ui] .ws__view{ padding: 0.35rem 0.75rem; border: 1px solid var(--ui-blue); color: var(--ui-blue); background: #ddf4ff; border-radius: 3px; font-weight: 600; }
[data-ui] .ws__facts{ display: flex; gap: 1.5rem; margin: 0; flex-wrap: wrap; }
[data-ui] .ws__facts dt{ text-transform: uppercase; letter-spacing: 0.08em; color: var(--ui-dim); }
[data-ui] .ws__facts dd{ margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
[data-ui] .ws__body{ display: grid; grid-template-columns: 15rem minmax(0, 1fr) 15rem; }
[data-ui] .ws__rail, [data-ui] .ws__decide{ padding: 0.9rem; background: #fff; }
[data-ui] .ws__rail{ border-right: 1px solid var(--ui-line); }
[data-ui] .ws__decide{ border-left: 1px solid var(--ui-line); }
[data-ui] .ws__seg{ display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ui-line); border-radius: 3px; overflow: hidden; }
[data-ui] .ws__seg button{ min-height: 2.25rem; background: #fff; }
[data-ui] .ws__seg button + button{ border-left: 1px solid var(--ui-line); }
[data-ui] .ws__seg button[aria-pressed="true"]{ background: var(--ui-blue); color: #fff; }
[data-ui] .ws__tools{ display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
[data-ui] .ws__tools button{ display: flex; justify-content: space-between; align-items: center; min-height: 2.25rem; padding: 0 0.55rem; border: 1px solid var(--ui-line); border-radius: 3px; background: #fff; }
[data-ui] .ws__tools button:active{ background: #ddf4ff; }
[data-ui] .ws__slider{ display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.5rem; margin-bottom: 0.6rem; }
[data-ui] .ws__slider output{ font-variant-numeric: tabular-nums; }
[data-ui] .ws__slider input{ grid-column: 1 / -1; width: 100%; accent-color: var(--ui-blue); }
[data-ui] .ws__panes{ position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.5rem; }
[data-ui] .ws__pane{ display: grid; grid-template-rows: auto 1fr auto; background: #fff; border: 1px solid var(--ui-line); min-width: 0; }
[data-ui] .ws__pane .ws__viewport{ aspect-ratio: 4 / 3; cursor: grab; }
[data-ui] .ws__pane .ws__viewport:active{ cursor: grabbing; }
[data-ui] .ws__record{ margin: 0; }
[data-ui] .ws__record div{ display: flex; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px solid var(--ui-line); }
[data-ui] .ws__record dt{ color: var(--ui-dim); }
[data-ui] .ws__record dd{ margin: 0; }

[data-ui] .ws__confirm, [data-ui].cf{ border: 3px solid #2ea043; background: #eefbf1; padding: 0.9rem 1rem 1rem; }
[data-ui] .ws__confirm{ position: absolute; z-index: 2; width: min(25rem, calc(100% - 1.5rem)); }
[data-ui] .ws__confirm[hidden]{ display: none; }
[data-ui] .ws__confirm-word { font-family: var(--font-text); font-size: var(--step-lead); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #116329; }
[data-ui] .ws__confirm-meta { color: var(--ui-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }
[data-ui] .ws__confirm-clock { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.75rem; }
[data-ui] .ws__count { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #cdeed4; color: #116329; font-weight: 600; font-variant-numeric: tabular-nums; }
[data-ui] .ws__confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.85rem; }
[data-ui] .ws__confirm-actions button { min-height: 2.5rem; border: 1px solid #4e5a68; border-radius: 3px; background: #fff; font-weight: 600; }
[data-ui] .ws__confirm-actions button + button { border-color: #2ea043; color: #116329; background: #dafbe1; }
[data-ui] .ws__confirm[data-call="match"]{ top: 0.75rem; left: 0.75rem; }
[data-ui] .ws__confirm[data-call="inconclusive"]{ top: 50%; left: 50%; transform: translate(-50%, -50%); }
[data-ui] .ws__confirm[data-call="nomatch"]{ bottom: 0.75rem; right: 0.75rem; }
[data-ui] [data-call="inconclusive"].ws__confirm,[data-ui][data-call="inconclusive"].cf{ border-color: #d29922; background: #fdf6e7; }
[data-ui] [data-call="nomatch"].ws__confirm,[data-ui][data-call="nomatch"].cf{ border-color: #da3633; background: #fff1f0; }
[data-ui] [data-call="inconclusive"] .ws__confirm-word{ color: #7d4e00; }
[data-ui] [data-call="nomatch"] .ws__confirm-word{ color: #a40e26; }
[data-ui] [data-call="inconclusive"] .ws__count{ background: #f6e3b4; color: #7d4e00; }
[data-ui] [data-call="nomatch"] .ws__count{ background: #ffd8d5; color: #a40e26; }
[data-ui] [data-call="inconclusive"] .ws__confirm-actions button + button{ border-color: #d29922; color: #7d4e00; background: #fbf3e0; }
[data-ui] [data-call="nomatch"] .ws__confirm-actions button + button{ border-color: #da3633; color: #a40e26; background: #ffebe9; }
[data-ui] .is-settled .ws__count, [data-ui].is-settled .ws__count { background: #e3e7eb; color: var(--ui-dim); }

/* the record view */
[data-ui].rec{ border: 1px solid var(--ui-line); background: #fff; }
[data-ui] .rec__row{ padding: 0.6rem 0.75rem 0.4rem; }
[data-ui] .rec__grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; padding: 0 0.75rem; }
[data-ui] .rec__grid button{ display: grid; gap: 0.3rem; padding: 0.35rem; border: 1px solid var(--ui-line); border-radius: 3px; background: #fff; text-align: left; text-transform: uppercase; letter-spacing: 0.04em; transition: border-color var(--t-hover) ease; }
[data-ui] .rec__grid button[aria-pressed="true"]{ border-color: var(--ui-blue); outline: 1px solid var(--ui-blue); outline-offset: -2px; background: #f2f9ff; }
[data-ui] .rec__grid img{ width: 100%; aspect-ratio: 1; object-fit: cover; background: #fff; }
[data-ui].rec .ws__status{ margin-top: 0.75rem; }

/* the confirmation */
[data-ui].ui-decide{ display: grid; }
[data-ui].cf{ max-width: 25rem; }
[data-ui].cf.is-settled{ border-color: var(--ui-line); background: #fff; }

/* audit replay */
[data-ui].rp{ display: grid; grid-template-columns: 17rem minmax(0, 1fr); border: 1px solid var(--ui-line); background: #fff; }
[data-ui] .rp__history{ padding: 0.9rem; border-right: 1px solid var(--ui-line); }
[data-ui] .rp__case{ color: var(--ui-dim); margin-bottom: 0.6rem; }
[data-ui] .rp__steps{ margin: 0; padding: 0; list-style: none; }
[data-ui] .rp__steps button{ display: grid; grid-template-columns: auto 1fr; column-gap: 0.6rem; width: 100%; padding: 0.45rem 0.5rem; text-align: left; border-radius: 3px; background: none; }
[data-ui] .rp__steps button[aria-current="step"]{ background: #ddf4ff; }
[data-ui] .rp__steps time{ color: var(--ui-dim); font-variant-numeric: tabular-nums; }
[data-ui] .rp__steps small{ grid-column: 2; color: var(--ui-dim); font-size: 1em; }
[data-ui] .rp__steps .is-later{ opacity: 0.55; }
[data-ui] .rp__stage{ display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; background: var(--ui-panel); min-width: 0; }
[data-ui] .rp__now{ padding: 0.6rem 0.9rem; background: #fff; border-bottom: 1px solid var(--ui-line); font-weight: 600; }
[data-ui] .rp__panes{ position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.5rem; }
[data-ui] .rp__pane{ background: #fff; border: 1px solid var(--ui-line); min-width: 0; }
[data-ui] .rp__pane .ws__viewport{ aspect-ratio: 1; }
[data-ui] .rp__tag{ position: absolute; top: 1rem; left: 1rem; padding: 0.3rem 0.6rem; border: 2px solid #2ea043; background: #eefbf1; color: #116329; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
[data-ui] .rp__tag[hidden]{ display: none; }
[data-ui] .rp__scrub{ display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; background: #fff; border-top: 1px solid var(--ui-line); }
[data-ui] .rp__scrub button{ width: 2.25rem; height: 2.25rem; border: 1px solid var(--ui-line); border-radius: 3px; background: #fff; font-size: var(--step-body); }
[data-ui] .rp__scrub input{ flex: 1 1 0; min-width: 0; accent-color: var(--ui-blue); }
[data-ui] .rp__pos{ min-width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ui-dim); }

/* the latent screen, sealed */
[data-ui].lt{ border: 1px solid var(--ui-line); background: var(--ui-panel); }
[data-ui] .lt__bar{ padding: 0.6rem 0.9rem; background: #fff; border-bottom: 1px solid var(--ui-line); }
[data-ui] .lt__bar b{ color: #8a5a00; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.5rem; }
[data-ui].lt.is-open .lt__bar b{ color: #1a7f37; }
[data-ui] .lt__body{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 15rem; }
[data-ui] .lt__lift{ background: #fff; border-right: 1px solid var(--ui-line); }
[data-ui] .lt__surface{ position: relative; display: block; width: 100%; padding: 0; background: #7a7a7a; cursor: crosshair; }
[data-ui] .lt__surface img{ width: 100%; aspect-ratio: 1; object-fit: cover; user-select: none; }
[data-ui] .lt__mark{ position: absolute; width: 1.5rem; height: 1.5rem; margin: -0.75rem 0 0 -0.75rem; border: 2px solid var(--ui-cyan); border-radius: 50%; pointer-events: none; }
[data-ui] .lt__mark::after{ content: ""; position: absolute; left: 50%; top: -0.9rem; width: 2px; height: 0.9rem; background: var(--ui-cyan); transform-origin: 50% 100%; transform: translateX(-50%) rotate(var(--a, 0deg)); }
[data-ui] .lt__centre{ display: grid; padding: 0.9rem; }
[data-ui] .lt__sealed{ align-self: center; text-align: center; max-width: 24rem; justify-self: center; }
[data-ui] .lt__sealed[hidden]{ display: none; }
[data-ui] .lt__sealed-title{ color: #8a5a00; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.6rem; }
[data-ui] .lt__sealed-count{ margin: 0.8rem 0; color: var(--ui-dim); }
[data-ui] .lt__sealed-count b{ color: var(--ui-ink); font-variant-numeric: tabular-nums; }
[data-ui] .lt__commit{ min-height: 2.75rem; padding: 0 1rem; border: 1px solid #4e5a68; border-radius: 3px; background: #fff; font-weight: 600; }
[data-ui] .lt__list{ margin: 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; align-content: start; }
[data-ui] .lt__list[hidden]{ display: none; }
[data-ui] .lt__list li{ display: grid; grid-template-columns: 4rem 1fr; gap: 0.75rem; align-items: center; padding: 0.35rem; background: #fff; border: 1px solid var(--ui-line); border-radius: 3px; }
[data-ui] .lt__list img{ width: 4rem; aspect-ratio: 1; object-fit: cover; }
[data-ui] .lt__list span{ display: grid; }
[data-ui] .lt__note{ color: var(--ui-dim); margin-bottom: 0.75rem; }

/* ---------- modalities: one item per poster line ---------- */
.modalities { margin-top: var(--section); background: var(--surface); padding-block: clamp(3.5rem, 7vw, 6rem); }
.modalities__title { font-size: var(--step-lead); font-family: var(--font-text); text-transform: none; font-weight: 600; letter-spacing: 0; line-height: 1.3; margin-bottom: 2.5rem; }
.poster li { display: flex; justify-content: space-between; align-items: baseline; gap: 2rem; padding-bottom: 0.5rem; }
.poster__name { font-family: var(--font-display); text-transform: uppercase; font-size: var(--step-display); line-height: 1; transition: color var(--t-hover) ease; }
.poster__fact { font-size: var(--step-lead); text-align: right; line-height: 1.2; }
@media (hover: hover) and (pointer: fine) { .poster li:hover .poster__name { color: var(--muted); } }

/* ---------- fourteen impressions: total and its receipt ---------- */
.receipt-section { background: var(--field-1); color: var(--field-1-ink); padding-block: var(--section); }
.receipt-grid { align-items: stretch; }
.receipt-copy { grid-column: 1 / 7; display: flex; flex-direction: column; }
.receipt-note { margin-top: 1.5rem; max-width: 40ch; }
.total { font-family: var(--font-display); font-size: var(--step-giant); line-height: 0.8; margin-top: auto; padding-top: 3rem; }
.total__caption { margin-top: 1.25rem; font-size: var(--step-lead); line-height: 1.25; }
.slip { grid-column: 8 / 12; justify-self: start; width: min(100%, 27rem); background: var(--bg); color: var(--ink); padding: 1.75rem 1.75rem 2.75rem; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 95% 100%, 90% calc(100% - 12px), 85% 100%, 80% calc(100% - 12px), 75% 100%, 70% calc(100% - 12px), 65% 100%, 60% calc(100% - 12px), 55% 100%, 50% calc(100% - 12px), 45% 100%, 40% calc(100% - 12px), 35% 100%, 30% calc(100% - 12px), 25% 100%, 20% calc(100% - 12px), 15% 100%, 10% calc(100% - 12px), 5% 100%, 0 calc(100% - 12px)); }
.slip table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.slip td { padding: 0.3rem 0; }
.slip td:first-child { position: relative; overflow: hidden; white-space: nowrap; }
.slip td:first-child::after { content: ""; position: absolute; left: 0; right: 0.5rem; bottom: 0.6rem; border-bottom: 3px dotted var(--muted); z-index: 0; }
.slip td:last-child { text-align: right; width: 3ch; padding-left: 0.5rem; }
.slip .slip__group th { text-align: left; font-weight: 600; padding: 1rem 0 0.25rem; }
.slip .slip__group:first-child th { padding-top: 0; }
.slip .slip__total th, .slip .slip__total td { background: var(--ink); color: var(--bg); padding: 0.6rem 0.75rem; font-weight: 600; text-align: left; }
.slip .slip__total td { text-align: right; }
.slip .slip__total th { border-top: 1rem solid var(--bg); }
.slip .slip__total td { border-top: 1rem solid var(--bg); }
.slip td:first-child span { position: relative; z-index: 1; background: var(--bg); padding-right: 0.4rem; }

/* ---------- latent: two columns, highlighted words ---------- */
.latent { padding-top: var(--section); }
.latent__intro { row-gap: 2rem; align-items: start; }
.latent__title { grid-column: 1 / 7; }
.latent__story { grid-column: 7 / 13; }
.latent__story { font-size: var(--step-lead); line-height: 1.35; max-width: 40ch; }
.screen--sealed { margin-inline: var(--frame); }

/* ---------- in, decided, replayed: call and response ---------- */
.flow { padding-top: var(--section); }
.flow__column { margin-left: calc((100% + var(--gutter)) * 3 / 12); width: min(35rem, 100%); }
.flow__column h2 { margin-bottom: 3.5rem; }
.exchange + .exchange { margin-top: 5.5rem; }
.exchange__say { font-weight: 600; }
.exchange__call { position: relative; margin-top: 1rem; background: var(--surface); padding: 1.25rem; border-radius: 8px; }
.exchange__call pre { margin: 0; overflow-x: auto; font-size: var(--step-small); line-height: 1.6; }
.exchange__call code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.copy { position: absolute; top: 0.75rem; right: 0.75rem; min-height: 2.25rem; padding: 0 0.85rem; background: var(--bg); font-size: var(--step-small); font-weight: 600; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.copy:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .copy:hover { background: var(--mark-1); } }
.exchange__response { margin: 1.5rem 0 0 3.5rem; }
.exchange__response figcaption { margin-top: 0.85rem; }
.exchange__response--wide { width: calc(min(100vw - 2 * var(--margin), 104rem) * 0.75 - 3.5rem); max-width: 64rem; }

[data-ui].ui-search { display: grid; gap: 0.4rem; }
[data-ui].ui-search label { font-weight: 600; }
[data-ui].ui-search input { min-height: 2.75rem; padding: 0 0.8rem; border: 1px solid #8b98a9; border-radius: 3px; background: #fff; color: #1f2933; }

/* ---------- what it is held to: a table ---------- */
.held { padding-top: var(--section); }
.held__title span { display: block; }
.held__title .held__step { padding-left: calc((100% + var(--gutter)) * 2 / 12); }
.held__title { width: calc((100% + var(--gutter)) * 7 / 12); }
.held__table { width: 100%; margin-top: 4.5rem; border-collapse: collapse; table-layout: fixed; }
.held__table th, .held__table td { padding: 0.9rem 0.75rem; text-align: left; vertical-align: top; font-weight: 400; }
.held__table tbody tr:not(.held__gap):nth-child(odd) { background: var(--surface); }
.held__table th[scope="row"] { font-weight: 600; }
.held__table td:nth-child(2) { font-weight: 600; }
.held__table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.held__table tr > :nth-child(1) { width: 16.66%; }
.held__table tr > :nth-child(2) { width: 33.33%; }
.held__table tr > :nth-child(3) { width: 33.33%; }
.held__table tr > :nth-child(4) { width: 16.66%; }
.held__gap td { padding: 0.9rem 0; background: none; }

/* ---------- see it or drive it ---------- */
.ask { position: relative; z-index: 1; margin-top: var(--section); min-height: min(100svh, 56rem); background: var(--field-1); color: var(--field-1-ink); display: grid; grid-template-rows: auto 1fr auto; padding: 2rem var(--frame) 1.5rem; text-align: center; }
.ask__title { display: contents; }
.ask__title span { display: block; justify-self: center; }
.ask__title span:first-child { grid-row: 1; }
.ask__title span:last-child { grid-row: 3; }
.ask__middle { grid-row: 2; align-self: center; padding-block: 2rem; }
.ask__choices { display: flex; justify-content: center; align-items: center; gap: 2.5rem; }
.ask__or { }
.ask__after { margin: 1rem auto 0; max-width: 46ch; }

/* ---------- footer: columns above, the name below ---------- */
.footer { position: sticky; bottom: 0; z-index: 0; background: var(--field-deep); color: var(--field-1-ink); }
.footer__inner { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto auto; padding-top: 2.5rem; padding-bottom: 1.25rem; }
.footer__cols { row-gap: 2rem; font-size: var(--step-small); }
.footer__cols > * { grid-column: span 3; }
.footer__cols p + p { margin-top: 0.4rem; }
.footer__lead { font-weight: 600; margin-bottom: 0.4rem; }
.footer__list li + li { margin-top: 0.3rem; }
.footer__mark { grid-row: 3; width: 100%; height: auto; overflow: visible; }
.footer__mark text { font-family: var(--font-display); font-size: 140px; fill: currentColor; }
.footer__legal { grid-row: 4; margin-top: 1rem; font-size: var(--step-small); }

/* ---------- tablet ---------- */
@media (max-width: 64em) {
  .hero__links { grid-column: 5 / 10; }
  .hero { height: auto; max-height: none; min-height: 0; grid-template-rows: auto auto auto auto; }
  .hero__stage { height: 52vw; }
  .hero__aside { grid-column: 1 / -1; grid-row: 4; }
  .hero__title { grid-column: 1 / -1; grid-row: 3; }
  [data-ui] .ws__body { grid-template-columns: 16rem minmax(0, 1fr); }
  [data-ui] .ws__decide { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ui-line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; align-items: start; }
  [data-ui] .ws__decide .ws__label, [data-ui] .ws__decide .ws__record { grid-column: 1 / -1; }
  [data-ui] .lt__body { grid-template-columns: 1fr 1fr; }
  [data-ui] .lt__body .ws__decide { grid-column: 1 / -1; }
  [data-ui] .ws__decide > :not(.ws__call) { grid-column: 1 / -1; }
  [data-ui] .ws__decide > .ws__reset { justify-self: start; }
  [data-ui].rp { grid-template-columns: minmax(0, 1fr); }
  [data-ui] .rp__history { border-right: 0; border-bottom: 1px solid var(--ui-line); }
  .call__title, .call__text { grid-column: 1 / -1; }
  .latent__title, .latent__story { grid-column: 1 / -1; }
  .receipt-copy { grid-column: 1 / 7; }
  .slip { grid-column: 7 / 13; }
  :root { --step-display: clamp(3.25rem, 10vw, 7.5rem); }
  .flow__column { margin-left: 0; width: min(40rem, 100%); }
  .exchange__response, .exchange__response--wide { margin-left: 0; width: 100%; max-width: none; }
  .ask { min-height: 0; row-gap: 2.5rem; padding-block: 4.5rem; }
  .ask__middle { padding-block: 0; }
  /* The limits table becomes one block per row: what and its figure, then how. */
  .held__table { margin-top: 1.5rem; }
  .held__table, .held__table tbody { display: block; }
  .held__table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; padding: 0.9rem 0; background: none !important; }
  .held__table tr > * { width: auto !important; padding: 0; }
  .held__table th[scope="row"] { grid-column: 1 / -1; order: 0; font-size: var(--step-lead); padding: 1.75rem 0 0.25rem; }
  .held__table td:empty { display: none; }
  .held__table td:nth-child(2) { order: 1; }
  .held__table td:last-child { order: 2; }
  .held__table td:nth-child(3) { order: 3; grid-column: 1 / -1; }
  .held__gap { display: none !important; }
  .footer__cols > * { grid-column: span 6; }
}

/* ---------- phone ---------- */
@media (max-width: 47.99em) {
  :root { --margin: 1.25rem; --step-display: 13.5vw; --step-giant: 40vw; --section: 4.5rem; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { padding-top: 1.5rem; padding-bottom: 2.5rem; row-gap: 1.25rem; }
  .hero__stage { height: 56vw; column-gap: 0.5rem; }
  .specimen { gap: 0.4rem; }
  .wordmark { grid-column: 1 / 3; }
  .hero__links { display: none; }
  .hero__action { grid-column: 3 / 5; min-height: 2.75rem; padding: 0 1rem; font-size: var(--step-small); }
  .call__controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; margin-top: 1rem; }
  .choice { padding: 0 0.4rem; min-height: 3.5rem; justify-content: center; }
  .choice kbd { display: none; }
  .call__next { grid-column: 1 / -1; justify-self: start; padding-left: 0; }
  .verdict { inset: 2rem 0 0; padding: 0.4rem; gap: 0.4rem; }
  .verdict__word { font-size: 13vw; }
  .specimen__source { display: none; }
  .verdict__panel { padding: 0.6rem 0.75rem 0.75rem; }
  .verdict__status { font-weight: 400; }
  .poster li { flex-direction: column; align-items: flex-start; gap: 0.4rem; padding-bottom: 1.4rem; }
  .poster__fact { font-size: var(--step-body); text-align: left; }
  .receipt-copy, .slip { grid-column: 1 / -1; }
  .total { padding-top: 2.5rem; }
  .slip { margin-top: 3rem; width: 100%; }
  .latent__title, .latent__story { grid-column: 1 / -1; }
  /* The models stack into one column on a phone: the pictures first, the decision, then the tools. */
  [data-ui] .ws__tx { display: none; }
  [data-ui] .ws__body, [data-ui] .lt__body { grid-template-columns: minmax(0, 1fr); }
  [data-ui] .ws__panes { order: 1; }
  [data-ui] .ws__decide { order: 2; grid-template-columns: 1fr; }
  [data-ui] .ws__rail { order: 3; border-right: 0; border-top: 1px solid var(--ui-line); }
  [data-ui] .ws__confirm { width: calc(100% - 1rem); }
  [data-ui] .ws__confirm[data-call="match"] { top: 0.5rem; left: 0.5rem; }
  [data-ui] .ws__confirm[data-call="nomatch"] { bottom: 0.5rem; right: 0.5rem; }
  [data-ui] .lt__lift { border-right: 0; }
  [data-ui] .rec__grid { grid-template-columns: repeat(2, 1fr); }
  [data-ui] .rp__panes { grid-template-columns: 1fr 1fr; }

  .flow__column { margin-left: 0; }
  .exchange__response { margin-left: 0; }
  .exchange__call pre { padding-top: 2.75rem; }
  .copy { top: 0.6rem; }
  .exchange__response--wide { width: 100%; max-width: none; }
  .held__title { width: auto; }
  .ask__choices { flex-direction: column; gap: 0.75rem; }
  .ask__choices .button { width: 72%; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__cols > * { grid-column: span 1; }
  .footer__inner { min-height: 0; grid-template-rows: auto auto auto auto; row-gap: 3rem; padding-block: 3rem 1.5rem; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-expo) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js .hero [data-load] { opacity: 0; transform: translateY(12px); animation: rise 600ms var(--ease-out) forwards; animation-delay: var(--d); }
  .js .hero .hero__action, .js .hero .hero__links, .js .hero .wordmark { opacity: 0; animation: rise 600ms var(--ease-out) 560ms forwards; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  /* Poster lines arrive in place, one after another; they abut, so none may travel into its neighbour. */
  .js .poster li[data-reveal] { transform: none; transition: opacity 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
  /* The clip goes on the picture, not the figure: an observer never fires for an element its own clip hides. */
  .js .screen[data-reveal] { transform: none; opacity: 1; }
  .js .screen[data-reveal] > :first-child { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .screen[data-reveal].is-in > :first-child { clip-path: inset(0); }
  .js .screen[data-reveal] figcaption { opacity: 0; transition: opacity 700ms var(--ease-out) 500ms; }
  .js .screen[data-reveal].is-in figcaption { opacity: 1; }
  .verdict:not([hidden]) .verdict__word { animation: land 420ms var(--ease-out); }
  .verdict:not([hidden]) .verdict__panel { animation: rise 420ms var(--ease-out) 90ms backwards; }
  .specimen__frame img { transition: opacity 260ms ease; }
  .is-dealing .specimen__frame img { opacity: 0; }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes land { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
