/* Kervence — "signal room" dark theme (2026-08-25 redesign, v2).
   Status/categorical hex values are the dataviz-skill validated dark palette
   (CVD-checked against surface #1a1a19) and are read directly by brain.js —
   never rename or recolor --cat-1..8 or --good/--warning/--serious/--critical.
   Everything else (surfaces, accent, shape, type) is this redesign's own system:
   one monochrome blue-slate palette (surfaces, borders and accent are all tints of the
   same hue), a top bar with an animated collapsible nav, soft rounded corners throughout,
   sans for voice / mono strictly for data. */

/* One global guard for the `hidden` attribute.

   The UA stylesheet's `[hidden] { display: none }` loses to ANY author rule that sets
   `display` on the same element, at any specificity. That trap had been patched seven
   separate times across six stylesheets -- .idle-overlay[hidden], .nav-panel a[hidden],
   .forecast-row[hidden], .mk [hidden], .fc [hidden], .pf [hidden] and
   .rp-report/.rp-pending[hidden] -- and it still got missed on the login page, where
   auth.css's `.auth__form { display: grid }` rendered the whole two-factor form, including
   the text "Passordet er godkjent", to every visitor before they had typed anything.
   Caught in browser verification 2026-09-01; the test suite never saw it.

   This rule ends the whack-a-mole: `hidden` now means hidden everywhere, and a new
   component that sets `display` cannot reintroduce the bug. `!important` is correct here --
   there is no case where an element should be marked `hidden` and still render. The seven
   local patches were deleted in the same change. (If `hidden="until-found"` is ever wanted,
   this rule has to become `[hidden]:not([hidden="until-found"])`.) */
[hidden] { display: none !important; }

/* Hopp-til-lenke i appskallet og på inngangssidene, samme som trust.css har for de offentlige. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--kull, #26221b); color: var(--kalk-lys, #faf7f0);
  padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }


:root {
  /* surfaces + ink — one hue family (blue-slate), varied only in lightness/saturation */
  --bg: #0a0e16;
  --surface: #121826;
  --surface-raised: #182034;
  --border: rgba(140, 170, 255, 0.11);
  --border-strong: rgba(140, 170, 255, 0.22);
  --text: #eef1fb;
  --text-secondary: #a3aec9;
  --text-muted: #7f8aa6;
  --gridline: #1c2438;

  /* single UI accent — a lighter tint of the same blue hue as the surfaces above */
  --accent: #6ea8fe;
  --accent-ink: #04122b;

  /* status (fixed, never themed) */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #e66767;

  /* categorical — community / series identity, fixed order, read by brain.js */
  --cat-1: #3987e5;
  --cat-2: #d95926;
  --cat-3: #199e70;
  --cat-4: #c98500;
  --cat-5: #d55181;
  --cat-6: #35c435;
  --cat-7: #9085e9;
  --cat-8: #e66767;

  --font-mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* shape system: soft rounded panels, slightly tighter inputs, full-pill interactive chips. */
  --radius: 14px;
  --radius-input: 9px;
  --topbar-h: 60px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body { overflow-x: hidden; }

body {
  margin: 0;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse 1100px 560px at 12% -8%, rgba(217, 165, 60, 0.07), transparent 60%),
    var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  line-height: 1.55;
  font-size: 14px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ------------------------------------------------------------------- top bar + nav */
/* Sticky top bar, always visible but slim. Full nav lives in an animated panel that's
   collapsed by default and toggled open -- never pinned to the viewport edge. */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--topbar-h);
  padding: 0 24px;
  background: transparent;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.rail-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; margin-right: 6px; }
.rail-brand__mark {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.05em;
  color: var(--text); border-radius: var(--radius-input); padding: 4px 7px;
}

