/* ============================================================
   LLM COUNCIL — single-viewport control room.
   100dvh app shell · quiet pitch rail · full-bleed live chamber.
   Near-monochrome cool grays · one phosphor-teal accent.
   ============================================================ */

:root {
  --bg-base:    #08090C;
  --bg-raised:  #0E1014;
  --bg-overlay: #14161B;
  --bg-sunken:  #050609;

  --text:   #F4F6F8;
  --dim:    #A4ACB9;
  --faint:  #6B7280;
  --ghost:  #424A57;

  --line:        rgba(255,255,255,0.07);
  --line-strong: rgba(255,255,255,0.12);
  --line-inset:  rgba(255,255,255,0.05);

  --accent:        #5EEAD4;
  --accent-bright: #8FF4E4;
  --accent-dim:    #2BA89A;
  --accent-wash:   rgba(94,234,212,0.10);
  --accent-line:   rgba(94,234,212,0.34);

  --up:   #5EEAD4;
  --down: #E5746B;
  --risk: #E0A86B;
  --risk-wash: rgba(224,168,107,0.10);
  --down-wash: rgba(229,116,107,0.10);
  --seat-rest: var(--faint);

  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px; --r-pill: 999px;

  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px;
  --s7:32px; --s8:40px; --s9:56px; --s10:72px;

  --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-organic:  cubic-bezier(0.37, 0, 0.63, 1);
  --ease-commit:   cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-std:      cubic-bezier(0.4, 0, 0.2, 1);

  --t-instant:120ms; --t-fast:220ms; --t-base:400ms; --t-slow:680ms; --t-glacial:1100ms;

  --font-display:"Space Grotesk", system-ui, sans-serif;
  --font-body:"Inter", system-ui, sans-serif;
  --font-mono:"IBM Plex Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;                 /* the whole point: no page scroll */
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(70% 60% at 78% 8%, rgba(94,234,212,0.06), transparent 60%);
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(255,255,255,0.16); color: #fff; }
code { font-family: var(--font-mono); font-size: 0.88em; color: var(--dim); }
svg { display: block; }
.noise {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0.02;
  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='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.pulse__price, .pulse__chg, .pulse__kv b, .seat__conf b, .core__count {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}

/* ════════════════════ APP SHELL ════════════════════ */
.app {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(340px, 30%) 1fr;
  overflow: hidden;
}

/* ───────────────────── LEFT RAIL ───────────────────── */
.rail {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(24px, 3.4vh, 44px) clamp(24px, 2.4vw, 48px);
  border-right: 1px solid var(--line);
  background: linear-gradient(160deg, #0B0D12, var(--bg-base));
  min-height: 0;
  overflow-y: auto;            /* safety net: scroll the rail on short viewports instead of clipping the CTA */
  scrollbar-width: thin;
}
.rail__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s2); }
.brand__mark { width: 22px; height: 22px; color: var(--accent); }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand__word span { color: var(--dim); }
.rail__status { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: var(--s2); white-space: nowrap; }
.rail__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: breathe-dot 2400ms var(--ease-organic) infinite; }
@keyframes breathe-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.rail__body { margin-top: auto; margin-bottom: auto; padding: var(--s5) 0; }
.kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: var(--s5); }
.headline { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 44px); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.headline span { display: block; }
.headline__dim { color: var(--dim); font-weight: 500; }
.subline { font-family: var(--font-body); font-size: clamp(13.5px, 0.95vw, 15px); color: var(--dim); margin-top: var(--s5); max-width: 38ch; }

