/* ==========================================================================
   Coordinator — O.D.I.N. Mission-Control HUD
   A glass-cockpit skin over the same read-only ledger. Deep-space obsidian by
   default; a clean high-contrast light theme via [data-theme="light"].
   Proof state still carries its own SHAPE (check / dashed ring / cross) so
   colour is never the only clue. Load-bearing for the e2e tests:
     - .col > h3 and .fact .k are UPPERCASED (tests read "WAITING", "RIGHT NOW")
     - a.crumb is >=44px tall; phones never scroll sideways
   ========================================================================== */
:root {
  /* deep-space cybernetic dark — the default */
  --bg: #040b10;
  --bg-2: #02070a;
  --surface: rgba(8, 19, 27, 0.82);
  --surface-solid: #08131b;
  --surface-2: rgba(10, 26, 36, 0.72);
  --ink: #e8f8f5;
  --ink-2: #9fb7be;
  --ink-3: #6b858f;
  --line: rgba(0, 245, 212, 0.22);
  --line-2: rgba(0, 245, 212, 0.10);
  --accent: #00f5d4;
  --accent-ink: #012019;
  --accent-soft: rgba(0, 245, 212, 0.12);
  --violet: #a78bfa;
  --amber: #fbbf24;
  --coral: #fb7185;
  --ok: #2ee6a6;
  --ok-soft: rgba(46, 230, 166, 0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, 0.15);
  --on-seal: #04121a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px var(--line), 0 0 24px rgba(0, 245, 212, 0.06);
  --font: system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --r: 14px;
  --r-s: 9px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef3f4;
  --bg-2: #e4ecec;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f2f7f7;
  --ink: #0a1618;
  --ink-2: #425256;
  --ink-3: #6a7d82;
  --line: rgba(3, 120, 110, 0.24);
  --line-2: #dde8e8;
  --accent: #067b6e;
  --accent-ink: #ffffff;
  --accent-soft: #d4f3ee;
  --violet: #6d4fd6;
  --amber: #8a5a00;
  --coral: #c23b4b;
  --ok: #0f8a57;
  --ok-soft: #dcf3e8;
  --warn: #8a5a00;
  --warn-soft: #fbeccb;
  --bad: #c23b4b;
  --bad-soft: #fbe0e3;
  --on-seal: #ffffff;
  --shadow: 0 1px 2px rgba(20, 26, 38, .06), 0 6px 18px rgba(20, 26, 38, .06);
  --glow: 0 0 0 1px var(--line), 0 1px 2px rgba(20,26,38,.05);
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(0, 245, 212, 0.07), transparent 60%),
    radial-gradient(900px 520px at 8% 4%, rgba(167, 139, 250, 0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 1.05rem; line-height: 1.3; letter-spacing: -.005em; text-wrap: balance; }
h3 { font-size: .95rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
code, .mono, .tnum { font-family: var(--mono); font-size: .86em; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: 40px 16px; color: var(--ink-2); text-align: center; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .85rem; }
.wrap-any { overflow-wrap: anywhere; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.side { display: none; }
.main { min-width: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.topbar .brand-sm { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); }
.topbar .brand-sm:hover { text-decoration: none; }
.topbar .spacer { flex: 1; }
.page {
  width: 100%; max-width: 1060px; margin: 0 auto;
  padding: 18px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 18px;
  animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(5px); opacity: .6; } to { transform: none; opacity: 1; } }

.live { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.live .t { margin-left: -4px; }
@media (max-width: 520px) { .live .t { display: none; } }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.live.off .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--ink-2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(0,245,212,.14); }

/* phone bottom bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px; min-height: 52px; border-radius: 10px;
  color: var(--ink-3); font-size: .72rem; font-weight: 600;
}
.tabbar a:hover { text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.tabbar svg { width: 22px; height: 22px; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .shell { grid-template-columns: 272px 1fr; }
  .side {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 22px 14px 18px; background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
    border-right: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .main { padding-bottom: 0; }
  .tabbar { display: none; }
  .topbar .brand-sm { display: none; }
  .page { padding-top: 26px; }
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 750; font-size: 1.1rem; color: var(--ink); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 14px rgba(0,245,212,.3); }
.side-title { margin: 14px 10px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; border: 1px solid transparent;
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); border-color: var(--line); }
.nav-link .nm { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link .badge { font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 0; border-top: 1px solid var(--line-2); }

/* ---------- building blocks ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow); min-width: 0;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card > * + * { margin-top: 10px; }
.card.stack > * + * { margin-top: 0; }
.card.flat { box-shadow: none; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.card.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.card.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-h h2 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; min-width: 0; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .grid.cols-auto { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); } }
.hint { color: var(--ink-2); font-size: .9rem; max-width: 68ch; }
.sub { color: var(--ink-2); }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.top { align-items: flex-start; }
.row .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: .78rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.neutral { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

.seal { flex: none; display: block; filter: drop-shadow(0 0 5px color-mix(in srgb, currentColor 40%, transparent)); }
.seal.ok { color: var(--ok); }
.seal.warn { color: var(--warn); }
.seal.bad { color: var(--bad); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 650;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 0 16px rgba(0,245,212,.25); }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: .82rem; border-radius: 8px; }
.btn.ghost { background: transparent; }

/* trust bar */
.trust { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line-2); gap: 2px; }
.trust i { display: block; min-width: 4px; }
.trust .t-ok { background: var(--ok); box-shadow: 0 0 10px color-mix(in srgb, var(--ok) 60%, transparent); }
.trust .t-warn { background: var(--warn); }
.trust .t-bad { background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--ink-2); }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