.menu-trigger {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; padding: 0; margin: 0; border-radius: var(--radius-input);
  background: transparent; border: none; cursor: pointer;
  align-items: center;
}
.menu-trigger:hover { background: var(--surface-raised); }
.menu-trigger__bar { width: 15px; height: 1.5px; background: var(--text-secondary); transition: transform 0.25s ease, opacity 0.2s ease; }
.menu-trigger[aria-expanded="true"] .menu-trigger__bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-trigger[aria-expanded="true"] .menu-trigger__bar:nth-child(2) { opacity: 0; }
.menu-trigger[aria-expanded="true"] .menu-trigger__bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.cmdk-trigger {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; margin-left: auto;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cmdk-trigger:hover { color: var(--text); border-color: var(--border-strong); }
.cmdk-trigger span { color: var(--text-muted); }

.rail-status {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted); display: flex; align-items: center; gap: 6px;
  background: transparent; border: none; padding: 4px 2px; cursor: pointer;
}
.rail-status__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0;
}
.rail-status--healthy .rail-status__dot { background: var(--good); box-shadow: 0 0 6px var(--good); animation: pulseDot 2.4s ease-in-out infinite; }
.rail-status--stale .rail-status__dot { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.rail-status--failed .rail-status__dot { background: var(--critical); box-shadow: 0 0 6px var(--critical); }
.rail-status--stopped .rail-status__dot { background: var(--critical); box-shadow: 0 0 6px var(--critical); }

.status-panel {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  right: 24px;
  left: auto;
  width: 280px;
  max-width: calc(100vw - 32px);
  z-index: 29;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(38, 34, 27, 0.4);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scaleY(0.96);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1), opacity 0.22s ease, visibility 0s linear 0.28s;
}
.status-panel.open {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1), opacity 0.22s ease;
}
.status-panel__head {
  display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); border-bottom: 1px solid var(--gridline);
}
.status-panel__row {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-top: 1px solid var(--gridline); font-size: 0.8rem; color: var(--text-secondary);
}
.status-panel__row:first-of-type { border-top: none; }
.status-panel__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.status-panel__dot--ok { background: var(--good); box-shadow: 0 0 6px var(--good); }
.status-panel__dot--error { background: var(--critical); box-shadow: 0 0 6px var(--critical); }
.status-panel__label { flex: 1; }
.status-panel__time { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); white-space: nowrap; }

/* ------------------------------------------------------------- profile menu (OT-016) */

.profile-menu { position: relative; margin-left: 4px; }
.profile-trigger {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); cursor: pointer; overflow: hidden;
  transition: border-color 0.15s ease;
}
.profile-trigger:hover { border-color: var(--border-strong); }
.profile-trigger__avatar {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; color: var(--text-secondary);
  background-size: cover; background-position: center;
}
.profile-trigger__avatar--image { color: transparent; }

.profile-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  z-index: 29;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(38, 34, 27, 0.4);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scaleY(0.96);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1), opacity 0.22s ease, visibility 0s linear 0.28s;
}
.profile-panel.open {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1), opacity 0.22s ease;
}
.profile-panel__id {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gridline);
  display: flex; flex-direction: column; gap: 2px;
}
.profile-panel__name { color: var(--text); font-size: 0.85rem; font-weight: 600; }
.profile-panel__email { color: var(--text-muted); font-size: 0.76rem; overflow-wrap: anywhere; }
.profile-panel__item {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; border-top: 1px solid var(--gridline);
  color: var(--text-secondary); font: inherit; font-size: 0.84rem; cursor: pointer;
}
.profile-panel__item:hover { background: var(--surface-raised); color: var(--text); text-decoration: none; }
.profile-panel__item--danger:hover { color: var(--critical); }

/* ------------------------------------------------------------- idle warning (OT-016) */

.idle-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(38, 34, 27, 0.55); backdrop-filter: blur(2px);
  padding: 20px;
}
/* An author rule with equal specificity to the UA [hidden] rule wins the cascade, so the
   unconditional `display: flex` above would otherwise show this on every page load before
   any timer ever fires -- caught in browser verification, not in the test suite. */
