/* ============================================================================
   60's Pulse — Editorial Broadsheet (light)
   Warm newsprint white, near-black ink, one deep editorial red as the alarm accent.
   Fraunces (display) + IBM Plex Mono (data) + UnifrakturCook (front-page nameplate).
   Agents are monogram cells, not emoji.
   ============================================================================ */

:root {
  --paper:     #FBFAF6;   /* warm near-white page */
  --paper-2:   #F4F1E8;   /* panel surface */
  --paper-3:   #EAE6D9;   /* wells, bars, meter track */
  --ink:       #1A1610;   /* near-black warm text */
  --ink-soft:  #5B5443;   /* muted text */
  --ink-faint: #908975;   /* faintest text */
  --rule:      rgba(26, 22, 16, 0.16);
  --rule-soft: rgba(26, 22, 16, 0.08);

  /* severity heat on white — refined, editorial (NOT neon) */
  --calm:   #9DB0A9;
  --low:    #CBB24E;
  --rising: #CBB24E;
  --severe: #C2622C;
  --blast:  #A6201A;

  --go:        #2E6B4F;
  --revise:    #C18A1B;
  --delay:     #A6201A;
  --accent:    #A6201A;   /* alarm red, used sparingly */
  --press-red: #A6201A;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --font-black: 'UnifrakturCook', 'Fraunces', serif;

  --pad: clamp(16px, 2.4vw, 34px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* faint newsprint paper grain */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#app { max-width: 1340px; margin: 0 auto; padding: var(--pad); }
::selection { background: var(--blast); color: #fff; }

.view.hidden { display: none !important; }
.view:not(.hidden) { animation: viewIn 0.4s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- masthead */
.masthead { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 10px 0 0; margin-bottom: 18px; }
.nameplate { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.wordmark { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: 0; color: var(--ink); }
.rule-v { width: 1px; align-self: stretch; background: var(--rule); }
.outlet { font-family: var(--font-black); font-size: clamp(22px, 3vw, 34px); color: var(--ink); }
.sim-tag { margin-left: auto; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.22em; color: #fff; background: var(--press-red); padding: 4px 10px; border-radius: 2px; align-self: center; }
.masthead-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--ink-soft); padding: 8px 0 6px; display: flex; gap: 18px; flex-wrap: wrap; }
.masthead-meta b { color: var(--ink); font-weight: 600; }
.ticker { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--rule); padding: 6px 0; }
.ticker-track { display: inline-block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--ink-soft); animation: ticker 34s linear infinite; }
.ticker-track .dot { color: var(--accent); margin: 0 12px; }
.ticker-track b { color: var(--ink); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ above the fold */
.fold-top { display: grid; grid-template-columns: 1.55fr 1fr; grid-template-areas: "verdict creative" "headline headline"; gap: clamp(16px, 2.5vw, 36px); align-items: stretch; padding-bottom: 16px; }
.verdict { grid-area: verdict; display: flex; flex-direction: column; justify-content: center; }
.verdict-label { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-soft); }
.blast { display: flex; align-items: baseline; gap: 16px; }
.blast-num { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: clamp(110px, 17vw, 232px); line-height: 0.8; letter-spacing: -0.02em; color: var(--blast); font-variant-numeric: lining-nums; }
.blast-band { font-family: var(--font-mono); font-size: clamp(14px, 1.4vw, 20px); color: var(--ink-soft); letter-spacing: 0.04em; }
.heat-meter { height: 10px; border-radius: 6px; background: var(--paper-3); margin: 14px 0 10px; overflow: hidden; border: 1px solid var(--rule-soft); }
.heat-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--calm), var(--rising) 50%, var(--severe) 78%, var(--blast)); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.verdict-sub { font-size: 13.5px; color: var(--ink-soft); }
.chips { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.decision-chip { font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: 0.16em; color: #fff; padding: 8px 16px; border-radius: 3px; background: var(--delay); }
.decision-chip.launch { background: var(--go); }
.decision-chip.revise { background: var(--revise); }
.decision-chip.delay { background: var(--delay); }
.panel-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); letter-spacing: 0.06em; }

