:root {
    /* Neutral Apple-style dark palette */
    --bg-primary: #0b0b0c;
    --bg-secondary: #161618;
    --bg-card: #1c1c1e;
    --bg-card-hover: #2a2a2d;
    --bg-deep: #000000;
    /* Single calm accent (Apple blue) — no neon */
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-soft: rgba(10, 132, 255, 0.10);
    --accent-border: rgba(10, 132, 255, 0.45);
    /* Monochrome party/bloc scale (data-encoded, no neon) */
    --ph-color: #ff453a;
    --bn-color: #0a84ff;
    --pn-color: #30d158;
    --grs-color: #64d2ff;
    --gps-color: #ffd60a;
    --warisan-color: #bf5af2;
    --psb-color: #5e5ce6;
    --muda-color: #ff9f0a;
    --ind-color: #8e8e93;
    --pas-color: #30d158;
    --dap-color: #ff453a;
    --pkr-color: #e11d48;
    --umno-color: #0a84ff;
    --bersatu-color: #16a34a;
    --pbb-color: #ffd60a;
    --supp-color: #5e5ce6;
    --prs-color: #64d2ff;
    --amanah-color: #ff9f0a;
    --mca-color: #0071e3;
    --pbs-color: #0096d6;
    --bebas-color: #8e8e93;
    --mic-color: #636366;
    --pdp-color: #bf5af2;
    --upko-color: #e11d48;
    --star-color: #a855f7;
    --gerakan-color: #16a34a;
    --kdm-color: #8e8e93;
    --pbrs-color: #0071e3;
    --other-color: #636366;
    --text-primary: #f5f5f7;
    --text-secondary: #aeaeb2;
    --text-muted: #8e8e93;
    --border-color: #38383a;
    --status-red: #ff453a;
    --status-amber: #ffd60a;
    --status-green: #30d158;
    --track: rgba(255, 255, 255, 0.07);
    --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.40), 0 4px 16px rgba(0, 0, 0, 0.24);
}

[data-theme="light"] {
    --bg-primary: #fbfbfd;
    --bg-secondary: #ffffff;
    --bg-card: #f5f5f7;
    --bg-card-hover: #e8e8ed;
    --bg-deep: #ffffff;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-soft: rgba(0, 113, 227, 0.08);
    --accent-border: rgba(0, 113, 227, 0.40);
    --ph-color: #d70015;
    --bn-color: #0071e3;
    --pn-color: #248a3d;
    --grs-color: #0096d6;
    --gps-color: #b25000;
    --warisan-color: #8e2bc4;
    --psb-color: #3a37c4;
    --muda-color: #b25000;
    --ind-color: #6e6e73;
    --pas-color: #248a3d;
    --dap-color: #d70015;
    --pkr-color: #b2001e;
    --umno-color: #0071e3;
    --bersatu-color: #248a3d;
    --pbb-color: #b25000;
    --supp-color: #3a37c4;
    --prs-color: #0096d6;
    --amanah-color: #b25000;
    --mca-color: #0071e3;
    --pbs-color: #0096d6;
    --bebas-color: #6e6e73;
    --mic-color: #8e8e93;
    --pdp-color: #8e2bc4;
    --upko-color: #b2001e;
    --star-color: #8e2bc4;
    --gerakan-color: #248a3d;
    --kdm-color: #6e6e73;
    --pbrs-color: #0071e3;
    --other-color: #8e8e93;
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #6e6e73;
    --border-color: #d2d2d7;
    --status-red: #d70015;
    --status-amber: #b25000;
    --status-green: #248a3d;
    --track: rgba(0, 0, 0, 0.06);
    --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 110px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

.dashboard { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* Header */
.header {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
    padding: 20px 30px; background: var(--bg-secondary);
    border: 1px solid var(--border-color); border-radius: 14px;
    margin-bottom: 30px; box-shadow: var(--soft-shadow);
}
.header-left { display: flex; flex-direction: column; gap: 8px; }
.neuralops-nav { display: flex; gap: 16px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.nav-link:hover { color: var(--accent); }
h1.logo { margin: 0; font-size: inherit; font-weight: inherit; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 2.2rem; }
.logo-text {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 1.45rem; font-weight: 600; letter-spacing: -0.02em;
}
.logo-text .accent { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-controls { display: flex; gap: 8px; }
.ctrl-btn {
    width: 36px; height: 36px; border-radius: 8px;
    border: 1px solid var(--border-color); background: var(--bg-card);
    color: var(--text-primary); cursor: pointer; font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.ctrl-btn:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.ctrl-tv-btn {
    width: auto;
    min-width: 52px;
    padding: 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent);
    border-color: var(--accent-border);
}
.ctrl-tv-btn:hover,
.ctrl-tv-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.nav-link-tv {
    color: var(--accent) !important;
    font-weight: 600;
}
.nav-link-tv:hover { opacity: 0.85; }
.ctrl-data-btn {
    width: auto;
    min-width: 132px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--accent);
    border-color: var(--accent-border);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}
.ctrl-data-btn span { white-space: nowrap; }
.ctrl-data-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.refresh-info { font-size: 0.85rem; color: var(--text-muted); }
.main-content { display: flex; flex-direction: column; gap: 30px; }

/* Hero */
.total-hero {
    display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
    padding: 32px 36px; border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--soft-shadow);
}
.total-hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 8px;
}
.total-hero-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px;
}
.total-hero-title .accent { color: var(--accent); }
.total-hero-sub { color: var(--text-secondary); font-size: 0.95rem; }
.total-hero-stats {
    display: flex; gap: 24px; flex-wrap: wrap;
}
.total-hero-stat {
    text-align: center; min-width: 100px;
}
.total-hero-stat-value {
    display: block; font-weight: 600; font-size: 2.4rem;
    color: var(--text-primary); line-height: 1; letter-spacing: -0.03em;
}
.total-hero-stat-label {
    display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.06em; margin-top: 4px;
}