.idle-box {
  width: 100%; max-width: 22rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 24px 48px rgba(38, 34, 27, 0.4);
}
.idle-eyebrow { margin: 0 0 0.5rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warning); }
.idle-title { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--text); }
.idle-desc { margin: 0 0 1.25rem; color: var(--text-secondary); font-size: 0.86rem; line-height: 1.5; }
.idle-desc strong { color: var(--text); font-variant-numeric: tabular-nums; }
.idle-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.idle-btn {
  flex: 1; min-width: 8rem; padding: 0.6rem 0.9rem; border-radius: var(--radius-input);
  font: inherit; font-size: 0.86rem; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface-raised); color: var(--text-secondary);
}
.idle-btn:hover { color: var(--text); border-color: var(--border-strong); }
.idle-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.idle-btn--primary:hover { filter: brightness(1.07); color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) {
  .profile-panel { transition: none; }
}

@media (max-width: 700px) {
  .status-panel { right: 16px; }
}

.nav-panel {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  left: 24px;
  right: auto;
  width: 240px;
  max-width: calc(100vw - 32px);
  z-index: 29;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(38, 34, 27, 0.4);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scaleY(0.96);
  transform-origin: top left;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1), opacity 0.22s ease, visibility 0s linear 0.28s;
  visibility: hidden;
}
.nav-panel.open {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1), opacity 0.22s ease;
}
.nav-panel a {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  font-family: var(--font-sans); font-size: 0.87rem; color: var(--text-muted);
  border-left: 2px solid transparent;
  border-top: 1px solid var(--gridline);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.nav-panel a:first-child { border-top: none; }
/* Same author-vs-UA-origin trap as .idle-overlay above: `.nav-panel a { display: flex }`
   is an author rule and beats the UA [hidden] rule regardless of specificity, so an
   admin-only link that starts `hidden` (Fase 3) would render anyway without this. */
.nav-panel a i { font-family: var(--font-mono); font-style: normal; font-size: 0.72rem; color: var(--text-muted); opacity: 0.55; width: 18px; flex-shrink: 0; }
.nav-panel a:hover { color: var(--text); background: var(--surface-raised); text-decoration: none; }
.nav-panel a.active { color: var(--text); border-left-color: var(--accent); background: rgba(217, 165, 60, 0.10); }
.nav-panel a.active i { color: var(--accent); opacity: 1; }

@media (max-width: 700px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .rail-status__label, .cmdk-trigger span { display: none; }
  .nav-panel { left: 16px; }
}

.shell { min-height: 100vh; display: flex; flex-direction: column; flex: 1; }

/* ------------------------------------------------------------- status strip */

.status-strip {
  margin: 20px auto 0;
  max-width: 1180px;
  padding: 8px 40px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.status-strip strong { color: var(--text-secondary); font-weight: 500; }
.status-strip--warn { border-color: rgba(150, 102, 15, 0.35); color: var(--warning); }
.status-strip--failed { border-color: rgba(169, 68, 54, 0.35); color: var(--critical); }
@media (max-width: 900px) { .status-strip, main, .site-footer { padding-left: 18px; padding-right: 18px; } }

/* --------------------------------------------------------------- headings */
/* Sans is the display voice now; mono is reserved for labels, data, and nav chrome. */

h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--text);
  font-size: 1.7rem;
  margin: 40px 0 6px;
  letter-spacing: -0.02em;
}
h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 44px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex-shrink: 0;
}
h3 { font-family: var(--font-sans); font-size: 0.92rem; font-weight: 700; margin: 24px 0 8px; color: var(--text); }
.subtitle { color: var(--text-muted); margin: 0 0 24px; font-size: 0.88rem; max-width: 60ch; }
.empty { color: var(--text-muted); font-style: italic; }

main { max-width: 1180px; margin: 0 auto; padding: 0 40px 96px; width: 100%; flex: 1; }
@media (max-width: 600px) { main { padding: 0 18px 64px; } }

/* ------------------------------------------------------------------ hero (data tiles) */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 12px;
  margin: 28px 0;
}
.hero-tile { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; overflow: hidden; }
.hero-tile .label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.hero-tile .value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hero-tile .value.pos { color: var(--good); }
.hero-tile .value.neg { color: var(--critical); }