.rail__chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: var(--s4) 0; }
.chip { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.chip__tick { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 0 3px var(--accent-wash); }

/* ── The council's first coin — featured verdict card ── */
.coincard {
  margin-top: var(--s5);
  padding: var(--s4);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(165deg, var(--accent-wash), transparent 64%),
    var(--bg-raised);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 40px -28px rgba(94,234,212,0.5);
  position: relative;
  overflow: hidden;
}
.coincard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 88% 0%, rgba(94,234,212,0.10), transparent 56%);
}
.coincard__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.coincard__tag { display: inline-flex; align-items: center; gap: var(--s2); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-bright); }
.coincard__pip { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); animation: breathe-dot 2400ms var(--ease-organic) infinite; }
.coincard__pool { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--faint); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 2px 8px; }
.coincard__id { display: flex; align-items: baseline; gap: var(--s3); margin-top: var(--s3); flex-wrap: wrap; }
.coincard__ticker { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.1vw, 30px); letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.coincard__name { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.coincard__desc { font-size: 12px; line-height: 1.4; color: var(--dim); margin-top: var(--s2); max-width: 42ch; }
.coincard__meta { display: flex; flex-wrap: wrap; gap: var(--s5); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.coincard__stat { display: flex; flex-direction: column; gap: 1px; }
.coincard__stat b { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text); }
.coincard__stat i { font-family: var(--font-mono); font-size: 10px; font-style: normal; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.coincard__stat--pending b { color: var(--risk); }

.btn { display: inline-flex; align-items: center; align-self: flex-start; font-family: var(--font-mono); font-size: 13px; color: var(--bg-base); font-weight: 500; padding: var(--s3) var(--s6); border: 0; border-radius: var(--r-sm); background: var(--accent); cursor: pointer; appearance: none; transition: background var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std); }
.btn:hover { background: var(--accent-bright); transform: translateY(-1px); }
.btn:disabled { cursor: default; }

.rail__fine { font-family: var(--font-body); font-size: 11px; line-height: 1.55; color: var(--faint); max-width: 42ch; }

/* ════════════════════ CHAMBER (full-bleed) ════════════════════ */
.chamber {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;     /* head · ring(fills) · controls */
  min-height: 0; min-width: 0;
  padding: clamp(18px, 2.6vh, 32px) clamp(20px, 2.6vw, 44px);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,0.012), transparent 60%),
    linear-gradient(180deg, #0C0E12, #090B0F);
  overflow: hidden;
}
.chamber::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask: radial-gradient(120% 100% at 50% 40%, #000 35%, transparent 80%);
          mask: radial-gradient(120% 100% at 50% 40%, #000 35%, transparent 80%);
}
.chamber.override-flash { animation: chamber-flash 700ms var(--ease-organic); }
@keyframes chamber-flash { 50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--risk) 45%, transparent); } }

/* head: phases + pulse on one shelf */
.chamber__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; position: relative; z-index: 2; }
.phases { list-style: none; display: flex; }
.phase { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); position: relative; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--ghost); transition: color var(--t-base) var(--ease-std); }
.phase:not(:last-child)::after { content: ""; position: absolute; right: -1px; top: 50%; width: 1px; height: 11px; background: var(--line); transform: translateY(-50%); }
.phase b { font-weight: 600; color: var(--ghost); transition: color var(--t-base) var(--ease-std); }
.phase.done, .phase.done b { color: var(--faint); }
.phase.active { color: var(--accent); }
.phase.active b { color: var(--accent); animation: tick var(--t-fast) var(--ease-commit); }
@keyframes tick { 50% { transform: scale(1.18); } }