/* creative film still (kept dark — it is a video frame) */
.creative { grid-area: creative; margin: 0; display: flex; }
.frame { position: relative; width: 100%; aspect-ratio: 16/10; background: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 4px), linear-gradient(160deg, #2a241a, #14110b); border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; }
.frame::before { content: "REC"; position: absolute; top: 12px; left: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: #e08a7a; }
.frame::after { content: ""; position: absolute; top: 14px; left: 50px; width: 7px; height: 7px; border-radius: 50%; background: #d9483b; animation: rec 1.4s steps(1) infinite; }
@keyframes rec { 50% { opacity: 0.2; } }
.frame .tc { position: absolute; top: 12px; right: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: #c9c1ab; }
.frame .ost { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: clamp(20px, 2.6vw, 34px); line-height: 1.02; color: #f3eedd; text-shadow: 0 2px 18px rgba(0,0,0,0.6); }
.frame .vd { font-family: var(--font-mono); font-size: 11.5px; color: #b3ab93; margin-top: 8px; max-width: 90%; }
.frame .sim-watermark { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.3em; color: rgba(255,255,255,0.09); font-size: clamp(18px, 3vw, 30px); transform: rotate(-18deg); }

.future-headline { grid-area: headline; border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 4px; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3.1vw, 40px); line-height: 1.06; letter-spacing: -0.01em; color: var(--ink); }
.future-headline .kicker { display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* -------------------------------------------------------------- fold rule */
.fold-rule { display: flex; align-items: center; gap: 16px; border-top: 3px double var(--ink); margin: 8px 0 22px; padding-top: 8px; }
.fold-rule span { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-soft); }
.fold-rule::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ------------------------------------------------------------ below the fold */
.fold-bottom { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: clamp(18px, 2.4vw, 34px); align-items: start; }
.col { min-width: 0; }
.col-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; margin: 0 0 14px; color: var(--ink); border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.col-title em { font-family: var(--font-mono); font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-soft); text-transform: uppercase; margin-left: 8px; }

/* monogram agent cells (panel grid) */
.panel-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.tile {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: clamp(8px, 0.95vw, 11px); letter-spacing: 0.01em;
  cursor: pointer; position: relative; color: var(--agent-text);
  border: 1px solid rgba(26,22,16,0.14); background: var(--agent-heat);
  padding: 0;
  overflow: hidden; isolation: isolate;
  opacity: 0; transform: scale(0.6);
  animation: ignite 0.42s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 22ms);
  transition: transform 0.12s ease, box-shadow 0.12s ease, outline 0.12s ease, filter 0.12s ease;
}
.agent-avatar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--agent-text);
  background:
    radial-gradient(circle at 28% 17%, rgba(255,255,255,0.55), transparent 19%),
    radial-gradient(circle at 76% 88%, rgba(26,22,16,0.18), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,0.2), rgba(26,22,16,0.1)),
    var(--agent-heat);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -10px 20px rgba(26,22,16,0.16);
}
.agent-avatar::before {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 0 44%, rgba(255,255,255,0.22) 44% 48%, transparent 48%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 9px);
  opacity: 0.45;
  transform: rotate(var(--agent-tilt));
  z-index: 0;
}
.agent-portrait {
  position: absolute;
  inset: 12% 14% 21%;
  transform: translateX(var(--agent-shift));
  z-index: 1;
  pointer-events: none;
}
.agent-body {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 48%;
  border-radius: 52% 52% 18% 18%;
  background: linear-gradient(180deg, var(--agent-accent), rgba(26,22,16,0.58));
  box-shadow: 0 -2px 0 rgba(255,255,255,0.18) inset, 0 8px 12px rgba(26,22,16,0.18);
}
.agent-body::before {
  content: "";
  position: absolute;
  top: 7%;
  left: 34%;
  width: 32%;
  height: 28%;
  border-radius: 0 0 999px 999px;
  background: rgba(251,250,246,0.72);
}
.agent-head {
  position: absolute;
  left: 29%;
  top: 3%;
  width: 42%;
  height: 43%;
  border-radius: 50%;
  background: var(--agent-skin);
  box-shadow: 0 0 0 2px rgba(26,22,16,0.1), 0 4px 8px rgba(26,22,16,0.2);
  transform: rotate(var(--agent-tilt));
}
.agent-head::before {
  content: "";
  position: absolute;
  inset: -11% -9% 54%;
  border-radius: 999px 999px 42% 42%;
  background: var(--agent-accent);
}
.agent-head::after {
  content: "";
  position: absolute;
  left: 22%;
  top: 42%;
  width: 56%;
  height: 18%;
  border-top: 2px solid rgba(26,22,16,0.46);
  border-radius: 999px;
  box-shadow:
    -8px -7px 0 -6px rgba(26,22,16,0.62),
    8px -7px 0 -6px rgba(26,22,16,0.62);
}
.agent-initials {
  position: absolute;
  right: 9%;
  bottom: 8%;
  z-index: 2;
  min-width: 2.1em;
  padding: 0.08em 0.28em;
  border-radius: 999px;
  background: rgba(251,250,246,0.78);
  border: 1px solid rgba(26,22,16,0.18);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(26,22,16,0.16);
}
.tile .agent-initials { font-size: clamp(7px, 0.76vw, 9px); }
@keyframes ignite { 60% { transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); } }
.tile.lens { border-radius: 22%; }
.tile.stakeholder { border-radius: 3px; }
.tile.abstain { opacity: 0.6 !important; border-style: dashed; filter: saturate(0.35); }
.tile:disabled { cursor: default; }
.tile:not(:disabled):hover { transform: scale(1.2); z-index: 3; box-shadow: 0 10px 24px rgba(26,22,16,0.3), inset 0 1px 0 rgba(255,255,255,0.45); outline: 1px solid var(--ink); filter: saturate(1.08); }
.tile:focus-visible,
.tl-bar:focus-visible,
.tool:focus-visible,
.chip-x:focus-visible,
.preset:focus-visible,
.run-btn:focus-visible,
.skip-btn:focus-visible,
.verdict-btn:focus-visible,
.qc-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.panel-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.panel-legend .lg { display: flex; align-items: center; gap: 6px; }
.panel-legend .swatch { width: 12px; height: 12px; border: 1px solid var(--rule); }
.panel-legend .swatch.persona { border-radius: 50%; }
.panel-legend .swatch.lens { border-radius: 22%; }
.panel-legend .swatch.stakeholder { border-radius: 2px; }

