/* ShadowConverge frontend stylesheet (Week 13.3 Step 3 visual redesign).

   Dark-only committed identity -- there is intentionally no light theme
   and no OS-preference color switching. The design principle is "color is
   signal, not decoration": the chrome is monochrome charcoal; saturated
   color appears ONLY to communicate verdict state (approve/reject/
   inconclusive/quarantined) and argument stance (for/against/neutral).

   Mobile-first; one breakpoint at 640px. Form controls stay at 16px to
   avoid iOS focus-zoom; interactive targets stay >=44px. Fonts are
   self-hosted Latin-subset woff2 (no external CDN -- privacy + the
   closed-source posture). ASCII-only. */

/* ---- Self-hosted fonts (Latin subset, woff2) ---- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-500.woff2") format("woff2");
}

:root {
  /* Chrome -- monochrome charcoal, layered for dimensionality */
  --bg: #0F0F12;
  --surface-1: #16161B;
  --surface-2: #1D1D24;
  --surface-hover: #232330;
  --border: #2A2A33;
  --border-strong: #3A3A45;

  /* Text */
  --text: #E7E7EA;
  --text-muted: #9A9AA5;
  --text-faint: #6A6A75;

  /* Accent -- the only interactive color (cold flat cyan, no gradient) */
  --accent: #4DB8C4;
  --accent-hover: #5FC9D4;
  --accent-glow: rgba(77, 184, 196, 0.30);

  /* Verdict semantics -- the saturated payload */
  --approve: #34D399;
  --approve-bar: #1F7A4D;
  --approve-tint: rgba(52, 211, 153, 0.10);
  --reject: #F87171;
  --reject-bar: #A12B37;
  --reject-tint: rgba(248, 113, 113, 0.10);
  --gold: #FBBF24;
  --gold-bar: #B8860B;
  --gold-tint: rgba(251, 191, 36, 0.10);
  --hazard: #FB923C;
  --hazard-bar: #C2410C;
  --hazard-tint: rgba(251, 146, 60, 0.10);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 3px;
  --transition: 160ms ease;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Focus (keyboard accessibility) ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Header + convergence motif ---- */
header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.convergence-mark {
  flex: none;
  display: block;
}

.convergence-mark path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.tagline {
  margin: 0.3rem 0 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

/* ---- Settings panel ---- */
#settings-toggle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

#settings-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

#settings-panel {
  padding: 1rem 1.25rem;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

#settings-panel label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

#api-key-input {
  width: 100%;
  padding: 0.6rem;
  font-size: 16px;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.settings-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.settings-actions button {
  flex: 1;
  padding: 0.6rem;
  font-size: 1rem;
  min-height: 44px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.settings-actions button:hover { background: var(--surface-hover); }

#settings-save {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

#settings-save:hover { background: var(--accent-hover); }

.settings-note {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---- Layout ---- */
main {
  padding: 1rem 1.25rem;
  max-width: 880px;
  margin: 0 auto;
}

section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

/* ---- Empty-state explainer (first-time visitor primer) ----
   Hidden by app.js once a debate is in progress; shown again on
   "New debate". The fit-grid is single-column on mobile and two
   columns at the 640px breakpoint below. */
.empty-state-label {
  /* Inherits the existing h2 small-uppercase-tracking treatment */
}

.empty-state-intro {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}

.fit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.fit-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.fit-card--yes { border-left-color: var(--approve-bar); }
.fit-card--no { border-left-color: var(--reject-bar); }

.fit-card-heading {
  margin: 0 0 0.4rem 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
}

.fit-card--yes .fit-card-heading { color: var(--approve); }
.fit-card--no .fit-card-heading { color: var(--reject); }

.fit-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

h2 {
  margin: 0 0 0.85rem 0;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

h3 {
  margin: 1.1rem 0 0.4rem 0;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

#motion-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 16px;
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  transition: border-color var(--transition);
}

#motion-input:focus {
  border-color: var(--accent);
  outline: none;
}

#motion-input::placeholder { color: var(--text-faint); }

#submit-btn,
#new-debate-btn,
#new-debate-after-failure-btn {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.8rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition), box-shadow var(--transition);
}

#submit-btn:hover,
#new-debate-btn:hover,
#new-debate-after-failure-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 18px var(--accent-glow);
}

#submit-btn:disabled {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--text-faint);
  cursor: not-allowed;
  box-shadow: none;
}

.error {
  color: var(--reject);
  font-size: 0.9rem;
  margin: 0.5rem 0 0 0;
}