.pulse { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; padding: var(--s2) var(--s4); background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: inset 2px 0 0 var(--accent-line); }
.pulse__lead { display: flex; align-items: baseline; gap: var(--s3); }
.pulse__ticker { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.pulse__price { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.pulse__chg { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; padding: 2px var(--s2); border-radius: var(--r-xs); color: var(--faint); }
.pulse__chg.up { color: var(--up); background: var(--accent-wash); }
.pulse__chg.down { color: var(--down); background: var(--down-wash); }
.pulse__chg.flat { color: var(--dim); background: rgba(255,255,255,0.04); }
.pulse__meta { display: flex; gap: var(--s5); }
.pulse__kv { display: flex; align-items: baseline; gap: var(--s2); font-family: var(--font-mono); font-size: 11.5px; }
.pulse__kv i { font-style: normal; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.pulse__kv b { font-weight: 500; color: var(--dim); }
.pulse__signal { font-family: var(--font-mono); font-size: 11px; color: var(--accent); opacity: 0.85; white-space: nowrap; }

/* ───────── the ring fills the available height ───────── */
.ring {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 1.5fr) minmax(190px, 1fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "degen core marketer" "treasurer core quant";
  column-gap: clamp(20px, 3.2vw, 56px);
  row-gap: clamp(14px, 2.2vh, 28px);
  align-items: center;
  padding: clamp(12px, 2vh, 26px) clamp(4px, 1.4vw, 18px);
  min-height: 0; isolation: isolate;
}
.seat--degen { grid-area: degen; } .seat--marketer { grid-area: marketer; }
.seat--treasurer { grid-area: treasurer; } .seat--quant { grid-area: quant; }
.core { grid-area: core; }

.veins { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.vein { fill: none; stroke: var(--line-strong); stroke-width: 1.25; stroke-linecap: round; opacity: 0.5; }
.vein.alive { animation: vein-rest 6000ms var(--ease-organic) infinite; }
@keyframes vein-rest { 0%,100% { opacity: 0.35; } 50% { opacity: 0.6; } }
.vein-pulse { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 0 4px var(--accent)); }

/* ── seat card ── */
.seat {
  --seat: var(--seat-rest);
  position: relative; z-index: 2; overflow: hidden; align-self: stretch;
  display: flex; flex-direction: column; gap: clamp(6px, 1vh, 12px);
  padding: clamp(12px, 1.6vh, 18px) clamp(13px, 1vw, 18px);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 var(--line-inset);
  transition: border-color var(--t-base) var(--ease-std), box-shadow var(--t-base) var(--ease-std), transform var(--t-base) var(--ease-std), background var(--t-base) var(--ease-std);
}
.seat::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(110deg, transparent 32%, var(--accent-wash) 50%, transparent 68%);
  background-size: 220% 100%; background-position: 180% 0;
  transition: opacity var(--t-base) var(--ease-std);
}
.seat.thinking::before { opacity: 1; animation: shimmer 2200ms var(--ease-organic) infinite; }
@keyframes shimmer { to { background-position: -80% 0; } }
.seat.thinking { --seat: var(--accent); border-color: var(--accent-line); background: color-mix(in srgb, var(--bg-overlay) 80%, var(--accent-wash)); }
.seat.voted { --seat: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--line-inset), inset 0 0 0 1px var(--accent-wash); animation: vote-lock var(--t-fast) var(--ease-commit); }
@keyframes vote-lock { 0% { transform: translateY(-3px); } 55% { transform: translateY(-5px); } 100% { transform: translateY(-1px); } }

.seat__h { display: flex; align-items: flex-start; gap: var(--s3); position: relative; z-index: 2; }
.seat__mark { color: var(--seat-rest); transition: color var(--t-base) var(--ease-std); flex-shrink: 0; }
.seat__mark svg { width: 20px; height: 20px; }
.seat.thinking .seat__mark, .seat.voted .seat__mark { color: var(--seat); }
.seat__mark--brand { filter: saturate(0.85) brightness(0.92); transition: filter var(--t-base) var(--ease-std); }
.seat.thinking .seat__mark--brand, .seat.voted .seat__mark--brand { filter: saturate(1.1) brightness(1.05) drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 28%, transparent)); }
.seat__id { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.seat__role { font-family: var(--font-display); font-weight: 600; font-size: clamp(13.5px, 0.95vw, 15px); letter-spacing: -0.01em; }
.seat__model { font-family: var(--font-mono); font-style: normal; font-size: 9.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--faint); }
.seat__status { align-self: flex-start; font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 2px var(--s2); border: 1px solid var(--line); border-radius: var(--r-sm); white-space: nowrap; transition: color var(--t-base) var(--ease-std), border-color var(--t-base) var(--ease-std); }
.seat.thinking .seat__status, .seat.voted .seat__status { color: var(--accent); border-color: var(--accent-line); }

