/* eqt-theme.css — v17 single source of truth
 *
 * Rules of the road (from the v17 brief):
 *   1. Token values are FINAL. No substitutions from per-page sprawl even
 *      where a local variant looks marginally nicer. One source of truth.
 *   2. Display font: Source Serif 4 site-wide. Body font: Inter.
 *   3. Per-page :root blocks MUST be removed. All pages import this file
 *      via <link rel="stylesheet" href="./eqt-theme.css"> before their
 *      page-local <style>.
 *
 * Chart-data colours (series, per-bin heatmaps, etc.) remain the only
 * legitimate source of new hexes outside this file.
 */

/* -------------------------------------------------------------------
   Fonts — Source Serif 4 (display) + Inter (body)
   ------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap');

/* -------------------------------------------------------------------
   Tokens
   Locked palette (exact hex values from the v17 brief).
   ------------------------------------------------------------------- */
:root {
  /* Ink + surfaces */
  --ink:            #2d3133;
  --ink-muted:      #6b7177;
  --paper:          #f7f6f2;
  --surface:        #ffffff;
  --line:           #e1e3e4;

  /* Accents */
  --teal:           #5f8a85;
  --teal-dark:      #3f6b66;
  --teal-light:     #e8efec;

  /* Semantic */
  --green:          #437a22;
  --red:            #a13544;
  --amber:          #c08a6e;
  --navy:           #2d3338;

  /* Semantic tints (backgrounds for badges, chips, callouts).
     Kept minimal: one fill + one dark-text variant per family so pages
     never reach for one-off hex shades. */
  --red-tint:       #f5e1de;
  --red-ink:        #7a1a25;   /* dark text on --red-tint */
  --green-tint:     #e6f4ec;
  --green-ink:      #1c5c2c;   /* dark text on --green-tint */
  --amber-tint:     #f5e7dc;
  --amber-ink:      #6b4e00;   /* dark text on --amber-tint */
  --navy-tint:      #e8ebea;   /* subtle surface tint */
  --navy-alt:       #2a3140;   /* headers/rare deep backgrounds */

  /* Grade / quintile palette (v21 — canonical semantic tokens so every
     .grade-* and .q1..q5 style references named colours, not hex.
     Previously duplicated across quality/earnings/value/lowvol/price. */
  --grade-a-bg:     #cce9ec;   /* A grade badge fill */
  --grade-a-ink:    #0f4a51;   /* A grade badge text */
  --grade-bplus-bg: #cce0f5;   /* B+ grade badge fill (paired with --navy-alt) */

  /* Quintile band pastels (Q1 best → Q5 worst).  Q1 uses --green-tint /
     --q1-ink; Q5 uses --red-tint / --red-ink already defined above. */
  --q1-ink:         #155724;   /* dark green ink on --green-tint */
  --q2-bg:          #e8f4e0;   /* light green tint */
  --q2-ink:         #2d6a1e;
  --q3-bg:          #fff3cd;   /* amber tint */
  --q3-ink:         #856404;
  --q4-bg:          #fde2cc;   /* orange tint */
  --q4-ink:         #984c0c;
  --q5-ink:         #721c24;   /* dark red ink on --red-tint */

  /* Additional semantic accents used across dashboard/detail pages. */
  --green-ink-strong: #0f7a3a;  /* darker green for alpha-leader score ink */
  --grade-a-onteal:   #7FD9E4;  /* pale teal ink when badge sits on --teal-dark */
  --grade-bplus-onnavy: #7EB4F0; /* pale blue ink when badge sits on --navy-alt */

  /* Chart palette (v18) — pastel data series harmonised with chrome.
     These are the ONLY sanctioned non-chrome colours: every chart series,
     bar, area, gridline, axis label, and gain/loss bar draws from here.
     No hardcoded hex on any dataset anywhere on the site. */
  --chart-1:        #7fa8a2;   /* muted teal */
  --chart-2:        #c9a3a9;   /* muted rose */
  --chart-3:        #a3b6c9;   /* muted slate */
  --chart-4:        #c9bfa3;   /* muted khaki */
  --chart-5:        #a9c9a3;   /* muted sage */
  --chart-6:        #b6a3c9;   /* muted lilac */
  --chart-7:        #c9b0a3;   /* muted clay */
  --chart-8:        #8fb8c4;   /* muted azure */
  --chart-grid:     #e7e9e9;   /* gridlines */
  --chart-axis:     #9aa0a3;   /* axis + tick labels */
  --chart-pos:      #8fbf7f;   /* pastel gain */
  --chart-neg:      #cf8f97;   /* pastel loss */

  /* Typography */
  --font-display:   'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* v26 de-clutter: explicit heading scale with real separation between
     levels. Pages must NOT override h1/h2/h3 sizes locally. */
  --fs-h1:          30px;
  --fs-h2:          15px;   /* box titles: identical to .chart-card h3 (momentum-detail grammar) */
  --fs-h3:          15px;
  --fs-body:        14px;
  --fs-table:       12px;   /* v27.2 owner: small text in every data table */
  --fs-label:       11px;

  /* Geometry */
  --radius:         10px;
  --gap:            16px;
  --pad-card:       20px;
  --maxw:           1320px;

  /* ---- Aliases for legacy per-page variable names ----
     Pages defined their own tokens with names like --bg, --card,
     --text, --text-muted, --border, --accent, --pos, --neg, --warn.
     Mapping them here means we can delete every page-local :root
     block without hunting for callsites. */
  --bg:             var(--paper);
  --bg-alt:         var(--paper);
  --card:           var(--surface);
  --panel:          var(--surface);
  --text:           var(--ink);
  --text-muted:     var(--ink-muted);
  --text-dim:       var(--ink-muted);
  --border:         var(--line);
  --divider:        var(--line);
  --accent:         var(--teal);
  --accent-dark:    var(--teal-dark);
  --accent-light:   var(--teal-light);
  --primary:        var(--teal);
  --primary-dark:   var(--teal-dark);
  --pos:            var(--green);
  --neg:            var(--red);
  --warn:           var(--amber);
  /* v19b: brand token now points to the Option 3 factor-blocks dark green.
     Used by the header lockup, favicon set, and any brand-forward surface.
     Charts/links still use --teal; --brand is chrome-only. */
  --brand:          #2f4a3e;
  --brand-dark:     #24382e;   /* v24 §5: active-sort thead background */
}

