/* ═══════════════════════════════════════════════════════════════════════
   Bittensor Intelligence console — "amber ops room"
   Warm graphite surfaces, phosphor-amber accent, dark command rail.
   Display: Bricolage Grotesque · Body: Instrument Sans · Data: IBM Plex Mono
   Green/red are reserved for evidence verdicts; amber is the brand voice.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  /* dark ops theme (default) */
  --bg: #161513;
  --surface: #1d1c19;
  --surface-2: #232220;
  --raised: #2a2926;
  --line: #2e2c27;
  --line-strong: #403d35;
  --rail: #100f0d;
  --rail-line: #262420;
  --text: #ece9df;
  --text-soft: #c8c4b6;
  --muted: #98937f;
  --accent: #f0a33f;
  --accent-strong: #ffbd63;
  --accent-dim: rgba(240, 163, 63, 0.13);
  --accent-line: rgba(240, 163, 63, 0.36);
  --on-accent: #221604;
  --green: #6cc596;
  --green-dim: rgba(108, 197, 150, 0.12);
  --red: #e97f70;
  --red-dim: rgba(233, 127, 112, 0.12);
  --amber: #e0b34a;
  --amber-dim: rgba(224, 179, 74, 0.13);
  --cyan: #74bccf;
  --cyan-dim: rgba(116, 188, 207, 0.12);
  --violet: #ab93f5;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.3);
  --radius: 10px;
  --radius-lg: 14px;
  --display: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  --body-font: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* legacy aliases still referenced by view templates */
  --ink: var(--text);
  --ink-soft: var(--text-soft);
  --paper: var(--bg);
  --panel: var(--surface);
  --side: var(--rail);
  --accent-fill: var(--accent-dim);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f2ee;
  --surface: #fdfcfa;
  --surface-2: #f0eee8;
  --raised: #ffffff;
  --line: #e3e0d7;
  --line-strong: #cdc9bc;
  --rail: #161513;
  --rail-line: #2b2925;
  --text: #24211b;
  --text-soft: #4b473d;
  --muted: #837d6c;
  --accent: #b46a0c;
  --accent-strong: #935607;
  --accent-dim: rgba(180, 106, 12, 0.1);
  --accent-line: rgba(180, 106, 12, 0.35);
  --on-accent: #fff8ec;
  --green: #25824e;
  --green-dim: rgba(37, 130, 78, 0.1);
  --red: #bf4a3a;
  --red-dim: rgba(191, 74, 58, 0.09);
  --amber: #9a6d08;
  --amber-dim: rgba(154, 109, 8, 0.12);
  --cyan: #14727f;
  --cyan-dim: rgba(20, 114, 127, 0.1);
  --violet: #6d4fd1;
  --shadow: 0 14px 40px rgba(45, 40, 28, 0.14);
  --shadow-soft: 0 4px 16px rgba(45, 40, 28, 0.08);
  color-scheme: light;
}

