/* FN8 Conductor — warm-void cockpit. Rebuilt to the conductor-design dossier
   (docs/strategic/fn8-launch/conductor-design/fn8c/conductor.css), on the Cella
   Design System tokens (_ds/.../colors_and_type.css). Self-contained: the token
   subset the dashboard needs is inlined here (the dossier's _ds path is not served).
   Zero borders — luminance + shadow. Instrument Serif everywhere; JetBrains Mono
   for readouts/trace only (Cella Brand Architecture §2.2). */

/* ── Cella foundation tokens (day) ────────────────────────────────────── */
:root {
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono:  "JetBrains Mono", ui-monospace, monospace;

  /* text — day */
  --fg-primary:   #1C1917;
  --fg-secondary: #44403C;
  --fg-tertiary:  #78716C;
  --fg-muted:     #A8A29E;
  --fg-faint:     #D6D3D1;

  /* radii */
  --radius-sm:   6px;
  --radius-md:  10px;
  --radius-card:12px;
  --radius-lg:  16px;

  /* motion */
  --dur-fast:   150ms;
  --dur-normal: 250ms;
  --dur-slow:   400ms;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Conductor semantic surfaces (day) ──────────────────────────────── */
  --void: #FFFBF5; --surface: #FFFDF7; --panel: #F3EFE7; --raise: #FFFFFF; --sink: #ECE7DC;
  --copper: #906C3A; --copper-soft: rgba(144,108,58,0.12);
  --green: #4F7A5C;  --green-soft: rgba(79,122,92,0.12);
  --teal: #4E7682;   --teal-soft: rgba(78,118,130,0.12);
  --red: #B0584A;    --red-soft: rgba(176,88,74,0.10);
  --gold: #92711C;   --amber: #B07A1E;
  --hair: rgba(28,26,23,0.07);
  --lift: 0 1px 2px rgba(28,26,23,0.05), 0 4px 14px rgba(28,26,23,0.06);
  --lift-sm: 0 1px 2px rgba(28,26,23,0.06);
  --recess: inset 0 2px 10px rgba(28,26,23,0.07);
}

/* ── Night mode (default for the cockpit) ─────────────────────────────── */
[data-theme="night"] {
  --fg-primary:   #FAFAF9;
  --fg-secondary: #D6D3D1;
  --fg-tertiary:  #A8A29E;
  --fg-muted:     #78716C;
  --fg-faint:     #57534E;

  --void: #0A0908; --surface: #16130F; --panel: #110F0D; --raise: #1E1A16; --sink: #080706;
  --copper: #D4A574; --copper-soft: rgba(212,165,116,0.10);
  --green: #7FA886;  --green-soft: rgba(127,168,134,0.11);
  --teal: #7B9EA8;   --teal-soft: rgba(123,158,168,0.11);
  --red: #C97A6D;    --red-soft: rgba(201,122,109,0.11);
  --gold: #D4AF37;   --amber: #E0A23C;
  --hair: rgba(255,251,245,0.05);
  --lift: 0 1px 2px rgba(0,0,0,0.4), 0 6px 22px rgba(0,0,0,0.34);
  --lift-sm: 0 1px 3px rgba(0,0,0,0.4);
  --recess: inset 0 2px 14px rgba(0,0,0,0.45);
}

/* ── Base reset ───────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--fg-primary);
  font-family: var(--font-serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Shell grid ───────────────────────────────────────────────────────── */
.cx { position: fixed; inset: 0; display: grid;
  grid-template-columns: 264px 1fr;
  grid-template-rows: 56px 1fr 40px;
  grid-template-areas: "head head" "rail main" "gov gov";
  background: var(--void); }
.cx::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.022;
  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.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cx > * { position: relative; z-index: 1; }

