/*
 * Shared dashboard styles for every page (index / performance / portfolio /
 * activity / system). Linked once via `/static/common.css`.
 *
 * This file is the DESIGN-TOKEN + COMPONENT layer of the 2026-07 revamp
 * (docs/DASHBOARD.md): CSS custom properties for surfaces/ink plus the small
 * set of hand-written component classes every page composes (.panel, .tile,
 * .panel-fold, .hint-fold, .tbl-sticky). Utility classes belong to the
 * Tailwind build (`/static/tw.css`) — keep this file lean and hand-written.
 *
 * Test-pinned literals (tests/unit/test_dashboard_styles.py): `[x-cloak]`,
 * `.mono`, `.pulse`, `@keyframes pulse`, `.line-clamp-3`.
 */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;
  --app-max: 3200px;
  --app-gutter: clamp(14px, 1.7vw, 40px);
  --surface-page: #070a0f;
  --surface-card: rgb(17 23 33 / 0.78);
  --surface-card-solid: #111721;
  --surface-inset: rgb(7 10 15 / 0.62);
  --edge-card: rgb(148 163 184 / 0.12);
  --edge-card-hover: rgb(148 163 184 / 0.24);
  --edge-hairline: rgb(148 163 184 / 0.12);
  /* Ink */
  --ink-primary: #f4f4f5;   /* zinc-100 */
  --ink-secondary: #a1a1aa; /* zinc-400 */
  --ink-muted: #71717a;     /* zinc-500 */
  /* Status accents (fixed vocabulary: good=emerald bad=rose warn=amber info=sky) */
  --accent-up: #10b981;     /* emerald-500 */
  --accent-down: #f43f5e;   /* rose-500 */
  --accent-warn: #f59e0b;   /* amber-500 */
  --accent-info: #0ea5e9;   /* sky-500 */
  --focus-ring: rgb(16 185 129 / 0.6);
}