/* ------------------------------------------------------------------ table */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; background: var(--surface); font-variant-numeric: tabular-nums; }
table.leaderboard, table.metrics { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 700px) {
  table.leaderboard, table.metrics { min-width: 560px; }
}
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--gridline); }
thead th {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-raised);
}
tbody tr { transition: background-color 0.1s ease; }
tbody tr:hover { background: var(--surface-raised); }
tbody tr:last-child td { border-bottom: none; }
table.metrics th { color: var(--text-muted); font-weight: 500; width: 220px; font-family: var(--font-mono); text-transform: none; letter-spacing: 0; font-size: 0.78rem; }
.field-provenance { display: block; color: var(--text-muted); font-size: 0.72rem; margin-top: 2px; }
td.num, th.num { text-align: right; }

.pos { color: var(--good); font-weight: 600; }
.neg { color: var(--critical); font-weight: 600; }

.status {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(38, 34, 27, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.status--promoted, .status--success { background: rgba(62, 122, 78, 0.12); color: var(--good); border-color: rgba(62, 122, 78, 0.3); }
.status--rejected_invalid, .status--rejected_perf, .status--failed, .status--backtest_failed { background: rgba(169, 68, 54, 0.12); color: var(--critical); border-color: rgba(169, 68, 54, 0.3); }
.status--partial_failure { background: rgba(150, 102, 15, 0.12); color: var(--warning); border-color: rgba(150, 102, 15, 0.3); }
.status--provisional { background: rgba(150, 102, 15, 0.12); color: var(--warning); border-color: rgba(150, 102, 15, 0.3); }
.status--up, .status--hit, .status--buy { background: rgba(62, 122, 78, 0.12); color: var(--good); border-color: rgba(62, 122, 78, 0.3); }
.status--down, .status--miss, .status--sell { background: rgba(169, 68, 54, 0.12); color: var(--critical); border-color: rgba(169, 68, 54, 0.3); }
.status--hold { background: rgba(150, 102, 15, 0.12); color: var(--warning); border-color: rgba(150, 102, 15, 0.3); }

/* -------------------------------------------------------------------- markets page */

.market-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 20px 0 16px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.market-category-filter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border: 0; margin: 0; padding: 0; min-width: 0; }
.market-category-filter legend { margin-right: 2px; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; }
.market-filter-option { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.68rem; cursor: pointer; }
.market-filter-option:hover, .market-filter-option.active { color: var(--accent); border-color: rgba(217, 165, 60, 0.4); background: rgba(217, 165, 60, 0.10); }
.market-filter-option input { width: 12px; height: 12px; margin: 0; accent-color: var(--accent); }
.pill {
  font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 5px 12px; border-radius: 999px; background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border); cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.pill:hover { color: var(--text-secondary); border-color: var(--border-strong); }
.pill.active { color: var(--accent); border-color: rgba(217, 165, 60, 0.4); background: rgba(217, 165, 60, 0.10); }
.market-toolbar .filter-input { max-width: 240px; }

.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.market-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; overflow: hidden; }
.market-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.market-card__header h3 { margin: 0; font-size: 0.9rem; }
.market-symbol { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.market-price-block { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.market-price { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; white-space: nowrap; }
.market-period-change, .market-day-change { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.market-period-stats { margin: 4px 0 20px; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.5; overflow-wrap: anywhere; }
.market-prediction, .market-quickstats { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.market-target { flex-basis: 100%; white-space: normal; overflow-wrap: break-word; }
.prediction-audit { margin: 12px 0 24px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prediction-audit summary { cursor: pointer; color: var(--text-secondary); }
.prediction-audit h4 { margin: 16px 0 6px; }
.prediction-audit ul { margin: 6px 0 0; padding-left: 20px; color: var(--text-secondary); }
.market-confidence, .market-error { white-space: nowrap; }
.market-rationale { flex-basis: 100%; margin: 6px 0 0; font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.market-est { font-weight: 600; white-space: nowrap; }
.market-est.pos { color: var(--good); }
.market-est.neg { color: var(--critical); }
.market-price--lg { font-size: 1.6rem; }
.market-card__header h1 { margin: 0; font-size: 1.3rem; }

.forecast-priority { max-width: 760px; margin: 20px 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.forecast-priority__header h2 { margin: 0 0 8px; }
.forecast-priority__header p { margin: 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.45; }
.forecast-priority__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.forecast-column { min-width: 0; }
.forecast-column__title { margin: 0; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.forecast-priority__list { margin-top: 6px; }
/* Flyt, ikke rutenett: den dempede linjen går over hele bredden, og som rutenett satte den
   sporbreddene for linjen over -- spennet rant først ut av kortet, så brakk det i tre linjer
   (skjermbilder 1440 og 400 px, 2026-09-12). Med flyt måler hver linje seg selv. */
.forecast-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--gridline); color: var(--text); }
.forecast-row:hover { color: var(--accent); }
.forecast-row__symbol, .forecast-row__spenn, .forecast-row__direction, .forecast-row__date, .forecast-row__move { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.forecast-row__symbol { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.forecast-row__spenn { min-width: 0; margin-left: auto; text-align: right; font-weight: 600; }
.forecast-row__spenn--ukjent { color: var(--text-muted); font-weight: 500; }
.forecast-row__sekundaer { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--text-muted); font-size: 0.76rem; }
.forecast-row__direction { font-size: 1rem; }
.forecast-row__move { font-weight: 600; white-space: nowrap; }
@media (max-width: 700px) {
  .forecast-priority { padding: 14px; }
  .forecast-priority__columns { grid-template-columns: 1fr; gap: 18px; }
  table.metrics { min-width: 100%; table-layout: fixed; }
  table.metrics th, table.metrics td { overflow-wrap: anywhere; }
  /* th-bredden på 220 px over står i en fast tabell på ~260 px -- verdicellen fikk ~40 px og
     ett tegn per linje (selskapssiden i 400 px, skjermbilde 2026-09-11). */
  table.metrics th { width: 40%; }
}

/* ------------------------------------------------------------------- portfolio page */

.holding-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 20px 0 8px; }
.holding-form .filter-input { min-width: 160px; }
.portfolio-currency-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0 12px; }
.portfolio-currency-controls label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.portfolio-currency-note { color: var(--text-muted); font-size: 0.75rem; }
#portfolio-hero .value { white-space: pre-line; overflow-wrap: anywhere; }
.pill--action { background: rgba(217, 165, 60, 0.12); color: var(--accent); border-color: rgba(217, 165, 60, 0.4); }
.pill--action:hover { background: rgba(217, 165, 60, 0.2); }
#holdings-table .pill { margin-right: 6px; font-size: 0.72rem; padding: 3px 9px; }
.advice-rationale { margin: 6px 0 0; max-width: 480px; font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; text-transform: none; letter-spacing: normal; }

/* -------------------------------------------------------------------- rating badges */

.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.rating-dot { display: inline-flex; align-items: center; gap: 3px; }
.rating-bar {
  width: 30px;
  height: 4px;
  border-radius: 2px;
  background: var(--gridline);
  overflow: hidden;
  display: inline-block;
}
.rating-bar > span { display: block; height: 100%; background: var(--accent); }
.rating-bar.value > span { background: var(--cat-3); }

/* ------------------------------------------------------------------ charts */

.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.chart-card h3 { margin-top: 0; color: var(--text); font-size: 0.85rem; }
.chart { width: 100%; height: clamp(160px, 28vh, 340px); }
.chart--large { height: clamp(320px, 55vh, 640px); margin: 16px 0 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px; }

@media (max-width: 700px) {
  body.brain-page .site-footer { padding: 8px 16px; gap: 8px; font-size: 0.72rem; }
  body.brain-page .brain-hud, body.brain-page .brain-legend { max-width: calc(50% - 24px); }
}

.code-block {
  border-radius: var(--radius-input);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-x: auto;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------------- feed */

.source-feed { list-style: none; padding: 0; margin: 0; }
.source-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--gridline);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.source-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 2px 6px;
  flex-shrink: 0;
}
.source-type--reflection { background: rgba(91, 107, 124, 0.12); color: var(--cat-7); border-color: rgba(91, 107, 124, 0.3); }
.source-type--research_paper { background: rgba(217, 165, 60, 0.12); color: var(--accent); border-color: rgba(217, 165, 60, 0.3); }
.source-date { margin-left: auto; color: var(--text-muted); font-size: 0.76rem; font-family: var(--font-mono); }

/* ---------------------------------------------------------------- footer */

.site-footer {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 16px 40px 40px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------- 3d stage pages (brain, compare) */

body.brain-page, body.compare-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body.brain-page .shell, body.compare-page .shell { min-height: 0; }
body.brain-page .site-footer { display: flex; width: 100%; max-width: none; margin: 0; padding: 8px 24px; gap: 12px; font-size: 0.68rem; flex-shrink: 0; }
body.brain-page main, body.compare-page main {
  max-width: none; padding: 0; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}

.brain-stage, .compare-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  background:
    radial-gradient(ellipse 900px 500px at 50% 40%, rgba(217, 165, 60, 0.07), transparent 65%),
    var(--bg);
}
#brain-canvas, #compare-canvas { position: absolute; inset: 0; }

.brain-hud, .compare-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  max-width: 260px;
  pointer-events: none;
}
.brain-hud .eyebrow, .compare-hud .eyebrow { text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-size: 0.72rem; margin-bottom: 6px; }
.brain-hud .stat-row, .compare-hud .stat-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; }
.brain-hud .stat-row b, .compare-hud .stat-row b { color: var(--text); font-weight: 500; }

.brain-legend, .compare-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
}
.brain-legend .row, .compare-legend .row { display: flex; align-items: center; gap: 8px; }
.compare-legend .row { cursor: pointer; padding: 3px 4px; transition: background-color 0.1s ease, color 0.1s ease; }
.compare-legend .row:hover, .compare-legend .row.active { background: rgba(38, 34, 27, 0.05); color: var(--text-secondary); }
.compare-legend .row .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.compare-legend .row .metric { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 0.72rem; }
.brain-legend .swatch, .compare-legend .swatch { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.brain-legend .line, .compare-legend .line { width: 16px; height: 0; border-top: 2px solid var(--text-muted); display: inline-block; }
.brain-legend .line.dashed, .compare-legend .line.dashed { border-top-style: dashed; opacity: 0.6; }
.brain-legend .line.dotted { border-top-style: dotted; opacity: 0.4; }

.brain-tooltip, .compare-tooltip {
  position: absolute;
  z-index: 3;
  background: rgba(10, 14, 22, 0.96);
  border: 1px solid var(--border-strong);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
  max-width: 260px;
  pointer-events: none;
  display: none;
  box-shadow: 0 8px 24px rgba(38, 34, 27, 0.5);
}
.brain-tooltip .t-label, .compare-tooltip .t-label { font-weight: 700; margin-bottom: 3px; }
.brain-tooltip .t-meta, .compare-tooltip .t-meta { color: var(--text-muted); font-size: 0.66rem; }
.compare-tooltip .t-desc { color: var(--text-secondary); font-size: 0.68rem; margin-top: 5px; max-width: 230px; white-space: normal; line-height: 1.4; }
.compare-tooltip .t-hint { color: var(--text-muted); font-size: 0.72rem; margin-top: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
body.brain-page .brain-legend { left: auto; right: 16px; max-width: min(42vw, 300px); max-height: min(48%, 280px); }

.brain-empty, .compare-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 0 24px;
}
.brain-empty .big, .compare-empty .big { font-size: 2rem; color: var(--border-strong); }

.brain-topbar, .compare-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.compare-topbar .table-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  white-space: nowrap;
}
.compare-topbar .table-link:hover { color: var(--accent); border-color: rgba(217, 165, 60, 0.35); text-decoration: none; }

/* ------------------------------------------------------------------ motion fx */
/* Card tilt (fx.js) needs perspective on the parent and a transform-ready child;
   entrance stagger is pure CSS (nth-child delays) so every page gets it for free
   without per-template edits -- the global prefers-reduced-motion rule at the top
   of this file already zeroes these out (0.001ms), so no separate guard here. */

main { perspective: 1400px; }

.hero-tile, .chart-card, .market-card, .signal-tile {
  transition: box-shadow 0.15s ease;
  will-change: transform;
  position: relative;
}
.hero-tile:hover, .chart-card:hover, .market-card:hover, .signal-tile:hover {
  box-shadow: inset 0 0 0 1px rgba(217, 165, 60, 0.35);
  z-index: 1;
}
.hero-tile::after, .chart-card::after, .market-card::after, .signal-tile::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s ease;
}
.hero-tile:hover::after, .chart-card:hover::after, .market-card:hover::after, .signal-tile:hover::after { transform: scaleX(1); }

