:root {
        --bg: #07111f;
        --bg-2: #0d1b2a;
        --panel: rgba(9, 20, 36, 0.82);
        --panel-border: rgba(148, 163, 184, 0.16);
        --text: #e5eef8;
        --muted: #8ca0b8;
        --accent: #5eead4;
        --accent-2: #f59e0b;
        --accent-3: #60a5fa;
        --good: #22c55e;
        --warn: #f59e0b;
        --bad: #ef4444;
      }
      * { box-sizing: border-box; }
      body {
        margin: 0;
        font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
        color: var(--text);
        background:
          radial-gradient(circle at top left, rgba(94, 234, 212, 0.16), transparent 30%),
          radial-gradient(circle at 80% 0, rgba(245, 158, 11, 0.18), transparent 28%),
          linear-gradient(160deg, #020617 0%, #07111f 45%, #0b1829 100%);
      }
      .shell {
        width: min(1320px, calc(100vw - 24px));
        margin: 0 auto;
        padding: 20px 0 44px;
      }
      .topbar, .filters, .content-grid, .stats-grid, .indicator-grid, .realtime-grid, .research-grid {
        display: grid;
        gap: 16px;
      }
      .topbar {
        grid-template-columns: 1.4fr auto;
        align-items: end;
        margin-bottom: 18px;
      }
      .eyebrow {
        color: var(--accent);
        text-transform: uppercase;
        letter-spacing: 0.16em;
        font-size: 12px;
      }
      h1 {
        margin: 8px 0 10px;
        font-size: clamp(32px, 5vw, 56px);
        line-height: 0.95;
      }
      .sub {
        color: var(--muted);
        max-width: 860px;
        font-size: 16px;
      }
      .lang-switch, .action-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-end;
      }
      .btn, select, input {
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        background: rgba(15, 23, 42, 0.72);
        color: var(--text);
        padding: 10px 14px;
        font: inherit;
      }
      .btn {
        cursor: pointer;
      }
      .btn.active {
        border-color: rgba(94, 234, 212, 0.5);
        color: #062825;
        background: var(--accent);
        font-weight: 700;
      }
      .btn.secondary {
        background: rgba(96, 165, 250, 0.12);
      }
      .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        margin-bottom: 18px;
      }
      .indicator-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        margin-bottom: 18px;
      }
      .realtime-grid {
        grid-template-columns: 1.15fr 0.85fr;
        margin-bottom: 18px;
      }
      .research-grid {
        margin-bottom: 18px;
      }
      .panel {
        background: var(--panel);
        border: 1px solid var(--panel-border);
        border-radius: 22px;
        padding: 18px;
        box-shadow: 0 20px 60px rgba(2, 6, 23, 0.32);
        backdrop-filter: blur(16px);
      }
      .label {
        color: var(--muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }
      .big {
        margin-top: 10px;
        font-size: 28px;
        font-weight: 700;
      }
      .indicator-value {
        margin-top: 10px;
        font-size: 26px;
        font-weight: 700;
      }
      .indicator-sub {
        margin-top: 8px;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.45;
      }
      .filters {
        grid-template-columns: 1fr 220px 220px auto;
        margin-bottom: 18px;
      }
      .content-grid {
        grid-template-columns: 1.3fr 0.7fr;
      }
      .chart-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 18px;
      }
      .research-summary-grid,
      .research-regime-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
      }
      .research-shadow-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
      }
      .research-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 16px;
      }
      .research-summary-grid {
        margin-bottom: 16px;
      }
      .research-card {
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 16px;
        padding: 14px;
        background: rgba(15, 23, 42, 0.28);
      }
      .research-list {
        display: grid;
        gap: 10px;
        margin-top: 12px;
      }
      .research-item {
        border-radius: 14px;
        padding: 12px;
        background: rgba(2, 6, 23, 0.28);
        border: 1px solid rgba(148, 163, 184, 0.08);
      }
      .research-item.ready {
        background: rgba(8, 47, 73, 0.28);
        border-color: rgba(94, 234, 212, 0.18);
        box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.08);
      }
      .research-item.watch {
        background: rgba(66, 32, 6, 0.22);
        border-color: rgba(251, 191, 36, 0.16);
      }
      .research-item.insufficient {
        background: rgba(15, 23, 42, 0.14);
        border-color: rgba(148, 163, 184, 0.06);
        opacity: 0.74;
      }
      .research-item-title {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: center;
        font-weight: 700;
      }
      .research-item-meta {
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        color: var(--muted);
        font-size: 12px;
      }
      .research-badge {
        display: inline-flex;
        align-items: center;
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(96, 165, 250, 0.14);
        color: #bfdbfe;
        font-size: 12px;
        font-weight: 700;
      }
      .research-badge.ready {
        background: rgba(20, 184, 166, 0.16);
        color: #99f6e4;
      }
      .research-badge.watch {
        background: rgba(245, 158, 11, 0.16);
        color: #fde68a;
      }
      .research-badge.insufficient {
        background: rgba(148, 163, 184, 0.12);
        color: #cbd5e1;
      }
      .research-grid-line {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin-top: 8px;
        color: var(--muted);
        font-size: 12px;
      }
      .coverage-grid {
        display: grid;
        gap: 10px;
      }
      .coverage-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 10px;
      }
      .coverage-chip {
        padding: 4px 8px;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        background: rgba(15, 23, 42, 0.32);
        color: var(--muted);
        font-size: 11px;
      }
      .coverage-chip.active {
        color: var(--text);
        border-color: rgba(96, 165, 250, 0.28);
        background: rgba(96, 165, 250, 0.12);
      }
      .coverage-item {
        display: grid;
        gap: 6px;
        padding: 12px;
        border-radius: 14px;
        background: rgba(2, 6, 23, 0.28);
        border: 1px solid rgba(148, 163, 184, 0.08);
      }
      .coverage-item-head {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        align-items: baseline;
      }
      .coverage-bar {
        height: 8px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.12);
        overflow: hidden;
      }
      .coverage-fill {
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(96, 165, 250, 0.85), rgba(94, 234, 212, 0.8));
      }
      .coverage-maturity {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 3px 8px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 700;
      }
      .coverage-maturity.ready {
        color: #bbf7d0;
        background: rgba(34, 197, 94, 0.16);
      }
      .coverage-maturity.watch {
        color: #fde68a;
        background: rgba(245, 158, 11, 0.16);
      }
      .coverage-maturity.insufficient {
        color: #fecaca;
        background: rgba(239, 68, 68, 0.16);
      }
      .shadow-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 12px;
      }
      .shadow-legend-item {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--muted);
        font-size: 12px;
      }
      .shadow-legend-line {
        width: 18px;
        height: 3px;
        border-radius: 999px;
      }
      .shadow-chart-wrap {
        display: grid;
        gap: 12px;
      }
      .shadow-factor-picker {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
        margin-bottom: 12px;
      }
      #factorShadowContext {
        margin-top: 6px;
        margin-bottom: 6px;
      }
      .shadow-factor-chip {
        border: 1px solid rgba(148, 163, 184, 0.16);
        background: rgba(15, 23, 42, 0.38);
        color: var(--muted);
        border-radius: 999px;
        padding: 6px 10px;
        cursor: pointer;
        font-size: 12px;
      }
      .shadow-factor-chip.active {
        border-color: rgba(94, 234, 212, 0.4);
        color: var(--text);
        background: rgba(20, 184, 166, 0.16);
      }
      .shadow-chart-label {
        display: flex;
        justify-content: space-between;
        color: var(--muted);
        font-size: 12px;
      }
      .shadow-chart-svg {
        width: 100%;
        height: 180px;
        display: block;
      }
      .shadow-axis-grid {
        display: grid;
        grid-template-columns: 80px 1fr 80px;
        gap: 10px;
        align-items: stretch;
      }
      .shadow-axis {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        color: var(--muted);
        font-size: 12px;
      }
      .shadow-axis.right {
        text-align: right;
      }
      .shadow-axis-title {
        font-size: 11px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: rgba(226, 232, 240, 0.66);
      }
      .shadow-axis-value {
        display: block;
      }
      .tabs {
        display: flex;
        gap: 10px;
        margin-bottom: 14px;
      }
      .tab {
        border: none;
        background: transparent;
        color: var(--muted);
        padding: 8px 12px;
        border-bottom: 2px solid transparent;
        cursor: pointer;
      }
      .tab.active {
        color: var(--text);
        border-color: var(--accent);
      }
      .section-title {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
        margin-bottom: 14px;
      }
      table {
        width: 100%;
        border-collapse: collapse;
      }
      th, td {
        text-align: left;
        padding: 12px 8px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.10);
        vertical-align: top;
      }
      th {
        font-size: 12px;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }
      .event-row { cursor: pointer; }
      .event-row:hover { background: rgba(96, 165, 250, 0.06); }
      .pill {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
      }
      .pill.low { background: rgba(34, 197, 94, 0.15); color: #86efac; }
      .pill.medium { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
      .pill.high, .pill.critical { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
      .mono { font-family: "IBM Plex Mono", monospace; }
      .muted { color: var(--muted); }
      .detail-card {
        display: grid;
        gap: 16px;
      }
      .detail-title {
        font-size: 24px;
        line-height: 1.2;
        margin: 0;
      }
      .kv {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 10px;
        font-size: 14px;
      }
      .kv .k { color: var(--muted); }
      .source-list, .source-list li { list-style: none; padding: 0; margin: 0; }
      .source-list li {
        padding: 12px 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
      }
      .status-ok { color: #86efac; }
      .status-bad { color: #fca5a5; }
      .hidden { display: none !important; }
      a { color: var(--accent-3); text-decoration: none; }
      .bar-chart, .timeline {
        display: grid;
        gap: 12px;
      }
      .bar-row {
        display: grid;
        grid-template-columns: 120px 1fr 44px;
        gap: 10px;
        align-items: center;
      }
      .bar-track {
        width: 100%;
        height: 10px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.12);
        overflow: hidden;
      }
      .bar-fill {
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--accent), var(--accent-3));
      }
      .timeline-row {
        display: grid;
        grid-template-columns: 90px 1fr 48px;
        gap: 10px;
        align-items: center;
      }
      .timeline-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        display: inline-block;
      }
      .timeline-line {
        height: 8px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.12);
        overflow: hidden;
      }
      .timeline-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--accent-2), var(--accent));
      }
      .event-columns {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 14px;
      }
      .event-column {
        border: 1px solid rgba(148, 163, 184, 0.10);
        border-radius: 18px;
        background: rgba(7, 17, 31, 0.42);
        padding: 14px;
        min-height: 420px;
      }
      .event-column.hidden {
        display: none;
      }
      .column-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 8px;
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.10);
      }
      .column-title {
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }
      .column-count {
        color: var(--muted);
        font-size: 12px;
      }
      .column-list {
        display: grid;
        gap: 10px;
      }
      .event-card {
        padding: 12px;
        border-radius: 14px;
        border: 1px solid rgba(148, 163, 184, 0.08);
        background: rgba(15, 23, 42, 0.46);
        cursor: pointer;
        transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
      }
      .event-card:hover {
        transform: translateY(-1px);
        border-color: rgba(94, 234, 212, 0.28);
        background: rgba(15, 23, 42, 0.70);
      }
      .event-card.active {
        border-color: rgba(94, 234, 212, 0.55);
        box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.18);
      }
      .event-card-title {
        font-size: 15px;
        line-height: 1.35;
        margin-bottom: 8px;
      }
      .event-card-meta {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 8px;
      }
      .event-card-summary {
        color: var(--muted);
        font-size: 13px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }
      .realtime-metrics {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
        margin-bottom: 14px;
      }
      .metric-card {
        border: 1px solid rgba(148, 163, 184, 0.10);
        border-radius: 16px;
        padding: 12px;
        background: rgba(15, 23, 42, 0.42);
      }
      .metric-value {
        font-size: 20px;
        font-weight: 700;
        margin-top: 8px;
      }
      .mini-chart-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 12px;
        margin-bottom: 12px;
      }
      .mini-chart-card {
        border: 1px solid rgba(148, 163, 184, 0.10);
        border-radius: 16px;
        padding: 12px;
        background: rgba(15, 23, 42, 0.42);
      }
      .mini-chart-svg {
        width: 100%;
        height: 90px;
        display: block;
        margin: 8px 0 10px;
      }
      .mini-chart-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
      }
      .mini-chart-stat {
        padding-top: 8px;
        border-top: 1px solid rgba(148, 163, 184, 0.10);
      }
      .mini-chart-value {
        font-size: 14px;
        font-weight: 700;
        margin-top: 4px;
      }
      .mini-chart-positive { color: #86efac; }
      .mini-chart-negative { color: #fca5a5; }
      .rolling-grid {
        display: grid;
        grid-template-columns: 1.35fr 0.65fr;
        gap: 12px;
      }
      .rolling-card {
        border: 1px solid rgba(148, 163, 184, 0.10);
        border-radius: 16px;
        padding: 12px;
        background: rgba(15, 23, 42, 0.42);
      }
      .rolling-subgrid {
        display: grid;
        gap: 10px;
      }
      .rolling-tabs {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 10px;
      }
      .rolling-tab {
        border: 1px solid rgba(148, 163, 184, 0.14);
        background: rgba(7, 17, 31, 0.4);
        color: var(--muted);
        border-radius: 999px;
        padding: 6px 10px;
        cursor: pointer;
        font-size: 12px;
      }
      .rolling-tab.active {
        color: var(--text);
        border-color: rgba(94, 234, 212, 0.45);
        background: rgba(94, 234, 212, 0.10);
      }
      .rolling-row-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
      }
      .rolling-svg {
        width: 100%;
        height: 74px;
        display: block;
        margin-top: 8px;
      }
      .gate-history {
        display: grid;
        gap: 10px;
      }
      .gate-bars {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(6px, 1fr);
        align-items: end;
        gap: 4px;
        height: 120px;
      }
      .gate-bar {
        border-radius: 10px 10px 4px 4px;
        min-height: 12px;
        background: rgba(148, 163, 184, 0.18);
      }
      .gate-bar.normal { background: rgba(34, 197, 94, 0.55); }
      .gate-bar.caution { background: rgba(245, 158, 11, 0.75); }
      .gate-bar.tighten, .gate-bar.block { background: rgba(239, 68, 68, 0.8); }
      .gate-labels {
        display: flex;
        justify-content: space-between;
        color: var(--muted);
        font-size: 12px;
      }
      .gate-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        color: var(--muted);
        font-size: 12px;
      }
      .gate-legend-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .gate-legend-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
      }
      .alert-list {
        display: grid;
        gap: 10px;
      }
      .alert-card {
        border: 1px solid rgba(148, 163, 184, 0.10);
        border-radius: 14px;
        padding: 12px;
        background: rgba(15, 23, 42, 0.42);
      }
      .alert-card.high, .alert-card.critical {
        border-color: rgba(239, 68, 68, 0.35);
      }
      .alert-meta {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 8px;
      }
      .lane-tools {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 12px;
      }
      .mini-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        background: rgba(15, 23, 42, 0.62);
        padding: 8px 12px;
        color: var(--muted);
        cursor: pointer;
        user-select: none;
        font-size: 13px;
      }
      .mini-toggle.active {
        color: var(--text);
        border-color: rgba(94, 234, 212, 0.45);
        background: rgba(94, 234, 212, 0.10);
      }
      .mini-toggle-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(148, 163, 184, 0.5);
      }
      .mini-toggle.active .mini-toggle-dot {
        background: var(--accent);
      }
      @media (max-width: 1080px) {
        .content-grid, .topbar, .filters, .chart-grid, .realtime-grid, .rolling-grid, .research-summary-grid, .research-regime-grid { grid-template-columns: 1fr; }
        .lang-switch, .action-row { justify-content: flex-start; }
        .event-columns { grid-template-columns: 1fr; }
        .research-toolbar { flex-direction: column; }
      }
