    /* ================================================================
       RESET & BASE
       ================================================================ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
    body {
      height: 100%;
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
      background: var(--bg);
      color: var(--text-secondary);
      font-size: 14px;
      line-height: 1.5;
      overflow: hidden;
    }
    img, svg { display: block; max-width: 100%; }
    a { color: inherit; text-decoration: none; }
    button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
    ::selection { background: rgba(59,130,246,0.3); color: #fff; }

    /* ================================================================
       DESIGN TOKENS
       ================================================================ */
    :root {
      --bg: #0B1120;
      --bg-alt: #0D1526;
      --surface: #111827;
      --surface-2: #1A2332;
      --border: #1E293B;

      --text-primary: #F1F5F9;
      --text-secondary: #94A3B8;
      --text-muted: #64748B;
      --text-faint: #475569;

      --blue: #3B82F6;
      --blue-hover: #2563EB;
      --blue-dim: rgba(59,130,246,0.08);
      --blue-glow: rgba(59,130,246,0.20);

      --emerald: #10B981;
      --emerald-dim: rgba(16,185,129,0.12);
      --red: #EF4444;
      --red-dim: rgba(239,68,68,0.12);
      --amber: #F59E0B;
      --amber-dim: rgba(245,158,11,0.12);

      --font-display: 'DM Sans', system-ui, sans-serif;
      --font-body: 'Inter', system-ui, sans-serif;
      --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

      --ease: cubic-bezier(0.16, 1, 0.3, 1);
      --sidebar-w: 240px;
      --topbar-h: 56px;
      --radius: 8px;
      --radius-sm: 6px;
      --detail-w: 520px;
    }

    /* ================================================================
       SCROLLBAR
       ================================================================ */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: var(--border); }
    ::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: #4B5563; }

    /* ================================================================
       LAYOUT SHELL
       ================================================================ */
    .app {
      display: grid;
      grid-template-columns: var(--sidebar-w) 1fr;
      grid-template-rows: var(--topbar-h) 1fr;
      height: 100dvh;
      overflow: hidden;
    }

    /* ================================================================
       SIDEBAR
       ================================================================ */
    .sidebar {
      grid-row: 1 / -1;
      grid-column: 1;
      background: linear-gradient(180deg, #0B1120 0%, #0D1526 100%);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      padding: 24px 0 20px;
      z-index: 100;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
    }
    .sidebar::-webkit-scrollbar { width: 0; }

    .sidebar-header {
      padding: 0 20px;
      margin-bottom: 28px;
    }
    .sidebar-brand-name {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 18px;
      color: #fff;
      letter-spacing: 0.02em;
      line-height: 1;
    }
    .sidebar-brand-sub {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.3em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .sidebar-section-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      padding: 0 20px;
      margin-bottom: 8px;
    }
    .sidebar-divider {
      height: 1px;
      background: var(--border);
      margin: 16px 20px;
    }

    .sidebar-nav {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 0 12px;
    }
    .sidebar-nav-item {
      position: relative;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 9px 12px;
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      font-size: 14px;
      font-weight: 500;
      font-family: var(--font-body);
      transition: all 150ms var(--ease);
      white-space: nowrap;
      cursor: pointer;
    }
    .sidebar-nav-item:hover {
      background: var(--surface-2);
      color: var(--text-secondary);
    }
    .sidebar-nav-item.active {
      background: var(--blue-dim);
      color: var(--blue);
    }
    .sidebar-nav-item svg.nav-icon {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
    }
    .sidebar-nav-item .lock-icon {
      width: 12px;
      height: 12px;
      color: var(--text-muted);
      margin-left: auto;
      flex-shrink: 0;
    }
    .sidebar-nav-item .nav-label { flex: 1; }

    .sidebar-nav-item.disabled-nav {
      opacity: 0.5;
      cursor: default;
      pointer-events: none;
    }
    .coming-soon-badge {
      font-family: var(--font-mono);
      font-size: 8px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #94A3B8;
      background: rgba(100,116,139,0.18);
      padding: 1px 5px;
      border-radius: 3px;
      flex-shrink: 0;
    }

    .sidebar-external {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .sidebar-external svg.ext-icon {
      width: 12px;
      height: 12px;
      opacity: 0.5;
      flex-shrink: 0;
    }

    .sidebar-bottom {
      margin-top: auto;
      padding: 0 12px;
    }
    .sidebar-login-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 9px 12px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 500;
      transition: all 150ms var(--ease);
      width: 100%;
    }
    .sidebar-login-btn:hover {
      border-color: rgba(255,255,255,0.12);
      color: var(--text-primary);
      background: rgba(255,255,255,0.03);
    }
    .sidebar-join-btn { display: none; }

    /* Signed-in user row in sidebar */
    .sidebar-user-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--border);
    }
    .sidebar-user-info {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .sidebar-user-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--surface-2);
      flex-shrink: 0;
      overflow: hidden;
    }
    .sidebar-user-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .sidebar-user-meta {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }
    .sidebar-user-name {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sidebar-user-email {
      font-size: 10px;
      color: var(--text-faint);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sidebar-signout-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: var(--radius-sm);
      border: none;
      background: none;
      color: var(--text-muted);
      cursor: pointer;
      flex-shrink: 0;
      transition: all 150ms var(--ease);
    }
    .sidebar-signout-btn:hover {
      color: var(--red);
      background: rgba(239,68,68,0.1);
    }
    /* Clerk UserButton in topbar — hidden, avatar only shown in sidebar */
    #topbar-user-btn {
      display: none !important;
    }

    /* ================================================================
       HAMBURGER (mobile)
       ================================================================ */
    .hamburger-btn {
      display: none;
      position: fixed;
      top: 8px;
      left: 12px;
      z-index: 200;
      width: 40px;
      height: 40px;
      align-items: center;
      justify-content: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
    }
    .hamburger-btn svg { width: 20px; height: 20px; }
    .sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      z-index: 90;
    }
    .sidebar-close-btn {
      display: none;
      position: absolute;
      top: 12px;
      right: 12px;
      width: 40px;
      height: 40px;
      align-items: center;
      justify-content: center;
      color: var(--text-primary);
      background: rgba(255,255,255,0.08);
      border-radius: 10px;
      -webkit-tap-highlight-color: transparent;
    }
    .sidebar-close-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
    .sidebar-close-btn:active { background: rgba(255,255,255,0.16); }
    .sidebar-close-btn svg { width: 18px; height: 18px; stroke-width: 2.5; }

    /* ================================================================
       TOP BAR
       ================================================================ */
    .topbar {
      grid-column: 2;
      grid-row: 1;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
      z-index: 50;
      gap: 12px;
      position: relative;
    }
    .topbar-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .topbar-title {
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 18px;
      color: var(--text-primary);
    }
    .topbar-center {
      display: flex;
      align-items: center;
      gap: 8px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }
    .sentiment-label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      text-transform: uppercase;
    }
    .sentiment-bar {
      display: flex;
      gap: 3px;
    }
    .sentiment-bar .sblock {
      width: 14px;
      height: 14px;
      border-radius: 2px;
      transition: background 0.3s ease;
    }
    .sentiment-bar .sblock.active { /* color set inline */ }
    .sentiment-bar .sblock.inactive { background: #2A2E3A; }
    .sentiment-score-label {
      white-space: nowrap;
    }
    .topbar-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .btn-ghost {
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 500;
      color: var(--text-muted);
      padding: 7px 16px;
      border-radius: var(--radius);
      transition: all 150ms var(--ease);
    }
    .btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
    .btn-primary {
      background: var(--blue);
      color: #fff;
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 500;
      padding: 7px 18px;
      border-radius: var(--radius);
      transition: all 150ms var(--ease);
    }
    .btn-primary:hover {
      background: var(--blue-hover);
      box-shadow: 0 0 20px var(--blue-glow);
    }

    /* ================================================================
       FINNHUB WEBSOCKET — CONNECTION STATUS & PRICE FLASH
       ================================================================ */
    .ws-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.04em;
      color: var(--text-muted);
      text-transform: uppercase;
      cursor: default;
    }
    .ws-status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #64748B;
      transition: background 0.3s ease;
    }
    .ws-status-dot.live {
      background: var(--emerald);
      box-shadow: 0 0 6px rgba(16,185,129,0.5);
    }
    .ws-status-dot.reconnecting {
      background: var(--amber);
      animation: ws-pulse 1s ease-in-out infinite;
    }
    .ws-status-dot.closed {
      background: #64748B;
    }
    @keyframes ws-pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }
    @keyframes price-flash-up {
      0% { background: rgba(16,185,129,0.25); }
      100% { background: transparent; }
    }
    @keyframes price-flash-down {
      0% { background: rgba(239,68,68,0.25); }
      100% { background: transparent; }
    }
    .price-flash-up {
      animation: price-flash-up 0.8s ease-out;
    }
    .price-flash-down {
      animation: price-flash-down 0.8s ease-out;
    }

    /* ================================================================
       MAIN CONTENT
       ================================================================ */
    .main {
      grid-column: 2;
      grid-row: 2;
      overflow-y: auto;
      overscroll-behavior: contain;
      scroll-behavior: smooth;
      background: var(--bg);
    }

    .content-wrap {
      max-width: 1400px;
      margin: 0 auto;
      padding: 24px 32px;
    }
    .content-wrap.wide {
      max-width: 2400px;
    }

    /* ================================================================
       PAGE ANIMATIONS
       ================================================================ */
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .page-anim { animation: fadeIn 300ms ease-out; }

    /* ================================================================
       SECTION HEADERS
       ================================================================ */
    .section-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 16px;
    }
    .section-title {
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .section-subtitle {
      font-size: 12px;
      color: var(--text-faint);
      margin-top: 2px;
    }
    .legal-disclaimer {
      font-size: 12px;
      color: var(--text-faint);
      margin-top: 32px;
      padding-bottom: 24px;
      line-height: 1.6;
    }
    .badge-live {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--blue);
      background: var(--blue-dim);
      padding: 3px 10px;
      border-radius: 3px;
    }
    .badge-live::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--blue);
      animation: pulse-dot 2s ease-in-out infinite;
    }
    @keyframes pulse-dot {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(0.8); }
    }

    /* ================================================================
       KPI CARDS
       ================================================================ */
    .kpi-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 24px;
    }
    .kpi-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px;
      border-left: 4px solid var(--emerald);
      transition: all 180ms var(--ease);
    }
    .kpi-card:hover { border-color: rgba(255,255,255,0.08); }
    .kpi-card.kpi-green { border-left-color: var(--emerald); }
    .kpi-card.kpi-green:hover { border-left-color: var(--emerald); }
    .kpi-card.kpi-blue { border-left-color: var(--blue); }
    .kpi-card.kpi-blue:hover { border-left-color: var(--blue); }
    .kpi-card.kpi-amber { border-left-color: var(--amber); }
    .kpi-card.kpi-amber:hover { border-left-color: var(--amber); }
    .kpi-card.kpi-red { border-left-color: var(--red); }
    .kpi-card.kpi-red:hover { border-left-color: var(--red); }
    .kpi-card.kpi-purple { border-left-color: #8B5CF6; }
    .kpi-card.kpi-purple:hover { border-left-color: #8B5CF6; }
    .kpi-card.kpi-orange { border-left-color: #F97316; }
    .kpi-card.kpi-orange:hover { border-left-color: #F97316; }
    .kpi-card.kpi-yellow { border-left-color: #F59E0B; }
    .kpi-card.kpi-yellow:hover { border-left-color: #F59E0B; }
    .kpi-card.kpi-cyan { border-left-color: #06B6D4; }
    .kpi-card.kpi-cyan:hover { border-left-color: #06B6D4; }
    .kpi-row.kpi-6 { grid-template-columns: repeat(6, 1fr); }
    @media (max-width: 1200px) { .kpi-row.kpi-6 { grid-template-columns: repeat(3, 1fr); } }
    @media (max-width: 768px) { .kpi-row.kpi-6 { grid-template-columns: repeat(2, 1fr); } }
    .kpi-card.clickable { cursor: pointer; }
    .kpi-card.clickable:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

    .kpi-label {
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 8px;
    }
    .kpi-value {
      font-family: var(--font-mono);
      font-size: 22px;
      font-weight: 600;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .kpi-sub {
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    /* 8-KPI single-row compact layout */
    .kpi-row-8 {
      display: grid;
      grid-template-columns: repeat(8, 1fr);
      gap: 10px;
      margin-bottom: 24px;
    }
    .kpi-row-8 .kpi-card { padding: 14px 12px; border-left-width: 3px; }
    .kpi-row-8 .kpi-label { font-size: 10px; margin-bottom: 4px; }
    .kpi-row-8 .kpi-value { font-size: 16px; }
    .kpi-row-8 .kpi-sub { font-size: 10px; margin-top: 2px; }
    @media (max-width: 1200px) { .kpi-row-8 { grid-template-columns: repeat(4, 1fr); } }
    @media (max-width: 768px) { .kpi-row-8 { grid-template-columns: repeat(2, 1fr); width: 100%; box-sizing: border-box; } }
    .kpi-card.kpi-slate { border-left-color: #64748B; }
    .kpi-card.kpi-slate:hover { border-left-color: #64748B; }

    /* KPI tooltip (CSS-only, uses data-tooltip attr) */
    .kpi-card[data-tooltip] { position: relative; cursor: help; }
    .kpi-card[data-tooltip]::after {
      content: attr(data-tooltip);
      position: absolute;
      top: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      background: #1E293B;
      color: #F1F5F9;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.02em;
      padding: 6px 10px;
      border-radius: 5px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 150ms ease;
      z-index: 100;
      border: 1px solid var(--border);
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    .kpi-card[data-tooltip]:hover::after { opacity: 1; }

    /* ================================================================
       MARKET INTELLIGENCE BRIEFING
       ================================================================ */
    .mi-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 16px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.03);
    }
    .mi-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 20px;
      border-bottom: 1px solid var(--border);
      background: linear-gradient(180deg, rgba(17,24,39,1) 0%, rgba(17,24,39,0.6) 100%);
    }
    .mi-title-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .mi-pulse {
      width: 7px;
      height: 7px;
      background: var(--emerald);
      border-radius: 50%;
      position: relative;
      flex-shrink: 0;
    }
    .mi-pulse::after {
      content: '';
      position: absolute;
      inset: -3px;
      border-radius: 50%;
      background: var(--emerald);
      opacity: 0;
      animation: mi-pulse-ring 2s ease-out infinite;
    }
    @keyframes mi-pulse-ring {
      0% { transform: scale(0.8); opacity: 0.6; }
      100% { transform: scale(2.2); opacity: 0; }
    }
    .mi-title {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-secondary);
    }
    .mi-ai-badge {
      font-size: 9px;
      font-weight: 500;
      letter-spacing: 0.04em;
      color: var(--text-muted);
      background: rgba(55,65,81,0.4);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 2px 6px;
    }
    .mi-meta {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .mi-timestamp {
      font-size: 11px;
      color: var(--text-muted);
      font-family: var(--font-mono);
      font-weight: 400;
    }
    .mi-session-badge {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: 3px;
    }
    .mi-session-badge.pre {
      background: rgba(245,158,11,0.12);
      color: var(--amber);
      border: 1px solid rgba(245,158,11,0.2);
    }
    .mi-session-badge.mid {
      background: rgba(59,130,246,0.12);
      color: var(--blue);
      border: 1px solid rgba(59,130,246,0.2);
    }
    .mi-session-badge.post {
      background: rgba(59,130,246,0.12);
      color: var(--blue);
      border: 1px solid rgba(59,130,246,0.2);
    }
    .mi-session-badge.closed {
      background: rgba(148,163,184,0.12);
      color: var(--text-faint);
      border: 1px solid rgba(148,163,184,0.2);
    }
    .mi-body {
      padding: 20px;
    }
    @media (max-width: 768px) {
      .mi-header { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px; }
      .mi-meta { align-self: flex-start; }
      .mi-body { padding: 16px; }
      .mi-timestamp { font-size: 10px; }
      .mi-chips { gap: 6px; }
      .mi-chip { font-size: 10px; padding: 3px 8px; }
    }
    .mi-narrative ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .mi-narrative li {
      color: var(--text-primary);
      font-size: 13px;
      line-height: 1.65;
      padding: 8px 0 8px 16px;
      position: relative;
      border-bottom: 1px solid rgba(55,65,81,0.25);
    }
    .mi-narrative li:last-child { border-bottom: none; }
    .mi-narrative li::before {
      content: '\2022';
      position: absolute;
      left: 0;
      color: var(--text-muted);
    }
    .mi-narrative p {
      color: var(--text-primary);
      font-size: 13px;
      line-height: 1.65;
      margin-bottom: 14px;
    }
    .mi-narrative p:last-child { margin-bottom: 0; }
    .mi-narrative strong { color: #F9FAFB; font-weight: 600; }
    .mi-narrative .tk {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 500;
      padding: 1px 4px;
      border-radius: 3px;
      white-space: nowrap;
      cursor: pointer;
    }
    .mi-narrative .tk:hover {
      text-decoration: underline;
    }
    .mi-narrative .tk-neutral { color: var(--text-primary); background: rgba(255,255,255,0.05); }
    .mi-narrative .tk-up { color: var(--emerald); background: rgba(16,185,129,0.15); }
    .mi-narrative .tk-down { color: var(--red); background: rgba(239,68,68,0.15); }
    .mi-narrative .num {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-weight: 500;
    }
    .mi-narrative .pct-up {
      display: inline-block;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 4px;
      background: rgba(16, 185, 129, 0.15);
      color: #10B981;
      white-space: nowrap;
    }
    .mi-narrative .pct-down {
      display: inline-block;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 4px;
      background: rgba(239, 68, 68, 0.15);
      color: #EF4444;
      white-space: nowrap;
    }
    .mi-narrative .pct-neutral {
      display: inline-block;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-secondary);
      white-space: nowrap;
    }
    .mi-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }
    .mi-chip {
      font-size: 11px;
      font-weight: 500;
      padding: 4px 10px;
      border-radius: 20px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      white-space: nowrap;
      cursor: default;
      transition: all 0.15s ease;
    }
    .mi-chip:hover { transform: translateY(-1px); }
    .mi-chip-amber { color: var(--amber); background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.2); }
    .mi-chip-emerald { color: var(--emerald); background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.2); }
    .mi-chip-red { color: var(--red); background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.2); }
    .mi-chip-blue { color: var(--blue); background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.2); }
    .mi-right {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .mi-widget {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 6px;
      overflow: hidden;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    .mi-widget:hover { border-color: rgba(55,65,81,0.7); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
    .mi-widget-header {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      border-bottom: 1px solid var(--border);
      background: rgba(255,255,255,0.015);
    }
    .mi-widget-header svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
    .mi-widget-title {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .mi-widget-body { padding: 10px 12px; }
    .mi-regime-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    @media (max-width: 480px) { .mi-regime-grid { grid-template-columns: 1fr; } }
    .mi-regime-item { display: flex; flex-direction: column; gap: 2px; }
    .mi-regime-label {
      font-size: 10px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }
    .mi-regime-value {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .mi-regime-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .mi-dot-amber { background: var(--amber); box-shadow: 0 0 6px rgba(245,158,11,0.4); }
    .mi-dot-green { background: var(--emerald); box-shadow: 0 0 6px rgba(16,185,129,0.4); }
    .mi-dot-red { background: var(--red); box-shadow: 0 0 6px rgba(239,68,68,0.4); }
    .mi-sent-bar { display: flex; gap: 2px; margin-top: 2px; }
    .mi-sent-block { width: 12px; height: 8px; border-radius: 1px; }
    .mi-sent-green { background: var(--emerald); opacity: 0.8; }
    .mi-sent-red { background: var(--red); opacity: 0.8; }
    .mi-sent-gray { background: var(--text-faint); opacity: 0.4; }
    .mi-movers-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 0;
      border-bottom: 1px solid rgba(55,65,81,0.25);
    }
    .mi-movers-row:last-child { border-bottom: none; }
    .mi-mover-ticker {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      min-width: 50px;
    }
    .mi-mover-name {
      font-size: 10px;
      color: var(--text-muted);
      flex: 1;
      padding: 0 8px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .mi-mover-change {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 3px;
      min-width: 65px;
      justify-content: flex-end;
    }
    .mi-mover-change.up { color: var(--emerald); }
    .mi-mover-change.down { color: var(--red); }
    .mi-movers-divider { height: 1px; background: var(--border); margin: 4px 0; }
    .mi-catalyst-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 6px;
    }
    .mi-catalyst-item:last-child { margin-bottom: 0; }
    .mi-catalyst-time {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
      min-width: 48px;
      flex-shrink: 0;
      padding-top: 1px;
    }
    .mi-catalyst-icon {
      width: 18px;
      height: 18px;
      border-radius: 3px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .mi-catalyst-icon svg { width: 11px; height: 11px; }
    .mi-cat-macro { background: rgba(59,130,246,0.12); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
    .mi-cat-earnings { background: rgba(16,185,129,0.15); color: var(--emerald); border: 1px solid rgba(16,185,129,0.2); }
    .mi-cat-fed { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
    .mi-cat-alert { background: rgba(245,158,11,0.12); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
    .mi-catalyst-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
    .mi-catalyst-text strong { color: var(--text-primary); font-weight: 600; }
    .mi-footer {
      padding: 10px 20px;
      border-top: 1px solid var(--border);
      background: rgba(0,0,0,0.15);
    }
    .mi-disclaimer {
      font-size: 10px;
      color: var(--text-faint);
    }
    @media (prefers-reduced-motion: reduce) {
      .mi-pulse::after { animation: none; }
    }

    /* ================================================================
       ALERT CARDS
       ================================================================ */
    .alert-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-bottom: 8px;
    }
    .alert-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      transition: all 180ms var(--ease);
    }
    .alert-card:hover { background: var(--surface-2); }
    .alert-card-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .alert-ticker {
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 16px;
      color: var(--text-primary);
    }
    .alert-price {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 600;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .alert-meta {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 12px;
      flex-wrap: wrap;
    }

    /* Target row with price axis */
    .alert-target-entry { margin-bottom: 8px; }
    .alert-target-entry:last-child { margin-bottom: 0; }
    .alert-axis {
      display: flex;
      align-items: center;
      gap: 0;
      height: 28px;
    }
    .alert-axis-price {
      font-family: var(--font-mono);
      font-size: 12px;
      font-variant-numeric: tabular-nums lining-nums;
      white-space: nowrap;
      min-width: 64px;
    }
    .alert-axis-price.left {
      color: var(--text-primary);
      font-weight: 600;
      text-align: right;
      padding-right: 8px;
    }
    .alert-axis-price.right {
      color: var(--text-muted);
      text-align: left;
      padding-left: 8px;
    }
    .alert-axis-track {
      position: relative;
      flex: 1;
      height: 6px;
      background: rgba(255,255,255,0.06);
      border-radius: 3px;
      overflow: visible;
    }
    .alert-axis-fill {
      position: absolute;
      top: 0;
      height: 100%;
      border-radius: 3px;
    }
    .alert-axis-fill.buy {
      right: 0;
      background: var(--blue);
      opacity: 0.7;
      border-radius: 3px;
    }
    .alert-axis-fill.sell {
      left: 0;
      background: var(--amber);
      opacity: 0.7;
      border-radius: 3px;
    }
    .alert-axis-marker {
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: 2px solid var(--bg);
      z-index: 2;
    }
    .alert-axis-marker.buy { background: var(--blue); }
    .alert-axis-marker.sell { background: var(--amber); }
    .alert-target-label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 2px;
    }
    .alert-target-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      padding: 2px 6px;
      border-radius: 3px;
      letter-spacing: 0.05em;
    }
    .alert-target-badge.buy {
      background: var(--blue-dim);
      color: var(--blue);
    }
    .alert-target-badge.sell {
      background: var(--amber-dim);
      color: var(--amber);
    }
    .alert-target-delta {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .alert-section-label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      margin-bottom: 6px;
      margin-top: 10px;
    }
    .alert-section-label:first-child { margin-top: 0; }
    .alert-section-label.buy-label { color: var(--blue); }
    .alert-section-label.sell-label { color: var(--amber); }

    /* ================================================================
       ALERT CARDS V2 — Ring Gauge + Blue Bars
       ================================================================ */
    .alert-v2-header {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 14px;
    }
    .alert-v2-ring {
      position: relative;
      width: 56px;
      height: 56px;
      flex-shrink: 0;
    }
    .alert-v2-ring svg {
      width: 56px;
      height: 56px;
      transform: rotate(-90deg);
    }
    .alert-v2-ring-track {
      fill: none;
      stroke: rgba(255,255,255,0.06);
      stroke-width: 4;
    }
    .alert-v2-ring-fill {
      fill: none;
      stroke-width: 4;
      stroke-linecap: round;
    }
    .alert-v2-ring-label {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 700;
      color: #fff;
    }
    .alert-v2-ticker-info { flex: 1; min-width: 0; }
    .alert-v2-ticker-name {
      font-family: var(--font-display);
      font-size: 16px;
      font-weight: 700;
      color: var(--text-primary);
      line-height: 1.2;
    }
    .alert-v2-ticker-price {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 2px;
    }
    .alert-v2-zones {
      display: flex;
      flex-direction: column;
      gap: 4px;
      align-items: flex-end;
    }
    .alert-v2-zone-badge {
      font-family: var(--font-body);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.05em;
      padding: 4px 10px;
      border-radius: var(--radius);
      white-space: nowrap;
      text-transform: uppercase;
    }
    .alert-v2-zone-badge.buy {
      background: rgba(16,185,129,0.12);
      color: var(--emerald);
    }
    .alert-v2-zone-badge.sell {
      background: rgba(239,68,68,0.12);
      color: var(--red);
    }
    .alert-v2-targets {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 14px;
    }
    .alert-v2-target-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .alert-v2-target-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 3px;
      white-space: nowrap;
      min-width: 30px;
      text-align: center;
      background: rgba(255,255,255,0.08);
      color: var(--text-secondary);
    }
    .alert-v2-target-price {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-secondary);
      min-width: 52px;
    }
    .alert-v2-bar-container {
      flex: 1;
      height: 4px;
      background: rgba(255,255,255,0.06);
      border-radius: 2px;
      overflow: hidden;
    }
    .alert-v2-bar-fill {
      height: 100%;
      border-radius: 2px;
      background: var(--blue);
    }
    .alert-v2-distance {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
      min-width: 38px;
      text-align: right;
    }
    .alert-v2-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }
    .alert-v2-pills .pill {
      text-align: center;
    }
    @media (max-width: 768px) {
      .alert-v2-pills .pill {
        flex: 1 1 auto;
        min-width: 0;
      }
    }
    .alert-v2-divider {
      height: 1px;
      background: var(--border);
      margin: 12px 0;
    }

    /* ================================================================
       BULL/BEAR SCENARIO — Sidebar Detail Panel
       ================================================================ */
    .scenario-cards-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .scenario-card {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px;
    }
    .scenario-card-header { margin-bottom: 12px; }
    .scenario-pill {
      display: inline-block;
      font-family: var(--font-body);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      padding: 3px 10px;
      border-radius: 3px;
    }
    .scenario-pill.bull-pill {
      background: rgba(16,185,129,0.15);
      color: var(--emerald);
    }
    .scenario-pill.bear-pill {
      background: rgba(239,68,68,0.15);
      color: var(--red);
    }
    .scenario-bullets {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .scenario-bullets li {
      font-family: var(--font-body);
      font-size: 11.5px;
      color: var(--text-secondary);
      line-height: 1.45;
      padding-left: 12px;
      position: relative;
    }
    .scenario-bullets li::before {
      content: '•';
      position: absolute;
      left: 0;
      color: var(--text-muted);
    }

    .pill {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.04em;
      padding: 2px 8px;
      border-radius: 100px;
      background: rgba(55,65,81,0.5);
      color: var(--text-muted);
      text-transform: uppercase;
      font-family: var(--font-mono);
    }
    .pill-score { background: var(--blue-dim); color: var(--blue); }
    .view-all-link {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 13px;
      font-weight: 500;
      color: var(--blue);
      margin: 12px 0 32px;
      cursor: pointer;
      transition: color 150ms var(--ease);
    }
    .view-all-link:hover { color: var(--blue-hover); }

    /* ================================================================
       IV RANK TABLE (email style)
       ================================================================ */
    .iv-table-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 32px;
    }
    .iv-table-header {
      padding: 14px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .iv-table {
      width: 100%;
      border-collapse: collapse;
    }
    .iv-table thead th {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      text-align: left;
      padding: 10px 16px;
      background: var(--surface-2);
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .iv-table tbody td {
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      color: var(--text-secondary);
      white-space: nowrap;
      font-variant-numeric: tabular-nums lining-nums;
    }
    .iv-table tbody tr:last-child td { border-bottom: none; }
    .iv-table tbody tr:hover { background: var(--surface-2); }
    .iv-ticker {
      font-family: var(--font-body);
      font-weight: 600;
      color: var(--text-primary);
    }
    .iv-value {
      font-family: var(--font-mono);
      font-weight: 600;
    }
    .iv-badge {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.06em;
      padding: 2px 6px;
      border-radius: 3px;
      text-transform: uppercase;
      font-family: var(--font-mono);
    }
    .iv-badge.high { background: var(--red-dim); color: var(--red); }
    .iv-badge.elevated { background: var(--amber-dim); color: var(--amber); }
    .iv-progress-track {
      width: 80px;
      height: 6px;
      background: var(--border);
      border-radius: 3px;
      overflow: hidden;
      display: inline-block;
      vertical-align: middle;
    }
    .iv-progress-bar {
      height: 100%;
      border-radius: 3px;
      transition: width 500ms var(--ease);
    }
    .iv-context {
      font-size: 12px;
      font-weight: 600;
    }
    .iv-context-sub {
      font-size: 11px;
      font-weight: 400;
      color: var(--text-muted);
    }

    /* ================================================================
       RS HEATMAP
       ================================================================ */
    .rs-grid {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 6px;
      margin-bottom: 32px;
    }
    .rs-tile {
      border-radius: var(--radius);
      padding: 12px 8px;
      text-align: center;
      min-height: 80px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      cursor: pointer;
      transition: opacity 150ms var(--ease);
    }
    .rs-tile:hover { opacity: 0.8; }
    .rs-tile-ticker {
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 13px;
    }
    .rs-tile-value {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      font-variant-numeric: tabular-nums lining-nums;
    }

    /* ================================================================
       RANKINGS TABLE
       ================================================================ */
    .filter-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .filter-select, .filter-input {
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-family: var(--font-body);
      font-size: 13px;
      padding: 7px 12px;
      border-radius: var(--radius-sm);
      transition: border-color 150ms var(--ease);
      outline: none;
    }
    .filter-select:focus, .filter-input:focus { border-color: var(--blue); }
    .filter-select option { background: var(--surface); color: var(--text-secondary); }
    .filter-input { width: 140px; }
    .filter-reset {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-muted);
      padding: 7px 12px;
      border-radius: var(--radius-sm);
      transition: all 150ms var(--ease);
      cursor: pointer;
    }
    .filter-reset:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }

    .table-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 32px;
    }
    .table-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 20px;
      border-bottom: 1px solid var(--border);
      flex-wrap: wrap;
      gap: 8px;
    }
    .table-toolbar-title {
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .table-toolbar-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.08em;
      color: var(--blue);
      background: var(--blue-dim);
      padding: 3px 8px;
      border-radius: 3px;
    }
    .table-scroll { overflow-x: auto; }
    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    #rankings-table {
      width: 100%;
    }
    thead th {
      position: sticky;
      top: 0;
      background: var(--surface-2);
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      text-align: left;
      padding: 10px 8px;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
      cursor: pointer;
      user-select: none;
      transition: color 150ms var(--ease);
    }
    thead th:hover { color: var(--text-secondary); }
    thead th[title] { text-decoration: underline dotted var(--text-muted); text-underline-offset: 3px; cursor: help; }
    thead th .sort-arrow {
      display: inline-block;
      margin-left: 4px;
      font-size: 10px;
      opacity: 0.5;
    }
    thead th.sorted .sort-arrow { opacity: 1; color: var(--blue); }
    tbody tr {
      transition: background 180ms ease;
    }
    tbody tr:hover { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--blue); }
    tbody td {
      padding: 9px 8px;
      border-bottom: 1px solid var(--border);
      font-variant-numeric: tabular-nums lining-nums;
      white-space: nowrap;
      color: var(--text-secondary);
    }
    .td-perf {
      font-family: var(--font-mono);
      font-size: 12px;
      padding: 9px 6px;
      text-align: right;
      min-width: 48px;
    }
    /* Sticky first column for rankings table */
    #rankings-table thead th:first-child,
    #rankings-table tbody td:first-child {
      position: sticky;
      left: 0;
      z-index: 2;
      background: var(--surface);
    }
    #rankings-table thead th:first-child {
      background: var(--surface-2);
      z-index: 3;
    }
    #rankings-table tbody tr:hover td:first-child {
      background: var(--surface-2);
    }
    tbody tr:last-child td { border-bottom: none; }

    .td-ticker {
      font-family: var(--font-body);
      font-weight: 600;
      font-size: 13px;
      color: var(--text-primary);
    }
    .td-mono {
      font-family: var(--font-mono);
      font-size: 13px;
    }
    .td-score {
      font-family: var(--font-mono);
      font-weight: 600;
      color: var(--blue);
    }
    .td-score-wrap { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; min-width: 72px; }
    .rank-delta {
      display: inline-flex; align-items: center; gap: 1px;
      font-size: 9px; font-weight: 700;
      line-height: 1;
      font-family: var(--font-mono); flex-shrink: 0;
    }
    .rank-delta.up { color: var(--emerald); }
    .rank-delta.down { color: var(--red); }
    .rank-delta svg { width: 7px; height: 7px; flex-shrink: 0; }
    .td-delta-pos { color: var(--emerald); }
    .td-delta-neg { color: var(--red); }
    .td-mktcap {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
      white-space: nowrap;
    }

    /* Sparkline */
    .sparkline-cell {
      padding: 4px 2px;
      width: 72px;
      min-width: 72px;
      max-width: 72px;
    }
    .sparkline-svg {
      display: block;
      width: 64px;
      height: 26px;
    }

    /* 52-week range indicator */
    .range-52wk {
      display: flex;
      align-items: center;
      gap: 4px;
      width: 150px;
      max-width: 150px;
    }
    .range-52wk-bar {
      position: relative;
      flex: 1;
      height: 4px;
      background: rgba(255,255,255,0.08);
      border-radius: 2px;
      min-width: 60px;
    }
    .range-52wk-fill {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      border-radius: 2px;
      background: linear-gradient(90deg, var(--red), var(--amber), var(--emerald));
      opacity: 0.35;
    }
    .range-52wk-marker {
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--blue);
      border: 1.5px solid var(--bg);
      box-shadow: 0 0 4px rgba(59,130,246,0.5);
    }
    .status-badge {
      display: inline-flex;
      align-items: center;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.06em;
      padding: 3px 10px;
      border-radius: 100px;
      font-family: var(--font-mono);
      text-transform: uppercase;
    }
    .status-badge.buy-zone { color: var(--emerald); background: var(--emerald-dim); }
    .status-badge.sell-zone { color: var(--red); background: rgba(239,68,68,0.12); }
    .status-badge.buy-sell-zone { color: var(--text-muted); background: rgba(100,116,139,0.12); }
    .status-badge.buy-approaching { color: rgba(96,165,250,0.7); background: rgba(59,130,246,0.08); }
    .status-badge.sell-approaching { color: rgba(251,191,36,0.7); background: rgba(245,158,11,0.08); }
    .status-badge.buy-sell-approaching { color: rgba(16,185,129,0.7); background: rgba(16,185,129,0.08); }
    .status-badge.watching { color: var(--text-muted); background: rgba(55,65,81,0.5); }

    .risk-badge {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.04em;
      padding: 2px 8px;
      border-radius: 100px;
      font-family: var(--font-mono);
      text-transform: uppercase;
    }
    .risk-reduced { color: var(--emerald); background: var(--emerald-dim); }
    .risk-neutral { color: var(--text-muted); background: rgba(55,65,81,0.5); }
    .risk-elevated { color: var(--amber); background: var(--amber-dim); }
    .risk-high { color: var(--red); background: var(--red-dim); }

    /* ================================================================
       PRE-EARNINGS CARDS (email style)
       ================================================================ */
    #pre-earnings-section {
      max-width: 900px;
      margin: 0 auto;
    }
    .er-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
      border-left: 3px solid var(--blue);
      margin-bottom: 12px;
      transition: all 180ms var(--ease);
    }
    .er-card:hover { background: var(--surface-2); }
    .er-card.today { border-left-color: var(--amber); }
    .er-card.reported { border-left-color: var(--text-muted); }
    .er-card-top {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }
    .er-ticker {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 18px;
      color: var(--text-primary);
    }
    .er-date {
      font-size: 13px;
      color: var(--text-muted);
    }
    .er-days-badge {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      padding: 3px 10px;
      border-radius: 4px;
      text-transform: uppercase;
      font-family: var(--font-mono);
      margin-left: auto;
    }
    .er-days-badge.today-badge { background: var(--amber-dim); color: var(--amber); }
    .er-days-badge.upcoming-badge { background: var(--blue-dim); color: var(--blue); }
    .er-days-badge.reported-badge { background: rgba(55,65,81,0.5); color: var(--text-muted); }
    .er-body {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }
    .er-stat-group label {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
      display: block;
      margin-bottom: 2px;
    }
    .er-stat-group .er-stat-value {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 16px;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .er-iv-callout {
      background: var(--emerald-dim);
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      font-size: 12px;
      font-weight: 600;
      color: var(--emerald);
      margin-bottom: 12px;
    }
    .er-footer {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--text-muted);
    }

    /* ================================================================
       PREMIUM / PAYWALL (inline)
       ================================================================ */
    .premium-page {
      position: relative;
      min-height: 60vh;
    }
    .premium-preview {
      filter: blur(8px);
      opacity: 0.5;
      pointer-events: none;
      user-select: none;
    }
    .premium-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: linear-gradient(180deg, rgba(11,17,32,0) 0%, rgba(11,17,32,0.9) 40%, rgba(11,17,32,0.95) 100%);
      z-index: 2;
      text-align: center;
      padding: 40px 20px;
    }
    .premium-lock-icon {
      width: 48px;
      height: 48px;
      color: var(--blue);
      margin-bottom: 16px;
    }
    .premium-title {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 22px;
      color: var(--text-primary);
      margin-bottom: 8px;
    }
    .premium-desc {
      font-size: 14px;
      color: var(--text-secondary);
      max-width: 400px;
      line-height: 1.6;
      margin-bottom: 24px;
    }
    .premium-price {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 28px;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
      margin-bottom: 4px;
    }
    .premium-price-sub {
      font-size: 14px;
      color: var(--text-muted);
      margin-bottom: 20px;
    }
    .premium-cta {
      background: var(--blue);
      color: #fff;
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 600;
      padding: 12px 40px;
      border-radius: var(--radius-sm);
      transition: all 200ms var(--ease);
      display: inline-block;
      margin-bottom: 12px;
    }
    .premium-cta:hover {
      background: var(--blue-hover);
      box-shadow: 0 0 28px var(--blue-glow);
      transform: translateY(-1px);
    }
    .premium-signin {
      font-size: 13px;
      color: var(--text-muted);
    }
    .premium-signin a {
      color: var(--blue);
      cursor: pointer;
    }
    .premium-signin a:hover { text-decoration: underline; }

    /* ================================================================
       PAYWALL MODAL
       ================================================================ */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }
    .modal-overlay.visible { display: flex; }
    .modal-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      max-width: 480px;
      width: 90%;
      padding: 40px;
      text-align: center;
      position: relative;
      animation: fadeIn 200ms ease-out;
    }
    .modal-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      transition: all 150ms var(--ease);
    }
    .modal-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
    .modal-close svg { width: 18px; height: 18px; }
    .modal-lock {
      width: 48px;
      height: 48px;
      color: var(--blue);
      margin: 0 auto 16px;
    }
    .modal-title {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 24px;
      color: var(--text-primary);
      margin-bottom: 8px;
    }
    .modal-desc {
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 24px;
    }
    .modal-price {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 28px;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .modal-price-sub {
      font-size: 14px;
      color: var(--text-muted);
      margin-bottom: 24px;
    }
    .modal-cta {
      display: block;
      width: 100%;
      background: var(--blue);
      color: #fff;
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      padding: 12px 24px;
      border-radius: var(--radius-sm);
      transition: all 200ms var(--ease);
      margin-bottom: 12px;
    }
    .modal-cta:hover { background: var(--blue-hover); box-shadow: 0 0 28px var(--blue-glow); }
    .modal-signin {
      font-size: 13px;
      color: var(--text-muted);
    }
    .modal-signin a { color: var(--blue); cursor: pointer; }

    /* ================================================================
       NO DATA STATE
       ================================================================ */
    .no-data {
      text-align: center;
      padding: 40px 20px;
      color: var(--text-muted);
    }
    .no-data-icon {
      width: 40px;
      height: 40px;
      margin: 0 auto 12px;
      color: var(--text-faint);
    }
    .no-data-title {
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 15px;
      color: var(--text-secondary);
      margin-bottom: 4px;
    }
    .no-data-desc {
      font-size: 13px;
    }

    /* ================================================================
       LOADING
       ================================================================ */
    .loading-state {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 60vh;
      flex-direction: column;
      gap: 16px;
    }
    .loading-spinner {
      width: 32px;
      height: 32px;
      border: 3px solid var(--border);
      border-top-color: var(--blue);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .loading-text {
      font-size: 13px;
      color: var(--text-muted);
    }

    /* ================================================================
       FOCUS
       ================================================================ */
    :focus-visible {
      outline: 2px solid var(--blue);
      outline-offset: 2px;
    }

    /* ================================================================
       STOCK DETAIL PANEL
       ================================================================ */
    .detail-panel {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: var(--detail-w);
      background: var(--bg-alt);
      border-left: 1px solid var(--border);
      z-index: 200;
      transform: translateX(100%);
      transition: transform 300ms var(--ease);
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
    }
    .detail-panel.open { transform: translateX(0); }
    .detail-panel::-webkit-scrollbar { width: 4px; }
    .detail-panel::-webkit-scrollbar-track { background: transparent; }
    .detail-panel::-webkit-scrollbar-thumb { background: #374151; border-radius: 2px; }

    .detail-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.3);
      z-index: 190;
    }
    .detail-overlay.visible { display: block; }

    .detail-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      background: var(--bg-alt);
      z-index: 2;
    }
    .detail-header-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .detail-header-label svg { width: 14px; height: 14px; color: var(--blue); }
    .detail-close {
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      transition: all 150ms var(--ease);
      -webkit-tap-highlight-color: transparent;
    }
    .detail-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
    .detail-close svg { width: 20px; height: 20px; }

    /* Hero block */
    .detail-hero {
      padding: 20px 16px 16px;
      border-bottom: 1px solid var(--border);
    }
    .detail-ticker-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
    }
    .detail-ticker {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 22px;
      color: var(--text-primary);
    }
    .detail-risk-pill {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.06em;
      padding: 2px 8px;
      border-radius: 3px;
      text-transform: uppercase;
      font-family: var(--font-mono);
    }
    .detail-company {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 12px;
    }
    .detail-price-row {
      display: flex;
      align-items: baseline;
      gap: 10px;
      margin-bottom: 4px;
    }
    .detail-price {
      font-family: var(--font-mono);
      font-size: 26px;
      font-weight: 600;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .detail-meta-row {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .detail-meta-item {
      font-size: 11px;
      color: var(--text-muted);
    }
    .detail-meta-item span {
      color: var(--text-secondary);
      font-weight: 600;
    }

    /* Section dividers */
    .detail-section {
      padding: 16px;
      border-bottom: 1px solid var(--border);
    }
    .detail-section-title {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 12px;
    }

    /* Mini chart */
    .detail-chart-wrap {
      width: 100%;
      height: 320px;
      border-radius: var(--radius-sm);
      overflow: hidden;
      background: #0B1120;
      border: 1px solid var(--border);
      position: relative;
    }
    .detail-chart-intervals {
      display: flex;
      gap: 2px;
      margin-left: auto;
      background: rgba(255,255,255,0.04);
      border-radius: 6px;
      padding: 2px;
    }
    .chart-interval-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 10px;
      font-family: var(--font-mono);
      font-weight: 600;
      padding: 3px 7px;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.15s ease;
      letter-spacing: 0.02em;
    }
    .chart-interval-btn:hover {
      color: var(--text-primary);
      background: rgba(255,255,255,0.06);
    }
    .chart-interval-btn.active {
      color: var(--blue);
      background: rgba(59,130,246,0.12);
    }

    /* ================================================================
       DETAIL PANEL TABS — Overview / Valuation / Analysts
       ================================================================ */
    .detail-tab-bar {
      display: flex;
      gap: 2px;
      padding: 10px 16px 0;
      background: var(--bg-alt);
      border-bottom: 1px solid var(--border);
    }
    .detail-tab-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 10px;
      font-family: var(--font-mono);
      font-weight: 600;
      padding: 5px 10px;
      border-radius: 4px 4px 0 0;
      cursor: pointer;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      transition: all 0.15s ease;
      border-bottom: 2px solid transparent;
      margin-bottom: -1px;
    }
    .detail-tab-btn:hover {
      color: var(--text-primary);
      background: rgba(255,255,255,0.04);
    }
    .detail-tab-btn.active {
      color: var(--blue);
      border-bottom-color: var(--blue);
      background: rgba(59,130,246,0.06);
    }
    .detail-tab-content {
      display: none;
    }
    .detail-tab-content.active {
      display: block;
    }

    /* ================================================================
       VALUATION TAB COMPONENTS
       ================================================================ */

    /* Fair Value summary stats — 3 boxes in a row */
    .val-fv-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-bottom: 4px;
    }
    .val-fv-box {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      text-align: center;
    }
    .val-fv-box.highlight {
      border-color: rgba(16,185,129,0.3);
      background: var(--emerald-dim);
    }
    .val-fv-box-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 4px;
      font-family: var(--font-mono);
    }
    .val-fv-box-value {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
      line-height: 1.2;
    }
    .val-fv-box-value.green { color: var(--emerald); }
    .val-fv-box-value.amber { color: var(--amber); }
    .val-fv-box-delta {
      font-family: var(--font-mono);
      font-size: 10px;
      margin-top: 2px;
    }
    .val-fv-box-delta.up { color: var(--emerald); }
    .val-fv-box-delta.down { color: var(--red); }


    /* ================================================================
       EARNINGS TAB COMPONENTS
       ================================================================ */
    .earn-summary-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
      margin-bottom: 16px;
    }
    .earn-summary-box {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      text-align: center;
    }
    .earn-summary-box-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 4px;
      font-family: var(--font-mono);
    }
    .earn-summary-box-value {
      font-family: var(--font-mono);
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      line-height: 1.2;
    }
    .earn-summary-box-value.green { color: var(--emerald); }
    .earn-summary-box-value.red { color: var(--red); }

    /* EPS/Revenue bar charts */
    .earn-chart-container {
      display: flex;
      align-items: flex-end;
      gap: 4px;
      height: 140px;
      padding: 8px 0;
      overflow-x: auto;
    }
    .earn-chart-container::-webkit-scrollbar { height: 4px; }
    .earn-chart-container::-webkit-scrollbar-thumb { background: #374151; border-radius: 2px; }
    .earn-bar-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex: 1;
      min-width: 36px;
    }
    .earn-bars {
      display: flex;
      align-items: flex-end;
      gap: 2px;
      height: 110px;
      position: relative;
    }
    .earn-bar {
      width: 12px;
      border-radius: 2px 2px 0 0;
      transition: height 0.3s ease;
    }
    .earn-bar.est { background: var(--text-faint); opacity: 0.5; }
    .earn-bar.act-beat { background: var(--emerald); }
    .earn-bar.act-miss { background: var(--red); }
    .earn-bar-value {
      font-family: var(--font-mono);
      font-size: 8px;
      color: var(--text-muted);
      position: absolute;
      top: -14px;
      left: 50%;
      transform: translateX(-50%);
      white-space: nowrap;
    }
    .earn-bar-label {
      font-family: var(--font-mono);
      font-size: 8px;
      color: var(--text-faint);
      margin-top: 6px;
      white-space: nowrap;
    }

    /* Chart legend */
    .earn-legend {
      display: flex;
      gap: 16px;
      margin-bottom: 8px;
    }
    .earn-legend-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 10px;
      color: var(--text-muted);
    }
    .earn-legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 2px;
    }
    .earn-legend-dot.est { background: var(--text-faint); opacity: 0.5; }
    .earn-legend-dot.beat { background: var(--emerald); }
    .earn-legend-dot.miss { background: var(--red); }

    /* Earnings detail table */
    .earn-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 11px;
    }
    .earn-table thead th {
      font-family: var(--font-mono);
      font-size: 9px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 6px 6px;
      border-bottom: 1px solid var(--border);
      text-align: right;
      white-space: nowrap;
    }
    .earn-table thead th:first-child { text-align: left; }
    .earn-table tbody td {
      font-family: var(--font-mono);
      font-size: 11px;
      padding: 6px 6px;
      border-bottom: 1px solid rgba(30,41,59,0.4);
      text-align: right;
      color: var(--text-secondary);
      white-space: nowrap;
    }
    .earn-table tbody td:first-child {
      text-align: left;
      color: var(--text-primary);
      font-weight: 500;
    }
    .earn-table .cell-green { color: var(--emerald); }
    .earn-table .cell-red { color: var(--red); }
    .earn-cell-stack {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0;
      line-height: 1.2;
    }
    .earn-cell-delta {
      font-size: 8px;
      font-weight: 600;
      opacity: 0.9;
    }
    .earn-badge {
      display: inline-block;
      font-family: var(--font-mono);
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.08em;
      padding: 2px 6px;
      border-radius: 3px;
      text-transform: uppercase;
    }
    .earn-badge.beat { background: var(--emerald-dim); color: var(--emerald); }
    .earn-badge.miss { background: var(--red-dim); color: var(--red); }
    .earn-badge.inline { background: var(--amber-dim); color: var(--amber); }
    .earn-badge.pending { background: rgba(255,255,255,0.04); color: var(--text-faint); }

    /* Reaction bar */
    .earn-reaction {
      display: flex;
      align-items: center;
      gap: 4px;
      justify-content: flex-end;
    }
    .earn-reaction-bar {
      height: 6px;
      border-radius: 3px;
      min-width: 4px;
    }
    .earn-reaction-bar.pos { background: var(--emerald); }
    .earn-reaction-bar.neg { background: var(--red); }

    /* Margin trend chart */
    .earn-margin-chart {
      display: flex;
      align-items: flex-end;
      gap: 6px;
      height: 100px;
      padding: 8px 0;
    }
    .earn-margin-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex: 1;
      min-width: 30px;
    }
    .earn-margin-bars {
      display: flex;
      gap: 2px;
      align-items: flex-end;
      height: 80px;
    }
    .earn-margin-bar {
      width: 6px;
      border-radius: 2px 2px 0 0;
    }
    .earn-margin-bar.gm { background: var(--blue); opacity: 0.7; }
    .earn-margin-bar.om { background: var(--emerald); opacity: 0.7; }
    .earn-margin-bar.nm { background: var(--amber); opacity: 0.7; }
    .earn-margin-label {
      font-family: var(--font-mono);
      font-size: 8px;
      color: var(--text-faint);
      margin-top: 4px;
    }
    .earn-margin-legend {
      display: flex;
      gap: 16px;
      margin-bottom: 6px;
    }
    .earn-margin-legend-item {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 10px;
      color: var(--text-muted);
    }
    .earn-margin-legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 2px;
    }

    /* Next earnings countdown */
    .earn-next-er {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(59,130,246,0.06);
      border: 1px solid rgba(59,130,246,0.15);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      margin-bottom: 12px;
    }
    .earn-next-er-icon {
      width: 18px;
      height: 18px;
      color: var(--blue);
      flex-shrink: 0;
    }
    .earn-next-er-text {
      font-size: 12px;
      color: var(--text-secondary);
    }
    .earn-next-er-text strong {
      color: var(--text-primary);
      font-weight: 600;
    }
    .earn-next-er-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
      margin-left: auto;
    }
    .earn-next-er-badge.soon { background: var(--amber-dim); color: var(--amber); }
    .earn-next-er-badge.week { background: var(--red-dim); color: var(--red); }
    .earn-next-er-badge.normal { background: var(--blue-dim); color: var(--blue); }

    /* Valuation tables */
    .val-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 11px;
    }
    .val-table thead th {
      font-family: var(--font-mono);
      font-size: 9px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 8px 6px;
      text-align: right;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .val-table thead th:first-child { text-align: left; }
    .val-table tbody td {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-secondary);
      padding: 7px 6px;
      text-align: right;
      border-bottom: 1px solid rgba(255,255,255,0.03);
    }
    .val-table tbody td:first-child {
      text-align: left;
      color: var(--text-secondary);
      font-family: var(--font-body);
      font-size: 11px;
      font-weight: 500;
    }
    .val-table tbody tr:last-child td { border-bottom: none; }
    .val-table .row-highlight td {
      background: var(--blue-dim);
      color: var(--text-primary);
    }
    .val-table .row-highlight td:first-child { color: var(--text-primary); }
    .val-table .cell-green { color: var(--emerald) !important; }
    .val-table .cell-red { color: var(--red) !important; }
    .val-table .cell-blue { color: var(--blue) !important; background: var(--blue-dim); border-radius: 3px; }
    .val-est-badge {
      font-size: 8px;
      color: var(--blue);
      font-weight: 600;
      margin-left: 3px;
    }

    /* FCF bar chart */
    .val-fcf-chart {
      display: flex;
      align-items: flex-end;
      gap: 5px;
      height: 110px;
      padding: 6px 0 0;
    }
    .val-fcf-bar-group {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      gap: 3px;
      height: 100%;
    }
    .val-fcf-bar {
      width: 100%;
      border-radius: 3px 3px 0 0;
      min-height: 3px;
      transition: height 0.3s;
    }
    .val-fcf-bar.actual { background: var(--blue); }
    .val-fcf-bar.projected {
      background: rgba(59,130,246,0.35);
      border: 1px dashed rgba(59,130,246,0.6);
    }
    .val-fcf-bar-label {
      font-family: var(--font-mono);
      font-size: 8px;
      color: var(--text-muted);
      text-align: center;
      white-space: nowrap;
    }
    .val-fcf-bar-value {
      font-family: var(--font-mono);
      font-size: 8px;
      color: var(--text-faint);
      text-align: center;
    }
    .val-fcf-legend {
      display: flex;
      gap: 14px;
      margin-top: 8px;
      font-size: 9px;
      color: var(--text-muted);
    }
    .val-fcf-legend-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .val-fcf-legend-swatch {
      width: 8px;
      height: 8px;
      border-radius: 2px;
    }

    /* Sensitivity matrix */
    .val-sensitivity-wrap {
      overflow-x: auto;
    }
    .val-sensitivity-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 10px;
    }
    .val-sensitivity-table th {
      font-family: var(--font-mono);
      font-size: 9px;
      font-weight: 600;
      color: var(--text-muted);
      padding: 5px 6px;
      text-align: center;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .val-sensitivity-table th:first-child { text-align: left; }
    .val-sensitivity-table td {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-secondary);
      padding: 5px 6px;
      text-align: center;
      border-bottom: 1px solid rgba(255,255,255,0.03);
    }
    .val-sensitivity-table td:first-child {
      text-align: left;
      color: var(--text-muted);
    }
    .val-sensitivity-table tr:last-child td { border-bottom: none; }
    .val-sensitivity-table .cell-highlight {
      background: var(--blue-dim);
      color: var(--blue);
      font-weight: 600;
      border-radius: 3px;
    }

    /* Comparable peer cards */
    .val-comp-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }
    .val-comp-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px;
      text-align: center;
    }
    .val-comp-card.active-comp {
      border-color: rgba(59,130,246,0.3);
      background: var(--blue-dim);
    }
    .val-comp-ticker {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 6px;
    }
    .val-comp-card.active-comp .val-comp-ticker { color: var(--blue); }
    .val-comp-metric {
      font-size: 9px;
      color: var(--text-muted);
      margin-bottom: 1px;
      font-family: var(--font-body);
    }
    .val-comp-val {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-secondary);
      margin-bottom: 4px;
    }

    /* Placeholder/loading states */
    .val-loading-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      color: var(--text-faint);
      font-size: 11px;
      font-family: var(--font-mono);
      letter-spacing: 0.05em;
    }
    .val-loading-placeholder::before {
      content: '';
      width: 12px;
      height: 12px;
      border: 2px solid var(--border);
      border-top-color: var(--blue);
      border-radius: 50%;
      animation: val-spin 0.8s linear infinite;
      margin-right: 8px;
      flex-shrink: 0;
    }
    @keyframes val-spin {
      to { transform: rotate(360deg); }
    }

    /* ================================================================
       ANALYSTS TAB COMPONENTS
       ================================================================ */

    /* Consensus bar */
    .ana-consensus-wrap {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .ana-rating-label {
      font-family: var(--font-display);
      font-size: 16px;
      font-weight: 700;
      color: var(--emerald);
    }
    .ana-rating-bar {
      display: flex;
      height: 8px;
      border-radius: 4px;
      overflow: hidden;
      gap: 2px;
    }
    .ana-rating-bar .seg { height: 100%; border-radius: 2px; }
    .ana-rating-bar .seg-sbuy  { background: var(--emerald); }
    .ana-rating-bar .seg-buy   { background: #4ADE80; }
    .ana-rating-bar .seg-hold  { background: var(--amber); }
    .ana-rating-bar .seg-sell  { background: var(--red); }
    .ana-rating-bar .seg-ssell { background: #B91C1C; }
    .ana-rating-legend {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      font-size: 9px;
      color: var(--text-muted);
    }
    .ana-rating-legend-item {
      display: flex;
      align-items: center;
      gap: 3px;
    }
    .ana-legend-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* PT stats 4-up row */
    .ana-pt-stats {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
      margin-top: 12px;
    }
    @media (max-width: 480px) {
      .ana-pt-stats { grid-template-columns: repeat(2, 1fr); }
    }
    .ana-pt-stat {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 8px 10px;
      text-align: center;
    }
    .ana-pt-stat-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 4px;
      font-family: var(--font-mono);
    }
    .ana-pt-stat-value {
      font-family: var(--font-mono);
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
      line-height: 1.2;
    }
    .ana-pt-stat-value.green { color: var(--emerald); }
    .ana-pt-stat-value.red   { color: var(--red); }
    .ana-pt-stat-delta {
      font-family: var(--font-mono);
      font-size: 9px;
      margin-top: 2px;
    }
    .ana-pt-stat-delta.up   { color: var(--emerald); }
    .ana-pt-stat-delta.down { color: var(--red); }

    /* PT distribution bar */
    .ana-pt-dist-bar {
      position: relative;
      height: 32px;
      background: rgba(255,255,255,0.03);
      border-radius: var(--radius-sm);
      overflow: visible;
      margin-bottom: 6px;
    }
    .ana-pt-dist-range {
      position: absolute;
      top: 6px;
      height: 20px;
      background: rgba(59,130,246,0.12);
      border-radius: 3px;
      border: 1px solid rgba(59,130,246,0.25);
    }
    .ana-pt-dist-median {
      position: absolute;
      top: 2px;
      width: 3px;
      height: 28px;
      background: var(--blue);
      border-radius: 2px;
      z-index: 2;
    }
    .ana-pt-dist-current {
      position: absolute;
      top: 2px;
      width: 3px;
      height: 28px;
      background: var(--amber);
      border-radius: 2px;
      z-index: 2;
    }
    .ana-pt-dist-labels {
      display: flex;
      justify-content: space-between;
      font-family: var(--font-mono);
      font-size: 8px;
      color: var(--text-faint);
      margin-bottom: 4px;
    }
    .ana-pt-dist-legend {
      display: flex;
      gap: 14px;
      font-size: 9px;
      color: var(--text-muted);
      flex-wrap: wrap;
    }
    .ana-pt-dist-legend-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .ana-pt-dist-marker {
      width: 12px;
      height: 3px;
      border-radius: 2px;
    }

    /* Recent analyst activity table */
    .ana-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 11px;
    }
    .ana-table thead th {
      font-family: var(--font-mono);
      font-size: 9px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 8px 4px;
      text-align: left;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      white-space: nowrap;
    }
    .ana-table thead th:last-child { text-align: right; }
    .ana-table tbody td {
      font-size: 11px;
      color: var(--text-secondary);
      padding: 8px 4px;
      border-bottom: 1px solid rgba(255,255,255,0.03);
      vertical-align: top;
    }
    .ana-table tbody tr:last-child td { border-bottom: none; }
    .ana-firm-name { word-break: break-word; line-height: 1.3; }
    .ana-date-col { white-space: nowrap; }
    .ana-pt-change { text-align: right; white-space: nowrap; }
    @media (max-width: 480px) {
      .ana-table .ana-action-col { display: none; }
      .ana-table tbody td { font-size: 10px; padding: 6px 3px; }
      .ana-table thead th { padding: 6px 3px; font-size: 8px; }
    }
    .ana-action-badge {
      display: inline-block;
      font-family: var(--font-mono);
      font-size: 9px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 3px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .ana-action-badge.upgrade   { background: var(--emerald-dim); color: var(--emerald); }
    .ana-action-badge.downgrade { background: var(--red-dim); color: var(--red); }
    .ana-action-badge.maintain  { background: rgba(100,116,139,0.15); color: var(--text-secondary); }
    .ana-action-badge.initiate  { background: var(--blue-dim); color: var(--blue); }
    .ana-rating-text {
      font-family: var(--font-mono);
      font-size: 10px;
    }
    .ana-rating-arrow { color: var(--text-faint); margin: 0 3px; }
    .ana-pt-change {
      font-family: var(--font-mono);
      font-size: 11px;
      text-align: right;
      white-space: nowrap;
    }
    .ana-pt-old {
      color: var(--text-faint);
      text-decoration: line-through;
      margin-right: 3px;
      font-size: 9px;
    }
    .ana-pt-new { font-weight: 600; }
    .ana-pt-delta { font-size: 9px; margin-left: 3px; }
    .ana-firm-name { font-weight: 500; color: var(--text-primary); }
    .ana-date-col {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-muted);
    }

    /* Radar chart */
    .detail-radar-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 200px;
    }
    .detail-radar-wrap svg { overflow: visible; }

    /* Target map */
    .detail-target-group {
      margin-bottom: 14px;
    }
    .detail-target-group:last-child { margin-bottom: 0; }
    .detail-target-group-label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 8px;
    }
    .detail-target-group-label.buy-label { color: var(--blue); }
    .detail-target-group-label.sell-label { color: var(--amber); }
    .detail-target-entry {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }
    .detail-target-entry:last-child { margin-bottom: 0; }
    .detail-target-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      padding: 2px 6px;
      border-radius: 3px;
      letter-spacing: 0.05em;
      min-width: 32px;
      text-align: center;
    }
    .detail-target-badge.buy { background: var(--blue-dim); color: var(--blue); }
    .detail-target-badge.sell { background: var(--amber-dim); color: var(--amber); }
    .detail-target-price {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
      min-width: 70px;
    }
    .detail-target-bar-wrap {
      flex: 1;
      height: 6px;
      background: rgba(255,255,255,0.06);
      border-radius: 3px;
      overflow: hidden;
    }
    .detail-target-bar {
      height: 100%;
      border-radius: 3px;
      transition: width 300ms var(--ease);
    }
    .detail-target-bar.buy { background: var(--blue); }
    .detail-target-bar.sell { background: var(--amber); }
    .detail-target-delta {
      font-family: var(--font-mono);
      font-size: 11px;
      font-variant-numeric: tabular-nums lining-nums;
      min-width: 55px;
      text-align: right;
    }
    .detail-target-stale {
      font-size: 10px;
      color: var(--amber);
      margin-left: 2px;
    }

    /* Stats grid */
    .detail-stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1px;
      background: var(--border);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      overflow: hidden;
    }
    .detail-stat-cell {
      background: var(--surface);
      padding: 10px 12px;
    }
    .detail-stat-label {
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 2px;
    }
    .detail-stat-value {
      font-family: var(--font-mono);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums lining-nums;
    }
    .detail-stat-value.small {
      font-size: 13px;
      font-weight: 500;
    }

    /* Highlight selected row */
    tbody tr.selected-row {
      background: var(--blue-dim) !important;
      box-shadow: inset 2px 0 0 var(--blue) !important;
    }

    /* ================================================================
       RESPONSIVE — 1024px
       ================================================================ */
    @media (max-width: 1024px) {
      :root { --sidebar-w: 64px; }
      .sidebar-brand-sub,
      .sidebar-section-label,
      .sidebar-nav-item .nav-label,
      .sidebar-nav-item .lock-icon,
      .sidebar-login-btn span,
      .sidebar-external .nav-label,
      .sidebar-external .ext-icon { display: none; }
      .sidebar-header { padding: 0 16px; text-align: center; }
      .sidebar-brand-name { font-size: 14px; }
      .sidebar-nav { padding: 0 8px; }
      .sidebar-nav-item { justify-content: center; padding: 9px; gap: 0; }
      .sidebar-nav-item svg.nav-icon { width: 20px; height: 20px; }
      .sidebar-bottom { padding: 0 8px; }
      .sidebar-login-btn { justify-content: center; padding: 9px; }
      .sidebar-divider { margin: 12px 8px; }
      .kpi-row { grid-template-columns: repeat(2, 1fr); }
      .alert-grid { grid-template-columns: 1fr; }
      .rs-grid { grid-template-columns: repeat(4, 1fr); }
    }

    /* ================================================================
       RESPONSIVE — 768px
       ================================================================ */
    @media (max-width: 768px) {
      .app {
        grid-template-columns: 1fr;
        grid-template-rows: var(--topbar-h) 1fr;
      }
      .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 300ms var(--ease);
        z-index: 150;
      }
      .sidebar.open { transform: translateX(0); }
      .sidebar-close-btn { display: flex; }
      .sidebar-overlay.visible { display: block; }
      .hamburger-btn { display: flex; }

      /* Restore labels in mobile drawer */
      .sidebar-brand-sub,
      .sidebar-section-label,
      .sidebar-nav-item .nav-label,
      .sidebar-nav-item .lock-icon,
      .sidebar-login-btn span,
      .sidebar-external .nav-label,
      .sidebar-external .ext-icon { display: inline; }
      .sidebar-header { padding: 0 20px; padding-right: 56px; text-align: left; }
      .sidebar-brand-name { font-size: 18px; }
      .sidebar-nav { padding: 0 12px; }
      .sidebar-nav-item { justify-content: flex-start; padding: 9px 12px; gap: 12px; }
      .sidebar-bottom { padding: 0 12px 72px; }
      .sidebar-login-btn { justify-content: center; }
      .sidebar-divider { margin: 16px 20px; }

      .main { grid-column: 1; }
      .topbar { grid-column: 1; }
      .content-wrap { padding: 20px 16px; }
      .kpi-row { grid-template-columns: repeat(2, 1fr); }
      .alert-grid { grid-template-columns: 1fr; }
      .rs-grid { grid-template-columns: repeat(3, 1fr); }
      .table-scroll { position: relative; }
      .table-scroll::after {
        content: '';
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 40px;
        background: linear-gradient(to right, transparent, var(--surface));
        pointer-events: none;
      }
    }

    @media (max-width: 480px) {
      .kpi-row { grid-template-columns: 1fr; }
      .rs-grid { grid-template-columns: repeat(3, 1fr); }
    }

    @media (prefers-reduced-motion: reduce) {
      .page-anim { animation: none; }
      .badge-live::before { animation: none; }
      .loading-spinner { animation: none; }
      * { transition-duration: 0.01ms !important; }
    }

    /* ================================================================
       OPTIONS FLOW PAGE
       ================================================================ */
    .flow-overview-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 24px;
    }
    @media (max-width: 1100px) { .flow-overview-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 700px) { .flow-overview-grid { grid-template-columns: 1fr; } }
    .flow-expiry-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 7px 0;
    }
    .flow-expiry-row:not(:last-child) { border-bottom: 1px solid var(--border); }
    .flow-expiry-label { font-size: 12px; color: var(--text-secondary); }
    .flow-expiry-val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-primary); }
    .flow-expiry-pct { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); margin-left: 6px; }
    .flow-ticker-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 5px 0;
    }
    .flow-ticker-row:not(:last-child) { border-bottom: 1px solid var(--border); }
    .flow-ticker-sym { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-primary); width: 42px; }
    .flow-ticker-bar-wrap { flex: 1; height: 14px; border-radius: 3px; overflow: hidden; display: flex; background: var(--border); }
    .flow-ticker-bar-bull { height: 100%; background: var(--emerald); }
    .flow-ticker-bar-bear { height: 100%; background: var(--red); }
    .flow-ticker-total { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); width: 48px; text-align: right; }
    .flow-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .flow-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
    }
    .flow-panel-title {
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .flow-panel-title.bullish { color: var(--emerald); }
    .flow-panel-title.bearish { color: var(--red); }
    .flow-panel-badge {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 3px;
      letter-spacing: 0.06em;
    }
    .flow-panel-badge.bullish-badge { background: var(--emerald-dim); color: var(--emerald); }
    .flow-panel-badge.bearish-badge { background: var(--red-dim); color: var(--red); }

    .flow-mini-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }
    .flow-mini-table thead th {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-faint);
      text-align: left;
      padding: 7px 12px;
      background: var(--surface-2);
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .flow-mini-table thead th:last-child { text-align: right; }
    .flow-mini-table tbody td {
      padding: 6px 12px;
      border-bottom: 1px solid rgba(30,41,59,0.5);
      font-variant-numeric: tabular-nums lining-nums;
      color: var(--text-secondary);
      white-space: nowrap;
    }
    .flow-mini-table tbody tr:last-child td { border-bottom: none; }
    .flow-mini-table .fmt-ticker {
      font-weight: 600;
      color: var(--text-primary);
      font-size: 12px;
    }
    .flow-mini-table .fmt-orders {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
    }
    .flow-mini-table .fmt-premium {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 12px;
      text-align: right;
    }
    .flow-mini-table .fmt-premium.green { color: var(--emerald); }
    .flow-mini-table .fmt-premium.red { color: var(--red); }
    .flow-mini-table .fmt-premium.neutral { color: var(--text-primary); }

    /* Bullish rows */
    .flow-mini-table tr.flow-row-bullish { background: rgba(16,185,129,0.04); }
    .flow-mini-table tr.flow-row-bullish:hover { background: rgba(16,185,129,0.08); }
    /* Bearish rows */
    .flow-mini-table tr.flow-row-bearish { background: rgba(239,68,68,0.04); }
    .flow-mini-table tr.flow-row-bearish:hover { background: rgba(239,68,68,0.08); }
    /* Neutral rows */
    .flow-mini-table tr.flow-row-neutral:hover { background: var(--surface-2); }

    /* Sector color rows */
    .flow-mini-table tr.flow-sector-tech { background: rgba(139,92,246,0.05); }
    .flow-mini-table tr.flow-sector-tech:hover { background: rgba(139,92,246,0.10); }
    .flow-mini-table tr.flow-sector-consumer { background: rgba(59,130,246,0.05); }
    .flow-mini-table tr.flow-sector-consumer:hover { background: rgba(59,130,246,0.10); }
    .flow-mini-table tr.flow-sector-comms { background: rgba(16,185,129,0.05); }
    .flow-mini-table tr.flow-sector-comms:hover { background: rgba(16,185,129,0.10); }
    .flow-mini-table tr.flow-sector-energy { background: rgba(245,158,11,0.05); }
    .flow-mini-table tr.flow-sector-energy:hover { background: rgba(245,158,11,0.10); }
    .flow-mini-table tr.flow-sector-financial { background: rgba(236,72,153,0.05); }
    .flow-mini-table tr.flow-sector-financial:hover { background: rgba(236,72,153,0.10); }
    .flow-mini-table tr.flow-sector-industrials { background: rgba(148,163,184,0.06); }
    .flow-mini-table tr.flow-sector-industrials:hover { background: rgba(148,163,184,0.12); }

    /* Signal badges for Options Flow */
    .signal-badge {
      display: inline-flex;
      align-items: center;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.06em;
      padding: 3px 8px;
      border-radius: 3px;
      text-transform: uppercase;
      font-family: var(--font-mono);
    }
    .signal-badge.sweep { background: var(--blue-dim); color: var(--blue); }
    .signal-badge.block { background: var(--amber-dim); color: var(--amber); }
    .signal-badge.unusual { background: var(--emerald-dim); color: var(--emerald); }

    /* Side text colors */
    .side-above-ask { color: var(--emerald); font-weight: 600; }
    .side-below-bid { color: var(--red); font-weight: 600; }
    .side-at-ask { color: var(--blue); font-weight: 600; }

    /* Flow table type column colors */
    .flow-type-call { color: var(--emerald); font-weight: 600; }
    .flow-type-put { color: var(--red); font-weight: 600; }

    /* Flow table call/put row left borders */
    .flow-main-table tbody tr.flow-call-row {
      box-shadow: inset 3px 0 0 var(--emerald);
    }
    .flow-main-table tbody tr.flow-put-row {
      box-shadow: inset 3px 0 0 var(--red);
    }
    .flow-main-table tbody tr:hover {
      background: var(--surface-2);
    }

    /* Flow KPI specific tweaks */
    .flow-kpi-pct {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      margin-top: 4px;
    }
    .flow-kpi-arrow {
      font-size: 14px;
      vertical-align: middle;
    }

    /* Old responsive override removed — handled inline above */

    /* ================================================================
       DARK POOL PAGE
       ================================================================ */
    .dp-top-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }
    .dp-search-input {
      flex: 1;
      min-width: 180px;
      max-width: 340px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      font-family: var(--font-body);
      font-size: 13px;
      color: var(--text-primary);
      outline: none;
      transition: border-color 180ms var(--ease);
    }
    .dp-search-input:focus { border-color: var(--blue); }
    .dp-search-input::placeholder { color: var(--text-faint); }
    .dp-date-input {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-secondary);
      width: 130px;
      cursor: pointer;
      outline: none;
    }
    .dp-search-btn {
      background: var(--blue);
      color: #fff;
      font-size: 13px;
      font-weight: 600;
      padding: 10px 24px;
      border-radius: var(--radius-sm);
      transition: background 180ms var(--ease);
    }
    .dp-search-btn:hover { background: var(--blue-hover); }

    /* Dark Pool chart + donut layout */
    .dp-chart-section {
      display: grid;
      grid-template-columns: 1fr 280px;
      gap: 16px;
      margin-bottom: 20px;
    }
    @media (max-width: 900px) {
      .dp-chart-section { grid-template-columns: 1fr; }
    }
    .dp-chart-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      min-height: 240px;
    }
    .dp-chart-timeframes {
      display: flex;
      gap: 4px;
      margin-bottom: 12px;
    }
    .dp-tf-btn {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 3px;
      color: var(--text-muted);
      background: transparent;
      border: 1px solid var(--border);
      transition: all 180ms var(--ease);
      cursor: pointer;
    }
    .dp-tf-btn.active { background: var(--surface-2); color: var(--text-primary); border-color: var(--text-faint); }
    .dp-tf-btn:hover { color: var(--text-primary); }

    /* Canvas chart area */
    .dp-chart-canvas {
      width: 100%;
      height: 180px;
      position: relative;
    }
    .dp-chart-canvas canvas {
      width: 100%;
      height: 100%;
    }

    /* Donut card */
    .dp-donut-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .dp-donut-title {
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 16px;
      align-self: flex-start;
    }
    .dp-donut-wrap {
      position: relative;
      width: 160px;
      height: 160px;
      margin-bottom: 16px;
    }
    .dp-donut-wrap canvas {
      width: 160px;
      height: 160px;
    }
    .dp-donut-center {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
    }
    .dp-donut-center-val {
      font-family: var(--font-mono);
      font-size: 20px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .dp-donut-center-sub {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    .dp-donut-legend {
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 100%;
    }
    .dp-donut-legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--text-secondary);
    }
    .dp-legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .dp-legend-pct {
      margin-left: auto;
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
    }

    /* Dark Pool levels table */
    .dp-levels-table {
      width: 100%;
      border-collapse: collapse;
    }
    .dp-levels-table thead th {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-faint);
      text-align: left;
      padding: 10px 16px;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .dp-levels-table thead th:nth-child(n+2) { text-align: right; }
    .dp-levels-table tbody td {
      padding: 10px 16px;
      font-size: 13px;
      font-variant-numeric: tabular-nums lining-nums;
      border-bottom: 1px solid rgba(30,41,59,0.4);
      white-space: nowrap;
    }
    .dp-levels-table tbody td:nth-child(n+2) { text-align: right; }
    .dp-levels-table tbody tr:last-child td { border-bottom: none; }
    .dp-level-price {
      font-family: var(--font-mono);
      font-weight: 600;
      color: var(--text-primary);
    }
    .dp-level-prints { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
    .dp-level-size { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
    .dp-level-premium { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
    .dp-level-premium.major { color: #c084fc; }
    .dp-level-premium.medium { color: #a78bfa; }
    .dp-level-premium.minor { color: var(--text-secondary); }
    /* Row highlight for large prints */
    .dp-levels-table tbody tr.dp-row-major {
      background: rgba(192,132,252,0.06);
    }
    .dp-levels-table tbody tr.dp-row-major:hover {
      background: rgba(192,132,252,0.12);
    }
    .dp-levels-table tbody tr.dp-row-medium {
      background: rgba(167,139,250,0.04);
    }
    .dp-levels-table tbody tr.dp-row-medium:hover {
      background: rgba(167,139,250,0.08);
    }
    .dp-levels-table tbody tr:hover {
      background: var(--surface-2);
    }
    /* Volume bar inside table */
    .dp-vol-bar-cell {
      position: relative;
      padding-right: 16px !important;
    }
    .dp-vol-bar {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      height: 20px;
      border-radius: 2px;
      opacity: 0.15;
    }
    .dp-vol-bar.purple { background: #c084fc; }

    /* ================================================================
       GEX PAGE
       ================================================================ */
    .gex-kpi-row {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 12px;
      margin-bottom: 20px;
    }
    @media (max-width: 1100px) { .gex-kpi-row { grid-template-columns: repeat(3, 1fr); } }
    @media (max-width: 768px) { .gex-kpi-row { grid-template-columns: repeat(2, 1fr); } }
    .gex-kpi {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 16px;
    }
    .gex-kpi-label {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-faint);
      margin-bottom: 6px;
    }
    .gex-kpi-value {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
      line-height: 1.2;
    }
    .gex-kpi-sub {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    /* GEX bar chart */
    .gex-chart-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      margin-bottom: 20px;
    }
    .gex-chart-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .gex-chart-title {
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .gex-chart-legend {
      display: flex;
      gap: 16px;
    }
    .gex-legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: var(--text-muted);
    }
    .gex-legend-swatch {
      width: 10px;
      height: 10px;
      border-radius: 2px;
    }
    .gex-legend-swatch.call { background: var(--emerald); }
    .gex-legend-swatch.put { background: var(--red); }

    /* Horizontal bar chart rows */
    .gex-bar-chart {
      display: flex;
      flex-direction: column;
      gap: 2px;
      position: relative;
    }
    .gex-bar-row {
      display: grid;
      grid-template-columns: 200px 1fr 1fr;
      align-items: center;
      height: 28px;
      position: relative;
    }
    .gex-bar-strike {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      text-align: right;
      padding-right: 12px;
    }
    .gex-bar-strike.spot { color: var(--blue); font-weight: 700; }
    .gex-bar-strike.call-wall { color: var(--amber); font-weight: 700; }
    .gex-bar-strike.put-wall { color: var(--red); font-weight: 700; }
    .gex-bar-strike.max-move { color: var(--emerald); font-weight: 700; }
    .gex-bar-call {
      height: 18px;
      border-radius: 2px 0 0 2px;
      justify-self: end;
    }
    .gex-bar-put {
      height: 18px;
      border-radius: 0 2px 2px 0;
    }
    /* Key level markers */
    .gex-bar-row.gex-spot-row {
      background: rgba(59,130,246,0.06);
      border: 1px solid rgba(59,130,246,0.2);
      border-radius: 3px;
    }
    .gex-bar-row.gex-callwall-row {
      background: rgba(245,158,11,0.06);
      border: 1px solid rgba(245,158,11,0.2);
      border-radius: 3px;
    }
    .gex-bar-row.gex-putwall-row {
      background: rgba(239,68,68,0.06);
      border: 1px solid rgba(239,68,68,0.2);
      border-radius: 3px;
    }
    .gex-bar-row.gex-maxmove-row {
      background: rgba(16,185,129,0.06);
      border: 1px solid rgba(16,185,129,0.2);
      border-radius: 3px;
    }
    /* Label tags on key levels */
    .gex-label-tag {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.06em;
      padding: 2px 6px;
      border-radius: 3px;
      margin-left: 8px;
      font-family: var(--font-mono);
      white-space: nowrap;
    }
    .gex-label-tag.spot-tag { background: var(--blue-dim); color: var(--blue); }
    .gex-label-tag.callwall-tag { background: var(--amber-dim); color: var(--amber); }
    .gex-label-tag.putwall-tag { background: var(--red-dim); color: var(--red); }
    .gex-label-tag.maxmove-tag { background: var(--emerald-dim); color: var(--emerald); }

    /* GEX data table */
    .gex-data-table {
      width: 100%;
      border-collapse: collapse;
    }
    .gex-data-table thead th {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-faint);
      text-align: right;
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .gex-data-table thead th:first-child { text-align: left; }
    .gex-data-table tbody td {
      padding: 8px 12px;
      font-family: var(--font-mono);
      font-size: 12px;
      font-variant-numeric: tabular-nums lining-nums;
      border-bottom: 1px solid rgba(30,41,59,0.4);
      text-align: right;
      white-space: nowrap;
    }
    .gex-data-table tbody td:first-child { text-align: left; font-weight: 600; color: var(--text-primary); }
    .gex-data-table tbody tr:last-child td { border-bottom: none; }
    .gex-data-table tbody tr:hover { background: var(--surface-2); }
    .gex-val-pos { color: var(--emerald); }
    .gex-val-neg { color: var(--red); }
    .gex-val-neutral { color: var(--text-secondary); }
    /* Highlighted rows */
    .gex-data-table tbody tr.gex-table-spot {
      background: rgba(59,130,246,0.06);
    }
    .gex-data-table tbody tr.gex-table-callwall {
      background: rgba(245,158,11,0.06);
    }
    .gex-data-table tbody tr.gex-table-putwall {
      background: rgba(239,68,68,0.06);
    }

    /* ================================================================
       HEATMAP TOGGLE
       ================================================================ */
    .heatmap-toggle {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 4px 12px; border-radius: 20px;
      font-size: 12px; font-weight: 500; font-family: var(--font-body);
      color: var(--text-muted); border: 1px solid var(--border);
      background: transparent; cursor: pointer; transition: all 0.18s ease;
      margin-left: 12px;
    }
    .heatmap-toggle:hover { border-color: var(--blue); color: var(--text-secondary); }
    .heatmap-toggle.active { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }
    .heatmap-toggle svg { opacity: 0.7; }
    .heatmap-toggle.active svg { opacity: 1; stroke: var(--blue); }

    /* ================================================================
       CORRELATION MATRIX
       ================================================================ */
    .corr-container {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .corr-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
    }
    .corr-header-title {
      font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text-primary);
    }
    .corr-header-sub {
      font-size: 12px; color: var(--text-muted);
    }
    .corr-scroll {
      overflow-x: auto;
      overflow-y: visible;
      padding: 12px;
    }
    .corr-insights {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
    }
    @media (max-width: 900px) { .corr-insights { grid-template-columns: 1fr; } }
    .corr-insight-card {
      background: var(--bg-base);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 14px 16px;
    }
    .corr-insight-title {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      margin-bottom: 8px;
      font-weight: 600;
    }
    .corr-insight-pair {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4px 0;
    }
    .corr-insight-pair:not(:last-child) {
      border-bottom: 1px solid var(--border);
    }
    .corr-insight-tickers {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-primary);
      font-weight: 500;
    }
    .corr-insight-val {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
    }
    .corr-insight-stat {
      display: flex;
      align-items: baseline;
      gap: 8px;
      margin-bottom: 6px;
    }
    .corr-insight-stat-value {
      font-family: var(--font-mono);
      font-size: 22px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .corr-insight-stat-label {
      font-size: 12px;
      color: var(--text-muted);
    }
    .corr-insight-desc {
      font-size: 11px;
      color: var(--text-faint);
      line-height: 1.5;
    }
    .corr-matrix {
      border-collapse: separate;
      border-spacing: 1px;
      margin: 0 auto;
    }
    .corr-matrix th {
      font-family: var(--font-mono); font-size: 10px; font-weight: 500;
      color: var(--text-muted); padding: 2px 4px;
      position: sticky; background: var(--surface); z-index: 2;
    }
    .corr-matrix thead th {
      top: 0; text-align: center; vertical-align: bottom;
      height: 60px; white-space: nowrap;
    }
    .corr-matrix thead th > span {
      display: inline-block;
      transform: rotate(-45deg);
      transform-origin: left bottom;
      width: 20px;
    }
    .corr-matrix th.corr-row-label {
      left: 0; text-align: right; padding-right: 8px;
      z-index: 3; min-width: 50px;
    }
    .corr-matrix td {
      width: 30px; height: 30px; min-width: 30px;
      text-align: center; vertical-align: middle;
      font-family: var(--font-mono); font-size: 9px;
      color: transparent; border-radius: 3px;
      cursor: default; transition: color 0.12s ease;
      position: relative;
    }
    .corr-matrix td:hover {
      color: var(--text-primary) !important;
      outline: 1px solid var(--text-muted);
      z-index: 1;
    }
    .corr-matrix td.corr-diag {
      background: var(--surface-2) !important;
      color: var(--text-faint);
    }
    .corr-legend {
      display: flex; align-items: center; gap: 8px;
      margin-top: 16px; padding: 0 12px 12px;
    }
    .corr-legend-label {
      font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
    }
    .corr-legend-bar {
      flex: 1; max-width: 280px; height: 12px; border-radius: 6px;
      background: linear-gradient(to right, 
        rgba(239,68,68,0.85) 0%, 
        rgba(239,68,68,0.25) 25%, 
        transparent 50%, 
        rgba(59,130,246,0.25) 75%, 
        rgba(59,130,246,0.85) 100%
      );
    }
    .corr-loading {
      display: flex; align-items: center; justify-content: center;
      padding: 80px 20px;
      color: var(--text-muted); font-size: 13px;
    }
    .corr-loading-spinner {
      width: 20px; height: 20px; border: 2px solid var(--border);
      border-top-color: var(--blue); border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin-right: 10px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ================================================================
       VALUATION TAB — New Fair Value Estimate + DCF Assumptions styles
       ================================================================ */
    .val-fv-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 0;
    }
    .val-fv-badge {
      display: inline-flex;
      align-items: center;
      padding: 2px 7px;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.06em;
      border-radius: 4px;
      background: rgba(59,130,246,0.15);
      color: #60A5FA;
      border: 1px solid rgba(59,130,246,0.3);
      font-family: var(--font-mono);
    }
    .val-fv-source {
      font-size: 9px;
      color: var(--text-faint);
      font-family: var(--font-mono);
      text-align: right;
    }
    /* Heat bar */
    .val-heatbar-wrap {
      position: relative;
      padding-top: 28px;
      padding-bottom: 20px;
    }
    .val-heatbar-marker-row {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 28px;
    }
    .val-heatbar-marker {
      position: absolute;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .val-heatbar-marker-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.08em;
      color: #E2E8F0;
      font-family: var(--font-mono);
      white-space: nowrap;
      margin-bottom: 3px;
    }
    .val-heatbar-marker-arrow {
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid #E2E8F0;
    }
    .val-heatbar {
      height: 14px;
      border-radius: 7px;
      background: linear-gradient(to right, #EF4444 0%, #F59E0B 40%, #EAB308 60%, #10B981 100%);
      position: relative;
    }
    .val-heatbar-labels {
      display: flex;
      justify-content: space-between;
      margin-top: 5px;
    }
    .val-heatbar-bear,
    .val-heatbar-base,
    .val-heatbar-bull {
      font-size: 9px;
      font-family: var(--font-mono);
      color: var(--text-faint);
    }
    .val-heatbar-base { text-align: center; }
    .val-heatbar-bull { text-align: right; }
    /* Price targets row (below bar) */
    .val-fv-metrics-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 14px;
      padding: 12px 0 4px;
      border-top: 1px solid var(--border);
    }
    .val-fv-right-item {
      text-align: center;
      flex: 1;
    }
    .val-fv-right-item:first-child { text-align: left; }
    .val-fv-right-item:last-child { text-align: right; }
    .val-fv-right-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-faint);
      font-family: var(--font-mono);
      margin-bottom: 2px;
    }
    .val-fv-right-value {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 700;
      color: #E2E8F0;
      line-height: 1.1;
    }
    .val-fv-right-value.green { color: var(--emerald); }
    .val-fv-right-value.amber { color: var(--amber); }
    .val-fv-right-value.red   { color: var(--red); }
    .val-fv-right-delta {
      font-family: var(--font-mono);
      font-size: 10px;
      margin-top: 1px;
    }
    .val-fv-right-delta.up   { color: var(--emerald); }
    .val-fv-right-delta.down { color: var(--red); }
    /* DCF Assumption Cards */
    .val-dcf-cards {
      display: flex;
      gap: 10px;
      margin-top: 12px;
    }
    .val-dcf-card {
      flex: 1;
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 12px 14px;
      min-width: 0;
    }
    .val-dcf-card-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-faint);
      font-family: var(--font-mono);
      margin-bottom: 6px;
    }
    .val-dcf-card-value {
      font-family: var(--font-mono);
      font-size: 24px;
      font-weight: 600;
      color: var(--emerald);
      line-height: 1.1;
      margin-bottom: 4px;
    }
    .val-dcf-card-sub {
      font-size: 9px;
      color: var(--text-faint);
      font-family: var(--font-mono);
    }

    /* ================================================================
       SCORE ALGORITHM PAGE
       ================================================================ */
    .sa-page-header {
      padding: 24px 32px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 16px;
    }
    .sa-page-header h1 {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 600;
      color: var(--text-primary);
    }
    .sa-page-header .sa-subtitle {
      font-size: 13px;
      color: var(--text-faint);
      margin-left: auto;
      font-family: var(--font-mono);
    }
    .sa-content { padding: 24px 32px; }

    /* Distribution Section */
    .dist-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
    }
    .dist-section h2 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .dist-subtitle {
      font-size: 12px;
      color: var(--text-faint);
      margin-bottom: 20px;
    }
    /* Segmented Gauge Strip */
    .gauge-wrapper {
      position: relative;
      padding-top: 28px;
    }
    .gauge-avg-label {
      position: absolute;
      top: 0;
      transform: translateX(-50%);
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      color: var(--text-secondary);
      white-space: nowrap;
      z-index: 10;
    }
    .gauge-avg-caret {
      position: absolute;
      top: 14px;
      transform: translateX(-50%);
      z-index: 10;
      width: 0; height: 0;
      border-left: 6px solid transparent;
      border-right: 6px solid transparent;
      border-top: 7px solid var(--text-secondary);
    }
    .gauge-strip {
      position: relative;
      display: flex;
      height: 52px;
      border-radius: 8px;
      overflow: hidden;
    }
    .gauge-seg {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      min-width: 48px;
      transition: filter 0.2s;
      cursor: default;
    }
    .gauge-seg:hover { filter: brightness(1.18); }
    .gauge-seg .seg-count {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 700;
      color: #fff;
      line-height: 1;
    }
    .gauge-seg .seg-pct {
      font-size: 10px;
      color: rgba(255,255,255,0.65);
      margin-top: 2px;
    }
    .gauge-marker-line {
      position: absolute;
      top: 0; bottom: 0;
      width: 2px;
      background: rgba(255,255,255,0.6);
      transform: translateX(-50%);
      z-index: 5;
      pointer-events: none;
    }
    .gauge-labels {
      display: flex;
      margin-top: 6px;
    }
    .gauge-label {
      text-align: center;
      line-height: 1.3;
    }
    .gauge-label .gl-range {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-secondary);
      display: block;
    }
    .gauge-label .gl-tag {
      font-size: 10px;
      color: var(--text-faint);
    }
    .dist-stats {
      display: flex;
      gap: 32px;
      margin-top: 20px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }
    .dist-stat {
      display: flex;
      align-items: baseline;
      gap: 8px;
    }
    .dist-stat .stat-label {
      font-size: 12px;
      color: var(--text-faint);
    }
    .dist-stat .stat-value {
      font-family: var(--font-mono);
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
    }

    /* Methodology Cards */
    .method-section-header {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .method-section-subtitle {
      font-size: 12px;
      color: var(--text-faint);
      margin-bottom: 20px;
    }
    .method-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 24px;
    }
    .method-pill {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 14px;
      height: 40px;
      transition: background 0.15s;
    }
    .method-pill:hover {
      background: var(--surface-2);
    }
    .method-icon {
      width: 24px;
      height: 24px;
      border-radius: 5px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      flex-shrink: 0;
    }
    .method-pill-name {
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
    }
    .method-pill-weight {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 700;
      color: var(--text-muted);
      margin-left: 2px;
    }

    /* Live Scoring Example */
    .live-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
    }
    .live-section h2 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .live-subtitle {
      font-size: 12px;
      color: var(--text-faint);
      margin-bottom: 20px;
    }
    .live-header {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }
    .live-ticker {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 600;
      color: var(--blue);
      background: var(--blue-dim);
      padding: 6px 12px;
      border-radius: 6px;
    }
    .live-score-display {
      font-family: var(--font-mono);
      font-size: 28px;
      font-weight: 600;
      color: var(--emerald);
    }
    .live-score-display span {
      font-size: 16px;
      color: var(--text-muted);
    }
    .live-score-label {
      font-size: 12px;
      color: var(--text-muted);
    }

    /* Stacked bar */
    .stacked-bar-wrap {
      margin-bottom: 24px;
    }
    .stacked-bar {
      display: flex;
      height: 24px;
      border-radius: 6px;
      overflow: hidden;
      margin-bottom: 10px;
    }
    .stacked-seg {
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      color: white;
      transition: width 0.6s ease;
    }
    .stacked-legend {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
    }
    .stacked-legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--text-secondary);
    }
    .stacked-legend-item .sl-dot {
      width: 10px;
      height: 10px;
      border-radius: 3px;
    }

    /* Breakdown table */
    .breakdown-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    .breakdown-table thead th {
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text-faint);
      padding: 10px 14px;
      text-align: left;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .breakdown-table thead th:nth-child(n+2) {
      text-align: right;
    }
    .breakdown-table thead th:last-child {
      text-align: left;
    }
    .breakdown-table tbody tr {
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }
    .breakdown-table tbody tr:hover {
      background: var(--surface-2);
    }
    .breakdown-table tbody tr:last-child {
      border-bottom: none;
    }
    .breakdown-table td {
      padding: 14px 14px;
      font-family: var(--font-body);
      font-size: 13px;
      color: var(--text-secondary);
      vertical-align: top;
    }
    .breakdown-table td:first-child {
      font-family: var(--font-display);
      font-weight: 500;
      color: var(--text-primary);
    }
    .breakdown-table td:nth-child(2),
    .breakdown-table td:nth-child(3),
    .breakdown-table td:nth-child(4) {
      text-align: right;
      font-family: var(--font-mono);
      font-size: 13px;
      white-space: nowrap;
    }
    .breakdown-table td:last-child {
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.5;
    }
    .breakdown-total {
      display: flex;
      justify-content: flex-end;
      align-items: baseline;
      gap: 8px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }
    .breakdown-total .total-label {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
    }
    .breakdown-total .total-value {
      font-family: var(--font-mono);
      font-size: 24px;
      font-weight: 600;
      color: var(--emerald);
    }
    .breakdown-total .total-max {
      font-family: var(--font-mono);
      font-size: 14px;
      color: var(--text-muted);
    }

    /* Score Interpretation Guide */
    .guide-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
    }
    .guide-section h2 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .guide-subtitle {
      font-size: 12px;
      color: var(--text-faint);
      margin-bottom: 20px;
    }
    .guide-tiers {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .guide-tier {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }
    .guide-tier:last-child {
      border-bottom: none;
    }
    .guide-tier:hover {
      background: var(--surface-2);
    }
    .tier-color-bar {
      width: 6px;
      height: 36px;
      border-radius: 3px;
      flex-shrink: 0;
    }
    .tier-range {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
      min-width: 70px;
    }
    .tier-name {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 600;
      min-width: 110px;
    }
    .tier-desc {
      font-size: 13px;
      color: var(--text-secondary);
    }

    /* Changelog */
    .changelog-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
    }
    .changelog-section h2 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 16px;
    }
    .changelog-item {
      display: flex;
      gap: 16px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }
    .changelog-item:last-child {
      border-bottom: none;
    }
    .changelog-version {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 600;
      color: var(--blue);
      background: var(--blue-dim);
      padding: 2px 10px;
      border-radius: 4px;
      height: fit-content;
      white-space: nowrap;
    }
    .changelog-date {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-faint);
      min-width: 80px;
      white-space: nowrap;
    }
    .changelog-desc {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    /* Version toggle pills (Score Algorithm page) */
    .version-toggle-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 28px;
    }
    .version-toggle-label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
    }
    .version-toggle-group {
      display: flex;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 3px;
      gap: 2px;
    }
    .version-pill {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      padding: 5px 14px;
      border-radius: 4px;
      cursor: pointer;
      color: var(--text-muted);
      background: transparent;
      border: none;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .version-pill:hover {
      color: var(--text-secondary);
      background: rgba(255,255,255,0.04);
    }
    .version-pill.active {
      background: var(--blue);
      color: #fff;
    }
    .version-pill .version-tag {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin-left: 6px;
      padding: 1px 5px;
      border-radius: 3px;
      vertical-align: middle;
    }
    .version-pill.active .version-tag {
      background: rgba(255,255,255,0.2);
      color: #fff;
    }
    .version-pill:not(.active) .version-tag {
      background: rgba(16,185,129,0.15);
      color: var(--emerald);
    }
    .version-content {
      display: none;
      animation: saFadeIn 0.2s ease;
    }
    .version-content.active {
      display: block;
    }
    @keyframes saFadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .changelog-active-tag {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 1px 5px;
      border-radius: 3px;
      background: rgba(16,185,129,0.15);
      color: var(--emerald);
      margin-left: 4px;
      vertical-align: middle;
    }

    /* Component bar for live scoring */
    .comp-bar-row {
      margin-bottom: 10px;
    }
    .comp-bar-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 4px;
    }
    .comp-bar-header .comp-name {
      font-family: var(--font-display);
      font-weight: 500;
      font-size: 12px;
      color: var(--text-secondary);
    }
    .comp-bar-header .comp-val {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-secondary);
    }
    .comp-bar-track {
      height: 8px;
      background: var(--bg-alt);
      border-radius: 4px;
      overflow: hidden;
    }
    .comp-bar-fill {
      height: 100%;
      border-radius: 4px;
      transition: width 0.6s ease;
    }
    /* ================================================================
       MARKET MODEL PAGE
       ================================================================ */
    .mm-regime-card {
      background: var(--surface-1);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 28px 32px;
      margin-bottom: 24px;
      display: flex;
      align-items: center;
      gap: 40px;
      flex-wrap: wrap;
    }
    .mm-regime-status {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .mm-regime-label {
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }
    .mm-regime-value {
      font-family: var(--font-display);
      font-size: 32px;
      font-weight: 700;
      color: var(--emerald);
      letter-spacing: 1px;
    }
    .mm-regime-composite {
      flex: 1;
      min-width: 250px;
    }
    .mm-composite-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 8px;
    }
    .mm-composite-header .mm-ch-label {
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }
    .mm-composite-header .mm-ch-score {
      font-family: var(--font-mono);
      font-size: 20px;
      font-weight: 600;
      color: var(--emerald);
    }
    .mm-composite-header .mm-ch-score span {
      font-size: 14px;
      color: var(--text-muted);
    }
    .mm-progress-track {
      height: 12px;
      background: var(--border);
      border-radius: 6px;
      overflow: hidden;
      position: relative;
    }
    .mm-progress-fill {
      height: 100%;
      border-radius: 6px;
      background: linear-gradient(90deg, var(--emerald), var(--emerald-bright, #34D399));
      transition: width 0.6s ease;
    }
    .mm-progress-markers {
      display: flex;
      justify-content: space-between;
      margin-top: 4px;
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-faint);
    }
    .mm-regime-history {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .mm-regime-history .mm-rh-label {
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }
    .mm-history-strip {
      display: flex;
      gap: 4px;
    }
    .mm-history-square {
      width: 24px;
      height: 24px;
      border-radius: 4px;
      position: relative;
    }
    .mm-history-square.green { background: var(--emerald); }
    .mm-history-square.yellow { background: #F59E0B; }
    .mm-history-square.red { background: var(--red); }
    .mm-regime-timestamp {
      font-size: 12px;
      color: var(--text-faint);
      font-family: var(--font-mono);
      white-space: nowrap;
      align-self: flex-end;
    }

    /* Signal Components Grid */
    .mm-signal-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      margin-bottom: 24px;
    }
    .mm-signal-card {
      background: var(--surface-1);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px 22px;
      transition: background 0.15s;
    }
    .mm-signal-card:hover {
      background: var(--surface-2);
    }
    .mm-signal-card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }
    .mm-signal-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      flex-shrink: 0;
    }
    .mm-signal-card-header h3 {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
    }
    .mm-signal-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
    }
    .mm-signal-row:not(:last-child) {
      border-bottom: 1px solid rgba(30,41,59,0.5);
    }
    .mm-signal-row .mm-metric-label {
      font-size: 12px;
      color: var(--text-secondary);
      font-family: var(--font-body);
      font-weight: 400;
    }
    .mm-signal-row .mm-metric-value {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .mm-signal-row .mm-metric-data {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 500;
      color: var(--text-primary);
    }
    .mm-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 600;
      font-family: var(--font-display);
      letter-spacing: 0.3px;
      white-space: nowrap;
    }
    .mm-badge.bullish { background: rgba(16,185,129,0.12); color: var(--emerald-bright, #34D399); }
    .mm-badge.bearish { background: rgba(239,68,68,0.12); color: #F87171; }
    .mm-badge.neutral { background: rgba(245,158,11,0.12); color: #F59E0B; }
    .mm-badge.data-only {
      background: rgba(59,130,246,0.1);
      color: var(--blue);
    }

    /* RRG Chart Section */
    .mm-chart-section {
      background: var(--surface-1);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
      overflow: hidden;
    }
    .mm-chart-section h2 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .mm-chart-section .mm-chart-subtitle {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 20px;
    }
    .mm-canvas-wrap {
      position: relative;
      width: 100%;
      overflow: hidden;
    }
    .mm-canvas-wrap canvas {
      display: block;
      width: 100%;
      height: auto;
    }

    /* RRG Legend */
    .mm-rrg-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 14px 20px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }
    .mm-rrg-legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--text-secondary);
      font-family: var(--font-body);
      cursor: default;
    }
    .mm-rrg-legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .mm-rrg-legend-ticker {
      font-family: var(--font-mono);
      font-weight: 500;
      color: var(--text-primary);
      font-size: 11px;
    }

    /* RRG Tooltip */
    .mm-rrg-tooltip {
      position: absolute;
      pointer-events: none;
      background: rgba(11,17,32,0.95);
      border: 1px solid var(--border-alt, #263045);
      border-radius: 8px;
      padding: 10px 14px;
      font-size: 12px;
      color: var(--text-primary);
      display: none;
      z-index: 10;
      backdrop-filter: blur(8px);
      min-width: 160px;
    }
    .mm-rrg-tooltip .mm-tt-ticker {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 13px;
      margin-bottom: 2px;
    }
    .mm-rrg-tooltip .mm-tt-name {
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 8px;
    }
    .mm-rrg-tooltip .mm-tt-row {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 2px;
    }
    .mm-rrg-tooltip .mm-tt-label {
      color: var(--text-muted);
      font-size: 11px;
    }
    .mm-rrg-tooltip .mm-tt-val {
      font-family: var(--font-mono);
      font-weight: 500;
      font-size: 12px;
    }
    .mm-rrg-tooltip .mm-tt-quadrant {
      margin-top: 6px;
      padding-top: 6px;
      border-top: 1px solid var(--border);
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    /* Sector Performance Table */
    .mm-perf-table-section {
      background: var(--surface-1);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .mm-perf-table-section h2 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .mm-perf-subtitle {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 16px;
    }
    .mm-perf-table {
      width: 100%;
      min-width: 540px;
      border-collapse: collapse;
      font-size: 13px;
    }
    .mm-perf-table thead th {
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text-muted);
      padding: 10px 12px;
      text-align: center;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .mm-perf-table thead th:first-child {
      text-align: left;
      min-width: 120px;
    }
    .mm-perf-table tbody tr {
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }
    .mm-perf-table tbody tr:hover {
      background: var(--surface-2);
    }
    .mm-perf-table tbody tr:last-child {
      border-bottom: none;
    }
    .mm-perf-table td {
      padding: 10px 12px;
      text-align: center;
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 500;
    }
    .mm-perf-table td:first-child {
      text-align: left;
      font-family: var(--font-display);
      font-weight: 500;
      color: var(--text-primary);
    }
    .mm-perf-table td:first-child .mm-sector-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      margin-right: 8px;
      vertical-align: middle;
    }
    .mm-perf-cell {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 4px;
      min-width: 68px;
      text-align: center;
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 500;
    }

    /* Portfolio Impact */
    .mm-impact-section {
      background: var(--surface-1);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
    }
    .mm-impact-section h2 {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .mm-impact-subtitle {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 20px;
    }
    .mm-impact-advice {
      background: rgba(16,185,129,0.12);
      border: 1px solid rgba(16,185,129,0.2);
      border-radius: 8px;
      padding: 16px 20px;
      margin-bottom: 20px;
    }
    .mm-impact-advice p {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.6;
    }
    .mm-impact-advice strong {
      color: var(--emerald-bright, #34D399);
    }
    .mm-watchlist-picks {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      margin-bottom: 20px;
    }
    .mm-pick-card {
      background: var(--bg-base);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 14px;
    }
    .mm-pick-ticker {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 600;
      color: var(--blue);
      background: rgba(59,130,246,0.15);
      padding: 4px 10px;
      border-radius: 5px;
    }
    .mm-pick-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .mm-pick-score {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
    }
    .mm-pick-label {
      font-size: 11px;
      color: var(--text-muted);
    }
    .mm-regime-alignment {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 18px;
      background: var(--bg-base);
      border: 1px solid var(--border);
      border-radius: 8px;
    }
    .mm-alignment-label {
      font-size: 12px;
      color: var(--text-secondary);
    }
    .mm-alignment-value {
      font-family: var(--font-mono);
      font-size: 16px;
      font-weight: 600;
      color: var(--emerald);
    }
    .mm-alignment-bar-track {
      flex: 1;
      height: 8px;
      background: var(--border);
      border-radius: 4px;
      overflow: hidden;
    }
    .mm-alignment-bar-fill {
      height: 100%;
      border-radius: 4px;
      background: var(--emerald);
    }

    @media (max-width: 900px) {
      .mm-signal-grid { grid-template-columns: repeat(2, 1fr); }
      .mm-watchlist-picks { grid-template-columns: repeat(2, 1fr); }
      .mm-regime-card { gap: 20px; }
    }
    @media (max-width: 600px) {
      .mm-signal-grid { grid-template-columns: 1fr; }
      .mm-watchlist-picks { grid-template-columns: 1fr; }
      .mm-regime-card { padding: 20px 16px; }
    }


    /* ========================== RADAR PAGE STYLES ========================== */
    .radar-main-container {
      display: flex;
      gap: 28px;
      align-items: flex-start;
      margin-bottom: 8px;
    }
    .radar-visual-container {
      position: relative;
      width: 560px;
      min-width: 560px;
      height: 560px;
    }
    .radar-svg { width: 100%; height: 100%; }

    @keyframes radarSweepAnim {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    .radar-sweep-arm {
      transform-origin: 220px 220px;
      animation: radarSweepAnim 8s linear infinite;
    }
    .radar-blip { cursor: pointer; transition: transform 0.2s; transform-box: fill-box; transform-origin: center; }
    .radar-blip:hover { transform: scale(1.3); }

    .radar-right-panel {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 16px;
      min-width: 0;
    }
    .radar-legend-container {
      display: flex;
      flex-direction: column;
      gap: 5px;
      max-height: 480px;
      overflow-y: auto;
    }
    .radar-legend-container::-webkit-scrollbar { width: 4px; }
    .radar-legend-container::-webkit-scrollbar-track { background: transparent; }
    .radar-legend-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

    .radar-legend-title {
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 14px;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .radar-legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 12px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      transition: border-color 0.2s, background 0.2s;
    }
    .radar-legend-item:hover {
      border-color: var(--blue);
      background: var(--surface-2);
    }
    .radar-legend-ticker {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 12px;
      color: var(--text-primary);
      min-width: 42px;
    }
    .radar-legend-event {
      font-size: 11px;
      color: var(--text-secondary);
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .radar-legend-days {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      white-space: nowrap;
    }
    .radar-days-critical { color: var(--red); }
    .radar-days-soon { color: var(--amber); }
    .radar-days-normal { color: var(--text-muted); }

    /* Quadrant key */
    .radar-quadrant-key {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 12px 14px;
    }
    .radar-qk-title {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      text-transform: uppercase;
      margin-bottom: 8px;
    }
    .radar-qk-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }
    .radar-qk-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: var(--text-secondary);
    }
    .radar-qk-swatch {
      width: 14px;
      height: 14px;
      border-radius: 3px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 8px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .radar-blip-key {
      display: flex;
      gap: 14px;
      align-items: center;
      margin-top: 8px;
      flex-wrap: wrap;
    }
    .radar-bk-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 10px;
      color: var(--text-muted);
      font-family: var(--font-mono);
    }

    .radar-divider {
      height: 1px;
      background: var(--border);
      margin: 32px 0;
    }

    /* Macro calendar within radar tab */
    .radar-macro-timeline {
      position: relative;
      padding-left: 24px;
    }
    .radar-macro-timeline::before {
      content: '';
      position: absolute;
      left: 7px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: var(--border);
    }
    .radar-macro-week {
      position: relative;
      margin-bottom: 24px;
    }
    .radar-macro-week-label {
      position: relative;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      text-transform: uppercase;
      margin-bottom: 12px;
      padding-left: 8px;
    }
    .radar-macro-week-label::before {
      content: '';
      position: absolute;
      left: -20px;
      top: 50%;
      transform: translateY(-50%);
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--surface);
      border: 2px solid var(--blue);
    }
    .radar-macro-events-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
      gap: 10px;
    }
    .radar-macro-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 12px 14px;
      transition: border-color 0.2s;
    }
    .radar-macro-card:hover { border-color: var(--blue); }
    .radar-macro-card-top {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
    }
    .radar-macro-icon {
      width: 32px;
      height: 32px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 600;
      font-family: var(--font-mono);
      flex-shrink: 0;
    }
    .radar-macro-info { flex: 1; min-width: 0; }
    .radar-macro-name {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .radar-macro-date {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-muted);
    }
    .radar-macro-impact {
      font-family: var(--font-mono);
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.05em;
      padding: 2px 6px;
      border-radius: 3px;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .radar-macro-data-row {
      display: flex;
      gap: 16px;
      margin-top: 6px;
      padding-top: 6px;
      border-top: 1px solid rgba(30,41,59,0.5);
    }
    .radar-macro-data-item {
      display: flex;
      flex-direction: column;
      gap: 1px;
    }
    .radar-macro-data-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-faint);
      font-family: var(--font-mono);
    }
    .radar-macro-data-val {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
    }

    /* Macro icon colors (reuse from existing) */
    .macro-icon-fed { background: rgba(139,92,246,0.15); color: var(--purple); }
    .macro-icon-cpi { background: rgba(236,72,153,0.15); color: var(--pink); }
    .macro-icon-jobs { background: rgba(59,130,246,0.15); color: var(--blue); }
    .macro-icon-gdp { background: rgba(16,185,129,0.15); color: var(--emerald); }
    .macro-icon-ppi { background: rgba(245,158,11,0.15); color: var(--amber); }
    .macro-icon-pce { background: rgba(236,72,153,0.15); color: var(--pink); }

    @media (max-width: 1060px) {
      .radar-main-container { flex-direction: column; align-items: center; }
      .radar-visual-container { width: 440px; min-width: 440px; height: 440px; }
      .radar-right-panel { max-width: 100%; }
    }

    /* ================================================================
       TOP MOVERS WIDGET
       ================================================================ */
    .movers-section { margin: 24px 0; }
    .movers-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .movers-title {
      font-family: var(--font-display);
      font-size: 16px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .movers-summary {
      font-size: 12px;
      color: var(--text-muted);
      font-family: var(--font-mono);
    }
    .movers-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }
    @media (max-width: 700px) {
      .movers-grid { grid-template-columns: 1fr; }
    }
    .movers-col-header {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 8px;
      padding-left: 4px;
    }
    .movers-col-header.gainers { color: var(--emerald); }
    .movers-col-header.losers { color: var(--red); }
    .movers-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 10px 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      transition: border-color 0.15s;
      cursor: pointer;
    }
    .movers-card:hover { border-color: var(--blue); }
    .movers-card + .movers-card { margin-top: 6px; }
    .movers-rank {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-muted);
      min-width: 14px;
      text-align: center;
    }
    .movers-ticker {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 13px;
      color: var(--text-primary);
      min-width: 48px;
    }
    .movers-price {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-secondary);
      min-width: 56px;
      text-align: right;
    }
    .movers-chg {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 600;
      min-width: 52px;
      text-align: right;
    }
    .movers-chg.up { color: var(--emerald); }
    .movers-chg.down { color: var(--red); }
    .movers-range-wrap {
      flex: 1;
      min-width: 60px;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .movers-range-label {
      font-size: 9px;
      color: var(--text-muted);
      text-align: center;
      font-family: var(--font-mono);
    }
    .movers-range-bar {
      height: 4px;
      background: var(--border);
      border-radius: 2px;
      position: relative;
      overflow: visible;
    }
    .movers-range-fill {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      border-radius: 2px;
      background: linear-gradient(90deg, var(--blue-dim), var(--blue));
    }
    .movers-range-dot {
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--blue);
      border: 2px solid var(--surface);
      box-shadow: 0 0 4px rgba(59,130,246,0.4);
    }

    /* ================================================================
       TOP MOVERS v4 (tier labels + sparklines + signal badges)
       ================================================================ */
    .mv4-container {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      margin: 0;
    }
    .mv4-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
    }
    .mv4-header-title {
      font-family: var(--font-display);
      font-size: 14px; font-weight: 700;
    }
    .mv4-header-summary {
      font-family: var(--font-mono);
      font-size: 11px; color: var(--text-muted);
    }
    .mv4-header-summary .up-ct { color: var(--emerald); font-weight: 600; }
    .mv4-header-summary .dn-ct { color: var(--red); font-weight: 600; }
    .mv4-grid { display: flex; flex-direction: column; }
    .mv4-col { padding: 14px 12px; overflow: hidden; }
    .mv4-col + .mv4-col { border-top: 1px solid var(--border); }
    .mv4-col-label {
      font-family: var(--font-body);
      font-size: 10px; font-weight: 600;
      letter-spacing: 0.08em; text-transform: uppercase;
      color: var(--text-muted); margin-bottom: 10px;
      display: flex; align-items: center; gap: 6px;
    }
    .mv4-dot { width: 6px; height: 6px; border-radius: 50%; }
    .mv4-dot.green { background: var(--emerald); }
    .mv4-dot.red { background: var(--red); }
    .mv4-col-headers {
      display: grid;
      grid-template-columns: 2.4fr 2.8fr 2fr 3fr 2fr 2.2fr; /* Signal column removed */
      gap: 6px; padding: 0 10px 6px;
    }
    .mv4-col-h {
      font-family: var(--font-body);
      font-size: 8.5px; font-weight: 600;
      letter-spacing: 0.03em; text-transform: uppercase;
      color: var(--text-muted);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .mv4-col-h.right { text-align: right; }
    .mv4-row {
      display: grid;
      grid-template-columns: 2.4fr 2.8fr 2fr 3fr 2fr 2.2fr; /* Signal column removed */
      gap: 6px; align-items: center;
      padding: 9px 10px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      margin-bottom: 5px; cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
    }
    .mv4-row:hover { border-color: rgba(255,255,255,0.12); background: var(--surface-2); }
    .mv4-ticker { font-family: var(--font-mono); font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mv4-price { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mv4-spark { padding-right: 4px; }
    .mv4-spark svg { width: 70px; height: 20px; }
    .mv4-tier {
      font-family: var(--font-mono);
      font-size: 9px; font-weight: 700;
      letter-spacing: 0.02em;
      white-space: nowrap;
    }
    .mv4-signal {
      font-family: var(--font-mono);
      font-size: 8px; font-weight: 700;
      letter-spacing: 0.03em;
      padding: 3px 6px; border-radius: 3px;
      text-align: center; white-space: nowrap;
    }
    .mv4-signal.buy-zone { background: var(--emerald-dim); color: var(--emerald); }
    .mv4-signal.buy-approaching { background: rgba(52,211,153,0.08); color: #34D399; }
    .mv4-signal.sell-zone { background: rgba(239,68,68,0.12); color: var(--red); }
    .mv4-signal.sell-approaching { background: rgba(245,158,11,0.08); color: var(--amber); }
    .mv4-signal.watching { background: rgba(55,65,81,0.5); color: var(--text-muted); }
    .mv4-signal.buy-sell-zone { background: rgba(100,116,139,0.12); color: var(--text-muted); }
    .mv4-signal.buy-sell-approaching { background: rgba(16,185,129,0.08); color: rgba(16,185,129,0.7); }
    .mv4-chg { font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mv4-chg.positive { color: var(--emerald); }
    .mv4-chg.negative { color: var(--red); }
    .mv4-footer {
      padding: 10px 16px; border-top: 1px solid var(--border);
      text-align: center; font-size: 10px; color: var(--text-muted); font-style: italic;
    }
    @media (max-width: 768px) {
      .mv4-col-headers, .mv4-row {
        gap: 4px;
      }
      .mv4-ticker { font-size: 12px; }
      .mv4-price { font-size: 10px; }
      .mv4-chg { font-size: 11px; }
    }
    @media (max-width: 900px) {
      .mv4-col + .mv4-col { border-top: 1px solid var(--border); }
      .mv4-ticker { font-size: 13px; }
      .mv4-price { font-size: 11px; }
      .mv4-chg { font-size: 12px; }
    }
    /* Signal column removed from grid — mobile override no longer needed */

    /* ================================================================
       NEWS FEED
       ================================================================ */
    .newsfeed-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-sizing: border-box; }
    .newsfeed-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
    .newsfeed-title-group { display: flex; align-items: center; gap: 10px; }
    .newsfeed-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-primary); }
    .newsfeed-powered { font-size: 11px; color: var(--text-faint); }
    .newsfeed-list { overflow-y: auto; }
    .nf-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--border); cursor: pointer; transition: background 150ms; }
    .nf-row:hover { background: var(--surface-2); }
    .nf-ticker-badge { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-primary); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; min-width: 52px; text-align: center; flex-shrink: 0; }
    .nf-content { flex: 1; min-width: 0; }
    .nf-headline { font-size: 14px; font-weight: 500; color: var(--text-primary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .nf-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
    .nf-sentiment { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 12px; border-radius: 4px; flex-shrink: 0; text-align: center; min-width: 72px; }
    .nf-sentiment.bullish { background: var(--emerald-dim); color: var(--emerald); }
    .nf-sentiment.bearish { background: var(--red-dim); color: var(--red); }
    .nf-sentiment.neutral { background: rgba(55,65,81,0.5); color: var(--text-muted); }

    /* ================================================================
       NEWS + MOVERS 1:1 SPLIT
       ================================================================ */
    .dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; align-items: stretch; }
    .dash-split > .mv4-container { overflow: hidden; }
    .dash-split > .newsfeed-container { display: flex; flex-direction: column; overflow: hidden; }
    .dash-split > .newsfeed-container .newsfeed-list { flex: 1 1 0; overflow-y: auto; min-height: 0; }
    @media (max-width: 1100px) { .dash-split { grid-template-columns: 1fr; } }

    /* ================================================================
       NEWS SLIDE-OUT PANEL
       ================================================================ */
    .panel-backdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999;
      opacity: 0; pointer-events: none; transition: opacity 250ms var(--ease);
    }
    .panel-backdrop.open { opacity: 1; pointer-events: auto; }
    .panel-drawer {
      position: fixed; right: 0; top: 0; height: 100vh; width: 480px;
      background: var(--surface); border-left: 1px solid var(--border);
      z-index: 1000; transform: translateX(100%); transition: transform 300ms var(--ease);
      display: flex; flex-direction: column; overflow-y: auto;
    }
    .panel-drawer.open { transform: translateX(0); }
    .panel-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 24px 16px; border-bottom: 1px solid var(--border); }
    .panel-header-left { flex: 1; min-width: 0; }
    .panel-header-ticker { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-primary); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; display: inline-block; margin-bottom: 10px; }
    .panel-header-headline { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
    .panel-close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-muted); flex-shrink: 0; margin-left: 8px; font-size: 20px; transition: background 150ms, color 150ms; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .panel-close:hover { background: var(--surface-2); color: var(--text-primary); }
    .panel-body { padding: 24px; flex: 1; }
    .panel-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
    .panel-meta-source { font-size: 12px; color: var(--text-muted); }
    .panel-meta-sentiment { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 12px; border-radius: 4px; }
    .panel-meta-sentiment.bullish { background: var(--emerald-dim); color: var(--emerald); }
    .panel-meta-sentiment.bearish { background: var(--red-dim); color: var(--red); }
    .panel-meta-sentiment.neutral { background: rgba(55,65,81,0.5); color: var(--text-muted); }
    .panel-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
    .panel-read-more { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--blue); margin-top: 8px; cursor: pointer; }
    .panel-read-more:hover { text-decoration: underline; }
    @media (max-width: 600px) { .panel-drawer { width: 100%; padding-bottom: 72px; } }

    /* ================================================================
       VIX + FOMC RADAR WIDGETS
       ================================================================ */
    .radar-widget-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
    .radar-widget-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
    .radar-widget-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
    .radar-widget-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
    .radar-widget-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-faint); }
    .vix-value-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
    .vix-big { font-family: var(--font-mono); font-size: 36px; font-weight: 600; color: var(--text-primary); line-height: 1; }
    .vix-status-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 4px; }
    .vix-status-badge.elevated { background: var(--amber-dim); color: var(--amber); }
    .vix-status-badge.low { background: var(--emerald-dim); color: var(--emerald); }
    .vix-status-badge.high { background: var(--red-dim); color: var(--red); }
    .vix-change { font-family: var(--font-mono); font-size: 13px; font-weight: 600; margin-left: auto; }
    .vix-change.up { color: var(--red); }
    .vix-change.down { color: var(--emerald); }
    .vix-range-bar { height: 8px; border-radius: 4px; position: relative; margin: 12px 0 8px; background: linear-gradient(to right, var(--emerald), #22c55e 25%, #eab308 50%, #f59e0b 70%, var(--red) 100%); }
    .vix-range-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--amber); border: 2px solid var(--text-primary); position: absolute; top: -2px; transform: translateX(-50%); }
    .vix-range-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
    .fomc-main-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
    .fomc-date-big { font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
    .fomc-date-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
    .fomc-countdown { text-align: right; }
    .fomc-countdown-num { font-family: var(--font-mono); font-size: 36px; font-weight: 700; color: var(--red); line-height: 1; }
    .fomc-countdown-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
    .fomc-stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
    .fomc-stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
    .fomc-stat-value { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
    .fomc-prob-badge { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--emerald-dim); color: var(--emerald); }
    .fomc-decisions-label { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
    .fomc-decisions-table { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
    .fomc-dec-cell { padding: 8px 6px; text-align: center; border-right: 1px solid var(--border); }
    .fomc-dec-cell:last-child { border-right: none; }
    .fomc-dec-cell.header-cell { font-size: 11px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
    .fomc-dec-cell.value-cell { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
    .fomc-dec-cell.value-cell.cut { color: var(--emerald); }
    .fomc-dec-cell.value-cell.hold { color: var(--text-secondary); }
    .fomc-dec-cell.value-cell.upcoming { color: var(--blue); background: var(--blue-dim); border-bottom: 2px solid var(--blue); }
    .fomc-dec-cell.header-cell.upcoming-header { color: var(--blue); background: var(--blue-dim); }
    @media (max-width: 900px) { .radar-widget-row { grid-template-columns: 1fr; } }

    /* Widget classes (matching approved mockup-radar-v2) */
    .widget-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
    .widget-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
    .widget-top-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
    .widget-top-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
    .widget-top-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-faint); }
    .vix-trend-label { font-size: 11px; color: var(--text-faint); margin: 12px 0 6px; }
    .vix-trend-chart { width: 100%; height: 60px; margin-bottom: 16px; }
    .vix-trend-chart svg { width: 100%; height: 100%; }
    .vix-range-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
    .vix-range-label { font-size: 12px; color: var(--text-secondary); }
    .vix-range-values { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-primary); }
    .vix-legend { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
    .vix-legend-item { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: var(--text-muted); }
    .vix-legend-dot { width: 6px; height: 6px; border-radius: 50%; }
    @media (max-width: 900px) { .widget-row { grid-template-columns: 1fr; } }

    /* ================================================================
       PRE-EARNINGS: Last 4 Earnings dots
       ================================================================ */
    .pre-er-history { margin-top: 10px; }
    .pre-er-history-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
    .pre-er-history-row { display: flex; gap: 6px; }
    .pre-er-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 9px; font-weight: 700; }
    .pre-er-dot.beat { background: var(--emerald-dim); color: var(--emerald); }
    .pre-er-dot.miss { background: var(--red-dim); color: var(--red); }
    .pre-er-dot.inline { background: rgba(55,65,81,0.5); color: var(--text-muted); }

    /* Earnings timing badge (PRE / AFTER) with CSS tooltip */
    .er-timing-badge {
      position: relative;
      font-family: var(--font-mono);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.06em;
      padding: 1px 6px;
      border-radius: 3px;
      cursor: help;
    }
    .er-timing-badge::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 6px);
      left: 50%;
      transform: translateX(-50%);
      background: #1E293B;
      color: #F1F5F9;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.02em;
      padding: 4px 8px;
      border-radius: 4px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 150ms ease;
      z-index: 100;
    }
    .er-timing-badge:hover::after { opacity: 1; }

    /* ================================================================
       BENCHMARK PAGE
       ================================================================ */
    .benchmark-page { max-width: 1100px; }
    .benchmark-title {
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .benchmark-subtitle {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 20px;
    }
    .benchmark-timeframe-bar {
      display: flex;
      gap: 6px;
      margin-bottom: 20px;
    }
    .benchmark-tf-btn {
      padding: 6px 14px;
      font-size: 12px;
      font-weight: 600;
      font-family: var(--font-body);
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.15s;
    }
    .benchmark-tf-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
    .benchmark-tf-btn.active {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
    }
    .benchmark-chart-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      margin-bottom: 20px;
    }
    .benchmark-chart-container {
      position: relative;
      width: 100%;
      overflow: hidden;
    }
    .benchmark-chart-container canvas {
      display: block;
      max-height: 480px;
    }
    .benchmark-legend {
      display: flex;
      gap: 20px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .benchmark-legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--text-secondary);
    }
    .benchmark-legend-swatch {
      width: 24px;
      height: 3px;
      border-radius: 2px;
    }
    .benchmark-stats-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 12px;
      margin-bottom: 20px;
    }
    .benchmark-stat-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 16px;
      text-align: center;
    }
    .benchmark-stat-label {
      font-size: 11px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 4px;
    }
    .benchmark-stat-value {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .benchmark-stat-value.positive { color: var(--emerald); }
    .benchmark-stat-value.negative { color: var(--red); }
    .benchmark-note {
      font-size: 12px;
      color: var(--text-muted);
      font-style: italic;
      line-height: 1.6;
      padding: 12px 16px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      margin-bottom: 16px;
    }
    .benchmark-disclaimer {
      font-size: 11px;
      color: var(--text-muted);
      text-align: center;
      padding: 12px 0;
      border-top: 1px solid var(--border);
      margin-top: 8px;
    }

    /* ================================================================
       SIDEBAR DISCLAIMER
       ================================================================ */
    .sidebar-disclaimer {
      padding: 6px 12px;
      margin: 0 8px 6px;
      font-size: 9px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      line-height: 1.5;
      color: var(--text-muted);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.02);
      text-align: center;
    }

    /* ================================================================
       MOBILE: Bottom Tab Bar, Tools Popup, Layout Overrides
       All mobile-only styles in a single @media block at max-width: 768px
       ================================================================ */
    @media (max-width: 768px) {

      /* --- Bottom Tab Bar --- */
      .m-bottombar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: space-evenly;
        padding: 10px 0 max(calc(env(safe-area-inset-bottom, 12px) + 6px), 18px);
        background: var(--bg);
        border-top: 1px solid var(--border);
        z-index: 100;
      }
      /* Hide m-bottombar when PWA standalone nav is active */
      body.pwa-standalone .m-bottombar { display: none; }
      .m-bottombar .m-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font-size: 10px;
        color: var(--text-muted);
        font-family: var(--font-body);
        font-weight: 500;
        cursor: pointer;
        background: none;
        border: none;
        padding: 4px 8px;
        -webkit-tap-highlight-color: transparent;
      }
      .m-bottombar .m-tab.active { color: var(--blue); }
      .m-bottombar .m-tab svg { width: 20px; height: 20px; }

      /* --- Tools Popup Overlay --- */
      .m-tools-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 9100;
      }
      .m-tools-overlay.visible { display: block; }

      /* --- Tools Popup --- */
      .m-tools-popup {
        display: none;
        position: fixed;
        bottom: 80px;
        left: 8px;
        right: 8px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px;
        z-index: 9200;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
      }
      .m-tools-popup.visible { display: block; }
      .m-tools-popup .popup-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
      }
      .m-tools-popup .popup-header span {
        font-family: var(--font-display);
        font-size: 14px;
        font-weight: 700;
        color: var(--text-primary);
      }
      .m-tools-popup .popup-close {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        cursor: pointer;
        background: none;
        border: none;
      }
      .m-tools-popup .popup-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
      }
      .m-tools-popup .popup-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        background: var(--surface-2);
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        font-size: 12px;
        font-weight: 500;
        font-family: var(--font-body);
        cursor: pointer;
        border: none;
      }
      .m-tools-popup .popup-item svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: var(--blue);
      }

      /* --- Top bar compact --- */
      .topbar { padding-left: 60px; padding-right: 12px; }
      .topbar-title { display: none; }
      .topbar-right { position: absolute; right: 12px; }
      .topbar-right .btn-ghost { display: none; }
      .topbar-right .btn-primary { display: none; }
      .ws-status span { font-size: 9px; }

      /* --- Sentiment bar: viewport-centered on mobile with label below --- */
      .topbar-center {
        position: fixed;
        top: 0;
        left: 50vw;
        transform: translateX(-50%);
        height: 48px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding-bottom: 6px;
        gap: 0px;
        z-index: 51;
        pointer-events: none;
      }
      .sentiment-label { display: none; }
      .sentiment-score-label { font-size: 7px; letter-spacing: 0.06em; opacity: 0.7; }
      .sentiment-bar { gap: 2px; }
      .sentiment-bar .sblock { width: 7px; height: 7px; }

      /* --- Join M21 button in sidebar drawer --- */
      .sidebar-join-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 9px 12px;
        border-radius: var(--radius-sm);
        background: var(--blue);
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        width: 100%;
        margin-bottom: 8px;
        transition: all 150ms var(--ease);
        border: none;
        cursor: pointer;
      }
      .sidebar-join-btn:hover {
        background: var(--blue-hover);
        box-shadow: 0 0 20px var(--blue-glow);
      }

      /* --- Detail panel full-width on mobile --- */
      .detail-panel { width: 100vw; padding-bottom: 72px; }
      .detail-header { padding-right: 16px; }

      /* --- Body padding for bottom bar --- */
      .main { padding-bottom: 64px; }

      /* --- KPI tooltip: constrain within viewport on mobile --- */
      .kpi-card[data-tooltip]::after {
        white-space: normal;
        max-width: calc(100vw - 32px);
        left: 0;
        right: auto;
        transform: none;
      }

      /* --- KPI 8-card: 2x4 grid on mobile --- */
      .kpi-row-8 { grid-template-columns: repeat(2, 1fr); gap: 8px; }

      /* --- Dash split: stack vertically --- */
      .dash-split { grid-template-columns: 1fr; }

      /* --- Alert grid full-width --- */
      .alert-grid { grid-template-columns: 1fr; }

      /* --- News feed: show all items vertically on mobile (no scroll) --- */
      .newsfeed-list { max-height: none !important; overflow-y: visible !important; }
      .dash-split > .newsfeed-container { overflow: visible; height: auto !important; max-height: none !important; }
      .dash-split > .newsfeed-container .newsfeed-list { flex: none; overflow-y: visible; }

      /* --- Radar widget row stack on mobile --- */
      .radar-widget-row { grid-template-columns: 1fr; }

      /* --- RRG chart: maximize size on mobile --- */
      .mm-chart-section { padding: 12px; }
      .mm-chart-section .mm-chart-subtitle { font-size: 11px; margin-bottom: 12px; }

      /* --- RRG legend: one item per line on mobile --- */
      .mm-rrg-legend { flex-direction: column; gap: 8px; }

      /* --- Radar SVG: fit viewport instead of fixed 440px --- */
      .radar-visual-container { width: 100% !important; min-width: 0 !important; max-width: 440px; height: auto !important; aspect-ratio: 1 / 1; }

      /* --- Prevent horizontal wiggle on all pages --- */
      .main { overflow-x: hidden; }

      /* --- Score Algorithm page mobile fixes --- */
      .sa-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px 16px 14px;
      }
      .sa-page-header .sa-subtitle {
        margin-left: 0;
        font-size: 12px;
      }
      .sa-content {
        padding: 16px;
      }
      .guide-tier {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 12px;
      }
      .tier-range {
        min-width: 60px;
        font-size: 13px;
      }
      .tier-name {
        min-width: unset;
        font-size: 13px;
      }
      .tier-desc {
        flex-basis: 100%;
        font-size: 12px;
        padding-left: 22px;
        margin-top: -2px;
      }
      .live-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
      .dist-stats {
        flex-direction: row;
        gap: 12px;
      }
      .version-toggle-row {
        flex-wrap: wrap;
      }
    }

    /* ================================================================
       PWA INSTALL PROMPT
       ================================================================ */
    .pwa-install-banner {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 9999;
      background: var(--surface);
      border-top: 1px solid var(--border);
      border-radius: 16px 16px 0 0;
      padding: 20px 16px 16px;
      box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
      animation: pwaSlideUp 0.4s var(--ease) forwards;
    }
    .pwa-install-banner.visible { display: block; }
    @keyframes pwaSlideUp {
      from { transform: translateY(100%); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    .pwa-install-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }
    .pwa-install-icon {
      width: 44px;
      height: 44px;
      background: linear-gradient(135deg, #3B82F6, #1D4ED8);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 14px;
      color: white;
      letter-spacing: -0.02em;
    }
    .pwa-install-title {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .pwa-install-sub {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 1px;
    }
    .pwa-install-features {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 14px;
    }
    .pwa-install-feat {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      color: var(--text-secondary);
    }
    .pwa-install-feat::before {
      content: '';
      width: 5px;
      height: 5px;
      background: var(--blue);
      border-radius: 50%;
      flex-shrink: 0;
    }
    .pwa-install-actions {
      display: flex;
      gap: 8px;
    }
    .pwa-install-btn {
      flex: 1;
      padding: 10px 0;
      border: none;
      border-radius: var(--radius-sm);
      background: var(--blue);
      color: white;
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
    }
    .pwa-install-btn:hover { background: var(--blue-hover); }
    .pwa-dismiss-btn {
      padding: 10px 16px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-muted);
      font-family: var(--font-body);
      font-size: 12px;
      cursor: pointer;
    }
    /* iOS manual instructions */
    .pwa-ios-steps {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 14px;
    }
    .pwa-ios-step {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      color: var(--text-secondary);
    }
    .pwa-ios-num {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--blue-dim);
      color: var(--blue);
      font-size: 10px;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    /* ================================================================
       PWA STANDALONE BOTTOM NAV
       ================================================================ */
    .pwa-bottom-nav {
      display: none;
    }
    @media (display-mode: standalone) {
      .pwa-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9000;
        justify-content: space-evenly;
        align-items: center;
        padding: 10px 0 max(calc(env(safe-area-inset-bottom, 12px) + 6px), 18px);
        background: var(--surface);
        border-top: 1px solid var(--border);
      }
      /* Only show on mobile in standalone */
      @media (min-width: 769px) {
        .pwa-bottom-nav { display: none; }
      }
      /* Add bottom padding to main content so it's not hidden behind nav */
      .main { padding-bottom: 60px; }
    }
    /* Also trigger via JS class for iOS standalone */
    body.pwa-standalone .pwa-bottom-nav {
      display: flex;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 9000;
      justify-content: space-evenly;
      align-items: center;
      padding: 10px 0 max(calc(env(safe-area-inset-bottom, 12px) + 6px), 18px);
      background: var(--surface);
      border-top: 1px solid var(--border);
    }
    body.pwa-standalone .main { padding-bottom: 60px; }
    @media (min-width: 769px) {
      body.pwa-standalone .pwa-bottom-nav { display: none; }
      body.pwa-standalone .main { padding-bottom: 0; }
    }
    .pwa-nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      font-size: 9px;
      font-family: var(--font-body);
      color: var(--text-muted);
      text-decoration: none;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      padding: 4px 8px;
      border-radius: 6px;
      transition: color 0.15s;
    }
    .pwa-nav-item svg {
      width: 20px;
      height: 20px;
    }
    .pwa-nav-item.active {
      color: var(--blue);
    }
    .pwa-nav-item:active {
      color: var(--blue);
    }

    /* ================================================================
       PWA PULL-TO-REFRESH (standalone mode only)
       ================================================================ */
    .ptr-indicator {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 8999;
      height: 0;
      overflow: hidden;
      background: var(--bg);
      transition: height 0.2s ease;
    }
    body.pwa-standalone .ptr-indicator { display: block; }
    .ptr-indicator-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 48px;
      color: var(--text-muted);
      font-size: 11px;
      font-family: var(--font-body);
      gap: 8px;
    }
    .ptr-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid var(--border);
      border-top-color: var(--blue);
      border-radius: 50%;
      animation: ptr-spin 0.6s linear infinite;
      opacity: 0;
    }
    .ptr-indicator.pulling .ptr-spinner { opacity: 1; animation: none; }
    .ptr-indicator.refreshing .ptr-spinner { opacity: 1; }
    @keyframes ptr-spin {
      to { transform: rotate(360deg); }
    }

    /* ================================================================
       SETTINGS PAGE
       ================================================================ */
    .settings-wrap { max-width: 600px; }
    .settings-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      margin-bottom: 16px;
      overflow: hidden;
    }
    .settings-section-header {
      padding: 16px 20px 12px;
      display: flex; align-items: center; gap: 10px;
    }
    .settings-section-icon {
      width: 32px; height: 32px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
      background: rgba(59,130,246,0.08);
    }
    .settings-section-icon svg { width: 16px; height: 16px; color: var(--blue); }
    .settings-section-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
    .settings-section-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
    .settings-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 20px; border-top: 1px solid var(--border); gap: 12px;
    }
    .settings-row-label { font-size: 13px; font-weight: 500; }
    .settings-row-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
    .settings-toggle {
      position: relative; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer;
    }
    .settings-toggle input { display: none; }
    .settings-toggle-track {
      position: absolute; inset: 0; background: #2a2e3a; border-radius: 12px; transition: background 0.2s ease;
    }
    .settings-toggle-thumb {
      position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
      background: var(--text-muted); border-radius: 50%; transition: all 0.2s ease;
    }
    .settings-toggle input:checked + .settings-toggle-track { background: var(--blue); }
    .settings-toggle input:checked + .settings-toggle-track + .settings-toggle-thumb {
      left: 20px; background: #fff;
    }
    .settings-status {
      display: flex; align-items: center; gap: 6px;
      padding: 10px 20px; border-top: 1px solid var(--border);
      font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
    }
    .settings-status-dot {
      width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    }
    .settings-status-dot.on { background: var(--emerald); }
    .settings-status-dot.off { background: var(--text-faint); }
    .settings-status-dot.blocked { background: var(--red); }
    .settings-footer {
      padding: 10px 20px 14px; font-size: 11px; color: var(--text-faint);
      line-height: 1.4; border-top: 1px solid var(--border);
    }
    .settings-account-btn {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 20px; border-top: 1px solid var(--border); cursor: pointer;
      transition: background 0.15s;
    }
    .settings-account-btn:hover { background: rgba(255,255,255,0.015); }
    .ios-install-banner {
      display: none; margin: 0 20px 14px; padding: 12px 14px;
      background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); border-radius: 8px;
      font-size: 12px; color: var(--text-secondary); line-height: 1.5;
    }
    .ios-install-banner strong { color: var(--amber); font-weight: 600; }
    @media (max-width: 768px) {
      .settings-row { padding: 12px 16px; }
      .settings-section-header { padding: 14px 16px 10px; }
    }

    /* ================================================================
       TOS / PRIVACY ACCEPTANCE GATE
       ================================================================ */
    .tos-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.75);
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      z-index: 10000;
      display: none; align-items: center; justify-content: center;
      padding: 16px;
    }
    .tos-overlay.visible { display: flex; }
    .tos-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
      width: 100%; max-width: 520px; max-height: 90vh;
      display: flex; flex-direction: column; overflow: hidden;
      animation: tosSlideUp 0.3s ease-out;
    }
    @keyframes tosSlideUp {
      from { opacity: 0; transform: translateY(24px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .tos-header { padding: 28px 28px 0; text-align: center; flex-shrink: 0; }
    .tos-logo {
      font-family: var(--font-display); font-size: 16px; font-weight: 800;
      letter-spacing: 0.15em; color: var(--text-primary); margin-bottom: 12px;
    }
    .tos-logo span { color: var(--blue); }
    .tos-title {
      font-family: var(--font-display); font-size: 20px; font-weight: 700;
      color: var(--text-primary); margin-bottom: 6px;
    }
    .tos-subtitle { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }
    .tos-scroll-wrap {
      margin: 0 28px; border: 1px solid var(--border); border-radius: var(--radius);
      overflow: hidden; position: relative; flex: 1; min-height: 0;
    }
    .tos-scroll-inner {
      height: 280px; overflow-y: auto; padding: 20px;
      scrollbar-width: thin; scrollbar-color: var(--border) transparent;
    }
    .tos-scroll-inner::-webkit-scrollbar { width: 5px; }
    .tos-scroll-inner::-webkit-scrollbar-track { background: transparent; }
    .tos-scroll-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    .tos-scroll-wrap::after {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 48px;
      background: linear-gradient(transparent, var(--surface)); pointer-events: none; transition: opacity 0.3s;
    }
    .tos-scroll-wrap.scrolled-bottom::after { opacity: 0; }
    .tos-scroll-prompt {
      position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
      display: flex; align-items: center; gap: 6px;
      font-size: 11px; font-weight: 600; color: var(--blue); letter-spacing: 0.03em;
      z-index: 2; animation: tosBounce 2s infinite; transition: opacity 0.3s;
    }
    .tos-scroll-wrap.scrolled-bottom .tos-scroll-prompt { opacity: 0; pointer-events: none; }
    @keyframes tosBounce {
      0%, 100% { transform: translateX(-50%) translateY(0); }
      50% { transform: translateX(-50%) translateY(-4px); }
    }
    .tos-scroll-prompt svg { width: 14px; height: 14px; }
    .tos-legal h3 {
      font-family: var(--font-display); font-size: 13px; font-weight: 700;
      color: var(--text-primary); margin: 16px 0 8px; letter-spacing: 0.02em;
    }
    .tos-legal h3:first-child { margin-top: 0; }
    .tos-legal p { font-size: 12px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; }
    .tos-legal strong { color: var(--text-primary); font-weight: 600; }
    .tos-legal .nfa-highlight {
      background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
      border-radius: 8px; padding: 14px 16px; margin: 0 0 16px;
    }
    .tos-legal .nfa-highlight p { color: var(--text-primary); font-weight: 500; }
    .tos-legal .nfa-label {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
      color: var(--red); text-transform: uppercase; margin-bottom: 8px;
    }
    .tos-legal a { color: var(--blue); text-decoration: none; }
    .tos-legal a:hover { text-decoration: underline; }
    .tos-legal .section-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
    .tos-footer { padding: 20px 28px 28px; flex-shrink: 0; }
    .tos-checkbox-row {
      display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; cursor: pointer;
    }
    .tos-checkbox-row input[type="checkbox"] {
      appearance: none; -webkit-appearance: none;
      width: 18px; height: 18px; min-width: 18px;
      border: 2px solid var(--border); border-radius: 4px;
      background: var(--surface-2); cursor: pointer;
      position: relative; margin-top: 1px; transition: all 0.15s;
    }
    .tos-checkbox-row input[type="checkbox"]:checked {
      background: var(--blue); border-color: var(--blue);
    }
    .tos-checkbox-row input[type="checkbox"]:checked::after {
      content: ''; position: absolute; left: 5px; top: 2px;
      width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    .tos-checkbox-row input[type="checkbox"]:disabled { opacity: 0.35; cursor: not-allowed; }
    .tos-checkbox-label {
      font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; user-select: none;
    }
    .tos-checkbox-label a { color: var(--blue); text-decoration: none; }
    .tos-checkbox-label a:hover { text-decoration: underline; }
    .tos-accept-btn {
      width: 100%; padding: 13px; border: none; border-radius: var(--radius);
      background: var(--blue); color: #fff;
      font-family: var(--font-display); font-size: 14px; font-weight: 600;
      cursor: pointer; transition: all 0.15s; letter-spacing: 0.01em;
    }
    .tos-accept-btn:hover:not(:disabled) { background: var(--blue-hover); }
    .tos-accept-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .tos-footer-note { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 12px; }
    @media (max-width: 600px) {
      .tos-overlay { padding: 8px; align-items: flex-end; }
      .tos-card { max-width: 100%; max-height: 95vh; border-radius: 16px 16px 0 0; }
      .tos-header { padding: 24px 20px 0; }
      .tos-scroll-wrap { margin: 0 20px; }
      .tos-scroll-inner { height: 240px; padding: 16px; }
      .tos-footer { padding: 16px 20px 24px; }
    }


    /* ================================================================
       INTEL TAB — Sprint 5
       ================================================================ */
    /* Animation */
    @keyframes intel-glow {
      0%, 100% { border-left-color: rgba(var(--glow-rgb), 0.4); }
      50% { border-left-color: rgba(var(--glow-rgb), 1.0); }
    }

    /* Feed container */
    .intel-feed { max-width: 900px; margin: 0 auto; }
    .intel-feed-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
    .intel-feed-header h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text-primary); margin: 0; }
    .intel-event-count { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: rgba(59,130,246,0.12); color: var(--blue); letter-spacing: 0.03em; }

    /* Filter bar */
    .intel-filter-bar { display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .intel-filter-chip { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 0.15s ease; white-space: nowrap; letter-spacing: 0.04em; text-transform: uppercase; }
    .intel-filter-chip:hover { border-color: var(--text-muted); color: var(--text-primary); }
    .intel-filter-chip.active { background: rgba(59,130,246,0.12); border-color: var(--blue); color: var(--blue); }

    /* Section headers */
    .intel-section-header { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin: 28px 0 14px; display: flex; align-items: center; gap: 10px; }
    .intel-section-header .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); animation: pulse 2s infinite; }
    .intel-section-count { font-size: 10px; color: var(--text-faint); font-weight: 500; }

    /* Card base */
    .intel-card-list { display: flex; flex-direction: column; gap: 10px; }
    .intel-card-list.grid-2x2 { display: grid; grid-template-columns: 1fr 1fr; }
    .intel-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; transition: border-color 0.15s ease; position: relative; }
    .intel-card:hover { border-color: var(--text-faint); }

    /* Card variants */
    .intel-card--poi { border-left: 3px solid var(--border); }
    .intel-card--earnings { border-left: 3px solid var(--amber); }
    .intel-card--weekly { border-left: 3px solid var(--purple); }

    /* Fresh glow animation */
    .intel-card-fresh { animation: intel-glow 3s ease-in-out infinite; }
    .intel-card-fresh.bullish { --glow-rgb: 16, 185, 129; border-left-color: rgba(16,185,129,0.7); }
    .intel-card-fresh.bearish { --glow-rgb: 239, 68, 68; border-left-color: rgba(239,68,68,0.7); }
    .intel-card-fresh.neutral { --glow-rgb: 148, 163, 184; border-left-color: rgba(148,163,184,0.7); }

    /* Card top row */
    .intel-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
    .intel-card-left { display: flex; align-items: center; gap: 10px; }
    .intel-ticker { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text-primary); }
    .intel-price { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }

    /* Badges */
    .intel-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 4px; letter-spacing: 0.04em; text-transform: uppercase; overflow: visible; position: relative; }
    .intel-badge.poi-badge { background: rgba(168,85,247,0.22); color: #C084FC; }
    .intel-badge.earnings-badge { background: rgba(245,158,11,0.22); color: #FCD34D; }
    .intel-badge.weekly-badge { background: rgba(168,85,247,0.22); color: #C084FC; }
    .intel-badge.signal-type-macd { background: rgba(168,85,247,0.22); color: #C084FC; }
    .intel-badge.signal-type-cloud { background: rgba(6,182,212,0.22); color: #67E8F9; }
    .intel-badge.signal-type-rsi { background: rgba(59,130,246,0.22); color: #93C5FD; }
    .intel-badge.signal-type-fib { background: rgba(6,182,212,0.22); color: #67E8F9; }
    .intel-badge.signal-type-sma { background: rgba(59,130,246,0.22); color: #93C5FD; }
    .intel-badge.signal-type-confirm { background: rgba(16,185,129,0.22); color: #6EE7B7; }
    .intel-badge.category-spotlight { background: rgba(245,158,11,0.22); color: #FCD34D; }
    .intel-badge.category-promotion { background: rgba(168,85,247,0.22); color: #C084FC; }
    .intel-badge.category-discovery { background: rgba(6,182,212,0.22); color: #67E8F9; }
    .intel-badge.aligned-badge { background: rgba(16,185,129,0.22); color: #6EE7B7; }
    .intel-badge.mixed-badge { background: rgba(245,158,11,0.22); color: #FCD34D; }

    /* Direction */
    .intel-direction { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
    .intel-direction.bullish { color: var(--emerald); }
    .intel-direction.bearish { color: var(--red); }
    .intel-direction.neutral { color: var(--text-muted); }

    /* Weight badge */
    .intel-weight-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; background: rgba(255,255,255,0.05); color: var(--text-secondary); }

    /* Timeframe badge */
    .intel-tf-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 3px; background: rgba(255,255,255,0.04); color: var(--text-muted); letter-spacing: 0.02em; }

    /* Card blurb */
    .intel-blurb { font-family: var(--font-body); font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin: 6px 0; }

    /* Card meta row */
    .intel-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

    /* Time-ago */
    .intel-time-ago { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.03em; margin-left: auto; }
    .intel-time-ago.fresh { color: var(--text-primary); font-weight: 700; opacity: 1; }
    .intel-time-ago.recent { color: var(--text-primary); font-weight: 500; opacity: 1; }
    .intel-time-ago.aging { color: var(--text-secondary); opacity: 0.7; }
    .intel-time-ago.stale { color: var(--text-muted); opacity: 0.5; }

    /* Confluence score display */
    .intel-confluence-score { font-family: var(--font-mono); font-size: 20px; font-weight: 700; line-height: 1; }
    .intel-confluence-score.strong { color: var(--emerald); }
    .intel-confluence-score.moderate { color: var(--amber); }
    .intel-confluence-label { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

    /* Signal list inside card */
    .intel-signal-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
    .intel-signal-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 3px; letter-spacing: 0.02em; }

    /* KPI grid for earnings */
    .intel-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
    .intel-kpi-tile { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); border-radius: 6px; padding: 8px 10px; text-align: center; }
    .intel-kpi-label { font-family: var(--font-mono); font-size: 9px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 3px; }
    .intel-kpi-value { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-primary); }
    .intel-kpi-value.positive { color: var(--emerald); }
    .intel-kpi-value.negative { color: var(--red); }

    /* Picks grid for weekly */
    .intel-picks-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
    .intel-pick-tile { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); border-radius: 6px; padding: 10px; }
    .intel-pick-ticker { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
    .intel-pick-score { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }

    /* Heatmap tiles (confluence overview) */
    .intel-heatmap { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
    .intel-heatmap-tile { font-family: var(--font-mono); font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 4px; background: rgba(255,255,255,0.04); color: var(--text-secondary); }
    .intel-heatmap-tile.hot { background: rgba(16,185,129,0.15); color: var(--emerald); }
    .intel-heatmap-tile.warm { background: rgba(245,158,11,0.12); color: var(--amber); }
    .intel-heatmap-tile.bearish-hot { background: rgba(239,68,68,0.15); color: var(--red); }

    /* View all link */
    .intel-view-all { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--blue); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; transition: color 0.15s; }
    .intel-view-all:hover { color: #60a5fa; }

    /* Card link */
    .intel-card-link { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--blue); cursor: pointer; text-decoration: none; transition: color 0.15s; }
    .intel-card-link:hover { color: #60a5fa; }

    /* Empty state */
    .intel-empty { text-align: center; padding: 32px 20px; }
    .intel-empty-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
    .intel-empty-desc { font-family: var(--font-body); font-size: 12px; color: var(--text-muted); }

    /* Dashboard widget */
    .latest-intel { margin-top: 24px; }
    .latest-intel .intel-card-list { gap: 8px; }
    .latest-intel .intel-card { padding: 12px 14px; }
    .latest-intel .intel-card-top { margin-bottom: 4px; }
    .latest-intel .intel-ticker { font-size: 14px; }
    .latest-intel .intel-blurb { font-size: 11px; margin: 4px 0; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

    /* Mobile responsive */
    @media (max-width: 768px) {
      .intel-feed { padding: 0 4px; }
      .intel-feed-header h2 { font-size: 18px; }
      .intel-filter-bar { gap: 6px; flex-wrap: nowrap; }
      .intel-filter-chip { padding: 5px 12px; font-size: 10px; }
      .intel-card { padding: 12px 14px; }
      .intel-card-list.grid-2x2 { grid-template-columns: 1fr; }
      .intel-kpi-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
      .intel-picks-grid { grid-template-columns: 1fr; gap: 6px; }
      .intel-confluence-score { font-size: 16px; }
      .intel-heatmap { gap: 4px; }
      .latest-intel .intel-card-list.grid-2x2 { grid-template-columns: 1fr; }
    }

    /* ================================================================
       PHASE C — Tiered Alert Cards + Dashboard Confluence Widget
       ================================================================ */

    /* Tier section containers */
    .intel-tier-section { margin-bottom: 28px; }
    .intel-tier-header {
      font-family: var(--font-mono); font-size: 11px; font-weight: 700;
      color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase;
      margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
      padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .intel-tier-header .tier-dot {
      width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    }
    .intel-tier-header .tier-dot.red { background: #EF4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
    .intel-tier-header .tier-dot.amber { background: #F59E0B; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
    .intel-tier-header .tier-dot.blue { background: #3B82F6; box-shadow: 0 0 6px rgba(59,130,246,0.4); }
    .intel-tier-count {
      font-size: 10px; font-weight: 500; color: var(--text-faint);
      margin-left: auto;
    }

    /* ─── Alert Card Base ─────────────────────────────────────────────── */
    .alert-card-tier {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 10px; padding: 16px 18px; position: relative;
      transition: border-color 0.15s ease, transform 0.15s ease;
      border-left: 4px solid var(--border);
    }
    .alert-card-tier:hover {
      border-color: var(--text-faint);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .alert-card-tier + .alert-card-tier { margin-top: 10px; }

    /* Tier 1 — Positional (Red) */
    .alert-card-tier1 { border-left-color: #EF4444; background: linear-gradient(135deg, rgba(239,68,68,0.04), var(--surface)); }
    .alert-card-tier1:hover { border-left-color: #F87171; }
    .alert-card-tier1 .alert-tier-label { color: #EF4444; }

    /* Tier 2 High (Amber) */
    .alert-card-tier2-high { border-left-color: #F59E0B; background: linear-gradient(135deg, rgba(245,158,11,0.03), var(--surface)); }
    .alert-card-tier2-high:hover { border-left-color: #FBBF24; }
    .alert-card-tier2-high .alert-tier-label { color: #F59E0B; }

    /* Tier 2 Standard (Blue) */
    .alert-card-tier2-standard { border-left-color: #3B82F6; }
    .alert-card-tier2-standard:hover { border-left-color: #60A5FA; }
    .alert-card-tier2-standard .alert-tier-label { color: #3B82F6; }

    /* ─── Card Inner Layout ───────────────────────────────────────────── */
    .alert-card-header {
      display: flex; align-items: flex-start; justify-content: space-between;
      margin-bottom: 10px; gap: 12px;
    }
    .alert-card-header-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
    .alert-card-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

    .alert-tier-label {
      font-family: var(--font-mono); font-size: 10px; font-weight: 700;
      letter-spacing: 0.06em; text-transform: uppercase;
    }
    .alert-card-ticker {
      font-family: var(--font-display); font-weight: 700; font-size: 18px;
      color: var(--text-primary); line-height: 1;
    }
    .alert-card-price {
      font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary);
    }
    .alert-card-chg {
      font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    }
    .alert-card-chg.positive { color: var(--emerald); }
    .alert-card-chg.negative { color: var(--red); }

    /* Rating badge */
    .alert-rating-badge {
      font-family: var(--font-mono); font-size: 11px; font-weight: 700;
      padding: 3px 10px; border-radius: 20px; letter-spacing: 0.02em;
      white-space: nowrap; line-height: 1.3;
    }
    .alert-rating-badge.rating-high {
      background: rgba(16,185,129,0.15); color: var(--emerald);
      border: 1px solid rgba(16,185,129,0.25);
    }
    .alert-rating-badge.rating-mid {
      background: rgba(245,158,11,0.12); color: var(--amber);
      border: 1px solid rgba(245,158,11,0.2);
    }
    .alert-rating-badge.rating-low {
      background: rgba(148,163,184,0.1); color: var(--text-secondary);
      border: 1px solid rgba(148,163,184,0.15);
    }

    /* Position info row (Tier 1) */
    .alert-position-info {
      display: flex; flex-wrap: wrap; gap: 8px 16px;
      font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary);
      margin-bottom: 10px; padding: 8px 12px;
      background: rgba(239,68,68,0.04); border-radius: 6px;
      border: 1px solid rgba(239,68,68,0.08);
    }
    .alert-position-info .pos-label { color: var(--text-muted); font-weight: 500; }
    .alert-position-info .pos-value { font-weight: 600; color: var(--text-primary); }
    .alert-position-info .pos-value.positive { color: var(--emerald); }
    .alert-position-info .pos-value.negative { color: var(--red); }

    /* Meta line (rank, score context) */
    .alert-card-meta-line {
      font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
      margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px;
    }
    .alert-card-meta-line .meta-highlight { color: var(--text-secondary); font-weight: 600; }

    /* Blurb */
    .alert-card-blurb {
      font-family: var(--font-body); font-size: 12px; color: var(--text-secondary);
      line-height: 1.55; margin-bottom: 10px;
    }

    /* Signal badges row */
    .alert-signal-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; overflow: visible; }
    .alert-signal-badge {
      font-family: var(--font-mono); font-size: 10px; font-weight: 600;
      padding: 3px 10px; border-radius: 4px; letter-spacing: 0.04em;
      text-transform: uppercase;
      position: relative; overflow: visible;
    }

    /* Targets row */
    .alert-targets-row {
      display: flex; flex-wrap: wrap; gap: 6px 14px;
      font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary);
      margin-bottom: 8px;
    }
    .alert-target-item { display: flex; align-items: center; gap: 4px; }
    .alert-target-label {
      font-weight: 700; font-size: 9px; padding: 1px 5px; border-radius: 3px;
      letter-spacing: 0.04em;
    }
    .alert-target-label.bt { background: rgba(16,185,129,0.12); color: var(--emerald); }
    .alert-target-label.st { background: rgba(245,158,11,0.12); color: var(--amber); }
    .alert-target-dist { font-size: 10px; color: var(--text-muted); }

    /* Context row (Tier 1 bottom) */
    .alert-context-row {
      font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
      line-height: 1.6; padding: 8px 12px; border-radius: 6px;
      background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
      margin-top: 8px;
    }

    /* Card footer with timestamp */
    .alert-card-footer {
      display: flex; align-items: center; justify-content: space-between;
      margin-top: 10px; padding-top: 8px;
      border-top: 1px solid rgba(255,255,255,0.04);
    }

    /* ─── Freshness: Beacon + Sweep Bar System ────────────────────────── */

    /* Fresh (< 1h) — L-shaped glow (top + left border) with pulsing animation */
    .alert-fresh { position: relative; overflow: hidden; }
    .alert-fresh.beacon-red {
      border-left: 4px solid #EF4444; border-top: 2px solid rgba(239,68,68,0.5);
      animation: beacon-red 2.5s ease-in-out infinite;
    }
    .alert-fresh.beacon-amber {
      border-left: 4px solid #F59E0B; border-top: 2px solid rgba(245,158,11,0.5);
      animation: beacon-amber 2.5s ease-in-out infinite;
    }
    .alert-fresh.beacon-blue {
      border-left: 4px solid #3B82F6; border-top: 2px solid rgba(59,130,246,0.5);
      animation: beacon-blue 2.5s ease-in-out infinite;
    }

    @keyframes beacon-red {
      0%, 100% { box-shadow: 0 -2px 20px 4px rgba(239,68,68,0.35), -4px 0 20px 4px rgba(239,68,68,0.25); }
      50% { box-shadow: 0 -2px 8px 1px rgba(239,68,68,0.10), -4px 0 8px 1px rgba(239,68,68,0.06); }
    }
    @keyframes beacon-amber {
      0%, 100% { box-shadow: 0 -2px 20px 4px rgba(245,158,11,0.35), -4px 0 20px 4px rgba(245,158,11,0.25); }
      50% { box-shadow: 0 -2px 8px 1px rgba(245,158,11,0.10), -4px 0 8px 1px rgba(245,158,11,0.06); }
    }
    @keyframes beacon-blue {
      0%, 100% { box-shadow: 0 -2px 20px 4px rgba(59,130,246,0.35), -4px 0 20px 4px rgba(59,130,246,0.25); }
      50% { box-shadow: 0 -2px 8px 1px rgba(59,130,246,0.10), -4px 0 8px 1px rgba(59,130,246,0.06); }
    }

    /* Sweep bar — 2px bar at top of fresh card with sweeping light */
    .live-bar {
      position: absolute; top: 0; left: 0; right: 0; height: 2px;
      border-radius: 10px 10px 0 0; overflow: hidden; z-index: 2;
    }
    .live-bar::after {
      content: ''; position: absolute; top: 0; left: -100%;
      width: 100%; height: 100%;
      animation: live-sweep 3s ease-in-out infinite;
    }
    .live-bar-red::after { background: linear-gradient(90deg, transparent, rgba(239,68,68,0.8), transparent); }
    .live-bar-amber::after { background: linear-gradient(90deg, transparent, rgba(245,158,11,0.8), transparent); }
    .live-bar-blue::after { background: linear-gradient(90deg, transparent, rgba(59,130,246,0.8), transparent); }

    @keyframes live-sweep {
      0% { left: -100%; opacity: 1; }
      50% { left: 100%; opacity: 0.6; }
      100% { left: -100%; opacity: 1; }
    }

    /* Radar dot — green pulsing ring next to timestamp */
    .beacon-dot {
      position: relative; display: inline-flex; align-items: center;
      justify-content: center; flex-shrink: 0; width: 10px; height: 10px;
      margin-right: 12px;
    }
    .beacon-dot .dot-core {
      width: 10px; height: 10px; border-radius: 50%;
      background: #22C55E; box-shadow: 0 0 8px 3px rgba(34,197,94,0.5); z-index: 1;
    }
    .beacon-dot::before {
      content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%;
      border: 2px solid #22C55E; animation: radar-ping 2s ease-out infinite;
    }
    @keyframes radar-ping {
      0% { transform: scale(1); opacity: 0.8; }
      100% { transform: scale(3.2); opacity: 0; }
    }

    /* Recent (1-6h) — static glow + small dot, no animation */
    .alert-recent.beacon-red {
      border-left: 3px solid #EF4444;
      box-shadow: -3px 0 12px 2px rgba(239,68,68,0.15);
    }
    .alert-recent.beacon-amber {
      border-left: 3px solid #F59E0B;
      box-shadow: -3px 0 12px 2px rgba(245,158,11,0.15);
    }
    .alert-recent.beacon-blue {
      border-left: 3px solid #3B82F6;
      box-shadow: -3px 0 12px 2px rgba(59,130,246,0.15);
    }
    .beacon-dot-static {
      display: inline-flex; align-items: center; justify-content: center;
      flex-shrink: 0; margin-right: 8px;
    }
    .beacon-dot-static .dot-core-small {
      width: 7px; height: 7px; border-radius: 50%;
      background: #22C55E; opacity: 0.8;
    }

    /* Moderate (6-24h) — tier color border only, no glow/dot/animation */
    .alert-moderate.beacon-red { border-left: 3px solid #EF4444; }
    .alert-moderate.beacon-amber { border-left: 3px solid #F59E0B; }
    .alert-moderate.beacon-blue { border-left: 3px solid #3B82F6; }

    /* Stale (24h+) — grey border, full readability, NO opacity reduction */
    .alert-stale { border-left: 3px solid #475569 !important; }
    .alert-stale.beacon-red,
    .alert-stale.beacon-amber,
    .alert-stale.beacon-blue { border-left-color: #475569 !important; box-shadow: none; animation: none; }

    /* Respect prefers-reduced-motion */
    @media (prefers-reduced-motion: reduce) {
      .alert-fresh, .live-bar::after, .beacon-dot::before { animation: none !important; }
      .alert-fresh.beacon-red,
      .alert-fresh.beacon-amber,
      .alert-fresh.beacon-blue { animation: none !important; }
    }

    /* ─── Clickable Tickers ────────────────────────────────────────────── */
    .clickable-ticker {
      cursor: pointer; transition: color 0.15s ease, text-decoration 0.15s ease;
    }
    .clickable-ticker:hover {
      color: var(--blue) !important;
      text-decoration: underline;
      text-decoration-color: rgba(59,130,246,0.5);
      text-underline-offset: 2px;
    }

    /* ─── Confluence Rating Display ────────────────────────────────────── */
    .confluence-rating-display {
      display: flex; align-items: baseline; gap: 8px;
      font-family: var(--font-mono); margin-bottom: 8px;
    }
    .confluence-rating-primary {
      font-size: 15px; font-weight: 700; color: var(--text-primary);
    }
    .confluence-rating-label {
      font-size: 11px; font-weight: 500; color: var(--text-secondary);
    }
    .confluence-rating-raw {
      font-size: 10px; color: var(--text-muted);
    }

    /* ─── Jargon Tooltips (CSS-only) ───────────────────────────────────── */
    .jargon-tooltip {
      position: relative; cursor: help;
      border-bottom: 1px dotted rgba(255,255,255,0.25);
    }
    /* Tooltip popup */
    .jargon-tooltip::after {
      content: attr(data-tooltip);
      position: absolute; bottom: calc(100% + 10px); left: 50%;
      transform: translateX(-50%);
      background: #0F172A; color: #F1F5F9;
      font-family: var(--font-body); font-size: 12px; font-weight: 400;
      line-height: 1.5; text-transform: none; letter-spacing: 0;
      padding: 8px 12px; border-radius: 8px;
      white-space: normal; max-width: 300px; min-width: 180px;
      border: 1px solid rgba(148,163,184,0.25);
      box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
      pointer-events: none; opacity: 0; z-index: 200;
      transition: opacity 0.15s ease;
    }
    /* Tooltip arrow */
    .jargon-tooltip::before {
      content: '';
      position: absolute; bottom: calc(100% + 4px); left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: #0F172A;
      pointer-events: none; opacity: 0; z-index: 200;
      transition: opacity 0.15s ease;
    }
    .jargon-tooltip:hover::after,
    .jargon-tooltip:hover::before { opacity: 1; }

    /* ─── Desktop Font Sizing — Intel Tab ──────────────────────────────── */
    @media (min-width: 769px) {
      .alert-card-ticker { font-size: 16px; }
      .alert-card-blurb { font-size: 14px; }
      .alert-card-price { font-size: 14px; }
      .alert-card-chg { font-size: 12px; }
      .alert-signal-badge, .intel-badge {
        font-size: 12px; padding: 3px 10px;
      }
      .alert-card-meta-line { font-size: 12px; }
      .alert-tier-label { font-size: 11px; }
      .alert-context-row { font-size: 11px; }
    }

    /* ─── Dashboard Confluence Alerts Widget ──────────────────────────── */
    .confluence-widget { margin-top: 24px; margin-bottom: 8px; }
    .confluence-widget-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 14px;
    }
    .confluence-widget-title {
      display: flex; align-items: center; gap: 10px;
    }
    .confluence-widget-title .section-title { margin: 0; }
    .confluence-widget-title .live-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: var(--emerald); animation: pulse 2s infinite;
    }
    .confluence-widget-count {
      font-family: var(--font-mono); font-size: 11px; font-weight: 600;
      padding: 3px 10px; border-radius: 20px;
      background: rgba(59,130,246,0.12); color: var(--blue);
    }
    .confluence-widget-controls {
      display: flex; align-items: center; gap: 8px;
    }
    .confluence-layout-toggle {
      background: none; border: 1px solid var(--border); border-radius: 5px;
      padding: 4px 8px; cursor: pointer; color: var(--text-muted);
      font-size: 12px; transition: all 0.15s;
    }
    .confluence-layout-toggle:hover { border-color: var(--text-faint); color: var(--text-secondary); }
    .confluence-layout-toggle.active { border-color: var(--blue); color: var(--blue); background: rgba(59,130,246,0.08); }

    /* Grid layout (2x2) */
    .confluence-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    }
    .confluence-grid.list-view {
      grid-template-columns: 1fr; gap: 8px;
    }

    /* Compact alert card for dashboard */
    .confluence-compact-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 8px; padding: 12px 14px;
      cursor: pointer; transition: all 0.15s ease;
      display: flex; flex-direction: column; gap: 8px;
      border-left: 3px solid var(--border);
    }
    .confluence-compact-card:hover {
      border-color: var(--text-faint);
      transform: translateY(-1px);
      box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    }
    .confluence-compact-card.tier-1 { border-left-color: #EF4444; }
    .confluence-compact-card.tier-2-high { border-left-color: #F59E0B; }
    .confluence-compact-card.tier-2-standard { border-left-color: #3B82F6; }

    .compact-card-top {
      display: flex; align-items: center; justify-content: space-between;
    }
    .compact-card-left { display: flex; align-items: center; gap: 8px; }
    .compact-card-ticker {
      font-family: var(--font-display); font-weight: 700; font-size: 15px;
      color: var(--text-primary);
    }
    .compact-card-price {
      font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary);
    }
    .compact-card-dir {
      font-family: var(--font-mono); font-size: 11px; font-weight: 700;
    }
    .compact-card-dir.bullish { color: var(--emerald); }
    .compact-card-dir.bearish { color: var(--red); }
    .compact-card-dir.mixed { color: var(--amber); }
    .compact-card-right { display: flex; align-items: center; gap: 6px; }
    .compact-card-tier-dot {
      width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    }

    .compact-card-bottom {
      display: flex; align-items: center; justify-content: space-between;
    }
    .compact-card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
    .compact-card-badge {
      font-family: var(--font-mono); font-size: 8px; font-weight: 600;
      padding: 2px 6px; border-radius: 3px; letter-spacing: 0.03em;
      text-transform: uppercase;
    }
    .compact-card-time {
      font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
      white-space: nowrap;
    }

    .confluence-view-all {
      font-family: var(--font-mono); font-size: 11px; font-weight: 600;
      color: var(--blue); cursor: pointer; display: inline-flex;
      align-items: center; gap: 4px; margin-top: 12px; transition: color 0.15s;
    }
    .confluence-view-all:hover { color: #60a5fa; }

    /* ─── Mobile overrides ────────────────────────────────────────────── */
    @media (max-width: 768px) {
      .confluence-grid { grid-template-columns: 1fr; }
      .alert-card-tier { padding: 12px 14px; }
      .alert-card-ticker { font-size: 16px; }
      .alert-position-info { flex-direction: column; gap: 4px; }
      .alert-targets-row { flex-direction: column; gap: 4px; }
    }