/* Section titles */
.section-title {
    display: flex; align-items: center; gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 16px;
}
.section-title .icon { font-size: 1.2rem; }
.section-sub { color: var(--text-muted); font-size: 0.85rem; margin: -8px 0 16px; }
.section-formula {
    font-size: 0.82rem; color: var(--text-secondary); margin: -4px 0 16px;
    padding: 8px 12px; border-left: 3px solid var(--accent);
    background: var(--bg-secondary); border-radius: 0 6px 6px 0; line-height: 1.5;
}

/* Simulation controls (shared) */
.simulation-controls-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 22px; margin-bottom: 28px; }
.sim-controls-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sim-head-actions { display: flex; gap: 8px; }
.sim-reset-btn, .sim-apply-btn {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    font-size: 0.78rem; font-weight: 500; cursor: pointer;
    padding: 6px 16px; border-radius: 8px; border: 1px solid var(--border-color);
    background: var(--bg-secondary); color: var(--text-primary); transition: all 0.2s;
}
.sim-apply-btn { border-color: var(--accent); color: var(--accent); }
.sim-apply-btn:hover { background: var(--accent); color: #fff; }
.sim-reset-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.sim-controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 12px; }
.sim-field label { display: block; font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.sim-slider-row { display: flex; align-items: center; gap: 10px; }
.sim-slider { flex: 1; accent-color: var(--accent); }
.sim-val { font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--text-primary); min-width: 36px; text-align: right; }
.sim-pass-input {
    background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 8px;
    color: var(--text-primary); padding: 6px 10px; font-size: 0.8rem; font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace;
}
.sim-lock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; background: var(--bg-secondary); border-radius: 10px; }
.sim-lock-note { font-size: 0.72rem; color: var(--text-muted); }
.sim-flash { font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--accent); margin-left: 10px; }
.section-formula strong { color: var(--accent); font-weight: 600; }

/* National composition */
.national-comp {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 14px; padding: 24px;
}
.national-comp-container {
    display: flex;
    gap: 2rem;
    margin-top: 20px;
    align-items: stretch;
}
.national-comp {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.national-stats--pushed {
    margin-top: auto;
}
.comp-pie-wrap {
    height: 200px;
    margin-bottom: 16px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.comp-bloc-summary {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px;
}
.comp-bloc-chip {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    font-size: 0.78rem;
}
.comp-bloc-chip .bloc-name { font-weight: 600; letter-spacing: 0.02em; }
.comp-bloc-chip .bloc-seats { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.comp-bloc-chip .bloc-name.party-PH { color: var(--ph-color); }
.comp-bloc-chip .bloc-name.party-BN { color: var(--bn-color); }
.comp-bloc-chip .bloc-name.party-PN { color: var(--pn-color); }
.comp-bloc-chip .bloc-name.party-OTHER { color: var(--other-color); }
.chart-wrapper--fixed {
    height: 300px;
    margin-top: 20px;
    flex-shrink: 0;
}
.footer {
    margin-top: 10px;
    padding: 28px 24px 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-secondary);
    box-shadow: var(--soft-shadow);
}
.footer-content {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1fr) auto;
    gap: 18px;
    align-items: start;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.4;
}
.footer-logo .accent { color: var(--accent); }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}
.footer-link:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-border);
    transform: translateY(-1px);
}
.footer-credit {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.6;
    text-align: right;
    white-space: nowrap;
}
.footer-credit span[data-i18n] {
    color: var(--text-primary);
    font-weight: 600;
}
.footer-disclaimer {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}
.comp-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.comp-bar-label { width: 32px; font-weight: 600; font-size: 0.85rem; }
.comp-bar-track { flex: 1; height: 28px; background: var(--track); border-radius: 6px; overflow: hidden; }
.comp-bar-fill { height: 100%; border-radius: 6px; transition: width 0.6s ease; }
.comp-bar-value { width: 28px; text-align: right; font-weight: 600; }

.national-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
.stat-card {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 16px; text-align: center;
}
.stat-value { font-size: 1.6rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Party colors */
.party-PH, .seat-party.party-PH, .comp-bar-label.party-PH { color: var(--ph-color); }
.party-BN, .seat-party.party-BN, .comp-bar-label.party-BN { color: var(--bn-color); }
.party-PN, .seat-party.party-PN, .comp-bar-label.party-PN { color: var(--pn-color); }
.party-GRS, .seat-party.party-GRS, .comp-bar-label.party-GRS { color: var(--grs-color); }
.party-GPS, .seat-party.party-GPS, .comp-bar-label.party-GPS { color: var(--gps-color); }
.party-WARISAN, .seat-party.party-WARISAN, .comp-bar-label.party-WARISAN { color: var(--warisan-color); }
.party-PSB, .seat-party.party-PSB, .comp-bar-label.party-PSB { color: var(--psb-color); }
.party-MUDA, .seat-party.party-MUDA, .comp-bar-label.party-MUDA { color: var(--muda-color); }
.party-IND, .seat-party.party-IND, .comp-bar-label.party-IND,
.party-OTHER, .seat-party.party-OTHER, .comp-bar-label.party-OTHER { color: var(--ind-color); }
.party-HUNG { color: var(--text-muted); }

/* State grid */
.state-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.state-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 14px; padding: 18px; cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.state-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--soft-shadow); }
.state-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.state-card-name { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; }
.state-card-btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 0.9rem; font-weight: 500; color: var(--text-primary);
    background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 8px;
    padding: 6px 12px; text-decoration: none; transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.state-card-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--soft-shadow); }
