/* Usheri. Direction and token rationale: docs/design/DIRECTION.md.
   Operator UI (review, lessons, sign in) is a light and dark work tool; the prospect page
   (body.prospect) is a light letter that takes the vendor's accent. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-latin-var.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/static/fonts/newsreader-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ---- tokens ------------------------------------------------------------------------- */

:root {
  --font-sans: "IBM Plex Sans", ui-sans-serif, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", ui-serif, Georgia, serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --text-caption: 12px;
  --text-meta: 13px;
  --text-body: 14px;
  --text-lead: 16px;
  --text-sub: 20px;
  --text-title: 24px;

  --radius-control: 6px;
  --radius-panel: 8px;
  --control-height: 36px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --bg: #f4f6f5;
  --surface: #fbfcfb;
  --sunk: #edf0ef;
  --line: #dde3e1;
  --field: #848f8c;
  --ink: #17201e;
  --ink-2: #47524f;
  --ink-3: #5f6b68;
  --accent: #0e5c6b;
  --accent-wash: #e1eef0;
  --shell: #123a42;
  --shell-ink: #e3eeef;
  --shell-ink-2: #a9c4c8;
  --shell-line: #2a525a;
  --primary: #17201e;
  --primary-ink: #fbfcfb;
  --danger: #a3301e;
  --danger-wash: #fbe5e1;

  --st-review: #0d4e5b;  --st-review-bg: #e1eef0;
  --st-held: #784700;    --st-held-bg: #fbefd6;
  --st-failed: #992b1d;  --st-failed-bg: #fbe5e1;
  --st-done: #1b6232;    --st-done-bg: #e0f0e4;
  --st-neutral: #47524f; --st-neutral-bg: #e9edec;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101514;
    --surface: #161c1b;
    --sunk: #0c1110;
    --line: #29312f;
    --field: #66726f;
    --ink: #e3e9e7;
    --ink-2: #a8b3b0;
    --ink-3: #8d9895;
    --accent: #74c4d2;
    --accent-wash: #12313a;
    --shell: #12343b;
    --shell-ink: #e3eeef;
    --shell-ink-2: #93b2b7;
    --shell-line: #24474f;
    --primary: #2b6f7c;
    --primary-ink: #eef5f6;
    --danger: #f39380;
    --danger-wash: #3b1915;
    --st-review: #94d6e2;  --st-review-bg: #12313a;
    --st-held: #f2c86f;    --st-held-bg: #382a0e;
    --st-failed: #f3a092;  --st-failed-bg: #3b1915;
    --st-done: #8ad6a0;    --st-done-bg: #14301d;
    --st-neutral: #a8b3b0; --st-neutral-bg: #222a28;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101514;
  --surface: #161c1b;
  --sunk: #0c1110;
  --line: #29312f;
  --field: #66726f;
  --ink: #e3e9e7;
  --ink-2: #a8b3b0;
  --ink-3: #8d9895;
  --accent: #74c4d2;
  --accent-wash: #12313a;
  --shell: #12343b;
  --shell-ink: #e3eeef;
  --shell-ink-2: #93b2b7;
  --shell-line: #24474f;
  --primary: #2b6f7c;
  --primary-ink: #eef5f6;
  --danger: #f39380;
  --danger-wash: #3b1915;
  --st-review: #94d6e2;  --st-review-bg: #12313a;
  --st-held: #f2c86f;    --st-held-bg: #382a0e;
  --st-failed: #f3a092;  --st-failed-bg: #3b1915;
  --st-done: #8ad6a0;    --st-done-bg: #14301d;
  --st-neutral: #a8b3b0; --st-neutral-bg: #222a28;
  color-scheme: dark;
}

/* ---- base --------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
  scrollbar-color: var(--field) transparent;
}

::selection { background: var(--accent-wash); color: var(--ink); }

h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: 20;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-control);
}
.skip:focus { top: var(--space-3); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); }
.small { font-size: var(--text-meta); }

/* ---- shell -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--shell);
  color: var(--shell-ink);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: 1360px;
  height: 52px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--shell-ink);
  text-decoration: none;
}
.brand-link { display: inline-flex; align-items: center; flex: none; }
.brand-link img { display: block; width: 138px; height: auto; }
.site-nav .brand-link img, .topbar .brand-link img { filter: brightness(0) invert(1); }
.app-brand { margin: 0 0 8px; }
.app-brand img { width: 116px; }
[data-theme="dark"] .app-brand img, [data-theme="dark"] .site-foot .brand-link img { filter: brightness(0) invert(1); }
.topbar nav { display: flex; gap: var(--space-1); flex: 1; }
.topbar nav a, .topbar .who a, .topbar .who button {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  color: var(--shell-ink-2);
  text-decoration: none;
  font-size: var(--text-body);
  white-space: nowrap;
}
.topbar nav a:hover, .topbar .who a:hover, .topbar .who button:hover {
  color: var(--shell-ink);
  background: var(--shell-line);
}
.topbar nav a[aria-current="page"] {
  color: var(--shell-ink);
  box-shadow: inset 0 -2px 0 var(--shell-ink);
  border-radius: 0;
}
.topbar :focus-visible { outline-color: var(--shell-ink); }
.who { display: flex; align-items: center; gap: var(--space-1); color: var(--shell-ink-2); }
.who .user { padding: 0 var(--space-2); font-size: var(--text-meta); }
.topbar .who button {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-9);
}

/* ---- page heads --------------------------------------------------------------------- */