/* press feedback: every clickable pill/chip/trigger/nav-row/sortable-header gets the same
   tactile press everywhere it appears, instead of each control inventing its own. Cards
   (.hero-tile/.chart-card/.signal-tile) handle their own press state inside fx.js's tilt
   handler below -- a plain CSS :active here would lose to the inline transform fx.js writes
   on every mousemove and never be visible. */
.pill, .cmdk-trigger, .menu-trigger, .rail-status, .nav-panel a, .cmdk-item,
table.leaderboard thead th[data-sort] {
  transition: transform 0.12s ease, color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.pill:active, .cmdk-trigger:active, .menu-trigger:active, .rail-status:active,
.nav-panel a:active, .cmdk-item:active, table.leaderboard thead th[data-sort]:active {
  transform: scale(0.96);
  transition-duration: 0.08s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
main > * { animation: fadeUp 0.5s cubic-bezier(.2,.7,.3,1) both; }
main > *:nth-child(1) { animation-delay: 0.02s; }
main > *:nth-child(2) { animation-delay: 0.07s; }
main > *:nth-child(3) { animation-delay: 0.12s; }
main > *:nth-child(4) { animation-delay: 0.17s; }
main > *:nth-child(5) { animation-delay: 0.22s; }
main > *:nth-child(6) { animation-delay: 0.27s; }
main > *:nth-child(n+7) { animation-delay: 0.3s; }
body.brain-page main > *, body.compare-page main > * { animation: none; }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 8px var(--good); }
  50% { box-shadow: 0 0 16px 3px var(--good); }
}