/* project card on Home */
.pcard { display: block; color: inherit; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.pcard:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow), 0 0 22px rgba(0,245,212,.12); }
.pcard h2 { font-size: 1.15rem; }
.kvs { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .kvs.two { grid-template-columns: 1fr 1fr; } }
.kv .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-3); }
.kv .v { color: var(--ink); overflow-wrap: anywhere; }
.need { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink); min-width: 0; border: 1px solid var(--line-2); }
a.need:hover { text-decoration: none; background: var(--accent-soft); border-color: var(--line); }
.need .tx { min-width: 0; }
.need .tt { font-weight: 650; font-size: .92rem; }
.need .dd { color: var(--ink-2); font-size: .88rem; overflow-wrap: anywhere; }
.bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.bar.warn { background: var(--warn); } .bar.bad { background: var(--bad); }

/* project header + tabs */
.ph { display: flex; flex-direction: column; gap: 8px; }
.crumb { font-size: .85rem; color: var(--ink-2); font-weight: 600; }
a.crumb { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0 -8px; }
.ph-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 10;
  margin: 0 -4px; padding: 6px 4px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: 10px; color: var(--ink-2); font-weight: 650; border: 1px solid transparent;
}
.tabs a:hover { background: var(--surface); text-decoration: none; color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--accent); border-color: var(--line); box-shadow: var(--glow); }
.tabs .n { font-size: .72rem; font-weight: 800; padding: 0 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); line-height: 18px; font-variant-numeric: tabular-nums; }
.tabs .n.warn { background: var(--warn-soft); color: var(--warn); }
.tabs .n.bad { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 899px) {
  .tabs:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); }
}
@media (min-width: 900px) { .tabs { top: 0; } }

/* search */
.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit;
}
.search input::placeholder { color: var(--ink-3); }
mark { background: var(--warn-soft); color: var(--ink); border-radius: 4px; padding: 0 2px; }

/* lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
}
a.item:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 16px rgba(0,245,212,.1); }
.item .tx { flex: 1; min-width: 0; }
.item .tt { font-weight: 600; overflow-wrap: anywhere; }
.item .meta { color: var(--ink-3); font-size: .82rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.chev { color: var(--ink-3); flex: none; align-self: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 650; font-size: .88rem;
}
.chip:hover { text-decoration: none; border-color: var(--accent); color: var(--ink); }
.chip[aria-current="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.chip b { font-variant-numeric: tabular-nums; }
.empty { padding: 22px 16px; text-align: center; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; }

/* command blocks */
.cmd { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); min-width: 0; }
.cmd-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--line-2); font-weight: 650; font-size: .88rem; }
.cmd code { display: block; padding: 10px 12px; overflow-x: auto; white-space: pre; color: var(--accent); }
.cmd .hint { padding: 0 12px 10px; }
pre.block {
  margin: 0; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: .84rem/1.5 var(--mono); color: var(--ink);
}
details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 650; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; font-size: 1.2rem; color: var(--ink-3); }
details[open] > summary::after { content: "–"; }
details > .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }

/* claim detail */
.big-seal { display: flex; align-items: center; gap: 14px; }
.facts { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.fact { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 11px 14px; border-top: 1px solid var(--line-2); min-width: 0; }
.fact:first-child { border-top: 0; }
.fact .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-3); }
.fact .v { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .fact { grid-template-columns: 190px 1fr; gap: 14px; align-items: baseline; } }

/* tasks / jobs board */
.board { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.col > h3 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--ink-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); border-top: 0; background: var(--surface-2); }
td.path { font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; }
td { font-variant-numeric: tabular-nums; }

.stat { text-align: left; }
.stat .num { font-size: 1.9rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--accent); }
.stat .lbl { color: var(--ink-2); font-size: .85rem; }

/* help */
.term { display: flex; gap: 12px; align-items: flex-start; }
.term .tx { min-width: 0; }
.term b { display: block; }

/* ==========================================================================
   O.D.I.N. HUD — command deck, neural core, telemetry
   ========================================================================== */
.hud {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px;
  background:
    radial-gradient(900px 300px at 50% -40%, rgba(0,245,212,.10), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 18px;
  display: grid; gap: 16px; grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 760px) { .hud { grid-template-columns: 260px 1fr; gap: 24px; padding: 22px 26px; } }
.hud::before {   /* faint scan-grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 34px 34px; -webkit-mask-image: radial-gradient(70% 70% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(70% 70% at 50% 0%, #000, transparent 75%);
}
.hud > * { position: relative; }

/* The hero frame is the image's OWN aspect ratio, so odin.png fills it edge-to-edge:
   no letterbox gap, no crop/zoom, no repeated pattern. Its near-black starfield reaches the frame. */
.odin-core { justify-self: center; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.odin-hero {
  position: relative; width: 100%; max-width: 320px; aspect-ratio: 896 / 1200; border-radius: 18px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: 0 0 0 1px var(--line), 0 14px 44px rgba(0,0,0,.5), 0 0 46px rgba(0,245,212,.14);
  animation: heroGlow 7s ease-in-out infinite;
}
@media (min-width: 760px) { .odin-hero { max-width: 240px; } }
.odin-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 2; }
.odin-hero .scan { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(180deg, transparent 58%, rgba(2,7,10,.5)); }
.odin-hero .corner { position: absolute; width: 18px; height: 18px; z-index: 4; border: 2px solid var(--accent); opacity: .65; }
.odin-hero .corner.tl { top: 9px; left: 9px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.odin-hero .corner.tr { top: 9px; right: 9px; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.odin-hero .corner.bl { bottom: 9px; left: 9px; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.odin-hero .corner.br { bottom: 9px; right: 9px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }
.odin-emblem { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 130px; height: 130px; z-index: 1; color: var(--accent); filter: drop-shadow(0 0 16px rgba(0,245,212,.4)); }
.cat-pill .cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
@keyframes heroGlow { 0%,100% { box-shadow: 0 0 0 1px var(--line), 0 14px 44px rgba(0,0,0,.5), 0 0 40px rgba(0,245,212,.10); } 50% { box-shadow: 0 0 0 1px var(--line), 0 14px 44px rgba(0,0,0,.5), 0 0 56px rgba(0,245,212,.2); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }

.odin-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.odin-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.odin-title { font-size: 1.5rem; font-weight: 800; letter-spacing: .12em; margin: 0; color: var(--ink); }
.odin-title b { color: var(--accent); }
.odin-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.odin-status .d { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.odin-status.active { color: var(--accent); border-color: var(--accent); }
.odin-status.active .d { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.odin-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border: 1px dashed var(--line); }

.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .8rem; letter-spacing: .04em;
}
.cat-pill:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); box-shadow: 0 0 14px rgba(0,245,212,.12); }
.cat-pill .ic { color: var(--accent); display: inline-flex; }

/* voice / command deck */
.voice { display: flex; flex-direction: column; gap: 10px; }
.voice-row { display: flex; gap: 8px; align-items: stretch; }
.mic-btn {
  flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--accent);
}
.mic-btn:hover { border-color: var(--accent); box-shadow: 0 0 16px rgba(0,245,212,.2); }
.mic-btn.listening { color: var(--accent-ink); background: var(--accent); animation: pulse 1.3s ease-in-out infinite; }
.voice input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit;
}
.voice input::placeholder { color: var(--ink-3); }
/* narrow phones: wrap the command row so the input keeps full width + placeholder */
@media (max-width: 640px) {
  .voice-row { flex-wrap: wrap; }
  .voice-row input { order: -1; flex: 1 1 100%; width: 100%; }
  .voice-row .mic-btn { flex: 0 0 auto; }
  .voice-row .btn { flex: 1 1 auto; }
}
.odin-draft { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.odin-draft .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; }
.odin-draft code { color: var(--accent); overflow-x: auto; white-space: pre; display: block; }
.odin-heard { font-size: .82rem; color: var(--ink-2); }
.odin-heard b { color: var(--ink); }

/* cost telemetry */
.cost-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .cost-grid { grid-template-columns: repeat(4, 1fr); } }
.cost-cell { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.cost-cell .v { font-size: 1.5rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.cost-cell .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin-top: 2px; }
.cost-cell .amt { font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cost-cell.good .v { color: var(--ok); } .cost-cell.waste .v { color: var(--coral); } .cost-cell.avoid .v { color: var(--violet); } .cost-cell.flow .v { color: var(--accent); }
.cost-strip { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-variant-numeric: tabular-nums; }
.cost-strip .seg { display: inline-flex; align-items: baseline; gap: 6px; font-size: .9rem; }
.cost-strip .seg b { font-size: 1.05rem; }
.cost-strip .g { color: var(--ok); } .cost-strip .w { color: var(--coral); } .cost-strip .a { color: var(--violet); } .cost-strip .f { color: var(--accent); }

/* project badge for the global jobs view */
.pbadge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line); }

/* M6 — O.D.I.N. branding subtitle, command builders, turn/freeze indicators */
.odin-sub { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 2px 0 8px; }
.builder-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chips.small .chip { font-size: .7rem; padding: 2px 8px; }
.chip.frozen { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); font-weight: 800; }
.chip.turnchip { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line); }
.freeze-alert { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); border: 1px solid var(--bad); color: var(--bad); font-size: .9rem; }
.freeze-alert code { background: transparent; color: inherit; font-weight: 700; }
.builder-ov { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(2, 7, 10, .62); backdrop-filter: blur(3px); overflow-y: auto; }
.builder-card { width: 100%; max-width: 560px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--glow); }
.builder-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.builder-h b { font-size: 1.05rem; }
.builder-form { display: grid; gap: 10px; margin: 12px 0; }
.builder-form label { display: grid; gap: 4px; font-size: .78rem; color: var(--ink-2); font-weight: 600; }
.builder-form input { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font-size: .92rem; }
.builder-form input:focus-visible { border-color: var(--accent); }

/* M7 — Live Screens view-only monitor panel */
.ls-card { padding: 12px; }
.ls-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ls-pills { flex: 1 1 auto; }
.ls-pill { display: inline-flex; align-items: center; gap: 6px; }
.ls-pill.on { background: var(--accent-soft); color: var(--accent); border-color: var(--line); }
.lsdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lsdot.ok { background: var(--ok); box-shadow: 0 0 7px var(--ok); }
.lsdot.off { background: var(--bad); }
.ls-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.ls-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #02070a; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ls-stage.off { border-style: dashed; }
.ls-img { width: 100%; height: 100%; object-fit: contain; display: block; background: #02070a; }
.ls-img:fullscreen, .ls-stage:fullscreen { width: 100vw; height: 100vh; }
.ls-stage:fullscreen { aspect-ratio: auto; border: 0; border-radius: 0; }
.ls-msg { text-align: center; color: var(--ink-2); font-weight: 700; letter-spacing: .06em; font-size: .95rem; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