.page-head { margin-bottom: var(--space-5); }
.page-head h1 { font-size: var(--text-title); letter-spacing: -0.01em; }
.page-head .lede { margin-top: var(--space-2); max-width: 68ch; color: var(--ink-2); }
.crumb {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-bottom: var(--space-1);
  font-size: var(--text-meta);
  color: var(--ink-2);
}
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.title-row h1 { margin-right: var(--space-1); }

.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-6);
  margin: var(--space-3) 0 0;
  font-size: var(--text-meta);
}
.facts-row div { display: flex; gap: var(--space-2); }
.facts-row dt { color: var(--ink-3); font-size: var(--text-caption); align-self: center; }
.facts-row dd { margin: 0; color: var(--ink); }

/* ---- chips -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: 4px;
  font-size: var(--text-caption);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: var(--st-neutral);
  background: var(--st-neutral-bg);
}
.chip[data-tone="review"] { color: var(--st-review); background: var(--st-review-bg); }
.chip[data-tone="held"] { color: var(--st-held); background: var(--st-held-bg); }
.chip[data-tone="failed"] { color: var(--st-failed); background: var(--st-failed-bg); }
.chip[data-tone="done"] { color: var(--st-done); background: var(--st-done-bg); }

/* ---- alerts ------------------------------------------------------------------------- */

.alert {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control);
  background: var(--st-neutral-bg);
  color: var(--ink);
  max-width: 96ch;
}
.alert strong { font-weight: 600; }
.alert[data-tone="ok"] { background: var(--st-done-bg); color: var(--st-done); }
.alert[data-tone="bad"] { background: var(--st-failed-bg); color: var(--st-failed); }
.alert[data-tone="warn"] { background: var(--st-held-bg); color: var(--st-held); }

/* ---- controls ----------------------------------------------------------------------- */

label, .label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-meta);
  font-weight: 500;
  color: var(--ink);
}
.hint { display: block; font-weight: 400; color: var(--ink-3); }
.field + .field { margin-top: var(--space-4); }

input, textarea, select {
  width: 100%;
  min-height: var(--control-height);
  padding: 7px var(--space-3);
  border: 1px solid var(--field);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-radius: var(--radius-control);
}
input:user-invalid { border-color: var(--danger); }
/* The rule above is for text fields; a radio or checkbox keeps its own size everywhere. */
input[type="radio"], input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
input[type="file"] { padding: 5px var(--space-2); }

.button, button:not([class*="cl-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms var(--ease-out), border-color 120ms var(--ease-out);
}
.button:hover, button:not([class*="cl-"]):hover { border-color: var(--field); }
.button:active, button:not([class*="cl-"]):active { background: var(--sunk); }
button:not([class*="cl-"]):disabled, button:not([class*="cl-"])[aria-busy="true"] { opacity: 0.45; cursor: not-allowed; }
button.quiet:disabled:hover, button:not([class*="cl-"]):disabled:hover { border-color: var(--line); background: var(--surface); }
button.quiet:disabled:hover { border-color: transparent; background: transparent; }

.button.primary, button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}
.button.primary:hover, button.primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--bg)); }
.button.primary:active, button.primary:active { background: color-mix(in srgb, var(--primary) 76%, var(--bg)); }

button.danger {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}
button.danger:hover { background: var(--danger-wash); }

button.quiet, .button.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
button.quiet:hover, .button.quiet:hover { color: var(--ink); background: var(--sunk); }
button.small, .button.small { min-height: 28px; padding: 0 var(--space-3); font-size: var(--text-meta); }

/* ---- tabs and tables ---------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-1);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-3);
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--accent); }
.tabs .count { color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 400; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  background: var(--sunk);
  font-size: var(--text-meta);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }

.queue tbody tr { position: relative; }
.queue tbody tr:hover td { background: color-mix(in srgb, var(--sunk) 60%, transparent); }
.queue .person a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.queue .person a::after { content: ""; position: absolute; inset: 0; }
.queue .person a:focus-visible { outline: 0; }
.queue tbody tr:has(.person a:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.queue .reason {
  max-width: 44ch;
  margin-top: var(--space-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
  font-size: var(--text-meta);
}
.queue td.when { white-space: nowrap; color: var(--ink-2); }
.col-narrow { width: 1%; white-space: nowrap; }

.empty {
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.empty h2 { font-size: var(--text-lead); }
.empty p { margin-top: var(--space-2); max-width: 60ch; color: var(--ink-2); }

.row-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
.row-actions form { margin: 0; }

/* ---- stage trail -------------------------------------------------------------------- */

.trail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-1);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.trail li {
  padding-top: var(--space-2);
  border-top: 3px solid var(--line);
  font-size: var(--text-meta);
  color: var(--ink-3);
}
.trail li[data-state="done"] { border-top-color: var(--ink-3); color: var(--ink-2); }
.trail li[data-state="current"] { border-top-color: var(--accent); color: var(--ink); font-weight: 600; }
.trail li[data-state="held"] { border-top-color: var(--st-held); color: var(--st-held); font-weight: 600; }
.trail li[data-state="failed"] { border-top-color: var(--st-failed); color: var(--st-failed); font-weight: 600; }
.trail li[data-state="rejected"] { border-top-color: var(--st-neutral); color: var(--ink); font-weight: 600; }
.trail .state { display: block; font-weight: 400; color: var(--ink-3); }
.trail-now { display: none; margin-top: var(--space-2); font-size: var(--text-meta); color: var(--ink-2); }
.trail-now strong { color: var(--ink); font-weight: 600; }