/* ------------------------------------------------------------ sortable tables */

table.leaderboard thead th[data-sort] { cursor: pointer; user-select: none; position: relative; padding-right: 20px; }
table.leaderboard thead th[data-sort]:hover { color: var(--text-secondary); }
table.leaderboard thead th[data-sort]::after {
  content: "\2195";
  position: absolute;
  right: 6px;
  opacity: 0.35;
  font-size: 0.8em;
}
table.leaderboard thead th[data-sort].sort-asc::after { content: "\2191"; opacity: 1; color: var(--accent); }
table.leaderboard thead th[data-sort].sort-desc::after { content: "\2193"; opacity: 1; color: var(--accent); }
.table-sort-button {
  all: unset; cursor: pointer; display: block; width: 100%; box-sizing: border-box;
}
.table-sort-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* -------------------------------------------------------------- filter input */

.filter-bar { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; flex-wrap: wrap; }
.filter-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 12px;
  min-width: 220px;
  outline: none;
}
.filter-input:focus-visible {
  border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px;
}
.filter-input::placeholder { color: var(--text-muted); }
.filter-count { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; }
.row-hidden { display: none !important; }

/* ------------------------------------------------------------ command palette */

.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(38, 34, 27, 0.6);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.cmdk-overlay.open { display: flex; }
.cmdk-box {
  border-radius: var(--radius);
  width: min(560px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(38, 34, 27, 0.55);
  overflow: hidden;
}
.cmdk-input {
  width: 100%;
  background: var(--surface-raised);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 14px 16px;
  outline: none;
  box-sizing: border-box;
}
.cmdk-results { max-height: 340px; overflow-y: auto; padding: 6px; }
.cmdk-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.cmdk-item .cmdk-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 1px 6px;
  flex-shrink: 0;
  align-self: center;
}
.cmdk-item.active { background: rgba(217, 165, 60, 0.12); color: var(--text); }
.cmdk-item.active .cmdk-tag { color: var(--accent); border-color: rgba(217, 165, 60, 0.4); }
.cmdk-empty { padding: 18px 12px; color: var(--text-muted); font-size: 0.8rem; text-align: center; }