/* clusters */
.cluster { margin-bottom: 18px; }
.cluster-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cluster-cat { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--ink); }
.cluster-pct { font-family: var(--font-mono); font-weight: 700; font-size: 17px; color: var(--ink); }
.cluster-bar { height: 8px; background: var(--paper-3); border-radius: 4px; margin: 7px 0; overflow: hidden; }
.cluster-bar > span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 0.9s cubic-bezier(.2,.7,.2,1); }
.cluster-quote { font-family: var(--font-display); font-style: italic; font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; }
.evi { display: inline-block; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 2px; margin-left: 6px; vertical-align: middle; }
.evi.has { background: rgba(46,107,79,0.12); color: var(--go); border: 1px solid rgba(46,107,79,0.4); }
.evi.spec { background: var(--paper-3); color: var(--ink-soft); border: 1px solid var(--rule); }

/* timeline blast map */
.timeline { display: flex; align-items: flex-end; gap: 7px; height: 168px; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.tl-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: pointer; position: relative; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.tl-bar .bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 4px; height: 0; transition: height 0.9s cubic-bezier(.2,.7,.2,1); }
.tl-bar .peak-tag { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 1px; }
.tl-bar .pct { font-family: var(--font-mono); font-size: 11px; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.tl-bar .t { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); margin-top: 6px; }
.tl-bar.peak .bar { outline: 2px solid var(--ink); outline-offset: 1px; }
.tl-bar:hover .bar { filter: brightness(0.92); }
.timeline-readout { margin-top: 12px; min-height: 54px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.timeline-readout b { color: var(--ink); }
.timeline-readout .q { font-family: var(--font-display); font-style: italic; color: var(--ink-soft); }

/* stakeholders */
.stakeholders-wrap { margin-top: 30px; }
.stakeholders { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: flex; align-items: center; gap: 10px; background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--severe); padding: 9px 13px; border-radius: 4px; max-width: 320px; }
.badge .brole { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.badge .bverdict { font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; letter-spacing: 0.03em; color: var(--ink); }

/* fix */
.fix { margin-top: 34px; }
.fix-steps { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.step { flex: 1; min-width: 130px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 5px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.step .s-score { font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 4vw, 56px); line-height: 0.9; color: var(--ink); }
.step .s-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; }
.step .s-detail { font-size: 12px; color: var(--ink-soft); line-height: 1.4; margin-top: 6px; }
.step.copy { border-top: 3px solid var(--rising); }
.step.production { border-top: 3px solid var(--severe); }
.step.baseline { border-top: 3px solid var(--ink-faint); }
.step.residual { border-top: 3px solid var(--blast); background: linear-gradient(160deg, var(--paper-2), #f3e3df); }
.step-arrow { align-self: center; font-family: var(--font-mono); color: var(--ink-faint); font-size: 22px; }
.fix-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.fix-card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 5px; padding: 14px; }
.fix-card h4 { margin: 0 0 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.fix-card.copy h4 { color: var(--revise); }
.fix-card.production h4 { color: var(--severe); }
.fix-card.decision h4 { color: var(--blast); }
.fix-card .ba { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; }
.fix-card .ba .old { color: #9a3b34; text-decoration: line-through; }
.fix-card .ba .new { color: var(--go); }
.fix-card p { font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 0; line-height: 1.45; }

.foot { margin: 40px 0 10px; padding-top: 14px; border-top: 1px solid var(--rule); font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); letter-spacing: 0.04em; display: flex; gap: 18px; flex-wrap: wrap; }

/* quote card */
.quote-card { position: fixed; z-index: 200; left: 50%; top: 50%; transform: translate(-50%, -48%); width: min(560px, 92vw); background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 28px; box-shadow: 0 40px 120px rgba(26,22,16,0.3); transition: opacity 0.16s ease, transform 0.16s ease; }
.quote-card.hidden { opacity: 0; pointer-events: none; transform: translate(-50%, -44%); }
.qc-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: var(--ink-soft); font-size: 24px; cursor: pointer; line-height: 1; }
.qc-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-mono); font-weight: 600; font-size: 16px; color: #fff; }
.qc-role { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin: 8px 0 14px; }
.qc-quote { font-family: var(--font-display); font-style: italic; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.28; color: var(--ink); }
.qc-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.qc-tier { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 3px; text-transform: uppercase; }
.qc-tier.copy { background: rgba(193,138,27,0.16); color: var(--revise); }
.qc-tier.production { background: rgba(194,98,44,0.16); color: var(--severe); }
.qc-tier.decision { background: rgba(166,32,26,0.14); color: var(--blast); }
.qc-search { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); letter-spacing: 0.02em; }
.qc-q { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 12px; }
.qc-q b { color: var(--ink); }

