  :root, html[data-theme="fedex"] {
    --fx-purple: #4D148C;
    --fx-purple-deep: #2E0854;
    --fx-orange: #FF6600;
    --fx-orange-soft: #FFA24D;
    --bg: #F5F4F7;
    --surface: #FFFFFF;
    --surface-2: #FAF8FC;
    --ink: #1A0433;
    --ink-2: #3B2E52;
    --muted: #6E6683;
    --line: #E6E1EC;
    --line-2: #D6CFE0;
    --pos: #128A3F;
    --neg: #C23A2B;
    --accent: var(--fx-purple);
    --accent-2: var(--fx-orange);
    --chip-bg: #F6F3FA;
  }
  html[data-theme="light"] {
    --fx-purple: #2D2D2D;
    --fx-purple-deep: #111;
    --fx-orange: #1E6FD9;
    --fx-orange-soft: #8BB5ED;
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --surface-2: #F5F5F5;
    --ink: #0A0A0A;
    --ink-2: #333;
    --muted: #777;
    --line: #EAEAEA;
    --line-2: #D4D4D4;
    --pos: #0B8F42;
    --neg: #D13B2E;
    --accent: #2D2D2D;
    --accent-2: #1E6FD9;
    --chip-bg: #F5F5F5;
  }
  html[data-theme="dark"] {
    --fx-purple: #B589E8;
    --fx-purple-deep: #8D5FC7;
    --fx-orange: #FF8533;
    --fx-orange-soft: #FFB080;
    --bg: #0D0B14;
    --surface: #15121E;
    --surface-2: #1D1828;
    --ink: #F2EEF7;
    --ink-2: #CFC5DE;
    --muted: #8A82A0;
    --line: #2A2438;
    --line-2: #3A3250;
    --pos: #4ADE80;
    --neg: #FB7676;
    --accent: #B589E8;
    --accent-2: #FF8533;
    --chip-bg: #201A2D;
  }

  * { box-sizing: border-box; }
  html, body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
  }
  .app { max-width: 1480px; margin: 0 auto; padding: 0 28px 64px; }

  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0 16px; border-bottom: 1px solid var(--line);
    gap: 16px; flex-wrap: wrap;
  }
  .brand { display: flex; align-items: center; gap: 14px; }
  .brand-mark {
    font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
    line-height: 1; display: flex; align-items: baseline;
  }
  .brand-mark .fed { color: var(--accent); }
  .brand-mark .ex { color: var(--accent-2); }
  .brand-divider { width: 1px; height: 26px; background: var(--line-2); }
  .brand-title {
    font-weight: 700; font-size: 16px;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.02em;
  }
  .brand-title .codename {
    color: var(--accent-2);
    font-weight: 700;
    letter-spacing: 0.06em;
  }
  .brand-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

  .pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 11px; border: 1px solid var(--line-2);
    border-radius: 999px; background: var(--surface);
    font-size: 12px; color: var(--ink-2); cursor: pointer;
    transition: all .15s ease; font-family: inherit;
  }
  .pill:hover { border-color: var(--accent); color: var(--accent); }
  .pill.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  html[data-theme="dark"] .pill.primary { color: #0D0B14; }
  .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px rgba(18,138,63,0.15); }

  .seg {
    display: inline-flex; background: var(--surface);
    border: 1px solid var(--line-2); border-radius: 8px; padding: 3px;
  }
  .seg button {
    border: 0; background: transparent; padding: 5px 10px;
    font-size: 12px; color: var(--ink-2); border-radius: 6px;
    cursor: pointer; font-family: inherit;
  }
  .seg button.active { background: var(--accent); color: #fff; }
  html[data-theme="dark"] .seg button.active { color: #0D0B14; }

  .theme-seg button {
    padding: 4px 9px; font-size: 11px; letter-spacing: 0.02em;
  }
  .theme-seg button .sw {
    display: inline-block; width: 9px; height: 9px;
    border-radius: 2px; margin-right: 6px; vertical-align: -1px;
    border: 1px solid rgba(0,0,0,0.1);
  }

  .tabs {
    display: flex; gap: 4px; padding: 14px 0 0;
    border-bottom: 1px solid var(--line); flex-wrap: wrap;
  }
  .tab {
    background: transparent; border: 0;
    padding: 10px 18px 12px; font-family: inherit;
    font-size: 13px; font-weight: 500; color: var(--muted);
    cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px;
    transition: color .15s ease;
  }
  .tab:hover { color: var(--ink); }
  .tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
  .tab .idx {
    font-family: 'IBM Plex Mono', monospace; font-size: 10px;
    color: var(--muted); letter-spacing: 0.05em;
  }
  .tab.active .idx { color: var(--accent-2); }

  .page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 26px 0 22px; gap: 24px;
  }
  h1 {
    font-size: 32px; font-weight: 700; margin: 0 0 6px;
    letter-spacing: -0.025em; font-family: 'Space Grotesk', sans-serif;
  }
  .page-head .sub { font-size: 14px; color: var(--muted); max-width: 680px; }
  .page-head .meta { text-align: right; font-size: 12px; color: var(--muted); }
  .page-head .meta strong { display: block; font-size: 13px; color: var(--ink); font-weight: 500; }

  .section { margin: 26px 0 0; }
  .section-head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px; padding-top: 8px;
  }
  .section-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; color: var(--accent-2);
    letter-spacing: 0.06em; font-weight: 600;
  }
  .section-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
  .section-rule { flex: 1; height: 1px; background: var(--line); }
  .section-total { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); }
  .section-total b { color: var(--ink); font-weight: 500; }

  .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

  .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 16px 14px;
    position: relative;
    transition: all .18s ease;
    overflow: hidden;
  }
  .card:hover {
    border-color: var(--line-2);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }
  .card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: var(--accent); opacity: 0.9;
  }
  .card.accent-orange::before { background: var(--accent-2); }
  .card.accent-deep::before { background: var(--fx-purple-deep); }

  .card.mock {
    background: repeating-linear-gradient(
      45deg,
      var(--surface),
      var(--surface) 10px,
      var(--surface-2) 10px,
      var(--surface-2) 20px
    );
    border: 1px dashed var(--line-2);
    opacity: 0.88;
  }
  .card.mock::before { opacity: 0.3; }
  .card.mock .card-value .num { color: var(--muted); }
  .card.mock .mock-ribbon {
    position: absolute;
    top: 10px; right: -30px;
    transform: rotate(35deg);
    background: var(--muted);
    color: var(--surface);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    padding: 2px 36px;
    letter-spacing: 0.1em;
    font-weight: 600;
    opacity: 0.9;
  }

  .card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 8px; margin-bottom: 12px; min-height: 34px;
  }
  .card-label { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.3; }
  .card-source {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; color: var(--muted);
    padding: 2px 6px; background: var(--chip-bg);
    border-radius: 4px; white-space: nowrap;
    border: 1px solid var(--line);
  }
  .card-value { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
  .card-value .num {
    font-size: 26px; font-weight: 600; color: var(--ink);
    letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  }
  .card-value .unit { font-size: 12px; color: var(--muted); font-weight: 500; }

  .card-delta { display: flex; align-items: center; gap: 6px; font-size: 12px; }
  .delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 500; font-variant-numeric: tabular-nums; }
  .delta.up { color: var(--pos); }
  .delta.down { color: var(--neg); }
  .delta.flat { color: var(--muted); }
  .delta svg { width: 10px; height: 10px; }
  .card-delta .period { color: var(--muted); font-size: 11px; }

  .overview .card { min-height: 118px; }
  .overview .card-value .num { font-size: 28px; }

  .hero {
    background: linear-gradient(135deg, var(--accent) 0%, var(--fx-purple-deep) 100%);
    border-radius: 12px; padding: 22px 26px; color: #fff;
    display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr;
    gap: 24px; align-items: center;
    position: relative; overflow: hidden;
  }
  html[data-theme="dark"] .hero { color: #0D0B14; }
  .hero::after {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
  }
  .hero-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 6px; }
  .hero-headline { font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
  .hero-headline b { color: var(--fx-orange-soft); font-weight: 700; }
  .hero-stat { border-left: 1px solid rgba(255,255,255,0.18); padding-left: 20px; }
  html[data-theme="dark"] .hero-stat { border-left-color: rgba(0,0,0,0.18); }
  .hero-stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; margin-bottom: 6px; }
  .hero-stat .val { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; font-family: 'Space Grotesk', sans-serif; }
  .hero-stat .sub { font-size: 11px; opacity: 0.7; margin-top: 3px; font-variant-numeric: tabular-nums; }
  .hero-stat .sub.up { color: #7FE0A3; opacity: 1; }
  .hero-stat .sub.down { color: #FFB395; opacity: 1; }

  .trends .card { padding-bottom: 8px; }
  .trends .spark { width: 100%; height: 88px; display: block; margin-top: 8px; }
  .trends .x-axis {
    display: flex; justify-content: space-between;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px; color: var(--muted);
    padding: 0 2px; margin-top: 2px;
  }
  .trends .card-value .num { font-size: 24px; }

  .page { display: none; }
  .page.active { display: block; }

  .focus .focus-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-top: 8px;
  }
  .focus .hero-card {
    background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
  }
  .focus .hero-card .codename-tag {
    display: inline-flex; gap: 8px; align-items: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; letter-spacing: 0.15em;
    color: var(--accent-2); font-weight: 600;
    margin-bottom: 16px;
  }
  .focus .hero-card .codename-tag::before {
    content: ''; width: 20px; height: 1px; background: var(--accent-2);
  }
  .focus .hero-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 42px; font-weight: 700; letter-spacing: -0.03em;
    margin: 0 0 6px; line-height: 1.05;
  }
  .focus .hero-card h2 em {
    font-style: normal; color: var(--accent-2);
  }
  .focus .hero-card .tagline {
    font-size: 15px; color: var(--muted); margin-bottom: 24px; max-width: 520px;
  }
  .focus .big-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
  }
  .focus .big-stat {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    position: relative;
    overflow: hidden;
  }
  .focus .big-stat.mock {
    background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 8px, var(--surface) 8px, var(--surface) 16px);
    border: 1px dashed var(--line-2);
    opacity: 0.82;
  }
  .focus .big-stat.mock .val { color: var(--muted); }
  .focus .big-stat.mock .mock-tag {
    position: absolute; top: 6px; right: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px; letter-spacing: 0.1em; font-weight: 600;
    color: var(--muted); opacity: 0.7;
  }
  .focus .big-stat .lbl {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--muted); margin-bottom: 8px; font-weight: 600;
  }
  .focus .big-stat .val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }
  .focus .big-stat .sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

  .focus .side-col {
    display: flex; flex-direction: column; gap: 14px;
  }
  .focus .side-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
  }
  .focus .side-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px; font-weight: 600; margin: 0 0 12px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .focus .side-card h3 span.count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; color: var(--muted); font-weight: 500;
  }
  .focus .mini-row {
    display: grid;
    grid-template-columns: 1fr auto 44px;
    gap: 12px; align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }
  .focus .mini-row:first-of-type { border-top: 0; }
  .focus .mini-row .lbl {
    color: var(--ink-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .focus .mini-row .val {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600; font-variant-numeric: tabular-nums;
    color: var(--ink);
  }
  .focus .mini-row .trend svg { width: 44px; height: 22px; display: block; }

  .focus .sections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 26px;
  }
  .focus .cluster {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
  }
  .focus .cluster .ch {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
  }
  .focus .cluster .ch .t {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 13px;
    letter-spacing: 0.02em;
  }
  .focus .cluster .ch .n {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; color: var(--accent-2); font-weight: 600;
  }
  .focus .cluster .item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px;
    padding: 10px 0;
    border-top: 1px dashed var(--line);
  }
  .focus .cluster .item:first-of-type { border-top: 0; padding-top: 2px; }
  .focus .cluster .item .lb { font-size: 11px; color: var(--muted); grid-column: 1 / 2; }
  .focus .cluster .item .vl {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 20px;
    grid-row: 2; grid-column: 1 / 2;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
  }
  .focus .cluster .item .dl {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; font-weight: 500;
    grid-column: 2 / 3; grid-row: 2;
    align-self: end;
  }
  .focus .cluster .item.mock-item {
    opacity: 0.6;
    border-top-style: dashed;
  }
  .focus .cluster .item.mock-item .lb::after {
    content: ' MOCK';
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px; letter-spacing: 0.08em; font-weight: 600;
    color: var(--accent-2); opacity: 0.7;
    margin-left: 6px;
  }
  .focus .cluster .item.mock-item .vl { color: var(--muted); }

  .matrix { background: var(--surface-2); }
  html[data-theme="dark"] .matrix { background: var(--bg); }
  .matrix .page-head h1 { font-family: 'IBM Plex Mono', monospace; font-size: 22px; letter-spacing: 0; font-weight: 600; }
  .matrix .page-head h1::before { content: '// '; color: var(--accent-2); }
  .matrix .matrix-tables { display: flex; flex-direction: column; gap: 26px; }

  .matrix-section-head {
    display: flex; align-items: baseline; gap: 14px;
    margin-bottom: 10px; padding-bottom: 6px;
    border-bottom: 2px solid var(--ink);
  }
  .matrix-section-head .n {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; color: var(--accent-2); font-weight: 600; letter-spacing: 0.1em;
  }
  .matrix-section-head .t {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .matrix-section-head .src {
    margin-left: auto;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; color: var(--muted);
  }

  .matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
  }
  .matrix-table th, .matrix-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
  }
  .matrix-table tr:last-child td { border-bottom: 0; }
  .matrix-table th {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted); font-weight: 600;
    background: var(--surface-2);
  }
  .matrix-table td.num {
    text-align: right; font-variant-numeric: tabular-nums;
    font-weight: 600; color: var(--ink); font-size: 13px;
  }
  .matrix-table td.trend { width: 120px; padding: 4px 12px; }
  .matrix-table td.trend svg { width: 100%; height: 28px; display: block; }
  .matrix-table td.delta-cell { width: 80px; text-align: right; }
  .matrix-table td.src-cell { color: var(--muted); font-size: 11px; }
  .matrix-table tr.mock-row td { opacity: 0.55; font-style: italic; }
  .matrix-table tr.mock-row td:first-child::before {
    content: '\203B ';
    color: var(--accent-2);
    font-style: normal;
  }

  .foot-note {
    margin-top: 40px; padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    flex-wrap: wrap; gap: 10px;
  }
  .foot-note .legend {
    display: inline-flex; gap: 16px; align-items: center;
  }
  .foot-note .legend .lg {
    display: inline-flex; align-items: center; gap: 6px;
  }
  .foot-note .legend .lg .swatch {
    display: inline-block; width: 14px; height: 8px;
    border: 1px dashed var(--line-2);
    background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 3px, var(--surface-2) 3px, var(--surface-2) 6px);
  }

  @media (max-width: 1200px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
    .hero { grid-template-columns: 1fr 1fr; }
    .focus .focus-grid { grid-template-columns: 1fr; }
    .focus .sections-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 820px) {
    .grid, .grid.cols-3, .grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
    .hero { grid-template-columns: 1fr; }
    .focus .big-grid { grid-template-columns: 1fr 1fr; }
    .focus .sections-grid { grid-template-columns: 1fr; }
  }
  /* ===== PAGE TRANSITIONS (only on tab switch, not re-render) ===== */
  .page.animating { animation: pageIn 0.35s ease both; }
  @keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
  .page.animating .card, .page.animating .cluster, .page.animating .hero,
  .page.animating .hero-gauge, .page.animating .section-gauge-group,
  .page.animating .radar-wrap, .page.animating .hm-section,
  .page.animating .flow-bar-group {
    animation: cardIn 0.4s ease both;
  }
  @keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

  /* ===== MODAL ===== */
  .modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .modal-overlay.active { opacity: 1; pointer-events: auto; }
  .modal {
    background: var(--surface); border-radius: 16px;
    max-width: 760px; width: 92%; padding: 32px;
    box-shadow: 0 24px 64px -12px rgba(0,0,0,0.35);
    position: relative; max-height: 90vh; overflow-y: auto;
    transform: translateY(20px); transition: transform .25s ease;
  }
  .modal-overlay.active .modal { transform: translateY(0); }
  .modal-close {
    position: absolute; top: 16px; right: 18px;
    background: none; border: 0; font-size: 22px;
    color: var(--muted); cursor: pointer; line-height: 1;
  }
  .modal-close:hover { color: var(--ink); }
  .modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px; font-weight: 700; margin-bottom: 4px;
  }
  .modal-subtitle { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
  .modal-chart svg { width: 100%; height: 220px; display: block; }
  .modal-data-table {
    width: 100%; border-collapse: collapse;
    font-family: 'IBM Plex Mono', monospace; font-size: 11px;
    margin-top: 16px;
  }
  .modal-data-table th, .modal-data-table td {
    padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--line);
  }
  .modal-data-table th {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--muted); font-weight: 600;
  }
  .modal-data-table td { font-variant-numeric: tabular-nums; font-weight: 500; }

  /* ===== GAUGES ===== */
  .gauges .gauges-wrap { padding: 10px 0; }
  .gauges .hero-gauges {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; margin-bottom: 36px;
  }
  .gauges .hero-gauge {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 28px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
  }
  .gauges .gauge-svg { display: block; }
  .gauges .gauge-ring-bg { stroke: var(--line); fill: none; stroke-linecap: round; }
  .gauges .gauge-ring-fill {
    fill: none; stroke-linecap: round;
    stroke-dashoffset: var(--circumference);
    transition: stroke-dashoffset 0s;
  }
  .gauges .gauge-ring-fill.animated {
    transition: stroke-dashoffset 1.4s ease-out;
    stroke-dashoffset: var(--target-offset);
  }
  .gauges .gauge-center-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; fill: var(--ink);
  }
  .gauges .gauge-label {
    font-size: 13px; color: var(--muted); margin-top: 12px; font-weight: 500;
  }
  .gauges .gauge-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px; font-weight: 700; margin-top: 4px; color: var(--ink);
  }
  .gauges .gauge-delta-wrap { margin-top: 4px; }
  .gauges .section-gauges {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 18px; margin-top: 20px;
  }
  .gauges .section-gauge-group {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px;
  }
  .gauges .section-gauge-group .sg-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px; font-weight: 700; margin-bottom: 14px;
    display: flex; justify-content: space-between;
  }
  .gauges .section-gauge-group .sg-title .sg-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; color: var(--accent-2); font-weight: 600;
  }
  .gauges .mini-gauge-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0; border-top: 1px solid var(--line);
  }
  .gauges .mini-gauge-row:first-of-type { border-top: 0; }
  .gauges .mini-gauge-row .mg-info { flex: 1; min-width: 0; }
  .gauges .mini-gauge-row .mg-label {
    font-size: 11px; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .gauges .mini-gauge-row .mg-val {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px; font-weight: 600; color: var(--ink);
  }
  @media (max-width: 1200px) { .gauges .section-gauges { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 820px) { .gauges .hero-gauges { grid-template-columns: 1fr; } .gauges .section-gauges { grid-template-columns: 1fr; } }

  /* ===== HEATMAP ===== */
  .heatmap .heatmap-wrap { padding: 10px 0 20px; }
  .heatmap .hm-section { margin-bottom: 24px; }
  .heatmap .hm-section-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px; font-weight: 600; color: var(--accent-2);
    letter-spacing: 0.08em; padding: 16px 0 8px;
    border-bottom: 1px solid var(--line); margin-bottom: 2px;
  }
  .heatmap .hm-row {
    display: flex; align-items: stretch; gap: 2px; margin-bottom: 2px;
  }
  .heatmap .hm-label {
    width: 200px; min-width: 200px; padding: 7px 10px; font-size: 11px;
    color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
    border-radius: 4px 0 0 4px; cursor: pointer;
    display: flex; align-items: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: background .15s ease;
  }
  .heatmap .hm-label:hover { background: var(--surface-2); }
  .heatmap .hm-label.active { color: var(--accent); font-weight: 600; }
  .heatmap .hm-cells { display: flex; gap: 2px; flex: 1; }
  .heatmap .hm-cell {
    flex: 1; padding: 7px 2px; text-align: center;
    font-family: 'IBM Plex Mono', monospace; font-size: 10px;
    font-variant-numeric: tabular-nums; border-radius: 3px;
    cursor: pointer; color: #fff; font-weight: 500;
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
  }
  .heatmap .hm-cell:hover {
    transform: scale(1.12); z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
  .heatmap .hm-header-row { margin-bottom: 4px; }
  .heatmap .hm-header-row .hm-cells {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; color: var(--muted); font-weight: 600;
    letter-spacing: 0.04em;
  }
  .heatmap .hm-header-row .hm-cells > div {
    flex: 1; text-align: center; padding: 6px 2px;
  }
  .heatmap .hm-expand {
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 8px; padding: 14px 18px; margin: 4px 0 8px;
    display: none;
  }
  .heatmap .hm-expand.active { display: block; animation: cardIn 0.3s ease; }
  .heatmap .hm-expand svg { width: 100%; height: 80px; display: block; }
  .hm-tooltip {
    position: fixed; z-index: 1100;
    background: var(--ink); color: var(--surface);
    padding: 6px 10px; border-radius: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; pointer-events: none;
    transform: translate(-50%, -110%);
    opacity: 0; transition: opacity .12s ease;
    white-space: nowrap;
  }
  .hm-tooltip.visible { opacity: 1; }
  @media (max-width: 820px) { .heatmap .hm-label { width: 140px; min-width: 140px; font-size: 10px; } }

  /* ===== RADAR ===== */
  .radar .radar-wrap {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 0 40px;
  }
  .radar .radar-svg { width: 520px; height: 520px; display: block; cursor: pointer; }
  .radar .radar-polygon {
    stroke-dasharray: var(--perimeter);
    stroke-dashoffset: var(--perimeter);
    animation: radarDraw 1.2s ease-out forwards;
  }
  @keyframes radarDraw { to { stroke-dashoffset: 0; } }
  .radar .radar-fill { opacity: 0; animation: radarFill 0.6s ease 0.8s forwards; }
  @keyframes radarFill { to { opacity: 1; } }
  .radar .radar-detail {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px; width: 100%; margin-top: 30px;
  }
  .radar .rd-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; padding: 16px;
    opacity: 0.35; transition: opacity 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
  }
  .radar .rd-card.active { opacity: 1; border-color: var(--accent); }
  .radar .radar-svg line[data-radar-axis] { transition: stroke .2s ease, stroke-width .2s ease; }
  .radar .radar-svg line[data-radar-axis].active { stroke: var(--accent); stroke-width: 2.5; }
  .radar .radar-svg circle[data-radar-sec] { transition: r .2s ease, fill .2s ease; }
  .radar .radar-svg circle[data-radar-sec].active { r: 9; fill: var(--accent-2); }
  .radar .radar-svg text[data-radar-sec] { transition: fill .2s ease, font-size .2s ease; }
  .radar .radar-svg text[data-radar-sec].active { fill: var(--accent); font-weight: 700; }
  .radar .rd-card .rd-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px; font-weight: 700; margin-bottom: 8px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .radar .rd-card .rd-title .rd-score {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; color: var(--accent-2); font-weight: 600;
  }
  .radar .rd-card .rd-metric {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 5px 0; border-top: 1px dashed var(--line); font-size: 11px;
  }
  .radar .rd-card .rd-metric:first-of-type { border-top: 0; }
  .radar .rd-card .rd-metric .rd-ml { color: var(--muted); }
  .radar .rd-card .rd-metric .rd-mv {
    font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--ink);
  }
  @media (max-width: 1200px) { .radar .radar-detail { grid-template-columns: repeat(2, 1fr); } .radar .radar-svg { width: 400px; height: 400px; } }
  @media (max-width: 820px) { .radar .radar-detail { grid-template-columns: 1fr; } .radar .radar-svg { width: 300px; height: 300px; } }

  /* ===== FLOW ===== */
  .flow .flow-wrap { padding: 10px 0; }
  .flow .flow-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px; font-weight: 700; margin: 30px 0 16px;
    display: flex; align-items: center; gap: 12px;
  }
  .flow .flow-section-title::after {
    content: ''; flex: 1; height: 1px; background: var(--line);
  }
  .flow .flow-bar-group { margin-bottom: 12px; }
  .flow .flow-bar-row {
    display: flex; align-items: center; gap: 14px; padding: 8px 0;
  }
  .flow .flow-label {
    width: 220px; min-width: 220px; font-size: 12px; color: var(--ink-2);
    text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .flow .flow-track {
    flex: 1; height: 32px; background: var(--line); border-radius: 6px;
    position: relative; overflow: hidden;
  }
  .flow .flow-fill {
    position: absolute; top: 0; left: 0; height: 100%;
    border-radius: 6px; transform-origin: left;
    animation: flowGrow 0.9s ease-out both;
  }
  @keyframes flowGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .flow .flow-pct {
    width: 80px; min-width: 80px; text-align: right;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px; font-weight: 600;
  }
  .flow .flow-values {
    font-family: 'IBM Plex Mono', monospace; font-size: 10px;
    color: var(--muted); margin-top: 2px; padding-left: 234px;
  }
  @media (max-width: 820px) { .flow .flow-label { width: 140px; min-width: 140px; font-size: 11px; } .flow .flow-values { padding-left: 154px; } }