/* ---- review page -------------------------------------------------------------------- */

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-7);
  align-items: start;
}
.evidence > section + section { margin-top: var(--space-7); }
.evidence > .decision-section { margin-top: var(--space-8); padding-top: var(--space-7); border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.disclosure > summary { cursor: pointer; list-style: none; margin-bottom: 0; min-height: 32px; align-items: center; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary h2::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin: 0 var(--space-2) 0.15em 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
.disclosure[open] > summary h2::before { transform: rotate(45deg); }
.disclosure[open] > summary { margin-bottom: var(--space-4); }
.next-step .button { width: 100%; }
.next-step p + p { margin-top: var(--space-2); }
.alert.stop { margin-top: var(--space-4); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.section-head h2 { font-size: var(--text-lead); }
.section-head .subtle { font-size: var(--text-meta); }

.player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-panel);
  background: var(--sunk);
}
.no-video {
  display: grid;
  place-content: center;
  gap: var(--space-1);
  min-height: 160px;
  width: 100%;
  border: 1px dashed var(--field);
  border-radius: var(--radius-panel);
  text-align: center;
  color: var(--ink-2);
}
.no-video strong { color: var(--ink); font-weight: 600; }
.signed-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--text-meta);
  color: var(--ink-2);
}
.signed-link a { display: inline-flex; align-items: center; min-height: 32px; }
.signed-link code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-sans);
  color: var(--ink-3);
}