/* ── reset / base ── */
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--body-font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; }
button { font-family: inherit; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── type roles ── */
h1, h2, h3, .display { font-family: var(--display); }
.view h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; margin-bottom: 6px; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 28px 0 12px; }
h3 { font-weight: 650; }
.eyebrow {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 14px; height: 1px; background: var(--accent); flex: none; }
.sub { color: var(--muted); font-size: 13px; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ── shell ── */
.shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { padding: 30px 36px 90px; width: 100%; max-width: 1560px; }

/* ── command rail (sidebar) — dark in both themes ── */
.side {
  width: 240px; flex: none;
  background: var(--rail);
  border-right: 1px solid var(--rail-line);
  padding: 18px 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 16px;
  color: #edeadf;
}
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 500; font-size: 14.5px; letter-spacing: 0.01em; color: #b5b0a0; }
.brand-name strong { font-weight: 750; color: #f2efe6; }
.logo-mark {
  width: 26px; height: 26px; flex: none; border-radius: 7px;
  background: #f0a33f; color: #221604;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 1px rgba(240, 163, 63, 0.5), 0 2px 10px rgba(240, 163, 63, 0.25);
}

.side nav { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 1px; overflow-y: auto; padding: 0 2px 8px; }
.nav-group {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: #918b7c;
  padding: 18px 10px 7px;
}
.side nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 10px; border-radius: 8px;
  color: #aaa596; font-weight: 500; font-size: 13.5px;
  position: relative;
  transition: color 0.13s, background 0.13s;
}
.side nav a svg {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; opacity: 0.8;
}
.side nav a:hover { background: rgba(255, 255, 255, 0.05); color: #e8e4d8; text-decoration: none; }
.side nav a.active { background: rgba(240, 163, 63, 0.1); color: #ffbd63; font-weight: 600; }
.side nav a.active svg { opacity: 1; }
.side nav a.active::before {
  content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 2.5px;
  border-radius: 2px; background: #f0a33f;
}
.nav-tag {
  margin-left: auto; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(240, 163, 63, 0.14); color: #f0a33f;
  border: 1px solid rgba(240, 163, 63, 0.3);
}

.side-foot { margin-top: auto; padding: 10px 4px 2px; border-top: 1px solid var(--rail-line); position: relative; }
.side-account {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; border-radius: 8px; padding: 8px;
  color: #d8d4c6; cursor: pointer; text-align: left; font: inherit;
}
.side-account:hover { background: rgba(255, 255, 255, 0.05); }
.side-account-copy { display: grid; min-width: 0; flex: 1; }
.side-account-copy small { color: #918b7c; font-size: 10.5px; }
.side-account-more { color: #918b7c; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: #f0a33f; color: #221604;
  font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.whoami { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-menu {
  position: absolute; bottom: calc(100% + 8px); left: 6px; right: 6px; z-index: 60;
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: grid; gap: 1px;
}
.account-menu.hidden { display: none; }
.account-menu.side-origin { position: static; margin-top: 8px; box-shadow: none; border-color: var(--rail-line); background: rgba(255, 255, 255, 0.04); }
.account-menu.side-origin a, .account-menu.side-origin button { color: #b5b0a0; }
.account-menu.side-origin a:hover, .account-menu.side-origin button:hover { background: rgba(255, 255, 255, 0.06); color: #ece9df; }
.account-menu.side-origin .account-menu-head { border-color: var(--rail-line); color: #ece9df; }
.account-menu.side-origin button#lockbtn { color: var(--red); }
.account-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: grid; }
.account-menu-head small { color: var(--muted); font-size: 10.5px; }
.account-menu a, .account-menu button {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 7px;
  color: var(--text-soft); font-size: 13px; background: none; border: 0; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.account-menu button#lockbtn { color: var(--red); }

/* ── topbar ── */
.topbar {
  height: 58px; flex: none; position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px;
}
.topbar-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-context { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.breadcrumb { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; }
.topbar h1 { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text-soft);
  font-size: 15px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.menu-toggle { display: none; }

.annotate-top {
  display: inline-flex; align-items: center; gap: 6px; height: 34px;
  padding: 0 13px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text-soft); font-size: 12.5px; font-weight: 550;
  cursor: pointer;
}
.annotate-top:hover { border-color: var(--accent-line); color: var(--accent); }

.live-status {
  display: inline-flex; align-items: center; gap: 7px; height: 34px;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.live-status:hover { text-decoration: none; border-color: var(--line-strong); color: var(--text-soft); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.live-status.ok .status-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.live-status.warn .status-dot { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
.live-status.err .status-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
.account-toggle { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.account-toggle .avatar { width: 32px; height: 32px; }

/* global search */
.global-search {
  position: relative; flex: 1; max-width: 460px;
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.global-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.global-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.global-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 13px;
}
.global-search input::placeholder { color: var(--muted); }
.global-search kbd {
  font-family: var(--mono); font-size: 9.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; background: var(--surface-2);
}
.global-suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; max-height: 380px; overflow-y: auto;
}
.global-suggestion-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 7px 10px 4px;
}
.global-person-suggestion, .global-ask-suggestion {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 7px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.global-person-suggestion:hover, .global-person-suggestion.hover,
.global-ask-suggestion:hover, .global-ask-suggestion.hover { background: var(--surface-2); }
.global-suggestion-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--surface-2); color: var(--muted);
  display: grid; place-items: center; font-size: 11px; font-weight: 650;
}
.global-suggestion-avatar img { width: 100%; height: 100%; object-fit: cover; }
.global-person-suggestion small { color: var(--muted); margin-left: auto; font-family: var(--mono); font-size: 10px; }
.global-ask-suggestion { border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: 4px; color: var(--accent); }
.global-ask-suggestion kbd { margin-left: auto; font-family: var(--mono); font-size: 9.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
.global-suggestion-empty { padding: 12px 10px; color: var(--muted); font-size: 12.5px; }

/* ── login gate ── */
.keygate {
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(240, 163, 63, 0.09), transparent 60%),
    radial-gradient(700px 700px at -8% 108%, rgba(240, 163, 63, 0.05), transparent 55%),
    #12110f;
  display: grid; place-items: center; padding: 24px;
}
.keygate.hidden { display: none; }
.login-main { position: relative; width: min(400px, 100%); }
.login-scan {
  position: absolute; inset: -80px -60px; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(240, 163, 63, 0.016) 5px 6px);
  mask-image: radial-gradient(closest-side, #000, transparent);
}
.keycard {
  position: relative;
  background: #1b1a17; border: 1px solid #34322b; border-radius: 16px;
  padding: 30px 30px 26px; display: grid; gap: 9px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  color: #ece9df;
}
.keycard::before {
  content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: 2px;
  background: linear-gradient(90deg, transparent, #f0a33f, transparent);
  opacity: 0.75;
}
.login-brand { padding: 0 0 14px; }
.login-head { display: grid; gap: 2px; padding-bottom: 8px; }
.login-head .eyebrow { margin-bottom: 6px; color: #f0a33f; }
.login-head .eyebrow::before { background: #f0a33f; }
.keycard h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.keycard p { color: #98937f; font-size: 13px; margin-bottom: 6px; }
.keycard label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #98937f; margin-top: 6px; }
.keycard input {
  border: 1px solid #34322b; border-radius: 9px; background: #12110f;
  color: #ece9df; font: inherit; font-size: 14px; padding: 11px 13px;
}
.keycard input:focus { outline: none; border-color: rgba(240, 163, 63, 0.5); box-shadow: 0 0 0 3px rgba(240, 163, 63, 0.12); }
.keycard button[type="submit"] {
  margin-top: 14px; border: 0; border-radius: 9px; cursor: pointer;
  background: #f0a33f; color: #221604;
  font: inherit; font-weight: 700; font-size: 14px; padding: 12px;
  transition: background 0.13s;
}
.keycard button[type="submit"]:hover { background: #ffbd63; }
.keyerror { color: #e97f70; font-size: 12.5px; min-height: 1.2em; }
.back-landing { margin-top: 8px; color: #98937f; font-size: 12.5px; justify-self: start; }
.back-landing:hover { color: #ece9df; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 650; font-size: 13px;
  transition: background 0.13s, border-color 0.13s;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; }
.btn.outline {
  background: var(--surface); color: var(--text); border-color: var(--line-strong);
}
.btn.outline:hover { border-color: var(--accent-line); color: var(--accent); background: var(--surface); }
.btn:disabled { opacity: 0.45; cursor: default; }
.danger-btn {
  border: 1px solid var(--red-dim); border-radius: 8px; background: transparent;
  color: var(--red); font: inherit; font-size: 12px; font-weight: 550;
  padding: 6px 11px; cursor: pointer;
}
.danger-btn:hover { background: var(--red-dim); }

/* ── page furniture ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head-copy { max-width: 760px; }
.page-head-copy .sub, .page-head .sub { margin-top: 4px; }
.directory-total { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.05em; }

/* ── cards / grids ── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

/* stat chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 15px; min-width: 118px;
}
.chip .k { font-family: var(--mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.09em; }
.chip .v { font-family: var(--mono); font-size: 18px; font-weight: 600; margin-top: 4px; color: var(--text); }

/* metric tiles */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 4px 0 20px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 15px 17px; }
.metric-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.metric-value { font-family: var(--mono); font-size: 23px; font-weight: 600; margin-top: 5px; letter-spacing: -0.01em; }
.metric-note { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

/* data panels */
.data-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.data-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.data-panel-head h2 { margin: 0; font-size: 14.5px; }
.data-panel-head .sub { margin: 0; }
.data-panel > table { border: 0; border-radius: 0; }
.data-panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-panel table th {
  text-align: left; font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.09em;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
}
.data-panel table td { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.data-panel table tbody tr:last-child td { border-bottom: 0; }
.data-panel table code { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }

/* dark data inset (terminal card) */
.inset {
  background: #12110f; color: #d9d5c8; border: 1px solid #2b2924;
  border-radius: var(--radius-lg); padding: 16px 18px;
  font-family: var(--mono); font-size: 12.5px;
}
:root[data-theme="light"] .inset { background: #1b1a17; border-color: #1b1a17; }
.inset .pos { color: #7ddba4; }
.inset .neg { color: #f79384; }
.inset table { width: 100%; border-collapse: collapse; }
.inset td, .inset th { padding: 7px 8px; text-align: right; font-weight: 400; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.inset tr:last-child td { border-bottom: 0; }
.inset td:first-child, .inset th:first-child { text-align: left; }
.inset th { color: #8a8574; font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em; }
.inset a { color: #f0a33f; }

/* ── tables ── */
.table-scroll { overflow-x: auto; }
table.plain {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
table.plain th {
  text-align: left; font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.09em;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
table.plain td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.plain tr:last-child td { border-bottom: 0; }
table.plain tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.num { font-family: var(--mono); text-align: right; font-size: 12.5px; }
th.num { text-align: right; }

.st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.st.success, .st.ok { background: var(--green); }
.st.failed, .st.error { background: var(--red); }
.st.running { background: var(--amber); animation: st-pulse 1.4s ease-in-out infinite; }
@keyframes st-pulse { 50% { opacity: 0.45; } }

/* ── badges / pills / stamps ── */
.badge {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; padding: 2.5px 8px;
  border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.badge.exploit, .badge.drama { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-dim); }
.badge.launch, .badge.product_release { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-dim); }
.badge.governance, .badge.team_change { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: var(--amber-dim); }
.badge.price_move { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); background: var(--cyan-dim); }
.badge.milestone { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.badge.confirmed { background: var(--text); color: var(--bg); border-color: var(--text); }

.score-pill, .state-pill, .confidence-score {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line-strong);
  color: var(--text-soft); background: var(--surface-2);
}
.score-pill.strong { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-dim); }
.score-pill.usable { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: var(--amber-dim); }
.score-pill.thin, .score-pill.empty { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-dim); }
.state-pill { text-transform: uppercase; letter-spacing: 0.06em; font-size: 9.5px; }
.state-pill.active { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-dim); }
.state-pill.pending { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: var(--amber-dim); }
.state-pill.revoked, .state-pill.expired { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-dim); }

/* verdict stamps (verified / contradicted) */
.vmark {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 4px; margin-left: 6px;
  border: 1.5px solid currentColor;
}
.vmark.verified { color: var(--green); background: var(--green-dim); }
.vmark.contradicted { color: var(--red); background: var(--red-dim); }

/* ── inputs / filters ── */
.search {
  width: 100%; max-width: 400px; padding: 10px 14px; font: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text); margin: 4px 0 16px;
}
.search::placeholder { color: var(--muted); }
.search:focus { border-color: var(--accent-line); outline: none; box-shadow: 0 0 0 3px var(--accent-dim); }
select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
}
.pill-row { display: flex; gap: 7px; margin: 14px 0 20px; flex-wrap: wrap; }
.pill {
  font-family: var(--mono); font-size: 11px; padding: 6px 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--muted);
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.pill:hover { color: var(--text); border-color: var(--line-strong); }
.pill.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

/* ── states: loading / empty / error ── */
.loading { color: var(--muted); padding: 40px 0; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.loading span {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state, .error-state {
  padding: 44px 24px; text-align: center; color: var(--muted); font-size: 13px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface);
}
.error-state { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.list-footer { display: flex; align-items: center; gap: 12px; padding: 16px 2px; color: var(--muted); font-size: 12.5px; }

/* skeletons */
.skeleton-page { display: grid; gap: 12px; max-width: 980px; }
.skeleton-line, .skeleton-card, .skeleton-panel {
  border-radius: 8px;
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  border: 1px solid var(--line);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-line { height: 13px; }
.skeleton-line.eyebrow-line { width: 140px; height: 10px; }
.skeleton-line.title-line { width: 320px; height: 30px; }
.skeleton-line.copy-line { width: 62%; }
.skeleton-line.panel-head-line { width: 200px; height: 16px; margin-top: 16px; }
.skeleton-line.row-line { height: 38px; }
.skeleton-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0; }
.skeleton-card { height: 84px; }
.skeleton-panel { height: 260px; margin-top: 8px; }

/* toasts */
.toast-region { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; }
.toast {
  background: var(--raised); color: var(--text);
  border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  border-radius: 9px; padding: 11px 18px; font-size: 13px;
  box-shadow: var(--shadow); animation: toast-in 0.18s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── axiom floating widget ── */
.axiom-widget {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 50px; height: 50px; border-radius: 16px;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center;
  box-shadow: 0 8px 28px rgba(240, 163, 63, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.axiom-widget svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.axiom-widget:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 12px 34px rgba(240, 163, 63, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3); }
.axiom-widget.hidden, .axiom-widget[hidden] { display: none; }

/* ── charts ── */
.chart-panel { background: #12110f; border: 1px solid #2b2924; border-radius: var(--radius-lg); padding: 14px; }
:root[data-theme="light"] .chart-panel { background: #1b1a17; border-color: #1b1a17; }
.chart-panel .chart-cap, .chart-cap {
  font-family: var(--mono); font-size: 10px; color: #8a8574;
  display: flex; justify-content: space-between; margin-bottom: 8px;
  letter-spacing: 0.07em; text-transform: uppercase;
}
.chart-panel svg { display: block; width: 100%; }

/* quality warning banner */
.quality-warning {
  border: 1px solid color-mix(in srgb, var(--amber) 38%, transparent);
  background: var(--amber-dim); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: var(--text-soft);
}
.quality-warning summary { cursor: pointer; color: var(--amber); font-weight: 600; }

/* ── responsive shell ── */
.mobile-scrim { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.18s; }
@media (max-width: 900px) {
  .side { position: fixed; z-index: 100; left: 0; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow); }
  body.nav-open .side { transform: translateX(0); }
  body.nav-open .mobile-scrim { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: grid; }
  .view { padding: 20px 18px 80px; }
  .topbar { padding: 0 16px; }
  .global-search { max-width: none; }
  .global-search kbd, .annotate-label, .live-copy { display: none; }
  .annotate-top { width: 34px; padding: 0; justify-content: center; }
}

/* responsive table collapse */
@media (max-width: 760px) {
  table.responsive-table thead { display: none; }
  table.responsive-table, table.responsive-table tbody, table.responsive-table tr, table.responsive-table td { display: block; width: 100%; }
  table.responsive-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.responsive-table td { border: 0; padding: 5px 14px; }
  table.responsive-table td[data-label]::before {
    content: attr(data-label);
    display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
  }
  .num { text-align: left; }
}

/* ═══════════════════════════════════════════════════════════════════════
   OVERVIEW (digest)
   ═══════════════════════════════════════════════════════════════════════ */
.overview-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.overview-hero h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 750; letter-spacing: -0.03em; max-width: 640px; }
.overview-hero .sub { font-size: 14px; margin-top: 6px; }
.overview-health {
  display: grid; grid-template-columns: 1fr 1fr; flex: none;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden;
}
.overview-health a { display: grid; gap: 1px; padding: 14px 18px; border-right: 1px solid var(--line); min-width: 150px; }
.overview-health a:last-child { border-right: 0; }
.overview-health a:hover { background: var(--surface-2); text-decoration: none; }
.overview-health span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.overview-health strong { font-family: var(--mono); font-size: 21px; font-weight: 600; }
.overview-health small { color: var(--muted); font-size: 11px; }

.overview-ask {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 18px; margin: 4px 0 20px;
  border: 1px solid var(--accent-line); border-radius: 13px;
  background: linear-gradient(120deg, var(--accent-dim), transparent 55%), var(--surface);
}
.overview-ask > span { color: var(--accent); font-size: 15px; }
.overview-ask input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 14px;
}
.overview-ask input::placeholder { color: var(--muted); }
.overview-ask button {
  border: 0; border-radius: 9px; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 700; font-size: 13px; padding: 10px 18px;
}
.overview-ask button:hover { background: var(--accent-strong); }

.command-strip { display: grid; gap: 10px; margin: 0 0 8px; }
.command-strip-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.command-strip a {
  display: grid; gap: 2px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  transition: border-color 0.13s, transform 0.13s;
}
.command-strip a:hover { border-color: var(--accent-line); text-decoration: none; transform: translateY(-1px); }
.command-strip span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.command-strip strong { font-size: 13.5px; font-weight: 650; }
.command-strip small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 1080px) { .command-strip-four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .command-strip-four { grid-template-columns: 1fr; } .overview-health { width: 100%; } }

/* ═══════════════════════════════════════════════════════════════════════
   ACTIVITY (events timeline)
   ═══════════════════════════════════════════════════════════════════════ */
.timeline { position: relative; margin-top: 10px; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 1.5px;
  background: linear-gradient(var(--accent) 0, var(--line-strong) 120px, var(--line) 85%, transparent);
}
.month-label {
  font-family: var(--mono); font-size: 10.5px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.14em; margin: 26px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.month-label::before { content: ""; width: 7px; height: 1.5px; background: var(--accent); margin-left: -25px; }
.event { position: relative; margin-bottom: 10px; }
.event .dot {
  position: absolute; left: -26px; top: 15px;
  width: var(--dot, 9px); height: var(--dot, 9px);
  margin-left: calc((9px - var(--dot, 9px)) / 2);
  border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--bg);
}
.event.confirmed .dot { background: var(--green); }
.event-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 16px; cursor: pointer;
  transition: border-color 0.13s;
}
.event-card:hover { border-color: var(--line-strong); }
.event.open .event-card { border-color: var(--accent-line); }
.event-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.event-title { font-weight: 600; font-size: 14px; }
.event-sum { font-size: 13px; color: var(--text-soft); margin-top: 5px; line-height: 1.55; }
.event-meta { margin-top: 10px; display: none; }
.event.open .event-meta { display: block; }
.evidence {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  padding: 5px 0 5px 10px; border-left: 2px solid var(--line-strong); margin-top: 4px;
  overflow-wrap: anywhere;
}
.entity-chip {
  font-family: var(--mono); font-size: 10.5px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; margin-right: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESEARCH QUEUE
   ═══════════════════════════════════════════════════════════════════════ */
.bench-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
.bench-table-wrap table.plain td b { font-weight: 600; text-transform: capitalize; }

/* ═══════════════════════════════════════════════════════════════════════
   DATA SOURCES
   ═══════════════════════════════════════════════════════════════════════ */
.source-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  overflow: hidden; margin: 4px 0 18px;
}
.source-summary > div { display: grid; gap: 2px; padding: 15px 18px; border-right: 1px solid var(--line); }
.source-summary > div:last-child { border-right: 0; }
.source-summary span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.source-summary strong { font-family: var(--mono); font-size: 22px; font-weight: 600; }
@media (max-width: 760px) {
  .source-summary { grid-template-columns: 1fr 1fr; }
  .source-summary > div { border-bottom: 1px solid var(--line); }
  .source-summary > div:nth-child(even) { border-right: 0; }
  .source-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
}

.source-health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 12px; }
@media (max-width: 900px) { .source-health-grid { grid-template-columns: 1fr; } }
.source-health-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 17px 18px 14px; overflow: hidden;
}
.source-health-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--green); }
.source-health-card.paused::before { background: var(--amber); }
.source-health-card.issue::before { background: var(--red); }
.source-health-head { display: flex; align-items: flex-start; gap: 12px; }
.source-health-head h2 { margin: 0; font-size: 14.5px; }
.source-health-head p { color: var(--muted); font-size: 12px; margin-top: 1px; }
.source-mark {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  display: grid; place-items: center; font-size: 16px; color: var(--text-soft);
}
.source-mark svg { width: 18px; height: 18px; fill: currentColor; }
.source-mark-github { color: var(--text); }
.source-mark-telegram { color: #4db3e4; }
.source-mark-discord { color: #7a86f8; }
.source-mark-twitter { color: var(--text); }
.source-mark-youtube { color: #f06a5e; }
.source-mark-market { color: var(--accent); }
.source-state {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted);
}
.source-state > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.source-state.healthy { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-dim); }
.source-state.paused { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: var(--amber-dim); }
.source-state.issue { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-dim); }
.source-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.source-metrics > div { display: grid; gap: 1px; min-width: 0; }
.source-metrics span { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.source-metrics strong { font-family: var(--mono); font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-diagnosis {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 12px;
  padding: 9px 11px; border-radius: 8px; background: var(--surface-2);
  font-size: 12px; color: var(--text-soft);
}
.source-diagnosis span { color: var(--green); font-weight: 700; flex: none; }
.source-health-card.paused .source-diagnosis span, .source-health-card.issue .source-diagnosis span { color: var(--amber); }
.source-footnote {
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
  margin-top: 16px; padding: 13px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--muted); font-size: 12px;
}
.source-footnote strong { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }
.source-footnote b { color: var(--text-soft); }

/* ═══════════════════════════════════════════════════════════════════════
   LOGS / OPS
   ═══════════════════════════════════════════════════════════════════════ */
.ops-toolbar { display: flex; gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ops-toolbar input {
  flex: 1; max-width: 360px; padding: 8px 12px; font: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text);
}
.ops-toolbar input:focus { outline: none; border-color: var(--accent-line); }
table.ops-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ops-table th {
  text-align: left; font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.09em; padding: 10px 16px; border-bottom: 1px solid var(--line);
}
table.ops-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ops-table tbody tr:last-child td { border-bottom: 0; }
table.ops-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
table.ops-table td .sub.mono { font-size: 10.5px; margin-top: 2px; }
table.ops-table td.mono span { display: block; font-size: 12px; }
table.ops-table td.mono small { color: var(--muted); font-size: 10.5px; }
.run-status {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted);
}
.run-status.success { color: var(--green); }
.run-status.failed { color: var(--red); }
.run-status.running { color: var(--amber); }
.run-result { max-width: 440px; font-size: 12.5px; color: var(--text-soft); }
.run-result details { margin-top: 4px; }
.run-result summary { cursor: pointer; color: var(--muted); font-size: 11.5px; }
.run-result pre {
  margin-top: 7px; padding: 10px 12px; border-radius: 8px; overflow-x: auto;
  background: #12110f; color: #d9d5c8; border: 1px solid #2b2924;
  font-family: var(--mono); font-size: 11px; line-height: 1.5; max-height: 260px;
}
.list-footer .btn { padding: 7px 13px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════
   SUBNET DIRECTORY
   ═══════════════════════════════════════════════════════════════════════ */
.directory-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 11px; margin-top: 8px; }
.sn-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: var(--text); transition: border-color 0.13s, transform 0.13s;
}
.sn-card:hover { border-color: var(--accent-line); text-decoration: none; transform: translateY(-1px); }
.sn-logo {
  width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--muted);
}
.sn-logo img { width: 100%; height: 100%; object-fit: contain; }
.sn-logo.lg { width: 56px; height: 56px; font-size: 23px; border-radius: 13px; }
.sn-meta { min-width: 0; }
.sn-name { font-weight: 600; font-size: 14px; }
.sn-id { font-family: var(--mono); font-size: 10.5px; color: var(--accent); letter-spacing: 0.04em; }
.sn-desc {
  font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.directory-empty { grid-column: 1 / -1; }

/* ═══════════════════════════════════════════════════════════════════════
   SUBNET DOSSIER (detail)
   ═══════════════════════════════════════════════════════════════════════ */
.subnet-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 10px; }
.subnet-profile-page { display: grid; gap: 16px; }
.subnet-hero-v2 {
  position: relative; display: grid; gap: 17px; overflow: hidden;
  padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.subnet-hero-v2::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--green); }
.subnet-hero-v2.parked::before { background: var(--amber); }
.subnet-hero-v2::after {
  content: ""; position: absolute; top: -110px; right: -70px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim), transparent 66%); pointer-events: none;
}
.subnet-hero-main { display: flex; align-items: center; gap: 15px; min-width: 0; }
.subnet-hero-title { min-width: 0; }
.subnet-status-line {
  display: flex; align-items: center; gap: 9px; margin-bottom: 5px;
  color: var(--muted); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.09em; text-transform: uppercase;
}
.subnet-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px;
  color: var(--green); background: var(--green-dim); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
}
.subnet-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.subnet-status.parked { color: var(--amber); background: var(--amber-dim); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.subnet-hero-title h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); font-weight: 750; letter-spacing: -0.035em; }
.subnet-hero-title p { margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.subnet-hero-summary { max-width: 1000px; color: var(--text-soft); font-size: 14px; line-height: 1.65; }
.subnet-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.subnet-explorer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.subnet-explorer-links > span { margin-right: 3px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; }
.subnet-explorer-links a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 10px 5px 6px;
  border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-2);
  transition: border-color 0.14s, transform 0.14s;
}
.subnet-explorer-links a:hover { border-color: var(--accent-line); transform: translateY(-1px); text-decoration: none; }
.subnet-explorer-links a > b {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  color: var(--accent); background: var(--accent-dim);
  font-family: var(--mono); font-size: 8px; font-weight: 600;
}
.subnet-explorer-links a > strong { font-size: 11.5px; font-weight: 600; }
.subnet-explorer-links a > span { color: var(--muted); font-size: 10px; }
.subnet-owner-ribbon {
  display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 13px; border: 1px solid var(--accent-line); border-radius: 11px;
  background: linear-gradient(100deg, var(--accent-dim), transparent 60%);
  font-size: 12px; color: var(--text-soft);
}
.subnet-owner-ribbon > div { display: flex; flex-wrap: wrap; gap: 8px; }
.subnet-owner-ribbon a {
  display: grid; grid-template-columns: auto auto; gap: 1px 8px; align-items: baseline;
  min-width: 190px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); background: var(--surface);
}
.subnet-owner-ribbon a:hover { border-color: var(--accent-line); text-decoration: none; }
.subnet-owner-ribbon a span { color: var(--muted); font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.07em; }
.subnet-owner-ribbon a strong { font-size: 13px; }
.subnet-owner-ribbon a small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.subnet-hero-foot {
  display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--muted); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase;
}
.subnet-hero-foot span { display: inline-flex; align-items: center; gap: 7px; }
.subnet-hero-foot span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.subnet-kpi-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.subnet-kpi-grid > div { display: grid; gap: 3px; padding: 16px 17px; border-right: 1px solid var(--line); }
.subnet-kpi-grid > div:last-child { border-right: 0; }
.subnet-kpi-grid span { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; }
.subnet-kpi-grid strong { overflow: hidden; font-family: var(--mono); font-size: 19px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.subnet-kpi-grid small { overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }

.subnet-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 340px); gap: 16px; align-items: start; }
.subnet-main-column, .subnet-side-column { display: grid; gap: 16px; min-width: 0; }
.subnet-section, .subnet-side-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.subnet-section { padding: 19px; }
.subnet-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.subnet-section-head h2, .subnet-side-card h2 { margin: 2px 0 0; color: var(--text); font-size: 15px; }
.subnet-section-head > span, .subnet-section-head > a { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.subnet-risk { padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 99px; white-space: nowrap; }
.subnet-risk.medium { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-dim); }
.subnet-risk.high { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-dim); }
.subnet-risk.low { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); background: var(--green-dim); }
.subnet-fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.subnet-fact-grid article { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.subnet-fact-grid article > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.subnet-fact-grid h3, .subnet-community-grid h3, .subnet-community-facts h3 { color: var(--text); font-size: 12.5px; }
.subnet-fact-grid article > div span { flex: none; color: var(--muted); font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.subnet-fact-grid p, .subnet-community-facts p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.subnet-essential-section { padding: 22px; }
.subnet-essential-section .subnet-section-head { margin-bottom: 18px; }
.subnet-essential-section .subnet-section-head h2 { font-size: 21px; letter-spacing: -0.02em; }
.subnet-essential-section .subnet-risk { padding: 6px 11px; font-size: 10px; }
.subnet-essential-section .subnet-fact-grid { gap: 12px; }
.subnet-essential-section .subnet-fact-grid article { padding: 18px; }
.subnet-essential-section .subnet-fact-grid h3 { font-size: 14.5px; }
.subnet-essential-section .subnet-fact-grid article > div span { font-size: 9px; line-height: 1.4; }
.subnet-essential-section .subnet-fact-grid p { margin-top: 10px; color: var(--text-soft); font-size: 13.5px; line-height: 1.65; }
.subnet-price-chart { padding: 14px; border-radius: var(--radius); background: #12110f; border: 1px solid #2b2924; }
.subnet-price-chart .chart-cap { display: flex; justify-content: space-between; margin-bottom: 8px; color: #8a8574; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase; }
.subnet-price-chart svg { display: block; width: 100%; min-height: 180px; }
.subnet-ownership-grid { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(300px, 1.2fr); gap: 10px; margin-top: 9px; }
.subnet-human-ownership {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 18px; border: 1px solid var(--accent-line); border-radius: var(--radius);
  background: linear-gradient(100deg, var(--accent-dim), transparent 65%);
}
.subnet-human-ownership > div { display: grid; gap: 5px; }
.subnet-human-ownership > div strong { font-size: 13px; }
.subnet-human-ownership p { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.65; }
.subnet-owner-card, .subnet-holders { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.subnet-owner-card > code { display: block; margin: 9px 0 18px; overflow: hidden; color: var(--cyan); font-family: var(--mono); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.subnet-owner-note { margin: -8px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.subnet-owner-card > div { display: grid; grid-template-columns: repeat(3, 1fr); }
.subnet-owner-card > div span { display: grid; gap: 2px; padding-right: 7px; }
.subnet-owner-card strong { font-family: var(--mono); font-size: 16px; }
.subnet-owner-card small { color: var(--muted); font-size: 10.5px; }
.subnet-mini-head { display: flex; justify-content: space-between; margin-bottom: 7px; }
.subnet-mini-head strong { font-size: 13px; }
.subnet-mini-head span { color: var(--muted); font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.subnet-holders > div:not(.subnet-mini-head) { display: grid; grid-template-columns: 1fr 68px 82px; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12px; }
.subnet-holders > div > span { display: flex; gap: 7px; color: var(--muted); min-width: 0; }
.subnet-holders > div > span b { color: var(--text); font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.subnet-holders > div > strong, .subnet-holders > div > em { text-align: right; font-family: var(--mono); font-size: 11.5px; font-style: normal; }
.subnet-community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.subnet-community-grid article { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.subnet-community-grid .chip-wrap { margin-top: 9px; }
.subnet-community-facts { display: grid; gap: 8px; margin-top: 9px; }
.subnet-community-facts article { padding: 13px 14px; border-left: 2px solid var(--accent-line); border-radius: 0 8px 8px 0; background: var(--surface-2); }
.subnet-claims-section #claims-slot > h2, .subnet-claims-section #claims-slot > .claim-caveat { display: none; }
.subnet-side-card { padding: 17px; }
.subnet-side-card > p { margin-top: 5px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.subnet-coverage-list { display: grid; margin-top: 12px; }
.subnet-coverage-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.subnet-coverage-list span { display: grid; min-width: 0; }
.subnet-coverage-list b { font-size: 12px; text-transform: capitalize; }
.subnet-coverage-list small { margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.subnet-coverage-list strong { font-family: var(--mono); font-size: 13px; }
.subnet-health-state { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 11px; border-radius: 9px; background: var(--green-dim); }
.subnet-health-state.warning { background: var(--amber-dim); }
.subnet-health-state > span { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; color: var(--green); background: color-mix(in srgb, var(--green) 18%, transparent); }
.subnet-health-state.warning > span { color: var(--amber); background: color-mix(in srgb, var(--amber) 18%, transparent); }
.subnet-health-state > div { display: grid; min-width: 0; }
.subnet-health-state strong { font-size: 12px; }
.subnet-health-state small { color: var(--muted); font-size: 10.5px; }
.subnet-gap-list { display: grid; margin-top: 8px; }
.subnet-gap-list > div { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); }
.subnet-gap-list code { color: var(--amber); font-family: var(--mono); font-size: 10px; text-transform: capitalize; }
.subnet-gap-list span { color: var(--muted); font-size: 11px; }
.subnet-key-people, .subnet-resource-list { display: grid; margin-top: 10px; }
.subnet-key-people a { display: grid; gap: 1px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); }
.subnet-key-people a:hover { text-decoration: none; color: var(--accent); }
.subnet-key-people span { font-size: 12.5px; font-weight: 550; }
.subnet-key-people small { overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.subnet-resource-list a { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); }
.subnet-resource-list a:hover { text-decoration: none; }
.subnet-resource-list a:hover strong { color: var(--accent); }
.subnet-resource-list span { color: var(--muted); font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.subnet-resource-list strong { overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.subnet-resource-list b { color: var(--accent); font-weight: 400; }
.subnet-profile-page > .annotations { margin-top: 4px; }

@media (max-width: 1100px) {
  .subnet-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .subnet-kpi-grid > div { border-bottom: 1px solid var(--line); }
  .subnet-kpi-grid > div:nth-child(3) { border-right: 0; }
  .subnet-kpi-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .subnet-content-grid { grid-template-columns: 1fr; }
  .subnet-side-column { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .subnet-hero-v2 { padding: 18px; }
  .subnet-hero-main { align-items: flex-start; }
  .subnet-hero-actions { display: grid; }
  .subnet-hero-actions .btn { justify-content: center; }
  .subnet-owner-ribbon { grid-template-columns: 1fr; }
  .subnet-owner-ribbon > div { display: grid; }
  .subnet-kpi-grid { grid-template-columns: 1fr 1fr; }
  .subnet-kpi-grid > div, .subnet-kpi-grid > div:nth-child(3) { border-right: 0; border-bottom: 1px solid var(--line); }
  .subnet-kpi-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .subnet-kpi-grid > div:last-child { grid-column: 1 / -1; border: 0; }
  .subnet-fact-grid, .subnet-community-grid, .subnet-ownership-grid, .subnet-side-column { grid-template-columns: 1fr; }
  .subnet-human-ownership { grid-template-columns: 1fr; gap: 10px; }
  .subnet-section { padding: 15px; }
  .subnet-section-head { align-items: flex-start; flex-direction: column; }
  .subnet-price-chart svg { min-height: 140px; }
}

/* owner lock card */
.lock-card { display: flex; gap: 32px; padding: 16px 20px; margin: 6px 0 14px; background: #12110f; border: 1px solid #2b2924; color: #ece9df; border-radius: var(--radius-lg); }
.lock-big { font-family: var(--mono); font-size: 26px; font-weight: 700; }
.lock-big.risk-high { color: #f79384; } .lock-big.risk-medium { color: #ffd97e; } .lock-big.risk-low { color: #7ddba4; }
.lock-k { font-family: var(--mono); font-size: 10px; color: #8a8574; text-transform: uppercase; letter-spacing: 0.08em; }

/* people chips + link rows */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.person-chip {
  font-size: 12px; padding: 5px 11px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}
.person-chip:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.person-chip .sub { font-family: var(--mono); font-size: 10.5px; }
.link-row { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.link-row:last-child { border-bottom: 0; }
.link-row a { word-break: break-all; }
.link-row .sub { margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   PEOPLE DIRECTORY
   ═══════════════════════════════════════════════════════════════════════ */
.people-page-head { margin-bottom: 18px; }
.people-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.people-summary > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px 17px; border-right: 1px solid var(--line); }
.people-summary > div:last-child { border-right: 0; }
.people-summary-icon {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-size: 14px;
}
.people-summary-icon.reviewed { color: var(--green); background: var(--green-dim); }
.people-summary-icon.cross { color: var(--amber); background: var(--amber-dim); }
.people-summary p { display: grid; min-width: 0; }
.people-summary strong { overflow: hidden; font-family: var(--mono); font-size: 20px; font-weight: 600; line-height: 1.15; text-overflow: ellipsis; }
.people-summary small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .people-summary { grid-template-columns: 1fr 1fr; }
  .people-summary > div { border-bottom: 1px solid var(--line); }
  .people-summary > div:nth-child(even) { border-right: 0; }
  .people-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
}
.people-directory-panel { overflow: visible; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.people-toolbar {
  display: grid; grid-template-columns: minmax(230px, 1fr) repeat(3, minmax(130px, auto)) auto;
  gap: 8px; padding: 13px; border-bottom: 1px solid var(--line);
}
.people-search-wrap {
  display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
}
.people-search-wrap:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.people-search-wrap > span { color: var(--muted); font-size: 14px; }
.people-search-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.people-search-wrap input::placeholder { color: var(--muted); }
.people-search-wrap kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface-2); font-family: var(--mono); font-size: 9px; }
.people-toolbar select { min-height: 38px; padding: 8px 28px 8px 10px; font-size: 12.5px; background: var(--bg); }
.people-view-toggle { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.people-view-toggle button { width: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.people-view-toggle button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.people-results-bar {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line);
  color: var(--muted); background: var(--surface-2); font-size: 11.5px;
}
.people-results-bar strong { color: var(--text); font-family: var(--mono); font-size: 11.5px; }
.people-results-bar span { margin-left: auto; }
.people-results-bar button { border: 0; background: transparent; color: var(--red); font-size: 11.5px; cursor: pointer; }
.people-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 10px; padding: 12px; }
.people-card {
  display: block; min-width: 0; padding: 15px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text);
  transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s;
}
.people-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-soft); text-decoration: none; transform: translateY(-1px); }
.people-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.people-avatar {
  display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--raised); color: var(--accent); font-size: 16px; font-weight: 700;
}
.people-avatar img { width: 100%; height: 100%; object-fit: cover; }
.people-identity { min-width: 0; }
.people-identity h2 { overflow: hidden; margin: 0; color: var(--text); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.people-identity > span { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.people-identity-pill {
  max-width: 96px; overflow: hidden; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 99px;
  color: var(--muted); background: var(--surface-2);
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em;
  text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.people-identity-pill.human_verified { border-color: color-mix(in srgb, var(--green) 35%, transparent); color: var(--green); background: var(--green-dim); }
.people-identity-pill.unreviewed_cross_platform { border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--amber); background: var(--amber-dim); }
.people-platforms { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; margin-top: 13px; }
.people-platform { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface-2); }
.people-platform svg { width: 11px; height: 11px; fill: currentColor; }
.people-platform b { font-family: var(--mono); font-size: 9.5px; font-weight: 500; text-transform: capitalize; }
.people-platform.twitter { color: var(--text); }
.people-platform.telegram { color: #4db3e4; }
.people-platform.discord { color: #7a86f8; }
.people-no-platform { color: var(--muted); font-size: 11px; }
.people-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 13px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.people-stats span { display: grid; gap: 2px; padding: 0 10px; border-right: 1px solid var(--line); min-width: 0; }
.people-stats span:first-child { padding-left: 0; }
.people-stats span:last-child { padding-right: 0; border-right: 0; }
.people-stats strong { overflow: hidden; font-family: var(--mono); font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; }
.people-stats small { color: var(--muted); font-size: 9.5px; }
.people-card-foot { display: flex; align-items: flex-end; gap: 14px; margin-top: 12px; }
.people-relevance { display: grid; gap: 5px; flex: 1; min-width: 0; }
.people-relevance > span { display: flex; justify-content: space-between; color: var(--muted); }
.people-relevance small { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.07em; text-transform: uppercase; }
.people-relevance b { color: var(--text); font-family: var(--mono); font-size: 9.5px; }
.people-relevance i { height: 3px; overflow: hidden; border-radius: 99px; background: var(--surface-2); border: 0; }
.people-relevance em { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.people-open { flex: none; color: var(--muted); font-size: 10.5px; }
.people-open b { margin-left: 3px; color: var(--accent); }
.people-directory.list-view { grid-template-columns: 1fr; }
.people-directory.list-view .people-card { display: grid; grid-template-columns: minmax(220px, 1.15fr) minmax(150px, 0.7fr) minmax(210px, 0.8fr) minmax(170px, 0.7fr); gap: 18px; align-items: center; }
.people-directory.list-view .people-platforms, .people-directory.list-view .people-stats, .people-directory.list-view .people-card-foot { margin-top: 0; }
.people-directory.list-view .people-stats { padding: 0; border: 0; }
@media (max-width: 900px) {
  .people-toolbar { grid-template-columns: 1fr 1fr; }
  .people-directory.list-view .people-card { grid-template-columns: 1fr; gap: 10px; }
}
.people-empty { display: grid; grid-column: 1 / -1; place-items: center; min-height: 240px; padding: 40px; text-align: center; }
.people-empty > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 11px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 18px; }
.people-empty strong { font-size: 13.5px; }
.people-empty p { margin: 4px 0 14px; color: var(--muted); font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════
   PERSON DETAIL
   ═══════════════════════════════════════════════════════════════════════ */
.p-avatar {
  width: 42px; height: 42px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--raised); border: 1px solid var(--line);
  color: var(--accent); font-weight: 700; font-size: 17px; display: grid; place-items: center;
}
.p-avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-avatar.lg { width: 60px; height: 60px; font-size: 25px; }
.actor-type {
  vertical-align: middle; margin-left: 8px; padding: 4px 10px; border-radius: 99px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--surface-2);
}
.actor-type.verified_person { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-dim); }
.actor-type.organization_account { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); background: var(--cyan-dim); }
.actor-type.pseudonymous_actor { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.p-plats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.p-plat {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--surface);
  font-size: 12px; color: var(--text-soft);
}
a.p-plat:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.p-plat svg { width: 12px; height: 12px; fill: currentColor; }
.actor-audit {
  display: grid; gap: 3px; margin: 14px 0 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font-size: 12.5px;
}
.actor-audit b { font-size: 13px; }
.actor-audit span { color: var(--text-soft); }
.actor-audit small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.identity-state, .history-state {
  margin: 10px 0; padding: 12px 14px; display: grid; gap: 3px;
  border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; background: var(--surface);
  font-size: 12.5px;
}
.identity-state b, .history-state b { font-size: 13px; }
.identity-state span, .identity-state small, .history-state span, .history-state small { color: var(--muted); }
.identity-state.human_verified { border-left-color: var(--green); }
.identity-state.unreviewed_cross_platform { border-left-color: var(--amber); }
.history-state { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; }
.history-state > div { display: grid; gap: 3px; flex: 1 1 420px; }
.history-state a { font-size: 12px; font-weight: 600; color: var(--accent); }
.history-state.ready { border-left-color: var(--green); }
.history-state.running { border-left-color: var(--cyan); }
.history-state.pending { border-left-color: var(--amber); }
.history-state.failed { border-left-color: var(--red); }
.subnet-role {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px;
}
.subnet-role:last-of-type { border-bottom: 0; }
.subnet-role:hover { text-decoration: none; }
.subnet-role:hover .sr-name { color: var(--accent); }
.sr-name { font-weight: 550; }
.role-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted);
}
.role-tag.role-sup { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-dim); }
.role-tag.role-crit { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-dim); }
.role-tag.role-act { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); background: var(--cyan-dim); }
.subnet-role .sub { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.mention-caveat { margin-top: 10px; font-size: 11px; }
.talks-svg { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
.talks-svg text { font-family: var(--body-font); }
.observed-activity-list { display: grid; gap: 8px; }
.observed-activity { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.observed-activity-meta {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.observed-activity-text { font-size: 13px; color: var(--text-soft); overflow-wrap: anywhere; }
.observed-netuids { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.observed-netuids a {
  font-family: var(--mono); font-size: 10.5px; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--accent);
}
.acct { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13px; }
.p-rel { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--accent); }

/* dossier answer cards */
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.answer .q { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.answer .q b { color: var(--accent); }
.answer .a { margin-top: 6px; font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; color: var(--text-soft); }
.answer .conf { font-family: var(--mono); font-size: 10.5px; color: var(--muted); float: right; }
.quote {
  font-style: italic; color: var(--text-soft); margin-top: 8px; padding: 2px 0 2px 12px;
  border-left: 2px solid var(--accent); font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════
   ENTITY REGISTRY
   ═══════════════════════════════════════════════════════════════════════ */
.entities-page-head { margin-bottom: 18px; }
.entity-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; min-height: 76px;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.entity-summary > div { display: grid; gap: 3px; padding: 14px 17px; border-right: 1px solid var(--line); }
.entity-summary > div:last-child { border-right: 0; }
.entity-summary span { color: var(--muted); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.09em; text-transform: uppercase; }
.entity-summary strong { font-family: var(--mono); font-size: 21px; font-weight: 600; }
@media (max-width: 760px) {
  .entity-summary { grid-template-columns: 1fr 1fr; }
  .entity-summary > div:nth-child(even) { border-right: 0; }
}
.entity-registry { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.entity-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(180px, auto) auto; gap: 9px; align-items: center; padding: 13px; border-bottom: 1px solid var(--line); }
.entity-toolbar select { min-height: 38px; padding: 8px 28px 8px 10px; font-size: 12.5px; background: var(--bg); }
.entity-toolbar > span { min-width: 92px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; text-align: right; }
@media (max-width: 760px) { .entity-toolbar { grid-template-columns: 1fr; } .entity-toolbar > span { text-align: left; } }
.entity-table { width: 100%; border-collapse: collapse; }
.entity-table th {
  padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface-2);
  text-align: left; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase;
}
.entity-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.entity-table tbody tr:last-child td { border-bottom: 0; }
.entity-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.entity-primary { display: flex; align-items: center; gap: 10px; min-width: 210px; color: var(--text); }
.entity-primary:hover { text-decoration: none; }
.entity-primary:hover strong { color: var(--accent); }
.entity-primary > span:last-child { display: grid; min-width: 0; }
.entity-primary strong { overflow: hidden; max-width: 300px; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.entity-primary code { overflow: hidden; max-width: 300px; margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.entity-kind-icon {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none;
  border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-2);
  font-family: var(--mono); font-size: 12px;
}
.entity-kind-icon.persona { color: var(--violet); }
.entity-kind-icon.subnet { color: var(--accent); }
.entity-kind-icon.repo { color: var(--text); }
.entity-kind-icon.account, .entity-kind-icon.account_alias { color: var(--cyan); }
.entity-kind-icon.channel { color: var(--amber); }
.entity-kind-icon.video { color: var(--red); }
.entity-kind-icon.lg { width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }
.entity-kind-pill {
  display: inline-flex; width: fit-content; padding: 3px 8px;
  border: 1px solid var(--line-strong); border-radius: 99px; color: var(--muted); background: var(--surface-2);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
}
.entity-attrs-preview { display: flex; flex-wrap: wrap; gap: 4px; max-width: 430px; }
.entity-attrs-preview span {
  display: inline-flex; gap: 4px; max-width: 190px; padding: 2px 7px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 5px; color: var(--muted);
  font-family: var(--mono); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap;
}
.entity-attrs-preview b { color: var(--text-soft); font-weight: 500; text-transform: capitalize; }
.entity-table td:nth-child(4) { white-space: nowrap; }
.entity-table td:nth-child(4) strong, .entity-table td:nth-child(4) small { display: block; }
.entity-table td:nth-child(4) strong { font-size: 11px; }
.entity-table td:nth-child(4) small { margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 9.5px; }
.entity-open { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.entity-open:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.entity-pagination {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px;
  padding: 10px 13px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10.5px;
}
.entity-pagination > div { display: flex; gap: 7px; }
.entity-pagination .btn { padding: 6px 11px; font-size: 11px; }
.entity-pagination .btn:disabled { opacity: 0.4; cursor: default; }
.entity-detail-head { display: flex; align-items: center; gap: 13px; margin: 9px 0 17px; flex-wrap: wrap; }
.entity-detail-head > div { min-width: 0; }
.entity-detail-head h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }
.entity-detail-head code { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.entity-detail-head .entity-kind-pill { margin-left: 4px; }
.entity-detail-head .btn { margin-left: auto; }
.entity-canonical-note {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); border-radius: var(--radius); background: var(--cyan-dim);
}
.entity-canonical-note > span { color: var(--cyan); }
.entity-canonical-note p { margin-top: 2px; color: var(--muted); font-size: 12px; }
.entity-detail-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.entity-detail-grid { align-items: start; }
.entity-attribute-list { display: grid; }
.entity-attribute-list > div { display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1fr); gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.entity-attribute-list > div:last-child { border-bottom: 0; }
.entity-attribute-list b { color: var(--muted); font-family: var(--mono); font-size: 10.5px; text-transform: capitalize; }
.entity-attribute-list span { overflow-wrap: anywhere; }
.entity-lifecycle { padding: 12px 16px; display: grid; gap: 6px; font-size: 12.5px; color: var(--text-soft); }

/* ═══════════════════════════════════════════════════════════════════════
   IDENTITY REVIEW
   ═══════════════════════════════════════════════════════════════════════ */
.identity-state.ambiguous { border-left-color: var(--amber); }
.identity-note {
  width: 100%; min-width: 180px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 12.5px;
}
.identity-note:focus { outline: none; border-color: var(--accent-line); }
.identity-result { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 1em; }

/* ═══════════════════════════════════════════════════════════════════════
   CLAIMS (machine-extracted, human-reviewed)
   ═══════════════════════════════════════════════════════════════════════ */
.claims-box { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.claim-caveat { margin: -4px 0 12px; }
.claim-row {
  display: grid; grid-template-columns: 92px minmax(120px, 0.55fr) minmax(0, 1fr) auto auto;
  gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.claim-row:last-child { border-bottom: 0; }
.claim-row:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.claim-badge {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: center; padding: 3px 6px; border-radius: 5px;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--surface-2);
}
.claim-badge.m-onchain { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); background: var(--cyan-dim); }
.claim-badge.m-llm { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.claim-badge.m-deterministic { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-dim); }
.claim-badge.m-manual { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.claim-pred { font-weight: 600; text-transform: capitalize; }
.claim-val { color: var(--text-soft); overflow-wrap: anywhere; }
.claim-conf { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.claim-conf .vq { color: var(--green); font-size: 10px; }
.claim-conf .stale { color: var(--amber); font-size: 10px; }
.claim-review-actions { display: inline-flex; gap: 3px; }
.claim-review-actions button {
  border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2);
  color: var(--muted); font-family: var(--mono); font-size: 9.5px; padding: 3px 7px; cursor: pointer;
}
.claim-review-actions button:hover { color: var(--text); border-color: var(--line-strong); }
.claim-review-actions button:disabled { opacity: 0.4; cursor: wait; }
@media (max-width: 860px) {
  .claim-row { grid-template-columns: 92px minmax(0, 1fr); }
  .claim-val { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ANNOTATIONS (human ground truth)
   ═══════════════════════════════════════════════════════════════════════ */
.annotations { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 10px; }
.annotations-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.annotations-head h2 { margin-bottom: 3px; }
.annotations-head p { margin: 0 0 12px; }
.annotation-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.annotation-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 7px; margin: 10px 0 14px; }
.annotation-suggestion-title { grid-column: 1 / -1; }
.annotation-suggestion {
  display: grid; gap: 3px; text-align: left; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--text);
  padding: 10px 11px; cursor: pointer; font: inherit; font-size: 12.5px;
}
.annotation-suggestion:hover { border-color: var(--accent-line); }
.annotation-row {
  border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: var(--radius); background: var(--surface); padding: 12px 14px;
}
.annotation-row.superseded, .annotation-row.retired { border-left-color: var(--line-strong); opacity: 0.62; }
.annotation-row-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.annotation-verdict, .annotation-state {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 99px; padding: 2px 8px; border: 1px solid var(--line-strong); color: var(--muted);
}
.annotation-verdict.wrong { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-dim); }
.annotation-verdict.incomplete { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-dim); }
.annotation-verdict.correct { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); background: var(--green-dim); }
.annotation-state { margin-left: auto; }
.annotation-truth { font-size: 13px; margin-top: 8px; white-space: pre-wrap; }
.annotation-note { margin-top: 5px; }
.annotation-meta { margin-top: 8px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.annotation-retire {
  margin-left: 8px; border: 0; background: transparent; color: var(--red);
  font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0;
}
.annotation-form {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  padding: 15px; display: grid; gap: 11px;
}
.annotation-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(130px, 1fr) minmax(180px, 1.2fr); gap: 10px; }
.annotation-form label { display: grid; gap: 5px; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.annotation-form select, .annotation-form textarea, .annotation-form input {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; background: var(--bg);
  color: var(--text); font-family: var(--body-font); font-size: 13px; padding: 9px 10px;
}
.annotation-form textarea { resize: vertical; line-height: 1.45; }
.annotation-form select:focus, .annotation-form textarea:focus, .annotation-form input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.annotation-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.annotation-actions button {
  border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  padding: 9px 14px; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
}
.annotation-actions button:hover { background: var(--accent-strong); }
.annotation-actions button:disabled, .annotation-retire:disabled { opacity: 0.5; cursor: wait; }
.annotation-status { min-height: 1em; font-size: 12px; color: var(--muted); }
@media (max-width: 680px) { .annotation-grid { grid-template-columns: 1fr; } }

/* annotation quick modal */
.annotation-modal-backdrop {
  position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, 0.55);
  display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px);
}
.annotation-modal-backdrop[hidden] { display: none; }
.annotation-modal {
  width: min(860px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: var(--shadow); padding: 22px;
}
.annotation-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.annotation-modal-head h2 { margin: 0 0 3px; font-size: 19px; }
.annotation-modal-head p { color: var(--muted); font-size: 12.5px; }
.annotation-target-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 9px; align-items: end; margin-bottom: 14px; }
.annotation-target-form label { display: grid; gap: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.annotation-target-form input, .annotation-target-form select {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--text); font-family: var(--body-font); font-size: 13px; padding: 9px 11px;
}
@media (max-width: 640px) { .annotation-target-form { grid-template-columns: 1fr; } }
body.modal-open { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════
   BENCHMARK
   ═══════════════════════════════════════════════════════════════════════ */
.bench-controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.bench-jlim {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.bench-jlim select { padding: 7px 9px; font-size: 12.5px; }
.bench-spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
.bench-saved { color: var(--green); }
.bench-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.bench-hero h1 { margin-bottom: 4px; }
.bench-gate {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 14px 0; padding: 12px 16px; border-radius: var(--radius);
  border-left: 3px solid var(--line-strong); background: var(--surface);
}
.bench-gate h2 { margin: 2px 0 0; }
.bench-gate.gate-pass { border-left-color: var(--green); background: var(--green-dim); }
.bench-gate.gate-fail { border-left-color: var(--red); background: var(--red-dim); }
.bench-judge-line { margin-top: 6px; font-family: var(--mono); font-size: 11px; }
.bench-score {
  display: inline-grid; place-items: center; gap: 2px;
  font-family: var(--mono); font-weight: 700;
  padding: 6px 12px; border-radius: 10px; border: 1.5px solid currentColor;
}
.bench-score span { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.bench-score.big { font-size: 40px; padding: 14px 26px; border-radius: 14px; border-width: 2px; }
.bench-score.strong { color: var(--green); background: var(--green-dim); }
.bench-score.usable { color: var(--amber); background: var(--amber-dim); }
.bench-score.thin, .bench-score.empty { color: var(--red); background: var(--red-dim); }
.chips .chip .sub { font-size: 10.5px; margin-top: 2px; }

details.bench-section {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  margin-bottom: 12px; overflow: hidden;
}
details.bench-section[open] { border-color: var(--line-strong); }
summary.bench-section-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer;
  list-style: none; font-family: var(--display); font-weight: 650; font-size: 14.5px;
}
summary.bench-section-head::-webkit-details-marker { display: none; }
summary.bench-section-head::before { content: "▸"; color: var(--muted); font-size: 11px; transition: transform 0.15s; }
details[open] summary.bench-section-head::before { transform: rotate(90deg); }
summary.bench-section-head .sub { font-family: var(--body-font); font-weight: 400; }
summary.bench-section-head .bench-score { margin-left: auto; font-size: 13px; }
.bench-section-body { padding: 4px 18px 18px; }
.chips.bench-measurement { margin: 8px 0 14px; }
.chips.bench-measurement .chip { padding: 8px 12px; min-width: 100px; }
.chips.bench-measurement .chip .v { font-size: 14px; }
table.bench-table { font-size: 12.5px; }
.bench-row { cursor: pointer; }
.bench-caret { color: var(--muted); font-size: 10px; margin-right: 7px; display: inline-block; transition: transform 0.15s; }
.bench-row.open .bench-caret { transform: rotate(90deg); }
.bench-weak { color: var(--red); font-family: var(--mono); font-size: 10.5px; }
.bench-detail-row.hidden { display: none; }
.bench-detail-row > td { background: var(--surface-2); padding: 0; }
.bench-detail-inner { padding: 16px 18px; display: grid; gap: 14px; }
.bench-detail-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bench-qbars { display: grid; gap: 7px; }
.bench-qbar { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 46px; gap: 10px; align-items: center; }
.bench-qlabel { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench-qtrack { height: 6px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.bench-qfill { display: block; height: 100%; border-radius: inherit; background: var(--muted); }
.bench-qfill.strong { background: var(--green); }
.bench-qfill.usable { background: var(--amber); }
.bench-qfill.thin, .bench-qfill.empty { background: var(--red); }
.bench-qpct { font-family: var(--mono); font-size: 11px; text-align: right; color: var(--text-soft); }
.bench-qdetail { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); margin: -3px 0 3px; }
.bench-candidate {
  margin: 0; padding: 12px 14px; border-radius: 8px; overflow-x: auto;
  background: #12110f; border: 1px solid #2b2924; color: #d9d5c8;
  font-family: var(--mono); font-size: 11px; line-height: 1.55; max-height: 300px;
  white-space: pre-wrap;
}
.bench-gt { display: grid; gap: 8px; }
.bench-gt-text {
  width: 100%; min-height: 64px; resize: vertical;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--text); font: inherit; font-size: 13px; padding: 10px 12px;
}
.bench-gt-text:focus { outline: none; border-color: var(--accent-line); }
.bench-gt-actions { display: flex; align-items: center; gap: 10px; }
.bench-gt-msg { font-size: 12px; color: var(--muted); }

.bench-diagnostics { margin-top: 26px; }
.bench-diagnostics > .bench-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; font-family: var(--display); font-weight: 700; font-size: 17px; }
.chips.bench-dataset-cards { margin: 10px 0 16px; }
.bench-issue-toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin: 10px 0 12px; }
.bench-issue-toolbar select { font-size: 12.5px; }
table.bench-issues-table td { vertical-align: top; }
.bench-repair-btn {
  border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface-2);
  color: var(--text-soft); font: inherit; font-size: 11.5px; font-weight: 550; padding: 6px 11px; cursor: pointer;
}
.bench-repair-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.bench-repair-btn:disabled { opacity: 0.45; cursor: wait; }

.bench-history-card { margin-top: 26px; }
.bench-history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.bench-history-head h2 { margin: 0; }
.bench-spark { width: 170px; height: 34px; color: var(--accent); }
table.bench-history-table { border: 0; border-radius: 0; background: transparent; }
.bench-minis { display: flex; gap: 4px; flex-wrap: wrap; }
.bench-mini {
  font-family: var(--mono); font-size: 10px; font-weight: 600; min-width: 30px; text-align: center;
  padding: 2.5px 5px; border-radius: 5px; border: 1px solid var(--line-strong);
  color: var(--text-soft); background: var(--surface-2);
}
.bench-mini.strong { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-dim); }
.bench-mini.usable { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: var(--amber-dim); }
.bench-mini.thin, .bench-mini.empty { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-dim); }
.bench-mini.muted { opacity: 0.45; }

/* ═══════════════════════════════════════════════════════════════════════
   PIPELINE (DAG + formal model)
   ═══════════════════════════════════════════════════════════════════════ */
.pipe-overview { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.pipe-stat {
  display: grid; gap: 1px; padding: 12px 17px; min-width: 118px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.pipe-stat b { font-size: 19px; font-weight: 600; color: var(--text); letter-spacing: 0; }

.pipe-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 4px 0 18px; }
.pipe-tab {
  border: 0; background: none; cursor: pointer; font: inherit;
  padding: 10px 16px; color: var(--muted); font-weight: 550; font-size: 13.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.pipe-tab:hover { color: var(--text); }
.pipe-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.pipe-pane { display: none; }
.pipe-pane.active { display: block; }

.pipe-legend {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 8px 0 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.pipe-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.lg-dot.success { background: var(--green); }
.lg-dot.failed { background: var(--red); }
.lg-dot.idle { background: var(--line-strong); }
.lg-line { width: 20px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.lg-line.flow { background: var(--accent); }
.lg-line.trigger { background: var(--cyan); }

.pipe-lane { margin-bottom: 18px; }
.pipe-lane-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pipe-lane-head h2 { margin: 0; font-size: 15px; }
.pipe-lane-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

.pipe-canvas-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.pipe-canvas { position: relative; min-height: 120px; }
.pipe-canvas-meta { padding: 8px 14px; font-family: var(--mono); font-size: 10px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.pipe-edges { position: absolute; inset: 0; }
.pipe-edges path.edge { fill: none; stroke: var(--line-strong); stroke-width: 1.5; opacity: 0.8; }
.pipe-edges path.edge.flow { stroke: var(--accent); }
.pipe-edges path.edge.trigger { stroke: var(--cyan); stroke-dasharray: 4 3; }
.pipe-edges path.edge.err { stroke: var(--red); }
.pipe-edges path.edge.idle { opacity: 0.35; }
.pn {
  position: absolute; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  border-radius: 9px; font-size: 11px; padding: 6px 10px;
}
.dn {
  border: 1px dashed var(--line-strong); background: var(--bg); color: var(--muted);
  font-family: var(--mono); font-size: 10px; flex-direction: row; align-items: center; gap: 7px;
}
.dn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.jn {
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; text-align: left; font: inherit; font-size: 11px;
  transition: border-color 0.13s, box-shadow 0.13s;
}
.jn:hover { border-color: var(--accent-line); }
.jn-top { display: flex; align-items: center; gap: 2px; font-weight: 600; font-size: 11.5px; }
.jn-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jn-sched { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.jn.st-failed { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.jn.st-running { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.pipe-canvas.focused .pn { opacity: 0.25; }
.pipe-canvas.focused .pn.on { opacity: 1; }
.pipe-canvas.focused .pn.hot { opacity: 1; box-shadow: 0 0 0 2px var(--accent-line); }
.pipe-canvas.focused .pipe-edges path { opacity: 0.12; }
.pipe-canvas.focused .pipe-edges path.on { opacity: 1; }

.pipe-detail { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 18px; margin-top: 14px; }
.pipe-detail-empty { border-style: dashed; color: var(--muted); }
.pipe-detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pipe-detail-head h2 { margin: 0 0 4px; }
.pipe-detail-head p { color: var(--muted); font-size: 12.5px; max-width: 640px; }
.pipe-jobname { font-size: 11px; color: var(--accent); background: var(--accent-dim); border: 1px solid var(--accent-line); border-radius: 6px; padding: 4px 9px; }
.pipe-cmd {
  margin: 12px 0 4px; padding: 9px 12px; border-radius: 8px;
  background: #12110f; border: 1px solid #2b2924; color: #d9d5c8; font-size: 11.5px; overflow-x: auto;
}
.pipe-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
@media (max-width: 760px) { .pipe-columns { grid-template-columns: 1fr; } }
.pipe-columns h3 { font-size: 12px; margin-bottom: 6px; color: var(--muted); font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.pipe-list { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--text-soft); display: grid; gap: 3px; }
table.pipe-runs { margin-top: 8px; font-size: 12px; }

/* formal model board */
.pmod { margin-bottom: 22px; }
.pmod-wrap { display: grid; gap: 18px; }
.pmod-loading { color: var(--muted); padding: 26px 0; }
.pmod-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.pmod-h h2 { margin: 0; font-size: 16px; }
.pmod-board-head { margin-bottom: 12px; }
.pmod-lead { font-size: 13px; color: var(--text-soft); margin: 2px 0 4px; }
.pmod-primary { padding: 18px; border: 1px solid var(--accent-line); border-radius: var(--radius-lg); background: linear-gradient(140deg, var(--accent-dim), transparent 40%), var(--surface); }
.pmod-phases { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.pmod-phase { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 13px; min-width: 0; }
.pmod-phase-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; font-size: 13px; }
.pmod-phase-id {
  font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent-line); background: var(--accent-dim); border-radius: 5px; padding: 1px 7px;
}
.pmod-phase-goal { font-size: 11.5px; margin-bottom: 10px; }
.pmod-apps { display: grid; gap: 8px; }
.pmod-app { border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 10px 11px; }
.pmod-app.has-note { cursor: pointer; }
.pmod-app.has-note:hover { border-color: var(--line-strong); }
.pmod-app.open { border-color: var(--accent-line); }
.pmod-app-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pmod-app-name { font-weight: 600; font-size: 12.5px; }
.pmod-llm {
  font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--violet); border: 1px solid color-mix(in srgb, var(--violet) 40%, transparent);
  border-radius: 4px; padding: 1px 5px;
}
.pmod-cardb { font-size: 9.5px; color: var(--muted); margin-left: auto; }
.pmod-impl { font-size: 10px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmod-io { display: grid; gap: 4px; margin-top: 8px; }
.pmod-io-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pmod-io-k { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); min-width: 22px; }
.pmod-note { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line-strong); font-size: 11.5px; color: var(--text-soft); }
.pmod-note.hidden { display: none; }
.pmod-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 9.5px; padding: 2px 7px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--text-soft);
}
.pmod-chip.src { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 35%, transparent); }
.pmod-chip.target { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); font-weight: 600; }
.pmod-chip-n { color: var(--muted); font-size: 8.5px; }

.pmod-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pmod-src { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 13px; }
.pmod-src.paused { opacity: 0.65; }
.pmod-src-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.pmod-src-top b { font-weight: 600; }
.pmod-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.pmod-dot.ok { background: var(--green); }
.pmod-dot.bad { background: var(--red); }
.pmod-dot.idle { background: var(--line-strong); }
.pmod-kind { font-family: var(--mono); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pmod-badge { margin-left: auto; font-family: var(--mono); font-size: 8.5px; color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); border-radius: 4px; padding: 1px 5px; text-transform: uppercase; }
.pmod-src-cadence { margin-top: 4px; font-size: 10px; color: var(--muted); }
.pmod-src-count { margin-top: 4px; font-size: 10.5px; color: var(--text-soft); }
.pmod-src-count b { color: var(--accent); }
.pmod-chiprow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }

.pmod-cat-group { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 13px 14px; }
.pmod-cat-group.targets { border-color: var(--accent-line); background: linear-gradient(120deg, var(--accent-dim), transparent 55%), var(--surface); }
.pmod-cat-group-h { display: flex; align-items: baseline; gap: 9px; margin-bottom: 10px; font-size: 13px; }
.pmod-cat-group-h .k {
  font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent-line); border-radius: 5px; padding: 1px 7px; background: var(--accent-dim);
}
.pmod-classes { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.pmod-class { min-width: 0; }
.pmod-class-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2);
  color: var(--text); font-family: var(--mono); font-size: 11px; padding: 5px 10px;
}
.pmod-class-chip:hover { border-color: var(--line-strong); }
.pmod-class.target > .pmod-class-chip { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); font-weight: 600; }
.pmod-class.open > .pmod-class-chip { border-color: var(--accent-line); }
.pmod-class.sub-of { margin-left: 14px; }
.pmod-sub-mark { color: var(--muted); }
.pmod-class-cnt { color: var(--muted); font-size: 9.5px; }
.pmod-class-n { color: var(--muted); font-size: 9px; }
.pmod-class-detail { margin: 6px 0 4px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--bg); width: 100%; }
.pmod-class-detail.hidden { display: none; }
.pmod-class.open { flex-basis: 100%; }
.pmod-class-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; font-size: 11px; }
.pmod-class-meta code { color: var(--cyan); font-size: 10.5px; }
.pmod-class-parent { color: var(--muted); font-size: 10px; }
table.pmod-attrs { width: 100%; border-collapse: collapse; font-size: 11px; }
table.pmod-attrs td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.pmod-attrs tr:last-child td { border-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   API KEYS
   ═══════════════════════════════════════════════════════════════════════ */
.api-key-page-head { margin-bottom: 16px; }
.api-key-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden;
}
.api-key-summary > div { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border-right: 1px solid var(--line); }
.api-key-summary > div:last-child { border-right: 0; }
.api-key-summary-icon {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font-size: 15px;
}
.api-key-summary-icon.active { color: var(--green); background: var(--green-dim); }
.api-key-summary-icon.warning { color: var(--amber); background: var(--amber-dim); }
.api-key-summary p { display: grid; }
.api-key-summary strong { font-family: var(--mono); font-size: 20px; font-weight: 600; line-height: 1.15; }
.api-key-summary small { color: var(--muted); font-size: 11px; }
@media (max-width: 700px) { .api-key-summary { grid-template-columns: 1fr; } .api-key-summary > div { border-right: 0; border-bottom: 1px solid var(--line); } .api-key-summary > div:last-child { border-bottom: 0; } }

.secret-reveal {
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  background: var(--green-dim); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 16px;
}
.secret-reveal-head { display: flex; gap: 11px; align-items: flex-start; }
.secret-reveal-head > span { color: var(--green); font-weight: 700; }
.secret-reveal-head p { color: var(--muted); font-size: 12.5px; }
.secret-reveal-head button { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 17px; cursor: pointer; }
.secret-code { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.secret-code code {
  flex: 1; min-width: 240px; padding: 11px 13px; border-radius: 8px; overflow-wrap: anywhere;
  background: #12110f; border: 1px solid #2b2924; color: #ffd591;
  font-family: var(--mono); font-size: 12.5px;
}

.api-key-layout { display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.35fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .api-key-layout { grid-template-columns: 1fr; } }
.api-key-create-card, .api-key-list-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 18px; }
.api-key-section-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 14px; }
.api-key-section-icon {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px;
  background: var(--accent-dim); color: var(--accent); font-size: 15px; font-weight: 700;
}
.api-key-section-head h2 { margin: 0; font-size: 15px; }
.api-key-section-head p { color: var(--muted); font-size: 12px; }
.api-key-form { display: grid; gap: 13px; }
.api-key-field { display: grid; gap: 3px; }
.api-key-field span { font-size: 12.5px; font-weight: 600; }
.api-key-field small { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.api-key-field input, .api-key-field select {
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--text); font: inherit; font-size: 13px; padding: 9px 11px;
}
.api-key-field input:focus, .api-key-field select:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.api-key-permissions { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px 10px; display: grid; gap: 2px; }
.api-key-permissions legend { font-size: 12px; font-weight: 600; padding: 0 5px; }
.api-key-permission { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.api-key-permission:last-child { border-bottom: 0; }
.api-key-permission input { margin-top: 3px; accent-color: var(--accent); }
.api-key-permission:has(input:checked) b { color: var(--accent); }
.api-key-permission span { display: grid; }
.api-key-permission b { font-weight: 600; }
.api-key-permission small { color: var(--muted); font-size: 11px; }
.api-key-permission em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.api-key-create-button { justify-content: center; }
.api-key-safety { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 11px 13px; border-radius: 9px; background: var(--surface-2); font-size: 12px; }
.api-key-safety > span { color: var(--green); }
.api-key-safety p { display: grid; }
.api-key-safety small { color: var(--muted); }
.api-key-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.api-key-list-head h2 { margin: 0; font-size: 15px; }
.api-key-list-head p { color: var(--muted); font-size: 12px; }
.api-key-filters { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.api-key-filters button {
  border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 550; padding: 5px 12px; cursor: pointer;
}
.api-key-filters button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.api-key-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.api-key-row:last-child { border-bottom: 0; }
.api-key-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 15px;
}
.api-key-identity { display: grid; gap: 3px; min-width: 0; }
.api-key-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.api-key-title strong { font-size: 13.5px; }
.api-key-identity code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.api-key-scopes { display: flex; gap: 5px; flex-wrap: wrap; }
.api-key-scopes span {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--muted);
}
.api-key-dates { display: grid; gap: 6px; }
.api-key-dates span { display: grid; }
.api-key-dates small { color: var(--muted); font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.07em; text-transform: uppercase; }
.api-key-dates strong { font-size: 12px; font-weight: 550; }
.api-key-ended { color: var(--muted); font-size: 11.5px; }
.api-key-empty { display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.api-key-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 18px; margin-bottom: 10px; }
.api-key-empty p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.api-key-filter-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 720px) { .api-key-row { grid-template-columns: auto minmax(0, 1fr); } .api-key-dates, .api-key-actions { grid-column: 2; } }
.api-key-quickstart {
  display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr); gap: 18px; align-items: center;
  margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