/* ---------- Base ---------- */
body {
  font-family: Inter, Aptos, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: var(--surface-page);
  color: var(--ink-primary);
  background-image:
    radial-gradient(1100px 620px at 16% -220px, rgb(16 185 129 / 0.12), transparent 68%),
    radial-gradient(900px 560px at 96% 2%, rgb(14 165 233 / 0.09), transparent 64%),
    linear-gradient(180deg, #080c13 0%, #070a0f 44%, #080a0e 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
*, *::before, *::after { box-sizing: border-box; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
[x-cloak] { display: none !important; }
.line-clamp-3 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.visually-hidden { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* Keyboard-visible focus, invisible to mouse clicks. */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Refined scrollbars (page + overflow-x-auto tables). */
* { scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #52525b; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- Components ----------
 * Declared inside `@layer components` so page-level Tailwind utilities (the
 * `utilities` layer in tw.css, declared later in the layer order) can
 * override them from markup — e.g. `:class="pnlBorder(...)"` re-tinting a
 * `.panel` border. tw.css MUST be linked before this file. */
@layer components {

/* Card: the standard content panel. */
.panel {
  position: relative;
  background:
    linear-gradient(145deg, rgb(19 27 39 / 0.9), rgb(11 17 25 / 0.82)),
    var(--surface-card);
  border: 1px solid var(--edge-card);
  border-radius: 1rem;
  box-shadow: inset 0 1px rgb(255 255 255 / 0.035), 0 18px 60px rgb(0 0 0 / 0.14);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.panel:hover { border-color: var(--edge-card-hover); box-shadow: inset 0 1px rgb(255 255 255 / 0.045), 0 22px 70px rgb(0 0 0 / 0.18); }

/* Stat tile: label · value · optional delta/sparkline (inner radius). */
.tile {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgb(18 26 38 / 0.9), rgb(11 17 25 / 0.8));
  border: 1px solid var(--edge-card);
  border-radius: 1rem;
  padding: 0.875rem 1rem;
  box-shadow: inset 0 1px rgb(255 255 255 / 0.025), 0 12px 34px rgb(0 0 0 / 0.09);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.tile:hover { border-color: var(--edge-card-hover); box-shadow: inset 0 1px rgb(255 255 255 / 0.035), 0 18px 44px rgb(0 0 0 / 0.14); transform: translateY(-2px); }

/* Collapsible secondary panel: <details class="panel-fold"> with a rotating
 * chevron on its <summary>. Open state persists via foldOpen()/toggleFold(). */
.panel-fold {
  background: linear-gradient(145deg, rgb(16 23 33 / 0.82), rgb(10 15 22 / 0.76));
  border: 1px solid var(--edge-card);
  border-radius: 0.75rem;
  transition: border-color 0.15s ease;
}
.panel-fold:hover { border-color: var(--edge-card-hover); }
.panel-fold > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--ink-secondary);
  user-select: none;
  min-height: 48px;
}
.panel-fold > summary::-webkit-details-marker { display: none; }
.panel-fold > summary::before {
  content: '';
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid var(--ink-muted);
  border-bottom: 1.5px solid var(--ink-muted);
  transform: rotate(-45deg); /* chevron points right when closed */
  transition: transform 0.15s ease;
}
.panel-fold[open] > summary::before { transform: rotate(45deg); } /* points down */
.panel-fold > *:not(summary) { padding: 0 1rem 1rem; }

/* Footnote fold: visible collapsible for decision-rule prose under a panel. */
.hint-fold {
  border-top: 1px solid var(--edge-hairline);
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.hint-fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0 0.25rem;
  user-select: none;
}
.hint-fold > summary::-webkit-details-marker { display: none; }
.hint-fold > summary::before {
  content: '▸ ';
  color: var(--ink-muted);
  display: inline-block;
  transition: transform 0.15s ease;
}
.hint-fold[open] > summary::before { content: '▾ '; }
.hint-fold[open] { padding-bottom: 0.5rem; }

/* Sticky table header for tall tables (pair with overflow container). */
.tbl-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-card-solid);
  box-shadow: 0 1px 0 var(--edge-hairline);
}

} /* end @layer components */

/* ========================================================================== */
/* Executive overview                                                         */
/* ========================================================================== */

.dashboard-home {
  --home-text: #f8fafc;
  --home-secondary: #a8b3c5;
  --home-muted: #718096;
  --home-card: rgb(15 21 31 / 0.82);
  --home-card-strong: rgb(18 25 36 / 0.94);
  --home-line: rgb(148 163 184 / 0.14);
  --home-up: #34d399;
  --home-down: #fb7185;
  --home-violet: #a78bfa;
  --home-cyan: #38bdf8;
  min-width: 320px;
  overflow-x: hidden;
}

.dashboard-home::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgb(148 163 184 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(148 163 184 / 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 52%);
}

.dashboard-home button,
.dashboard-home summary { cursor: pointer; }

.app-frame { min-height: 100vh; }
.app-width {
  width: min(var(--app-max), calc(100% - var(--app-gutter) - var(--app-gutter)));
  margin-inline: auto;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgb(148 163 184 / 0.1);
  background: rgb(7 10 15 / 0.76);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.16);
  backdrop-filter: blur(22px) saturate(135%);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--app-max), calc(100% - var(--app-gutter) - var(--app-gutter)));
  height: 70px;
  margin-inline: auto;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #06100d;
  border: 1px solid rgb(110 231 183 / 0.85);
  border-radius: 11px;
  background: linear-gradient(145deg, #6ee7b7, #10b981);
  box-shadow: 0 0 0 5px rgb(52 211 153 / 0.07), 0 0 28px rgb(52 211 153 / 0.3);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-word { color: var(--home-text); font-size: 19px; font-weight: 760; letter-spacing: -0.035em; }
.brand-version { color: #536176; font-family: ui-monospace, monospace; font-size: 10px; }

.header-status { display: flex; align-items: center; gap: 12px; }
.mode-pill,
.market-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  color: var(--home-secondary);
  background: rgb(15 23 34 / 0.72);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.mode-live { color: #fecdd3; border-color: rgb(251 113 133 / 0.35); background: rgb(76 5 25 / 0.48); }
.mode-paper { color: #9aa6b8; }
.market-pill .status-dot,
.crew-health .status-dot,
.attention-row .status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: #586578;
  box-shadow: 0 0 0 4px rgb(88 101 120 / 0.1);
}
.market-pill.is-open { color: #a7f3d0; border-color: rgb(52 211 153 / 0.2); background: rgb(6 78 59 / 0.18); }
.market-pill.is-open .status-dot { background: var(--home-up); box-shadow: 0 0 0 4px rgb(52 211 153 / 0.1), 0 0 14px rgb(52 211 153 / 0.75); animation: live-breathe 2.4s ease-in-out infinite; }
.refresh-time { color: #64748b; font-family: ui-monospace, monospace; font-size: 10px; }
.refresh-time.is-stale { color: #fda4af; }
.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #718096;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: 160ms ease;
}
.icon-button:hover { color: #dbe4f0; border-color: var(--home-line); background: rgb(30 41 59 / 0.55); }
.icon-button.needs-attention { color: #fbbf24; border-color: rgb(251 191 36 / 0.24); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:disabled { cursor: wait; opacity: 0.7; }
.sync-button.is-syncing { color: #7dd3fc; border-color: rgb(56 189 248 / 0.2); background: rgb(14 116 144 / 0.12); }
.sync-button.is-syncing svg { animation: spin 0.85s linear infinite; }

.app-nav {
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  margin-top: 18px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid rgb(148 163 184 / 0.1);
  border-radius: 14px;
  background: rgb(12 17 25 / 0.62);
  box-shadow: inset 0 1px rgb(255 255 255 / 0.025);
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 0 14px;
  color: #7e8ba0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: 160ms ease;
}
.nav-link svg { width: 16px; height: 16px; }
.nav-link:hover { color: #dbe4f0; background: rgb(30 41 59 / 0.42); }
.nav-link.active { color: #d8fff0; background: linear-gradient(135deg, rgb(6 78 59 / 0.7), rgb(15 118 110 / 0.32)); box-shadow: inset 0 0 0 1px rgb(52 211 153 / 0.18), 0 8px 24px rgb(3 40 31 / 0.24); }

.dashboard-main { padding-top: 34px; padding-bottom: 40px; }
.detail-page { min-width: 0; }
.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 22px;
  animation: deck-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.page-intro h1 {
  margin-top: 5px;
  color: var(--home-text);
  font-size: clamp(30px, 3.1vw, 48px);
  font-weight: 735;
  line-height: 1.02;
  letter-spacing: -0.052em;
}
.page-intro p { max-width: 68ch; margin-top: 9px; color: var(--home-secondary); font-size: 14px; line-height: 1.55; }
.page-intro-orb {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 9px;
  padding: 0 14px;
  color: #9fb0c4;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: rgb(13 20 30 / 0.7);
  box-shadow: inset 0 1px rgb(255 255 255 / 0.025);
  font-size: 12px;
  white-space: nowrap;
}
.page-intro-orb .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 15px rgb(56 189 248 / 0.65); }
.detail-hero { overflow: hidden; border-radius: 22px; background: radial-gradient(720px 300px at 0 0, rgb(16 185 129 / 0.1), transparent 66%), linear-gradient(145deg, rgb(20 29 42 / 0.95), rgb(10 15 23 / 0.9)); animation: deck-rise 0.58s 0.04s cubic-bezier(0.22, 1, 0.36, 1) both; }
.performance-page .detail-hero { background: radial-gradient(760px 330px at 0 0, rgb(16 185 129 / 0.1), transparent 66%), radial-gradient(620px 280px at 100% 0, rgb(56 189 248 / 0.07), transparent 70%), linear-gradient(145deg, rgb(20 29 42 / 0.95), rgb(10 15 23 / 0.9)); }
.portfolio-page .detail-hero { background: radial-gradient(720px 320px at 0 0, rgb(167 139 250 / 0.09), transparent 67%), linear-gradient(145deg, rgb(20 28 41 / 0.95), rgb(10 15 23 / 0.9)); }
.activity-page .detail-hero { background: radial-gradient(720px 320px at 0 0, rgb(56 189 248 / 0.1), transparent 67%), linear-gradient(145deg, rgb(20 28 41 / 0.95), rgb(10 15 23 / 0.9)); }
.detail-hero-layout { display: grid !important; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); align-items: end; }
.detail-hero-aside { min-width: 0; flex-wrap: wrap; }
.extended-hero-metric { min-width: 150px; }
.detail-stat-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important; }
.detail-page .panel,
.detail-page .panel-fold,
.detail-page .tile { border-color: rgb(148 163 184 / 0.13); }
.detail-page .panel > :is(p, div) { min-width: 0; }
.detail-page [class~="text-[10px]"],
.detail-page [class~="text-[11px]"] { font-size: 0.75rem; }
.detail-page .text-xs { font-size: 0.8125rem; }
.detail-page table { font-size: 0.8125rem; }
.detail-page table th { letter-spacing: 0.055em; }
.detail-page table :is(th, td) { height: 38px; }
.detail-page button { min-height: 36px; }
.briefing-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.briefing-grid .panel > p { max-width: 72ch; }
.benchmark-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }
.detail-page .health-strip { background: linear-gradient(120deg, rgb(6 78 59 / 0.08), rgb(14 21 30 / 0.78)); }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { color: #7dd3fc; font-size: 10px; font-weight: 750; letter-spacing: 0.17em; text-transform: uppercase; }
.welcome-row h1 { margin-top: 5px; color: var(--home-text); font-size: clamp(28px, 3.4vw, 42px); font-weight: 720; line-height: 1.06; letter-spacing: -0.045em; }
.welcome-row p { max-width: 68ch; margin-top: 8px; color: var(--home-secondary); font-size: 14px; }
.autonomy-pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; color: #9ba9bd; border: 1px solid var(--home-line); border-radius: 999px; background: rgb(15 23 34 / 0.66); font-size: 12px; white-space: nowrap; }
.autonomy-pill strong { color: #dbe7f3; font-weight: 650; }
.autonomy-spark { position: relative; width: 8px; height: 8px; border-radius: 999px; background: #34d399; box-shadow: 0 0 15px #34d399; }
.autonomy-spark::after { position: absolute; inset: -5px; content: ""; border: 1px solid rgb(52 211 153 / 0.3); border-radius: inherit; animation: radar-ping 2.2s ease-out infinite; }
.autonomy-pill.hunter-degraded,.autonomy-pill.hunter-stale { color: #fcd34d; border-color: rgb(251 191 36 / 0.2); }
.autonomy-pill.hunter-degraded .autonomy-spark,.autonomy-pill.hunter-stale .autonomy-spark { background: #fbbf24; box-shadow: 0 0 15px rgb(251 191 36 / 0.7); }
.autonomy-pill.hunter-offline { color: #fda4af; border-color: rgb(251 113 133 / 0.22); }
.autonomy-pill.hunter-offline .autonomy-spark { background: #fb7185; box-shadow: 0 0 15px rgb(251 113 133 / 0.65); }

.human-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 12px 14px; color: #dbe4f0; border: 1px solid; border-radius: 13px; background: rgb(15 23 34 / 0.9); font-size: 12px; }
.human-banner div { flex: 1; }.human-banner span { color: #9ba9bd; }.human-banner a { font-weight: 650; text-decoration: none; }
.banner-icon { display: grid; width: 22px; height: 22px; flex: none; place-items: center; color: inherit !important; border-radius: 999px; font-weight: 800; }
.danger-banner { border-color: rgb(251 113 133 / 0.32); background: rgb(76 5 25 / 0.34); }.danger-banner .banner-icon { background: rgb(251 113 133 / 0.18); }.danger-banner a { color: #fda4af; }
.warning-banner { border-color: rgb(251 191 36 / 0.28); background: rgb(69 26 3 / 0.3); }.warning-banner .banner-icon { background: rgb(251 191 36 / 0.16); }.warning-banner a { color: #fcd34d; }
.loading-banner { border-color: rgb(56 189 248 / 0.2); }.loading-ring { width: 17px; height: 17px; border: 2px solid rgb(56 189 248 / 0.24); border-top-color: #38bdf8; border-radius: 50%; animation: spin 0.9s linear infinite; }

.profit-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(310px, 0.84fr) minmax(420px, 1.36fr);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgb(52 211 153 / 0.22);
  border-radius: 24px;
  background:
    linear-gradient(125deg, rgb(6 78 59 / 0.32), transparent 42%),
    linear-gradient(155deg, rgb(18 27 39 / 0.98), rgb(10 15 23 / 0.94));
  box-shadow: 0 32px 100px rgb(0 0 0 / 0.28), inset 0 1px rgb(255 255 255 / 0.045), 0 0 80px rgb(16 185 129 / 0.06);
}
.profit-hero.profit-down { border-color: rgb(251 113 133 / 0.24); background: linear-gradient(125deg, rgb(136 19 55 / 0.2), transparent 42%), linear-gradient(155deg, rgb(24 23 33 / 0.98), rgb(12 14 22 / 0.94)); box-shadow: 0 32px 100px rgb(0 0 0 / 0.28), inset 0 1px rgb(255 255 255 / 0.04), 0 0 80px rgb(244 63 94 / 0.05); }
.profit-hero.profit-flat { border-color: rgb(148 163 184 / 0.14); }
.hero-glow { position: absolute; width: 360px; height: 360px; top: -210px; left: -90px; pointer-events: none; border-radius: 50%; background: rgb(52 211 153 / 0.23); filter: blur(80px); animation: glow-drift 8s ease-in-out infinite alternate; }
.profit-down .hero-glow { background: rgb(251 113 133 / 0.18); }
.profit-summary { position: relative; z-index: 1; display: flex; flex-direction: column; padding: 38px 18px 30px 38px; }
.hero-label-row { display: flex; align-items: center; gap: 9px; }
.hero-kicker { color: #d6e3ee; font-size: 13px; font-weight: 680; }
.hero-period { padding: 4px 7px; color: #708098; border: 1px solid var(--home-line); border-radius: 6px; font-size: 9px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; }
.hero-number { margin-top: 17px; color: var(--home-up); font-size: clamp(54px, 6vw, 82px); font-weight: 760; line-height: 0.92; letter-spacing: -0.072em; font-variant-numeric: tabular-nums; text-shadow: 0 0 35px rgb(52 211 153 / 0.16); }
.profit-down .hero-number { color: var(--home-down); text-shadow: 0 0 35px rgb(251 113 133 / 0.14); }
.profit-flat .hero-number { color: #e8edf4; text-shadow: none; }
.hero-change-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.return-badge { padding: 5px 8px; border: 1px solid currentColor; border-radius: 8px; font-size: 11px; font-weight: 720; font-variant-numeric: tabular-nums; opacity: 0.92; }
.hero-equity { color: #77869a; font-size: 11px; }.hero-equity strong { color: #b7c3d2; font-weight: 620; font-variant-numeric: tabular-nums; }
.hero-story { max-width: 400px; margin-top: 24px; color: #b4c0d0; font-size: 14px; line-height: 1.6; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: auto; padding-top: 28px; }
.hero-facts div { min-width: 0; padding-left: 11px; border-left: 1px solid rgb(148 163 184 / 0.15); }
.hero-facts span { display: block; overflow: hidden; color: #68788e; font-size: 9px; font-weight: 650; letter-spacing: 0.08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.hero-facts strong { display: block; margin-top: 4px; overflow: hidden; color: #dfe7f1; font-size: 15px; font-weight: 680; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

.equity-chart-wrap { position: relative; display: flex; min-width: 0; flex-direction: column; margin: 20px; padding: 22px 22px 14px; overflow: hidden; border: 1px solid rgb(148 163 184 / 0.11); border-radius: 18px; background: linear-gradient(180deg, rgb(7 12 19 / 0.56), rgb(7 10 15 / 0.22)); box-shadow: inset 0 1px rgb(255 255 255 / 0.025); }
.chart-heading { display: flex; position: relative; z-index: 2; align-items: center; justify-content: space-between; gap: 16px; }
.chart-heading > div:first-child { display: flex; flex-direction: column; }.chart-title { color: #718096; font-size: 10px; font-weight: 680; letter-spacing: 0.1em; text-transform: uppercase; }.chart-heading strong { margin-top: 2px; color: #dce5ef; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.range-switcher { display: flex; gap: 2px; padding: 3px; border: 1px solid rgb(148 163 184 / 0.1); border-radius: 9px; background: rgb(7 10 15 / 0.5); }
.range-switcher button { min-width: 32px; padding: 4px 6px; color: #64748b; border-radius: 6px; font-size: 9px; font-weight: 680; }.range-switcher button:hover { color: #cbd5e1; }.range-switcher button.active { color: #e7fff6; background: rgb(16 185 129 / 0.17); box-shadow: inset 0 0 0 1px rgb(52 211 153 / 0.12); }
.hero-chart { position: relative; min-height: 230px; flex: 1; margin-top: 14px; cursor: crosshair; touch-action: pan-y; }.hero-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }.chart-grid-line { stroke: rgb(148 163 184 / 0.09); stroke-width: 1; vector-effect: non-scaling-stroke; }.chart-equity-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.keyboard-chart { touch-action: pan-y; }
.chart-crosshair { position: absolute; inset-block: 0; width: 1px; pointer-events: none; background: linear-gradient(to bottom, transparent, rgb(203 213 225 / 0.55), transparent); }.chart-point { position: absolute; width: 10px; height: 10px; pointer-events: none; border: 2px solid #071019; border-radius: 50%; box-shadow: 0 0 14px currentColor; transform: translate(-50%, -50%); }.chart-tooltip { position: absolute; top: 5px; padding: 6px 8px; color: #e2e8f0; pointer-events: none; border: 1px solid rgb(148 163 184 / 0.2); border-radius: 8px; background: rgb(7 10 15 / 0.92); box-shadow: 0 8px 28px rgb(0 0 0 / 0.38); font-family: ui-monospace, monospace; font-size: 9px; white-space: nowrap; transform: translateX(-50%); }
.chart-axis { display: flex; justify-content: space-between; color: #536176; font-family: ui-monospace, monospace; font-size: 9px; }.chart-empty { display: grid; min-height: 230px; place-items: center; color: #65758a; font-size: 12px; text-align: center; }

.metric-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.metric-card { position: relative; display: flex; min-height: 112px; align-items: center; gap: 14px; padding: 18px; overflow: hidden; border: 1px solid var(--home-line); border-radius: 17px; background: linear-gradient(145deg, rgb(18 25 36 / 0.88), rgb(12 17 25 / 0.82)); box-shadow: inset 0 1px rgb(255 255 255 / 0.03), 0 14px 36px rgb(0 0 0 / 0.11); transition: transform 180ms ease, border-color 180ms ease; }
.metric-card:hover { border-color: rgb(148 163 184 / 0.24); transform: translateY(-2px); }.metric-card.metric-up { border-color: rgb(52 211 153 / 0.16); }.metric-card.metric-down { border-color: rgb(251 113 133 / 0.18); }
.metric-icon { display: grid; width: 38px; height: 38px; flex: none; place-items: center; color: #79d9fb; border: 1px solid rgb(56 189 248 / 0.16); border-radius: 12px; background: rgb(14 116 144 / 0.12); }.metric-icon svg { width: 20px; height: 20px; }.metric-icon-week { color: #c4b5fd; border-color: rgb(167 139 250 / 0.17); background: rgb(91 33 182 / 0.12); font-size: 10px; font-weight: 800; }
.metric-copy { min-width: 0; }.metric-label { display: block; color: #93a1b4; font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }.metric-copy strong { display: block; margin-top: 4px; overflow: hidden; color: #e7edf5; font-size: 23px; font-weight: 680; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }.metric-up .metric-copy strong { color: #6ee7b7; }.metric-down .metric-copy strong { color: #fda4af; }.metric-copy small { display: block; margin-top: 3px; overflow: hidden; color: #8492a6; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.north-star-card { background: linear-gradient(135deg, rgb(15 118 110 / 0.16), rgb(18 25 36 / 0.9) 60%); }.north-star-tag { position: absolute; top: 10px; right: 10px; padding: 3px 6px; color: #a7f3d0; border: 1px solid rgb(52 211 153 / 0.15); border-radius: 6px; background: rgb(6 78 59 / 0.25); font-size: 8px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(360px, 0.86fr); gap: 14px; margin-top: 14px; }
.focus-card { overflow: hidden; border: 1px solid var(--home-line); border-radius: 19px; background: linear-gradient(145deg, var(--home-card-strong), var(--home-card)); box-shadow: inset 0 1px rgb(255 255 255 / 0.03), 0 22px 52px rgb(0 0 0 / 0.13); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 24px 18px; }.card-heading h2 { margin-top: 4px; color: #ecf1f7; font-size: 20px; font-weight: 680; line-height: 1.2; letter-spacing: -0.025em; }.card-heading p { max-width: 68ch; margin-top: 5px; color: #7f8da1; font-size: 12px; line-height: 1.45; }.text-link { margin-top: 3px; color: #82e6c0; font-size: 11px; font-weight: 650; white-space: nowrap; }.text-link span { display: inline-block; margin-left: 2px; transition: transform 160ms ease; }.text-link:hover span { transform: translateX(3px); }

.positions-list { padding: 0 24px; }.position-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(80px, 0.7fr) minmax(150px, auto); align-items: center; gap: 18px; min-height: 68px; border-top: 1px solid rgb(148 163 184 / 0.09); }.position-identity { display: flex; align-items: baseline; min-width: 0; gap: 9px; }.ticker { color: #eef3f8; font-family: ui-monospace, monospace; font-size: 13px; font-weight: 760; }.position-value { color: #68778c; font-size: 10px; font-variant-numeric: tabular-nums; }.lock-mark { padding: 2px 5px; color: #7dd3fc; border-radius: 5px; background: rgb(14 116 144 / 0.13); font-size: 8px; font-weight: 650; text-transform: uppercase; }.position-track { height: 4px; overflow: hidden; border-radius: 999px; background: rgb(148 163 184 / 0.09); }.position-track span { display: block; height: 100%; min-width: 8px; border-radius: inherit; }.position-track .is-up { background: linear-gradient(90deg, #059669, #6ee7b7); box-shadow: 0 0 10px rgb(52 211 153 / 0.28); }.position-track .is-down { background: linear-gradient(90deg, #be123c, #fb7185); box-shadow: 0 0 10px rgb(251 113 133 / 0.22); }.position-return-stack { display: flex; min-width: 0; flex-direction: column; align-items: flex-end; gap: 3px; }.position-return { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; font-variant-numeric: tabular-nums; }.position-return strong { font-size: 13px; font-weight: 680; }.position-return span { width: 58px; font-size: 10px; text-align: right; opacity: 0.78; }.position-session-move { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0.86; }.position-session-move::before { width: 4px; height: 4px; content: ""; border-radius: 999px; background: currentColor; box-shadow: 0 0 8px currentColor; }.position-session-move strong { font-size: 10px; font-weight: 680; }.position-session-label-full { color: #7dd3fc; font-weight: 650; }.position-session-label-short { display: none; color: #7dd3fc; font-weight: 700; letter-spacing: 0.05em; }
.positions-total { display: flex; align-items: center; justify-content: space-between; margin: 12px 24px 22px; padding: 14px 0 0; color: #7d8ca1; border-top: 1px solid rgb(148 163 184 / 0.11); font-size: 11px; }.positions-total strong { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }.positions-session-total { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -15px 24px 22px; color: #7694aa; font-size: 10px; }.positions-session-total > span { min-width: 0; }.positions-session-total small { margin-left: 6px; color: #52667a; font-size: 9px; }.positions-session-total strong { flex: none; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.extended-move-cell { min-width: 9rem; white-space: nowrap; }
.friendly-empty { display: grid; min-height: 230px; place-items: center; align-content: center; gap: 5px; padding: 24px; color: #6f7e92; text-align: center; }.friendly-empty strong { color: #cbd5e1; font-size: 14px; }.friendly-empty p { color: #6f7e92; font-size: 11px; }.empty-orb { display: grid; width: 42px; height: 42px; margin-bottom: 8px; place-items: center; color: #6ee7b7; border: 1px solid rgb(52 211 153 / 0.17); border-radius: 50%; background: rgb(6 78 59 / 0.15); }.friendly-empty.compact { min-height: 160px; }.friendly-empty.horizontal { display: flex; min-height: 100px; justify-content: center; text-align: left; }

.research-focus { scroll-margin-top: 90px; background: radial-gradient(460px 280px at 100% 0, rgb(124 58 237 / 0.1), transparent 68%), linear-gradient(145deg, var(--home-card-strong), var(--home-card)); }.research-heading { padding-bottom: 14px; }.crew-health { display: inline-flex; align-items: center; flex: none; gap: 7px; margin-top: 2px; padding: 6px 9px; color: #94a3b8; border: 1px solid var(--home-line); border-radius: 999px; background: rgb(7 10 15 / 0.35); font-size: 9px; font-weight: 680; }.crew-health.crew-healthy { color: #a7f3d0; border-color: rgb(52 211 153 / 0.2); }.crew-health.crew-healthy .status-dot { background: #34d399; box-shadow: 0 0 10px rgb(52 211 153 / 0.55); }.crew-health.crew-degraded,.crew-health.crew-stale { color: #fcd34d; border-color: rgb(251 191 36 / 0.2); }.crew-health.crew-degraded .status-dot,.crew-health.crew-stale .status-dot { background: #fbbf24; }.crew-health.crew-critical { color: #fda4af; border-color: rgb(251 113 133 / 0.2); }.crew-health.crew-critical .status-dot { background: #fb7185; }
.latest-brief { display: flex; align-items: center; gap: 11px; margin: 0 20px 8px; padding: 11px; border: 1px solid rgb(148 163 184 / 0.1); border-radius: 12px; background: rgb(7 10 15 / 0.3); }.latest-brief.has-quorum { border-color: rgb(167 139 250 / 0.16); background: rgb(76 29 149 / 0.08); }.brief-icon { display: grid; width: 30px; height: 30px; flex: none; place-items: center; color: #c4b5fd; border-radius: 9px; background: rgb(91 33 182 / 0.15); }.brief-icon svg { width: 17px; height: 17px; }.latest-brief > div:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }.latest-brief span { color: #8492a6; font-size: 10px; font-weight: 680; letter-spacing: 0.08em; text-transform: uppercase; }.latest-brief strong { margin-top: 2px; overflow: hidden; color: #cdd6e2; font-size: 12px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }.latest-brief .brief-age { flex: none; color: #8290a4; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: 0; text-transform: none; }
.crew-list { padding: 0 20px 8px; }.crew-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 62px; border-bottom: 1px solid rgb(148 163 184 / 0.08); }.crew-row:last-child { border-bottom: 0; }.agent-avatar { display: grid; width: 34px; height: 34px; place-items: center; color: #dce7f5; border: 1px solid rgb(148 163 184 / 0.16); border-radius: 11px; background: rgb(30 41 59 / 0.65); font-size: 11px; font-weight: 800; box-shadow: inset 0 1px rgb(255 255 255 / 0.05); }.agent-xai { color: #e2e8f0; background: linear-gradient(145deg, #334155, #111827); }.agent-google { color: #bae6fd; border-color: rgb(56 189 248 / 0.2); background: linear-gradient(145deg, rgb(3 105 161 / 0.55), rgb(30 64 175 / 0.32)); }.agent-openai { color: #a7f3d0; border-color: rgb(52 211 153 / 0.2); background: linear-gradient(145deg, rgb(5 150 105 / 0.45), rgb(6 78 59 / 0.3)); }.agent-anthropic { color: #fed7aa; border-color: rgb(251 146 60 / 0.2); background: linear-gradient(145deg, rgb(194 65 12 / 0.38), rgb(124 45 18 / 0.3)); }
.agent-copy { min-width: 0; }.agent-name-row { display: flex; align-items: baseline; gap: 7px; }.agent-name-row strong { color: #dbe4ef; font-size: 12px; font-weight: 650; }.agent-name-row span { color: #8290a4; font-family: ui-monospace, monospace; font-size: 10px; }.agent-copy small { display: block; margin-top: 2px; overflow: hidden; color: #8d9aae; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.agent-result { display: flex; align-items: flex-end; flex-direction: column; }.agent-state { padding: 3px 6px; border-radius: 6px; font-size: 10px; font-weight: 680; text-transform: capitalize; }.agent-state.is-healthy { color: #a7f3d0; background: rgb(6 78 59 / 0.3); }.agent-state.is-error { color: #fda4af; background: rgb(136 19 55 / 0.23); }.agent-state.is-waiting { color: #a4b0c0; background: rgb(51 65 85 / 0.3); }.agent-result small { margin-top: 3px; color: #8290a4; font-size: 10px; font-variant-numeric: tabular-nums; }.agent-issue { margin-top: 5px; color: #fda4af; font-size: 10px; line-height: 1.35; }
.research-boundary { display: flex; align-items: center; gap: 8px; margin: 4px 20px 20px; padding-top: 12px; color: #8492a6; border-top: 1px solid rgb(148 163 184 / 0.09); font-size: 10px; line-height: 1.45; }.research-boundary svg { width: 15px; height: 15px; flex: none; color: #6ee7b7; }

.radar-card { margin-top: 14px; }.radar-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-top: 1px solid rgb(148 163 184 / 0.09); background: rgb(148 163 184 / 0.08); }.radar-item { position: relative; min-height: 145px; padding: 20px; overflow: hidden; background: rgb(13 19 28 / 0.98); transition: background 160ms ease; }.radar-item:hover { background: rgb(19 28 40 / 0.98); }.radar-rank { position: absolute; top: 9px; right: 12px; color: rgb(148 163 184 / 0.13); font-size: 34px; font-weight: 800; letter-spacing: -0.06em; }.radar-symbol-row { position: relative; display: flex; align-items: center; gap: 9px; }.radar-symbol-row strong { color: #ecf5fb; font-family: ui-monospace, monospace; font-size: 17px; font-weight: 760; letter-spacing: -0.02em; }.heat-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; color: #a7f3d0; border-radius: 6px; background: rgb(6 78 59 / 0.28); font-family: ui-monospace, monospace; font-size: 9px; font-weight: 680; }.heat-flame { color: #fbbf24; font-size: 7px; }.radar-item p { position: relative; display: -webkit-box; margin-top: 14px; overflow: hidden; color: #8d9aae; font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.overview-lower-grid,
.system-operations-grid { display: contents; }

.attention-card { margin-top: 14px; padding: 20px 22px; border: 1px solid; border-radius: 17px; }.attention-card.all-clear { border-color: rgb(52 211 153 / 0.14); background: linear-gradient(120deg, rgb(6 78 59 / 0.13), rgb(14 21 30 / 0.78)); }.attention-card.needs-action { border-color: rgb(251 191 36 / 0.2); background: linear-gradient(120deg, rgb(120 53 15 / 0.15), rgb(14 21 30 / 0.82)); }.attention-heading { display: flex; align-items: center; gap: 12px; }.attention-icon { display: grid; width: 36px; height: 36px; place-items: center; color: #a7f3d0; border: 1px solid rgb(52 211 153 / 0.18); border-radius: 11px; background: rgb(6 78 59 / 0.2); font-size: 15px; font-weight: 800; }.needs-action .attention-icon { color: #fcd34d; border-color: rgb(251 191 36 / 0.2); background: rgb(120 53 15 / 0.2); }.attention-heading h2 { margin-top: 3px; color: #dfe7f1; font-size: 15px; font-weight: 650; }.attention-count { display: grid; width: 24px; height: 24px; margin-left: auto; place-items: center; color: #fcd34d; border-radius: 50%; background: rgb(120 53 15 / 0.35); font-size: 10px; font-weight: 800; }.all-clear-copy { margin: 8px 0 0 48px; color: #74849a; font-size: 11px; }.attention-list { margin: 12px 0 0 48px; }.attention-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; color: #aab7c7; border-top: 1px solid rgb(148 163 184 / 0.08); font-size: 10px; }.attention-row > span:nth-child(2) { min-width: 0; flex: 1; }.attention-row .status-dot { background: #fbbf24; box-shadow: 0 0 0 4px rgb(251 191 36 / 0.08); }.attention-row a { margin-left: auto; color: #fcd34d; font-weight: 650; white-space: nowrap; }

.numbers-drawer { margin-top: 14px; overflow: hidden; border: 1px solid rgb(148 163 184 / 0.1); border-radius: 15px; background: rgb(11 16 23 / 0.58); }.numbers-drawer summary { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 15px 18px; color: #8e9caf; list-style: none; font-size: 11px; font-weight: 620; }.numbers-drawer summary::-webkit-details-marker { display: none; }.numbers-drawer summary::after { margin-left: auto; content: "+"; color: #607086; font-size: 16px; font-weight: 400; }.numbers-drawer[open] summary::after { content: "−"; }.numbers-drawer summary small { color: #536176; font-size: 9px; font-weight: 450; }.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-block: 1px solid rgb(148 163 184 / 0.08); background: rgb(148 163 184 / 0.08); }.numbers-grid > div { padding: 16px; background: rgb(11 16 23 / 0.94); }.numbers-grid span,.numbers-grid small { display: block; color: #65758a; font-size: 9px; }.numbers-grid strong { display: block; margin: 5px 0 3px; color: #dbe5ef; font-size: 16px; font-weight: 680; font-variant-numeric: tabular-nums; }.numbers-note { max-width: 68ch; padding: 13px 18px; color: #5f6e82; font-size: 9px; line-height: 1.5; }
.dashboard-footer { display: flex; align-items: center; gap: 8px; padding: 24px 4px 0; color: #526075; font-size: 10px; }.dashboard-footer a { margin-left: auto; color: #7890a4; }.dashboard-footer a:hover { color: #a7f3d0; }.footer-separator { color: #334155; }

/* System page: current-process health, with implementation detail folded. */
.system-welcome { margin-top: 28px; }
.system-hero { margin-bottom: 14px; padding: 26px; border: 1px solid rgb(52 211 153 / 0.18); border-radius: 21px; background: radial-gradient(520px 250px at 0 0, rgb(16 185 129 / 0.12), transparent 65%), linear-gradient(145deg, rgb(18 25 36 / 0.95), rgb(11 16 24 / 0.9)); box-shadow: 0 24px 70px rgb(0 0 0 / 0.18); }
.system-hero.system-warn { border-color: rgb(251 191 36 / 0.22); background: radial-gradient(520px 250px at 0 0, rgb(180 83 9 / 0.12), transparent 65%), linear-gradient(145deg, rgb(18 25 36 / 0.95), rgb(11 16 24 / 0.9)); }
.system-hero.system-pending,.system-hero.system-checking { border-color: rgb(56 189 248 / 0.18); background: radial-gradient(520px 250px at 0 0, rgb(14 116 144 / 0.1), transparent 65%), linear-gradient(145deg, rgb(18 25 36 / 0.95), rgb(11 16 24 / 0.9)); }
.system-hero.system-bad { border-color: rgb(251 113 133 / 0.24); background: radial-gradient(520px 250px at 0 0, rgb(190 24 93 / 0.1), transparent 65%), linear-gradient(145deg, rgb(22 24 34 / 0.95), rgb(11 16 24 / 0.9)); }
.system-hero-copy { display: flex; align-items: center; gap: 16px; }.system-orb { display: grid; width: 48px; height: 48px; flex: none; place-items: center; border: 1px solid rgb(52 211 153 / 0.2); border-radius: 15px; background: rgb(6 78 59 / 0.18); }.system-orb .status-dot { width: 11px; height: 11px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 7px rgb(52 211 153 / 0.08), 0 0 22px rgb(52 211 153 / 0.65); }.system-warn .system-orb { border-color: rgb(251 191 36 / 0.2); background: rgb(120 53 15 / 0.17); }.system-warn .system-orb .status-dot { background: #fbbf24; box-shadow: 0 0 0 7px rgb(251 191 36 / 0.08), 0 0 22px rgb(251 191 36 / 0.55); }.system-bad .system-orb { border-color: rgb(251 113 133 / 0.2); background: rgb(136 19 55 / 0.17); }.system-bad .system-orb .status-dot { background: #fb7185; box-shadow: 0 0 0 7px rgb(251 113 133 / 0.08), 0 0 22px rgb(251 113 133 / 0.55); }
.system-hero-copy h2 { margin-top: 4px; color: #eef4f9; font-size: clamp(24px, 3.3vw, 38px); font-weight: 720; line-height: 1.05; letter-spacing: -0.045em; }.system-hero-copy p { max-width: 68ch; margin-top: 7px; color: #8795a8; font-size: 12px; }
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }.status-card { min-width: 0; padding: 15px; border: 1px solid rgb(148 163 184 / 0.1); border-radius: 13px; background: rgb(7 10 15 / 0.28); }.status-card > span { display: block; color: #8492a6; font-size: 10px; font-weight: 680; letter-spacing: 0.08em; text-transform: uppercase; }.status-card strong { display: block; margin-top: 7px; overflow: hidden; color: #dbe4ee; font-size: 15px; font-weight: 660; text-overflow: ellipsis; white-space: nowrap; }.status-card small { display: block; margin-top: 4px; overflow: hidden; color: #8492a6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.status-card.status-good strong { color: #a7f3d0; }.status-card.status-warn strong { color: #fcd34d; }.status-card.status-bad strong { color: #fda4af; }
.system-research { margin-bottom: 14px; }.system-crew-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 14px; border-block: 1px solid rgb(148 163 184 / 0.08); background: rgb(148 163 184 / 0.08); }.system-agent { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 106px; padding: 17px 20px; background: rgb(13 19 28 / 0.97); }.system-agent .agent-state { align-self: start; }.agent-score { grid-column: 2 / 4; display: flex; align-items: baseline; gap: 7px; }.agent-score strong { color: #dbe4ef; font-size: 15px; font-weight: 680; }.agent-score span { color: #8492a6; font-size: 10px; }.system-research .research-boundary { margin-top: 12px; }
.system-budget { margin-top: 0; }.budget-list { padding: 6px 18px 17px; }.budget-row { display: grid; grid-template-columns: minmax(190px, 0.4fr) 1fr; align-items: center; gap: 20px; padding: 13px 0; border-top: 1px solid rgb(148 163 184 / 0.08); }.budget-row > div:first-child { display: flex; flex-direction: column; }.budget-row strong { color: #cdd7e3; font-family: ui-monospace, monospace; font-size: 11px; }.budget-row span { color: #66758a; font-size: 9px; }.budget-track { height: 5px; overflow: hidden; border-radius: 999px; background: rgb(148 163 184 / 0.1); }.budget-track > span { display: block; height: 100%; border-radius: inherit; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgb(3 6 10 / 0.78); backdrop-filter: blur(12px); }.modal-card { width: min(430px, 100%); padding: 28px; border: 1px solid rgb(148 163 184 / 0.18); border-radius: 20px; background: linear-gradient(145deg, #151d29, #0d131c); box-shadow: 0 30px 100px rgb(0 0 0 / 0.52); }.modal-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #6ee7b7; border: 1px solid rgb(52 211 153 / 0.2); border-radius: 13px; background: rgb(6 78 59 / 0.2); }.modal-icon svg { width: 21px; height: 21px; }.modal-card h2 { margin-top: 18px; color: #f1f5f9; font-size: 20px; font-weight: 680; letter-spacing: -0.03em; }.modal-card p { margin-top: 7px; color: #8b99ad; font-size: 12px; line-height: 1.55; }.token-input { width: 100%; margin-top: 20px; padding: 11px 12px; color: #e2e8f0; border: 1px solid rgb(148 163 184 / 0.18); border-radius: 10px; outline: none; background: rgb(3 7 12 / 0.62); font-family: ui-monospace, monospace; font-size: 12px; }.token-input:focus { border-color: rgb(52 211 153 / 0.55); box-shadow: 0 0 0 3px rgb(52 211 153 / 0.08); }.modal-error { margin-top: 8px; color: #fda4af; font-size: 10px; }.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 20px; }.button-quiet,.button-primary { padding: 8px 11px; border-radius: 8px; font-size: 10px; font-weight: 650; }.button-quiet { color: #8290a4; }.button-quiet:hover { color: #dbe4ef; background: rgb(51 65 85 / 0.28); }.button-primary { color: #052e22; background: #6ee7b7; box-shadow: 0 8px 20px rgb(16 185 129 / 0.18); }.button-primary:hover { background: #a7f3d0; }
.notice-toast { position: fixed; top: 82px; right: 22px; z-index: 55; max-width: 360px; padding: 11px 14px; border: 1px solid; border-radius: 11px; box-shadow: 0 18px 50px rgb(0 0 0 / 0.35); backdrop-filter: blur(16px); font-size: 11px; }.notice-ok { color: #a7f3d0; border-color: rgb(52 211 153 / 0.25); background: rgb(6 78 59 / 0.88); }.notice-error { color: #fecdd3; border-color: rgb(251 113 133 / 0.25); background: rgb(76 5 25 / 0.9); }

.button-quiet,.button-primary { min-height: 44px; }

@keyframes live-breathe { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.86); } }
@keyframes radar-ping { 0% { opacity: 0.75; transform: scale(0.6); } 80%,100% { opacity: 0; transform: scale(1.55); } }
@keyframes glow-drift { from { transform: translate3d(0, 0, 0) scale(0.95); } to { transform: translate3d(110px, 50px, 0) scale(1.15); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes deck-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes value-glint { 0% { filter: brightness(1); } 36% { filter: brightness(1.13) saturate(1.08); } 100% { filter: brightness(1); } }
.value-updated { animation: value-glint 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

@media (min-width: 1440px) {
  .activity-feed-grid { grid-template-columns: minmax(0, 7fr) minmax(420px, 5fr) !important; }
  .activity-feed-grid > * { grid-column: auto !important; }
  .system-crew-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .system-agent { grid-template-columns: 40px minmax(0, 1fr); align-content: start; }
  .system-agent .agent-state { grid-column: 2; justify-self: start; }
  .system-agent .agent-score { grid-column: 2; flex-direction: column; gap: 2px; }
  .briefing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1680px) {
  .radar-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1900px) {
  .briefing-grid { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

  .overview-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(380px, 1fr);
    align-items: stretch;
    gap: 14px;
    margin-top: 14px;
  }
  .overview-lower-grid > *,
  .system-operations-grid > * { min-width: 0; }
  .overview-lower-grid > .radar-card,
  .overview-lower-grid > .attention-card { margin-top: 0; }
  .overview-lower-grid > .attention-card { height: 100%; }

  .system-operations-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(360px, 1fr);
    align-items: start;
    gap: 14px;
    margin-bottom: 14px;
  }
  .system-operations-grid > .system-research,
  .system-operations-grid > .system-budget { margin: 0; }
}

@media (min-width: 2200px) {
  .profit-hero { min-height: 460px; grid-template-columns: minmax(440px, 560px) minmax(0, 1fr); }
  .profit-summary { padding-inline: 48px 22px; }
  .hero-story { max-width: 52ch; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(480px, 0.75fr); }
  .detail-hero-layout { grid-template-columns: minmax(0, 1fr) minmax(480px, 640px); }
  .performance-equity-chart { height: 15rem !important; }
  .capital-detail-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}

@media (min-width: 2560px) {
  .research-focus .crew-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .system-agent { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; }
  .system-agent .agent-state { grid-column: auto; justify-self: end; }
  .system-agent .agent-score { grid-column: 2 / 4; flex-direction: row; gap: 7px; }
}

.activity-feed-grid > * { min-width: 0; }

@media (max-width: 1020px) {
  .profit-hero { grid-template-columns: 1fr; }.profit-summary { padding: 34px 34px 12px; }.hero-facts { max-width: 560px; margin-top: 20px; }.equity-chart-wrap { min-height: 320px; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }.radar-list { grid-template-columns: repeat(2, 1fr); }.status-grid { grid-template-columns: repeat(2, 1fr); }.detail-hero-layout,.activity-feed-grid { grid-template-columns: 1fr !important; }.detail-hero-aside { justify-content: flex-start !important; text-align: left !important; flex-wrap: wrap; }.page-intro { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 720px) {
  :root { --app-gutter: 14px; }.app-header-inner { height: 64px; gap: 8px; }.brand-version,.refresh-time { display: none; }.header-status { gap: 5px; }.mode-pill,.market-pill { height: 28px; padding-inline: 8px; font-size: 10px; }.icon-button { width: 38px; height: 38px; }.app-nav { width: 100%; justify-content: space-between; margin-top: 12px; }.nav-link { min-height: 40px; flex: 1; justify-content: center; padding-inline: 10px; }.nav-link span { display: none; }.nav-link svg { width: 18px; height: 18px; }.dashboard-main { padding-top: 25px; }.page-intro { margin-top: 0; }.page-intro-orb { min-height: 40px; }.welcome-row { align-items: flex-start; flex-direction: column; }.autonomy-pill { padding: 8px 11px; }.profit-hero { border-radius: 19px; }.profit-summary { padding: 28px 22px 10px; }.hero-number { max-width: 100%; font-size: clamp(34px, 10.8vw, 52px); letter-spacing: -0.055em; white-space: nowrap; }.hero-facts { gap: 7px; }.hero-facts div { padding-left: 8px; }.hero-facts strong { font-size: 13px; }.equity-chart-wrap { min-height: 285px; margin: 14px; padding: 17px 15px 12px; }.hero-chart,.chart-empty { min-height: 190px; }.metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 96px; }.detail-stat-grid { grid-template-columns: 1fr !important; }.metric-card { min-height: 96px; }.card-heading { padding: 21px 18px 15px; }.positions-list { padding-inline: 18px; }.position-row { grid-template-columns: minmax(120px, 1fr) minmax(112px, auto); gap: 10px; }.position-track { display: none; }.position-session-label-full { display: none; }.position-session-label-short { display: inline; }.positions-total,.positions-session-total { margin-inline: 18px; }.positions-session-total small { display: block; margin: 2px 0 0; }.latest-brief,.crew-list,.research-boundary { margin-inline: 16px; }.crew-list { padding-inline: 0; }.radar-list { grid-template-columns: 1fr; }.radar-item { min-height: 125px; }.numbers-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-footer { align-items: flex-start; flex-wrap: wrap; }.dashboard-footer a { width: 100%; margin: 4px 0 0; }.system-hero { padding: 20px; }.system-crew-grid { grid-template-columns: 1fr; }.budget-row { grid-template-columns: 1fr; gap: 9px; }
}

@media (max-width: 440px) {
  .market-pill > span:last-child { display: none; }.market-pill { width: 27px; justify-content: center; padding: 0; }.mode-pill { max-width: 72px; overflow: hidden; }.hero-label-row { align-items: flex-start; flex-direction: column; }.hero-story { font-size: 13px; }.hero-facts span { font-size: 8px; }.range-switcher button { min-width: 28px; }.position-identity { gap: 6px; }.position-value { display: none; }.position-return span { width: auto; }.crew-row { grid-template-columns: 34px minmax(0, 1fr); }.agent-result { grid-column: 2; align-items: flex-start; padding-bottom: 8px; }.attention-card { padding: 17px; }.attention-list,.all-clear-copy { margin-left: 0; }.numbers-drawer summary small { display: none; }.status-grid { grid-template-columns: 1fr; }.system-hero-copy { align-items: flex-start; }.system-agent { grid-template-columns: 36px minmax(0, 1fr); }.system-agent .agent-state { grid-column: 2; justify-self: start; }.agent-score { grid-column: 2; flex-direction: column; gap: 1px; }
}

@media (max-width: 340px) { .brand-word { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .market-pill.is-open .status-dot,.autonomy-spark::after,.hero-glow,.loading-ring { animation: none; }
  .metric-card:hover { transform: none; }
  .sync-button.is-syncing svg,.page-intro,.detail-hero,.value-updated { animation: none; }
  .panel:hover,.tile:hover,.text-link:hover span { transform: none; }
}

@media (max-width: 720px), (pointer: coarse) {
  body { background-attachment: scroll; }
  .detail-page button,.range-switcher button { min-height: 44px; }
}

@media (max-width: 720px) {
  .icon-button { width: 44px; height: 44px; }
  .nav-link { min-height: 44px; }
  .autonomy-pill { max-width: 100%; flex-wrap: wrap; white-space: normal; }
}

@media (hover: none) {
  .panel:hover,.tile:hover,.metric-card:hover { transform: none; }
}

/* The August hunter cutover removed proposal governance and runtime-drift
 * telemetry. Older detail-page shells still contain those inert bindings;
 * keep the retired controls out of the operator surface until the duplicated
 * shells are consolidated. */
[x-show*="auditChain"],
[x-show*="runtimeDrift"],
[x-text*="Audit BROKEN"] { display: none !important; }

/* Raise the legacy detail pages' smallest secondary ink to a readable floor. */
body .text-zinc-500 { color: #8290a4; }
body .text-zinc-600 { color: #65758a; }