/* -------------------------------------------------------------------
   v19b brand chrome — header lockup canonical rules.
   Applies to .nav-logo, .header-logo, .logo (the three header link
   classes across the site). All three render the same inline SVG that
   uses fill: var(--brand). No decorative borders, no drop-shadows.
   ------------------------------------------------------------------- */
.nav-logo,
.header-logo,
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--brand);
  line-height: 1;
}
.nav-logo svg,
.header-logo svg,
.logo svg {
  display: block;
  height: 32px;
  width: auto;
}
@media (max-width: 640px) {
  .nav-logo svg,
  .header-logo svg,
  .logo svg { height: 28px; }
}

/* -------------------------------------------------------------------
   v19b minimalist pass — coordinated overrides to neutralise
   decorative colour, tighten card chrome, and enforce three text sizes.

   Rules restated from the v19 brief:
     2-3  Borders → whitespace. Cards lose their 1px border and get room
          to breathe. Tables keep --line only for row separators.
     2-4  Three text sizes per page: --fs-h1 / --fs-body / --fs-label.
          --fs-h2/--fs-h3/--fs-table stay defined for legacy code, but the
          preferred hierarchy is weight + colour, not five type sizes.
     2-5  Colour = meaning only. Strip decorative tints from section
          icons, feature cards, and rainbow badges. Semantic colours
          (--pos, --neg, --warn, --brand, --teal for CTAs) remain.
   ------------------------------------------------------------------- */

/* 2-3: Cards lose their frame. Padding + whitespace does the grouping. */
.section-card,
.factor-card,
.info-card,
.metric-card {
  border: 0 !important;
  box-shadow: none !important;
}

/* 2-5: Neutralise the section-icon rainbow. All icon holders become a
   subtle paper chip so the number/glyph carries the meaning, not the tint. */