/* per-agent grounding */
.fi-ground { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); letter-spacing: 0.01em; margin-top: 5px; }
.qc-ground { margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 12px; }
.qc-ground-h { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.qc-snippet { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.qc-src { font-family: var(--font-mono); font-size: 11px; color: var(--go); }
.qc-snip { font-family: var(--font-display); font-style: italic; font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }

/* monogram avatar (shared: feed + badges + quote card) */
.mono { display: grid; place-items: center; border-radius: 50%; font-family: var(--font-mono); font-weight: 600; color: var(--agent-text); flex: none; }
.mono.lens { border-radius: 24%; }
.mono.stakeholder { border-radius: 4px; }
.mono .agent-portrait { inset: 14% 17% 27%; }
.mono .agent-initials { right: 5%; bottom: 5%; min-width: 1.65em; padding: 0 0.2em; border-radius: 3px; font-size: max(7px, 0.52em); }

/* ============================ Stage 1: input ============================ */
#input-view { min-height: 100vh; display: grid; place-items: center; padding: var(--pad); }
.iv-inner { width: 100%; max-width: 720px; position: relative; }
.iv-brandline { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--ink-soft); display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.iv-brandline .sim-tag { margin: 0; }
.iv-title { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: clamp(34px, 5.5vw, 58px); line-height: 1; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--ink); }
.iv-sub { color: var(--ink-soft); font-size: 15px; margin: 0 0 26px; max-width: 52ch; }
.composer { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 16px; box-shadow: 0 18px 50px rgba(26,22,16,0.1); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.composer.drag { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(166,32,26,0.14), 0 18px 50px rgba(26,22,16,0.1); }
.composer-text { width: 100%; resize: vertical; min-height: 72px; background: transparent; border: none; outline: none; color: var(--ink); font-family: var(--font-mono); font-size: 16px; line-height: 1.55; }
.composer-text::placeholder { color: var(--ink-faint); }
.composer-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.composer-chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 8px; padding: 5px 8px; font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.chip-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 4px; }
.chip-ico { font-size: 14px; }
.chip-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 15px; line-height: 1; }
.chip-x:hover { color: var(--ink); }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.composer-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 8px; padding: 7px 11px; cursor: pointer; }
.tool:hover { background: var(--paper-2); }
.composer-brand { background: transparent; border: none; border-bottom: 1px solid var(--rule); color: var(--ink); font-family: var(--font-mono); font-size: 12.5px; padding: 6px 4px; width: 150px; outline: none; }
.composer-brand::placeholder { color: var(--ink-faint); }
.run-btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 700; font-size: 13.5px; letter-spacing: 0.03em; background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 11px 18px; cursor: pointer; transition: transform 0.1s ease, background 0.15s ease; }
.run-btn .ra { font-size: 16px; }
.run-btn:hover:not(:disabled) { transform: translateY(-1px); }
.run-btn:disabled { background: var(--paper-3); color: var(--ink-faint); cursor: not-allowed; }
.iv-presets { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.presets-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.preset { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.preset:hover { border-color: var(--ink-soft); }
.iv-foot { margin-top: 26px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

/* ============================ Stage 2: live swarm ============================ */
#run-view { min-height: 100vh; display: flex; flex-direction: column; padding: var(--pad); gap: 18px; }
.rv-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.rv-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.rv-status { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.6vw, 30px); margin-top: 4px; color: var(--ink); }
.rv-metrics { display: flex; align-items: flex-end; gap: 26px; }
.rv-count { font-family: var(--font-mono); font-size: 15px; color: var(--ink-soft); letter-spacing: 0.06em; }
.rv-blast { display: flex; flex-direction: column; align-items: flex-end; line-height: 0.82; }
.rv-blast-num { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: clamp(56px, 8vw, 104px); color: var(--blast); }
.rv-blast-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-soft); }
.rv-body { flex: 1; display: grid; grid-template-columns: 1fr 380px; gap: 24px; min-height: 0; align-items: start; }
.rv-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; align-content: start; }
.rv-tile { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: clamp(10px, 1.1vw, 14px); color: var(--agent-text); background: var(--agent-heat); border: 1px solid rgba(26,22,16,0.14); opacity: 0.25; transform: scale(0.85); transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease; }
.rv-tile.lens { border-radius: 22%; }
.rv-tile.stakeholder { border-radius: 4px; }
.rv-tile.on { opacity: 1; animation: pop 0.4s cubic-bezier(.2,.8,.2,1); }
.rv-tile.on.abstain { opacity: 0.5; border-style: dashed; filter: saturate(0.35); }
.rv-tile .agent-initials { font-size: clamp(8px, 0.85vw, 10px); }
@keyframes pop { 0% { transform: scale(0.5); } 60% { transform: scale(1.16); } 100% { transform: scale(1); } }
.rv-feed { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; border-left: 1px solid var(--rule); padding-left: 20px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--low); border-radius: 8px; padding: 11px 13px; animation: feedIn 0.35s ease both; }
.feed-item.sev0 { border-left-color: var(--calm); }
.feed-item.sev2 { border-left-color: var(--severe); }
.feed-item.sev3 { border-left-color: var(--blast); }
@keyframes feedIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.fi-label { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); margin-bottom: 3px; }
.fi-quote { font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.35; color: var(--ink); }
.rv-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--rule); padding-top: 14px; }
.rv-sponsor { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-soft); }
.rv-actions { display: flex; align-items: center; gap: 14px; }
.skip-btn { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); background: none; border: none; cursor: pointer; letter-spacing: 0.05em; }
.skip-btn:hover { color: var(--ink); }
.verdict-btn { font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: 0.03em; background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 10px 18px; cursor: pointer; animation: viewIn 0.3s ease both; }
.verdict-btn.hidden { display: none; }
.verdict-btn:hover { transform: translateY(-1px); }