@media (max-width: 900px) { .api-key-quickstart { grid-template-columns: 1fr; } }
.api-key-quickstart h2 { margin: 0 0 4px; font-size: 15px; }
.api-key-quickstart p { color: var(--muted); font-size: 12.5px; }
.api-key-quickstart p code { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.api-key-command { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.api-key-command code {
  flex: 1; min-width: 240px; padding: 12px 14px; border-radius: 9px; overflow-x: auto;
  background: #12110f; border: 1px solid #2b2924; color: #d9d5c8;
  font-family: var(--mono); font-size: 11.5px; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   USAGE & BILLING
   ═══════════════════════════════════════════════════════════════════════ */
.usage-toolbar select { min-height: 36px; font-size: 12.5px; }
.usage-chart { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 16px 18px; }
.usage-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; }
.usage-bar {
  flex: 1; min-width: 2px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent));
  opacity: 0.85; transition: opacity 0.12s;
}
.usage-bar:hover { opacity: 1; }
.budget-bar { height: 7px; border-radius: 99px; background: var(--raised); overflow: hidden; margin: 12px 0 10px; }
.budget-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); }

/* account security */
form.key-create { display: grid; gap: 10px; margin-top: 10px; }
form.key-create input {
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 13.5px; padding: 11px 13px;
}
form.key-create input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
form.key-create .btn { justify-self: start; }
.security-note { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ═══════════════════════════════════════════════════════════════════════
   ASK AXIOM (chat)
   ═══════════════════════════════════════════════════════════════════════ */
.ask-layout {
  display: grid; grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); gap: 14px;
  height: calc(100vh - 58px - 60px); min-height: 480px;
}
.thread-panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.thread-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-bottom: 1px solid var(--line);
}
.thread-panel-head strong { font-family: var(--display); font-size: 13.5px; }
.thread-new {
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface-2);
  color: var(--text-soft); font-size: 14px; cursor: pointer;
}
.thread-new:hover { border-color: var(--accent-line); color: var(--accent); }
#thread-list { flex: 1; min-height: 0; overflow-y: auto; padding: 7px; display: grid; gap: 2px; align-content: start; }
.thread-item { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.thread-item:hover { background: var(--surface-2); }
.thread-item.active { background: var(--accent-dim); }
.thread-item.active .thread-title { color: var(--accent); font-weight: 600; }
.thread-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 0; background: none; text-align: left; padding: 8px 10px;
  color: var(--text-soft); font: inherit; font-size: 12.5px; cursor: pointer;
}
.thread-delete { border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 4px 8px; opacity: 0; }
.thread-item:hover .thread-delete { opacity: 1; }
.thread-delete:hover { color: var(--red); }