.section-icon {
  background: transparent !important;
  color: var(--ink-muted);
}
.section-icon svg [stroke]:not([stroke="none"]) { stroke: var(--ink-muted) !important; }
.section-icon svg [fill]:not([fill="none"]):not([fill="currentColor"]) { fill: var(--ink-muted) !important; }

/* 2-5: Grade badges (used in lowvol/quality) collapse to weight-only.
   No tint, no coloured pill; just a compact monospace label. */
.grade-Aplus, .grade-A, .grade-Bplus, .grade-B, .grade-Cplus, .grade-C, .grade-D {
  background: transparent !important;
  color: var(--ink) !important;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  padding: 1px 5px !important;
  border: 0 !important;
  border-radius: 3px !important;
}

/* 2-5: Confluence / conflict / signal chips on the composite alpha overlay
   drop their fills. Keep the label + border-left accent so the meaning
   (confluence = positive, conflict = warning) still reads. */
.badge-confluence, .badge-conflict {
  background: transparent !important;
  border: 0 !important;
  padding-left: 6px !important;
  border-left: 2px solid var(--ink-muted) !important;
  border-radius: 0 !important;
}
.badge-confluence { border-left-color: var(--green) !important; color: var(--green-ink) !important; }
.badge-conflict   { border-left-color: var(--amber) !important; color: var(--amber-ink) !important; }

/* 2-4: Body copy consolidates to --fs-body. Page-local overrides that
   fought for 12.5/13/13.5/14/15 collapse here. Headings still use --fs-h1;
   labels/eyebrows use --fs-label. Anything else is legacy and gradually
   migrates through per-page edits. */
body { font-size: var(--fs-body); }
.eyebrow, .label, .kpi-label, .section-eyebrow, .alpha-leaders-col-label {
  font-size: var(--fs-label) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* 2-1: "How this works" expander pattern — a details/summary tuned for
   the minimalist look. Pages migrate wall-of-text methodology paragraphs
   inside <details class="how-this-works">. */
details.how-this-works {
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
details.how-this-works > summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
details.how-this-works > summary::-webkit-details-marker { display: none; }
details.how-this-works > summary::before {
  content: "▸";
  transition: transform 120ms ease;
  display: inline-block;
  color: var(--ink-muted);
}
details.how-this-works[open] > summary::before { transform: rotate(90deg); }
details.how-this-works > *:not(summary) {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: var(--fs-body);
  line-height: 1.55;
}

/* 2-1: Info tooltip pattern — the small ⓘ that opens on hover/focus.
   Kept intentionally simple: a right-of-heading superscript that reveals
   the source text without expanding page height. */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
  background: var(--surface);
}
.info-tip:hover, .info-tip:focus { border-color: var(--ink-muted); color: var(--ink); }
.info-tip[title]:hover::after {
  /* Native title tooltip is fine; no JS needed. */
}

/* 2-2: One-number surfaces — hero KPI treatment for the regime pill,
   the stock header alpha_z number, and the composite score in leader
   cards. Big serif number, no ornament. */
.one-number {
  font-family: var(--font-display, 'Source Serif 4', Georgia, serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.one-number .one-number-suffix {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 4px;
  vertical-align: middle;
}

/* End v19b minimalist overrides */

/* -------------------------------------------------------------------
   Base
   ------------------------------------------------------------------- */
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.eqt-display {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 0.4em 0;
  line-height: 1.2;
}
h1 { font-size: var(--fs-h1); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); text-decoration: underline; }

/* Utility numerics — always tabular so tables line up. */
.eqt-num, [data-num] {
  font-variant-numeric: tabular-nums lining-nums;
}

/* -------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------- */
.eqt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-card);
}
.eqt-card + .eqt-card { margin-top: var(--gap); }

/* -------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------- */
.eqt-btn {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease;
}
.eqt-btn:hover { border-color: var(--teal); }
.eqt-btn.is-primary {
  background: var(--teal);
  color: var(--surface);
  border-color: var(--teal);
}
.eqt-btn.is-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.eqt-btn.is-ghost { background: transparent; }

