/* ============================================================================
   mµ — Value Your Mµsic
   ----------------------------------------------------------------------------
   Components only. All design values live in theme.css and are consumed here
   through semantic tokens (--surface-*, --text-*, --accent-*, --space-*…).
   Do not introduce raw hex, px spacing, or font stacks in this file.
   ========================================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overflow-x: hidden;
}
body:has(#ticker-bar:not([hidden])) {
  padding-bottom: var(--space-40);
}

a { color: inherit; text-decoration: none; }

/* The µ glyph in running copy. Kept neutral: the brand guide shows the
   wordmark filled in a single colour, never split across two. */
.mu { font-style: normal; }

/* Wordmark. Helvetica per the guide — genuine Helvetica Neue on Apple
   platforms, Arial elsewhere. Tracking tightened to match the mockups. */
.brand-mark {
  font-family: var(--font-logo);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tighter);
  color: var(--text-primary);
}

.accent-green  { color: var(--accent-positive-text); }
.accent-blue   { color: var(--accent-interactive-text); }
.accent-yellow { color: var(--accent-positive-text); }

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-28);
  padding: var(--space-14) var(--space-32);
  background: var(--veil-page);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-default);
}
.brand .brand-mark { font-size: var(--text-3xl); }
.nav-links {
  display: flex;
  gap: var(--space-24);
  margin-left: var(--space-16);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}
.nav-links a {
  transition: color var(--duration-base) var(--ease-out);
  outline: none;
  box-shadow: none;
}
.nav-links a:hover,
.nav-links a:focus,
.nav-links a:focus-visible { color: var(--text-primary); outline: none; }
.nav-cta { margin-left: auto; }
.nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
}
.nav-logout:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--surface-card);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  padding: var(--space-12) var(--space-24);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out),
              background var(--duration-slow) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent-interactive);
  color: var(--mu-mute-black);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--accent-interactive); color: var(--accent-interactive-text); }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: var(--space-96) var(--space-24) var(--space-64);
  text-align: center;
  overflow: hidden;
}
/* The dark theme used a blurred blue/green glow here. On the Silver Gray
   ground it reads as a stain, and the guide's hero mockup (p.12) is a plain
   field — so it is off. This is the natural home for the guide's supportive
   illustrations (p.10–11) once those assets exist. */
.hero-glow { display: none; }
.hero-inner { position: relative; max-width: 820px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-8);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  padding: var(--space-8) var(--space-14);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-28);
}
.eyebrow .dot {
  width: var(--space-8); height: var(--space-8);
  border-radius: var(--radius-circle);
  background: var(--accent-positive);
}
/* The wordmark at hero scale — single colour, Helvetica, tight. */
.hero-title {
  font-family: var(--font-logo);
  font-size: var(--text-hero);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tighter);
  line-height: 0.95;
  color: var(--text-primary);
}
body.member .hero-title {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(64px, 8vw, 132px);
  line-height: 0.98;
}
/* Tagline. The guide names Helvetica Regular for taglines specifically. */
.tagline {
  font-family: var(--font-logo);
  font-size: var(--text-display);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-6);
  color: var(--text-primary);
}
.hero-desc {
  margin: var(--space-24) auto 0;
  max-width: 700px;
  font-size: var(--text-lg);
  color: var(--text-secondary);
}
.hero-desc strong { color: var(--text-primary); font-weight: var(--weight-semibold); }
.hero-actions {
  display: flex; gap: var(--space-14); justify-content: center;
  margin-top: var(--space-32); flex-wrap: wrap;
}
.hero-stats {
  display: flex; justify-content: center; gap: var(--space-48);
  margin-top: var(--space-48); flex-wrap: wrap;
}
.hstat { display: flex; flex-direction: column; gap: var(--space-4); }
.hstat-val {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}
.hstat-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ===== SECTIONS ===== */
.section { padding: var(--space-64) var(--space-24); }
.section-wrap { max-width: var(--max-width); margin: 0 auto; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-24); margin-bottom: var(--space-28); flex-wrap: wrap;
}
/* Display face — stands in for Perfectly Nineties Regular. */
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}
.section-sub {
  color: var(--text-secondary);
  font-size: var(--text-md);
  margin-top: var(--space-6);
}
/* Smooth in-page scroll targets (sticky nav clearance). */
#assets {
  position: relative;
  scroll-margin-top: 88px;
}
#index,
#feeds,
#news,
#trades,
#markets {
  scroll-margin-top: 88px;
}
.lab-anchor {
  position: absolute;
  width: 0; height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Review tags — temporary A/B labels for stakeholder pick. */
.lab-option-tag {
  display: inline-block;
  margin-bottom: var(--space-10);
  padding: 3px 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--surface-inset);
}

/* Option A — paper tip card over the dark table (primitives escape .on-data remap). */
#asset-table-card { position: relative; }
/* Let soft shadow / full card paint outside the clipped table frame while open. */
#asset-table-card:has(.assets-lab-overlay.is-visible) {
  overflow: visible;
  z-index: 4;
}
.assets-lab-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-32) var(--space-28);
  background: rgba(31, 32, 31, 0.48);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 280ms var(--ease-out), visibility 280ms var(--ease-out);
}
.assets-lab-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: none; /* veil lets row clicks through */
}
.assets-lab-overlay.is-instant,
.assets-lab-cue.is-instant {
  transition: none !important;
}
.assets-lab-overlay-card {
  position: relative;
  width: min(100%, 520px);
  margin: 0;
  padding: var(--space-28) var(--space-28) var(--space-28);
  border: none;
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  color: var(--ink);
  /* Soft edge fading into the dark table — no white halo. */
  box-shadow:
    0 0 0 1px rgba(31, 32, 31, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.22),
    0 22px 48px rgba(0, 0, 0, 0.32),
    0 0 56px rgba(0, 0, 0, 0.28);
  transform: translateY(6px);
  transition: transform 280ms var(--ease-out);
  pointer-events: auto;
}
.assets-lab-overlay.is-visible .assets-lab-overlay-card {
  transform: translateY(0);
}
.assets-lab-overlay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  margin-bottom: var(--space-14);
}
.assets-lab-overlay-top .lab-option-tag {
  margin-bottom: 0;
  color: var(--ink-tertiary);
  background: var(--paper-sunken);
  border-color: var(--line);
}
.assets-lab-overlay-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -4px -6px -4px 0;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink-tertiary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out);
}
.assets-lab-overlay-close:hover {
  color: var(--ink);
  background: var(--paper-sunken);
}
/* Match Search / Valuation Lab section-title + section-sub scale. */
.assets-lab-overlay-title {
  margin: 0 0 var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  color: var(--ink);
}
.assets-lab-overlay-text {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.45;
  color: var(--ink-secondary);
}

/* Option B — section block under the track table (matches Search / News). */
.assets-lab-cue {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin: 0;
  transition:
    grid-template-rows 420ms var(--ease-out),
    opacity 360ms var(--ease-out),
    margin 420ms var(--ease-out);
  pointer-events: none;
}
.assets-lab-cue.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: var(--space-40);
  pointer-events: auto;
}
.assets-lab-cue-inner {
  overflow: hidden;
  min-height: 0;
  padding-top: var(--space-32);
  border-top: 1px solid var(--border-default);
}
.assets-lab-cue .section-head { margin-bottom: 0; }
.assets-lab-cue .section-title { font-size: var(--text-3xl); }

/* ===== MISSION ===== */
.mission { padding: var(--space-32) var(--space-24); }
.mission-grid {
  display: grid; grid-template-columns: 180px 1fr;
  gap: var(--space-32); align-items: start;
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: var(--space-40) 0;
}
/* All-caps label style — Alte Haas Grotesk Bold per the guide. */
.mission-tag {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-top: var(--space-6);
}
.mission-text {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
}
.mission-text strong { font-weight: var(--weight-bold); }
/* Neon Yellow works as a marker behind text, not as text. */
.mission-text em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--yellow-edge) 62%);
  padding: 0 var(--space-2);
}

/* ===== CARDS ===== */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Quantitative surfaces invert to Mute Black (Brand Guide p.7).
   Pair with class="on-data" in the markup so nested tokens flip too. */
.chart-card,
.table-card,
.modal {
  background: var(--surface-data);
  border-color: var(--border-on-data);
  box-shadow: var(--shadow-data);
}