.thread { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.message { padding: var(--space-3) var(--space-4); border-radius: var(--radius-panel); }
.message[data-direction="out"] { border: 1px solid var(--line); }
.message[data-direction="in"] { background: var(--sunk); }
.message header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-2);
  font-size: var(--text-meta);
}
.message header strong { font-weight: 600; }
.message header .who-label { color: var(--ink-3); }
.message header time { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.message .body { white-space: pre-wrap; overflow-wrap: break-word; max-width: 72ch; }

.read { font-size: var(--text-lead); line-height: 1.55; max-width: 68ch; }

.scenes { margin: 0; padding: 0; list-style: none; counter-reset: scene; }
.scenes li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  counter-increment: scene;
}
.scenes li + li { border-top: 1px solid var(--line); }
.scenes li::before {
  content: counter(scene);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.scenes .steps { color: var(--ink-3); font-size: var(--text-meta); white-space: nowrap; }

.claims td.source { width: 30%; color: var(--ink-2); font-size: var(--text-meta); overflow-wrap: anywhere; }
.claims td { font-size: var(--text-body); }

/* The one bordered work area: the decision. */
.decision {
  padding: var(--space-5);
  border: 1px solid var(--field);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.decision h2 { font-size: var(--text-sub); }
.decision .intro { margin: var(--space-1) 0 var(--space-5); color: var(--ink-2); max-width: 68ch; }
.decision .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-5);
}
.decision .consequence { font-size: var(--text-meta); color: var(--ink-2); }
.decision .reject {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.decision .reject h3 { font-size: var(--text-lead); }
.decision .reject p { margin: var(--space-1) 0 var(--space-3); color: var(--ink-2); font-size: var(--text-meta); }
.inline-form { display: flex; gap: var(--space-2); align-items: flex-start; }
.inline-form input { flex: 1; }
.decision .held-note { margin-bottom: var(--space-4); }
.email-preview {
  margin: 0;
  padding: var(--space-4);
  border-radius: var(--radius-panel);
  background: var(--sunk);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font: inherit;
  max-width: 72ch;
}

/* Side column: facts, separated by hairlines, no boxes. */
.aside { position: sticky; top: 76px; display: grid; gap: var(--space-5); }
.aside section + section { padding-top: var(--space-5); border-top: 1px solid var(--line); }
.aside h2 { margin-bottom: var(--space-3); font-size: var(--text-body); }
.aside p + p, .aside p + ul, .aside ul + p { margin-top: var(--space-2); }
.verdict { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.notes { margin: var(--space-3) 0 0; padding-left: var(--space-4); }
.notes li + li { margin-top: var(--space-1); }
.facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-2) var(--space-3); margin: 0; font-size: var(--text-meta); }
.facts dt { color: var(--ink-3); }
.ai-facts { margin-top: var(--space-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.history { margin: 0; padding: 0; list-style: none; font-size: var(--text-meta); }
.history li { padding: var(--space-2) 0; }
.history li + li { border-top: 1px solid var(--line); }
.history .to { font-weight: 600; }
.history time { float: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.history .reason { margin-top: var(--space-1); color: var(--ink-2); overflow-wrap: break-word; }

/* ---- lessons ------------------------------------------------------------------------ */

.lessons td.text { max-width: 72ch; }

/* ---- sign in and confirm ------------------------------------------------------------ */

.topbar-fill { flex: 1; }
.solo {
  display: grid;
  min-height: calc(100dvh - 52px);
  place-items: center;
  padding: var(--space-6) var(--space-4);
}
.solo-inner { width: 100%; max-width: 380px; }
.solo .wordmark { display: inline-block; margin-bottom: var(--space-6); color: var(--ink); font-size: 28px; }
.solo h1 { font-size: var(--text-sub); }
.solo .lede { margin: var(--space-2) 0 var(--space-5); color: var(--ink-2); }
.solo-inner:not(.clerk-solo) form { display: grid; gap: var(--space-4); }
.solo-inner:not(.clerk-solo) form .field + .field { margin-top: 0; }
.solo-inner:not(.clerk-solo) button[type="submit"] { width: 100%; margin-top: var(--space-2); }
.solo .footnote { margin-top: var(--space-4); font-size: var(--text-meta); color: var(--ink-3); }
.solo-inner.clerk-solo { max-width: 440px; }
#clerk-mount { min-height: 420px; }

/* The account entry page uses its own light palette in either app theme. */
.clerk-page { background: #f4f7f5; color: #17201e; color-scheme: light; }
.auth-page { display: flex; padding: 48px 24px 64px; align-items: center; justify-content: center; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); align-items: center; gap: clamp(56px, 8vw, 120px); width: min(100%, 1060px); }
.auth-intro { max-width: 480px; }
.auth-eyebrow { margin: 0 0 22px; color: #0e5c6b; font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.solo .auth-intro h1 { margin: 0; font-family: var(--font-serif); font-size: clamp(42px, 4.2vw, 60px); font-weight: 500; letter-spacing: -.035em; line-height: 1.06; }
.auth-intro > p:not(.auth-eyebrow) { max-width: 400px; margin: 22px 0 34px; color: #566660; font-size: 16px; line-height: 1.65; }
.auth-steps { display: grid; gap: 18px; border-top: 1px solid #dce6e1; padding-top: 24px; }
.auth-steps > div { display: flex; align-items: flex-start; gap: 15px; }
.auth-steps span { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid #cbded9; border-radius: 50%; color: #0e5c6b; font-size: 10px; font-weight: 700; }
.auth-steps p { margin: 0; color: #65736e; font-size: 13px; line-height: 1.55; }
.auth-steps strong { color: #1d3430; font-size: 14px; font-weight: 600; }
.auth-panel { width: 100%; }
.auth-panel #clerk-mount, .auth-panel .cl-rootBox, .auth-panel .cl-cardBox { width: 100%; }
.auth-panel .cl-cardBox { border: 1px solid #e1eae5; border-radius: 16px; box-shadow: 0 18px 56px rgba(22, 50, 44, .08); overflow: hidden; }
.auth-panel .cl-card { box-shadow: none; }
.auth-panel .cl-formFieldInput, .auth-panel .cl-formButtonPrimary { width: 100%; }
.auth-panel .cl-formFieldInput { min-height: 44px; border: 1px solid #bacbc5; }
.auth-panel .cl-formButtonPrimary { min-height: 44px; color: #fff; }
@media (max-width: 760px) {
  .auth-page { padding: 32px 20px 48px; align-items: start; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 440px; }
  .auth-eyebrow { margin-bottom: 12px; }
  .solo .auth-intro h1 { font-size: 36px; }
  .auth-intro > p:not(.auth-eyebrow) { margin: 12px 0 0; font-size: 15px; }
  .auth-steps { display: none; }
}

/* Staff workspace picker and the Clerk header controls */
.choice-form { display: grid; gap: var(--space-4); max-width: 560px; }
.choice-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.choice-list label { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-panel); cursor: pointer; }
.choice-list input[type="radio"] { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--ink); }
.choice-list label:has(input:checked) { border-color: var(--ink); }
.choice-form .primary { justify-self: start; }
.clerk-slot { display: flex; align-items: center; min-height: 32px; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.confirm-actions button[type="submit"] { width: auto; margin-top: 0; }
.email-preview.excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
  margin-bottom: var(--space-5);
  font-size: var(--text-meta);
}
.confirm-panel {
  padding: var(--space-5);
  border: 1px solid var(--field);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

/* ---- responsive --------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .review-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .aside { position: static; border-top: 1px solid var(--line); padding-top: var(--space-6); }
  .next-step { display: none; }
}
@media (max-width: 480px) {
  /* The theme follows the system on a phone; the switch would crowd the bar. */
  .topbar #theme-toggle { display: none; }
}
@media (max-width: 720px) {
  .topbar-inner { gap: var(--space-2); padding: 0 var(--space-2) 0 var(--space-4); }
  .topbar nav a, .topbar .who a, .topbar .who button { padding: 0 var(--space-2); }
  /* Seven links do not fit a phone: the list scrolls sideways and the sign-out stays in view. */
  .topbar nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .who { flex: none; }
  .who .user { display: none; }
  .wrap { padding: var(--space-5) var(--space-4) var(--space-8); }
  /* Six bars only; the step line below names the current one. Labels stay readable to
     assistive tech. */
  .trail li { height: 3px; padding: 0; overflow: hidden; text-indent: 100%; white-space: nowrap; }
  .trail-now { display: block; }
  .claims thead { display: none; }
  .claims tr { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
  .claims tr:last-child { border-bottom: 0; }
  .claims td { padding: 0; border: 0; }
  .claims td.source { width: auto; }
  .queue thead { display: none; }
  .queue tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
  .queue tbody tr:last-child { border-bottom: 0; }
  .queue td { padding: 0; border: 0; }
  .queue td.campaign { grid-column: 1 / -1; order: 3; margin-top: var(--space-1); font-size: var(--text-meta); }
  .queue td.stage { grid-column: 2; grid-row: 1; }
  .queue td.ai { grid-column: 1 / -1; order: 4; margin-top: var(--space-2); }
  .queue td.when { grid-column: 1 / -1; order: 5; margin-top: var(--space-1); font-size: var(--text-meta); }
  .queue .reason { max-width: none; white-space: normal; }
  .lessons thead { display: none; }
  .lessons tbody tr { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
  .lessons td { padding: 0; border: 0; }
  .row-actions { justify-content: flex-start; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .decision { padding: var(--space-4); }
  .facts-row { gap: var(--space-1) var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ==== prospect page: a letter from the vendor ======================================== */

body.prospect {
  --paper: #f6f7f6;
  --p-ink: #15191a;
  --p-ink-2: #4c5456;
  --p-line: #dfe2e1;
  --p-panel: #eceeed;
  --accent: #1f2a2c;
  --accent-ink: #f6f7f6;
  --ring: #1f2a2c;
  --shadow-film: 0 1px 2px rgb(21 25 26 / 0.08), 0 12px 32px -8px rgb(21 25 26 / 0.22);
  color-scheme: light;
  background: var(--paper);
  color: var(--p-ink);
  font-size: var(--text-lead);
  line-height: 1.55;
  caret-color: var(--ring);
}
body.prospect ::selection { background: color-mix(in srgb, var(--accent) 18%, var(--paper)); color: var(--p-ink); }
body.prospect :focus-visible { outline-color: var(--ring); outline-offset: 3px; }
body.prospect a {
  color: var(--p-ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.letter {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
}
.letter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--p-line);
  font-size: var(--text-meta);
  color: var(--p-ink-2);
}
.vendor { display: flex; align-items: center; gap: var(--space-3); color: var(--p-ink); font-weight: 600; font-size: var(--text-lead); }
.vendor img { display: block; height: 28px; width: auto; max-width: 180px; object-fit: contain; }
.letter-head { margin: var(--space-7) 0 var(--space-6); }
.letter-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
  min-width: 0;
  max-width: 22ch;
}
.letter-head p { margin-top: var(--space-3); max-width: 60ch; font-size: var(--text-lead); color: var(--p-ink-2); }

.film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: var(--p-ink);
  box-shadow: var(--shadow-film);
}

.letter-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-7);
  margin-top: var(--space-7);
  align-items: start;
}
.letter-body.single { grid-template-columns: minmax(0, 1fr); }
.note {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.6;
  max-width: 62ch;
  white-space: pre-line;
}

.next { display: grid; gap: var(--space-6); }
.next h2 { font-size: var(--text-body); font-weight: 600; margin-bottom: var(--space-3); }
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-panel);
  background: var(--accent);
  color: var(--accent-ink) !important;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: filter 120ms var(--ease-out);
}
.cta:hover { filter: brightness(1.08) saturate(1.05); }
.cta:active { filter: brightness(0.94); }
.slots { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.slots a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--p-line);
  border-radius: var(--radius-panel);
  background: var(--paper);
  text-decoration: none !important;
  font-variant-numeric: tabular-nums;
  transition: border-color 120ms var(--ease-out);
}
.slots a:hover { border-color: var(--accent); }
.slots-label { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-meta); color: var(--p-ink-2); }
.tz { margin-top: var(--space-2); font-size: var(--text-caption); color: var(--p-ink-2); }

.reading { margin: 0; padding: 0; list-style: none; }
.reading li + li { margin-top: var(--space-1); }
.reading a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.reading span { margin-top: calc(var(--space-2) * -1); }
.reading span { display: block; font-size: var(--text-meta); color: var(--p-ink-2); }

.letter-foot {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--p-line);
  font-size: var(--text-meta);
  color: var(--p-ink-2);
}

@media (max-width: 760px) {
  .letter { padding: var(--space-4) var(--space-4) var(--space-7); }
  .letter-head { margin: var(--space-6) 0 var(--space-5); }
  .film { margin: 0 calc(var(--space-4) * -1); }
  .film video { border-radius: 0; box-shadow: none; }
  .letter-body { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); margin-top: var(--space-5); }
  .note { font-size: 18px; }
}

/* ==== public site (home): the petrol shell as a full-bleed field, the product as proof === */

body.site {
  --bg: #f4f6f5;
  --surface: #fbfcfb;
  --sunk: #e8edeb;
  --line: #d5dcda;
  --field: #848f8c;
  --ink: #17201e;
  --ink-2: #47524f;
  --ink-3: #5f6b68;
  --accent: #0e5c6b;
  --accent-wash: #e1eef0;
  --shell: #123a42;
  --shell-ink: #e3eeef;
  --shell-ink-2: #b4cdd1;
  --shell-line: #2a525a;
  --site-shadow: 0 1px 2px rgb(10 30 34 / 0.10), 0 24px 48px -16px rgb(10 30 34 / 0.35);
  --shot-shadow: 0 1px 2px rgb(10 30 34 / 0.06);
  --st-held: #784700;
  --st-held-bg: #fbefd6;
  --overlap: clamp(120px, 15vw, 240px);
  color-scheme: light;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-lead);
}
body.site :focus-visible { outline-color: var(--accent); }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--shell);
  color: var(--shell-ink);
  border-bottom: 1px solid var(--shell-line);
}
.site-nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: 1360px;
  height: 64px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.site-nav nav { display: flex; gap: var(--space-1); flex: 1; }
.site-nav nav a, .site-signin {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  color: var(--shell-ink-2);
  text-decoration: none;
  font-size: var(--text-body);
  white-space: nowrap;
}
.site-nav nav a:hover, .site-signin:hover { color: var(--shell-ink); background: var(--shell-line); }
.site-nav-actions { display: flex; align-items: center; gap: var(--space-2); }
.site-nav :focus-visible, .hero :focus-visible, .close :focus-visible { outline-color: var(--shell-ink); }

.button.on-dark {
  border-color: var(--shell-ink-2);
  background: transparent;
  color: var(--shell-ink);
}
.button.on-dark:hover { border-color: var(--shell-ink); background: var(--shell-line); }
.button.on-dark.solid { border-color: var(--shell-ink); background: var(--shell-ink); color: var(--shell); }
.button.on-dark.solid:hover { background: var(--bg); }
.button.large { min-height: 48px; padding: 0 var(--space-5); font-size: var(--text-lead); }

.hero { display: flow-root; background: var(--shell); color: var(--shell-ink); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-7);
  align-items: end;
  max-width: 1360px;
  margin: 0 auto;
  padding: var(--space-9) var(--space-5) var(--space-8);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 14ch;
  overflow-wrap: break-word;
  min-width: 0;
}
.hero-side p { color: var(--shell-ink-2); font-size: 18px; line-height: 1.55; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero-side .hero-note { margin-top: var(--space-4); font-size: var(--text-meta); color: var(--shell-ink-2); }

.hero-shots {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  max-width: 1360px;
  margin: 0 auto calc(var(--overlap) * -1);
  padding: 0 var(--space-5);
  position: relative;
}
.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--shell-line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--site-shadow);
}
.hero-shots .shot { grid-column: 2 / 12; grid-row: 1; }
.hero-shots figcaption {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: end;
  margin-top: var(--space-3);
  padding: 0 var(--space-1);
  background: var(--bg);
  font-size: var(--text-meta);
  color: var(--ink-3);
}