/* ── Header truth strip ───────────────────────────────────────────────── */
.head { grid-area: head; background: var(--surface); box-shadow: 0 1px 0 var(--hair), var(--lift-sm);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 6; }
.brand { display: flex; align-items: baseline; gap: 1px; font-family: var(--font-serif); font-size: 20px; color: var(--fg-primary); letter-spacing: -0.01em; }
.brand .b8 { color: var(--copper); font-style: italic; font-size: 24px; margin-left: 3px; }
.brand-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-muted); margin-left: 14px; padding-left: 14px; box-shadow: -1px 0 0 var(--hair); }

.truth { display: flex; align-items: center; gap: 0; }
.tstat { display: flex; flex-direction: column; gap: 2px; padding: 0 15px; box-shadow: -1px 0 0 var(--hair); }
.tstat:first-child { box-shadow: none; }
.tstat-k { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }
.tstat-v { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--fg-secondary); display: flex; align-items: center; gap: 6px; min-height: 15px; }
.tstat-v .accent { color: var(--copper); }
.tstat-v .ok { color: var(--green); }
.tstat-v .warn { color: var(--amber); }
.tstat-v .bad { color: var(--red); }
.tstat-v .muted { color: var(--fg-muted); }
.mini-meter { width: 46px; height: 3px; border-radius: 9999px; background: var(--copper-soft); overflow: hidden; }
.mini-meter > i { display: block; height: 100%; background: var(--copper); border-radius: 9999px; transition: width var(--dur-slow) var(--ease-out); }
.lock-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); flex: none; }
.lock-dot.off { background: var(--fg-muted); box-shadow: none; }
.head-right { display: flex; align-items: center; gap: 14px; }
.theme-btn { width: 30px; height: 30px; border-radius: 9999px; border: none; background: transparent; cursor: pointer; color: var(--fg-tertiary); display: flex; align-items: center; justify-content: center; transition: color var(--dur-fast), background var(--dur-fast); }
.theme-btn:hover { color: var(--fg-primary); background: var(--hair); }
.theme-btn svg { width: 16px; height: 16px; }
.op { display: flex; align-items: center; gap: 8px; }
.op-name { font-family: var(--font-serif); font-size: 14px; color: var(--fg-secondary); }
.op-av { width: 26px; height: 26px; border-radius: 50%; background: var(--raise); box-shadow: inset 0 0 0 1.5px var(--copper); color: var(--copper); font-family: var(--font-mono); font-size: 9.5px; display: flex; align-items: center; justify-content: center; }

/* ── Fleet rail ───────────────────────────────────────────────────────── */
.rail { grid-area: rail; background: var(--surface); box-shadow: 1px 0 0 var(--hair), var(--lift-sm); display: flex; flex-direction: column; overflow: hidden; z-index: 5; }
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 9px; }
.rail-title { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-muted); }
.rail-live { font-family: var(--font-mono); font-size: 9.5px; color: var(--copper); display: flex; align-items: center; gap: 6px; }
.rail-new { margin: 0 12px 8px; padding: 9px 12px; border-radius: var(--radius-md); border: none; cursor: pointer; background: var(--copper-soft); color: var(--copper); font-family: var(--font-serif); font-size: 14px; display: flex; align-items: center; gap: 8px; transition: background var(--dur-fast), transform var(--dur-fast); width: calc(100% - 24px); }
.rail-new.active, .rail-new:hover { background: rgba(212,165,116,0.2); transform: translateY(-1px); }
.rail-new .plus { font-family: var(--font-mono); font-size: 14px; }
.rail-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; }

.disp { text-align: left; border: none; background: transparent; cursor: pointer; padding: 10px 10px; border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 6px; transition: background var(--dur-fast), transform var(--dur-fast); width: 100%; }
.disp:hover { background: var(--hair); transform: translateY(-1px); }
.disp.sel { background: var(--raise); box-shadow: var(--lift-sm); }
.disp-top { display: flex; align-items: center; gap: 8px; }
.disp-title { font-family: var(--font-serif); font-size: 14.5px; line-height: 1.2; color: var(--fg-primary); letter-spacing: -0.005em; flex: 1; }
.disp-bot { display: flex; align-items: center; gap: 8px; padding-left: 15px; }
.disp-ref { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-muted); letter-spacing: 0.04em; }
.rail-status { padding: 12px 18px; font-family: var(--font-serif); font-size: 13.5px; font-style: italic; color: var(--fg-muted); }