/* ------------------------------------------------------------- scroll reveal */
/* Applied by interactions.js's IntersectionObserver once an element is ~15% visible.
   Separate from the fadeUp on-load stagger above -- this is for content below the fold. */

.reveal { opacity: 1; transform: none; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-delay-1.in-view { transition-delay: 0.08s; }
.reveal-delay-2.in-view { transition-delay: 0.16s; }
.reveal-delay-3.in-view { transition-delay: 0.24s; }

.brain-accessible-data {
  position: absolute; left: 16px; bottom: 16px; z-index: 4;
  max-width: min(88vw, 520px); max-height: min(52vh, 420px); overflow: auto;
  padding: 10px 14px; background: rgba(250, 247, 240, 0.96);
  border: 1px solid var(--border); color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.72rem;
}
.brain-accessible-data summary { cursor: pointer; color: var(--text); }
.brain-accessible-data h2 { font-size: 0.78rem; color: var(--text); }

/* ---------------------------------------------------------------- landing hero (split) */
/* Asymmetric split: headline + CTA on the left, the site's own live numbers doubling as
   navigation on the right. Dark throughout -- no separate light section, no wave transition. */

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  margin: 8px 0 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); margin: 0 0 18px;
}
h1.display {
  font-family: var(--font-sans); font-weight: 800; font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.05; letter-spacing: -0.03em; color: var(--text); margin: 0 0 20px; max-width: 14ch;
}
.hero-split .lede { font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.6; color: var(--text-secondary); max-width: 46ch; margin: 0 0 26px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent-ink); background: var(--accent); padding: 11px 18px; border-radius: 999px; font-weight: 700;
  transition: transform 0.18s cubic-bezier(.2,.7,.3,1), background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
