/* Saboot design system: a live operations console. One dark theme (the brand), shared by the caller app, the
   dispatcher console and the insights page. Motion is short and purposeful, and off under prefers-reduced-motion. */
:root {
  --bg: #07110e; --bg-2: #0b1814;
  --surface: rgba(16, 30, 26, .72); --surface-solid: #10201b; --raise: rgba(255, 255, 255, .035);
  --ink: #e9f2ee; --muted: #93a69e; --faint: #61736b; --line: rgba(255, 255, 255, .085); --line-strong: rgba(255, 255, 255, .16);
  --accent: #3ddcb4; --accent-strong: #19b892; --accent-ink: #04271e; --accent-soft: rgba(61, 220, 180, .12);
  --amber: #f5b544; --amber-soft: rgba(245, 181, 68, .13);
  --claim: #f5b544; --claim-soft: rgba(245, 181, 68, .13);
  --obs: #86adff; --obs-soft: rgba(134, 173, 255, .13);
  --test: #b9a0ff; --test-soft: rgba(185, 160, 255, .14);
  --verdict: #3ddcb4; --verdict-soft: rgba(61, 220, 180, .13);
  --action: #d4ded9; --action-soft: rgba(212, 222, 217, .1);
  --policy: #f39ad8; --policy-soft: rgba(243, 154, 216, .13);
  --bad: #ff6b5e; --bad-soft: rgba(255, 107, 94, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 18px; --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 60px -28px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--display); }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; font-family: var(--font); }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); }

/* backdrop: two soft glows and a faint grid */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(25, 184, 146, .20), transparent 60%),
    radial-gradient(760px 520px at 100% 110%, rgba(245, 181, 68, .10), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg); }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  padding: 14px max(16px, 3vw); background: rgba(7, 17, 14, .72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, #3ddcb4, #0e8f71); box-shadow: 0 8px 24px -8px rgba(61, 220, 180, .6), 0 0 0 1px rgba(255, 255, 255, .12) inset; }
.logo svg { width: 28px; height: 28px; fill: none; stroke: #04271e; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark strong { font-family: var(--display); font-size: 21px; letter-spacing: -.01em; }
.wordmark small { color: var(--muted); font-size: 12.5px; }
.nav { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--raise); }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 16px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live-pill.on { color: var(--accent); border-color: rgba(61, 220, 180, .35); }
.live-pill.on i { background: var(--accent); box-shadow: 0 0 0 0 rgba(61, 220, 180, .6); animation: ping 1.6s var(--ease) infinite; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px; }

/* layout and panels */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; padding: 18px max(16px, 3vw) 40px; max-width: 1560px; margin: 0 auto; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column;
  gap: 18px; min-width: 0; box-shadow: var(--shadow); backdrop-filter: blur(10px); animation: rise .6s var(--ease) both; }
.panel + .panel { animation-delay: .08s; }

/* the call stage: a live voice orb */
.stage-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 2px; }
.orb-wrap { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: var(--accent-ink); font-weight: 700; font-size: 14px; letter-spacing: .01em;
  background: radial-gradient(circle at 35% 30%, #7ff0d2, #22c59d 55%, #0e8f71);
  box-shadow: 0 18px 50px -12px rgba(61, 220, 180, .55), 0 0 0 1px rgba(255, 255, 255, .18) inset; transition: transform .25s var(--ease), box-shadow .3s, background .3s; }
.orb:hover { transform: scale(1.04); }
.orb:active { transform: scale(.97); }
.orb-icon { width: 30px; height: 30px; fill: currentColor; transition: transform .3s var(--ease); }
.orb.live { color: #fff; background: radial-gradient(circle at 35% 30%, #ff9a8f, #f0584a 55%, #b93226); box-shadow: 0 18px 50px -12px rgba(255, 107, 94, .55), 0 0 0 1px rgba(255, 255, 255, .18) inset; }
.orb.live .orb-icon { transform: rotate(135deg); }
.state-row { display: flex; gap: 12px; align-items: baseline; }
.state { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; transition: color .3s; }
.state.listening { color: var(--accent); }
.state.speaking { color: var(--amber); }
.state.working { color: var(--obs); }
.timer { font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status { margin: 0; color: var(--muted); font-size: 14px; text-align: center; max-width: 52ch; min-height: 1.5em; }

/* progress stepper */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.stepper li { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  color: var(--faint); font-size: 13.5px; font-weight: 600; background: var(--raise); transition: all .35s var(--ease); overflow: hidden; }
.stepper li b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255, 255, 255, .06); color: var(--muted); flex: none; transition: all .35s var(--ease); }
.stepper li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper li.done { color: var(--muted); }
.stepper li.done b { background: var(--accent-soft); color: var(--accent); }
.stepper li.active { color: var(--ink); border-color: rgba(61, 220, 180, .45); background: var(--accent-soft); }
.stepper li.active b { background: var(--accent); color: var(--accent-ink); }
.stepper li.active::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 40%; background: var(--accent); animation: sweep 1.6s var(--ease) infinite; }