/* honest status chips */
.chip { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border-radius: 9999px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chip .cdot { width: 5px; height: 5px; border-radius: 50%; }
.chip-queued  { color: var(--fg-tertiary); background: var(--hair); }
.chip-queued .cdot { background: var(--fg-muted); }
.chip-running { color: var(--copper); background: var(--copper-soft); }
.chip-running .cdot { background: var(--copper); animation: beat 1.6s var(--ease-smooth) infinite; }
.chip-shipped { color: var(--green); background: var(--green-soft); }
.chip-shipped .cdot { background: var(--green); }
.chip-failed  { color: var(--red); background: var(--red-soft); }
.chip-failed .cdot { background: var(--red); }
.chip-stale   { color: var(--amber); background: rgba(176,122,30,0.1); }
[data-theme="night"] .chip-stale { background: rgba(224,162,60,0.1); }
.chip-stale .cdot { background: var(--amber); box-shadow: none; opacity: 0.65; }
.chip-cancelled { color: var(--fg-muted); background: var(--hair); }
.chip-cancelled .cdot { background: var(--fg-faint); }
@keyframes beat { 0%,100% { opacity: 0.35; transform: scale(0.82); } 50% { opacity: 1; transform: scale(1); } }

.vdot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }

/* ── Main pane ────────────────────────────────────────────────────────── */
.main { grid-area: main; overflow-y: auto; overflow-x: hidden; padding: 20px 28px 28px; }
.main-inner { max-width: 980px; margin: 0 auto; }

/* dispatch header */
.dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 4px; }
.dhead-l { display: flex; flex-direction: column; gap: 8px; }
.dhead-eyebrow { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-muted); display: flex; align-items: center; gap: 9px; }
.dhead-title { font-family: var(--font-serif); font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; color: var(--fg-primary); margin: 0; }
.dhead-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-tertiary); letter-spacing: 0.03em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dhead-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* section scaffold */
.sec { margin-top: 22px; }
.sec-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 9px; display: flex; align-items: center; gap: 9px; }
.sec-label .num { color: var(--copper); }
.sec-label .rule { flex: 1; height: 1px; background: var(--hair); }

.card { background: var(--raise); border-radius: var(--radius-card); box-shadow: var(--lift); padding: 16px 18px; }
.intent-body { font-family: var(--font-serif); font-size: 17px; line-height: 1.5; color: var(--fg-secondary); }

/* routing card */
.route-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.route-why { display: flex; flex-direction: column; gap: 8px; }
.route-chosen { display: flex; align-items: center; gap: 9px; font-family: var(--font-serif); font-size: 18px; color: var(--fg-primary); }
.route-chosen .vname { text-transform: capitalize; }
.route-uoer { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--copper); background: var(--copper-soft); padding: 2px 8px; border-radius: 9999px; }
.route-health { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 9999px; }
.health-nominal { color: var(--green); background: var(--green-soft); }
.health-degraded { color: var(--amber); background: rgba(224,162,60,0.1); }
.health-saturated { color: var(--red); background: var(--red-soft); }
.route-whytxt { font-family: var(--font-serif); font-size: 14.5px; line-height: 1.5; color: var(--fg-tertiary); }
.route-alts { min-width: 268px; display: flex; flex-direction: column; gap: 0; }
.alt-head { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 7px; }
.alt { display: grid; grid-template-columns: auto auto 1fr; gap: 9px; align-items: center; padding: 6px 0; box-shadow: 0 1px 0 var(--hair); }
.alt:last-child { box-shadow: none; }
.alt-v { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-secondary); text-transform: capitalize; min-width: 64px; }
.alt-score { font-family: var(--font-mono); font-size: 11px; color: var(--fg-tertiary); }
.alt-note { font-family: var(--font-serif); font-size: 12.5px; color: var(--fg-muted); line-height: 1.3; }