.seat__take { flex: 1; min-height: clamp(28px, 4vh, 40px); position: relative; z-index: 2; font-family: var(--font-body); font-size: clamp(12px, 0.9vw, 13px); line-height: 1.45; color: var(--dim); display: flex; align-items: flex-start; opacity: 0; transform: translateY(4px); transition: opacity var(--t-base) var(--ease-entrance), transform var(--t-base) var(--ease-entrance); }
.seat.thinking .seat__take, .seat.voted .seat__take { opacity: 1; transform: none; }
.seat__take.typing::after { content: "▌"; color: var(--accent); margin-left: 1px; animation: caret 0.8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.seat__vote { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding-top: clamp(8px, 1.2vh, 12px); border-top: 1px solid var(--line); opacity: 0; transition: opacity var(--t-base) var(--ease-std); position: relative; z-index: 2; }
.seat.voted .seat__vote { opacity: 1; }
.seat__action { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; color: var(--seat); min-width: 0; }
.seat__action > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat__act-icon { display: inline-flex; color: var(--seat); flex-shrink: 0; }
.seat__act-icon svg { width: 13px; height: 13px; }
.seat__conf { display: flex; align-items: baseline; gap: var(--s1); flex-shrink: 0; }
.seat__conf b { font-family: var(--font-mono); font-size: clamp(15px, 1.1vw, 17px); font-weight: 600; color: var(--text); line-height: 1; }
.seat__conf i { font-family: var(--font-mono); font-style: normal; font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }

/* ───────── THE CORE — recessed instrument, scales to viewport ───────── */
.core { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; min-height: 0; }
.core__panel { position: relative; width: min(100%, 46vh); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.core__dial { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial-tick { stroke: var(--line-strong); stroke-width: 1.4; opacity: 0.5; transition: stroke var(--t-base) var(--ease-std), opacity var(--t-base) var(--ease-std); }
.dial-tick.lit { stroke: var(--accent); opacity: 1; }
.dial-arc { fill: none; stroke-width: 2.5; stroke-linecap: round; opacity: 0.9; }

.core__center {
  position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72%; min-height: 46%; border-radius: var(--r-lg);
  background: var(--bg-sunken);
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.6), inset 0 0 0 1px var(--line);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: clamp(14px, 2.4vh, 26px);
  transition: width var(--t-slow) var(--ease-organic), background var(--t-slow) var(--ease-organic), box-shadow var(--t-slow) var(--ease-organic);
}
.core.deciding .core__center { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--bg-overlay) 86%, var(--accent-wash)), var(--bg-sunken) 75%); }
.core.verdict .core__center { width: 86%; background: var(--bg-overlay); box-shadow: inset 0 2px 0 var(--accent-line), inset 0 0 0 1px var(--line-strong); }
.core.override.verdict .core__center { box-shadow: inset 0 2px 0 color-mix(in srgb, var(--risk) 60%, transparent), inset 0 0 0 1px var(--line-strong); }

.core__status { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.core__mark { color: var(--accent); }
.core__mark svg { width: clamp(22px, 3vh, 30px); height: clamp(22px, 3vh, 30px); }
.core.standby .core__mark { animation: seal-beat 3200ms var(--ease-organic) infinite; }
@keyframes seal-beat { 0%,32%,100% { opacity: 0.6; transform: scale(1); } 8% { opacity: 1; transform: scale(1.04); } 16% { opacity: 0.7; transform: scale(1); } 24% { opacity: 0.92; transform: scale(1.02); } }
.core.receipt .core__mark { animation: seal-pip 320ms var(--ease-commit); }
@keyframes seal-pip { 50% { transform: scale(1.12); opacity: 1; } }
.core__label { font-family: var(--font-mono); font-size: clamp(10px, 1vw, 11px); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); transition: opacity var(--t-instant) var(--ease-std); }
.core__count { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--faint); min-height: 12px; }