/* ===== INDEX ===== */
.index-toggle {
  display: inline-flex;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: var(--space-4);
}
.toggle-btn {
  border: none; background: transparent; color: var(--text-secondary);
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold);
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
}
.toggle-btn:hover { color: var(--text-primary); }
.toggle-btn.active { background: var(--accent-interactive); color: var(--mu-mute-black); }
.index-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-14); margin-bottom: var(--space-12);
}
.stat-note {
  font-size: var(--text-xs); color: var(--text-tertiary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-16); max-width: 880px;
}
.stat-note strong { color: var(--text-secondary); font-weight: var(--weight-semibold); }
.stat-card {
  padding: var(--space-16) var(--space-20);
  display: flex; flex-direction: column; gap: var(--space-8);
}
.rfr-card {
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.rfr-card:hover { border-color: var(--accent-positive); transform: translateY(-1px); }
.card-hint {
  font-size: var(--text-3xs);
  color: var(--accent-positive-text);
  letter-spacing: var(--tracking-wide);
  text-transform: none;
}
.stat-label {
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.stat-val {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}
.chart-card { padding: var(--space-24) var(--space-24) var(--space-14); position: relative; height: 440px; }
#index-chart { width: 100% !important; }

/* ===== TABLE ===== */
.search-box { display: flex; align-items: center; }
.search-box input {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font: inherit; font-size: var(--text-md);
  padding: var(--space-14) var(--space-24);
  border-radius: var(--radius-pill);
  min-width: 360px; min-height: 54px;
  outline: none;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.search-box input:focus {
  border-color: var(--accent-interactive);
  box-shadow: 0 0 0 4px var(--blue-wash);
}
.search-box input::placeholder { color: var(--text-tertiary); }
.table-card { padding: 0; overflow: hidden; }
.table-scroll { max-height: 560px; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.data-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-data-raised);
  text-align: left;
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: var(--space-14) var(--space-16);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lc { text-transform: none; }
.data-table th .lc { font-size: var(--text-base); }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--text-primary); }
.data-table th.sorted-asc::after  { content: ' ▲'; color: var(--accent-interactive); }
.data-table th.sorted-desc::after { content: ' ▼'; color: var(--accent-interactive); }
.data-table tbody td { padding: var(--space-12) var(--space-16); border-bottom: 1px solid var(--border-subtle); }
.data-table tbody tr:hover { background: var(--blue-wash); }
.asset-row { cursor: pointer; }
.asset-row:hover .asset-name { color: var(--accent-highlight); }
.data-table .asset-name { font-weight: var(--weight-semibold); color: var(--text-primary); }
.data-table .artist-name { color: var(--text-secondary); }
.val-strong { color: var(--accent-positive-text); font-weight: var(--weight-semibold); }
.val-mult   { color: var(--accent-highlight); font-weight: var(--weight-semibold); }
.pos { color: var(--accent-positive-text); }
.neg { color: var(--accent-negative-text); }

/* ===== FEEDS ===== */
.feeds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-28); }
.feed-head { margin-bottom: var(--space-16); }
.feed-card { padding: var(--space-6); }
.feed-scroll { max-height: 620px; overflow: auto; padding: var(--space-6); }
.feed-item {
  display: block;
  padding: var(--space-16) var(--space-14);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.feed-item:hover { background: var(--surface-inset); border-color: var(--border-subtle); }
.feed-item + .feed-item { border-top: 1px solid var(--border-subtle); }
.feed-meta {
  display: flex; align-items: center; gap: var(--space-10);
  font-size: var(--text-xs); color: var(--text-tertiary);
  margin-bottom: var(--space-6); flex-wrap: wrap;
}
.feed-source { color: var(--accent-interactive-text); font-weight: var(--weight-semibold); }
.feed-title {
  font-size: var(--text-md); font-weight: var(--weight-semibold);
  line-height: 1.4; color: var(--text-primary);
}
.feed-item:hover .feed-title { color: var(--accent-interactive-text); }
.feed-summary {
  font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-6);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tag {
  font-size: var(--text-3xs); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  padding: var(--space-4) var(--space-8); border-radius: var(--radius-xs);
}
.tag-bucket { background: var(--yellow-wash); color: var(--text-primary); }
.tag-asset  { background: var(--blue-wash);   color: var(--accent-interactive-text); }
.tag-impact { background: var(--green-wash);  color: var(--accent-positive-text); }
.tag-cat    { background: var(--surface-inset); color: var(--text-secondary); }
.conf-pill { font-weight: var(--weight-bold); }

/* ===== PLACEHOLDERS ===== */
.placeholder-card {
  position: relative; padding: var(--space-32); overflow: hidden;
  min-height: 240px; display: block;
}
.placeholder-preview { filter: blur(3px); opacity: 0.5; pointer-events: none; }
.ph-row {
  display: flex; justify-content: space-between;
  padding: var(--space-12) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-md); color: var(--text-secondary);
}
.ph-row.total {
  border-bottom: none; font-size: var(--text-lg);
  font-weight: var(--weight-bold); color: var(--text-primary); margin-top: var(--space-8);
}
.ph-input { font-variant-numeric: tabular-nums; color: var(--text-tertiary); }
.markets-preview { display: flex; flex-wrap: wrap; gap: var(--space-12); filter: blur(2px); }
.mkt-chip {
  background: var(--surface-inset); border: 1px solid var(--border-default);
  border-radius: var(--radius-pill); padding: var(--space-12) var(--space-20);
  font-weight: var(--weight-semibold); color: var(--text-secondary);
}
.overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-12);
  background: radial-gradient(ellipse at center, var(--veil-card), var(--veil-card-dense));
  text-align: center; padding: var(--space-24);
}
.overlay p { color: var(--text-secondary); font-size: var(--text-base); max-width: 360px; }
.overlay p strong { color: var(--text-primary); font-weight: var(--weight-semibold); }
/* Neon Yellow as a fill with Mute Black type — the guide's sanctioned use. */
.overlay-badge {
  font-size: var(--text-sm); font-weight: var(--weight-black);
  letter-spacing: var(--tracking-widest);
  color: var(--mu-mute-black);
  background: var(--accent-highlight);
  padding: var(--space-10) var(--space-20);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
}
.overlay-badge.live { background: var(--accent-positive); }

/* ===== VALUATION MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  padding: var(--space-28);
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative;
  width: min(960px, 100%); max-height: 90vh; overflow: auto;
  border: 1px solid var(--border-on-data);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  padding: var(--space-32);
  animation: modal-in var(--duration-slow) var(--ease-out);
}
@keyframes modal-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: var(--space-16); right: var(--space-20);
  width: var(--space-32); height: var(--space-32);
  border-radius: var(--radius-circle);
  background: var(--surface-card); border: 1px solid var(--border-default);
  color: var(--text-secondary); font-size: var(--text-xl); line-height: 1;
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.modal-close:hover { color: var(--text-primary); border-color: var(--accent-negative); }
.modal-eyebrow {
  font-size: var(--text-2xs); letter-spacing: var(--tracking-widest);
  font-weight: var(--weight-bold); text-transform: uppercase;
  color: var(--accent-interactive-text);
}
.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl); font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight); margin-top: var(--space-6);
}
.modal-artist { color: var(--text-secondary); font-size: var(--text-base); margin-top: var(--space-2); }
.modal-chips { display: flex; flex-wrap: wrap; gap: var(--space-10); margin: var(--space-20) 0 var(--space-24); }
.chip {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: var(--space-8) var(--space-12);
  display: flex; flex-direction: column; gap: var(--space-2); min-width: 86px;
}
.chip-label {
  font-size: var(--text-3xs); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--text-tertiary);
}
.chip-val { font-size: var(--text-md); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.modal-controls { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); margin-bottom: var(--space-24); }
.ctrl { display: flex; flex-direction: column; gap: var(--space-6); }
.agg-scope-toggles {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-16);
  margin-bottom: var(--space-16); padding-bottom: var(--space-14);
  border-bottom: 1px solid var(--border-subtle);
}
.agg-scope-toggles .rmc-open-btn { margin-left: auto; }
.agg-scope-toggle {
  display: flex; align-items: center; gap: var(--space-8);
  font-size: var(--text-sm); cursor: pointer; color: var(--text-secondary); user-select: none;
}
.agg-scope-toggle input[type="checkbox"] {
  cursor: pointer; width: var(--space-16); height: var(--space-16);
  accent-color: var(--accent-positive);
}
.agg-scope-toggle input[type="checkbox"]:checked + span { color: var(--text-primary); font-weight: var(--weight-semibold); }
.agg-vinyl-mode {
  display: flex; align-items: center; gap: var(--space-10); margin-left: auto;
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-xs); padding: var(--space-6) var(--space-12);
}
.agg-vinyl-label {
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  color: var(--text-tertiary); text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
.agg-vinyl-opt {
  display: flex; align-items: center; gap: var(--space-6);
  font-size: var(--text-xs); color: var(--text-secondary); cursor: pointer; user-select: none;
}
.agg-vinyl-opt input[type="radio"] { accent-color: var(--accent-positive); cursor: pointer; }
.agg-itemize-menu { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); margin-bottom: var(--space-24); }
.agg-menu-group { display: flex; flex-direction: column; gap: var(--space-8); }
.agg-menu-toggle {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-xs); color: var(--text-primary);
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold);
  padding: var(--space-10) var(--space-12); cursor: pointer; text-align: left;
  transition: border-color var(--duration-slow) var(--ease-out);
}
.agg-menu-toggle:hover { border-color: var(--accent-interactive); }
.agg-menu-toggle.open { border-color: var(--accent-interactive); background: var(--surface-inset); }
.agg-menu-items {
  display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-10);
  background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-xs);
}
.agg-comp-header {
  display: grid; grid-template-columns: 1fr 52px 52px; gap: var(--space-6); align-items: center;
  font-size: var(--text-3xs); font-weight: var(--weight-bold); color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  padding: 0 var(--space-2) var(--space-4); border-bottom: 1px solid var(--border-subtle);
}
.agg-comp-header span:last-child, .agg-comp-header span:nth-child(2) { text-align: center; }
.agg-comp-row {
  display: grid; grid-template-columns: 1fr 52px 52px; gap: var(--space-6); align-items: center;
  font-size: var(--text-xs); color: var(--text-secondary); padding: var(--space-4) var(--space-2);
}
.agg-comp-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agg-comp-row input[type="checkbox"] {
  cursor: pointer; width: var(--space-14); height: var(--space-14);
  justify-self: center; accent-color: var(--accent-positive);
}
.agg-comp-row input[type="checkbox"].agg-master-excl,
.agg-comp-row input[type="checkbox"].agg-pub-excl { accent-color: var(--accent-negative); }
.agg-comp-row input[type="checkbox"]:disabled { opacity: 0.3; cursor: not-allowed; }
.agg-comp-row.excluded span { color: var(--text-tertiary); text-decoration: line-through; }
.ctrl > span { font-size: var(--text-xs); color: var(--text-secondary); }
.ctrl-input {
  display: flex; align-items: center;
  background: var(--surface-inset); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); padding: 0 var(--space-12);
}
.ctrl-input .prefix, .ctrl-input .suffix { color: var(--text-tertiary); font-size: var(--text-md); }
.ctrl-input input {
  background: transparent; border: none; outline: none; color: var(--text-primary);
  font: inherit; font-size: var(--text-md); font-weight: var(--weight-semibold);
  padding: var(--space-12) var(--space-8); width: 100%;
}
.ctrl select {
  background: var(--surface-inset); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font: inherit; font-size: var(--text-md); font-weight: var(--weight-semibold);
  padding: var(--space-12); outline: none; cursor: pointer;
}
.ctrl select:focus, .ctrl-input:focus-within { border-color: var(--accent-interactive); }
.ctrl-input.is-invalid,
.ctrl-input.is-invalid:focus-within { border-color: var(--accent-negative); }
.ctrl-note.mix-field-warn {
  color: var(--accent-negative-text);
  font-weight: var(--weight-medium);
}
.ctrl-note.mix-field-warn[hidden] { display: none; }
.ctrl-note.clamp-flash { color: var(--accent-negative-text); font-weight: var(--weight-medium); }
.mu-presets { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-top: var(--space-8); }
.mu-preset {
  font-size: var(--text-2xs); font-weight: var(--weight-semibold);
  padding: var(--space-4) var(--space-10); border-radius: var(--radius-pill);
  border: 1px solid var(--border-default); background: var(--surface-card);
  color: var(--text-secondary); cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.mu-preset:hover { color: var(--text-primary); }
.mu-preset.active { background: var(--accent-interactive); color: var(--mu-mute-black); border-color: transparent; }

/* lab tabs */
.lab-tabs {
  display: flex; align-items: center; gap: var(--space-6);
  border-bottom: 1px solid var(--border-subtle); margin: var(--space-4) 0 0;
}
.lab-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-secondary); font: inherit; font-size: var(--text-base);
  font-weight: var(--weight-semibold); padding: var(--space-10) var(--space-16); cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.lab-tab:hover { color: var(--text-primary); }