/* ---- Example motion chips (empty-state starter motions) ----
   Outlined low-contrast buttons that populate the textarea on click
   (handler in app.js). Wrap to multiple lines on narrow screens. */
#example-motions {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.examples-label {
  margin: 0 0 0.55rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.example-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.example-chips li {
  margin: 0;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  text-align: left;
  padding: 0.5rem 0.7rem;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 36px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.chip:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

/* ---- Progress ---- */
.progress-status {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.status-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.elapsed {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--text);
}

.estimate {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-align: right;
}

.epoch-label {
  margin: 0.6rem 0 0.35rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.epoch-bar {
  height: 4px;
  background: var(--surface-hover);
  border-radius: 2px;
  overflow: hidden;
}

.epoch-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 420ms ease;
}

.stop-note {
  margin: 0.6rem 0 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-faint);
}

#progress-events {
  list-style: none;
  padding: 0;
  margin: 0;
}

#progress-events li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  animation: event-in 200ms ease;
}

/* Latest bullet = the active state; pulses to confirm "still working".
   The pulse moves forward automatically as new bullets append, and is
   killed on terminal state via .is-complete. */
#progress-events li:last-child {
  border-bottom: none;
  color: var(--text);
  animation: event-in 200ms ease, active-pulse 1.6s ease-in-out 200ms infinite;
}

#progress-events.is-complete li:last-child {
  animation: none;
}

@keyframes active-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#progress-events li em {
  font-style: normal;
  font-family: var(--font-mono);
  color: var(--text);
}

@keyframes event-in {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: none; }
}

.debate-id-line, .cost-line {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 0.5rem 0;
  font-family: var(--font-mono);
  word-break: break-all;
}

/* ---- Verdict (focal point) ---- */
.verdict-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.verdict-panel--approve { background: var(--approve-tint); border-left-color: var(--approve-bar); }
.verdict-panel--reject { background: var(--reject-tint); border-left-color: var(--reject-bar); }
.verdict-panel--inconclusive { background: var(--gold-tint); border-left-color: var(--gold-bar); }
.verdict-panel--quarantined {
  background: var(--hazard-tint);
  border-left-color: var(--hazard-bar);
  border-left-style: dashed;
}

.recommendation {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text);
}

.verdict-panel--approve .recommendation { color: var(--approve); }
.verdict-panel--reject .recommendation { color: var(--reject); }
.verdict-panel--inconclusive .recommendation { color: var(--gold); }
.verdict-panel--quarantined .recommendation { color: var(--hazard); }

.confidence-block {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.confidence-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.confidence-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.convergence-bar {
  margin-top: 0.9rem;
  height: 4px;
  background: var(--surface-hover);
  border-radius: 2px;
  overflow: hidden;
}

.convergence-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 420ms ease;
}

.verdict-panel--approve .convergence-fill { background: var(--approve); }
.verdict-panel--reject .convergence-fill { background: var(--reject); }
.verdict-panel--inconclusive .convergence-fill { background: var(--gold); }
.verdict-panel--quarantined .convergence-fill { background: var(--hazard); }

.motion-recap {
  font-size: 0.92rem;
  color: var(--text-muted);
  border-left: 3px solid var(--border);
  padding-left: 0.75rem;
  margin: 0.85rem 0;
}

.motion-recap strong { color: var(--text); }

#narrative {
  white-space: pre-wrap;
  font-size: 0.95rem;
  color: var(--text);
}

/* ---- Argument lists ---- */
#surviving-list, #pruned-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#surviving-list li, #pruned-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

#surviving-list li:last-child, #pruned-list li:last-child {
  border-bottom: none;
}

.arg-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 0;
  margin-right: 0.5rem;
}

/* Sharp blocky stance markers -- left bar matches text color */
.arg-stance {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 0;
  border-left: 3px solid currentColor;
  margin-right: 0.5rem;
}

.arg-stance--for { background: var(--approve-tint); color: var(--approve); }
.arg-stance--against { background: var(--reject-tint); color: var(--reject); }
.arg-stance--neutral { background: var(--gold-tint); color: var(--gold); }

.arg-claim {
  font-size: 0.95rem;
  color: var(--text);
}

.arg-confidence {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  margin-left: 0.4rem;
}

/* ---- Pruned arguments (visually de-emphasized) ---- */
.pruned-details {
  margin-top: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pruned-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 0.75rem 1rem;
  min-height: 44px;
}