/* Named FE-001 requirement: visible colour change + a physical translate/tilt on hover so the
   CTA reads as movable, without layout shift (transform only) and without being draggable.
   Full ink/background inversion doubles as the colour change -- stays in the same monochrome
   accent family instead of introducing a second hue. Focus-visible gets the same treatment so
   keyboard users see the identical affordance, not just an outline. */
.hero-cta:hover, .hero-cta:focus-visible {
  text-decoration: none;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-3px) rotate(-1.5deg);
  box-shadow: 0 14px 28px rgba(217, 165, 60, 0.28);
}
.hero-cta:active {
  transform: translateY(-1px) rotate(-0.5deg) scale(0.97);
  transition-duration: 0.08s;
}

.hero-split__signals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.signal-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; overflow: hidden; }
.signal-tile__eyebrow { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.signal-tile__stat { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.signal-tile__desc { margin: 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.45; }

@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; gap: 28px; }
  .hero-split__signals { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------------- track record */

.track-record { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 30px; margin: 8px 0 56px; }
.track-record p { max-width: 68ch; margin: 0 0 18px; }
.track-record__stats { display: flex; gap: 36px; flex-wrap: wrap; }
.track-record__stat .n { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 700; color: var(--text); display: block; font-variant-numeric: tabular-nums; }
.track-record__stat .l { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* -------------------------------------------------------------------- portfolio holding cards */

.holdings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; margin: 20px 0; }
.holding-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.holding-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.holding-card__symbol { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.holding-card__pl { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; }
.holding-card__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-top: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.holding-card__meta span { overflow-wrap: anywhere; }
.holding-card__actions { margin-top: 14px; display: flex; gap: 8px; }

@media (max-width: 600px) {
  #portfolio-hero { grid-template-columns: 1fr; }
  #portfolio-hero .value { display: block; font-size: 1.3rem; line-height: 1.45; }
  .holding-form { display: grid; grid-template-columns: 1fr; }
  .holding-form .filter-input { width: 100%; min-width: 0; }
}
