/* Camus Loop Studio — styled on the camus landing system: paper and ink, one
   red, serif display, mono labels, dark terminal blocks for verdicts. Pass is
   ink (passing is the baseline, not a celebration); red is for rejection and
   for the moments that need the human. */

:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --red: #E8584F;
  --muted: #464646;
  --faint: #7d7d7d;
  --rule: #ECEAE4;
  --code: #F6F5F1;
  --code-line: #E7E5DF;
  --ink-2: #26262c;
  /* terminal palette (dark blocks) */
  --term-text: #CFCCC4;
  --term-dim: #6f6d78;
  --term-green: #9DC2A4;
  --term-soft: #E8A39D;
  --serif: 'EB Garamond', Garamond, Georgia, 'Times New Roman', serif;
  --sans: Archivo, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
code { font-family: var(--mono); font-size: .88em; background: var(--code); border: 1px solid var(--code-line); padding: 1px 5px; border-radius: 2px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: #FAD4CF; color: var(--ink); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }

/* ---------- Launch ---------- */
.launch { max-width: 720px; margin: 0 auto; padding: 56px 24px 64px; display: flex; flex-direction: column; gap: 30px; }
.brand { text-align: center; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 42px; line-height: 1; letter-spacing: -.03em; }
.wordmark .serif { font-family: inherit; }
.tagline { font-family: var(--serif); font-size: 19px; letter-spacing: -.006em; margin-top: 10px; }
.pills { display: flex; gap: 8px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pill {
  font-family: var(--mono); font-size: 12.5px; padding: 6px 12px; border-radius: 2px;
  background: rgba(0, 0, 0, .045); color: var(--muted); white-space: nowrap;
}
.pill.ok { color: var(--ink); }
.pill.warn { color: var(--muted); }
.pill.bad { color: var(--red); background: transparent; box-shadow: inset 0 0 0 1px var(--red); }
.hint.preflight { color: var(--red); margin-top: 8px; }
.scope { margin: 14px auto 0; max-width: 480px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.tools { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
/* the open panel's button reads as pressed — one panel at a time */
.tools .ghost.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* setup + settings panels */
.panel { text-align: left; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.setup-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.setup-row:last-of-type { border-bottom: none; }
.setup-row .ic { font-family: var(--mono); width: 16px; flex: none; }
.setup-row.ok .ic { color: var(--ink); }
.setup-row.miss .ic { color: var(--red); }
.setup-row.info .ic { color: var(--faint); }
.setup-row .s-label { font-weight: 600; font-size: 14.5px; min-width: 170px; }
.setup-row .s-detail { color: var(--muted); font-size: 14px; flex: 1; }
.setup-fix { margin: 4px 0 8px 26px; }
.setup-fix code { display: inline-block; padding: 5px 9px; font-size: 12px; }
.panel-actions { margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.install-note { font-size: 14.5px; color: var(--muted); margin: 6px 0 10px; max-width: 60ch; }
.install-head { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.install-block {
  background: var(--code); border: 1px solid var(--code-line); border-radius: 3px;
  font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--ink);
  padding: 12px 14px; margin: 8px 0 10px; white-space: pre-wrap; word-break: break-word;
}
.install-wait { margin-top: 18px; display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.install-wait .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; flex: none; }
@media (prefers-reduced-motion: reduce) { .install-wait .dot { animation: none; } }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.settings-grid label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.settings-grid input, .settings-grid select {
  font: 400 14px/1.4 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--code-line); border-radius: 2px; padding: 8px 10px; text-transform: none; letter-spacing: 0;
}
.settings-grid input:focus, .settings-grid select:focus { outline: none; border-color: var(--ink); }

.card { border: 1px solid var(--rule); border-radius: 3px; padding: 24px; background: var(--paper); }
.form { display: flex; flex-direction: column; gap: 16px; }
.lbl { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
textarea {
  width: 100%; resize: vertical; background: var(--paper); color: var(--ink);
  border: 1px solid var(--code-line); border-radius: 2px; padding: 12px; font: inherit;
}
textarea::placeholder { color: var(--faint); }
textarea:focus { outline: none; border-color: var(--ink); }
.path-input {
  width: 100%; font-family: var(--mono); font-size: 13px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--code-line); border-radius: 2px; padding: 10px 12px; margin-top: 6px;
}
.path-input:focus { outline: none; border-color: var(--ink); }
.lane.disabled { opacity: .45; cursor: default; }
.lane.disabled:hover { border-color: var(--rule); }

.lanes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lane {
  text-align: left; background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 13px 14px; display: flex; flex-direction: column; gap: 5px; transition: border-color .15s;
}
.lane strong { font-family: var(--serif); font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.lane span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.lane:hover { border-color: var(--faint); }
.lane.selected { border-color: var(--ink); background: var(--code); }

.row { display: flex; gap: 36px; align-items: flex-start; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 0; }
.toggle input { accent-color: var(--ink); width: 15px; height: 15px; }
.toggle:has(input:disabled) { opacity: .45; cursor: default; }
.hint { font-size: 13.5px; color: var(--muted); margin-top: 3px; max-width: 420px; line-height: 1.55; }
.trust-hint { margin-top: -12px; max-width: none; }
.contract-presets { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 8px; }
.contract-presets .presets-lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--faint); text-transform: uppercase; margin-right: 2px; }
.preset { font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: 3px 9px; cursor: pointer; }
.preset:hover { border-color: var(--ink); color: var(--ink); }
.preset.used { color: var(--faint); border-color: var(--rule); cursor: default; }

.primary {
  font-family: var(--mono); font-size: 13px; background: var(--red); color: #fff;
  padding: 13px 24px; border-radius: 0; transition: background .15s ease;
}
.primary:hover { background: var(--ink); }
.primary:disabled { background: var(--faint); cursor: default; }
.form-error { color: var(--red); font-size: 13.5px; min-height: 1em; }

.recents h3 { font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: 10px; }
.recent {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 11px 13px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); margin-bottom: 6px;
  transition: border-color .15s;
}
.recent:hover { border-color: var(--ink); }
.recent .g { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.foot { text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.7; max-width: 560px; margin: 0 auto; }

/* ---------- Run view ---------- */
.runview { height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.runbar {
  display: flex; align-items: center; gap: 14px; padding: 11px 16px;
  border-bottom: 1px solid var(--rule); background: rgba(255, 255, 255, .85);
}
/* The goal is the question the run answered, so a finished run must be able to
   show all of it. Two lines while it runs keeps the bar tight; click or press
   Enter to open the rest. */
.rungoal { flex: 1; font-family: var(--serif); font-size: 17px; letter-spacing: -.01em; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rungoal.clamped { cursor: pointer; }
.rungoal.clamped:hover, .rungoal:focus-visible { color: var(--red); }
.rungoal.open { -webkit-line-clamp: unset; max-height: 42vh; overflow: auto; }
.runmeta { display: flex; align-items: center; gap: 12px; }
.ghost { font-family: var(--mono); font-size: 12.5px; color: var(--muted); border: 1px solid var(--rule); border-radius: 2px; padding: 6px 12px; }
.ghost:hover { color: var(--ink); border-color: var(--ink); }
.danger { font-family: var(--mono); font-size: 12.5px; color: var(--red); border: 1px solid var(--rule); border-radius: 2px; padding: 6px 12px; }
.danger:hover { border-color: var(--red); }

.pill.status { background: rgba(0, 0, 0, .045); color: var(--muted); }
.pill.status.running { color: var(--ink); }
.pill.status.needs_human { background: var(--red); color: #fff; animation: pulse 1.6s infinite; }
.pill.status.done, .pill.status.done_with_findings { background: var(--ink); color: var(--paper); }
.pill.status.verify_failed, .pill.status.failed { color: var(--red); background: transparent; box-shadow: inset 0 0 0 1px var(--red); }
.pill.status.stopped { color: var(--faint); }

/* Rehearsal (mock) marker — a dark ink block, like the terminal verdicts, so a
   simulation can never be mistaken for real work. */
.sim-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--term-text);
  border-left: 3px solid var(--red);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}
.sim-banner b { color: var(--red); font-weight: 600; }
.sim-banner { font-size: 12.5px; }

/* The sealed status dimensions (run view) and the derived headline (recents). */
.dims {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  margin: 10px 0;
  padding: 7px 11px;
  background: var(--code);
  border-radius: 2px;
}
.pill.status.disconnected, .pill.status.incomplete { color: var(--red); background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }

.qcard .qerr { font-family: var(--mono); font-size: 12px; color: var(--term-soft); margin-top: 8px; }

.grid { flex: 1; display: grid; grid-template-columns: 190px minmax(360px, 1fr) minmax(380px, 1.15fr); min-height: 0; }

/* stages rail */
.stages { border-right: 1px solid var(--rule); padding: 18px 14px; display: flex; flex-direction: column; gap: 2px; }
.stage { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 2px; color: var(--faint); font-family: var(--mono); font-size: 13px; }
.stage .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); flex: none; }
.stage.active { color: var(--ink); }
.stage.active .dot { background: var(--red); animation: pulse 1.2s infinite; }
.stage.done { color: var(--muted); }
.stage.done .dot { background: var(--ink); }
.stage.fail .dot { background: var(--red); }
.stage .badge { margin-left: auto; font-size: 10.5px; color: var(--faint); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* feed */
.feed-wrap { min-height: 0; display: flex; flex-direction: column; }
.feed { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.logline { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* the raw model session, on demand */
.session-wrap { border-top: 1px solid var(--rule); padding: 8px 14px 10px; }
.session { margin-top: 8px; background: var(--ink); border-radius: 3px; height: 170px; overflow-y: auto; }
.session pre { font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--term-text); padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.session .sm { color: var(--term-dim); }
.logline::before { content: "· "; color: var(--code-line); }

.fcard { background: var(--code); border: 1px solid var(--code-line); border-radius: 3px; padding: 11px 14px; animation: in .25s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.fcard .fhead { display: flex; gap: 9px; align-items: baseline; margin-bottom: 4px; }
.fcard .sev { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; padding: 2px 7px; border-radius: 2px; border: 1px solid; }
.fcard.high .sev { color: var(--red); border-color: var(--red); }
.fcard.medium .sev { color: var(--ink); border-color: var(--faint); }
.fcard.low .sev { color: var(--faint); border-color: var(--code-line); }
.fcard .ftitle { font-weight: 600; font-size: 14px; }
.fcard.high .ftitle { color: var(--red); }
.fcard .fbody { font-size: 14px; color: var(--muted); line-height: 1.55; }
.fcard .fix { font-size: 13.5px; margin-top: 5px; line-height: 1.55; }
.fcard .fix b { color: var(--red); font-weight: 500; font-family: var(--mono); font-size: 12px; }

.plancard { background: var(--code); border: 1px solid var(--code-line); border-radius: 3px; padding: 12px 14px; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--muted); white-space: pre-wrap; animation: in .25s ease-out; }
.verdict { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.verdict.approved { color: var(--ink); }
.verdict.revise { color: var(--red); }

/* question card — a dark artifact block; the loop hands the pen back */
.qcard {
  background: var(--ink); color: var(--term-text); border-radius: 3px;
  padding: 16px 18px; animation: in .25s ease-out;
}
.qcard .qlabel { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: var(--term-soft); margin-bottom: 9px; }
.qcard .qtext { font-family: var(--serif); font-size: 18px; line-height: 1.4; letter-spacing: -.006em; color: #fff; margin-bottom: 14px; }
.qcard .qopts { display: flex; flex-wrap: wrap; gap: 8px; }
.qcard .qopts button { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--ink-2); background: transparent; color: var(--term-text); border-radius: 2px; padding: 8px 14px; }
.qcard .qopts button:hover { border-color: var(--term-text); color: #fff; }
.qcard textarea { margin-bottom: 10px; background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.qcard textarea::placeholder { color: var(--term-dim); }
.qcard textarea:focus { border-color: var(--term-dim); }
.qcard .send { font-family: var(--mono); font-size: 12.5px; background: var(--red); color: #fff; border-radius: 0; padding: 9px 18px; }
.qcard .send:hover { background: #fff; color: var(--ink); }
/* answered → the question becomes a light receipt, not a faded hole */
.qcard.answered { background: var(--code); border: 1px solid var(--code-line); color: var(--muted); }
.qcard.answered .qlabel { color: var(--faint); }
.qcard.answered .qtext { color: var(--muted); font-size: 16px; margin-bottom: 0; }
.qcard.answered .qopts, .qcard.answered textarea, .qcard.answered .send { display: none; }
.qcard .qanswer { font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin-top: 8px; }

/* verify checklist */
.vcheck { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; animation: in .2s ease-out; }
.vcheck .ic { font-family: var(--mono); width: 15px; flex: none; text-align: center; }
.vcheck.pass .ic { color: var(--ink); } .vcheck.fail .ic { color: var(--red); }
.vcheck.warn .ic { color: var(--muted); } .vcheck.skip .ic { color: var(--faint); }
.vcheck.fail { color: var(--red); }
.vcheck .vdetail { color: var(--muted); font-size: 13px; }

/* verdict + final banners: dark terminal blocks, like the landing receipts */
.vsummary { font-family: var(--mono); font-size: 13px; padding: 11px 15px; border-radius: 3px; background: var(--ink); }
.vsummary.pass { color: var(--term-green); }
.vsummary.fail { color: var(--red); }

.banner { border-radius: 3px; padding: 17px 19px; text-align: center; font-family: var(--mono); font-size: 14px; line-height: 1.6; animation: in .3s ease-out; }
.banner.good { background: var(--ink); color: var(--term-green); }
.banner.bad { background: var(--ink); color: var(--red); }
.banner.meh { background: var(--code); border: 1px solid var(--code-line); color: var(--muted); }
.banner .sub { display: block; font-size: 12.5px; color: var(--term-dim); margin-top: 6px; font-weight: 400; }
.banner.meh .sub { color: var(--faint); }
.banner .sub a { color: inherit; text-decoration: underline; }
.banner .resume-btn { font-family: var(--mono); font-size: 12px; background: var(--red); color: #fff; padding: 6px 14px; margin-right: 8px; }
.banner .resume-btn:hover { background: #fff; color: var(--ink); }

.trust-card { border: 1px solid var(--ink); background: var(--paper); padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; }
.trust-card.degraded { border-color: var(--red); }
.trust-title { letter-spacing: .13em; font-size: 10.5px; margin-bottom: 8px; color: var(--ink); }
.trust-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; padding: 3px 0; border-top: 1px solid var(--rule); }
.trust-key { color: var(--faint); }
.trust-value { color: var(--ink); overflow-wrap: anywhere; }
.trust-contract { color: var(--muted); line-height: 1.5; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.trust-error { color: var(--red); line-height: 1.5; }
.audit-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.audit-note { color: var(--muted); font-family: var(--sans); font-size: 13px; line-height: 1.5; margin: 5px 0 9px; }
.audit-controls { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(110px, .7fr) auto; gap: 8px; align-items: center; }
.audit-controls select { min-width: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--code-line); border-radius: 2px; padding: 8px 9px; font: 12px/1.3 var(--mono); }
.audit-controls .audit-run { padding: 9px 12px; font-size: 11.5px; }

.launch-actions { display: flex; gap: 10px; align-items: center; }
.launch-actions .primary { flex: 1; }
.compare-panel { margin-top: 12px; padding: 16px; border: 1px solid var(--rule); background: var(--code); }
.compare-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.compare-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }
.compare-controls select { width: 100%; }
.comparison-card { border: 1px solid var(--rule); padding: 12px; margin: 8px 0; background: var(--paper); }
.comparison-card .arm-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.comparison-card .arm-meta { margin-top: 6px; color: var(--muted); font-size: 13px; }
.comparison-card button { margin-top: 9px; }

/* deliverable */
.doc-wrap { border-left: 1px solid var(--rule); display: flex; flex-direction: column; min-height: 0; background: var(--paper); }
.doc-head { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--rule); gap: 10px; }
.revtabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.revtabs button { font-family: var(--mono); font-size: 11.5px; padding: 4px 11px; border-radius: 2px; border: 1px solid var(--rule); color: var(--faint); transition: color .15s ease-out, border-color .15s ease-out; }
.revtabs button:hover { color: var(--ink); border-color: var(--faint); }
.revtabs button.selected { color: var(--ink); border-color: var(--ink); }
.doc-actions { display: flex; gap: 6px; }
.doc { flex: 1; overflow-y: auto; padding: 26px 30px; max-width: 72ch; }
.doc-empty { color: var(--faint); font-family: var(--serif); font-style: italic; font-size: 16px; }
.doc h1 { font-family: var(--serif); font-weight: 500; font-size: 25px; letter-spacing: -.015em; line-height: 1.15; margin: 0 0 12px; }
.doc h2 { font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: -.013em; line-height: 1.2; margin: 24px 0 9px; padding-bottom: 5px; border-bottom: 1px solid var(--rule); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-family: var(--serif); font-weight: 500; font-size: 17px; margin: 16px 0 6px; }
.doc p { margin: 9px 0; }
.doc ul, .doc ol { margin: 9px 0 9px 22px; }
.doc li { margin: 5px 0; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--code-line); text-underline-offset: 2px; }
.doc a:hover { color: var(--red); text-decoration-color: var(--red); }
.doc blockquote { border-left: 3px solid var(--rule); padding-left: 12px; color: var(--muted); margin: 9px 0; }
.doc .cite { font-family: var(--mono); font-size: 10px; color: var(--red); vertical-align: super; letter-spacing: -.02em; }
.doc pre { background: var(--code); border: 1px solid var(--code-line); border-radius: 3px; padding: 12px 14px; overflow-x: auto; margin: 10px 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; }
.doc hr { border: none; border-top: 1px solid var(--rule); margin: 16px 0; }

@media (max-width: 640px) {
  .compare-controls { grid-template-columns: 1fr; }
  .runbar { flex-wrap: wrap; row-gap: 6px; }
  .rungoal { flex-basis: 100%; order: 2; white-space: normal; font-size: 15px; line-height: 1.35; }
  .runmeta { margin-left: auto; }
}

@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr 1fr; }
  .stages { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--rule); padding: 12px 14px; }
  .doc-wrap { border-left: none; border-top: 1px solid var(--rule); }
  .lanes { grid-template-columns: 1fr; }
  .doc { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .fcard, .plancard, .qcard, .vcheck, .banner { animation: none; }
  .stage.active .dot, .pill.status.needs_human { animation: none; }
}

/* Run story — layer 1 of the disclosure stack, above the deliverable. Reads as
   editorial prose, not a dashboard: the point is that a marketer can follow it. */
.story-card { border: 1px solid var(--rule); border-left: 3px solid var(--ink); border-radius: 3px; padding: 16px 18px 14px; margin-bottom: 18px; }
.story-card.degraded { border-left-color: var(--red); }
.story-headline { font-family: var(--serif, inherit); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.story-card.degraded .story-headline { color: var(--red); }
.story-body p { margin: 0 0 5px; font-size: 15px; line-height: 1.55; color: var(--ink); max-width: 62ch; }
.story-rail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--rule); }
.story-beat { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--faint); white-space: nowrap; }
.story-beat + .story-beat::before { content: "→"; margin-right: 6px; color: var(--rule); }
.story-beat.done { color: var(--ink); }
.story-beat.failed { color: var(--red); }
.story-beat.unknown { font-style: italic; }
.pill.standing.trusted { background: var(--ink); color: var(--paper); }
.pill.standing.danger { color: var(--red); background: transparent; box-shadow: inset 0 0 0 1px var(--red); }
.pill.standing.advisory { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.pill.standing.rehearsal { color: var(--ink); background: var(--code); box-shadow: inset 0 0 0 1px var(--rule); }
.pill.status.claim { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--rule); font-style: italic; }
.story-why { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--muted); padding: 0; margin-top: 10px; text-decoration: underline; text-underline-offset: 3px; }
.story-why:hover { color: var(--ink); }
.story-why-detail { margin-top: 8px; padding-left: 12px; border-left: 1px solid var(--rule); }
.story-why-detail p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); max-width: 62ch; }
.story-why-detail .story-why-claim { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--rule); color: var(--ink); }
.story-card.degraded .story-why-detail .story-why-claim { color: var(--red); }

/* Audit comparison — replays of ONE artifact, grouped by artifact hash. */
.audit-compare { border: 1px solid var(--rule); border-left: 3px solid var(--faint); border-radius: 3px; padding: 12px 14px; margin: 8px 0; }
.audit-compare-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.audit-arm { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; width: 100%; text-align: left; padding: 7px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.audit-arm:hover { background: var(--code); }
.audit-arm .arm-effort { font-family: var(--mono); font-size: 12px; color: var(--ink); min-width: 90px; }
.audit-arm .arm-facts { font-size: 11.5px; }
.audit-compare-note { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 12.5px; line-height: 1.5; color: var(--muted); max-width: 70ch; }

/* Numbered launch flow — three decisions, so a first-time user knows where to
   start. Advanced controls (effort, rounds, depth) stay in Settings. */
.lbl.step { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: .01em; font-size: 13px; color: var(--ink); }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; flex: none; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 600; }
.sub-lbl { margin-top: 2px; }
.pairing { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 2px; }
.pairing-role { display: inline-flex; align-items: baseline; gap: 6px; }
.pairing-lbl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.pairing .mono { font-size: 13px; color: var(--ink); }
.pairing-arrow { color: var(--faint); }
.pairing .ghost { font-size: 12px; padding: 2px 8px; }
