/* Tolven demo.
   Layout: one stage plays one chapter at a time. The reporter's side is a phone running the (fictional) Fernhill app,
   where the report opens as a native bottom sheet; in the After chapter that same sheet becomes the interview.
   Beside it, an evidence board fills in as the case is built. */
:root {
  --paper: #F2F4F7;
  --surface: #FFFFFF;
  --raised: #F7F8FA;
  --ink: #16202C;
  --muted: #5B6677;
  --line: #DADFE6;
  --accent: #2346C8;
  --accent-soft: #E6EBFA;
  --on-accent: #FFFFFF;
  --mark: #FFE27A;
  --mark-ink: #16202C;
  --bubble: #E6EAF0;
  --fern: #2D6A49;
  --fern-soft: #E5EFE8;
  --on-fern: #FFFFFF;
  --alert: #B42318;
  --alert-soft: #FCE8E5;
  --ok: #1B7447;
  --ok-soft: #E2F3E9;
  --shadow: 0 1px 2px rgba(22, 32, 44, 0.06), 0 10px 28px rgba(22, 32, 44, 0.07);
  --font-display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
.band-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar .band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-block: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo { width: 28px; height: 28px; flex: none; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 720;
  font-stretch: 118%;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ctl {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ctl:hover { background: var(--raised); }
.ctl:disabled { opacity: 0.45; cursor: default; }
.ctl.icon { width: 34px; padding: 0; }
.ctl svg { width: 16px; height: 16px; flex: none; }
.ctl.primary {
  min-width: 128px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.ctl.primary:hover { filter: brightness(1.07); }
.ctl.speed { min-width: 48px; font-variant-numeric: tabular-nums; }

/* Chapter rail */
.rail { background: var(--surface); border-bottom: 1px solid var(--line); }
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.chapter {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 8px 0 9px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13.5px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.chapter:hover { color: var(--ink); }
.chapter-label { display: flex; align-items: baseline; gap: 8px; }
.chapter .n { font-family: var(--font-mono); font-size: 12px; }
.chapter.done { color: var(--ink); }
.chapter[aria-current="step"] { color: var(--ink); font-weight: 600; }
.chapter-bar { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.chapter-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s ease; }
.chapter.is-before .chapter-fill { background: var(--muted); }

/* Stage */
.stage .band-inner { padding-block: 18px 32px; }
.scene { display: grid; gap: 16px; }
.scene-head { display: grid; gap: 4px; }
.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}
.scene-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 700;
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.hl {
  background-image: linear-gradient(var(--mark), var(--mark));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--mark-ink);
  padding: 1px 4px;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sweep .hl { animation: sweep 0.8s ease-out both; }
@keyframes sweep { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
.enter { animation: rise 0.35s ease-out both; }
[data-beat] { scroll-margin-top: 72px; scroll-margin-bottom: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--muted);
  white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.alert { background: var(--alert-soft); color: var(--alert); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* Before and after: today's flow is shown in black and white, and color arrives with Tolven. */
.phase {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  letter-spacing: 0.1em;
}
.is-before .eyebrow { color: var(--muted); }
.is-before .phase,
.cmp.before .phase { background: var(--muted); }
.is-before .today-grid,
.cmp.before { filter: grayscale(1); }

/* A tap: a soft dot where the reporter's finger lands. */
.tap-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(22, 32, 44, 0.28);
  opacity: 0;
  pointer-events: none;
}
.tapped .tap-dot { animation: tap 0.7s ease-out both; }
@keyframes tap {
  0% { opacity: 0; transform: scale(0.3); }
  25% { opacity: 1; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* Scene 1: today's flow (her chat with the seller, then the report sheet) */
.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* The phone: Maya's Fernhill app. Fixed height, so the report sheet can slide up over the chat. */
.phone {
  position: relative;
  height: clamp(560px, calc(100vh - 220px), 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.scrim { position: absolute; inset: 0; z-index: 2; background: rgba(22, 32, 44, 0.38); }

/* The report sheet. It opens at a height that fits today's form; the interview stretches it to nearly full screen. */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 456px;
  max-height: calc(100% - 52px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 30px rgba(22, 32, 44, 0.18);
  transition: height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Leaves the app's top bar showing above the sheet, the way a native page sheet does. */
.sheet.interviewing { height: calc(100% - 52px); }
.sheet-grab { flex: none; width: 38px; height: 5px; margin: 8px auto 2px; border-radius: 3px; background: #C9D0DA; }
.sheet-head {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.sheet-head strong { font-size: 14.5px; font-weight: 650; }
.sheet-cancel { color: var(--fern); font-size: 14px; }
.sheet-action { justify-self: end; color: var(--fern); font-size: 14px; font-weight: 700; visibility: hidden; }
.sheet.interviewing .sheet-action { visibility: visible; }
.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
}
.pick { display: grid; gap: 12px; }

/* After "Scam or fraud": the reason collapses to one line and the interview takes the rest of the sheet. */
.chosen {
  display: none;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--fern);
  border-radius: 10px;
  background: var(--fern-soft);
  font-size: 14px;
}
.chosen-dot {
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--fern);
  border-radius: 50%;
  background: radial-gradient(circle, var(--fern) 0 4px, transparent 4.5px);
}
.chosen-change { margin-left: auto; color: var(--fern); font-size: 13px; font-weight: 600; }
.interview { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.sheet.interviewing .pick { display: none; }
.sheet.interviewing .chosen { display: flex; animation: rise 0.35s ease-out both; }
.sheet.interviewing .interview { display: flex; animation: rise 0.45s 0.08s ease-out both; }

.ai-id { flex: none; display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

.composer { flex: none; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.composer-input {
  flex: 1 1 auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
}
.composer-attach,
.composer-send { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; }
.composer-attach { color: var(--muted); }
.composer-send { background: var(--fern); color: var(--on-fern); }
.composer svg { width: 16px; height: 16px; }

.toast {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  z-index: 4;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow);
}

.sheet.enter { animation: sheet-up 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scrim.enter { animation: fade-in 0.3s ease-out both; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.fern-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--fern);
  color: var(--on-fern);
}
.fern-logo { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.fern-bar span:last-child { font-size: 13px; opacity: 0.9; }
.convo-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.convo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--bubble);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}
.convo-who { display: grid; min-width: 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.convo-who strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.report-btn {
  position: relative;
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--alert);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.report-btn svg { width: 13px; height: 13px; flex: none; }
.report-btn.pressed { background: var(--alert-soft); border-color: var(--alert); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }
.convo-log { display: grid; gap: 8px; padding: 14px 16px 22px; }
.convo-day { margin: 0; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.cb { max-width: 82%; padding: 8px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.cb.them { justify-self: start; background: var(--bubble); border-bottom-left-radius: 4px; }
.cb.me { justify-self: end; background: var(--fern); color: var(--on-fern); border-bottom-right-radius: 4px; }
.fern-q { margin: 0; font-weight: 600; font-size: 14px; }
.radios { display: grid; gap: 8px; }
.radio {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.radio .tap-dot { left: 20px; }
.radio .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.radio.on { border-color: var(--fern); background: var(--fern-soft); }
.radio.on .dot { border-color: var(--fern); background: radial-gradient(circle, var(--fern) 0 4px, transparent 4.5px); }
.fern-field { display: grid; gap: 6px; }
.fern-field span { font-size: 13px; color: var(--muted); }
.fern-text {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.fern-text.caret-on::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--ink);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
.fern-submit { position: relative; text-align: center; padding: 10px; border-radius: 10px; background: var(--fern); color: var(--on-fern); font-weight: 600; font-size: 14px; }

.ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 14px;
  max-width: 600px;
}
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ticket-title { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; }
.kv {
  margin: 0;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 9px 16px;
  font-size: 14px;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv .none { color: var(--alert); font-weight: 600; }
.ticket-next { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--raised); color: var(--muted); font-size: 13.5px; }

/* Scene 2: interview, inside the report sheet */
.interview-grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 470px);
  gap: 28px;
  align-items: start;
}
.sheet .fern-text { min-height: 52px; }
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--fern-soft);
  color: var(--fern);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}
.chat-title { font-weight: 600; font-size: 14px; }
.chat-sub { font-size: 12px; color: var(--muted); }
.chat-log {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Interview bubbles match the app's own messages, so the interview reads as part of Fernhill. */
.msg {
  max-width: 84%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.msg.ai { align-self: flex-start; background: var(--bubble); border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--fern); color: var(--on-fern); border-bottom-right-radius: 4px; }
.msg .hl { font-family: var(--font-mono); font-size: 12.5px; }
.msg .shot { margin-top: 8px; }
.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 11px 13px;
  background: var(--bubble);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bounce 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-3px); opacity: 1; } }

.shot {
  width: min(250px, 100%);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.shot-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--raised);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.shot-label svg { width: 13px; height: 13px; flex: none; }
/* A payment-app receipt, as the buyer screenshotted it */
.receipt { display: grid; gap: 2px; justify-items: center; padding: 12px; font-size: 13px; text-align: center; }
.receipt-amt { font-family: var(--font-display); font-size: 22px; font-weight: 750; letter-spacing: -0.01em; }
.receipt-to strong { font-weight: 650; }
.receipt-acct { color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.receipt-meta { color: var(--muted); font-size: 11.5px; }
.receipt-status {
  margin-top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 11.5px;
  font-weight: 600;
}
.sms { display: grid; gap: 6px; padding: 10px; font-size: 12.5px; }
.sms-from { text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.sms-b { max-width: 88%; padding: 6px 9px; border-radius: 12px; }
.sms-b.them { justify-self: start; background: var(--bubble); }
.sms-b.mine { justify-self: end; background: var(--accent); color: var(--on-accent); }

.board {
  position: sticky;
  top: 64px;
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.board-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.board-head .label { margin: 0; }
.counter { font-size: 13px; color: var(--muted); }
.counter b { font-family: var(--font-display); font-stretch: 110%; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.fields { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.field {
  display: grid;
  gap: 2px;
  padding: 6px 11px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  transition: background-color 0.3s ease;
}
.f-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.tag { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); }
.f-val { font-size: 13.5px; overflow-wrap: anywhere; }
.f-empty { color: var(--muted); }
.field:not(.got) .f-got { display: none; }
.field.got .f-empty { display: none; }
.field.got { border-style: solid; background: var(--raised); }
.field .hl { font-family: var(--font-mono); font-size: 12.5px; }
.field.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--mark); } 25% { box-shadow: 0 0 0 4px var(--mark); } 100% { box-shadow: 0 0 0 0 transparent; } }
.board-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.board-foot.field { border: 0; padding: 0; background: none; }

/* Scene 3: the case */
.compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr);
  gap: 12px;
  align-items: stretch;
}
.cmp { display: grid; gap: 3px; align-content: start; padding: 10px 14px; border-radius: 12px; }
.cmp.before { background: var(--surface); border: 1px solid var(--line); }
.cmp.after { background: var(--accent-soft); }
.cmp .label { margin: 0; }
.cmp.after .label { color: var(--accent); }
.cmp-text { font-size: 14px; }
.cmp-stats { font-size: 13.5px; color: var(--muted); }
.cmp.after .cmp-stats { color: var(--ink); font-weight: 600; }
.cmp-note { font-size: 13.5px; color: var(--muted); }
.cmp-arrow { align-self: center; color: var(--muted); }
.cmp-arrow svg { width: 22px; height: 22px; display: block; }

.casefile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.case-head { display: grid; gap: 4px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.case-topline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.case-id { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.case-topline .seg { margin-left: auto; }
.case-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 106%;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.case-meta { margin: 0; font-size: 13px; color: var(--muted); }
.case-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.case-col { display: grid; gap: 18px; align-content: start; padding: 16px 20px; min-width: 0; }
.case-col + .case-col { border-left: 1px solid var(--line); }
.case-sec h4 {
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.case-sec h4 small { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.case-sec p { margin: 0; }
.signals { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.signals li { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); }
.ids { list-style: none; margin: 0; padding: 0; display: grid; }
.ids li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.ids li:first-child { border-top: 0; padding-top: 0; }
.id-type { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.id-val { font-family: var(--font-mono); font-size: 13.5px; overflow-wrap: anywhere; }
.id-src { grid-column: 2; font-size: 12px; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.timeline li { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.timeline time { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.evidence { display: flex; flex-wrap: wrap; gap: 10px; }
.evidence .shot { flex: 1 1 190px; width: auto; max-width: 100%; }
.evidence .shot-label { padding: 4px 10px; }
.evidence .receipt, .evidence .sms { gap: 3px; padding: 8px 10px; font-size: 12px; }
.evidence .receipt-amt { font-size: 17px; }
.quote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); font-style: italic; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
/* The JSON view overlays the case view's box, so the card keeps its height when you switch. */
.case-views { position: relative; }
.case-views.is-json #case-human { visibility: hidden; }
.json-wrap { position: absolute; inset: 0; }
.case-json {
  margin: 0;
  height: 100%;
  overflow: auto;
  padding: 18px 20px;
  background: var(--raised);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
}
.copy-btn { position: absolute; top: 12px; right: 14px; }

/* End card */
.endcard { display: grid; gap: 10px; padding: 28px; border-radius: 16px; background: var(--ink); color: var(--paper); }
.endcard .wordmark { font-size: 30px; }
.endcard .tagline {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
  text-wrap: balance;
}
.endcard p { margin: 0; max-width: 62ch; }
.endcard :focus-visible { outline-color: var(--mark); }
.endcard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 6px; }
.endcard-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--mark);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.endcard-cta:hover { background: #FFD84A; }
.endcard-link { color: var(--paper); text-underline-offset: 0.18em; }

/* Footer */
.foot .band-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 0 32px;
  font-size: 12.5px;
  color: var(--muted);
}
.foot p { margin: 0; max-width: 72ch; }
kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
}

@media (max-width: 900px) {
  .interview-grid { grid-template-columns: minmax(0, 1fr); }
  .interview-grid .phone, .board { max-width: 440px; }
  .board { position: static; }
  .case-body { grid-template-columns: minmax(0, 1fr); }
  .case-col + .case-col { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 780px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .today-grid .phone { max-width: 440px; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .cmp-arrow { justify-self: center; transform: rotate(90deg); }
}
@media (max-width: 520px) {
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .phone { height: clamp(560px, calc(100vh - 170px), 640px); }
  .msg { max-width: 88%; }
  .chapter { font-size: 12.5px; gap: 5px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .endcard { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .enter, .sweep .hl, .field.flash, .typing span, .fern-text.caret-on::after, .tapped .tap-dot,
  .sheet.enter, .scrim.enter, .sheet.interviewing .chosen, .sheet.interviewing .interview { animation: none !important; }
  .chapter-fill, .field, .radio, .report-btn, .sheet { transition: none; }
}