/* -------------------------------------------------------------------
   Badges
   ------------------------------------------------------------------- */
.eqt-badge {
  display: inline-block;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  border: 1px solid var(--teal-light);
  white-space: nowrap;
}
.eqt-badge.is-pos { background: rgba(67,122,34,0.10); color: var(--green); border-color: rgba(67,122,34,0.20); }
.eqt-badge.is-neg { background: rgba(161,53,68,0.10); color: var(--red);   border-color: rgba(161,53,68,0.20); }
.eqt-badge.is-warn{ background: rgba(192,138,110,0.14); color: var(--amber); border-color: rgba(192,138,110,0.25); }
.eqt-badge.is-neutral { background: var(--paper); color: var(--ink-muted); border-color: var(--line); }

/* -------------------------------------------------------------------
   Regime chip tokens
   Same visual grammar used by the regime hero on the alpha page and
   the crowding chip in the regime secondary row.
   ------------------------------------------------------------------- */
.eqt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--fs-label);
  font-weight: 500;
  background: var(--paper);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}
.eqt-chip .eqt-chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.65;
}
.eqt-chip.is-teal  { color: var(--teal-dark); background: var(--teal-light); border-color: var(--teal-light); }
.eqt-chip.is-amber { color: var(--amber);     background: rgba(192,138,110,0.12); border-color: rgba(192,138,110,0.22); }
.eqt-chip.is-pos   { color: var(--green);     background: rgba(67,122,34,0.10); border-color: rgba(67,122,34,0.20); }
.eqt-chip.is-neg   { color: var(--red);       background: rgba(161,53,68,0.10); border-color: rgba(161,53,68,0.20); }

/* -------------------------------------------------------------------
   Canonical table — .eqt-table   (v17 Part A-1 finalisation)
   Every data table site-wide applies this class. Per-page overrides
   are limited to column-specific alignment (td:nth-child(N) text-align)
   and sortable-header cursor behaviour; typography, colour, hairlines,
   hover, sticky, badge treatment are all owned here.
   ------------------------------------------------------------------- */
.eqt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-table);         /* 13px body */
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  font-variant-numeric: tabular-nums lining-nums;   /* tables line up */
}
.eqt-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 10.5px;                  /* v27.2: small uppercase labels */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);            /* v26.7: light header, no green banner */
  background: var(--surface);
  padding: 5px 10px;
  height: 30px;                       /* v27.2: thin header row */
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
  position: sticky;                   /* sticky on scroll */
  top: 0;
  z-index: 1;
}
.eqt-table thead th.is-sortable,
.eqt-table thead th[data-col],
.eqt-table thead th[data-sort] { cursor: pointer; user-select: none; }
/* v27.3c (owner): hovering a sortable heading reveals a sort glyph.
   Suppressed on the already-sorted column (it shows its own arrow). */
.eqt-table thead th.is-sortable:not(.active-sort):not(.sorted):not(.sorted-asc):not(.sorted-desc):hover::after,
.eqt-table thead th[data-col]:not(.active-sort):not(.sorted):not(.sorted-asc):not(.sorted-desc):hover::after,
.eqt-table thead th[data-sort]:not(.active-sort):not(.sorted):not(.sorted-asc):not(.sorted-desc):hover::after {
  content: ' ↕';
  font-size: 9.5px;
  color: var(--teal-dark);
  letter-spacing: 0;
}
.eqt-table thead th.active-sort {
  background: var(--teal-light);      /* v26.7: pastel active sort */
  color: var(--teal-dark);
}
.eqt-table tbody td {
  padding: 5px 10px;                  /* v27.2 owner: thin rows */
  font-size: var(--fs-table);         /* v27.2: one small table voice (12px) */
  border-bottom: 1px solid var(--line);   /* hairline row separators */
  vertical-align: middle;
}
.eqt-table tbody tr:last-child td { border-bottom: none; }
.eqt-table tbody tr:nth-child(even) td { background: var(--paper); }   /* zebra */
.eqt-table tbody tr:hover td { background: var(--teal-light); cursor: pointer; }  /* hover */