/* ---------------------------------------------------- room sentiment strip */
.sentiment { margin-top: 20px; max-width: 540px; }
.sent-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.sent-mean { color: var(--ink); font-weight: 600; letter-spacing: 0.03em; text-transform: none; }
.sent-bar { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: hidden; border: 1px solid var(--rule-soft); background: var(--paper-3); }
.sent-seg { height: 100%; transition: width 0.95s cubic-bezier(.2,.7,.2,1); }
.sent-marker { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); transition: left 1.05s cubic-bezier(.2,.7,.2,1); }
.sent-marker::after { content: "▲"; position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%); font-size: 8px; color: var(--ink); }
.sent-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); }
.sent-lg { display: flex; align-items: center; gap: 5px; }
.sent-lg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------------------------------------------- panel severity histogram */
.panel-stats { margin-top: 18px; display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; }
.ps-hist { display: flex; gap: 9px; align-items: flex-end; height: 66px; }
.ps-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 40px; gap: 3px; }
.ps-n { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--ink); }
.ps-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.ps-bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 3px; border: 1px solid rgba(26,22,16,0.12); transition: height 0.9s cubic-bezier(.2,.7,.2,1); }
.ps-lab { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.01em; color: var(--ink-soft); text-align: center; line-height: 1.1; }
.ps-broadcast { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); max-width: 190px; line-height: 1.45; }
.ps-broadcast b { color: var(--blast); font-size: 16px; }