.state-card-remark { display: inline-block; font-size: 0.7rem; color: var(--accent); text-decoration: none; margin-bottom: 10px; opacity: 0.85; }
.state-card-remark:hover { opacity: 1; text-decoration: underline; }
.state-card-code { font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace; font-size: 0.7rem; color: var(--text-muted); padding: 2px 8px; background: var(--bg-secondary); border-radius: 4px; }
.state-card-seats { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
.state-card-bar { display: flex; height: 20px; border-radius: 6px; overflow: hidden; margin-bottom: 8px; border: 1px solid var(--border-color); }
.state-card-seg { display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 600; color: #fff; }
.state-card-seg.party-PH { background: var(--ph-color); }
.state-card-seg.party-BN { background: var(--bn-color); }
.state-card-seg.party-PN { background: var(--pn-color); }
.state-card-seg.party-GRS { background: var(--grs-color); }
.state-card-seg.party-GPS { background: var(--gps-color); }
.state-card-seg.party-WARISAN { background: var(--warisan-color); }
.state-card-seg.party-PSB { background: var(--psb-color); }
.state-card-seg.party-MUDA { background: var(--muda-color); }
.state-card-seg.party-IND, .state-card-seg.party-OTHER { background: var(--ind-color); }
.state-card-scenario { font-size: 0.78rem; color: var(--text-secondary); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-color); }
.state-card-scenario-label { font-weight: 600; color: var(--accent); }
.state-card-scenario-prob { font-weight: 600; color: var(--text-primary); }
.state-card-mb { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.state-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.state-card-leader { font-size: 0.8rem; font-weight: 600; }
.state-card-majority {
    font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
    padding: 2px 8px; border-radius: 10px; border: 1px solid currentColor;
}
.state-card-majority.party-PH { color: var(--ph-color); }
.state-card-majority.party-BN { color: var(--bn-color); }
.state-card-majority.party-PN { color: var(--pn-color); }
.state-card-majority.party-GRS { color: var(--grs-color); }
.state-card-majority.party-GPS { color: var(--gps-color); }
.state-card-majority.party-WARISAN { color: var(--warisan-color); }
.state-card-majority.party-PSB { color: var(--psb-color); }

/* Split card: left = before, right = projection */
.state-card-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.state-card-col { display: flex; flex-direction: column; }
.state-card-col-proj { border-left: 1px solid var(--border-color); padding-left: 12px; }
.state-card-col-head {
    font-size: 0.62rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px;
}
.state-card-col-proj .state-card-col-head { color: var(--accent); }
.state-card-sim-flag {
    display: inline-block; color: var(--accent); font-weight: 600;
    margin-left: 4px; animation: simpulse 1.2s ease-in-out infinite;
}
@keyframes simpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.state-card-col-foot { font-size: 0.68rem; color: var(--text-secondary); margin-top: 6px; line-height: 1.3; }
.state-card-hung { color: var(--text-muted); }

/* Scenario comparison table */
.scenario-table-wrap {
    overflow-x: auto; border: 1px solid var(--border-color); border-radius: 12px;
    background: var(--bg-card);
}
.scenario-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.scenario-table th, .scenario-table td {
    padding: 10px 14px; text-align: center; border-bottom: 1px solid var(--border-color);
}
.scenario-table th {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.72rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
    background: var(--bg-secondary); position: sticky; top: 0;
}
.scenario-table th:first-child { text-align: left; }
.scenario-table td:first-child { text-align: left; font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; }
.scenario-table tr:hover { background: var(--accent-soft); }
.prob-high { color: var(--status-green); font-weight: 600; }
.prob-med { color: var(--status-amber); }
.prob-low { color: var(--status-red); opacity: 0.85; }

/* Monte Carlo summary table */
.mc-table-wrap {
    overflow-x: auto; border: 1px solid var(--border-color); border-radius: 12px;
    background: var(--bg-card);
}
.mc-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.mc-table th, .mc-table td {
    padding: 10px 14px; text-align: center; border-bottom: 1px solid var(--border-color);
}
.mc-table th {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--bg-secondary);
}
.mc-table th:first-child, .mc-table td:first-child { text-align: left; }
.mc-table tr:hover { background: var(--accent-soft); }

/* Control summary cards */
.mc-control-summary {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px;
}
.mc-control-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 16px 10px; border-radius: 12px; border: 1px solid var(--border-color);
    background: var(--bg-card); position: relative; overflow: hidden;
}
.mc-control-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.mc-control-card.party-PH::before { background: var(--ph-color); }
.mc-control-card.party-BN::before { background: var(--bn-color); }
.mc-control-card.party-PN::before { background: var(--pn-color); }
.mc-control-card.party-HUNG::before { background: var(--text-muted); }
.mc-control-count { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 2rem; font-weight: 600; line-height: 1; }
.mc-control-card.party-PH .mc-control-count { color: var(--ph-color); }
.mc-control-card.party-BN .mc-control-count { color: var(--bn-color); }
.mc-control-card.party-PN .mc-control-count { color: var(--pn-color); }
.mc-control-card.party-HUNG .mc-control-count { color: var(--text-muted); }
.mc-control-label { margin-top: 6px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* Regression matrix */
.regression-matrix-wrap {
    overflow-x: auto; border: 1px solid var(--border-color); border-radius: 12px;
    background: var(--bg-card);
}
.regression-matrix {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
}
.regression-matrix th, .regression-matrix td {
    padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.regression-matrix th {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.65rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
    background: var(--bg-secondary); position: sticky; top: 0;
}
.regression-matrix th:first-child { text-align: left; position: sticky; left: 0; z-index: 2; background: var(--bg-secondary); }
.regression-matrix td:first-child {
    text-align: left; font-weight: 700; position: sticky; left: 0;
    background: var(--bg-card); z-index: 1;
}
.regression-matrix tr:hover td { background: var(--accent-soft); }
.cell-PH { color: var(--ph-color); font-weight: 700; }
.cell-BN { color: var(--bn-color); font-weight: 700; }
.cell-PN { color: var(--pn-color); font-weight: 700; }
.cell-OTHER { color: var(--other-color); font-weight: 700; }
.cell-GRS { color: var(--grs-color); font-weight: 700; }
.cell-GPS { color: var(--gps-color); font-weight: 700; }
.cell-WARISAN { color: var(--warisan-color); font-weight: 700; }
.cell-TBD { color: var(--text-muted); }
.cell-tbd { color: var(--text-muted); }
.reg-match {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent-border);
    border-radius: 4px;
}
.reg-model-label { font-weight: 400; font-size: 0.72rem; color: var(--text-muted); margin-left: 4px; }

/* Regression stat summary */
.reg-stat-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.reg-stat-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 14px 10px; border-radius: 12px; border: 1px solid var(--border-color);
    background: var(--bg-card); position: relative; overflow: hidden;
}
.reg-stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.reg-stat-card.party-PH::before { background: var(--ph-color); }
.reg-stat-card.party-BN::before { background: var(--bn-color); }
.reg-stat-card.party-PN::before { background: var(--pn-color); }
.reg-stat-count { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 2rem; font-weight: 600; line-height: 1; }
.reg-stat-card.party-PH .reg-stat-count { color: var(--ph-color); }
.reg-stat-card.party-BN .reg-stat-count { color: var(--bn-color); }
.reg-stat-card.party-PN .reg-stat-count { color: var(--pn-color); }
.reg-stat-label { margin-top: 4px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.reg-stat-states { margin-top: 6px; font-size: 0.72rem; color: var(--text-secondary); text-align: center; }

.reg-matrix-scroll { overflow-x: auto; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); }
.reg-matrix-scroll .regression-matrix { border: none; border-radius: 0; }