/* systems checked in parallel */
.systems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 560px) { .systems, .stepper { grid-template-columns: repeat(2, 1fr); } }
.sys { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--raise); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .35s var(--ease); }
.sys i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--faint); grid-row: span 2; }
.sys em { grid-column: 2; font-style: normal; font-weight: 500; font-size: 12px; color: var(--faint); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys.checking { color: var(--ink); border-color: rgba(134, 173, 255, .4); }
.sys.checking i { border-color: var(--obs); border-top-color: transparent; animation: spin .8s linear infinite; }
.sys.ok { color: var(--ink); border-color: rgba(61, 220, 180, .35); }
.sys.ok i { border: 0; background: var(--accent); box-shadow: 0 0 12px rgba(61, 220, 180, .7); }
.sys.ok em { color: var(--accent); }
.sys.bad { color: var(--ink); border-color: rgba(245, 181, 68, .45); }
.sys.bad i { border: 0; background: var(--amber); box-shadow: 0 0 12px rgba(245, 181, 68, .7); }
.sys.bad em { color: var(--amber); }
.sys.flash { animation: pop .5s var(--ease); }

/* KPI meters */
.meters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 720px) { .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.meter { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); min-width: 0; }
.meter span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.meter strong { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.meter strong.bump { animation: bump .6s var(--ease); }
.meter-sub { color: var(--faint); font-size: 11.5px; font-family: var(--mono); min-height: 1em; }

/* camera */
.camera { border: 1px solid rgba(61, 220, 180, .35); border-radius: 14px; padding: 12px; display: grid; gap: 10px; background: var(--accent-soft); animation: rise .4s var(--ease) both; }
.camera-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.camera-reason { margin: 0; font-weight: 600; }
.badge-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--bad); text-transform: uppercase; letter-spacing: .06em; }
.badge-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: blink 1.2s infinite; }
.camera video { width: 100%; max-height: 300px; border-radius: 10px; background: #000; object-fit: cover; }
.camera-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.primary { border: 0; border-radius: 10px; padding: 9px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 700; transition: filter .2s, transform .2s; }
.primary:hover { filter: brightness(1.08); }
.ghost-btn { border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 16px; background: transparent; cursor: pointer; font-size: 14px; }
.photo-status { margin: 0; font-size: 14px; color: var(--muted); }

/* conversation */
.convo { display: flex; flex-direction: column; gap: 10px; }
.convo-head { display: flex; justify-content: space-between; align-items: center; }
.speaking { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--amber); }
.speaking i { width: 3px; height: 12px; border-radius: 2px; background: var(--amber); animation: eq .9s var(--ease) infinite; margin-right: 1px; }
.speaking i:nth-child(2) { animation-delay: .15s; } .speaking i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
.transcript { list-style: none; margin: 0; padding: 2px; display: flex; flex-direction: column; gap: 10px; max-height: 40vh; overflow-y: auto; scroll-behavior: smooth; }
.transcript li { max-width: 86%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; animation: bubble .35s var(--ease) both; }
.transcript li.agent { background: var(--surface-solid); border: 1px solid var(--line); align-self: flex-start; border-top-left-radius: 6px; }
.transcript li.caller { background: linear-gradient(140deg, rgba(61, 220, 180, .2), rgba(61, 220, 180, .1)); border: 1px solid rgba(61, 220, 180, .25); align-self: flex-end; border-top-right-radius: 6px; }
.transcript small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.transcript li.agent small { color: var(--amber); }
.convo-empty { margin: 0; color: var(--faint); font-size: 14px; }