/* cluster counts + hover */
.cluster-nums { display: flex; align-items: baseline; gap: 9px; }
.cluster-count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.cluster { transition: transform 0.16s ease; }
.cluster:hover { transform: translateX(3px); }
.badge { transition: transform 0.12s ease, box-shadow 0.12s ease; }
.badge:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(26,22,16,0.15); }

/* ---------------------------------------------------- orchestrated reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* blast drama */
.blast-num.settled { animation: blastSettle 0.6s ease; }
@keyframes blastSettle { 0% { text-shadow: none; } 40% { text-shadow: 0 8px 46px rgba(166,32,26,0.4); } 100% { text-shadow: none; } }
.decision-chip.delay, .decision-chip.revise { position: relative; }
.decision-chip.delay::after, .decision-chip.revise::after { content: ""; position: absolute; inset: -3px; border-radius: 5px; border: 1.5px solid currentColor; opacity: 0; animation: chipPulse 2.6s ease-in-out 1.6s infinite; }
@keyframes chipPulse { 0%, 100% { opacity: 0; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.09); } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .fold-top { grid-template-columns: 1fr; grid-template-areas: "verdict" "creative" "headline"; }
  .fold-bottom { grid-template-columns: 1fr; }
  .fix-cards { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: repeat(8, 1fr); }
  .rv-body { grid-template-columns: 1fr; }
  .rv-feed { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 14px; max-height: 240px; }
  .rv-grid { grid-template-columns: repeat(12, 1fr); }
}