.chat-stage {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
}
.chat-stage-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.chat-stage-head > div:first-child { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.chat-stage-head strong { font-family: var(--display); font-size: 14.5px; color: var(--text); }
.chat-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.chat-stage-actions { display: flex; align-items: center; gap: 9px; }
.axiom-model-picker {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--accent);
}
.axiom-model-picker select { border: 0; background: transparent; max-width: 230px; font-size: 12px; padding: 8px 2px; color: var(--text); }
.axiom-model-picker select:focus { outline: none; }
.chat-stage-actions .btn { padding: 8px 13px; font-size: 12px; }

.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px; display: grid; gap: 16px; align-content: start; }
.chat-empty { display: grid; place-items: center; text-align: center; padding: 30px 16px; align-content: center; min-height: 100%; }
.chat-empty .eyebrow { justify-content: center; }
.chat-empty .eyebrow::before { display: none; }
.chat-empty h2 { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; margin: 0 0 6px; }
.chat-empty .sub { max-width: 480px; }
.ask-orb {
  width: 54px; height: 54px; margin-bottom: 16px; border-radius: 18px;
  display: grid; place-items: center; font-size: 22px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 34px rgba(240, 163, 63, 0.18);
}
.prompt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 22px; width: 100%; max-width: 760px; }
.prompt-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  color: var(--text-soft); font: inherit; font-size: 12.5px; text-align: left;
  padding: 12px 14px; cursor: pointer; line-height: 1.45;
  transition: border-color 0.13s, color 0.13s;
}
.prompt-card:hover { border-color: var(--accent-line); color: var(--text); }