.core__verdict { display: none; flex-direction: column; align-items: center; gap: clamp(5px, 0.9vh, 9px); width: 100%; }
.core.verdict .core__status { display: none; }
.core.verdict .core__verdict { display: flex; }
.core__chair { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.core__action { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.4vw, 30px); line-height: 1.03; letter-spacing: -0.02em; color: var(--text); }
.core__act-icon { display: inline-flex; color: var(--accent); }
.core__act-icon svg { width: clamp(17px, 2vw, 24px); height: clamp(17px, 2vw, 24px); }
.core.override .core__act-icon { color: var(--risk); }
.core__ov { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--risk); margin-top: var(--s1); }
.core__detail { font-family: var(--font-mono); font-size: clamp(11px, 1vw, 12px); line-height: 1.4; color: var(--accent); max-width: 30ch; }
.core__summary { font-family: var(--font-body); font-size: clamp(11px, 0.95vw, 12px); line-height: 1.45; color: var(--dim); max-width: 36ch; }
.core__guard { font-family: var(--font-mono); font-size: clamp(9.5px, 0.9vw, 10.5px); font-weight: 500; line-height: 1.4; padding: var(--s2) var(--s3); border-radius: var(--r-sm); margin-top: var(--s1); max-width: 34ch; }
.core__guard.approved { color: var(--accent); background: var(--accent-wash); border: 1px solid var(--accent-line); }
.core__guard.needs_approval { color: var(--risk); background: var(--risk-wash); border: 1px solid color-mix(in srgb, var(--risk) 32%, transparent); }

.core.verdict .core__chair   { animation: v-rise var(--t-base) var(--ease-entrance) 100ms both; }
.core.verdict .core__action  { animation: v-hero 560ms var(--ease-entrance) 200ms both; }
.core.verdict .core__detail  { animation: v-rise 460ms var(--ease-entrance) 340ms both; }
.core.verdict .core__summary { animation: v-rise 460ms var(--ease-entrance) 460ms both; }
.core.verdict .core__guard   { animation: v-snap var(--t-base) var(--ease-commit) 600ms both, guard-wait 1800ms var(--ease-organic) 1000ms infinite; }
.core.verdict .core__guard.approved { animation: v-snap var(--t-base) var(--ease-commit) 600ms both; }
@keyframes v-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes v-hero { from { opacity: 0; transform: translateY(14px) scale(0.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes v-snap { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes guard-wait { 0%,100% { border-color: color-mix(in srgb, var(--risk) 28%, transparent); } 50% { border-color: color-mix(in srgb, var(--risk) 60%, transparent); } }

/* ───────── controls ───────── */
.controls { display: flex; align-items: center; justify-content: center; gap: var(--s5); flex-wrap: wrap; position: relative; z-index: 2; }
.ctrl { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); cursor: pointer; background: var(--bg-raised); border: 1px solid var(--line-strong); padding: var(--s2) var(--s5); border-radius: var(--r-sm); transition: border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), transform var(--t-instant) var(--ease-std); }
.ctrl:hover { border-color: var(--accent-line); color: var(--accent); }
.ctrl:active { transform: scale(0.97); }
.dots { display: flex; gap: var(--s3); }
.dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; position: relative; transition: all var(--t-base) var(--ease-std); }
.dot:hover { transform: scale(1.3); border-color: var(--accent-line); }
.dot.active { background: var(--accent); border-color: var(--accent); }
.dot::after { content: attr(data-label); position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; white-space: nowrap; color: var(--faint); opacity: 0; transition: opacity var(--t-fast) var(--ease-std); pointer-events: none; }
.dot:hover::after { opacity: 1; }
.controls__hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }

/* ════════════════════ BOOT ════════════════════ */
.boot .rail, .boot .chamber { opacity: 0; }
body:not(.boot) .rail { animation: boot-rise 700ms var(--ease-entrance) 80ms both; }
body:not(.boot) .chamber { animation: boot-rise 800ms var(--ease-entrance) 220ms both; }
@keyframes boot-rise { from { opacity: 0; transform: translateY(14px) scale(0.992); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* ════════════════════ WALLET PANEL (left rail) ════════════════════ */
.rail-view { display: flex; flex-direction: column; }
.rail-view[hidden] { display: none; }                         /* class display: flex would otherwise override [hidden] */
body:not(.boot) .rail-view[data-view="connect"]:not([hidden]),
body:not(.boot) .rail-view[data-view="wallet"]:not([hidden]) { animation: wallet-in 420ms var(--ease-entrance) both; }
@keyframes wallet-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* when the dashboard is up, top-align the rail body and let it scroll */
.rail.is-wallet .rail__body { margin: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--s5) 0; }
.rail.is-wallet .rail__fine { display: none; }
.rail__body { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.rail__body::-webkit-scrollbar { width: 8px; }
.rail__body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); }

/* ── connect form ── */
.rail-back { align-self: flex-start; font-family: var(--font-mono); font-size: 11px; color: var(--faint); background: none; border: 0; cursor: pointer; padding: 0 0 var(--s4); transition: color var(--t-fast) var(--ease-std); }
.rail-back:hover { color: var(--accent); }
.wallet-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.2vw, 27px); line-height: 1.08; letter-spacing: -0.02em; margin-top: var(--s2); }
.wallet-sub { font-family: var(--font-body); font-size: 12.5px; line-height: 1.5; color: var(--dim); margin-top: var(--s3); max-width: 40ch; }
.wallet-form { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s5); }
.wallet-input { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--bg-sunken); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: var(--s3) var(--s4); width: 100%; outline: none; transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
.wallet-input::placeholder { color: var(--ghost); }
.wallet-input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-wash); }
.wallet-form .btn { align-self: stretch; justify-content: center; }
.wallet-error { font-family: var(--font-mono); font-size: 11px; line-height: 1.45; color: var(--down); margin-top: var(--s3); }