.lab-tab.active { color: var(--text-primary); border-bottom-color: var(--accent-positive); }
.lab-pane { display: none; padding-top: var(--space-20); }
.lab-pane.active { display: block; }
.pane-note { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-16); max-width: 760px; }
.ctrl-note { font-size: var(--text-2xs); color: var(--text-tertiary); margin-top: var(--space-6); line-height: 1.45; }

.bm-tab-actions { display: flex; align-items: center; gap: var(--space-6); margin-left: auto; padding-bottom: var(--space-2); }
.bm-save-btn, .bm-list-btn, .bm-reset-btn {
  font-size: var(--text-2xs); font-weight: var(--weight-bold);
  padding: var(--space-4) var(--space-12); border-radius: var(--radius-xs);
  border: 1px solid var(--border-default); background: var(--surface-card);
  color: var(--text-secondary); cursor: pointer; letter-spacing: var(--tracking-wide);
  transition: color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.bm-save-btn:hover, .bm-save-btn.flash { border-color: var(--accent-positive); color: var(--accent-positive-text); }
.bm-list-btn:hover, .bm-list-btn.open { border-color: var(--accent-interactive); color: var(--accent-interactive-text); }
.bm-reset-btn:hover, .bm-reset-btn.flash { border-color: var(--accent-negative, #c0392b); color: var(--accent-negative-text, #c0392b); }
.bm-panel {
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  background: var(--surface-card); margin: var(--space-8) 0 var(--space-16); overflow: hidden;
}
.bm-panel-inner { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.bm-empty { font-size: var(--text-xs); color: var(--text-tertiary); padding: var(--space-16); text-align: center; margin: 0; }
.bm-item {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center;
  gap: var(--space-10); padding: var(--space-10) var(--space-14);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--duration-fast) var(--ease-out);
}
.bm-item:last-child { border-bottom: none; }
.bm-item:hover { background: var(--surface-inset); }
.bm-item-name {
  font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-xs);
  padding: var(--space-2) var(--space-4); outline: none; background: transparent; font-family: inherit;
}
.bm-item-name:focus { border-color: var(--accent-interactive); background: var(--surface-inset); }
.bm-item-meta { font-size: var(--text-2xs); color: var(--text-tertiary); white-space: nowrap; }
.bm-item-total { font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--accent-positive-text); white-space: nowrap; }
.bm-item-load {
  font-size: var(--text-2xs); font-weight: var(--weight-semibold);
  padding: var(--space-4) var(--space-10); border-radius: var(--radius-xs);
  border: 1px solid var(--border-default); background: transparent; color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.bm-item-load:hover { border-color: var(--accent-positive); color: var(--accent-positive-text); }
.bm-item-del {
  font-size: var(--text-base); line-height: 1; padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-xs); border: none; background: transparent;
  color: var(--text-tertiary); cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}
.bm-item-del:hover { color: var(--accent-negative); }

/* market mix */
.market-controls { grid-template-columns: repeat(3, 1fr); }
.mix-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-16);
  margin-bottom: var(--space-4);
  min-width: 0;
}
.mix-col { min-width: 0; }
.mix-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-8); flex-wrap: wrap;
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); color: var(--text-primary); margin-bottom: var(--space-8);
}
.mix-head-label { min-width: 0; }
.mix-sub { color: var(--text-tertiary); font-weight: var(--weight-medium); letter-spacing: var(--tracking-normal); }
.mix-status {
  font-size: var(--text-2xs); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-normal); color: var(--text-tertiary);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mix-status.is-ok { color: var(--accent-positive-text); }
.mix-status.is-warn { color: var(--accent-negative-text); }
.mix-stack {
  display: flex; height: 8px; width: 100%; overflow: hidden; gap: 2px;
  border-radius: var(--radius-xs); margin-bottom: var(--space-14);
  background: var(--surface-inset);
}
.mix-stack-seg { flex: 0 0 auto; min-width: 0; border-radius: 1px; transition: flex var(--duration-fast) var(--ease-out); }
.mix-stack-seg[data-seg="digital"],
.mix-stack-seg[data-seg="pm"] { background: var(--accent-positive); }
.mix-stack-seg[data-seg="physical"],
.mix-stack-seg[data-seg="so"] { background: var(--accent-interactive); }
.mix-stack-seg[data-seg="other"] { background: var(--accent-highlight); }
.mix-group[data-mix-group="digital"],
.mix-group[data-mix-group="pm"] {
  --mix-accent: var(--accent-positive);
  --mix-wash: var(--green-wash);
  --mix-edge: var(--green-edge);
}
.mix-group[data-mix-group="physical"],
.mix-group[data-mix-group="so"] {
  --mix-accent: var(--accent-interactive);
  --mix-wash: var(--blue-wash);
  --mix-edge: var(--blue-edge);
}
.mix-group[data-mix-group="other"] {
  --mix-accent: var(--accent-highlight);
  --mix-wash: var(--yellow-wash);
  --mix-edge: var(--yellow-edge);
}
.mix-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-data-raised);
  box-shadow: inset 3px 0 0 var(--mix-accent);
  padding: var(--space-8) var(--space-10) var(--space-6) var(--space-12);
  margin-bottom: var(--space-10);
  min-width: 0;
}
.mix-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-8);
  align-items: center;
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--mix-edge);
}
.mix-card-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--mix-accent);
  line-height: var(--leading-snug);
}
.mix-card-kicker {
  font-size: var(--text-3xs);
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
  margin-top: var(--space-2);
}
.mix-card-pct {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.mix-card-rev {
  text-align: right;
  min-width: 4.8em;
}
.mix-card-rev-label {
  display: block;
  font-size: var(--text-3xs);
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
}
.mix-card-rev-val {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  margin-top: var(--space-2);
}
.mix-card-body {
  min-width: 0;
  padding-left: var(--space-8);
}
.mix-child {
  display: grid;
  grid-template-columns: minmax(0, 10.5rem) minmax(40px, 1fr) auto;
  column-gap: var(--space-8);
  align-items: center;
  padding: var(--space-4) 0;
  min-width: 0;
}
.mix-child-name {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
}
.mix-child-rev {
  font-size: var(--text-2xs);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 3.6em;
  justify-self: end;
}
.mix-child-streaming .mix-child-name { color: var(--text-secondary); }
.mix-child-link {
  display: block;
  font-size: var(--text-3xs);
  color: color-mix(in srgb, var(--accent-highlight) 42%, var(--text-on-data));
  font-weight: var(--weight-medium);
  margin-top: 1px;
  letter-spacing: var(--tracking-normal);
}
.mix-link-note {
  color: color-mix(in srgb, var(--accent-highlight) 42%, var(--text-on-data));
}
.mix-link-note[hidden] { display: none; }
.mix-total-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-8);
  align-items: baseline;
  padding: var(--space-8) var(--space-4) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  border-top: 1px solid var(--border-default);
}
.mix-total-pct,
.mix-total-rev {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.mix-total-rev { min-width: 4.8em; }
.mix-pct-input {
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}
.mix-pct-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-self: end;
  flex-direction: row-reverse;
}
.mix-pct-wrap .mix-input { justify-self: unset; }
.mix-stepper {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  background: none;
}
.mix-step {
  appearance: none;
  background: none;
  border: none;
  padding: 1px;
  margin: 0;
  width: 10px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  line-height: 0;
}
.mix-step:hover { color: var(--text-primary); }
.mix-step:focus { outline: none; }
.mix-step:focus-visible { color: var(--mix-accent, var(--accent-interactive)); }
.mix-step-up::before,
.mix-step-down::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
}
.mix-step-up::before { border-bottom: 4px solid currentColor; }
.mix-step-down::before { border-top: 4px solid currentColor; }
.mix-group .mix-bar::-webkit-slider-thumb { background: var(--mix-accent); }
.mix-group .mix-bar::-moz-range-thumb { background: var(--mix-accent); }
.mix-group .mix-bar:focus,
.mix-group .mix-bar:focus-visible { border-color: var(--mix-edge); }
.mix-group .mix-input:focus { border-color: var(--mix-accent); }
.mix-warn {
  font-size: var(--text-2xs); color: var(--accent-negative-text);
  font-weight: var(--weight-medium); letter-spacing: var(--tracking-normal);
  line-height: var(--leading-normal); margin-top: var(--space-8); padding: 0 var(--space-2);
}
.mix-warn[hidden] { display: none; }
@keyframes mix-warn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.mix-warn-flash { animation: mix-warn-pulse 0.35s var(--ease-out) 3; }
.ctrl-input input[readonly] { color: var(--text-secondary); cursor: default; }
.ctrl-input:has(input[readonly]):focus-within { border-color: var(--border-default); }
.mix-footnote { font-size: var(--text-3xs); color: var(--text-tertiary); line-height: var(--leading-normal); margin-top: var(--space-8); padding: 0 var(--space-2); }
.mix-alloc {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  column-gap: var(--space-6);
  row-gap: var(--space-4);
  width: 100%;
  min-width: 0;
}
.mix-bar {
  -webkit-appearance: none; appearance: none;
  grid-column: 1;
  width: 100%; height: 6px; margin: 0;
  background: linear-gradient(
    to right,
    var(--mix-accent, var(--accent-interactive)) 0 var(--mix-fill, 0%),
    var(--surface-inset) var(--mix-fill, 0%)
  );
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default); outline: none; cursor: pointer;
  min-width: 0;
}
.mix-bar::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-interactive); border: 2px solid var(--surface-data);
  box-shadow: 0 0 0 1px var(--border-strong); cursor: grab;
}
.mix-bar::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-interactive); border: 2px solid var(--surface-data);
  box-shadow: 0 0 0 1px var(--border-strong); cursor: grab;
}
.mix-bar:active::-webkit-slider-thumb { cursor: grabbing; }
.mix-bar:focus,
.mix-bar:focus-visible { border-color: var(--accent-interactive); }
.mix-bar-val {
  grid-column: 2 / -1;
  justify-self: end;
  min-width: 2.4em;
  font-size: var(--text-2xs); font-variant-numeric: tabular-nums;
  color: var(--text-secondary); text-align: right;
}
.mix-input {
  width: 3.2em; min-width: 2.75rem; background: var(--surface-inset); border: 1px solid var(--border-default);
  color: var(--text-primary); font: inherit; font-size: var(--text-2xs); text-align: right;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-xs); outline: none;
  font-variant-numeric: tabular-nums;
  justify-self: end;
  /* hide spinner so 2–3 digits stay visible */
  -moz-appearance: textfield;
}
.mix-input::-webkit-outer-spin-button,
.mix-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.mix-input:focus { border-color: var(--accent-interactive); }
.mix-input.mix-bucket-input {
  width: 3.35em;
  min-width: 3.35rem;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: 1;
  padding: var(--space-6) var(--space-8);
  color: var(--mix-accent);
  border-color: var(--mix-accent);
  background: transparent;
}
.mix-input.mix-bucket-input:focus {
  border-color: var(--mix-accent);
}
.mix-card-pct .mix-pct-wrap {
  gap: 4px;
}
.mix-card-pct .mix-step {
  color: var(--mix-accent);
  opacity: 0.75;
}
.mix-card-pct .mix-step:hover {
  opacity: 1;
  color: var(--mix-accent);
}
.mix-card-pct .mix-pct-suffix {
  color: var(--mix-accent);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: 1;
}
.mix-pct-suffix {
  color: var(--text-tertiary); font-size: var(--text-2xs);
  justify-self: start;
}
.mix-row-replaced { opacity: 0.85; }
.mix-row-replaced #mix-physvin-alloc { display: none; }
.mix-replaced-note {
  font-size: var(--text-2xs);
  color: var(--accent-highlight);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-normal);
  line-height: var(--leading-normal);
  min-width: 0;
}