.chat-message.user { display: flex; justify-content: flex-end; }
.user-bubble {
  max-width: 72%; padding: 11px 15px; border-radius: 14px 14px 4px 14px;
  background: var(--accent); color: var(--on-accent); font-size: 13.5px; line-height: 1.55;
  overflow-wrap: anywhere;
}
.chat-message.assistant { max-width: 88%; }
.assistant-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px; flex-wrap: wrap;
  font-size: 12.5px; font-weight: 600;
}
.assistant-head > span:first-child { color: var(--accent); }
.chat-model-used { font-family: var(--mono); font-size: 9.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; font-weight: 400; }
.confidence { margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.assistant-copy {
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px;
  background: var(--surface-2); font-size: 13.5px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere;
}
.citation-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 7px; margin-top: 9px; }
.citation-card {
  display: block; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--text); font-size: 11.5px;
}
a.citation-card:hover { border-color: var(--accent-line); text-decoration: none; }
.citation-meta { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.citation-meta span {
  display: grid; place-items: center; width: 16px; height: 16px; flex: none;
  border-radius: 4px; background: var(--accent-dim); color: var(--accent); font-size: 9px; font-weight: 700;
}
.citation-excerpt {
  margin-top: 5px; color: var(--text-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.followups { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.followup {
  border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface);
  color: var(--text-soft); font: inherit; font-size: 12px; padding: 6px 13px; cursor: pointer;
}
.followup:hover { border-color: var(--accent-line); color: var(--accent); }

.chat-composer-wrap { border-top: 1px solid var(--line); padding: 12px 16px 10px; background: var(--surface); }
.chat-composer {
  display: flex; gap: 10px; align-items: flex-end;
  border: 1px solid var(--line-strong); border-radius: 13px; background: var(--bg);
  padding: 9px 9px 9px 15px;
}
.chat-composer:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.chat-composer textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none;
  color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.5; max-height: 150px;
}
.chat-composer textarea::placeholder { color: var(--muted); }
.send-btn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent);
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.send-btn:hover { background: var(--accent-strong); }
.send-btn:disabled { opacity: 0.45; cursor: default; }
.composer-help { margin-top: 7px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; }

@media (max-width: 860px) {
  .ask-layout { grid-template-columns: 1fr; height: auto; }
  .thread-panel { max-height: 200px; }
  .chat-stage { min-height: 62vh; }
  .user-bubble, .chat-message.assistant { max-width: 100%; }
}