/* ── CLAIMED vs VERIFIED — the centerpiece ────────────────────────────── */
.cv { background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--recess); overflow: hidden; }
.cv-head { display: grid; grid-template-columns: 1fr 1fr; }
.cv-head > div { padding: 12px 18px; }
.cv-head .h-claimed { box-shadow: 1px 0 0 var(--hair); }
.cv-htitle { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.h-claimed .cv-htitle { color: var(--fg-tertiary); }
.h-verified .cv-htitle { color: var(--copper); }
.cv-hsub { font-family: var(--font-serif); font-size: 12.5px; color: var(--fg-muted); margin-top: 3px; font-style: italic; }
.cv-row { display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 -1px 0 var(--hair); position: relative; }
.cv-claimed, .cv-verified { padding: 14px 18px; }
.cv-claimed { box-shadow: 1px 0 0 var(--hair); }
.cv-ctext { font-family: var(--font-serif); font-size: 15px; line-height: 1.4; color: var(--fg-secondary); }
.cv-art { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-muted); margin-top: 6px; letter-spacing: 0.02em; word-break: break-all; }
.cv-vtop { display: flex; align-items: flex-start; gap: 10px; }
.cv-glyph { font-family: var(--font-mono); font-size: 13px; line-height: 1.3; flex: none; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.g-pass { color: var(--green); background: var(--green-soft); }
.g-fail { color: var(--red); background: var(--red-soft); }
.g-note { color: var(--teal); background: var(--teal-soft); }
.cv-vmethod { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.cv-vdetail { font-family: var(--font-mono); font-size: 12px; line-height: 1.45; margin-top: 3px; letter-spacing: 0.01em; word-break: break-word; }
.v-pass .cv-vdetail { color: var(--green); }
.v-fail .cv-vdetail { color: var(--red); }
.v-note .cv-vdetail { color: var(--teal); }
.cv-history { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--fg-tertiary); padding: 8px 11px; border-radius: var(--radius-sm); background: var(--copper-soft); display: flex; gap: 8px; }
.cv-history .hg { color: var(--copper); flex: none; }
.cv-row.is-fail { background: var(--red-soft); }
.cv-row.is-fail::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--red); }

.cv-verdict { display: flex; align-items: center; gap: 12px; padding: 13px 18px; box-shadow: 0 -1px 0 var(--hair); }
.cv-verdict.pass { background: var(--green-soft); }
.cv-verdict.fail { background: var(--red-soft); }
.cv-verdict-glyph { font-family: var(--font-mono); font-size: 14px; }
.cv-verdict.pass .cv-verdict-glyph { color: var(--green); }
.cv-verdict.fail .cv-verdict-glyph { color: var(--red); }
.cv-verdict-txt { font-family: var(--font-serif); font-size: 15px; line-height: 1.45; }
.cv-verdict.pass .cv-verdict-txt { color: var(--fg-secondary); }
.cv-verdict.fail .cv-verdict-txt { color: var(--red); }