.band { padding: var(--space-9) 0; }
.band-inner { max-width: 1360px; margin: 0 auto; padding: 0 var(--space-5); }
#how { padding-top: calc(var(--overlap) + var(--space-9) + var(--space-6)); }
.band h2, .close h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.band-lede { margin-top: var(--space-3); max-width: 56ch; color: var(--ink-2); font-size: 18px; }

/* The stage trail from the product, used as the page's route. */
.route {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-7) 0 0;
  padding: 0;
  list-style: none;
}
.route li { padding-top: var(--space-4); border-top: 3px solid var(--ink-3); }
.route li:nth-child(5) { border-top-color: var(--accent); }
.route h3 { font-size: var(--text-lead); }
.route p { margin-top: var(--space-2); font-size: var(--text-body); color: var(--ink-2); }

.band-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); align-items: end; }
.band-head .band-lede { margin-top: 0; }
.wide-shot { margin: var(--space-7) 0 0; }
.wide-shot img, .pair img, .plain-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shot-shadow);
}
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-7);
  margin-top: var(--space-7);
  align-items: start;
}
.pair figure, .plain-shot { margin: 0; }
.pair figcaption { margin-top: var(--space-4); max-width: 54ch; color: var(--ink-2); }
.pair figcaption strong { color: var(--ink); font-weight: 600; }
.page-band { padding-top: 0; }
.page-band .split { align-items: center; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-8);
  align-items: start;
}
#rules { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rules { margin: 0; padding: 0; list-style: none; }
.rules li { padding: var(--space-4) 0; border-top: 1px solid var(--line); font-size: 20px; line-height: 1.4; color: var(--ink-2); }
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules strong { color: var(--ink); font-weight: 600; }
.security-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); margin: 0; }
.security-list div { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.security-list dt { font-weight: 600; }
.security-list dd { margin: var(--space-2) 0 0; color: var(--ink-2); }
.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-7);
}
.columns > div { padding-top: var(--space-4); border-top: 1px solid var(--ink); }
.columns h3 { font-size: var(--text-lead); }
.columns ul { margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.columns li { padding: var(--space-2) 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-3) 0;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: var(--space-1);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding-bottom: var(--space-5); max-width: 62ch; color: var(--ink-2); }