/* vinyl */
.vinyl-controls { grid-template-columns: repeat(4, 1fr); }
.vinyl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-12); margin: var(--space-4) 0 var(--space-20); }
.vinyl-stats .chip { min-width: 0; }

.modal-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--space-16); align-items: start; }
.modal-chart-wrap {
  height: 260px; background: var(--surface-data-inset);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-14);
}
.modal-table-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.agg-chart-wrap {
  height: 320px; background: var(--surface-data-inset);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--space-14); margin-bottom: var(--space-12);
}
.agg-table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-6); }
.agg-table-label {
  font-size: var(--text-2xs); font-weight: var(--weight-bold); color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
.agg-copy-btn {
  font-size: var(--text-2xs); font-weight: var(--weight-semibold);
  padding: var(--space-4) var(--space-12); border-radius: var(--radius-xs);
  border: 1px solid var(--border-default); background: var(--surface-card);
  color: var(--text-secondary); cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.agg-copy-btn:hover, .agg-copy-btn.copied { border-color: var(--accent-positive); color: var(--accent-positive-text); }
.agg-table-wrap { overflow: auto; max-height: 320px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.val-table { font-size: var(--text-xs); }
.val-table thead th { background: var(--surface-data-raised); padding: var(--space-8) var(--space-10); font-size: var(--text-2xs); }
.val-table td { padding: var(--space-8) var(--space-10); }
.modal-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--space-24); padding-top: var(--space-16);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-md); color: var(--text-secondary);
}
.modal-total { font-size: var(--text-2xl); font-weight: var(--weight-black); font-variant-numeric: tabular-nums; }
.rmc-open-btn {
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  padding: var(--space-8) var(--space-14); border-radius: var(--radius-xs);
  border: 1px solid var(--blue-edge); background: var(--blue-wash);
  color: var(--accent-interactive-text); cursor: pointer; letter-spacing: var(--tracking-wide);
  transition: border-color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out);
}
.rmc-open-btn:hover { border-color: var(--accent-interactive); }

/* ===== DCF DISCOUNT RATE / NPV ROW ===== */
.agg-dr-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: var(--space-20);
  align-items: end;
  margin-top: var(--space-16); padding: var(--space-16) var(--space-20);
  background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-md);
}
.agg-dr-label, .agg-dr-npv-label {
  font-size: var(--text-3xs); font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider); text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: var(--space-8);
}
.agg-dr-field { display: flex; align-items: center; gap: var(--space-6); }
.agg-dr-field input {
  width: 72px; background: var(--surface-inset); border: 1px solid var(--border-default);
  border-radius: var(--radius-xs); padding: var(--space-8) var(--space-10);
  color: var(--text-primary); font-family: inherit; font-size: var(--text-lg);
  font-weight: var(--weight-bold); text-align: right;
}
.agg-dr-field input:focus { outline: none; border-color: var(--accent-interactive); box-shadow: 0 0 0 3px var(--blue-wash); }
.agg-dr-unit { font-size: var(--text-md); font-weight: var(--weight-semibold); color: var(--text-secondary); }
.agg-dr-mid, .agg-dr-right { text-align: right; min-width: 0; }
.agg-dr-npv-val {
  font-size: var(--text-2xl); font-weight: var(--weight-black);
  color: var(--accent-positive-text); letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}
.agg-dr-npv-val.agg-ind-val { color: var(--accent-interactive-text); }
.agg-dr-hint {
  margin-top: var(--space-4);
  font-size: var(--text-3xs); color: var(--text-tertiary);
  line-height: var(--leading-normal);
}
@media (max-width: 720px) {
  .agg-dr-row { grid-template-columns: 1fr; align-items: start; }
  .agg-dr-mid, .agg-dr-right { text-align: left; }
}

