
  :root {
    --bg: #090a0e;
    --bg-elev: #11131b;
    --bg-card: rgba(16, 18, 26, 0.93);
    --bg-inset: #0b0d13;
    --border: rgba(255, 255, 255, 0.095);
    --border-strong: rgba(255, 255, 255, 0.19);
    --text: #f4f1ea;
    --text-dim: #b4b2c0;
    --text-faint: #787688;
    --tru: #ef4444;
    --coral: #f0564b;
    --ice: #58a6ff;
    --emerald: #10b981;
    --gold: #fbbf24;
    --cyan: #22d3ee;
    --purple: #a855f7;
    --mono: ui-monospace, 'JetBrains Mono', 'Fira Code', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --sans: 'Chakra Petch', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 14px;
  }

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

  body {
    font-family: var(--sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  /* Accessible keyboard focus indicators */
  .tab-btn:focus-visible, .btn-chip:focus-visible, .action-btn:focus-visible,
  .mode-card:focus-visible, .fw-btn:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
    outline: 2px solid var(--ice);
    outline-offset: 2px;
  }

  .backdrop {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
      radial-gradient(ellipse 65% 45% at 12% -5%, rgba(239, 68, 68, 0.14), transparent 65%),
      radial-gradient(ellipse 55% 40% at 88% 8%, rgba(88, 166, 255, 0.09), transparent 60%),
      radial-gradient(ellipse 60% 45% at 50% 105%, rgba(16, 185, 129, 0.06), transparent 65%),
      linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  }

  .app {
    position: relative; z-index: 1; max-width: 1440px; margin: 0 auto;
    padding: 18px 22px 44px; transition: max-width 0.25s ease;
  }
  .app.full-width { max-width: 100%; padding: 18px 28px 44px; }

  /* Top Brand Header + Dedicated Full-Width Page Tabs */
  .site-header { margin-bottom: 20px; }
  .topbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 14px; padding: 8px 4px 14px;
  }

  .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .emblem { width: 38px; height: 38px; flex-shrink: 0; filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.45)); }
  .brand-title { font-size: 18px; font-weight: 700; letter-spacing: 0.04em; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .brand-title span.accent { color: var(--tru); }
  .brand-sub { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 2px; }

  .pill {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
    font-family: var(--mono); font-size: 10.5px; background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap;
  }
  .pill.live { background: rgba(16, 185, 129, 0.13); border-color: rgba(16, 185, 129, 0.34); color: #34d399; }
  .pill.tru { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.38); color: #fca5a5; }
  .pill.ice { background: rgba(88, 166, 255, 0.12); border-color: rgba(88, 166, 255, 0.34); color: #93c5fd; }

  /* Unmistakable full-width page-level tab bar */
  .nav {
    display: flex; align-items: stretch; gap: 4px; width: 100%;
    border-bottom: 1px solid var(--border-strong);
    background: rgba(14, 16, 23, 0.78);
    border-radius: 12px 12px 0 0;
    padding: 6px 8px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .tab-btn {
    appearance: none; border: none; border-bottom: 3px solid transparent;
    background: transparent; color: var(--text-dim);
    font-family: var(--sans); font-size: 13.5px; font-weight: 600;
    padding: 10px 14px 11px; border-radius: 8px 8px 0 0;
    cursor: pointer; transition: color 0.16s, background 0.16s, border-color 0.16s;
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  }
  .tab-btn .num {
    font-family: var(--mono); font-size: 10.5px; font-weight: 700;
    padding: 1px 6px; border-radius: 5px;
    background: rgba(255,255,255,0.06); color: var(--text-faint);
  }
  .tab-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.045); }
  .tab-btn:hover .num { color: var(--text-dim); }
  .tab-btn.active {
    color: #fff;
    background: rgba(239, 68, 68, 0.11);
    border-bottom-color: var(--tru);
  }
  .tab-btn.active .num {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
  }

  .fw-btn {
    appearance: none; border: 1px solid var(--border-strong); background: rgba(255,255,255,0.045);
    color: var(--text); padding: 8px 12px; border-radius: 9px; cursor: pointer;
    font-family: var(--mono); font-size: 11px; font-weight: 600; transition: all 0.15s;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  }
  .fw-btn:hover, .fw-btn.active { color: #fff; border-color: rgba(88,166,255,0.55); background: rgba(88,166,255,0.16); }

  /* Editorial Hero Primer */
  .hero-banner {
    position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    background: linear-gradient(135deg, rgba(22, 24, 34, 0.94), rgba(12, 13, 19, 0.97));
    padding: 22px 26px; margin-bottom: 18px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: center;
  }
  .hero-art-bg { position: absolute; right: -20px; top: -15px; width: 480px; height: 290px; opacity: 0.4; pointer-events: none; }
  .hero-kicker { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--coral); margin-bottom: 8px; display: inline-flex; align-items: center; gap: 8px; }
  .hero-banner h1 { font-size: 26px; line-height: 1.2; font-weight: 700; color: #fff; letter-spacing: -0.015em; margin-bottom: 9px; }
  .hero-banner h1 em { font-style: normal; background: linear-gradient(90deg, #ff6b6b, #58a6ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
  .hero-lead { font-size: 13.5px; color: var(--text-dim); max-width: 660px; line-height: 1.6; }
  .primer-cards { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .primer-card { background: rgba(10, 12, 18, 0.84); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; }
  .primer-card h3 { font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
  .primer-card p { font-size: 12px; color: var(--text-dim); line-height: 1.48; }
  .bullet-list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 4px; }
  .bullet-list li { position: relative; padding-left: 13px; font-size: 12px; color: var(--text-dim); line-height: 1.44; }
  .bullet-list li::before { content: "•"; position: absolute; left: 0; color: var(--coral); font-weight: 700; }
  .bullet-list li b { color: var(--text); }
  .server-cta {
    margin-top: 12px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 7px 10px 7px 12px; border-radius: 10px;
    background: rgba(10, 12, 18, 0.88); border: 1px solid rgba(56, 189, 248, 0.28);
    font-size: 12px; color: var(--text-dim);
  }
  .server-cta .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.75); flex-shrink: 0; }
  .server-cta code {
    font-family: var(--mono); font-size: 12px; font-weight: 700; color: #fff;
    background: rgba(255,255,255,0.06); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border);
    user-select: all;
  }
  .copy-ip-btn {
    appearance: none; cursor: pointer; font-family: var(--mono); font-size: 11px; font-weight: 600;
    padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.14); color: #bae6fd; transition: all 0.15s;
  }
  .copy-ip-btn:hover { background: rgba(56, 189, 248, 0.24); color: #fff; }
  .copy-ip-btn.copied { border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
  .join-link {
    font-family: var(--mono); font-size: 11px; font-weight: 600; color: #fca5a5; text-decoration: none;
    padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.12);
    transition: all 0.15s;
  }
  .join-link:hover { background: rgba(239, 68, 68, 0.22); color: #fff; }

  /* Big punchy headline phrases at top of Tab 2 */
  .tru-hero-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
  }
  .tru-phrase {
    background: linear-gradient(145deg, rgba(22, 25, 36, 0.94), rgba(12, 14, 20, 0.96));
    border: 1px solid var(--border);
    border-top: 2px solid var(--p-accent, var(--tru));
    border-radius: 12px;
    padding: 15px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }
  .tru-phrase-big {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
  }
  .tru-phrase-top {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  }
  .tru-ico-badge {
    width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--p-accent, #ef4444) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--p-accent, #ef4444) 36%, transparent);
    color: var(--p-accent, #ef4444);
  }
  .ico { width: 14px; height: 14px; flex-shrink: 0; vertical-align: -2px; }
  .ico-sm { width: 12px; height: 12px; flex-shrink: 0; vertical-align: -1.5px; }
  .card-title .ico { width: 16px; height: 16px; color: var(--coral); opacity: 0.92; }
  .tab-btn .ico { width: 15px; height: 15px; opacity: 0.72; }
  .tab-btn.active .ico { opacity: 1; color: #fca5a5; }
  .primer-card h3 { display: flex; align-items: center; gap: 6px; }
  .slider-head > span { display: inline-flex; align-items: center; gap: 6px; }
  .mode-title-left { display: inline-flex; align-items: center; gap: 7px; }
  .pillar-tag { display: inline-flex; align-items: center; gap: 5px; }
  .tru-phrase-sub {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
  }
  .tru-phrase-sub b { color: #34d399; }

  .panel { display: none; animation: fadeIn 0.24s ease; }
  .panel.active { display: block; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @media (prefers-reduced-motion: reduce) { .panel { animation: none; } }

  /* Cards & Grids */
  .card {
    background: var(--bg-card); border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 8px 28px rgba(0,0,0,0.32);
    border-radius: var(--radius); padding: 20px; position: relative; display: flex; flex-direction: column;
  }
  .card-head { margin-bottom: 12px; }
  .card-title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
  .card-title { font-size: 16px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
  .card-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; line-height: 1.45; }

  /* Unified Top Interactive Control Strip */
  .ctrl-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px;
    margin-bottom: 14px; background: rgba(8, 10, 15, 0.82); border: 1px solid var(--border); border-radius: 10px;
  }
  .ctrl-strip-label { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-faint); margin-right: 4px; user-select: none; }
  .ctrl-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
  .ctrl-divider { width: 1px; height: 18px; background: var(--border-strong); margin: 0 4px; }

  .btn-chip {
    appearance: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 7px;
    font-family: var(--mono); font-size: 11px; font-weight: 600; background: #171a24;
    border: 1px solid rgba(255, 255, 255, 0.13); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    color: var(--text-dim); cursor: pointer; transition: all 0.14s ease;
  }
  .btn-chip:hover { color: #fff; background: #212534; border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
  .btn-chip.active {
    color: #fff; background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(153, 27, 27, 0.22));
    border-color: rgba(239, 68, 68, 0.68); box-shadow: 0 0 14px rgba(239, 68, 68, 0.22), inset 0 1px 0 rgba(255,255,255,0.14);
  }
  .btn-chip i.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

  .viz-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: stretch; }
  .art-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: stretch; }
  .sim-left, .viz-grid > *, .art-grid > *, .sim-layout > *, .card, .scroll-x { min-width: 0; }

  /* Scroll wrapper for ultra-wide tables & multi-column SVGs on narrow mobile screens */
  .scroll-x { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .min-w-wide { min-width: 720px; }
  .mobile-scroll-hint { display: none; font-family: var(--mono); font-size: 10px; color: var(--ice); margin-bottom: 6px; text-align: right; }
  @media (max-width: 740px) { .mobile-scroll-hint { display: block; } }

  /* KPI Strip */
  .kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
  .kpi {
    position: relative; padding: 17px 19px; background: var(--bg-card); border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); border-radius: var(--radius); overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
  }
  .kpi:hover { transform: translateY(-2px); border-color: var(--border-strong); }
  .kpi.hero { border-color: rgba(239, 68, 68, 0.45); background: linear-gradient(155deg, rgba(185, 28, 28, 0.2), rgba(16, 18, 26, 0.94) 65%); box-shadow: 0 8px 32px rgba(239, 68, 68, 0.14); }
  .kpi::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent-line, var(--tru)), transparent); opacity: 0.85; }
  .kpi-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); display: flex; justify-content: space-between; align-items: center; }
  .kpi-val { font-family: var(--mono); font-size: 31px; font-weight: 700; color: #fff; margin: 6px 0 4px; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 6px; }
  .kpi-val small { font-size: 14px; color: var(--text-dim); font-weight: 500; }
  .kpi-delta { font-size: 12px; color: var(--text-dim); }
  .kpi-delta b { color: #34d399; font-weight: 600; }
  .kpi-delta .muted { color: var(--text-faint); }

  /* Filter Bar */
  .controls-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }
  .filter-group, .weight-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  select.ctrl-select, input.ctrl-num { background: #171a24; color: var(--text); border: 1px solid var(--border-strong); border-radius: 7px; padding: 6px 10px; font-family: var(--mono); font-size: 11.5px; cursor: pointer; }
  select.ctrl-select:hover, input.ctrl-num:hover { border-color: rgba(255,255,255,0.3); }
  input.ctrl-num { width: 52px; text-align: center; cursor: text; }
  .weight-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-dim); background: rgba(255,255,255,0.035); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border); }

  /* Table */
  .table-wrap { overflow-x: auto; }
  table.lb { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .lb th { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); text-align: left; padding: 8px 12px 10px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
  .lb th small { display: block; font-size: 9.5px; color: var(--text-faint); text-transform: none; margin-top: 2px; }
  .lb td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); white-space: nowrap; vertical-align: middle; }
  .lb tbody tr { transition: background 0.15s; cursor: pointer; }
  .lb tbody tr:hover, .lb tbody tr.highlighted { background: rgba(255, 255, 255, 0.05); }
  .lb tbody tr.rank-1 { background: linear-gradient(90deg, rgba(239, 68, 68, 0.13), rgba(16, 185, 129, 0.05) 55%, transparent); }
  .nc-cell { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; color: #fff; }
  .nc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
  .score-badge { font-family: var(--mono); font-size: 15px; font-weight: 700; color: #fff; }
  .rank-num { font-family: var(--mono); font-size: 13px; color: var(--text-dim); text-align: center; width: 34px; }
  .met-cell { min-width: 138px; }
  .met-cell.win { background: rgba(16, 185, 129, 0.1); box-shadow: inset 3px 0 0 var(--emerald); }
  .met-cell.tie { background: rgba(16, 185, 129, 0.045); }
  .met-val { font-family: var(--mono); font-size: 13.5px; font-weight: 700; color: #fff; }
  .met-place { font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); margin-right: 5px; }
  .met-cell.win .met-place { color: #34d399; font-weight: 700; }
  .met-cell.tie .met-place { color: #6ee7b7; }
  .met-ci { display: block; font-family: var(--mono); font-size: 10px; color: var(--text-faint); margin-top: 2px; }
  .met-from { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--cyan); }
  .info-val { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
  .info-val.best { color: #34d399; font-weight: 700; }

  .nc-detail-box { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
  .nc-detail-box h4 { font-size: 14px; color: #fff; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
  .nc-detail-box p { font-size: 12.5px; color: var(--text-dim); max-width: 820px; }

  .footnote { margin-top: 12px; font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
  .footnote b { color: var(--text-dim); }

  /* Scenario Cards (fit 5 across on 1440px+, never overflow narrow phones) */
  .scen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
  .scen-card { background: rgba(11, 13, 19, 0.92); border: 1px solid var(--border); border-radius: 10px; padding: 14px 15px; }
  .scen-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 5px; margin-bottom: 10px; min-height: 24px; align-items: center; }
  .chip { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,0.06); color: var(--text-dim); border: 1px solid rgba(255,255,255,0.07); white-space: nowrap; }
  .chip.hi { background: rgba(239, 68, 68, 0.14); color: #fca5a5; border-color: rgba(239,68,68,0.3); }

  /* Simulators & Balanced Equal-Height Layouts */
  .sim-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
  .sim-left { display: flex; flex-direction: column; min-width: 0; }
  .canvas-frame {
    position: relative; background: var(--bg-inset); border: 1px solid var(--border-strong);
    border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 50px rgba(0,0,0,0.6);
    max-width: 100%; flex: 1; display: flex; flex-direction: column; justify-content: space-between;
  }
  .canvas-frame canvas { display: block; width: 100%; height: auto; margin: auto 0; }
  .canvas-legend {
    display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 9px 14px;
    background: rgba(14, 16, 23, 0.94); border-top: 1px solid var(--border);
    font-family: var(--mono); font-size: 10.5px; color: var(--text-dim);
  }
  .canvas-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .canvas-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

  .action-btn {
    appearance: none; border: 1px solid rgba(239, 68, 68, 0.58);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.34), rgba(185, 28, 28, 0.24));
    color: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 700; padding: 6px 13px;
    border-radius: 8px; cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
  }
  .action-btn:hover { background: rgba(239, 68, 68, 0.5); transform: translateY(-1px); }
  .action-btn.sec { border-color: var(--border-strong); background: #191c27; color: var(--text); font-weight: 600; }
  .action-btn.sec:hover { background: #232736; color: #fff; }

  .mode-cards { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
  .mode-card {
    text-align: left; padding: 12px 15px; border-radius: 11px; background: rgba(20, 23, 33, 0.82);
    border: 1px solid var(--border); cursor: pointer; transition: all 0.16s;
  }
  .mode-card:hover { background: rgba(28, 32, 46, 0.92); border-color: var(--border-strong); transform: translateX(2px); }
  .mode-card.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.17), rgba(18, 20, 29, 0.96));
    border-color: rgba(239, 68, 68, 0.62); box-shadow: inset 3px 0 0 var(--tru), 0 4px 20px rgba(239, 68, 68, 0.14);
  }
  .mode-card-title { font-size: 13.5px; font-weight: 700; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
  .mode-card-desc { font-size: 12px; color: var(--text-dim); line-height: 1.48; }

  .slider-box { background: rgba(15, 17, 25, 0.9); border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
  .slider-box-title { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
  .slider-row { display: flex; flex-direction: column; gap: 5px; }
  .slider-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); }
  .slider-head b { font-family: var(--mono); color: #fff; background: rgba(255,255,255,0.06); padding: 1px 7px; border-radius: 5px; font-size: 11px; }
  input[type="range"] { width: 100%; accent-color: var(--tru); cursor: pointer; height: 5px; }

  .pillar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
  .pillar { background: var(--bg-card); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); border-radius: var(--radius); padding: 17px 19px; }
  .pillar-tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 5px; display: inline-block; margin-bottom: 8px; }
  .pillar h3 { font-size: 15px; color: #fff; margin-bottom: 6px; }
  .pillar p { font-size: 12.5px; color: var(--text-dim); line-height: 1.56; }

  details.tech-notes { margin-top: 14px; background: rgba(12, 14, 20, 0.85); border: 1px solid var(--border); border-radius: 10px; padding: 11px 15px; font-size: 12px; color: var(--text-dim); }
  details.tech-notes summary { cursor: pointer; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ice); user-select: none; }
  details.tech-notes p { margin-top: 8px; line-height: 1.55; }
  details.tech-notes code { font-family: var(--mono); font-size: 11px; background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; color: #fca5a5; }

  .tel-bar { display: flex; height: 22px; border-radius: 8px; overflow: hidden; background: #141720; border: 1px solid var(--border); margin: 10px 0 8px; }
  .tel-seg { height: 100%; transition: width 0.4s ease; }
  .tel-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
  .tel-legend span { display: inline-flex; align-items: center; gap: 5px; }
  .tel-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

  .mini-kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
  .mini-kpi { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
  .mini-kpi span { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
  .mini-kpi b { font-family: var(--mono); font-size: 16px; color: #34d399; }

  .stat-strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

  .tooltip {
    position: fixed; pointer-events: none; z-index: 99; background: rgba(11, 13, 19, 0.97);
    border: 1px solid var(--border-strong); border-radius: 9px; padding: 10px 13px; font-size: 12px;
    color: var(--text); box-shadow: 0 12px 32px rgba(0,0,0,0.7); opacity: 0; transition: opacity 0.12s; max-width: 300px;
  }
  .tooltip.show { opacity: 1; }
  .tooltip .tt-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
  .tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
  .tooltip .tt-row b { color: #fff; }

  @media (max-width: 1100px) {
    .hero-banner, .viz-grid, .art-grid, .sim-layout, .pillar-grid { grid-template-columns: minmax(0, 1fr); }
    .kpi-grid, .tru-hero-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 640px) {
    .kpi-grid, .primer-cards, .tru-hero-strip { grid-template-columns: minmax(0, 1fr); }
    .app { padding: 10px 12px 24px; }
    .nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
    .hero-banner { padding: 16px; }
    .hero-banner h1 { font-size: 21px; }
  }
  .scatter-mobile-legend { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 10px; color: var(--text-dim); }
  .scatter-mobile-legend span { display: inline-flex; align-items: center; gap: 5px; line-height: 1.25; }
  .scatter-mobile-legend b { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 9.5px; color: #090a0e; flex-shrink: 0; }
  @media (max-width: 640px) { .scatter-mobile-legend { display: grid; } }