/* ── Landed / Cost / Linear — finops + provenance rows ────────────────── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kv { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; box-shadow: 0 1px 0 var(--hair); gap: 12px; }
.kv:last-child { box-shadow: none; }
.kv-k { font-family: var(--font-mono); font-size: 11px; color: var(--fg-tertiary); letter-spacing: 0.02em; }
.kv-v { font-family: var(--font-mono); font-size: 12px; color: var(--fg-secondary); letter-spacing: 0.02em; text-align: right; word-break: break-all; }
.kv-v.copper { color: var(--copper); }
.kv-v.green { color: var(--green); }
.pr-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--copper); text-decoration: none; }
.pr-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pr-link svg { width: 13px; height: 13px; }
.diffstat { font-family: var(--font-mono); font-size: 11px; }
.diffstat .a { color: var(--green); }
.diffstat .d { color: var(--red); }
.cost-meter { height: 5px; border-radius: 9999px; background: var(--copper-soft); overflow: hidden; margin: 10px 0 4px; }
.cost-meter > i { display: block; height: 100%; background: var(--copper); border-radius: 9999px; box-shadow: 0 0 8px rgba(212,165,116,0.5); }
.linear-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.linear-id { font-family: var(--font-mono); font-size: 12px; color: var(--teal); }
.lin-state { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 9999px; white-space: nowrap; }
.lin-Done { color: var(--green); background: var(--green-soft); }
.lin-InProgress { color: var(--copper); background: var(--copper-soft); }
.lin-Todo { color: var(--fg-tertiary); background: var(--hair); }
.lin-unknown { color: var(--fg-muted); background: var(--hair); }

/* honest empty / blocked / stale states */
.empty-note { font-family: var(--font-serif); font-size: 14.5px; line-height: 1.5; color: var(--fg-muted); font-style: italic; display: flex; align-items: center; gap: 10px; }
.empty-note .dash { font-family: var(--font-mono); color: var(--fg-faint); }
.banner { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-card); align-items: flex-start; margin-top: 16px; }
.banner-fail { background: var(--red-soft); }
.banner-stale { background: rgba(224,162,60,0.08); }
.banner-glyph { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 13px; }
.banner-fail .banner-glyph { color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.banner-stale .banner-glyph { color: var(--amber); box-shadow: inset 0 0 0 1.5px var(--amber); }
.banner-body { font-family: var(--font-serif); font-size: 15px; line-height: 1.5; }
.banner-fail .banner-body { color: var(--red); }
.banner-stale .banner-body { color: var(--fg-secondary); }
.banner-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px; }
.banner-fail .banner-title { color: var(--red); }
.banner-stale .banner-title { color: var(--amber); }

/* ── Live execution — pipeline rail ───────────────────────────────────── */
.pipe { display: flex; align-items: flex-start; justify-content: space-between; padding: 6px 4px 0; }
.pnode { display: flex; flex-direction: column; align-items: center; gap: 9px; flex: 1; position: relative; }
.pnode-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--sink); box-shadow: inset 0 0 0 1.5px var(--fg-faint); z-index: 2; transition: all var(--dur-slow) var(--ease-out); }
.pnode-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--fg-muted); transition: color var(--dur-slow); }
.pnode.done .pnode-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.pnode.done .pnode-label { color: var(--fg-tertiary); }
.pnode.active .pnode-dot { background: var(--copper); box-shadow: 0 0 0 4px var(--copper-soft), 0 0 12px rgba(212,165,116,0.5); animation: beat 1.6s var(--ease-smooth) infinite; }
.pnode.active .pnode-label { color: var(--copper); }
.pnode.fail .pnode-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft), 0 0 12px rgba(201,122,109,0.5); }
.pnode.fail .pnode-label { color: var(--red); }
.pconn { position: absolute; top: 6px; left: 50%; width: 100%; height: 1.5px; background: var(--hair); z-index: 1; }
.pconn > i { display: block; height: 100%; width: 0; background: var(--green); transition: width var(--dur-slow) var(--ease-out); }
.pconn.drawn > i { width: 100%; }
.pconn.fail > i { background: var(--red); }