/* ── dashboard head ── */
.wallet-head { display: flex; align-items: center; gap: var(--s3); padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.wallet-ident { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, hsl(var(--h) 68% 56%), hsl(calc(var(--h) + 48) 62% 42%)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.wallet-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.wallet-addr { font-family: var(--font-mono); font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-meta { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.wallet-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; color: var(--dim); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.wallet-icon svg { width: 15px; height: 15px; }
.wallet-icon:hover, .wallet-icon.ok { color: var(--accent); border-color: var(--accent-line); }

/* ── hero balance ── */
.wallet-hero { display: flex; flex-direction: column; gap: var(--s1); margin: var(--s5) 0; }
.wallet-hero__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.wallet-hero__val { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -0.02em; color: var(--dim); }
.wallet-hero__val b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.wallet-hero__val.sk { width: 58%; height: 32px; border-radius: var(--r-xs); }
.wallet-hero__usd { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ── cards ── */
.wallet-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); margin-bottom: var(--s4); box-shadow: inset 0 1px 0 var(--line-inset); }
.wallet-card__h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.wallet-card__title { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); }
.wallet-card__title svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.wallet-card__count { font-family: var(--font-mono); font-size: 11px; color: var(--faint); background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px var(--s2); }

.wallet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.wallet-stat { display: flex; flex-direction: column; gap: 2px; padding: var(--s3); background: var(--bg-sunken); border: 1px solid var(--line-inset); border-radius: var(--r-sm); }
.wallet-stat b { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.wallet-stat i { font-family: var(--font-mono); font-style: normal; font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.wallet-empty { font-family: var(--font-body); font-size: 12px; line-height: 1.5; color: var(--faint); margin-top: var(--s3); }
.wallet-empty code { font-size: 0.92em; }
.wallet-card--err .wallet-empty { margin-top: 0; margin-bottom: var(--s3); color: var(--dim); }

/* ── asset list ── */
.wallet-assets { list-style: none; display: flex; flex-direction: column; }
.wallet-asset { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line-inset); }
.wallet-asset:first-child { border-top: 0; }
.wallet-asset__logo { position: relative; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, hsl(var(--h, 168) 64% 56%), hsl(calc(var(--h, 168) + 40) 58% 40%)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.wallet-asset__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg-overlay); }
.wallet-asset__logo--sol { display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #9945FF, #14F195); }
.wallet-asset__logo--sol svg { width: 15px; height: 15px; }
.wallet-asset__id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wallet-asset__id b { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-asset__id i { font-family: var(--font-mono); font-style: normal; font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-asset__nums { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex-shrink: 0; }
.wallet-asset__amt { font-family: var(--font-mono); font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.wallet-asset__amt.is-accent { color: var(--text); }
.wallet-asset__nums i { font-family: var(--font-mono); font-style: normal; font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ── ghost button + coming-soon ── */
.btn--ghost { background: transparent; color: var(--dim); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 var(--line-inset); }
.btn--ghost:hover { background: rgba(255,255,255,0.03); transform: none; }
.wallet-card--err .btn--ghost { align-self: flex-start; }
.wallet-vote { align-self: stretch; justify-content: center; gap: var(--s2); margin-top: var(--s1); position: relative; }
.wallet-vote svg { width: 15px; height: 15px; color: var(--accent); }
.wallet-vote[disabled] { color: var(--dim); }
.wallet-vote::after { content: "SOON"; position: absolute; right: var(--s4); font-family: var(--font-mono); font-size: 8.5px; font-weight: 600; letter-spacing: 0.12em; color: var(--accent); background: var(--accent-wash); border: 1px solid var(--accent-line); border-radius: var(--r-pill); padding: 1px 6px; }

.wallet-relink { align-self: center; font-family: var(--font-mono); font-size: 11px; color: var(--faint); background: none; border: 0; cursor: pointer; margin-top: var(--s4); transition: color var(--t-fast) var(--ease-std); }
.wallet-relink:hover { color: var(--accent); }

/* ── skeleton shimmer ── */
.wallet-skel-lines { display: flex; flex-direction: column; gap: var(--s3); }
.wallet-skel-lines span, .wallet-hero__val.sk { display: block; height: 13px; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--bg-overlay) 25%, var(--bg-raised) 37%, var(--bg-overlay) 63%); background-size: 200% 100%; animation: wallet-shimmer 1400ms linear infinite; }
.wallet-skel-lines span:nth-child(2) { width: 78%; }
.wallet-skel-lines span:nth-child(3) { width: 62%; }
@keyframes wallet-shimmer { to { background-position: -200% 0; } }

/* ════════════════════ RESPONSIVE ════════════════════ */
/* stacked: rail on top, chamber below — still one viewport, scroll only if truly cramped */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .rail { border-right: none; border-bottom: 1px solid var(--line); padding: 16px 20px; }
  .rail.is-wallet { max-height: 76dvh; min-height: 0; overflow: hidden; }
  .rail__body { padding: var(--s5) 0; }
  .rail__chips { flex-direction: row; flex-wrap: wrap; gap: var(--s2) var(--s5); }
  .rail__fine { display: none; }
  .headline { font-size: clamp(24px, 5vw, 34px); }
  .subline { max-width: none; }
}
@media (max-width: 900px) and (max-height: 820px) {
  body { overflow: auto; }                 /* concede scroll on small landscape */
  .app { height: auto; min-height: 100dvh; }
}
@media (max-width: 620px) {
  .chamber__head { gap: var(--s3); }
  .pulse { width: 100%; }
  .ring {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: "degen marketer" "core core" "treasurer quant";
    row-gap: var(--s4);
  }
  .veins { display: none; }
  .core__panel { width: min(72vw, 320px); }
  .phase span { display: none; }
  .controls__hint { display: none; }
}

/* ════════════════════ REDUCED MOTION ════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