.close { background: var(--shell); color: var(--shell-ink); padding: var(--space-9) 0; }
.close h2 { max-width: 18ch; }
.close p { margin-top: var(--space-4); max-width: 54ch; color: var(--shell-ink-2); font-size: 18px; }
.close .hero-actions { margin-top: var(--space-6); }

.site-foot { padding: var(--space-8) 0 var(--space-6); font-size: var(--text-body); color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.site-foot .wordmark { color: var(--ink); }
.site-foot p { margin-top: var(--space-2); }
.site-foot nav { display: grid; align-content: start; gap: var(--space-1); }
.site-foot nav h2 { margin-bottom: var(--space-1); font-size: var(--text-body); color: var(--ink); }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); }
.foot-base { margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: var(--text-meta); }

/* sign in: reveal control inside the field row */
.password { position: relative; }
.password input { padding-right: 64px; }
.password button { position: absolute; top: 4px; right: 4px; bottom: 4px; min-height: 0; }
.solo a.wordmark { text-decoration: none; }
.who .signout { margin: 0; }

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-top: var(--space-8); }
  .route { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-6); }
  .band-head, .split, .pair { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}
@media (max-width: 960px) {
  .site-nav nav { display: none; }
  .site-nav-inner { justify-content: space-between; }
}
@media (max-width: 760px) {
  .site-nav-inner { justify-content: space-between; padding: 0 var(--space-4); }
  .hero-inner, .hero-shots, .band-inner { padding-left: var(--space-4); padding-right: var(--space-4); }
  .hero-inner { padding-top: var(--space-7); padding-bottom: var(--space-6); }
  .hero-shots .shot { grid-column: 1 / -1; }
  .hero-shots figcaption { justify-self: start; }
  .band { padding: var(--space-8) 0; }
  #how { padding-top: calc(var(--overlap) + var(--space-8)); }
  .route, .columns, .security-list, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .route { gap: var(--space-4); }
  .route li { padding-top: var(--space-3); border-top-width: 2px; }
  .wide-shot { margin-left: calc(var(--space-4) * -1); margin-right: calc(var(--space-4) * -1); }
  .wide-shot img { border-radius: 0; border-left: 0; border-right: 0; }
  .rules li { font-size: 18px; }
  .site-nav-actions .site-signin { padding: 0 var(--space-2); }
  .site-nav-actions .button { padding: 0 var(--space-3); }
  .site-nav .wordmark { font-size: 20px; }
}