/* demo drawer */
.demo { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.demo summary { cursor: pointer; color: var(--muted); font-weight: 600; list-style: none; display: flex; align-items: baseline; gap: 8px; }
.demo summary::before { content: "›"; display: inline-block; transition: transform .2s; color: var(--faint); }
.demo[open] summary::before { transform: rotate(90deg); }
.demo summary small { color: var(--faint); font-weight: 500; }
.demo p { margin: 8px 0; color: var(--muted); }
.demo-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint) !important; margin: 12px 0 6px !important; }
.demo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-row button { border: 1px solid var(--line-strong); background: var(--raise); border-radius: 10px; padding: 7px 12px; font-size: 13px; transition: border-color .2s, background .2s; }
.demo-row button:hover { border-color: rgba(61, 220, 180, .5); background: var(--accent-soft); }
.hint { font-family: var(--mono); font-size: 12px; color: var(--faint) !important; }
.from { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.from select { font: 14px var(--font); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-solid); color: var(--ink); max-width: 100%; }

/* evidence ledger */
.ledger-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ledger-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 60ch; }
.case-id { font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.customer-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  border: 1px solid rgba(61, 220, 180, .3); background: linear-gradient(120deg, rgba(61, 220, 180, .12), rgba(61, 220, 180, .03)); animation: slidein .5s var(--ease) both; }
.customer-card strong { display: block; font-size: 16px; }
.customer-card small { color: var(--muted); font-size: 13px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-family: var(--display); background: var(--accent); color: var(--accent-ink); }
.verified { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.verified svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ledger { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow-y: auto; position: relative; scroll-behavior: smooth; }
.ledger li { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px;
  background: var(--raise); border: 1px solid var(--line); animation: slidein .45s var(--ease) both; }
.ledger li > div { min-width: 0; }
.kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.kind::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.k-claim { background: var(--claim-soft); color: var(--claim); }
.k-observation { background: var(--obs-soft); color: var(--obs); }
.k-hypothesis, .k-test { background: var(--test-soft); color: var(--test); }
.k-verdict { background: var(--verdict-soft); color: var(--verdict); }
.k-action { background: var(--action-soft); color: var(--action); }
.k-policy { background: var(--policy-soft); color: var(--policy); }
.ledger .src { color: var(--faint); font-size: 12px; font-family: var(--mono); margin-top: 2px; }
.ledger .txt { overflow-wrap: anywhere; }
.ledger li.verdict { border-color: rgba(61, 220, 180, .55); background: linear-gradient(120deg, rgba(61, 220, 180, .16), rgba(61, 220, 180, .04));
  box-shadow: 0 0 0 1px rgba(61, 220, 180, .15), 0 16px 40px -20px rgba(61, 220, 180, .5); }
.ledger li.verdict .txt { font-weight: 600; font-size: 15.5px; }
.ledger li.verdict .vhead { font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--accent); text-transform: capitalize; margin-bottom: 2px; }
.ledger li.action { border-color: rgba(212, 222, 217, .18); }
.ledger details summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-top: 6px; }
.ledger .cite { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.ledger .cite strong { color: var(--policy); font-weight: 600; }
.chip { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--policy-soft); color: var(--policy); margin-left: 6px; }
.ledger-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 20px; color: var(--faint); text-align: center; border: 1px dashed var(--line-strong); border-radius: 14px; }
.ledger-empty svg { width: 120px; fill: rgba(255, 255, 255, .05); }
.ledger-empty svg rect { animation: shimmer 2.4s ease-in-out infinite; }
.ledger-empty svg rect:nth-child(2) { animation-delay: .3s; } .ledger-empty svg rect:nth-child(3) { animation-delay: .6s; }
.ledger-empty p { margin: 0; max-width: 42ch; font-size: 14px; }