.feed { margin-top: 8px; background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--recess); padding: 16px 20px; }
.feed-line { display: grid; grid-template-columns: 150px 78px 1fr; gap: 12px; align-items: baseline; padding: 6px 0; }
.feed-t { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-muted); }
.feed-stage { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); }
.feed-txt { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.45; color: var(--fg-secondary); word-break: break-word; }
.feed-line.running .feed-txt { color: var(--copper); }
.feed-line.running .feed-txt::after { content: "▍"; margin-left: 4px; animation: caret 1.2s var(--ease-smooth) infinite; color: var(--copper); }
.feed-line.is-error .feed-stage, .feed-line.is-error .feed-txt { color: var(--red); }
.feed-line.stale-line .feed-txt { color: var(--amber); }
@keyframes caret { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Conductor composer ───────────────────────────────────────────────── */
.composer-view { max-width: 760px; margin: 0 auto; }
.cmp-modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9999px; background: var(--hair); margin-bottom: 16px; }
.cmp-mode { font-family: var(--font-serif); font-size: 14px; padding: 6px 18px; border-radius: 9999px; border: none; background: transparent; cursor: pointer; color: var(--fg-tertiary); transition: color var(--dur-fast); }
.cmp-mode.on { background: var(--raise); color: var(--fg-primary); box-shadow: var(--lift-sm); }
.cmp-box { background: var(--raise); border-radius: var(--radius-card); box-shadow: var(--lift); padding: 14px 16px; }
.cmp-input { display: flex; align-items: center; gap: 12px; }
.cmp-input input { flex: 1; font-family: var(--font-serif); font-size: 16px; padding: 12px 14px; border-radius: var(--radius-md); border: none; background: var(--void); color: var(--fg-primary); outline: none; box-shadow: inset 0 0 0 1px var(--hair); }
.cmp-input input:focus { box-shadow: inset 0 0 0 1.5px var(--copper); }
.cmp-input input::placeholder { color: var(--fg-muted); font-style: italic; }
.cmp-send { width: 44px; height: 44px; border-radius: var(--radius-md); border: none; background: var(--copper); color: #1C1917; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform var(--dur-fast); flex: none; }
.cmp-send:hover { transform: translateY(-1px); }
.cmp-send:disabled { opacity: 0.5; cursor: default; transform: none; }
.cmp-send svg { width: 18px; height: 18px; }
.cmp-extra { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cmp-extra label { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 120px; }
.cmp-extra .field-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }
.cmp-extra input, .cmp-extra select { font-family: var(--font-mono); font-size: 12px; padding: 8px 10px; border-radius: var(--radius-sm); border: none; background: var(--void); color: var(--fg-secondary); outline: none; box-shadow: inset 0 0 0 1px var(--hair); }
.cmp-extra input:focus, .cmp-extra select:focus { box-shadow: inset 0 0 0 1.5px var(--copper); }
.cmp-hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--fg-muted); margin-top: 10px; text-align: center; }
.cmp-status { font-family: var(--font-mono); font-size: 11px; margin-top: 10px; text-align: center; min-height: 14px; color: var(--fg-tertiary); }
.cmp-status.ok { color: var(--green); }
.cmp-status.bad { color: var(--red); }

/* PLAN card */
.plan-card { margin-top: 18px; background: var(--raise); border-radius: var(--radius-lg); box-shadow: var(--lift); overflow: hidden; }
.plan-card.reveal { animation: rise 600ms var(--ease-out) both; }
.plan-top { padding: 16px 20px; box-shadow: 0 1px 0 var(--hair); }
.plan-eyebrow { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper); display: flex; align-items: center; gap: 9px; }
.plan-chosen { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.plan-vname { font-family: var(--font-serif); font-size: 22px; color: var(--fg-primary); text-transform: capitalize; letter-spacing: -0.01em; }
.plan-why { font-family: var(--font-serif); font-size: 15px; line-height: 1.5; color: var(--fg-tertiary); margin-top: 9px; }
.plan-est { display: flex; gap: 20px; margin-top: 12px; flex-wrap: wrap; }
.plan-est .e { font-family: var(--font-mono); font-size: 11px; color: var(--fg-tertiary); }
.plan-est .e b { color: var(--copper); font-weight: 400; }
.plan-alts { padding: 12px 20px; background: var(--panel); }
.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.plan-guard { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--fg-muted); display: flex; align-items: center; gap: 8px; }
.plan-guard .g { color: var(--copper); }
.plan-actions { display: flex; gap: 10px; }