/* home: sample video, widget section; legal pages */
.sample-band { padding-top: calc(var(--overlap) + var(--space-9)); }
.sample-band + #how { padding-top: var(--space-9); }
.sample-video { margin: 0; }
.sample-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--ink);
  box-shadow: var(--site-shadow);
}
.widget-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.widget-band .split { align-items: center; }
.widget-facts { margin: var(--space-6) 0 0; padding: 0; list-style: none; }
.widget-facts li { padding: var(--space-3) 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.widget-facts strong { color: var(--ink); font-weight: 600; }
.snippet-label { margin-top: var(--space-6); font-size: var(--text-body); color: var(--ink-2); }
.snippet-label code, .snippet code { font: inherit; }
.snippet-label code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.95em; }
.snippet {
  margin: var(--space-2) 0 0;
  padding: var(--space-4);
  overflow-x: auto;
  border-radius: var(--radius-panel);
  background: var(--shell);
  color: var(--shell-ink);
  font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.widget-shot { max-width: 420px; justify-self: center; }
.widget-shot figcaption { margin-top: var(--space-3); font-size: var(--text-meta); color: var(--ink-3); }

.legal { max-width: 760px; padding-top: var(--space-8); padding-bottom: var(--space-9); }
.legal .placeholder {
  margin-bottom: var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control);
  background: var(--st-held-bg);
  color: var(--st-held);
}
.legal h1 { font-family: var(--font-serif); font-size: clamp(36px, 4vw, 52px); font-weight: 500; line-height: 1.1; }
.legal-lede { margin-top: var(--space-3); font-size: 18px; color: var(--ink-2); }
.legal h2 { margin-top: var(--space-7); font-size: 20px; }
.legal p, .legal ul { margin-top: var(--space-3); max-width: 66ch; color: var(--ink-2); }
.legal li + li { margin-top: var(--space-2); }

@media (max-width: 760px) {
  .sample-band { padding-top: calc(var(--overlap) + var(--space-8)); }
}

/* pricing: a petrol head with the billing switch, then plans as one ruled table of columns */
.site-nav nav a[aria-current="page"] { color: var(--shell-ink); box-shadow: inset 0 -2px 0 var(--shell-ink); border-radius: 0; }
.pricing-head { background: var(--shell); color: var(--shell-ink); }
.pricing-head .band-inner { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.pricing-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.pricing-head p { margin-top: var(--space-3); max-width: 54ch; color: var(--shell-ink-2); font-size: 18px; }

.billing {
  display: inline-flex;
  margin: var(--space-6) 0 0;
  padding: var(--space-1);
  border: 1px solid var(--shell-line);
  border-radius: 999px;
}
.billing input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.billing label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  margin: 0;
  padding: 0 var(--space-5);
  border-radius: 999px;
  color: var(--shell-ink-2);
  font-size: var(--text-body);
  font-weight: 500;
  cursor: pointer;
}
.billing label span { font-weight: 400; color: inherit; opacity: 0.85; }
.billing input:checked + label { background: var(--shell-ink); color: var(--shell); }
.billing input:focus-visible + label { outline: 2px solid var(--shell-ink); outline-offset: 2px; }

/* Annual prices replace monthly ones when the switch says so (no script needed). */
.price .annual { display: none; }
.pricing:has(#billing-annual:checked) .price .monthly { display: none; }
.pricing:has(#billing-annual:checked) .price .annual { display: block; }

.plans-band { padding-top: var(--space-7); }
.plans {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}
.plan + .plan { border-left: 1px solid var(--line); }
.plan h2 { font-size: var(--text-sub); font-weight: 600; }
.price { min-height: 76px; }
.price .amount {
  display: block;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums;
}
.price .per { display: block; margin-top: var(--space-1); font-size: var(--text-meta); color: var(--ink-2); }
.credits { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.credits strong { display: block; font-weight: 600; }
.credits span { display: block; font-size: var(--text-meta); color: var(--ink-2); }
.plan .button { width: 100%; }
.includes p { font-size: var(--text-meta); color: var(--ink-2); }
.includes ul { margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.includes li {
  position: relative;
  padding: var(--space-1) 0 var(--space-1) var(--space-5);
  font-size: var(--text-body);
  line-height: 1.45;
}
.includes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 5px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}
.plans-note { margin-top: var(--space-5); max-width: 80ch; color: var(--ink-2); font-size: var(--text-body); }
.credits-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

@media (max-width: 1180px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan + .plan { border-left: 0; }
  .plan { border-top: 1px solid var(--line); }
  .plan:nth-child(-n+3) { border-top: 0; }
  .plan:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .pricing-head .band-inner { padding-top: var(--space-7); padding-bottom: var(--space-7); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan:not(:nth-child(3n+1)) { border-left: 0; }
  .plan:nth-child(-n+3) { border-top: 1px solid var(--line); }
  .plan:first-child { border-top: 0; }
  .price { min-height: 0; }
  .billing label { padding: 0 var(--space-4); }
}
/* Wide screens: line every plan's rows up (price, credits, button) across the columns. */
@media (min-width: 1181px) {
  .plans { grid-template-rows: repeat(5, auto); }
  .plan { display: grid; grid-template-rows: subgrid; grid-row: span 5; align-content: start; }
}

/* ---- workspace settings (knowledge, writing, tools) --------------------------------- */

/* One layout for every settings and staff page: a grouped sidebar and a reading column. */
.settings-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}
.settings-nav { position: sticky; top: var(--space-5); display: grid; gap: var(--space-5); }
.settings-group { display: grid; gap: 2px; }
.settings-group-title { margin-bottom: var(--space-1); padding: 0 var(--space-3); font-size: var(--text-caption); color: var(--ink-3); }
.settings-nav a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  color: var(--ink-2);
  text-decoration: none;
}
.settings-nav a:hover { color: var(--ink); background: var(--sunk); }
.settings-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; background: var(--sunk); }
.settings-main { min-width: 0; max-width: 760px; }
.settings-main .settings-section { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.settings-main .page-head + .settings-section,
.settings-main .page-head + .alert + .settings-section { margin-top: var(--space-5); }
.settings-main .empty { padding: var(--space-5); }
.settings-main .settings-form { margin-top: var(--space-5); }
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .settings-nav {
    position: static;
    display: flex;
    gap: var(--space-1);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--line);
  }
  .settings-group { display: flex; gap: var(--space-1); }
  .settings-group-title { display: none; }
  .settings-nav a { white-space: nowrap; }
}