/* ===== RMC MODAL ===== */
.rmc-backdrop { z-index: 1100; }
.rmc-modal { max-width: 920px; max-height: 88vh; overflow-y: auto; }
.rmc-loading { text-align: center; padding: var(--space-40); color: var(--text-tertiary); font-size: var(--text-base); }
.rmc-quick-take, .rmc-guidance {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-interactive); border-radius: var(--radius-sm);
  padding: var(--space-16); margin-bottom: var(--space-24);
  font-size: var(--text-sm); color: var(--text-secondary); line-height: var(--leading-relaxed);
}
.rmc-guidance { margin-bottom: 0; }
.rmc-cols, .rmc-top-grid, .rmc-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); margin-bottom: var(--space-24); }
.rmc-panel {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: var(--space-16);
}
.rmc-panel-title, .rmc-flags-title, .rmc-guidance-title {
  font-size: var(--text-3xs); font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider); color: var(--text-tertiary);
  text-transform: uppercase; margin-bottom: var(--space-12);
}
.rmc-guidance-title { color: var(--accent-interactive-text); }
.rmc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--space-6) 0; border-bottom: 1px solid var(--border-subtle); font-size: var(--text-sm);
}
.rmc-row:last-child { border-bottom: none; }
.rmc-row-label { color: var(--text-secondary); }
.rmc-row-val { font-weight: var(--weight-semibold); color: var(--text-primary); font-size: var(--text-sm); }
.rmc-divider-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--space-8) 0 var(--space-4); font-size: var(--text-base); font-weight: var(--weight-black);
}
.rmc-divider-row .rmc-row-label { color: var(--text-primary); }
.rmc-divider-row .rmc-row-val { color: var(--accent-positive-text); font-size: var(--text-lg); }
.rmc-range {
  display: inline-block; margin-top: var(--space-10); padding: var(--space-6) var(--space-12);
  background: var(--green-wash); border: 1px solid var(--green-edge); border-radius: var(--radius-xs);
  font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--accent-positive-text);
}
.rmc-applied-hero {
  padding: var(--space-20); margin-bottom: var(--space-16);
  background: var(--green-wash); border: 1px solid var(--green-edge); border-radius: var(--radius-sm);
  text-align: center;
}
.rmc-applied-label {
  font-size: var(--text-3xs); font-weight: var(--weight-black);
  color: var(--text-tertiary); letter-spacing: var(--tracking-wider); text-transform: uppercase;
}
.rmc-applied-val { margin-top: var(--space-4); color: var(--accent-positive-text); font-size: var(--text-4xl); font-weight: var(--weight-black); line-height: 1; white-space: nowrap; }
.rmc-applied-sub { margin-top: var(--space-6); font-size: var(--text-xs); color: var(--accent-positive-text); font-weight: var(--weight-bold); }
.rmc-applied-line { margin-top: var(--space-8); font-size: var(--text-2xs); color: var(--text-tertiary); line-height: var(--leading-normal); }
.rmc-applied-note { font-size: var(--text-2xs); color: var(--text-tertiary); line-height: var(--leading-normal); margin-bottom: var(--space-12); }
.rmc-subtitle {
  margin: 0 0 var(--space-10);
  font-size: var(--text-3xs); font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider); color: var(--text-tertiary); text-transform: uppercase;
}
.rmc-sensitivity-rail {
  display: grid; grid-template-columns: 1fr 22px 1fr 22px 1fr; gap: var(--space-6);
  align-items: center; margin-bottom: var(--space-8);
}
.rmc-sens-case {
  padding: var(--space-8) var(--space-6); border: 1px solid var(--border-subtle); border-radius: var(--radius-xs);
  background: var(--surface-inset); text-align: center;
}
.rmc-sens-case span, .rmc-sens-case small {
  display: block; color: var(--text-tertiary); font-size: var(--text-3xs); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.rmc-sens-case strong { display: block; margin-bottom: var(--space-4); color: var(--text-primary); font-size: var(--text-base); }
.rmc-sens-case.base { border-color: var(--green-edge); background: var(--green-wash); }
.rmc-sens-case.base strong { color: var(--accent-positive-text); }
.rmc-sens-dash { height: 1px; background: var(--border-default); }
.rmc-benchmark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); margin-bottom: var(--space-8); }
.rmc-mini-card {
  padding: var(--space-10); border: 1px solid var(--border-subtle); border-radius: var(--radius-xs);
  background: var(--surface-inset);
}
.rmc-mini-card span, .rmc-mini-card small {
  display: block; color: var(--text-tertiary); font-size: var(--text-3xs); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.rmc-mini-card strong { display: block; margin: var(--space-4) 0 var(--space-2); color: var(--text-primary); font-size: var(--text-lg); }
.rmc-mini-card.muted { opacity: 0.65; }
.rmc-adjust-map { display: grid; gap: var(--space-4); }
.rmc-adjust-map div {
  display: grid; grid-template-columns: 84px 64px 1fr; gap: var(--space-10); align-items: center;
  padding: var(--space-8) 0; border-bottom: 1px solid var(--border-subtle);
}
.rmc-adjust-map div:last-child { border-bottom: none; }
.rmc-adjust-map span {
  color: var(--text-tertiary); font-size: var(--text-2xs); font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.rmc-adjust-map strong { color: var(--text-primary); font-size: var(--text-base); font-weight: var(--weight-black); }
.rmc-adjust-map em { color: var(--text-secondary); font-size: var(--text-xs); font-style: normal; }
.rmc-signals { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-bottom: var(--space-24); }
.rmc-signal {
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-8) var(--space-12); border-radius: var(--radius-xs);
  border: 1px solid; font-size: var(--text-xs); font-weight: var(--weight-semibold);
}
.rmc-signal-label { color: inherit; opacity: 0.75; font-weight: var(--weight-medium); }
.rmc-signal-val { font-weight: var(--weight-black); }
.rmc-signal.green  { background: var(--green-wash);  border-color: var(--green-edge);  color: var(--accent-positive-text); }
.rmc-signal.yellow { background: var(--yellow-wash); border-color: var(--yellow-edge); color: var(--text-primary); }
.rmc-signal.orange { background: var(--loss-wash);   border-color: var(--loss-edge);   color: var(--accent-negative-text); }
.rmc-signal.red    { background: var(--loss-wash);   border-color: var(--loss-edge);   color: var(--accent-negative-text); }
.rmc-flags { margin-bottom: var(--space-24); }
.rmc-flag {
  display: flex; align-items: flex-start; gap: var(--space-10);
  padding: var(--space-8) var(--space-12); border-radius: var(--radius-xs);
  border: 1px solid; margin-bottom: var(--space-6);
  font-size: var(--text-xs); line-height: var(--leading-normal);
}
.rmc-flag.green  { background: var(--green-wash);  border-color: var(--green-edge);  color: var(--accent-positive-text); }
.rmc-flag.yellow { background: var(--yellow-wash); border-color: var(--yellow-edge); color: var(--text-primary); }
.rmc-flag.orange { background: var(--loss-wash);   border-color: var(--loss-edge);   color: var(--accent-negative-text); }
.rmc-flag.red    { background: var(--loss-wash);   border-color: var(--loss-edge);   color: var(--accent-negative-text); }
.rmc-flag-icon { font-size: var(--text-base); line-height: 1.4; flex-shrink: 0; }
.rmc-flag-text { color: var(--text-secondary); }
.rmc-flag-text strong, .rmc-guidance-text strong, .rmc-detail-body strong { color: var(--text-primary); }
.rmc-guidance-text { font-size: var(--text-sm); color: var(--text-secondary); line-height: var(--leading-relaxed); }
.rmc-detail { margin: var(--space-2) 0 var(--space-8); border-radius: var(--radius-xs); overflow: hidden; }
.rmc-detail summary {
  font-size: var(--text-2xs); font-weight: var(--weight-semibold);
  color: var(--accent-interactive-text); cursor: pointer; padding: var(--space-4) 0;
  list-style: none; display: flex; align-items: center; gap: var(--space-4);
  opacity: 0.8; transition: opacity var(--duration-base) var(--ease-out);
}
.rmc-detail summary::-webkit-details-marker { display: none; }
.rmc-detail summary::before { content: '▸'; font-size: 9px; transition: transform var(--duration-slow) var(--ease-out); }
.rmc-detail[open] summary::before { transform: rotate(90deg); }
.rmc-detail summary:hover { opacity: 1; }
.rmc-detail-body {
  font-size: var(--text-xs); color: var(--text-secondary); line-height: var(--leading-relaxed);
  padding: var(--space-10) var(--space-12) var(--space-12);
  background: var(--blue-wash); border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  border: 1px solid var(--blue-edge); border-top: none;
}
.rmc-detail-body em { color: var(--accent-positive-text); font-style: normal; }
.rmc-mini-table { width: 100%; border-collapse: collapse; margin-top: var(--space-4); font-size: var(--text-2xs); }
.rmc-mini-table th {
  text-align: left; color: var(--text-tertiary); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border-default);
}
.rmc-mini-table td { padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.rmc-mini-table tr:last-child td { border-bottom: none; }
.rmc-beta-card { display: grid; gap: var(--space-10); }
.rmc-beta-copy,
.rmc-beta-note {
  margin: 0; color: var(--text-secondary); font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}
.rmc-beta-copy p { margin: 0 0 var(--space-10); }
.rmc-beta-copy p:last-child { margin-bottom: 0; }
.rmc-beta-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6); font-size: var(--text-3xs); color: var(--text-tertiary);
}
.rmc-beta-stats strong { color: var(--text-primary); font-weight: var(--weight-black); }
.rmc-beta-stats span:last-child { grid-column: 1 / -1; white-space: nowrap; }
.rmc-beta-hist {
  position: relative; display: flex; align-items: flex-end; gap: 2px;
  height: 96px; padding: var(--space-14) var(--space-6) 0;
  background: var(--surface-data-inset); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); overflow: hidden;
}
.rmc-beta-bar {
  flex: 1 1 0; min-width: 3px; border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  background: linear-gradient(180deg, var(--accent-interactive), rgba(21, 148, 237, 0.25));
  opacity: 0.72;
}
.rmc-beta-marker {
  position: absolute; top: var(--space-8); bottom: 0; width: 2px;
  transform: translateX(-1px); background: var(--text-tertiary);
}
.rmc-beta-marker b {
  position: absolute; top: -2px; left: var(--space-4);
  font-size: 9px; line-height: 1; letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--text-secondary); white-space: nowrap;
}
.rmc-beta-marker.asset { background: var(--accent-positive); box-shadow: 0 0 var(--space-8) rgba(85, 182, 47, 0.75); }
.rmc-beta-marker.asset b { color: var(--accent-positive-text); }
.rmc-beta-marker.median { background: var(--accent-interactive); }
.rmc-beta-marker.median b { color: var(--accent-interactive); }
.rmc-beta-scale {
  display: flex; justify-content: space-between; gap: var(--space-10);
  color: var(--text-tertiary); font-size: 10px; line-height: var(--leading-tight);
}
.rmc-beta-scale b { color: var(--accent-positive-text); font-size: var(--text-3xs); }
.rmc-conc-control { display: grid; gap: var(--space-10); color: var(--text-secondary); }
.rmc-conc-control p { margin: 0; font-size: var(--text-2xs); line-height: var(--leading-normal); }
.rmc-conc-control label {
  display: grid; grid-template-columns: 1fr 96px auto; align-items: center;
  gap: var(--space-8); font-size: var(--text-2xs); color: var(--text-primary);
}
.rmc-conc-control input {
  width: 100%; padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-xs); border: 1px solid var(--border-default);
  background: var(--surface-data-inset); color: var(--text-primary);
  font: inherit; font-weight: var(--weight-bold); text-align: right;
}
.rmc-conc-control small { color: var(--text-tertiary); font-size: var(--text-3xs); }
.rmc-apply-row {
  display: flex; align-items: center; gap: var(--space-14);
  margin-top: var(--space-24); padding-top: var(--space-16);
  border-top: 1px solid var(--border-subtle);
}
.rmc-apply-btn {
  padding: var(--space-10) var(--space-20); border-radius: var(--radius-sm); border: none;
  background: var(--accent-positive); color: var(--mu-mute-black);
  font-family: inherit; font-size: var(--text-sm); font-weight: var(--weight-black);
  cursor: pointer; letter-spacing: var(--tracking-wide); white-space: nowrap;
  transition: opacity var(--duration-base) var(--ease-out);
}
.rmc-apply-btn:hover { opacity: 0.85; }
.rmc-apply-hint { font-size: var(--text-xs); color: var(--text-tertiary); }
.rmc-disc { font-size: var(--text-3xs); color: var(--text-tertiary); margin-top: var(--space-16); line-height: var(--leading-normal); }