.bbtn { font-family: var(--font-serif); font-size: 13.5px; padding: 7px 16px; border-radius: var(--radius-md); border: none; cursor: pointer; transition: transform var(--dur-fast); }
.bbtn:hover { transform: translateY(-1px); }
.bbtn:disabled { opacity: 0.5; cursor: default; transform: none; }
.bbtn-primary { background: var(--copper); color: #1C1917; }
.bbtn-ghost { background: transparent; color: var(--fg-secondary); box-shadow: inset 0 0 0 1px var(--hair); }

/* ── Governance standing line ─────────────────────────────────────────── */
.gov { grid-area: gov; background: var(--surface); box-shadow: 0 -1px 0 var(--hair), 0 -4px 14px rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 6; }
[data-theme="night"] .gov { box-shadow: 0 -1px 0 var(--hair), 0 -6px 20px rgba(0,0,0,0.3); }
.gov-line { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--fg-tertiary); display: flex; align-items: center; gap: 9px; }
.gov-line .gdot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.gov-legend { display: flex; align-items: center; gap: 13px; }
.gleg-lab { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }
.gleg { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; color: var(--fg-tertiary); text-transform: capitalize; }

/* ── Reveal ───────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise-in > * { animation: rise 600ms var(--ease-out) both; }
.rise-in > *:nth-child(2) { animation-delay: 60ms; }
.rise-in > *:nth-child(3) { animation-delay: 120ms; }
.rise-in > *:nth-child(4) { animation-delay: 180ms; }
.rise-in > *:nth-child(5) { animation-delay: 240ms; }
.rise-in > *:nth-child(6) { animation-delay: 300ms; }
.rise-in > *:nth-child(7) { animation-delay: 360ms; }

/* ── Focus ring (accessibility) ───────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .rise-in > *, .plan-card.reveal { animation: none !important; }
  .chip-running .cdot, .pnode.active .pnode-dot, .feed-line.running .feed-txt::after, .mini-meter > i { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}

@media (max-width: 880px) {
  .cx { grid-template-columns: 1fr; grid-template-areas: "head" "main" "gov"; grid-template-rows: 56px 1fr 40px; }
  .rail { display: none; }
  .route-card { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .truth .tstat:nth-child(n+3) { display: none; }
}

/* Conductor composer — mandatory Linear binding field (FN8-605 approve fix) */
.cmp-linear-row { margin-top: 8px; }
.cmp-linear {
  width: 100%; box-sizing: border-box;
  background: var(--surface-2, #14110f); color: var(--ink, #e8e2da);
  border: none; border-radius: 8px; padding: 9px 12px;
  font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 12px;
  letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(212,165,116,.14);
}
.cmp-linear::placeholder { color: rgba(232,226,218,.34); }
.cmp-linear:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(212,165,116,.5); }

/* ══ Workspaces (FN8-606 P3) ═══════════════════════════════════════════════ */
/* Rail splits into two stacked sections: Workspaces (natural height) above the
   Fleet (flex:1, its own scroll). */
.rail-sec { display: flex; flex-direction: column; min-height: 0; }
.ws-sec { flex: none; padding-bottom: 6px; box-shadow: 0 1px 0 var(--hair); }
.rail-fleet { flex: 1; overflow: hidden; padding-top: 4px; }
.ws-list { list-style: none; margin: 0; padding: 2px 8px 4px; display: flex; flex-direction: column; gap: 2px; max-height: 34vh; overflow-y: auto; }