.settings-section { max-width: 880px; margin-top: var(--space-7); }
.tabs + .settings-section { margin-top: var(--space-5); }
.settings-section h3 { margin: var(--space-5) 0 var(--space-2); font-size: var(--text-meta); color: var(--ink-2); }
.settings-section .table-wrap { margin-bottom: var(--space-4); }
.settings-form { margin-top: var(--space-6); max-width: 560px; }
.settings-form .field { margin-bottom: var(--space-3); }
.settings-section td select { min-width: 140px; }
.settings-section .file-name { overflow-wrap: anywhere; }
.settings-section .choice-list legend { margin-bottom: var(--space-2); }
.tool-list { display: grid; gap: var(--space-5); max-width: 560px; }
.tool-card .section-head { margin-bottom: var(--space-3); }
@media (max-width: 720px) {
  /* These tables end in an action button, so on a phone each row becomes a small card. */
  .examples thead, .files thead { display: none; }
  .examples tbody tr, .files tbody tr { display: grid; gap: var(--space-2); justify-items: start; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
  .examples td, .files td { padding: 0; border: 0; }
  .examples tbody tr:last-child, .files tbody tr:last-child { border-bottom: 0; }
}

/* ---- voices ------------------------------------------------------------------------- */

.voice-list { display: grid; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.voice-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3) var(--space-4);
  padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.voice-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.voice-tags { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); }
.voice-row audio { width: 260px; max-width: 100%; height: 36px; }
.voice-action { display: flex; align-items: center; gap: var(--space-2); }
.voice-action form { margin: 0; }
.script { max-width: 68ch; margin: var(--space-3) 0 var(--space-5); padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--sunk); }
.script p + p { margin-top: var(--space-3); }
.consent-text { max-width: 68ch; margin: var(--space-3) 0 var(--space-4); padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--ink); background: var(--sunk); }
.check { display: flex; align-items: flex-start; gap: var(--space-3); margin: var(--space-4) 0; font-weight: 400; }
.check input { flex: none; width: 18px; height: 18px; min-height: 0; margin-top: 3px; accent-color: var(--ink); }
.readiness { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.readiness li { display: flex; align-items: baseline; gap: var(--space-3); }
.readiness .mark { flex: none; min-width: 52px; padding: 1px var(--space-2); border-radius: 999px; font-size: var(--text-meta);
  text-align: center; background: var(--sunk); color: var(--ink-2); }
.readiness li[data-state="ok"] .mark { background: var(--accent-wash); color: var(--ink); }
.recorder { margin: 0 0 var(--space-4); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.recorder-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.recorder-time { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.recorder audio { display: block; width: 100%; max-width: 420px; margin: var(--space-3) 0; }
.level { height: 6px; max-width: 420px; border-radius: 3px; background: var(--line); overflow: hidden; }
.level span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 80ms linear; }
@media (max-width: 720px) {
  .voice-row { grid-template-columns: minmax(0, 1fr); }
  .voice-row audio { width: 100%; }
}

/* ---- onboarding (welcome, setup) ---------------------------------------------------- */

.welcome-form { max-width: 640px; }
.welcome-form fieldset.settings-section { margin: 0 0 var(--space-6); padding: 0; border: 0; }
.section-legend { margin-bottom: var(--space-3); padding: 0; font-size: var(--text-lead); font-weight: 500; }
.welcome-form .choice-list label { align-items: flex-start; }
.welcome-form .choice-list input[type="checkbox"] { flex: none; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; accent-color: var(--ink); }
.tool-pick { margin-bottom: var(--space-4); }
.tool-pick[hidden] { display: none; }
.progress-text { font-size: var(--text-lead); }
.progress { height: 8px; max-width: 640px; margin: var(--space-2) 0 var(--space-5); border-radius: 4px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ink); }
.checklist { display: grid; gap: var(--space-2); max-width: 760px; margin: 0; padding: 0; list-style: none; }
.check-step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--space-3) var(--space-4);
  padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.check-step .mark { min-width: 60px; padding: 2px var(--space-2); border-radius: 999px; font-size: var(--text-meta); text-align: center; background: var(--sunk); color: var(--ink-2); }
.check-step[data-state="done"] .mark { background: var(--accent-wash); color: var(--ink); }
.check-step[data-state="skipped"] { opacity: 0.7; }
.check-step h2 { font-size: var(--text-body); }
.check-step p { margin-top: var(--space-1); color: var(--ink-2); }
.step-action { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.step-action form { margin: 0; }
@media (max-width: 720px) {
  .check-step { grid-template-columns: minmax(0, 1fr); }
  .check-step .mark { justify-self: start; }
}
.outcome-set { display: flex; align-items: center; gap: var(--space-2); }
.outcome-set select { width: auto; min-width: 110px; min-height: 28px; padding-top: 2px; padding-bottom: 2px; }
.hint.flag { color: var(--danger); }