/* dispatcher console */
.cases { display: grid; gap: 12px; }
.case { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; background: var(--raise); animation: slidein .4s var(--ease) both; }
.case.awaiting { border-color: rgba(245, 181, 68, .55); box-shadow: 0 0 0 1px rgba(245, 181, 68, .2), 0 16px 40px -22px rgba(245, 181, 68, .55); }
.case-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.case-head strong { font-family: var(--mono); }
.case > div { color: var(--ink); }
.case .src, .src { color: var(--faint); font-size: 12px; font-family: var(--mono); }
.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--action-soft); text-transform: capitalize; }
.pill.awaiting_approval { background: var(--claim-soft); color: var(--claim); }
.pill.dispatched, .pill.closed { background: var(--verdict-soft); color: var(--verdict); }
.pill.handoff { background: var(--bad-soft); color: var(--bad); }
.case .handoff { color: var(--bad); font-weight: 600; }
.decide { display: flex; gap: 8px; flex-wrap: wrap; }
.decide input, .ask input, .assume input { font: inherit; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-solid); color: var(--ink); }
.decide input { flex: 1; min-width: 160px; }
.decline { border: 1px solid var(--line-strong); background: transparent; border-radius: 10px; padding: 9px 16px; }
.empty { color: var(--faint); }
.ops-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 900px) { .ops-layout { grid-template-columns: 1fr; } }
.side { display: grid; gap: 18px; align-content: start; }
.fleet { display: grid; gap: 8px; }
.bld { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; background: var(--raise); }
.bld.dark { border-color: rgba(245, 181, 68, .45); }
.bld.proposed { border-color: rgba(255, 107, 94, .55); box-shadow: 0 0 0 1px rgba(255, 107, 94, .18); }
.bld.declared { border-color: rgba(61, 220, 180, .45); }
.bld .bname { font-family: var(--font); font-weight: 600; }
.agent-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agent-head select { font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); }
.chat { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.chat li { padding: 10px 12px; border-radius: 12px; white-space: pre-wrap; font-size: 14px; line-height: 1.45; animation: bubble .3s var(--ease) both; }
.chat li.you { background: var(--obs-soft); justify-self: end; max-width: 90%; }
.chat li.agent { background: var(--raise); border: 1px solid var(--line); max-width: 95%; }
.chat .mdh { display: block; margin-top: 4px; }
.chat .mdli { display: block; }
.chat code { font-family: var(--mono); font-size: 12px; }
.ask { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; }

/* insights & ROI */
.insights { max-width: 1280px; margin: 0 auto; padding: 0 max(16px, 3vw) 40px; display: flex; flex-direction: column; gap: 18px; }
.insights > #basis { margin: 18px 0 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0;
  box-shadow: var(--shadow); animation: rise .5s var(--ease) both; }
.tile:nth-child(2) { animation-delay: .05s; } .tile:nth-child(3) { animation-delay: .1s; } .tile:nth-child(4) { animation-delay: .15s; } .tile:nth-child(5) { animation-delay: .2s; }
.tile span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tile strong { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
.tile em { color: var(--muted); font-size: 12.5px; font-style: normal; }
.tile.hero { background: linear-gradient(140deg, rgba(61, 220, 180, .22), rgba(61, 220, 180, .06)); border-color: rgba(61, 220, 180, .35); }
.tile.hero strong { color: var(--accent); }
.assume { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.assume label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.assume input { font-family: var(--mono); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.ins-grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.clusters, .themes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.themes li, .cluster { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--raise); animation: slidein .4s var(--ease) both; }
.themes .txt { color: var(--muted); margin-top: 4px; }
.cluster { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.cluster .src { grid-column: 2; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(90px, 9em) 1fr 3ch; gap: 10px; align-items: center; padding: 3px 0; border-radius: 6px; outline-offset: 2px; }
.bar .k { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.bar .v, .col .v { font: 12px var(--mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.bar .track { height: 10px; background: rgba(255, 255, 255, .04); border-radius: 0 5px 5px 0; }
.bar .fill { height: 100%; background: linear-gradient(90deg, #19b892, #3ddcb4); border-radius: 0 5px 5px 0; min-width: 2px; transform-origin: left; animation: grow .8s var(--ease) both; }
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; height: 180px; align-items: end; }
.col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; outline-offset: 2px; }
.col .track { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-strong); }
.col .fill { width: 100%; background: linear-gradient(180deg, #3ddcb4, #19b892); border-radius: 5px 5px 0 0; min-height: 2px; transform-origin: bottom; animation: growy .8s var(--ease) both; }
.col .k { font-size: 12px; color: var(--muted); }
.tip { position: fixed; z-index: 10; pointer-events: none; background: #f2f7f4; color: #0b1814; font-size: 12px; padding: 6px 9px; border-radius: 8px; max-width: 260px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes bubble { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 180, .55); } 100% { box-shadow: 0 0 0 10px rgba(61, 220, 180, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes bump { 0% { color: var(--accent); transform: translateY(-3px); } 100% { transform: none; } }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes shimmer { 0%, 100% { fill: rgba(255, 255, 255, .04); } 50% { fill: rgba(255, 255, 255, .1); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