/* New simulation sections (Bootstrap / Bayesian / Sensitivity) */
.sim-stat-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.sim-stat-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 14px 10px; border-radius: 12px; border: 1px solid var(--border-color);
    background: var(--bg-card); position: relative; overflow: hidden;
}
.sim-stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.sim-stat-card.party-PH::before { background: var(--ph-color); }
.sim-stat-card.party-BN::before { background: var(--bn-color); }
.sim-stat-card.party-PN::before { background: var(--pn-color); }
.sim-stat-card.party-HUNG::before { background: var(--text-muted); }
.sim-stat-count { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 1.8rem; font-weight: 600; line-height: 1; }
.sim-stat-card.party-PH .sim-stat-count { color: var(--ph-color); }
.sim-stat-card.party-BN .sim-stat-count { color: var(--bn-color); }
.sim-stat-card.party-PN .sim-stat-count { color: var(--pn-color); }
.sim-stat-card.party-HUNG .sim-stat-count { color: var(--text-muted); }
.sim-stat-label { margin-top: 4px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.sim-stat-prob { margin-top: 4px; font-size: 0.72rem; color: var(--text-secondary); }

.sim-bar-chart { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.sim-bar-row { display: flex; align-items: center; gap: 10px; }
.sim-bar-label { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.72rem; font-weight: 700; width: 32px; }
.sim-bar-track { flex: 1; height: 18px; background: var(--bg-secondary); border-radius: 6px; overflow: hidden; border: 1px solid var(--border-color); }
.sim-bar-fill { height: 100%; border-radius: 6px; }
.sim-bar-fill.party-PH { background: var(--ph-color); }
.sim-bar-fill.party-BN { background: var(--bn-color); }
.sim-bar-fill.party-PN { background: var(--pn-color); }
.sim-bar-value { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; width: 40px; text-align: right; }
.sim-subhead { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 8px 0; }
.sim-outcome-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.sim-outcome-table th, .sim-outcome-table td { padding: 8px 12px; text-align: center; border-bottom: 1px solid var(--border-color); }
.sim-outcome-table th { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.7rem; text-transform: uppercase; background: var(--bg-secondary); }

.bayes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bayes-state { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 12px; }
.bayes-state-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bayes-state-name { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.82rem; font-weight: 700; }
.bayes-state-code { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--text-muted); padding: 2px 8px; background: var(--bg-secondary); border-radius: 4px; }
.bayes-bars { display: flex; flex-direction: column; gap: 5px; }
.bayes-bar-row { display: flex; align-items: center; gap: 8px; }
.bayes-bar-label { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.68rem; font-weight: 700; width: 30px; }
.bayes-bar-track { flex: 1; height: 14px; background: var(--bg-secondary); border-radius: 5px; overflow: hidden; }
.bayes-bar-fill { height: 100%; border-radius: 5px; transition: width 0.4s; }
.bayes-bar-fill.party-PH { background: var(--ph-color); }
.bayes-bar-fill.party-BN { background: var(--bn-color); }
.bayes-bar-fill.party-PN { background: var(--pn-color); }
.bayes-bar-value { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; width: 38px; text-align: right; }

.sens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sens-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 14px; }
.sens-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sens-shock { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.sens-flip-count { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--accent); }
.sens-detail { display: flex; flex-wrap: wrap; gap: 6px; }
.flip-chip { font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--border-color); }
.flip-chip.flip-active { color: var(--status-red); border-color: var(--status-red); font-weight: 700; }

/* Swing master list */
.swing-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.swing-filter {
    padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--border-color); background: var(--bg-card);
    color: var(--text-secondary); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.swing-filter.active, .swing-filter:hover { border-color: var(--accent); color: var(--text-primary); background: var(--accent-soft); }
.swing-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.swing-count { font-size: 0.82rem; color: var(--text-muted); }
.swing-toggle {
    padding: 4px 14px; border-radius: 16px; font-size: 0.75rem; font-weight: 600;
    border: 1px solid var(--border-color); background: var(--bg-card);
    color: var(--accent); cursor: pointer; transition: all 0.2s;
}
.swing-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
.swing-scroll {
    max-height: 280px; overflow-y: auto; border: 1px solid var(--border-color);
    border-radius: 10px; background: var(--bg-card); padding: 8px;
    scrollbar-width: thin; scrollbar-color: var(--border-color) transparent;
}
.swing-scroll.swing-expanded { max-height: 70vh; }
.swing-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 5px;
}
.swing-row {
    display: grid; grid-template-columns: 42px 1fr 40px 48px;
    align-items: center; gap: 8px; padding: 6px 9px;
    border-radius: 6px; background: var(--bg-secondary); border: 1px solid var(--border-color);
    font-size: 0.78rem; transition: border-color 0.2s;
}
.swing-row:hover { border-color: var(--accent); }
.swing-state { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.68rem; color: var(--text-muted); }
.swing-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swing-winner { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; font-size: 0.68rem; font-weight: 700; text-align: center; }
.swing-margin { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 700; text-align: right; }
.swing-margin-tight { color: var(--status-red); }
.swing-margin-mid { color: var(--status-amber); }
.swing-margin-safe { color: var(--text-muted); }