/* ===== RFR MODAL ===== */
.rfr-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-14); margin-bottom: var(--space-16); flex-wrap: wrap;
}
.range-pills {
  display: inline-flex; background: var(--surface-card);
  border: 1px solid var(--border-default); border-radius: var(--radius-pill); padding: var(--space-4);
}
.range-pills button {
  border: none; background: transparent; color: var(--text-secondary);
  font: inherit; font-size: var(--text-xs); font-weight: var(--weight-semibold);
  padding: var(--space-6) var(--space-14); border-radius: var(--radius-pill); cursor: pointer;
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.range-pills button.active { background: var(--accent-interactive); color: var(--mu-mute-black); }
.rfr-hint { font-size: var(--text-2xs); color: var(--text-tertiary); }
.rfr-chart-wrap {
  height: 340px; background: var(--surface-data-inset);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-16);
}
.markets-card {
  transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.markets-card:hover { transform: translateY(-2px); border-color: var(--accent-positive); }

/* ===== LOADING / ERROR ===== */
.loading { padding: var(--space-40); text-align: center; color: var(--text-tertiary); font-size: var(--text-base); }
.error   { padding: var(--space-32); text-align: center; color: var(--accent-negative-text); font-size: var(--text-sm); }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border-default); margin-top: var(--space-40); padding-top: var(--space-48); }
.footer-grid { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-32); padding-bottom: var(--space-32); }
.footer-brand { font-size: var(--text-4xl); }
.footer-tag {
  font-family: var(--font-logo);
  color: var(--text-secondary); font-weight: var(--weight-regular); margin-top: var(--space-4);
}
.footer-note { color: var(--text-tertiary); font-size: var(--text-sm); max-width: 620px; }
.footer-bar {
  border-top: 1px solid var(--border-subtle); padding: var(--space-24);
  text-align: center; color: var(--text-tertiary);
  font-size: var(--text-xs); letter-spacing: var(--tracking-wide);
}

/* ===== RISK-ADJUSTED TICKER ===== */
.ticker-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; align-items: stretch; height: var(--space-40);
  background: var(--surface-data);
  border-top: 1px solid var(--border-default);
  box-shadow: var(--shadow-data);
}
.ticker-bar[hidden] { display: none; }
.ticker-label {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-8);
  padding: 0 var(--space-16); font-size: var(--text-3xs); font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider); text-transform: uppercase;
  color: var(--text-secondary); background: var(--surface-card);
  border-right: 1px solid var(--border-default); white-space: nowrap;
}
.ticker-label-dot {
  width: var(--space-6); height: var(--space-6); border-radius: var(--radius-circle);
  background: var(--accent-positive); box-shadow: 0 0 var(--space-6) var(--accent-positive);
  flex-shrink: 0;
}
.ticker-track-wrap {
  flex: 1 1 auto; overflow: hidden; position: relative;
  mask-image: linear-gradient(to right, transparent, #000 var(--space-24), #000 calc(100% - var(--space-24)), transparent);
}
.ticker-track {
  display: flex; align-items: center; height: 100%; width: max-content;
  animation: ticker-scroll 120s linear infinite; will-change: transform;
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: flex; align-items: center; gap: var(--space-8);
  padding: 0 var(--space-16); white-space: nowrap; cursor: pointer;
  font-size: var(--text-xs); border-right: 1px solid var(--border-subtle);
  height: 100%; transition: background var(--duration-base) var(--ease-out);
}
.ticker-item:hover { background: var(--surface-card); }
.ticker-rank {
  color: var(--text-tertiary); font-weight: var(--weight-bold);
  font-size: var(--text-3xs); font-variant-numeric: tabular-nums;
}
.ticker-name { color: var(--text-primary); font-weight: var(--weight-bold); }
.ticker-artist { color: var(--text-tertiary); font-size: var(--text-2xs); }
.ticker-ms {
  font-weight: var(--weight-black); font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.ticker-ms.g { color: var(--accent-positive); }
.ticker-ms.r { color: var(--accent-negative); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-track-wrap { overflow-x: auto; mask-image: none; }
}

/* ===== SCROLLBARS ===== */
.table-scroll::-webkit-scrollbar, .feed-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.table-scroll::-webkit-scrollbar-thumb, .feed-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: var(--radius-sm);
}
.table-scroll::-webkit-scrollbar-track, .feed-scroll::-webkit-scrollbar-track { background: transparent; }

/* ============================================================================
   RESPONSIVE — breakpoints documented in theme.css
   ========================================================================= */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .index-stats { grid-template-columns: repeat(2, 1fr); }
  .feeds-grid { grid-template-columns: 1fr; }
  .mission-grid { grid-template-columns: 1fr; gap: var(--space-16); }
  .footer-grid { grid-template-columns: 1fr; }
  .mix-grid { grid-template-columns: 1fr; }
  .market-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .market-controls, .vinyl-controls { grid-template-columns: 1fr 1fr; }
  .mix-grid { grid-template-columns: 1fr; }
  .modal { padding: var(--space-24) var(--space-16); }
  .modal-controls, .modal-grid { grid-template-columns: 1fr; }
  .modal-chart-wrap { height: 220px; }
  .agg-chart-wrap { height: 200px; }
  .rfr-chart-wrap { height: 260px; }
  .rmc-cols, .rmc-top-grid, .rmc-bottom-grid { grid-template-columns: 1fr; }
  .ticker-label { padding: 0 var(--space-10); font-size: var(--text-3xs); }
  .ticker-item { padding: 0 var(--space-12); font-size: var(--text-2xs); }
  .ticker-artist { display: none; }
}
@media (max-width: 560px) {
  .section { padding: var(--space-48) var(--space-16); }
  .hero-stats { gap: var(--space-28); }
  .index-stats { grid-template-columns: 1fr 1fr; }
  .search-box input { min-width: 0; width: 100%; }
}