.pruned-details summary::-webkit-details-marker { display: none; }

.pruned-details summary::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-faint);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 0.6rem;
  transition: transform var(--transition);
}

.pruned-details[open] summary::before { transform: rotate(90deg); }

.pruned-details summary:hover { color: var(--text-muted); }

#pruned-list {
  padding: 0 1rem 0.4rem;
}

#pruned-list li {
  opacity: 0.72;
}

/* ---- How-to-read disclosure (verdict-only inline help) ----
   Mirrors the pruned-details treatment so the two disclosures at
   the bottom of the verdict section read as a coherent pair. */
.howto-details {
  margin-top: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.howto-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 0.75rem 1rem;
  min-height: 44px;
}

.howto-details summary::-webkit-details-marker { display: none; }

.howto-details summary::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-faint);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 0.6rem;
  transition: transform var(--transition);
}

.howto-details[open] summary::before { transform: rotate(90deg); }

.howto-details summary:hover { color: var(--text-muted); }

.howto-body {
  padding: 0 1rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.howto-body h4 {
  margin: 0.9rem 0 0.35rem 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
}

.howto-body h4:first-child { margin-top: 0.25rem; }

.howto-body p { margin: 0 0 0.5rem 0; }

.howto-body ul {
  margin: 0 0 0.5rem 0;
  padding-left: 1.1rem;
}

.howto-body li { margin: 0.2rem 0; }

.howto-body strong { color: var(--text); }

/* ---- Quarantine state -- subhead + partial-cost (inside panel) ---- */
.quarantine-subhead {
  margin: 0.55rem 0 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--hazard);
  line-height: 1.35;
}

.partial-cost-line {
  margin: 0.9rem 0 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

/* ---- Quarantine guidance (outside the panel) ---- */
.quarantine-explainer {
  margin: 1rem 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.rephrase-intro {
  margin: 0.85rem 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

/* Rephrase button shares the primary-CTA treatment with #submit-btn /
   #new-debate-btn -- it's the active path forward on a quarantine. */
#rephrase-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.8rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition), box-shadow var(--transition);
}

#rephrase-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 18px var(--accent-glow);
}

/* ---- Quarantine technical-details disclosure (mirrors .howto-details) ---- */
.quarantine-details {
  margin-top: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.quarantine-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 0.75rem 1rem;
  min-height: 44px;
}

.quarantine-details summary::-webkit-details-marker { display: none; }

.quarantine-details summary::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-faint);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 0.6rem;
  transition: transform var(--transition);
}

.quarantine-details[open] summary::before { transform: rotate(90deg); }

.quarantine-details summary:hover { color: var(--text-muted); }

.quarantine-details-body {
  padding: 0 1rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-family: var(--font-mono);
}

.quarantine-details-body p { margin: 0.4rem 0; }

.quarantine-details-body code {
  font-family: var(--font-mono);
  color: var(--hazard);
  background: var(--bg);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

/* ---- Quarantine-only visibility (CSS-driven; JS toggles .is-quarantined
   on #verdict-section). Single source of truth so adding a new quarantine-
   only element only requires extending these selectors. */
#quarantine-subhead,
#partial-cost-line,
#quarantine-explainer,
#rephrase-intro,
#rephrase-btn,
#quarantine-details {
  display: none;
}

#verdict-section.is-quarantined #quarantine-subhead,
#verdict-section.is-quarantined #partial-cost-line,
#verdict-section.is-quarantined #quarantine-explainer,
#verdict-section.is-quarantined #rephrase-intro,
#verdict-section.is-quarantined #rephrase-btn,
#verdict-section.is-quarantined #quarantine-details {
  display: block;
}

#verdict-section.is-quarantined #confidence-block,
#verdict-section.is-quarantined #convergence-bar,
#verdict-section.is-quarantined #narrative-block,
#verdict-section.is-quarantined #surviving-block,
#verdict-section.is-quarantined #pruned-details {
  display: none;
}

/* ---- Failure ---- */
#failure-reason {
  color: var(--reject);
  font-size: 0.95rem;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, .convergence-fill, #progress-events li, .pruned-details summary::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- Desktop ---- */
@media (min-width: 640px) {
  main { padding: 2rem; }
  header { padding: 1.25rem 2rem; }
  #settings-panel { padding: 1.25rem 2rem; }
  h1 { font-size: 1.75rem; }
  .recommendation { font-size: 3.5rem; }
  .fit-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
}