/* History */
/* ===== Election History ===== */
.history-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.history-tab-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.history-tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.history-tab:hover, .history-tab.active {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-soft);
}
.history-content { margin-top: 6px; }
.history-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
/* Auto-scrolling horizontal track (marquee). Pauses on hover/hold, swipeable. */
.history-track {
    position: relative;
    overflow: hidden;
    padding: 4px 2px 12px;
    cursor: grab;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.history-track:active { cursor: grabbing; }
.history-track-inner {
    display: flex;
    align-items: stretch;
    gap: 16px;
    width: max-content;
    position: relative;
    will-change: transform;
}
.history-track-inner.marquee {
    animation: historyMarquee 38s linear infinite;
}
.history-track:hover .history-track-inner.marquee {
    animation-play-state: paused;
}
@keyframes historyMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.history-grid {
    display: flex;
    align-items: stretch;
    gap: 16px;
}
.history-state-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 300px;
    scroll-snap-align: start;
    min-height: 420px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.history-state-card.is-active {
    border-color: var(--accent);
    box-shadow: var(--soft-shadow);
}
.history-state-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.history-state-name {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}
.history-state-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
}
.history-entry {
    padding-left: 10px;
    border-left: 3px solid var(--border-color);
}
.history-entry.bloc-PH { border-left-color: #e11d48; }
.history-entry.bloc-BN { border-left-color: #2563eb; }
.history-entry.bloc-PN { border-left-color: #16a34a; }
.history-entry.bloc-OTHER { border-left-color: var(--ind-color); }
.history-entry-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.history-year {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.history-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.history-win-badge {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}
.history-entry.bloc-PH .history-win-badge { color: #e11d48; background: rgba(225,29,72,0.12); }
.history-entry.bloc-BN .history-win-badge { color: #2563eb; background: rgba(37,99,235,0.12); }
.history-entry.bloc-PN .history-win-badge { color: #16a34a; background: rgba(22,163,74,0.12); }
.history-entry.bloc-OTHER .history-win-badge { color: var(--ind-color); background: var(--accent-soft); }
.history-label { font-size: 0.82rem; font-weight: 600; margin: 4px 0 8px; color: var(--text-secondary); }
.hist-seatbar {
    display: flex;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-deep);
    gap: 2px;
}
.hist-seg { height: 100%; border-radius: 2px; }
.hist-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}
.hist-chip {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--bc, #888);
    background: color-mix(in srgb, var(--bc, #888) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--bc, #888) 35%, transparent);
}
.hist-chip b { color: var(--text-primary); }
.hist-pv {
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
}
.history-mb {
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 8px;
}
.history-note {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* Loading */
.loading { text-align: center; padding: 32px; color: var(--text-muted); font-size: 0.9rem; }

/* Method sections */
.method-section {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    border-radius: 0 12px 12px 0;
}
.method-tag {
    display: inline-block; font-size: 0.72rem; font-weight: 600;
    padding: 2px 10px; border-radius: 20px; margin-left: 10px; vertical-align: middle;
}
.method-tag.tag-mc, .method-tag.tag-reg, .method-tag.tag-boot,
.method-tag.tag-bayes, .method-tag.tag-sens {
    background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
}

/* Charts */
.chart-wrapper { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; margin-top: 16px; }
.comp-chart-sub { font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: .3px; margin: 14px 0 4px; text-transform: uppercase; }

/* Theme toggle */
[data-theme="light"] .state-card-seg { color: #fff; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Responsive */
@media (max-width: 900px) {
    .total-hero { flex-direction: column; align-items: flex-start; }
    .total-hero-stats { width: 100%; justify-content: space-between; }
    .national-comp-container { flex-direction: column !important; gap: 16px !important; }
    .national-comp--left, .national-comp--right { width: 100%; }
    .history-tabs { flex-wrap: nowrap; }
    .history-tab-group {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }
    .history-tab { scroll-snap-align: start; }
    .state-grid { grid-template-columns: 1fr; }
    .mc-control-summary, .reg-stat-summary, .sim-stat-summary { grid-template-columns: repeat(2, 1fr); }
    .swing-list { grid-template-columns: 1fr; }
    .swing-row { grid-template-columns: 42px 1fr 40px 48px; padding: 6px 9px; }
    .header { flex-direction: column; align-items: flex-start; }
    .footer-content { grid-template-columns: 1fr; text-align: left; }
    .footer-links { justify-content: flex-start; }
    .footer-credit { text-align: left; white-space: normal; }
}

@media (max-width: 600px) {
    .total-hero-stat-value { font-size: 1.6rem; }
    .state-grid { grid-template-columns: 1fr; }
    .mc-control-summary, .reg-stat-summary, .sim-stat-summary { grid-template-columns: 1fr; }
    .footer { padding: 22px 16px 16px; }
    .history-state-card { flex: 0 0 260px; min-height: 400px; }
}

/* Print */
@media print {
    .header-right, .cyber-globe-wrapper, #cyber-network-root, .ainna-skip-link, footer, .cookie-consent,
    .swing-filters { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .dashboard { max-width: 100% !important; }
    .state-card, .scenario-table td, .mc-table td, .regression-matrix td {
        border: 1px solid #ccc !important; background: #f8f8f8 !important; color: #000 !important;
    }
    .section-title { color: #000 !important; }
}

/* Unjuran Gabungan: force full-width block below the PRE-DISSOLUTION card */
.composition-section.unjuran-section { display: block; clear: both; margin-top: 30px; }
.composition-section.unjuran-section .unjuran-bars { width: 100%; }

/* National Sentiment for prn-total */
.sent-national { background: var(--bg-card); border:1px solid var(--border-color); border-radius:12px; padding:16px; }
.sent-score { font-size:0.95rem; margin-bottom:10px; color:var(--text-secondary); }
.sent-bars { display:flex; flex-direction:column; gap:6px; }
.sent-bar { display:flex; align-items:center; gap:8px; font-size:0.8rem; }
.sent-label { width:50px; font-family:'JetBrains Mono',monospace; }
.sent-val { width:40px; text-align:right; font-weight:600; }
.sent-fill { height:8px; border-radius:4px; background:#666; flex:1; }
.sent-fill.ph { background:#ff453a; }
.sent-fill.bn { background:#0a84ff; }
.sent-fill.pn { background:#30d158; }
.sent-fill.neu { background:#8e8e93; }
.sent-source { font-size:0.7rem; color:var(--text-muted); margin-top:8px; }

/* ── Simulation Remarks ── */
.method-tag.tag-rem { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.remarks-wrap { display: flex; flex-direction: column; gap: 16px; }
.remarks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.remarks-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 18px 20px; position: relative; overflow: hidden;
}
.remarks-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent);
}
.remarks-card-head {
    display: flex; align-items: center; gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--accent); margin-bottom: 12px;
}
.remarks-card-body { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.65; }
.remarks-card-body strong { color: var(--text-primary); font-weight: 600; }
.remarks-card-body .party-PH { color: var(--ph-color); font-weight: 700; }
.remarks-card-body .party-BN { color: var(--bn-color); font-weight: 700; }
.remarks-card-body .party-PN { color: var(--pn-color); font-weight: 700; }
.remarks-card-body .party-OTHER { color: var(--other-color); font-weight: 700; }
.remarks-method-list {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.remarks-method-chip {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 0.68rem; font-weight: 600; padding: 3px 10px;
    border-radius: 20px; border: 1px solid var(--border-color);
    background: var(--bg-secondary); color: var(--text-muted);
}
.remarks-method-chip.chip-ph { border-color: var(--ph-color); color: var(--ph-color); background: rgba(255,69,58,0.08); }
.remarks-method-chip.chip-bn { border-color: var(--bn-color); color: var(--bn-color); background: rgba(10,132,255,0.08); }
.remarks-method-chip.chip-pn { border-color: var(--pn-color); color: var(--pn-color); background: rgba(48,209,88,0.08); }
.remarks-method-chip.chip-hung { border-color: var(--text-muted); color: var(--text-muted); }
.remarks-battle-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.remarks-battle-chip {
    font-size: 0.78rem; font-weight: 600; padding: 6px 14px;
    border-radius: 10px; border: 1px solid var(--border-color);
    background: var(--bg-secondary); color: var(--text-primary);
    display: inline-flex; align-items: center; gap: 6px;
}
.remarks-battle-chip .battle-seats { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--text-muted); }
.remarks-sentiment-bar {
    display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px;
    background: var(--bg-secondary); border-radius: 10px; border: 1px solid var(--border-color);
}
.remarks-sentiment-bar .sent-label-sm { font-size: 0.72rem; font-weight: 600; width: 32px; }
.remarks-sentiment-bar .sent-bar-sm { flex: 1; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.remarks-sentiment-bar .sent-fill-sm { height: 100%; border-radius: 3px; }
.remarks-sentiment-bar .sent-val-sm { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; width: 40px; text-align: right; }
.remarks-note {
    margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--accent);
    background: var(--bg-secondary); border-radius: 0 8px 8px 0;
    font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
}
.remarks-full { grid-column: 1 / -1; }
@media (max-width: 900px) { .remarks-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .remarks-grid { grid-template-columns: 1fr; } }

/* ── Cadangan Strategi ── */
.cadangan-grid { display: flex; flex-direction: column; gap: 18px; }
.cadangan-party {
    padding: 16px; border-radius: 10px; border: 1px solid var(--border-color);
    background: var(--bg-secondary); position: relative;
}
.cadangan-party-head {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.cadangan-party-name {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em;
}
.cadangan-party-name.party-PH { color: var(--ph-color); }
.cadangan-party-name.party-BN { color: var(--bn-color); }
.cadangan-party-name.party-PN { color: var(--pn-color); }
.cadangan-party-seats {
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
    color: var(--text-muted); font-weight: 600;
}
.cadangan-gap-bar {
    height: 8px; background: var(--track); border-radius: 4px; overflow: visible;
    margin-bottom: 12px; position: relative;
}
.cadangan-gap-fill {
    height: 100%; border-radius: 4px; transition: width 0.6s ease; position: relative;
}
.cadangan-gap-fill.party-PH { background: var(--ph-color); }
.cadangan-gap-fill.party-BN { background: var(--bn-color); }
.cadangan-gap-fill.party-PN { background: var(--pn-color); }
.cadangan-gap-marker {
    position: absolute; top: -3px; width: 2px; height: 14px;
    background: var(--accent); border-radius: 1px;
}
.cadangan-advice {
    font-size: 0.85rem; line-height: 1.65; color: var(--text-secondary);
}
.cadangan-advice strong { color: var(--text-primary); font-weight: 600; }
.cadangan-advice strong { color: var(--text-primary); font-weight: 600; }

/* Coalition cadangan chips */
.coalition-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.coalition-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 10px;
    font-size: 0.78rem; font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.coalition-chip.coalition-viable {
    border-color: var(--accent-border);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent-border);
}
.coalition-chip.coalition-viable:hover {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-soft);
}
.coalition-chip.coalition-nonviable { opacity: 0.6; }
.coalition-chip-seats {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem; color: var(--text-muted);
}
/* Coalition Recommendation Matrix (prn-total aggregate from states) */
.coalition-matrix-note {
    font-size: 0.78rem; color: var(--text-secondary);
    margin-bottom: 14px; padding: 8px 12px;
    border-left: 3px solid var(--accent-border);
    background: var(--bg-secondary); border-radius: 0 8px 8px 0;
}
.coalition-matrix-wrap { overflow-x: auto; }
.coalition-matrix {
    display: grid;
    grid-template-columns: 120px repeat(3, minmax(110px, 1fr)) 70px minmax(130px, 1fr);
    gap: 1px;
    border-radius: 10px; overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--border-color);
    min-width: 680px;
}
.coalition-matrix-header { display: contents; }
.coalition-matrix-th {
    padding: 10px 8px;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.03em;
    background: var(--bg-secondary); color: var(--text-primary);
    text-align: center;
}
.coalition-matrix-th-state { text-align: left; padding-left: 12px; }
.coalition-matrix-row { display: contents; }
.coalition-matrix-state {
    display: flex; flex-direction: column; justify-content: center;
    padding: 10px 12px; background: var(--bg-card);
    border-right: 1px solid var(--border-color);
}
.coalition-matrix-state strong { font-size: 0.85rem; color: var(--text-primary); }
.coalition-matrix-state span { font-size: 0.68rem; color: var(--text-muted); }
.coalition-matrix-cell {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 8px 6px; background: var(--bg-card);
    text-align: center; min-height: 58px;
}
.coalition-matrix-cell.viable {
    background: rgba(34, 197, 94, 0.08);
    border-left: 2px solid #22c55e;
}
.coalition-matrix-cell.nonviable {
    background: rgba(239, 68, 68, 0.05);
    border-left: 2px solid #ef4444;
}
.coalition-matrix-partner { font-size: 0.82rem; font-weight: 700; }
.coalition-matrix-surplus {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem; font-weight: 600;
    margin: 2px 0;
}
.coalition-matrix-surplus.pos { color: #22c55e; }
.coalition-matrix-surplus.neg { color: #ef4444; }
.coalition-matrix-combined { font-size: 0.65rem; color: var(--text-muted); }
.coalition-matrix-majority {
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem; font-weight: 700;
    background: var(--bg-card); color: var(--text-primary);
}
.coalition-matrix-bestcell {
    display: flex; align-items: center; justify-content: center;
    padding: 8px; background: var(--bg-card);
}
.coalition-matrix-best {
    font-size: 0.78rem; font-weight: 600;
    padding: 4px 10px; border-radius: 8px;
    background: var(--accent-soft); border: 1px solid var(--accent-border);
}
.coalition-matrix-none {
    font-size: 0.72rem; color: var(--text-muted);
    font-style: italic;
}

/* PRU Most Viable Coalition card */
.pru-coalition-card {
    background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 100%);
    border: 1px solid var(--accent-border);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}
.pru-coalition-winner {
    display: flex; align-items: center; gap: 24px;
    flex-wrap: wrap; margin-bottom: 16px;
}
.pru-coalition-badges {
    display: flex; align-items: center; gap: 8px;
}
.pru-coalition-badge {
    font-size: 1.4rem; font-weight: 800;
    padding: 10px 22px; border-radius: 12px;
    background: var(--bg-secondary);
    border: 2px solid currentColor;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.pru-coalition-plus {
    font-size: 1.2rem; font-weight: 700;
    color: var(--text-muted);
}
.pru-coalition-score {
    display: flex; gap: 20px;
}
.pru-coalition-metric {
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 16px; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    min-width: 90px;
}
.pru-coalition-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem; font-weight: 700; color: var(--text-primary);
    line-height: 1;
}
.pru-coalition-number.surplus { color: #22c55e; }
.pru-coalition-label {
    font-size: 0.68rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.03em;
    margin-top: 4px;
}
.pru-coalition-verdict {
    font-size: 0.9rem; line-height: 1.65;
    color: var(--text-secondary); margin-bottom: 14px;
}
.pru-coalition-states {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; margin-bottom: 12px;
}
.pru-coalition-states-label {
    font-size: 0.75rem; font-weight: 600;
    color: var(--text-muted);
}
.pru-coalition-state-chip {
    font-size: 0.72rem; font-weight: 600;
    padding: 3px 10px; border-radius: 6px;
    background: var(--accent-soft); color: var(--text-primary);
    border: 1px solid var(--accent-border);
}
.pru-coalition-runner {
    font-size: 0.75rem; color: var(--text-muted);
    padding-top: 10px; border-top: 1px solid var(--border-color);
}
.pru-coalition-surplus { color: #22c55e; font-weight: 700; }
.pru-stress {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.pru-stress-title {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.pru-stress-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 10px;
    align-items: center;
    font-size: 0.85rem;
    padding: 4px 0;
    color: var(--text-secondary);
}
.pru-stress-row.base { font-weight: 600; color: var(--text-primary); }
.pru-stress-row .pos { color: var(--status-green); font-weight: 700; }
.pru-stress-row .neg { color: var(--status-red); font-weight: 700; }

/* ── Hero: net Δ strip + PRN status board ── */
.total-hero {
    flex-wrap: wrap;
    gap: 16px 24px;
}
.hero-net-strip {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.hero-net-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.hero-net-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}
.hero-net-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 600;
}
.hero-net-chip .net-before {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.78rem;
}
.hero-net-chip .net-arrow { color: var(--text-muted); font-size: 0.75rem; }
.hero-net-chip .net-delta.pos { color: var(--status-green); }
.hero-net-chip .net-delta.neg { color: var(--status-red); }
.hero-net-chip .net-delta.zero { color: var(--text-muted); }

.hero-status-board {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.hero-status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.hero-status-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px 10px;
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--text-secondary);
}
.st-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 2px;
}
.st-dot.st-held { background: var(--status-green); }
.st-dot.st-upcoming { background: var(--status-amber); }
.st-dot.st-tbd { background: var(--text-muted); opacity: 0.6; }

.hero-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}
.hero-status-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.hero-status-tile:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
}
.hero-status-tile .st-code {
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}
.hero-status-tile .st-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hero-status-tile .st-badge {
    margin-top: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}
.hero-status-tile.status-held .st-badge {
    color: var(--status-green);
    background: rgba(48, 209, 88, 0.12);
}
.hero-status-tile.status-upcoming .st-badge {
    color: var(--status-amber);
    background: rgba(255, 214, 10, 0.12);
}
.hero-status-tile.status-tbd .st-badge {
    color: var(--text-muted);
    background: var(--track);
}
.hero-status-tile .st-date {
    font-size: 0.58rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── National control map ── */
.control-map-section { margin-bottom: 28px; }
.control-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.control-map-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--text-muted);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, border-color 0.15s;
    min-height: 96px;
}
.control-map-tile:hover { transform: translateY(-1px); border-color: var(--accent-border); }
.control-map-tile.ctrl-PH { border-left-color: var(--ph-color); }
.control-map-tile.ctrl-BN { border-left-color: var(--bn-color); }
.control-map-tile.ctrl-PN { border-left-color: var(--pn-color); }
.control-map-tile.ctrl-OTHER { border-left-color: var(--other-color); }
.control-map-tile.ctrl-HUNG { border-left-color: var(--status-amber); }
.control-map-code {
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace;
    font-size: 0.75rem; color: var(--text-muted); font-weight: 600;
}
.control-map-name { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.control-map-ctrl {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
}
.control-map-seats { font-size: 0.72rem; color: var(--text-muted); }
.control-map-legend {
    display: flex; flex-wrap: wrap; gap: 10px 16px;
    margin-top: 14px; font-size: 0.78rem; color: var(--text-secondary);
}
.control-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.control-map-legend i {
    display: inline-block; width: 10px; height: 10px; border-radius: 3px;
}

/* ── Path to majority ── */
.path-majority-section { margin-bottom: 28px; }
.path-majority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.path-card {
    padding: 16px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}
.path-card-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 10px;
}
.path-card-party { font-size: 1.2rem; font-weight: 700; }
.path-card-seats { font-size: 0.85rem; color: var(--text-secondary); }
.path-bar {
    height: 10px; border-radius: 5px; background: var(--track);
    overflow: hidden; margin-bottom: 10px;
}
.path-bar-fill { height: 100%; border-radius: 5px; transition: width 0.3s; }
.path-card-meta { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.path-card-meta strong { color: var(--text-primary); }
.path-card.over-majority { border-color: var(--status-green); }

/* ── OTHER raw breakdown ── */
.other-breakdown {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.other-breakdown-title {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.other-breakdown-chips {
    display: flex; flex-wrap: wrap; gap: 6px 8px;
}
.other-chip {
    font-size: 0.75rem; font-weight: 600;
    padding: 3px 8px; border-radius: 6px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.other-chip b { color: var(--text-primary); margin-left: 4px; }

/* ── Export bar ── */
.export-bar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 8px 0 20px;
}
.export-btn {
    font-size: 0.78rem; font-weight: 600;
    padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card); color: var(--text-primary);
    cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.export-btn:hover { border-color: var(--accent-border); background: var(--bg-card-hover); }

/* ── TV mode (Apple minimalist, 10-ft friendly) ── */
.tv-stage-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.tv-stage-label {
    font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em;
}
.tv-stage-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.tv-stage-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--track); border: none; padding: 0; cursor: pointer;
}
.tv-stage-dot.active { background: var(--accent); transform: scale(1.25); }
.tv-stage-clock {
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace;
    font-size: 1rem; color: var(--text-secondary);
}

html[data-tv="1"] body,
body.tv-mode {
    font-size: 18px;
    padding-bottom: 40px;
}
html[data-tv="1"] .dashboard,
body.tv-mode .dashboard {
    max-width: 100%;
    padding: 3.5vh 4vw;
}
html[data-tv="1"] .tv-stage-bar,
body.tv-mode .tv-stage-bar {
    display: flex;
}
html[data-tv="1"] .tv-stage-bar[hidden],
body.tv-mode .tv-stage-bar[hidden] {
    display: flex !important;
}
html[data-tv="1"] .neuralops-nav,
html[data-tv="1"] .tv-hide,
html[data-tv="1"] .footer,
html[data-tv="1"] .history-tab-group,
body.tv-mode .neuralops-nav,
body.tv-mode .tv-hide,
body.tv-mode .footer,
body.tv-mode .history-tab-group {
    display: none !important;
}
html[data-tv="1"] .tv-stage,
body.tv-mode .tv-stage {
    display: none;
}
html[data-tv="1"] .tv-stage.tv-active,
body.tv-mode .tv-stage.tv-active {
    display: block;
    min-height: 70vh;
    animation: tvFade 0.4s ease;
}
@keyframes tvFade {
    from { opacity: 0.35; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
html[data-tv="1"] .total-hero-stat-value,
body.tv-mode .total-hero-stat-value {
    font-size: 3.2rem;
}
html[data-tv="1"] .total-hero-title,
body.tv-mode .total-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
}
html[data-tv="1"] .section-title,
body.tv-mode .section-title {
    font-size: 1.6rem;
}
html[data-tv="1"] .section-sub,
body.tv-mode .section-sub {
    font-size: 1rem;
}
html[data-tv="1"] .stat-value,
body.tv-mode .stat-value {
    font-size: 2.2rem;
}
html[data-tv="1"] .control-map-grid,
body.tv-mode .control-map-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
html[data-tv="1"] .control-map-tile,
body.tv-mode .control-map-tile {
    min-height: 120px;
    padding: 18px 16px;
}
html[data-tv="1"] .control-map-name,
body.tv-mode .control-map-name {
    font-size: 1.15rem;
}
html[data-tv="1"] .control-map-ctrl,
body.tv-mode .control-map-ctrl {
    font-size: 1.05rem;
}
html[data-tv="1"] .path-card-party,
body.tv-mode .path-card-party {
    font-size: 1.6rem;
}
html[data-tv="1"] .remarks-card-body,
body.tv-mode .remarks-card-body {
    font-size: 1.05rem;
    line-height: 1.7;
}
html[data-tv="1"] .header,
body.tv-mode .header {
    margin-bottom: 12px;
}
html[data-tv="1"] #tvToggle,
body.tv-mode #tvToggle {
    border-color: var(--accent-border);
    color: var(--accent);
}
html[data-tv="1"] .scenario-table,
html[data-tv="1"] .mc-table,
html[data-tv="1"] .regression-matrix,
body.tv-mode .scenario-table,
body.tv-mode .mc-table,
body.tv-mode .regression-matrix {
    font-size: 1rem;
}
html[data-tv="1"] .hero-status-grid,
body.tv-mode .hero-status-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
html[data-tv="1"] .hero-status-tile,
body.tv-mode .hero-status-tile {
    padding: 14px 8px;
}
html[data-tv="1"] .hero-status-tile .st-code,
body.tv-mode .hero-status-tile .st-code {
    font-size: 1.05rem;
}
html[data-tv="1"] .hero-net-chip,
body.tv-mode .hero-net-chip {
    font-size: 1.05rem;
    padding: 8px 14px;
}