/* ===== UNDERWRITING REPORT — tab bar button ===== */
.uw-report-btn {
  font-size: 11px; font-weight: 800; padding: 6px 14px; border-radius: 6px;
  border: 1px solid var(--accent-highlight); background: var(--accent-highlight); color: #0a0c04;
  cursor: pointer; transition: all .15s; letter-spacing: 0.02em; font-family: inherit;
  box-shadow: 0 0 14px rgba(234,255,0,0.18);
}
.uw-report-btn:hover { background: #f4ff4d; border-color: #f4ff4d; box-shadow: 0 0 20px rgba(234,255,0,0.32); }

/* ===== UNDERWRITING REPORT — overlay & document ===== */
#uw-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.82); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 16px 40px; overflow-y: auto;
}
#uw-overlay[hidden] { display: none; }
#uw-doc {
  width: 100%; max-width: 800px; margin: auto;
  box-shadow: 0 40px 120px rgba(0,0,0,0.75);
  border-radius: 10px; overflow: hidden;
}
/* dark header bar */
.uw-hdr {
  background: #080c0c; border-bottom: 2.5px solid #EAFF00;
  padding: 12px 24px; display: flex; align-items: center; gap: 12px;
}
.uw-hdr-brand { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: #e8edf7; flex-shrink: 0; }
.uw-hdr-mu { color: #EAFF00; }
.uw-hdr-desk { flex: 1; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(147,160,189,0.55); min-width: 0; }
.uw-hdr-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.uw-hdr-status {
  display: none;
  padding: 8px 24px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(232,237,247,0.88);
  background: #0c1212;
  border-bottom: 1px solid rgba(147,160,189,0.18);
  white-space: normal;
  word-break: break-word;
}
.uw-hdr-status:not([hidden]) { display: block; }
.uw-hdr-status.ok { color: #9BE06A; background: #0f1a10; }
.uw-hdr-status.err { color: #FF8A7A; background: #1a1010; }
.uw-hdr-btn {
  font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  padding: 6px 12px; border-radius: 6px; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.uw-hdr-btn:disabled { opacity: 0.55; cursor: wait; }
.uw-hdr-btn.primary { background: #EAFF00; color: #0a0c04; border-color: #EAFF00; }
.uw-hdr-btn.primary:hover:not(:disabled) { background: #f4ff4d; }
.uw-hdr-btn.ghost {
  background: transparent; color: rgba(232,237,247,0.88);
  border-color: rgba(147,160,189,0.35);
}
.uw-hdr-btn.ghost:hover:not(:disabled) { border-color: #EAFF00; color: #EAFF00; }
.uw-close-x {
  background: none; border: none; color: rgba(147,160,189,0.45);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 5px;
  flex-shrink: 0; transition: color .15s;
}
.uw-close-x:hover { color: #EAFF00; }
@media (max-width: 640px) {
  .uw-hdr { flex-wrap: wrap; }
  .uw-hdr-desk { flex-basis: 100%; order: 3; }
  .uw-hdr-actions { margin-left: auto; }
}
/* cream paper body */
.uw-paper { background: #F8F7F1; padding: 32px 36px 28px; color: #1a1a1a; font-family: 'DM Sans', sans-serif; }
/* document footer */
.uw-foot {
  background: #EEECE6; border-top: 1px solid #DDD9CE;
  padding: 9px 36px; display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: 0.06em; color: #999; font-family: 'DM Sans', sans-serif;
}

/* — paper content — */
.uw-doc-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #55B62F; margin-bottom: 6px; }
.uw-doc-title { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 700; color: #0d0d0d; line-height: 1.1; margin-bottom: 3px; }
.uw-doc-sub { font-size: 12.5px; color: #666; margin-bottom: 0; }
.uw-doc-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.uw-doc-meta { font-size: 11px; color: #999; line-height: 1.75; text-align: right; flex-shrink: 0; padding-left: 24px; }
.uw-doc-rule { border: none; border-top: 1.5px solid #DDD9CE; margin: 0 0 20px; }

/* headline stats strip */
.uw-stats-strip { display: flex; gap: 0; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #DDD9CE; }
.uw-stat-main { flex: 0 0 auto; padding-right: 24px; margin-right: 24px; border-right: 1px solid #DDD9CE; }
.uw-stat-main .p-lbl { font-size: 8.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #999; margin-bottom: 4px; }
.uw-stat-main .p-val { font-size: 32px; font-weight: 800; color: #2a6e10; letter-spacing: -0.02em; line-height: 1; }
.uw-stat-sup { display: flex; gap: 0; flex: 1; }
.uw-stat-sup-item { flex: 1; padding-left: 20px; margin-left: 0; border-left: 1px solid #DDD9CE; }
.uw-stat-sup-item:first-child { border-left: none; padding-left: 0; }
.uw-stat-sup-item .p-lbl { font-size: 8.5px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #999; margin-bottom: 4px; }
.uw-stat-sup-item .p-val { font-size: 17px; font-weight: 700; color: #1a1a1a; }
.uw-stat-sup-item .p-val.c-mult { color: #1594ED; }
.uw-stat-sup-item .p-val.c-neg { color: #CC4030; }

/* sections */
.uw-p-sec { margin-bottom: 26px; }
.uw-p-sec-h {
  font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: #888; padding-bottom: 9px; border-bottom: 1px solid #DDD9CE; margin-bottom: 14px;
}
.uw-p-sec-h .sn { color: #1594ED; }

/* risk profile rows */
.uw-risk-tbl { width: 100%; border-collapse: collapse; }
.uw-risk-tbl td { padding: 9px 0; border-bottom: 1px solid #EEEcE6; vertical-align: middle; }
.uw-risk-tbl tr:last-child td { border-bottom: none; }
.uw-rt-name { font-size: 13px; font-weight: 500; color: #333; width: 160px; }
.uw-rt-val  { font-size: 13px; font-weight: 700; color: #0d0d0d; width: 58px; text-align: right; }
.uw-rt-med  { font-size: 11px; color: #aaa; width: 88px; text-align: right; padding-right: 14px; white-space: nowrap; }
.uw-rt-bar  { position: relative; height: 4px; background: #DDD9CE; border-radius: 2px; }
.uw-rt-bar-mid { position: absolute; left: 50%; top: -4px; width: 1px; height: 12px; background: #B5B0A5; }
.uw-rt-bar-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  top: -3px; transform: translateX(-50%); transition: left .4s ease;
}
.uw-rt-bar-dot.g { background: #55B62F; }
.uw-rt-bar-dot.y { background: #B8A000; }
.uw-rt-bar-dot.r { background: #CC4030; }
.uw-rt-verdict { width: 200px; text-align: right; padding-left: 16px; }
.uw-verdict {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  white-space: nowrap; line-height: 1;
  padding: 5px 10px; border-radius: 4px;
  border: 1px solid transparent;
}
.uw-verdict.g {
  color: #2a6e10;
  background: rgba(85, 182, 47, 0.10);
  border-color: rgba(85, 182, 47, 0.28);
}
.uw-verdict.y {
  color: #8a7000;
  background: rgba(184, 160, 0, 0.10);
  border-color: rgba(184, 160, 0, 0.28);
}
.uw-verdict.r {
  color: #b03020;
  background: rgba(204, 64, 48, 0.09);
  border-color: rgba(204, 64, 48, 0.28);
}

/* WACC two-col */
.uw-wacc-cols { display: grid; grid-template-columns: 230px 1fr; gap: 28px; }
.uw-wacc-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.uw-wacc-tbl td { padding: 5px 0; border-bottom: 1px solid #EEEcE6; color: #444; }
.uw-wacc-tbl td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: #1a1a1a; }
.uw-wacc-tbl tr:last-child td { border-bottom: none; border-top: 1.5px solid #1594ED; padding-top: 7px; font-weight: 700; color: #0d0d0d; }
.uw-wacc-tbl tr:last-child td:last-child { color: #1594ED; }
.uw-wacc-narr { font-size: 12.5px; color: #444; line-height: 1.68; }
.uw-wacc-note {
  margin-top: 10px;
  font-size: 10px;
  color: #999;
  line-height: 1.55;
}

/* copyright valuation detail table */
.uw-val-section-lbl { font-size: 8.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #55B62F; padding: 10px 0 5px; }
.uw-val-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.uw-val-tbl thead th { font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #888; padding: 0 0 8px; font-weight: 600; border-bottom: 1.5px solid #DDD9CE; }
.uw-val-tbl thead th.r { text-align: right; }
.uw-val-tbl td { padding: 6.5px 0; border-bottom: 1px solid #EEEcE6; color: #333; }
.uw-val-tbl td.r { text-align: right; font-variant-numeric: tabular-nums; }
.uw-val-tbl tr.sub td { font-weight: 700; color: #111; border-top: 1px solid #DDD9CE; border-bottom: 1.5px solid #DDD9CE; background: transparent; }
.uw-val-tbl tr.grand td { font-weight: 800; color: #0d0d0d; border-top: 2px solid #1a1a1a; border-bottom: none; padding-top: 9px; font-size: 13px; }
.uw-val-tbl tr.grand td.c-g { color: #2a6e10; }
.uw-val-tbl tr:last-child td { border-bottom: none; }

/* methodology note */
.uw-method { font-size: 10px; color: #aaa; line-height: 1.65; margin-top: 18px; padding-top: 14px; border-top: 1px solid #DDD9CE; }
.uw-method sup { font-size: 7px; }

@media (max-width: 720px) {
  .uw-wacc-cols { grid-template-columns: 1fr; gap: 16px; }
  .uw-stats-strip { flex-direction: column; gap: 16px; }
  .uw-stat-main { border-right: none; padding-right: 0; margin-right: 0; padding-bottom: 12px; border-bottom: 1px solid #DDD9CE; }
  .uw-paper { padding: 24px 20px 20px; }
  .uw-rt-verdict { width: auto; }
}

/* ===== UNDERWRITING REPORT — dedicated PDF memo layout (not web UI) ===== */
.uw-pdf-root[hidden] { display: none !important; }
.uw-pdf-capture-host {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 816px;
  z-index: 2147483646;
  pointer-events: none;
  background: #fff;
  overflow: visible;
  /* Isolate from app body styles that can offset html2canvas */
  transform: none;
}
.uw-pdf-page {
  --uw-pdf-pad-x: 40px;
  --uw-pdf-header-h: 48px;
  --uw-pdf-footer-h: 38px;
  width: 816px;
  height: 1056px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #fff;
  color: #121212;
  font-family: 'DM Sans', sans-serif;
  display: grid;
  grid-template-rows: var(--uw-pdf-header-h) minmax(0, 1fr) var(--uw-pdf-footer-h);
  overflow: hidden;
  position: relative;
  transform: none;
}
.uw-pdf-topbar {
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--uw-pdf-header-h);
  box-sizing: border-box;
  padding: 0 var(--uw-pdf-pad-x);
  background: #080c0c;
  border-bottom: 2.5px solid #EAFF00;
}
.uw-pdf-brand {
  font-size: 18px;
  font-weight: 800;
  color: #e8edf7;
  letter-spacing: -0.02em;
}
.uw-pdf-brand .mu { color: #EAFF00; }
.uw-pdf-desk {
  flex: 1;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(147,160,189,0.65);
}
.uw-pdf-doclabel {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #EAFF00;
}
.uw-pdf-body {
  grid-row: 2;
  min-height: 0; /* prevent flex/grid overflow under footer */
  box-sizing: border-box;
  padding: 22px var(--uw-pdf-pad-x) 14px;
  overflow: hidden;
}
.uw-pdf-footer {
  grid-row: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--uw-pdf-footer-h);
  box-sizing: border-box;
  padding: 0 var(--uw-pdf-pad-x);
  border-top: 1px solid #DDD9CE;
  background: #FAFAF7;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: #8a8a8a;
}
.uw-pdf-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.uw-pdf-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: #0d0d0d;
  margin-bottom: 6px;
}
.uw-pdf-sub { font-size: 13px; color: #666; }
.uw-pdf-meta {
  text-align: right;
  font-size: 11px;
  line-height: 1.7;
  color: #333;
  min-width: 210px;
}
.uw-pdf-meta span {
  display: inline-block;
  min-width: 46px;
  margin-right: 8px;
  color: #999;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.uw-pdf-hero {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  padding: 14px 0 14px;
  border-top: 1px solid #DDD9CE;
  border-bottom: 1px solid #DDD9CE;
}
.uw-pdf-hero-main {
  flex: 0 0 280px;
  padding-right: 22px;
  margin-right: 22px;
  border-right: 1px solid #DDD9CE;
}
.uw-pdf-hero-main .lbl,
.uw-pdf-kpi .lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}
.uw-pdf-hero-main .val {
  font-size: 34px;
  font-weight: 800;
  color: #2a6e10;
  letter-spacing: -0.03em;
  line-height: 1;
}
.uw-pdf-hero-main .exact {
  margin-top: 6px;
  font-size: 11px;
  color: #777;
  font-variant-numeric: tabular-nums;
}
.uw-pdf-hero-kpis {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px 18px;
  align-content: center;
}
.uw-pdf-kpi .val {
  font-size: 20px;
  font-weight: 700;
  color: #121212;
  font-variant-numeric: tabular-nums;
}
.uw-pdf-kpi .val.mult { color: #1594ED; }
.uw-pdf-sec { margin-bottom: 14px; }
.uw-pdf-sec-h {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #666;
  padding-bottom: 8px;
  border-bottom: 1px solid #DDD9CE;
  margin-bottom: 14px;
}
.uw-pdf-sec-h span { color: #1594ED; margin-right: 8px; }
.uw-pdf-sec-h.tight { margin-bottom: 10px; }
.uw-pdf-risk-row {
  display: grid;
  grid-template-columns: 150px 78px 1fr 210px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #EEECE6;
}
.uw-pdf-risk-name { font-size: 13px; font-weight: 600; color: #222; }
.uw-pdf-risk-val { font-size: 14px; font-weight: 700; text-align: right; }
.uw-pdf-risk-med { font-size: 10px; color: #999; text-align: right; margin-top: 2px; }
.uw-pdf-risk-bar {
  position: relative;
  height: 5px;
  background: #E4E0D6;
  border-radius: 2px;
}
.uw-pdf-risk-mid {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 1px;
  height: 15px;
  background: #B5B0A5;
}
.uw-pdf-risk-dot {
  position: absolute;
  top: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  transform: translateX(-50%);
}
.uw-pdf-risk-dot.g { background: #55B62F; }
.uw-pdf-risk-dot.y { background: #B8A000; }
.uw-pdf-risk-dot.r { background: #CC4030; }
.uw-pdf-badge {
  justify-self: end;
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
  max-width: 100%;
}
.uw-pdf-badge.g { color: #2a6e10; background: rgba(85,182,47,0.10); border-color: rgba(85,182,47,0.28); }
.uw-pdf-badge.y { color: #8a7000; background: rgba(184,160,0,0.10); border-color: rgba(184,160,0,0.28); }
.uw-pdf-badge.r { color: #b03020; background: rgba(204,64,48,0.09); border-color: rgba(204,64,48,0.28); }
.uw-pdf-risk-scale {
  display: grid;
  grid-template-columns: 150px 78px 1fr 210px;
  gap: 12px;
  align-items: end;
  margin: -2px 0 4px;
  font-size: 9px;
  color: #888;
}
.uw-pdf-risk-scale > span:first-child {
  grid-column: 1 / 3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.uw-pdf-risk-scale .ticks {
  grid-column: 3;
  display: flex;
  justify-content: space-between;
}
.uw-pdf-risk-scale .ticks em {
  font-style: normal;
  color: #aaa;
}
.uw-pdf-fine { margin-top: 6px; font-size: 9px; color: #999; }
.uw-pdf-conclusion {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 12px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(85,182,47,0.07);
  border: 1px solid rgba(85,182,47,0.22);
}
.uw-pdf-conclusion-main .uw-pdf-sec-h {
  border-bottom-color: rgba(85,182,47,0.25);
  color: #3a7a20;
  margin-bottom: 6px;
  padding-bottom: 5px;
}
.uw-pdf-conclusion-main p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #2a3a28;
}
.uw-pdf-takeaways {
  list-style: none;
  margin: 0;
  padding: 2px 0 0 12px;
  border-left: 1px solid rgba(85,182,47,0.28);
}
.uw-pdf-takeaways li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  line-height: 1.35;
  color: #2a3a28;
  margin-bottom: 5px;
}
.uw-pdf-takeaways li:last-child { margin-bottom: 0; }
.uw-pdf-takeaways span { color: #6a7a68; }
.uw-pdf-takeaways strong { font-weight: 700; text-align: right; }
.uw-pdf-sec-last { margin-bottom: 0; }
.uw-pdf-build {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
  padding: 2px 0;
  border-top: 1px solid #EEECE6;
  border-bottom: 1px solid #EEECE6;
}
.uw-pdf-chip {
  flex: 1;
  min-width: 0;
  padding: 12px 6px 11px;
  border: none;
  border-right: 1px solid #EEECE6;
  background: transparent;
  text-align: center;
}
.uw-pdf-chip:last-of-type { border-right: none; }
.uw-pdf-chip .lbl {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 5px;
  line-height: 1.25;
}
.uw-pdf-chip .val {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.uw-pdf-chip.base {
  background: #0f1a12;
  border: none;
  flex: 1.2;
  padding: 12px 10px;
}
.uw-pdf-chip.base .lbl { color: rgba(255,255,255,0.65); }
.uw-pdf-chip.base .val { color: #9BE06A; font-size: 22px; }
.uw-pdf-op {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #999;
  padding: 0 2px;
  flex: 0 0 auto;
}
.uw-pdf-op.eq { color: #2a6e10; }
.uw-pdf-dr-compact {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 14px;
  align-items: start;
}
.uw-pdf-dr-outputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uw-pdf-dr-outputs .out {
  padding: 10px 12px;
  border: 1px solid #E4E0D6;
  background: #FAFAF7;
}
.uw-pdf-dr-outputs .out.applied {
  border-color: rgba(21,148,237,0.35);
  background: rgba(21,148,237,0.06);
}
.uw-pdf-dr-outputs .lbl {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 3px;
}
.uw-pdf-dr-outputs .val {
  font-size: 20px;
  font-weight: 800;
  color: #0d0d0d;
  letter-spacing: -0.02em;
}
.uw-pdf-dr-outputs .val.range { color: #1594ED; }
.uw-pdf-dr-outputs .hint {
  margin-top: 2px;
  font-size: 9.5px;
  color: #777;
}
.uw-pdf-dr-tbl {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11px;
}
.uw-pdf-dr-tbl col.c-comp { width: 30%; }
.uw-pdf-dr-tbl col.c-rate { width: 14%; }
.uw-pdf-dr-tbl col.c-notes { width: 56%; }
.uw-pdf-dr-tbl th {
  text-align: left;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  padding: 0 12px 8px 0;
  border-bottom: 1.5px solid #DDD9CE;
  vertical-align: bottom;
}
.uw-pdf-dr-tbl th.c-rate,
.uw-pdf-dr-tbl td.c-rate {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-right: 18px;
  padding-left: 8px;
}
.uw-pdf-dr-tbl th.c-notes,
.uw-pdf-dr-tbl td.c-notes {
  text-align: left;
  padding-left: 18px;
  padding-right: 0;
}
.uw-pdf-dr-tbl td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid #EEECE6;
  color: #333;
  vertical-align: top;
  word-wrap: break-word;
}
.uw-pdf-dr-tbl td.c-comp { padding-right: 12px; }
.uw-pdf-dr-tbl tr.total td {
  border-bottom: none;
  border-top: 1.5px solid #1594ED;
  font-weight: 700;
  color: #0d0d0d;
  padding-top: 10px;
}
.uw-pdf-dr-tbl tr.total td.c-rate { color: #1594ED; font-size: 12.5px; }
.uw-pdf-val-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.uw-pdf-panel {
  border: 1px solid #E4E0D6;
  overflow: hidden;
}
.uw-pdf-panel-wide { margin-bottom: 16px; }
.uw-pdf-panel-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.uw-pdf-panel-h.master { background: #1f4d14; }
.uw-pdf-panel-h.pub { background: #0f4f7a; }
.uw-pdf-panel-h.vinyl { background: #333; }
.uw-pdf-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
}
.uw-pdf-tbl th {
  text-align: left;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  padding: 8px 10px 6px;
  border-bottom: 1px solid #DDD9CE;
  background: #FAFAF7;
}
.uw-pdf-tbl th.r,
.uw-pdf-tbl td.r { text-align: right; font-variant-numeric: tabular-nums; }
.uw-pdf-tbl td {
  padding: 7px 10px;
  border-bottom: 1px solid #EEECE6;
  color: #333;
}
.uw-pdf-tbl tr.sub td {
  font-weight: 700;
  background: #F4F7F1;
  border-bottom: none;
  color: #111;
}
.uw-pdf-panel-note {
  padding: 8px 12px 10px;
  font-size: 9px;
  line-height: 1.45;
  color: #777;
  border-top: 1px solid #EEECE6;
  background: #FAFAF7;
}
.uw-pdf-totalbox {
  display: flex;
  gap: 0;
  margin: 12px 0 16px;
  border: 1.5px solid #2a6e10;
  background: rgba(85,182,47,0.06);
}
.uw-pdf-totalbox .main {
  flex: 1.2;
  padding: 12px 16px;
  border-right: 1px solid rgba(42,110,16,0.25);
}
.uw-pdf-totalbox .main .lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3a7a20;
  margin-bottom: 4px;
}
.uw-pdf-totalbox .main .val {
  font-size: 24px;
  font-weight: 800;
  color: #2a6e10;
  letter-spacing: -0.02em;
}
.uw-pdf-totalbox .side {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 14px;
  align-content: center;
}
.uw-pdf-method-sec { margin-top: 4px; margin-bottom: 0; }
.uw-pdf-subh {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}
.uw-pdf-notes-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 18px;
  margin-top: 2px;
}
.uw-pdf-notes p {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.65;
  color: #666;
}
.uw-pdf-defs {
  padding: 12px 14px;
  border: 1px solid #E4E0D6;
  background: #FAFAF7;
}
.uw-pdf-defs .def {
  font-size: 9.5px;
  line-height: 1.55;
  color: #666;
  margin-bottom: 9px;
}
.uw-pdf-defs .def:last-child { margin-bottom: 0; }
.uw-pdf-defs .def strong { color: #333; }