/* Numeric cells always right-align + tabular */
.eqt-table td.num,
.eqt-table th.num,
.eqt-table .eqt-num,
.eqt-table [data-num] {
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
}
/* Explicit text-left helper for non-numeric columns that would otherwise
   inherit right-align via `td.num`. */
.eqt-table td.text-left,
.eqt-table th.text-left { text-align: left; }

/* Semantic value colouring — one --green, one --red, one --amber. */
.eqt-table .is-pos { color: var(--green); font-weight: 600; }
.eqt-table .is-neg { color: var(--red);   font-weight: 600; }
.eqt-table .is-warn{ color: var(--amber); font-weight: 600; }

/* Ticker treatment — mono-adjacent, brand-navy, bold. */
.eqt-table .ticker,
.eqt-table .eqt-ticker {
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

/* Compact-mode tweak for dense tables. */
.eqt-table.is-compact thead th,
.eqt-table.is-compact tbody td { padding: 5px 10px; }

/* Badges inside cells — reuse .eqt-badge treatment cleanly. */
.eqt-table .eqt-badge { vertical-align: middle; }

/* -------------------------------------------------------------------
   Layout container
   ------------------------------------------------------------------- */
.eqt-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------------------------------------------------------
   Small utilities used across pages
   ------------------------------------------------------------------- */
.eqt-muted { color: var(--ink-muted); }
.eqt-mono  { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.eqt-hr    { border: 0; border-top: 1px solid var(--line); margin: var(--gap) 0; }

/* Two-line description clamp used by stock.html (v17 Part 4). */
.eqt-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Focus visibility — WCAG AA. */
:where(a, button, .eqt-btn, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* v19c: hamburger menu icon uses brand green (matches EQT Lab wordmark). */
.nav-hamburger span,
.nav-hamburger::before,
.nav-hamburger::after {
  background: var(--brand) !important;
}
.nav-hamburger:hover span,
.nav-hamburger:hover::before,
.nav-hamburger:hover::after {
  background: #1d3327 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   v26 de-clutter — shared chrome (nav, page title, footer)
   Markup injected by site-chrome.js into the per-page shells:
     <nav class="eqt-header top-nav-bar" data-eqt-nav></nav>
     <footer class="site-footer" data-eqt-footer></footer>
   ═══════════════════════════════════════════════════════════════════ */

/* ── Nav ── */
.top-nav-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 48px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
}
.nav-logo {
  display: flex;
  align-items: center;
  margin-left: 14px;
  text-decoration: none;
}
.nav-dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 12px 0;
  min-width: 210px;
  padding: 8px 0;
  z-index: 300;
  display: none;
  box-shadow: 4px 8px 32px rgba(0, 0, 0, 0.35);
}
.nav-dropdown.open { display: block; }
.nav-dropdown a {
  display: flex;
  align-items: center;
  padding: 9px 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.nav-dropdown a:hover { color: var(--teal-dark); background: var(--teal-light); }
.nav-dropdown a.active { color: var(--teal-dark); background: var(--teal-light); }
.nav-dropdown-divider { height: 1px; background: var(--line); margin: 4px 0; }
.top-nav-bar .auth-info {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ── Page title row: h1 + as-of date, one format, every page ── */
.page-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.page-title-row h1 { margin: 0; }
.as-of {
  font-size: var(--fs-label);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ── Quiet coverage line above a table ── */
.coverage-line {
  font-size: 12px;
  color: var(--ink-muted);
  margin: 4px 0 6px;
}

/* ── Collapsed diagnostics strip at the foot of a page ── */
details.diagnostics-foot {
  margin: 32px 0 8px;
  font-size: 12px;
  color: var(--ink-muted);
}
details.diagnostics-foot summary {
  cursor: pointer;
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
details.diagnostics-foot .diag-items {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 10px 0 4px;
}

/* ── Footer: quiet single-band — short disclaimer + copyright only
   (owner directive 2026-08-09: no navy band, no link columns) ── */
.site-footer {
  background: var(--paper);
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  padding: 20px 32px 24px;
  font-size: 11px;
  margin-top: 48px;
}
.site-footer-inner { max-width: var(--maxw); margin: 0 auto; }
.site-footer-copyright {
  font-size: 10.5px;
  color: var(--ink-muted);
  margin: 6px 0 0;
}
.site-footer-disclaimer {
  max-width: 680px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

/* ── Universe selector — one style for every page (v26 §5) ──
   .eqt-universe-pill  : shared lib (universe-pills.js)
   .uni-pill           : config-driven pages (dashboard, alpha, portfolio) */
.eqt-universe-pills {
  display: flex;
  flex-wrap: nowrap;          /* one row, always */
  gap: 6px;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;           /* scroll rather than wrap on narrow screens */
  scrollbar-width: none;
}
.eqt-universe-pills::-webkit-scrollbar { display: none; }
.uni-row-label {
  flex-shrink: 0;
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: 6px;
}
.eqt-universe-pill,
.uni-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, opacity 120ms ease;
}
.eqt-universe-pill:hover,
.uni-pill:hover { background: rgba(47, 74, 62, 0.08); border-color: var(--brand); }
.eqt-universe-pill:focus-visible,
.uni-pill:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.eqt-universe-pill[aria-pressed="true"],
.uni-pill.active {
  background: var(--teal-light);
  color: var(--teal-dark);
  border-color: var(--teal);
  font-weight: 700;
}
.eqt-universe-pill[data-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.eqt-universe-pill[data-disabled="true"]:hover { background: var(--surface); border-color: var(--line); }

/* Auth badge injected by the page gate — canonical styles. */
.auth-info span { color: var(--ink-muted); }
.auth-info button,
.auth-info a.admin-link {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  text-decoration: none;
}
.auth-info button:hover,
.auth-info a.admin-link:hover { background: var(--teal-light); border-color: var(--teal); }

@media (max-width: 640px) {
  .top-nav-bar { flex-wrap: wrap; height: auto; min-height: 48px; padding: 6px 16px; gap: 4px 0; }
  .top-nav-bar .auth-info { flex-wrap: wrap; }
}

/* ── Charts: one standard site-wide (owner rule, v26.2) ──
   Every chart is full-width and 320px tall. Charts are never side-by-side. */
.chart-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.chart-wrap { position: relative; height: 320px; }

/* ═══════════════════════════════════════════════════════════════════
   v27 design system — the Intel Momentum page is canonical.
   Shared primitives extracted from momentum-detail.html so every page
   inherits the same geometry, modules, metric cards and controls.
   ═══════════════════════════════════════════════════════════════════ */

/* Page geometry — one content envelope site-wide. */
.page-container,
.container { max-width: 1320px; margin: 0 auto; padding: 24px 28px 60px; }

/* Analytical module (chart/table/summary card). */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.chart-card h3,
.module-title {
  font-family: var(--font-display), Georgia, serif;
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
}

/* Metric / factor cards (the Momentum Factors pattern). */
.factor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.factor-cell { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.factor-cell .f-name { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--ink); }
.factor-cell .f-w { color: var(--ink-muted); font-weight: 500; }
.factor-cell .f-pct { font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.factor-cell .f-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.factor-cell .f-bar i { display: block; height: 100%; background: var(--teal); }

/* Summary metrics strip + state chip. */
.stat-line { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; margin: 14px 0 18px; font-size: 12.5px; color: var(--ink-muted); }
.stat-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.state-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 12.5px; font-weight: 600;
}
.state-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Quiet controls — inputs, selects, filter buttons. */
.filter-bar input[type="text"],
.filter-bar input[type="search"],
.filter-bar select,
input.eqt-input, select.eqt-select {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--teal); }
.filter-btn {
  padding: 5px 11px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-muted);
  font-size: 12px; font-weight: 500; cursor: pointer;
}
.filter-btn.active { background: var(--teal-light); color: var(--teal-dark); border-color: var(--teal); }

/* Tables: tabular numerals everywhere; calm THIN rows (v27.2 owner). */
.eqt-table td { font-variant-numeric: tabular-nums lining-nums; }
.eqt-table tbody td { padding: 5px 10px; }