.ws-row { width: 100%; text-align: left; border: none; background: transparent; cursor: pointer; padding: 8px 10px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 9px; transition: background var(--dur-fast), transform var(--dur-fast); }
.ws-row:hover { background: var(--hair); transform: translateY(-1px); }
.ws-row.sel { background: var(--raise); box-shadow: var(--lift-sm); }
.ws-row.archived { opacity: 0.6; }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--copper); box-shadow: 0 0 6px var(--copper-soft); }
.ws-dot.dim { background: var(--fg-faint); box-shadow: none; }
.ws-name { flex: 1; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.01em; color: var(--fg-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-row.sel .ws-name { color: var(--fg-primary); }
.ws-when { font-family: var(--font-mono); font-size: 9px; color: var(--fg-muted); letter-spacing: 0.02em; flex: none; }

.ws-expander { margin: 0 12px 2px; padding: 6px 10px; border: none; background: transparent; cursor: pointer; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); text-align: left; border-radius: var(--radius-sm); transition: color var(--dur-fast), background var(--dur-fast); }
.ws-expander:hover { color: var(--copper); background: var(--hair); }

.ws-new-input { margin: 0 12px 8px; }
.ws-new-input input { width: 100%; box-sizing: border-box; font-family: var(--font-mono); font-size: 12px; padding: 9px 12px; border-radius: var(--radius-md); border: none; background: var(--void); color: var(--fg-primary); outline: none; box-shadow: inset 0 0 0 1px var(--hair); }
.ws-new-input input:focus { box-shadow: inset 0 0 0 1.5px var(--copper); }
.ws-new-input input::placeholder { color: var(--fg-muted); font-style: italic; }

/* ── Workspace view (#surface) ────────────────────────────────────────── */
.wsv-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.wsv-gov { margin-top: 14px; display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--fg-tertiary); background: var(--copper-soft); padding: 8px 12px; border-radius: 9999px; width: fit-content; }
.wsv-gov-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 6px var(--copper); flex: none; }
.wsv-action-status { margin-top: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-tertiary); }
.wsv-action-status.ok { color: var(--green); }
.wsv-action-status.is-error { color: var(--red); }
.wsv-action-status .pr-link { font-size: 11px; }

.ws-thread { margin-top: 18px; background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--recess); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; max-height: 52vh; overflow-y: auto; }
.ws-turn { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: baseline; }
.ws-turn-who { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.ws-turn-user .ws-turn-who { color: var(--teal); }
.ws-turn-agent .ws-turn-who { color: var(--copper); }
.ws-turn-body { font-family: var(--font-serif); font-size: 15px; line-height: 1.55; color: var(--fg-secondary); white-space: pre-wrap; word-break: break-word; }
.ws-turn-user .ws-turn-body { color: var(--fg-primary); }
.ws-turn.is-error .ws-turn-body { color: var(--red); }
.ws-working { font-family: var(--font-mono); font-size: 12px; color: var(--copper); }
.ws-working::after { content: "▍"; margin-left: 3px; animation: caret 1.2s var(--ease-smooth) infinite; }
.ws-turn-cost { display: inline-block; margin-left: 10px; font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted); }

.ws-composer { margin-top: 14px; display: flex; align-items: center; gap: 12px; background: var(--raise); border-radius: var(--radius-card); box-shadow: var(--lift); padding: 12px 14px; }
.ws-composer-input { flex: 1; font-family: var(--font-serif); font-size: 16px; padding: 11px 14px; border-radius: var(--radius-md); border: none; background: var(--void); color: var(--fg-primary); outline: none; box-shadow: inset 0 0 0 1px var(--hair); }
.ws-composer-input:focus { box-shadow: inset 0 0 0 1.5px var(--copper); }
.ws-composer-input::placeholder { color: var(--fg-muted); font-style: italic; }
.ws-composer-send { width: 44px; height: 44px; border-radius: var(--radius-md); border: none; background: var(--copper); color: #1C1917; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform var(--dur-fast); flex: none; }
.ws-composer-send:hover { transform: translateY(-1px); }
.ws-composer-send svg { width: 18px; height: 18px; }

.wsv-archived { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 24px; text-align: center; }
.wsv-archived-glyph { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 20px; color: var(--amber); box-shadow: inset 0 0 0 1.5px var(--amber); }
.wsv-archived-txt { font-family: var(--font-serif); font-size: 17px; font-style: italic; color: var(--fg-tertiary); max-width: 420px; line-height: 1.5; }

/* Read-only preview ribbon (FN8-606 public-read / token-write). Fixed + out of
   flow so it never disturbs the .cx grid; amber = the caution/stale tone. */
.ro-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; line-height: 1;
  color: var(--amber); background: var(--raise); border: 1px solid var(--amber);
  box-shadow: 0 6px 24px rgba(0,0,0,0.20); padding: 9px 16px; border-radius: 9999px;
  display: flex; gap: 6px; align-items: center; max-width: calc(100vw - 32px); }
.ro-banner a { color: var(--copper); text-decoration: underline; text-underline-offset: 2px; }
.ro-banner a:hover { color: var(--gold); }
