﻿:root {
    --bg: #000000;
    --bg-panel: #111318;
    --bg-panel-2: #1a1d24;
    --bg-elevated: #232733;
    --border: #2b3340;
    --border-strong: #3d4656;
    --text: #e8eaf0;
    --muted: #8892a0;
    --accent: #4a9fe0;
    --positive: #00c896;
    --negative: #e84040;
    --warning: #f5a623;
    --secondary-data: #2aa6a1;
    --fx-accent: #9b8cff;
    --commodity-accent: #f9735b;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
    --radius-lg: 8px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --grid-gap: 18px;
}

.myfxbook-outlook-panel {
    overflow: hidden;
}

.fx-outlook-native {
    padding: 18px;
}

.fx-outlook-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.fx-outlook-summary article {
    border: 1px solid var(--border);
    background: var(--panel-2);
    border-radius: 8px;
    padding: 14px;
}

.fx-outlook-summary span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fx-outlook-summary strong {
    color: var(--text-heading);
    font-family: var(--mono);
    font-size: 22px;
}

.fx-outlook-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.fx-outlook-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.fx-outlook-table th,
.fx-outlook-table td {
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    color: var(--text-body);
    text-align: left;
    vertical-align: middle;
}

.fx-outlook-table th {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fx-outlook-table tr:last-child td {
    border-bottom: 0;
}

.fx-outlook-table td strong {
    color: var(--text-heading);
    font-family: var(--mono);
    letter-spacing: .04em;
}

.fx-trend,
.fx-popularity {
    display: flex;
    width: 100%;
    max-width: 260px;
    height: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, .05);
    border-radius: 999px;
}

.fx-trend span {
    background: #D85A30;
}

.fx-trend i {
    background: #1D9E75;
}

.fx-trend.is-neutral span,
.fx-trend.is-neutral i {
    opacity: .68;
}

.fx-popularity span {
    background: linear-gradient(90deg, #f7d365, #f4a742);
}

.fx-outlook-table small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
}

.myfxbook-source-toggle {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, .015);
}

.myfxbook-source-toggle summary {
    cursor: pointer;
    padding: 12px 18px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.myfxbook-widget-wrap {
    min-height: 420px;
    overflow-x: auto;
    padding: 18px;
    background: var(--panel-2, #111318);
}

.myfxbook-widget-wrap iframe,
.myfxbook-widget-wrap table {
    max-width: 100%;
}

.myfxbook-powered {
    margin-top: 10px;
    font-size: 10px;
}

.myfxbook-powered a {
    color: var(--text-muted, #8892a0);
}

@media (max-width: 760px) {
    .fx-outlook-summary {
        grid-template-columns: 1fr;
    }
}

/* COT analysis dashboard */
.cot-dashboard {
    --cot-bg: #0b0d11;
    --cot-panel: #12161d;
    --cot-panel-2: #171c24;
    --cot-border: rgba(148, 163, 184, .2);
    --cot-grid: rgba(148, 163, 184, .16);
    --cot-text: #f4f5f7;
    --cot-muted: #9da4ae;
    --cot-bull: #1D9E75;
    --cot-bear: #D85A30;
    --cot-neutral: #888780;
    min-height: 100vh;
    color: var(--cot-text);
}

.cot-dashboard.cot-light {
    --cot-bg: #f6f7f8;
    --cot-panel: #ffffff;
    --cot-panel-2: #eef1f4;
    --cot-border: rgba(22, 29, 36, .16);
    --cot-grid: rgba(22, 29, 36, .12);
    --cot-text: #151922;
    --cot-muted: #58606b;
}

.cot-dashboard__header,
.cot-status-panel,
.cot-price-input,
.cot-panel {
    border: 1px solid var(--cot-border);
    background: var(--cot-panel);
    border-radius: 8px;
}

.cot-dashboard__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    margin-bottom: 14px;
}

.cot-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--cot-muted);
    font-family: var(--mono, monospace);
    font-size: 11px;
    text-transform: uppercase;
}

.cot-dashboard h1 {
    margin: 0 0 8px;
    color: var(--cot-text);
    font-size: 28px;
}

.cot-dashboard p {
    margin: 0;
    color: var(--cot-muted);
    line-height: 1.55;
}

.cot-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cot-actions button,
.cot-price-input button,
.cot-tabs button {
    border: 1px solid var(--cot-border);
    background: var(--cot-panel-2);
    color: var(--cot-text);
    border-radius: 6px;
    min-height: 34px;
    padding: 0 12px;
    font: 600 11px var(--mono, monospace);
    text-transform: uppercase;
    cursor: pointer;
}

.cot-actions button:hover,
.cot-price-input button:hover,
.cot-tabs button:hover,
.cot-tabs button.is-active {
    border-color: var(--cot-bull);
    color: var(--cot-bull);
}

.cot-status-panel {
    padding: 14px 16px;
    margin-bottom: 14px;
}

.cot-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--cot-text);
}

.cot-loading[hidden],
.cot-error-box[hidden] {
    display: none;
}

.cot-loading span {
    width: 16px;
    height: 16px;
    border: 2px solid var(--cot-border);
    border-top-color: var(--cot-bull);
    border-radius: 999px;
    animation: cot-spin .8s linear infinite;
}

@keyframes cot-spin {
    to { transform: rotate(360deg); }
}

.cot-error-box {
    margin-bottom: 8px;
    border: 1px solid rgba(216, 90, 48, .45);
    background: rgba(216, 90, 48, .1);
    color: var(--cot-bear);
    border-radius: 6px;
    padding: 10px 12px;
}

.cot-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--cot-muted);
    font: 500 11px var(--mono, monospace);
}

.cot-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cot-price-input {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

.cot-price-input label {
    color: var(--cot-muted);
    font: 600 11px var(--mono, monospace);
    text-transform: uppercase;
}

.cot-price-input textarea {
    width: 100%;
    min-height: 44px;
    resize: vertical;
    border: 1px solid var(--cot-border);
    background: var(--cot-panel-2);
    color: var(--cot-text);
    border-radius: 6px;
    padding: 8px 10px;
    font: 12px var(--mono, monospace);
}

.cot-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.cot-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cot-panel {
    padding: 14px;
}

.cot-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.cot-panel header span {
    color: var(--cot-text);
    font-weight: 700;
}

.cot-panel header em {
    color: var(--cot-muted);
    font: 500 11px var(--mono, monospace);
    font-style: normal;
}

.cot-chart-box {
    height: 300px;
}

.cot-insight {
    min-height: 42px;
    margin-top: 12px !important;
    border-top: 1px solid var(--cot-border);
    padding-top: 10px;
    color: var(--cot-muted);
    font-size: 13px;
}

.cot-extreme-current {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--cot-panel-2);
    border-radius: 6px;
}

.cot-extreme-current strong {
    font-size: 22px;
}

.cot-extreme-current span {
    color: var(--cot-muted);
    font: 500 11px var(--mono, monospace);
}

.cot-extreme-list {
    display: grid;
    gap: 8px;
}

.cot-extreme-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    font: 600 11px var(--mono, monospace);
}

.cot-extreme-row span {
    height: 8px;
    overflow: hidden;
    background: var(--cot-panel-2);
    border-radius: 999px;
}

.cot-extreme-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.cot-divergence-card {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 18px;
    background: var(--cot-panel-2);
    border-radius: 8px;
}

.cot-divergence-card span {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font: 700 11px var(--mono, monospace);
    text-transform: uppercase;
}

.cot-divergence-card span.bullish { background: var(--cot-bull); }
.cot-divergence-card span.bearish { background: var(--cot-bear); }
.cot-divergence-card span.neutral { background: var(--cot-neutral); }

.cot-divergence-card strong {
    color: var(--cot-text);
    font-size: 22px;
}

.cot-signal-list {
    display: grid;
    gap: 8px;
}

.cot-signal-list div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--cot-border);
    padding-bottom: 8px;
    color: var(--cot-muted);
    font-size: 12px;
}

.cot-signal-list strong {
    color: var(--cot-text);
}

.cot-table-wrap {
    overflow-x: auto;
}

.cot-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.cot-table th,
.cot-table td {
    border-bottom: 1px solid var(--cot-border);
    padding: 9px 8px;
    text-align: left;
    color: var(--cot-muted);
    font: 500 12px var(--mono, monospace);
}

.cot-table th {
    color: var(--cot-text);
    text-transform: uppercase;
    font-size: 10px;
}

.cot-table td strong {
    color: var(--cot-text);
}

@media (max-width: 980px) {
    .cot-dashboard__header,
    .cot-meta-row {
        flex-direction: column;
    }

    .cot-grid--two,
    .cot-price-input {
        grid-template-columns: 1fr;
    }

    .cot-chart-box {
        height: 260px;
    }
}

@media (max-width: 620px) {
    .cot-dashboard h1 {
        font-size: 23px;
    }

    .cot-tabs button {
        flex: 1 1 64px;
    }

    .cot-panel {
        padding: 12px;
    }
}

/* Black terminal dashboard shell */
.black-terminal-shell {
    --bt-bg0: #000000;
    --bt-bg1: #0a0a0a;
    --bt-bg2: #111111;
    --bt-bg3: #191919;
    --bt-border: #1f1f1f;
    --bt-border2: #2a2a2a;
    --bt-text: #e8e8e8;
    --bt-muted: #888888;
    --bt-dim: #444444;
    --bt-blue: #3b82f6;
    --bt-blue-dim: #0f2040;
    --bt-green: #22c55e;
    --bt-green-dim: #0a2a14;
    --bt-red: #ef4444;
    --bt-red-dim: #2a0a0a;
    --bt-amber: #f59e0b;
    --bt-amber-dim: #2a1a00;
    --bt-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 620px;
    overflow: hidden;
    background: var(--bt-bg0);
    color: var(--bt-text);
}

.black-terminal-shell a {
    color: inherit;
    text-decoration: none;
}

.black-sidebar {
    z-index: 10;
    display: flex;
    flex: 0 0 54px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 54px;
    padding: 12px 0;
    border-right: 1px solid var(--bt-border);
    background: var(--bt-bg1);
    transition: width 0.18s ease, flex-basis 0.18s ease;
}

.black-sidebar.is-expanded {
    flex-basis: 208px;
    width: 208px;
    align-items: flex-start;
}

.black-sidebar__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0 12px 8px;
    border-radius: 4px;
    background: var(--bt-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.black-sidebar__nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    width: 100%;
}

.black-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 34px;
    padding: 8px 12px 8px 10px;
    overflow: hidden;
    border-left: 2px solid transparent;
    color: var(--bt-dim);
    font-size: 12px;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.black-nav-item:hover,
.black-nav-item.is-active {
    background: var(--bt-bg2);
    color: var(--bt-text);
}

.black-nav-item.is-active {
    border-left-color: var(--bt-blue);
}

.black-nav-icon {
    display: inline-flex;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    color: var(--bt-muted);
    font-family: var(--bt-mono);
    font-size: 9px;
    font-weight: 700;
}

.black-nav-item span:last-child {
    opacity: 0;
    transition: opacity 0.12s ease;
}

.black-sidebar.is-expanded .black-nav-item span:last-child {
    opacity: 1;
}

.black-nav-divider {
    width: calc(100% - 24px);
    height: 1px;
    margin: 8px 12px;
    background: var(--bt-border);
}

.black-sidebar__toggle {
    width: 28px;
    height: 28px;
    margin: auto 12px 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--bt-dim);
    cursor: pointer;
    font-family: var(--bt-mono);
    font-size: 11px;
}

.black-sidebar__toggle:hover {
    background: var(--bt-bg2);
    color: var(--bt-muted);
}

.black-workspace {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
}

.black-topbar {
    display: flex;
    flex: 0 0 46px;
    align-items: center;
    gap: 16px;
    height: 46px;
    padding: 0 20px;
    border-bottom: 1px solid var(--bt-border);
    background: var(--bt-bg1);
}

.black-topbar h1 {
    margin: 0;
    color: var(--bt-text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
}

.black-topbar p {
    margin: 1px 0 0;
    color: var(--bt-dim);
    font-size: 11px;
}

.black-search {
    display: flex;
    flex: 1;
    max-width: 360px;
    min-width: 180px;
    gap: 6px;
}

.black-search input,
.black-search button,
.black-terminal-shell select {
    border: 1px solid var(--bt-border);
    border-radius: 4px;
    background: var(--bt-bg2);
    color: var(--bt-text);
    font-size: 12px;
    outline: none;
}

.black-search input {
    width: 100%;
    padding: 6px 10px;
}

.black-search input::placeholder {
    color: var(--bt-dim);
}

.black-search input:focus,
.black-terminal-shell select:focus {
    border-color: #1d3a6e;
}

.black-search button {
    padding: 0 11px;
    color: var(--bt-muted);
    cursor: pointer;
}

.black-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}

.black-pill {
    padding: 2px 8px;
    border-radius: 3px;
    font-family: var(--bt-mono);
    font-size: 10px;
    font-weight: 700;
}

.black-pill--green {
    border: 1px solid #0f3d1a;
    background: var(--bt-green-dim);
    color: var(--bt-green);
}

.black-pill--red {
    border: 1px solid #3d0f0f;
    background: var(--bt-red-dim);
    color: var(--bt-red);
}

.black-pill--amber {
    border: 1px solid #3d2800;
    background: var(--bt-amber-dim);
    color: var(--bt-amber);
}

.black-pill--blue {
    border: 1px solid #1a2f4d;
    background: var(--bt-blue-dim);
    color: var(--bt-blue);
}

.black-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 14px 18px;
}

.black-content::-webkit-scrollbar {
    width: 4px;
}

.black-content::-webkit-scrollbar-thumb {
    background: var(--bt-border2);
}

.black-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.black-kpi-card,
.black-panel {
    border: 1px solid var(--bt-border);
    border-radius: 5px;
    background: var(--bt-bg1);
}

.black-kpi-card {
    padding: 10px 12px;
    background: var(--bt-bg2);
}

.black-kpi-card span,
.black-panel__head {
    color: var(--bt-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.black-kpi-card strong {
    display: block;
    margin-top: 4px;
    color: var(--bt-text);
    font-family: var(--bt-mono);
    font-size: 18px;
    line-height: 1;
}

.black-kpi-card small {
    display: block;
    margin-top: 4px;
    color: var(--bt-dim);
    font-size: 11px;
}

.black-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(560px, 1.12fr) minmax(360px, 0.9fr) 320px;
    gap: 10px;
    align-items: start;
}

.black-panel--ranking {
    grid-column: 1;
}

.black-panel {
    overflow: hidden;
}

.black-panel__head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--bt-border);
}

.black-panel__head a,
.black-panel__head em {
    margin-left: auto;
    color: var(--bt-dim);
    font-style: normal;
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
}

.black-panel__head a:hover {
    color: var(--bt-blue);
}

.black-table-wrap {
    overflow-x: auto;
}

.black-fx-table {
    width: 100%;
    border-collapse: collapse;
}

.black-fx-table th,
.black-fx-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--bt-border);
    text-align: left;
    vertical-align: middle;
}

.black-fx-table th {
    color: var(--bt-dim);
    font-size: 10px;
    font-weight: 700;
}

.black-fx-table tbody tr {
    cursor: pointer;
}

.black-fx-table tbody tr:hover td {
    background: var(--bt-bg3);
}

.black-rank,
.black-score,
.black-ccy-link strong,
.black-rate-cell strong,
.black-surprise__value {
    font-family: var(--bt-mono);
}

.black-rank {
    color: var(--bt-dim);
    font-size: 11px;
}

.black-ccy-link {
    display: grid;
    gap: 1px;
}

.black-ccy-link strong {
    color: var(--bt-text);
    font-size: 13px;
}

.black-ccy-link small,
.black-surprise small,
.black-rate-cell small,
.black-headline small,
.black-country-card small {
    color: var(--bt-dim);
    font-size: 11px;
}

.black-score-bar {
    position: relative;
    display: block;
    width: 72px;
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--bt-bg3);
}

.black-score-bar__fill {
    display: block;
    height: 100%;
    border-radius: 2px;
}

.black-score-bar__fill--bull {
    background: var(--bt-green);
}

.black-score-bar__fill--bear {
    background: var(--bt-red);
}

.black-score-bar__fill--neut {
    background: var(--bt-blue);
}

.black-stance {
    display: inline-flex;
    padding: 2px 5px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.black-stance--bull {
    background: var(--bt-green-dim);
    color: var(--bt-green);
}

.black-stance--bear {
    background: var(--bt-red-dim);
    color: var(--bt-red);
}

.black-stance--neut {
    background: var(--bt-blue-dim);
    color: var(--bt-blue);
}

.black-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--bt-dim);
}

.black-dot.is-positive,
.black-terminal-shell .is-positive {
    color: var(--bt-green) !important;
}

.black-dot.is-positive {
    background: var(--bt-green);
}

.black-dot.is-negative,
.black-terminal-shell .is-negative {
    color: var(--bt-red) !important;
}

.black-dot.is-negative {
    background: var(--bt-red);
}

.black-dot.is-neutral,
.black-terminal-shell .is-blue {
    color: var(--bt-blue) !important;
}

.black-dot.is-neutral {
    background: var(--bt-blue);
}

.black-terminal-shell .is-warning {
    color: var(--bt-amber) !important;
}

.black-surprise-list,
.black-calendar-list,
.black-headline-list {
    display: flex;
    flex-direction: column;
}

.black-surprise,
.black-calendar-item,
.black-headline {
    display: flex;
    gap: 10px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--bt-border);
}

.black-surprise:hover,
.black-calendar-item:hover,
.black-headline:hover,
.black-rate-cell:hover,
.black-ccy-card:hover,
.black-country-card:hover {
    background: var(--bt-bg3);
}

.black-surprise__ccy {
    flex: 0 0 34px;
    color: var(--bt-muted);
    font-family: var(--bt-mono);
    font-size: 12px;
    font-weight: 700;
}

.black-surprise__body,
.black-headline {
    min-width: 0;
}

.black-surprise__body {
    display: grid;
    flex: 1;
    gap: 2px;
}

.black-surprise__body strong,
.black-headline strong,
.black-calendar-item strong {
    color: var(--bt-text);
    font-size: 12px;
    font-weight: 600;
}

.black-surprise__value {
    margin-left: auto;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
}

.black-side-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    grid-column: 3;
    grid-row: 1 / span 2;
}

.black-calendar-controls,
.black-panel-tools {
    display: flex;
    gap: 6px;
    align-items: center;
}

.black-calendar-controls {
    padding: 8px 13px;
    border-bottom: 1px solid var(--bt-border);
}

.black-calendar-controls select,
.black-panel-tools select,
.black-panel__head select {
    min-height: 28px;
    padding: 0 8px;
    color: var(--bt-muted);
}

.black-calendar-item {
    align-items: center;
}

.black-calendar-item > span {
    flex: 0 0 42px;
    color: var(--bt-dim);
    font-family: var(--bt-mono);
    font-size: 11px;
}

.black-calendar-item i {
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: var(--bt-dim);
}

.black-calendar-item i.impact-high {
    background: var(--bt-red);
}

.black-calendar-item i.impact-medium {
    background: var(--bt-amber);
}

.black-calendar-item strong {
    display: grid;
    flex: 1;
    gap: 1px;
}

.black-calendar-item em {
    color: var(--bt-muted);
    font-family: var(--bt-mono);
    font-size: 11px;
    font-style: normal;
}

.black-rates-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.black-rate-cell {
    display: grid;
    gap: 3px;
    min-height: 74px;
    padding: 9px 13px;
    border-right: 1px solid var(--bt-border);
    border-bottom: 1px solid var(--bt-border);
}

.black-rate-cell:nth-child(even) {
    border-right: 0;
}

.black-rate-cell span {
    color: var(--bt-dim);
    font-family: var(--bt-mono);
    font-size: 10px;
}

.black-rate-cell strong {
    color: var(--bt-text);
    font-size: 14px;
}

.black-ccy-cards {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 13px;
}

.black-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    gap: 10px;
}

.black-ccy-card {
    position: relative;
    display: grid;
    flex: 0 0 72px;
    gap: 3px;
    min-height: 86px;
    padding: 8px 10px;
    border: 1px solid var(--bt-border);
    border-radius: 4px;
    background: var(--bt-bg3);
}

.black-ccy-card span {
    color: var(--bt-muted);
    font-family: var(--bt-mono);
    font-size: 12px;
    font-weight: 700;
}

.black-ccy-card strong {
    font-family: var(--bt-mono);
    font-size: 18px;
}

.black-ccy-card .black-score-bar {
    width: 100%;
    margin-top: 2px;
}

.black-ccy-card .black-score-bar b {
    position: absolute;
    top: -3px;
    display: block;
    width: 2px;
    height: 10px;
    background: var(--bt-text);
}

.black-segments {
    display: inline-flex;
    border: 1px solid var(--bt-border);
    border-radius: 4px;
    overflow: hidden;
}

.black-segments button {
    min-height: 26px;
    padding: 0 8px;
    border: 0;
    border-right: 1px solid var(--bt-border);
    background: var(--bt-bg2);
    color: var(--bt-dim);
    cursor: pointer;
    font-size: 11px;
}

.black-segments button:last-child {
    border-right: 0;
}

.black-segments button.is-active,
.black-segments button:hover {
    color: var(--bt-text);
    background: var(--bt-bg3);
}

.black-headline {
    display: grid;
    gap: 3px;
}

.black-headline span {
    color: var(--bt-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.black-country-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(98px, 1fr));
    gap: 6px;
    padding: 10px 13px;
}

.black-country-card {
    display: grid;
    gap: 4px;
    min-height: 78px;
    padding: 9px 10px;
    border: 1px solid var(--bt-border);
    border-radius: 4px;
    background: var(--bt-bg2);
}

.black-country-card strong {
    color: var(--bt-text);
    font-family: var(--bt-mono);
    font-size: 13px;
}

.black-country-card span {
    color: var(--bt-muted);
    font-size: 12px;
}

.black-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 13px 13px;
}

.black-chart-grid > div {
    min-width: 0;
    border: 1px solid var(--bt-border);
    border-radius: 4px;
    background: var(--bt-bg2);
}

.black-chart-grid > div > span {
    display: block;
    padding: 8px 10px 0;
    color: var(--bt-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.black-chart {
    width: 100%;
    height: 260px;
}

.black-empty {
    padding: 14px 13px;
    color: var(--bt-dim);
    font-size: 12px;
}

.black-statusbar {
    display: flex;
    flex: 0 0 24px;
    align-items: center;
    gap: 16px;
    height: 24px;
    padding: 0 16px;
    border-top: 1px solid var(--bt-border);
    background: var(--bt-bg1);
}

.black-statusbar span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--bt-dim);
    font-family: var(--bt-mono);
    font-size: 10px;
}

.black-statusbar span:last-child {
    margin-left: auto;
}

.black-statusbar i {
    width: 5px;
    height: 5px;
    border-radius: 99px;
    background: currentColor;
}

@media (max-width: 1260px) {
    .black-dashboard-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
    }

    .black-side-stack {
        grid-column: 1 / -1;
        grid-row: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .black-panel--ranking {
        grid-column: auto;
    }

    .black-country-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .black-terminal-shell {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .black-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        height: 100vh;
    }

    .black-workspace {
        margin-left: 54px;
        min-height: 100vh;
    }

    .black-topbar {
        height: auto;
        min-height: 46px;
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .black-pills {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .black-content {
        overflow: visible;
        padding: 10px;
    }

    .black-kpi-row,
    .black-dashboard-grid,
    .black-lower-grid,
    .black-side-stack,
    .black-chart-grid {
        grid-template-columns: 1fr;
    }

    .black-country-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .black-statusbar {
        flex-wrap: wrap;
        height: auto;
        min-height: 24px;
        padding: 5px 10px;
    }
}

/* Bank research report-library layout */
.has-black-global-sidebar .research-workbench {
    height: 100vh;
    overflow: hidden;
    padding: 0;
}

.research-workbench__topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-sidebar);
}

.research-workbench__topbar strong {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.research-workbench__topbar > span {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.research-workbench__top-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.research-workbench__top-actions form {
    display: contents;
}

.research-workbench__top-actions a,
.research-workbench__top-actions button {
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid var(--border-focus);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.research-terminal-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    height: calc(100vh - 44px);
    overflow: hidden;
}

.research-terminal-filters {
    overflow-y: auto;
    border-right: 1px solid var(--border-subtle);
    background: var(--bg-sidebar);
}

.research-terminal-filters__head {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 800;
}

.research-terminal-search {
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.research-terminal-search input {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--border-focus);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.research-filter-block {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.research-filter-block > span {
    display: block;
    margin-bottom: 7px;
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.research-filter-block select {
    width: 100%;
    min-height: 28px;
    border-radius: 4px;
}

.research-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.research-chip-row button {
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid var(--border-focus);
    border-radius: 3px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
}

.research-chip-row button.is-active {
    border-color: rgba(16, 185, 129, 0.45);
    background: var(--color-positive-bg);
    color: var(--color-positive);
}

.research-bank-list {
    padding-left: 0;
    padding-right: 0;
}

.research-bank-list > span {
    padding: 0 12px;
}

.research-bank-item {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.research-bank-item:hover {
    background: var(--bg-card);
}

.research-bank-item strong {
    color: var(--text-primary);
    font-size: 11px;
}

.research-bank-item small {
    color: var(--text-secondary);
    font-size: 10px;
}

.research-bank-item .research-outlook {
    position: absolute;
    top: 8px;
    right: 8px;
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.research-report-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-app);
}

.has-black-global-sidebar .research-terminal-card {
    padding: 13px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
}

.research-terminal-card__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.research-bank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: #fce7f3;
    color: #9d174d;
    font-size: 10px;
    font-weight: 800;
}

.research-terminal-card__top strong {
    color: var(--text-primary);
    font-size: 13px;
}

.research-terminal-card__top small {
    margin-left: auto;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
}

.research-terminal-card h2 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.research-terminal-card p {
    margin: 0;
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.5;
}

.research-terminal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.research-terminal-tags span {
    padding: 2px 7px;
    border: 1px solid var(--border-focus);
    border-radius: 3px;
    background: var(--bg-sidebar);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
}

.research-terminal-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.research-terminal-card__footer > span {
    color: var(--text-primary);
    font-size: 11px;
}

.research-terminal-card__footer > div {
    display: flex;
    gap: 6px;
}

.research-terminal-card__footer button,
.research-terminal-card__footer a {
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--border-focus);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.research-assets--hidden {
    display: none;
}

@media (max-width: 980px) {
    .research-terminal-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .has-black-global-sidebar .research-workbench {
        height: auto;
        overflow: visible;
    }

    .research-terminal-filters,
    .research-report-feed {
        overflow: visible;
    }
}

/* Country detail terminal layout */
.has-black-global-sidebar .country-terminal {
    height: 100vh;
    overflow-y: auto;
    padding: 0;
    background: var(--bg-app);
}

.country-terminal__topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-sidebar);
}

.country-terminal__topbar div {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.country-terminal__topbar a,
.country-terminal__topbar strong {
    color: var(--text-primary);
    text-decoration: none;
}

.country-terminal__badge {
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--color-positive-bg);
    color: var(--color-positive);
    font-weight: 700;
}

.country-terminal__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.country-terminal__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.country-terminal__title-row h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
}

.country-terminal__title-row > div {
    display: flex;
    gap: 8px;
}

.country-terminal__title-row span {
    padding: 4px 10px;
    border: 1px solid var(--border-focus);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 11px;
}

.country-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.country-kpi-grid article,
.country-terminal-card {
    border: 1px solid var(--border-focus);
    border-radius: 8px;
    background: #2d2d2a;
}

.country-kpi-grid article {
    min-height: 94px;
    padding: 12px;
}

.country-kpi-grid span,
.country-terminal-card header span {
    color: var(--text-secondary);
    font-size: 11px;
}

.country-kpi-grid article > span {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.country-kpi-grid strong {
    display: block;
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1.15;
}

.country-kpi-grid small {
    color: var(--text-secondary);
    font-size: 11px;
}

.country-kpi-card {
    position: relative;
}

.country-kpi-card::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--color-neutral);
    opacity: 0.75;
}

.country-kpi-card.is-positive::before {
    background: var(--color-positive);
}

.country-kpi-card.is-negative::before {
    background: var(--color-negative);
}

.country-kpi-card.is-positive strong {
    color: var(--color-positive);
}

.country-kpi-card.is-negative strong {
    color: var(--color-negative);
}

.country-kpi-card.is-neutral strong {
    color: var(--text-primary);
}

.country-terminal-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 12px;
}

.country-terminal-card {
    overflow: hidden;
}

.country-terminal-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-focus);
}

.country-terminal-card header strong {
    color: var(--text-primary);
    font-size: 14px;
}

.country-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.country-signal-box {
    display: grid;
    gap: 3px;
    min-height: 62px;
    padding: 10px;
    border: 1px solid var(--border-focus);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    text-decoration: none;
}

.country-signal-box span {
    font-size: 12px;
}

.country-signal-box strong {
    font-size: 16px;
}

.country-signal-box.is-positive strong {
    color: var(--color-positive);
}

.country-signal-box.is-negative strong {
    color: var(--color-negative);
}

.country-signal-box i {
    display: block;
    width: 100%;
    height: 3px;
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.country-signal-box b {
    display: block;
    height: 100%;
    background: var(--color-neutral);
}

.country-signal-box.is-positive b {
    background: var(--color-positive);
}

.country-signal-box.is-negative b {
    background: var(--color-negative);
}

.country-policy-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.country-policy-list div,
.country-event-list a,
.country-release-list button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.country-policy-list span {
    color: var(--text-secondary);
    font-size: 12px;
}

.country-policy-list strong {
    color: var(--text-primary);
}

.country-event-list,
.country-release-list {
    display: grid;
}

.country-event-list a,
.country-release-list button {
    min-height: 54px;
    padding: 9px 14px;
    border: 0;
    border-bottom: 1px solid var(--border-focus);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    text-decoration: none;
}

.country-event-list i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--text-muted);
}

.country-event-list a.is-positive i {
    background: var(--color-positive);
}

.country-event-list a.is-negative i {
    background: var(--color-negative);
}

.country-event-list strong {
    display: grid;
    flex: 1;
    color: var(--text-primary);
    font-size: 13px;
}

.country-event-list small {
    color: var(--text-secondary);
    font-size: 11px;
}

.country-event-list span {
    color: var(--text-secondary);
    font-size: 12px;
}

.country-release-list button {
    cursor: pointer;
}

.country-release-list button.is-active,
.country-release-list button:hover {
    background: rgba(255, 255, 255, 0.04);
}

.country-release-list em {
    padding: 2px 6px;
    border-radius: 3px;
    background: #fef3c7;
    color: #713f12;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.country-history-card {
    margin-bottom: 16px;
}

.country-history-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 0 14px;
    border-bottom: 1px solid var(--border-focus);
}

.country-history-tabs button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-right: 1px solid var(--border-focus);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
}

.country-history-tabs button.is-active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-neutral);
}

.country-history-card .ind-table {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.country-history-card .ind-header,
.country-history-card .ind-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(90px, 0.6fr)) minmax(120px, 0.8fr) 70px 70px;
    gap: 0;
}

.country-history-card .ind-header {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-focus);
}

.country-history-card .ind-header span {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.country-history-card .ind-row {
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-bottom: 1px solid var(--border-focus);
    background: transparent;
}

.country-history-card .ind-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.country-history-card .ind-row > div {
    display: flex;
    align-items: center;
}

.country-history-card .ind-row__name {
    color: var(--text-primary);
    font-weight: 800;
}

.country-history-card .ind-row__val,
.country-history-card .ind-row__prev {
    color: var(--text-primary);
    font-weight: 700;
}

.country-history-card .ind-row__detail a {
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--color-positive-bg);
    color: var(--color-positive);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 1120px) {
    .country-kpi-grid,
    .country-terminal-grid,
    .country-signal-grid {
        grid-template-columns: 1fr;
    }

    .country-terminal__title-row,
    .country-terminal__title-row > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .country-history-card .ind-header,
    .country-history-card .ind-row {
        grid-template-columns: minmax(180px, 1fr) 80px 80px 70px;
    }

    .country-history-card .ind-header span:nth-child(4),
    .country-history-card .ind-row__spark,
    .country-history-card .ind-row__detail {
        display: none;
    }
}

/* Palette reset: keep new layouts, restore original black terminal theme */
:root {
    --bg-app: #000000;
    --bg-sidebar: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #191919;
    --text-primary: #e8e8e8;
    --text-secondary: #888888;
    --text-muted: #444444;
    --border-subtle: #1f1f1f;
    --border-focus: #2a2a2a;
    --color-positive: #22c55e;
    --color-positive-bg: #0a2a14;
    --color-negative: #ef4444;
    --color-negative-bg: #2a0a0a;
    --color-warning: #f59e0b;
    --color-neutral: #3b82f6;
}

body,
.black-terminal-shell,
body.has-black-global-sidebar,
.black-workspace,
.has-black-global-sidebar .shell,
.has-black-global-sidebar .country-terminal {
    background: #000000;
    color: var(--text-primary);
}

.black-sidebar,
.black-sidebar--global,
.black-topbar,
.research-workbench__topbar,
.country-terminal__topbar {
    background: var(--bg-sidebar);
    border-color: var(--border-subtle);
}

.black-kpi-card,
.black-panel,
.black-country-card,
.black-chart-grid > div,
.black-ccy-card,
.black-rate-cell,
.research-terminal-filters,
.research-terminal-card,
.research-bank-item,
.country-kpi-grid article,
.country-terminal-card,
.has-black-global-sidebar .calendar-controls,
.has-black-global-sidebar .calendar-panel,
.has-black-global-sidebar .analytics-panel,
.has-black-global-sidebar .research-refresh-bar,
.has-black-global-sidebar .research-compare-dock,
.has-black-global-sidebar .research-controls,
.has-black-global-sidebar .research-card,
.has-black-global-sidebar .research-admin-panel,
.has-black-global-sidebar .research-admin-card,
.has-black-global-sidebar .settings-panel,
.has-black-global-sidebar .settings-status-card,
.has-black-global-sidebar .tab-panel,
.has-black-global-sidebar .chart-shell,
.has-black-global-sidebar .side-panel,
.has-black-global-sidebar .prints-panel,
.has-black-global-sidebar .indicator-controls,
.has-black-global-sidebar .calendar-day,
.has-black-global-sidebar .stat-block {
    border-color: var(--border-subtle);
    background: var(--bg-card);
    box-shadow: none;
}

.black-kpi-card,
.country-kpi-grid article,
.country-terminal-card,
.research-terminal-card {
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--bg-card);
    background-size: 32px 32px;
}

.country-signal-box,
.research-terminal-tags span,
.research-terminal-card__footer button,
.research-terminal-card__footer a,
.research-chip-row button,
.research-terminal-search input,
.research-filter-block select,
.country-terminal__title-row span,
.has-black-global-sidebar input,
.has-black-global-sidebar select,
.has-black-global-sidebar textarea,
.has-black-global-sidebar .control-button,
.has-black-global-sidebar button,
.has-black-global-sidebar .primary-action,
.has-black-global-sidebar .secondary-action,
.has-black-global-sidebar .topbar__link,
.has-black-global-sidebar .back-link,
.has-black-global-sidebar .analytics-download-link,
.has-black-global-sidebar .research-bookmark,
.has-black-global-sidebar .research-card__actions a,
.has-black-global-sidebar .research-compare-button {
    border-color: var(--border-focus);
    background: var(--bg-card);
    color: var(--text-primary);
}

.black-sidebar__logo::before {
    background: var(--color-neutral);
}

.black-nav-item:hover,
.black-nav-item.is-active,
.research-bank-item:hover,
.country-release-list button.is-active,
.country-release-list button:hover {
    background: var(--bg-card-hover);
}

.black-nav-item.is-active::before,
.country-history-tabs button.is-active {
    background: var(--color-neutral);
    color: #ffffff;
}

.black-panel__head,
.black-fx-table th,
.country-terminal-card header,
.country-history-tabs,
.country-history-card .ind-header,
.country-history-card .ind-row,
.research-terminal-filters__head,
.research-terminal-search,
.research-filter-block,
.research-bank-item,
.research-terminal-card__footer {
    border-color: var(--border-subtle);
}

.black-kpi-card span,
.black-kpi-card small,
.black-panel__head,
.country-kpi-grid span,
.country-kpi-grid small,
.country-terminal-card header span,
.country-terminal__topbar div,
.research-workbench__topbar > span,
.research-filter-block > span,
.research-bank-item small,
.country-policy-list span,
.country-event-list small,
.country-event-list span,
.country-history-card .ind-header span {
    color: var(--text-secondary);
}

.black-kpi-card strong,
.black-topbar h1,
.black-sidebar__logo,
.country-terminal__title-row h1,
.country-kpi-grid strong,
.country-terminal-card header strong,
.country-policy-list strong,
.country-event-list strong,
.research-workbench__topbar strong,
.research-terminal-card h2,
.research-terminal-card p,
.research-terminal-card__top strong,
.research-terminal-card__top small,
.research-bank-item strong {
    color: var(--text-primary);
}

.country-kpi-grid article:nth-child(1) strong,
.country-kpi-grid article:nth-child(2) strong,
.country-kpi-grid article:nth-child(3) strong,
.country-kpi-grid article:nth-child(5) strong,
.country-terminal__badge,
.research-chip-row button.is-active,
.has-black-global-sidebar .primary-action {
    background: var(--color-positive-bg);
    color: var(--color-positive);
}

.country-kpi-grid .country-kpi-card strong {
    background: transparent;
}

.country-kpi-grid .country-kpi-card.is-positive strong {
    color: var(--color-positive);
}

.country-kpi-grid .country-kpi-card.is-negative strong {
    color: var(--color-negative);
}

.country-kpi-grid .country-kpi-card.is-neutral strong {
    color: var(--text-primary);
}

.country-signal-box.is-positive strong,
.country-event-list a.is-positive span,
.country-history-card .ind-row.is-positive .ind-row__trend,
.black-terminal-shell .is-positive,
.has-black-global-sidebar .is-positive,
.has-black-global-sidebar .pos {
    color: var(--color-positive) !important;
}

.country-signal-box.is-negative strong,
.country-event-list a.is-negative span,
.country-history-card .ind-row.is-negative .ind-row__trend,
.black-terminal-shell .is-negative,
.has-black-global-sidebar .is-negative,
.has-black-global-sidebar .neg {
    color: var(--color-negative) !important;
}

.country-signal-box.is-positive b,
.country-event-list a.is-positive i {
    background: var(--color-positive);
}

.country-signal-box.is-negative b,
.country-event-list a.is-negative i {
    background: var(--color-negative);
}

.country-release-list em {
    background: var(--color-warning);
    color: #111111;
}

.black-kpi-card--cb {
    position: relative;
    overflow: hidden;
}

.black-kpi-card--cb::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--color-neutral);
}

.black-kpi-card--cb span {
    color: var(--color-neutral);
}

.black-kpi-card--cb strong {
    font-size: 2.15rem;
}

/* Shared black terminal theme for inner pages */
body.has-black-global-sidebar {
    --bt-bg0: #000000;
    --bt-bg1: #0a0a0a;
    --bt-bg2: #111111;
    --bt-bg3: #191919;
    --bt-border: #1f1f1f;
    --bt-border2: #2a2a2a;
    --bt-text: #e8e8e8;
    --bt-muted: #888888;
    --bt-dim: #444444;
    --bt-blue: #3b82f6;
    --bt-blue-dim: #0f2040;
    --bt-green: #22c55e;
    --bt-green-dim: #0a2a14;
    --bt-red: #ef4444;
    --bt-red-dim: #2a0a0a;
    --bt-amber: #f59e0b;
    --bt-amber-dim: #2a1a00;
    --bt-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: #000;
    color: #e8e8e8;
}

body.has-black-global-sidebar::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: none;
}

.black-sidebar--global {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
}

.has-black-global-sidebar .shell {
    width: calc(100% - 54px);
    max-width: none;
    min-height: 100vh;
    margin: 0 0 0 54px;
    padding: 14px 18px 24px;
}

.has-black-global-sidebar .calendar-hero,
.has-black-global-sidebar .analytics-hero,
.has-black-global-sidebar .research-hero,
.has-black-global-sidebar .settings-hero,
.has-black-global-sidebar .country-header,
.has-black-global-sidebar .indicator-hero,
.has-black-global-sidebar .stub-panel,
.has-black-global-sidebar .research-refresh-bar,
.has-black-global-sidebar .research-controls,
.has-black-global-sidebar .research-admin-panel,
.has-black-global-sidebar .research-admin-card,
.has-black-global-sidebar .settings-panel,
.has-black-global-sidebar .analytics-panel,
.has-black-global-sidebar .calendar-control-panel,
.has-black-global-sidebar .calendar-day,
.has-black-global-sidebar .tab-panel,
.has-black-global-sidebar .indicator-controls,
.has-black-global-sidebar .chart-shell,
.has-black-global-sidebar .side-panel,
.has-black-global-sidebar .prints-panel {
    border: 1px solid #1f1f1f;
    border-radius: 5px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        #0a0a0a;
    background-size: 32px 32px;
    box-shadow: none;
}

.has-black-global-sidebar .calendar-hero,
.has-black-global-sidebar .analytics-hero,
.has-black-global-sidebar .research-hero,
.has-black-global-sidebar .settings-hero,
.has-black-global-sidebar .country-header,
.has-black-global-sidebar .indicator-hero,
.has-black-global-sidebar .stub-panel {
    min-height: 0;
    padding: 18px 22px;
}

.has-black-global-sidebar .calendar-hero h1,
.has-black-global-sidebar .analytics-hero h1,
.has-black-global-sidebar .research-hero h1,
.has-black-global-sidebar .settings-hero h1,
.has-black-global-sidebar .country-header h1,
.has-black-global-sidebar .indicator-hero h1,
.has-black-global-sidebar .stub-panel h1 {
    color: #e8e8e8;
    font-size: clamp(1.8rem, 3vw, 3rem);
    letter-spacing: 0;
}

.has-black-global-sidebar .eyebrow,
.has-black-global-sidebar .panel-title,
.has-black-global-sidebar .analytics-section-heading .eyebrow {
    color: #3b82f6;
    letter-spacing: 0.14em;
}

.has-black-global-sidebar .calendar-hero__copy,
.has-black-global-sidebar .panel-copy,
.has-black-global-sidebar .research-card p,
.has-black-global-sidebar .settings-panel p,
.has-black-global-sidebar .analytics-panel p,
.has-black-global-sidebar .country-header small,
.has-black-global-sidebar .side-panel__label {
    color: #888888;
}

.has-black-global-sidebar input,
.has-black-global-sidebar select,
.has-black-global-sidebar textarea {
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    background: #050505;
    color: #e8e8e8;
}

.has-black-global-sidebar button,
.has-black-global-sidebar .primary-action,
.has-black-global-sidebar .secondary-action,
.has-black-global-sidebar .topbar__link,
.has-black-global-sidebar .back-link,
.has-black-global-sidebar .analytics-download-link {
    border-radius: 4px;
    border-color: #2a2a2a;
    background: #111111;
    color: #e8e8e8;
}

.has-black-global-sidebar .primary-action {
    border-color: #0f3d1a;
    background: #0a2a14;
    color: #22c55e;
}

.has-black-global-sidebar .back-link,
.has-black-global-sidebar .topbar__link,
.has-black-global-sidebar .analytics-download-link {
    color: #3b82f6;
}

.has-black-global-sidebar table,
.has-black-global-sidebar .calendar-events,
.has-black-global-sidebar .research-card,
.has-black-global-sidebar .research-asset,
.has-black-global-sidebar .analytics-kpi,
.has-black-global-sidebar .analytics-donut-card,
.has-black-global-sidebar .category-card,
.has-black-global-sidebar .country-depth-card,
.has-black-global-sidebar .ind-table,
.has-black-global-sidebar .ind-row,
.has-black-global-sidebar .prints-table-wrap,
.has-black-global-sidebar .settings-status-card {
    border-color: #1f1f1f;
    border-radius: 5px;
    background: #0a0a0a;
    box-shadow: none;
}

.has-black-global-sidebar th,
.has-black-global-sidebar td,
.has-black-global-sidebar .calendar-event-row,
.has-black-global-sidebar .research-card,
.has-black-global-sidebar .research-asset,
.has-black-global-sidebar .ind-row {
    border-color: #1f1f1f;
}

.has-black-global-sidebar th {
    color: #444444;
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.has-black-global-sidebar .is-positive,
.has-black-global-sidebar .calendar-actual.is-positive {
    color: #22c55e !important;
}

.has-black-global-sidebar .is-negative,
.has-black-global-sidebar .calendar-actual.is-negative {
    color: #ef4444 !important;
}

.has-black-global-sidebar .is-warning {
    color: #f59e0b !important;
}

* {
    box-sizing: border-box;
}

button,
input,
select {
    font: inherit;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #000000 0%, #050607 42%, #000000 100%);
    color: var(--text);
    font-family: var(--font-sans);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 88%);
}

a {
    color: inherit;
}

.global-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    width: min(1800px, calc(100% - 24px));
    margin: 12px auto 0;
    padding: 10px 14px;
    border: 1px solid rgba(61, 70, 86, 0.66);
    border-radius: var(--radius-lg);
    background: rgba(17, 19, 24, 0.88);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
}

.global-nav__brand,
.global-nav nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.global-nav__brand {
    text-decoration: none;
}

.global-nav__brand span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0, 200, 150, 0.44);
    border-radius: var(--radius-sm);
    color: var(--positive);
    font-weight: 900;
}

.global-nav nav {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.global-nav a {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

.global-nav a:hover {
    color: var(--positive);
}

.shell {
    position: relative;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px clamp(12px, 1.8vw, 32px) 48px;
}

.topbar,
.surprises-panel,
.currency-stance-panel,
.yield-diff-panel,
.news-panel,
.countries-panel,
.country-header,
.tab-panel,
.stub-panel {
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(13, 24, 34, 0.98), rgba(6, 11, 17, 0.98)),
        var(--bg-panel);
    box-shadow: var(--shadow);
}

.topbar,
.country-header,
.stub-panel {
    padding: clamp(20px, 1.6vw, 30px);
}

.surprises-panel,
.currency-stance-panel,
.yield-diff-panel,
.news-panel,
.countries-panel,
.tab-panel {
    margin-top: 18px;
    padding: clamp(18px, 1.5vw, 28px);
}

.topbar,
.panel-heading,
.country-header__stats,
.topbar__meta,
.country-header__title-row,
.stub-actions {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
}

.panel-heading {
    align-items: flex-end;
    margin-bottom: clamp(18px, 1.2vw, 24px);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.headline,
.panel-heading h2,
.country-header h1,
.stub-panel h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: 0;
}

.panel-copy,
.topbar__link,
.country-card p,
.stub-panel p,
.footnote {
    color: var(--muted);
}

.panel-copy {
    max-width: 68ch;
}

.topbar__pill,
.action-link,
.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(82, 126, 154, 0.72);
    background: rgba(7, 13, 20, 0.82);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}

.topbar__pill {
    color: var(--positive);
    font-variant-numeric: tabular-nums;
}

.topbar__link {
    text-decoration: none;
}

.topbar__meta {
    flex-wrap: wrap;
}

.topbar__link:hover,
.back-link:hover,
.indicator-row__detail a:hover {
    color: var(--accent);
}

.action-link:hover,
.tab-button:hover,
.country-card:hover,
.surprise-card:hover {
    border-color: var(--accent);
}

.surprises-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(12px, 1vw, 18px);
}

.stance-window-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.stance-window {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(7, 16, 24, 0.28);
}

.stance-window__header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stance-window__header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.stance-window__header span,
.stance-row__meta,
.stance-row__topline span {
    color: var(--muted);
}

.stance-list {
    display: grid;
    gap: 8px;
}

.stance-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 60px 116px;
    gap: 10px;
    align-items: center;
    min-height: 76px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-panel-2);
    text-decoration: none;
    color: var(--text);
    transition: border-color 160ms ease, transform 160ms ease;
}

.stance-row *,
.stance-row:visited,
.stance-row:hover {
    text-decoration: none;
}

.stance-row:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.stance-row__rank {
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.stance-row__main {
    min-width: 0;
}

.stance-row__topline,
.stance-row__meta {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.stance-row__topline strong {
    font-size: 1rem;
    white-space: nowrap;
}

.stance-row__topline span,
.stance-row__meta {
    font-size: 0.76rem;
}

.stance-row__topline span,
.stance-row__meta span {
    min-width: 0;
    white-space: nowrap;
}

.stance-row__overall {
    display: flex;
    justify-content: center;
}

.stance-meter,
.category-meter {
    --meter-color: var(--warning);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, var(--bg-panel-2) 58%, transparent 60%),
        conic-gradient(var(--meter-color) var(--meter-value), rgba(255, 255, 255, 0.12) 0);
    font-variant-numeric: tabular-nums;
}

.stance-meter {
    width: 54px;
    height: 54px;
    font-size: 0.72rem;
    font-weight: 800;
}

.category-meter {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
    font-weight: 800;
}

.stance-meter.is-positive,
.category-meter.is-positive {
    --meter-color: var(--positive);
}

.stance-meter.is-negative,
.category-meter.is-negative {
    --meter-color: var(--negative);
}

.stance-meter.is-neutral,
.category-meter.is-neutral {
    --meter-color: var(--warning);
}

.category-meter-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    justify-items: center;
}

.category-meter-wrap {
    display: grid;
    gap: 4px;
    justify-items: center;
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1;
}

.fundamental-meter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr));
    gap: clamp(14px, 1vw, 20px);
}

.fundamental-meter-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: clamp(16px, 1.1vw, 22px);
    border: 1px solid rgba(86, 120, 145, 0.52);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.98), rgba(7, 13, 20, 0.98)),
        var(--bg-panel-2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: var(--text);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.fundamental-meter-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(80, 181, 255, 0.12), 0 14px 36px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.fundamental-meter-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.fundamental-meter-card__header > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.fundamental-meter-card__header strong {
    font-size: 1.12rem;
}

.fundamental-meter-card__header span,
.meter-period-row {
    color: var(--muted);
}

.fx-radar-heading {
    align-items: end;
}

.fx-radar-tools {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.fx-radar-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fx-radar-button,
.fx-radar-sort select {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(6, 12, 18, 0.78);
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

.fx-radar-button {
    cursor: pointer;
    padding: 0 10px;
}

.fx-radar-button.is-active {
    border-color: var(--accent);
    background: rgba(80, 181, 255, 0.14);
    color: #ffffff;
}

.fx-radar-sort {
    display: flex;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.fx-radar-sort select {
    padding: 0 28px 0 10px;
}

.fx-radar-legend {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 9px 12px;
    border: 1px solid rgba(86, 120, 145, 0.42);
    border-radius: var(--radius-sm);
    background: rgba(6, 12, 18, 0.52);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.fx-radar-legend span {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.fx-radar-legend__meta {
    margin-left: auto;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.legend-dot.is-positive {
    background: var(--positive);
}

.legend-dot.is-negative {
    background: var(--negative);
}

.legend-dot.is-neutral {
    background: var(--warning);
}

.fx-radar-score {
    font-size: 1.55rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.fx-radar-score.is-positive {
    color: var(--positive);
}

.fx-radar-score.is-negative {
    color: var(--negative);
}

.fx-radar-score.is-neutral {
    color: var(--warning);
}

.fx-score-bar {
    position: relative;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(255, 91, 91, 0.24), rgba(243, 186, 99, 0.18) 50%, rgba(35, 196, 131, 0.24)),
        rgba(255, 255, 255, 0.06);
}

.fx-score-bar::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.28);
}

.fx-score-bar span {
    position: absolute;
    top: 50%;
    left: var(--score-position);
    width: 10px;
    height: 18px;
    border: 2px solid rgba(5, 11, 16, 0.92);
    border-radius: 999px;
    background: var(--warning);
    transform: translate(-50%, -50%);
}

.fx-score-bar.is-positive span {
    background: var(--positive);
}

.fx-score-bar.is-negative span {
    background: var(--negative);
}

.fx-score-bar.is-neutral span {
    background: var(--warning);
}

.meter-period-row,
.meter-metric-row {
    display: grid;
    grid-template-columns: minmax(76px, 0.8fr) 64px repeat(4, minmax(58px, 0.62fr));
    gap: 8px;
    align-items: center;
}

.meter-period-row {
    font-size: 0.68rem;
    font-weight: 700;
    text-align: right;
}

.meter-metric-list {
    display: grid;
    gap: 8px;
}

.meter-metric-row {
    min-height: 32px;
    font-size: 0.76rem;
}

.meter-metric-label {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meter-value {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.score-sparkline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    align-items: end;
    height: 28px;
    padding: 2px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.035);
}

.score-sparkline i {
    display: block;
    height: 100%;
    min-height: 4px;
    border-radius: 999px;
    background: var(--warning);
    clip-path: inset(calc(100% - var(--bar-position)) 0 0 0 round 999px);
}

.score-sparkline i.is-positive {
    background: var(--positive);
}

.score-sparkline i.is-negative {
    background: var(--negative);
}

.score-sparkline i.is-neutral {
    background: var(--warning);
}

.meter-value.is-positive {
    color: var(--positive);
}

.meter-value.is-negative {
    color: var(--negative);
}

.meter-value.is-neutral {
    color: var(--warning);
}

.yield-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 1vw, 18px);
    margin-bottom: clamp(14px, 1vw, 20px);
}

.yield-stat-card,
.yield-pair-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(86, 120, 145, 0.46);
    border-radius: var(--radius-sm);
    background: rgba(7, 16, 24, 0.58);
}

.yield-stat-card span,
.yield-pair-card span,
.yield-row small,
.yield-stat-card small,
.yield-pair-card small {
    color: var(--muted);
}

.yield-stat-card span,
.yield-pair-card span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.yield-stat-card strong {
    font-size: 1.35rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.yield-diff-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.6fr);
    gap: clamp(14px, 1vw, 20px);
    align-items: start;
}

.yield-chart-workbench {
    display: grid;
    gap: 14px;
    margin: 16px 0 18px;
}

.yield-chart-toolbar,
.yield-chart-card__header {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    justify-content: space-between;
}

.yield-chart-toolbar {
    padding: 14px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background: rgba(7, 13, 20, 0.48);
}

.yield-chart-toolbar h3 {
    margin: 0;
    font-size: clamp(1.1rem, 1.4vw, 1.45rem);
}

.yield-chart-toolbar label {
    display: grid;
    gap: 7px;
    min-width: 180px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.yield-chart-toolbar select {
    min-height: 38px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
    color: var(--text);
    padding: 0 12px;
}

.yield-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 1vw, 20px);
}

.yield-chart-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.9), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
}

.yield-chart-card--full {
    grid-column: 1 / -1;
}

.yield-chart-card__header span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.yield-chart-card__header strong {
    color: var(--positive);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
}

.yield-chart {
    min-height: 330px;
}

.yield-chart--bar {
    min-height: 260px;
}

.yield-table {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.yield-table__header,
.yield-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.4fr) repeat(4, minmax(82px, 0.65fr));
    gap: 10px;
    align-items: center;
}

.yield-table__header {
    padding: 0 12px 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.yield-table__header span:not(:first-child),
.yield-row > strong,
.yield-row > span {
    text-align: right;
}

.yield-row {
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.9), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
    font-variant-numeric: tabular-nums;
}

.yield-row__currency {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.yield-row__currency div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.yield-row__currency strong,
.yield-row__currency small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yield-row__flag {
    font-size: 1.35rem;
}

.yield-pair-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.yield-pair-card strong {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.yield-diagnostic-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(246, 193, 95, 0.42);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(246, 193, 95, 0.08), rgba(7, 13, 20, 0.66)),
        var(--bg-panel-2);
}

.yield-diagnostic-panel strong {
    color: var(--warning);
}

.yield-diagnostic-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.yield-diagnostic-panel code {
    color: var(--text);
    white-space: nowrap;
}

.yield-symbol-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.yield-symbol-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.70);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
}

.yield-error-details {
    color: var(--muted);
}

.yield-error-details summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 800;
}

.surprise-card,
.country-card,
.stat-block,
.indicator-row,
.empty-panel {
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
}

.surprise-card,
.country-card,
.stat-block {
    padding: clamp(14px, 1vw, 20px);
}

.surprise-card {
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.surprise-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
    transform: translateY(-2px);
}

.surprise-card__meta,
.surprise-card__footer,
.country-card__meta,
.country-card__footer,
.indicator-table__header,
.indicator-row {
    display: grid;
    gap: 12px;
}

.surprise-card__meta,
.surprise-card__footer,
.country-card__footer {
    grid-template-columns: 1fr auto;
    color: var(--muted);
    font-size: 0.82rem;
}

.surprise-card h3,
.country-card h3 {
    margin: 12px 0 10px;
    font-size: 1.08rem;
    line-height: 1.3;
}

.surprise-card__value {
    font-size: clamp(1.5rem, 1.45vw, 2rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.is-positive {
    color: var(--positive);
}

.is-negative {
    color: var(--negative);
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--grid-gap);
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: clamp(14px, 1vw, 20px);
}

.news-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(71, 183, 255, 0.08), rgba(7, 13, 20, 0.18) 55%),
        var(--bg-panel-2);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.news-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
}

.news-card__meta,
.news-card__footer,
.news-card__tags {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.news-card__meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.news-card h3 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.35;
}

.news-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.news-tag,
.news-card__cta {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(71, 183, 255, 0.42);
    background: rgba(71, 183, 255, 0.10);
    font-size: 0.78rem;
    font-weight: 600;
}

.news-card__cta {
    color: var(--accent);
}

.country-card {
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.country-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
    transform: translateY(-2px);
}

.country-card__meta {
    grid-template-columns: auto 1fr;
    align-items: center;
    color: var(--muted);
}

.country-card__flag,
.country-header__flag {
    font-size: 1.6rem;
}

.country-card__meta span:last-child,
.country-card__footer strong {
    color: var(--positive);
    font-variant-numeric: tabular-nums;
}

.country-header__stats {
    margin-top: 18px;
    flex-wrap: wrap;
    align-items: stretch;
}

.stat-block {
    min-width: 0;
    flex: 1 1 0;
}

.stat-block__label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.back-link {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--accent);
    text-decoration: none;
}

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 4px;
}

.tab-button {
    appearance: none;
    cursor: pointer;
}

.tab-button.is-active {
    border-color: var(--accent);
    background: rgba(71, 183, 255, 0.14);
    color: #ffffff;
}

.indicator-table {
    display: grid;
    gap: 10px;
}

.indicator-table__header,
.indicator-row {
    grid-template-columns: minmax(180px, 2fr) minmax(94px, 0.9fr) minmax(94px, 0.9fr) 100px 64px 72px;
    align-items: center;
}

.indicator-table__header {
    padding: 0 12px 9px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.42);
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.indicator-row {
    padding: 12px;
    transition: border-color 160ms ease, background 160ms ease;
}

.indicator-row:hover {
    border-color: rgba(71, 183, 255, 0.58);
    background:
        linear-gradient(180deg, rgba(22, 43, 57, 0.96), rgba(9, 17, 25, 0.96)),
        var(--bg-panel-2);
}

.indicator-row__name {
    font-weight: 600;
}

.indicator-row__value {
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.indicator-row__trend {
    font-size: 1.1rem;
    text-align: center;
}

.indicator-row__detail a {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.sparkline {
    width: 80px;
    height: 24px;
}

.sparkline.ind-sparkline {
    width: 100%;
    height: 30px;
}

.footnote,
.empty-panel {
    margin-top: 12px;
}

.empty-panel {
    padding: 18px;
}

.shell--stub {
    max-width: 820px;
}

.shell--indicator {
    display: grid;
    gap: 18px;
}

.shell--calendar {
    display: grid;
    gap: 18px;
}

.shell--analytics {
    display: grid;
    gap: 18px;
}

.shell--research {
    display: grid;
    gap: 18px;
}

.shell--settings {
    display: grid;
    gap: 18px;
}

.indicator-hero,
.calendar-hero,
.analytics-hero,
.research-hero,
.settings-hero,
.indicator-controls,
.calendar-controls,
.research-controls,
.settings-panel,
.chart-shell,
.side-panel,
.prints-panel,
.calendar-panel,
.analytics-panel,
.research-warning {
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(13, 24, 34, 0.98), rgba(6, 11, 17, 0.98)),
        var(--bg-panel);
    box-shadow: var(--shadow);
}

.indicator-hero,
.calendar-hero,
.analytics-hero,
.research-hero,
.settings-hero,
.indicator-controls,
.calendar-controls,
.research-controls,
.settings-panel,
.prints-panel,
.calendar-panel,
.analytics-panel,
.research-warning {
    padding: 20px 22px;
}

.indicator-hero__meta,
.indicator-hero__copy,
.chart-shell__meta,
.side-panel__label,
.prints-table,
.control-group__label {
    color: var(--muted);
}

.indicator-hero__copy {
    margin: 10px 0 0;
    max-width: 72ch;
}

.calendar-hero__copy,
.calendar-hero__meta {
    color: var(--muted);
}

.calendar-hero__copy {
    margin: 10px 0 0;
    max-width: 60ch;
}

.calendar-hero__row {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
}

.indicator-hero__chips,
.checkbox-row,
.segmented-control {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.info-chip,
.checkbox-pill,
.control-button {
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
}

.info-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
    font-weight: 600;
}

.indicator-controls {
    display: grid;
    gap: 16px;
}

.calendar-controls {
    display: grid;
    gap: 16px;
}

.control-row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-filter-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-group {
    display: grid;
    gap: 10px;
}

.control-group__label,
.side-panel__label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.control-button {
    appearance: none;
    min-height: 38px;
    padding: 0 14px;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.control-button.is-active {
    border-color: var(--accent);
    background: rgba(71, 183, 255, 0.14);
    color: #ffffff;
}

.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
}

.checkbox-pill input {
    accent-color: var(--accent);
}

.calendar-filter {
    display: grid;
    gap: 10px;
}

.calendar-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.calendar-export-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.calendar-filter-summary {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.calendar-filter select {
    min-height: 42px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
}

.analytics-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 18px;
    align-items: end;
}

.analytics-hero__grid h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1;
}

.analytics-hero-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(71, 183, 255, 0.34);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(71, 183, 255, 0.13), rgba(32, 214, 138, 0.08)),
        var(--bg-panel-2);
}

.analytics-hero-card span,
.analytics-hero-card .topbar__link {
    color: var(--muted);
}

.analytics-hero-card strong {
    font-size: 1.45rem;
}

.analytics-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(35, 196, 131, 0.45);
    border-radius: var(--radius-sm);
    background: rgba(35, 196, 131, 0.14);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.analytics-download-link:hover {
    border-color: var(--positive);
    color: var(--positive);
}

.research-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 18px;
    align-items: end;
}

.research-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1;
}

.research-hero-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(71, 183, 255, 0.34);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(71, 183, 255, 0.13), rgba(32, 214, 138, 0.08)),
        var(--bg-panel-2);
}

.research-hero-card span {
    color: var(--muted);
}

.research-hero-card strong {
    font-size: 2.3rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.settings-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 18px;
    align-items: end;
}

.settings-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1;
}

.settings-status-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(32, 214, 138, 0.34);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(32, 214, 138, 0.12), rgba(71, 183, 255, 0.06)),
        var(--bg-panel-2);
}

.settings-status-card span,
.settings-status-card small {
    color: var(--muted);
}

.settings-status-card strong {
    color: var(--positive);
    font-size: 2rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.settings-panel {
    display: grid;
    gap: 14px;
}

.settings-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-panel input:not([type="checkbox"]),
.settings-panel select {
    min-height: 42px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
    color: var(--text);
    padding: 0 12px;
}

.settings-switch {
    grid-template-columns: auto 1fr;
    align-items: center;
    text-transform: none;
    letter-spacing: 0;
}

.settings-switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--positive);
}

.settings-save-state {
    margin: 0;
    color: var(--muted);
}

.research-controls {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(160px, 220px));
    gap: 14px;
}

.research-search {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.research-search input,
.research-search select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
}

.research-warning {
    display: grid;
    gap: 8px;
    border-color: rgba(246, 193, 95, 0.42);
    color: var(--warning);
}

.research-warning span {
    color: var(--muted);
}

.research-admin-panel,
.research-admin-card {
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
}

.research-admin-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.research-admin-status {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid rgba(70, 105, 128, 0.46);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.66);
}

.research-admin-status strong {
    color: var(--accent);
}

.research-admin-status--success strong,
.research-admin-status--saved strong {
    color: var(--positive);
}

.research-admin-status--failed strong {
    color: var(--negative);
}

.research-admin-status--running strong,
.research-admin-status--queued strong {
    color: var(--warning);
}

.research-admin-status span,
.research-admin-status small,
.research-admin-card small {
    color: var(--muted);
}

.research-admin-form {
    display: grid;
    gap: 14px;
}

.research-admin-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.research-admin-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
}

.research-admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.research-admin-actions button {
    min-height: 42px;
}

.research-admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.research-admin-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 16px;
}

.research-admin-card span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.research-admin-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.research-admin-card a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.currency-toggle-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
}

.currency-toggle {
    cursor: pointer;
}

.currency-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.currency-toggle span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.66);
    color: var(--muted);
    font-weight: 900;
}

.currency-toggle input:checked + span {
    border-color: rgba(32, 214, 138, 0.48);
    color: var(--positive);
    background: rgba(32, 214, 138, 0.10);
}

.research-list {
    display: grid;
    gap: 14px;
}

.research-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
}

.research-card__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
}

.research-card__header h2 {
    margin: 0 0 4px;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.research-card__header span,
.research-card p,
.research-asset span,
.research-geo__grid,
.research-risks span {
    color: var(--muted);
}

.research-card__header a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.research-card__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.research-bookmark,
.research-compare-button {
    min-height: 32px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.research-bookmark {
    padding: 0 10px;
}

.research-bookmark[aria-pressed="true"] {
    border-color: rgba(32, 214, 138, 0.48);
    color: var(--positive);
}

.research-compare-button {
    justify-self: end;
    padding: 0 10px;
    font-size: 0.78rem;
}

.research-assets {
    display: grid;
    gap: 10px;
}

.research-asset {
    display: grid;
    grid-template-columns: minmax(150px, 0.5fr) auto minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid rgba(70, 105, 128, 0.46);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.66);
}

.research-compare-dock {
    display: grid;
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(32, 214, 138, 0.32);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(32, 214, 138, 0.08), rgba(71, 183, 255, 0.05)),
        var(--bg-panel-2);
    box-shadow: var(--shadow);
}

.research-compare-dock[hidden] {
    display: none;
}

.research-compare-dock h2 {
    margin: 0;
    font-size: 1.25rem;
}

.research-compare-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.research-compare-card {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(70, 105, 128, 0.46);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.66);
}

.research-compare-card span,
.research-compare-card p {
    color: var(--muted);
}

.research-compare-card strong,
.research-compare-card p {
    margin: 0;
}

.research-compare-card em {
    justify-self: start;
    font-style: normal;
}

.research-asset strong {
    display: block;
    margin-bottom: 3px;
}

.research-asset p {
    margin: 0;
    line-height: 1.45;
}

.research-outlook {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(246, 193, 95, 0.32);
    border-radius: var(--radius-sm);
    color: var(--warning);
    font-weight: 900;
}

.research-outlook--bullish {
    border-color: rgba(32, 214, 138, 0.32);
    color: var(--positive);
}

.research-outlook--bearish {
    border-color: rgba(255, 91, 91, 0.32);
    color: var(--negative);
}

.research-outlook--neutral,
.research-outlook--mixed,
.research-outlook--watch {
    color: var(--warning);
}

.research-geo {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-left: 3px solid var(--accent);
    background: rgba(71, 183, 255, 0.07);
}

.research-geo p {
    margin: 0;
}

.research-geo__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    font-size: 0.9rem;
}

.research-risks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.research-risks span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(246, 193, 95, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(246, 193, 95, 0.08);
    font-size: 0.82rem;
}

.analytics-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
    gap: 18px;
}

.analytics-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.analytics-kpi {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
    min-height: 160px;
    padding: 18px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(71, 183, 255, 0.08), rgba(7, 13, 20, 0.16) 66%),
        var(--bg-panel-2);
    align-content: end;
    overflow: hidden;
}

.analytics-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), var(--positive));
}

.analytics-kpi strong {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.analytics-kpi__label {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.analytics-kpi span:last-child,
.analytics-bar-row__header,
.analytics-pill-row,
.analytics-priority small,
.category-card small,
.category-card__stats,
.country-depth-card__numbers,
.country-depth-card__main span,
.run-timeline__item span {
    color: var(--muted);
}

.analytics-donut-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 22px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 12% 20%, rgba(71, 183, 255, 0.13), transparent 34%),
        var(--bg-panel-2);
}

.analytics-donut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 138px;
    height: 138px;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, var(--bg-panel-2) 58%, transparent 60%),
        conic-gradient(var(--positive) var(--donut-value), rgba(255, 255, 255, 0.11) 0);
}

.analytics-donut span {
    font-size: 1.7rem;
    font-weight: 800;
}

.analytics-card-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.85fr;
    gap: 18px;
}

.analytics-panel--tight {
    min-height: 280px;
}

.analytics-section-heading {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.analytics-section-heading h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.05;
}

.analytics-bar-list {
    display: grid;
    gap: 14px;
}

.analytics-bar-row {
    display: grid;
    gap: 8px;
}

.analytics-bar-row__header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.analytics-bar-row__header span {
    color: var(--text);
}

.analytics-bar {
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.analytics-bar {
    height: 10px;
}

.analytics-bar::before,
.category-card__bar::before {
    content: "";
    display: block;
    width: var(--bar-value);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--positive));
}

.analytics-pill-list {
    display: grid;
    gap: 10px;
}

.analytics-pill-row {
    display: grid;
    grid-template-columns: minmax(84px, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.70);
}

.analytics-pill-row .analytics-bar {
    grid-column: 1 / -1;
}

.analytics-priority-list {
    display: grid;
    gap: 12px;
}

.analytics-priority {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.70);
}

.analytics-priority strong {
    font-size: 1.25rem;
}

.analytics-priority small {
    grid-column: 1 / -1;
}

.category-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.category-card {
    display: grid;
    gap: 14px;
    min-height: 166px;
    padding: 16px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(71, 183, 255, 0.07), rgba(7, 13, 20, 0.16)),
        var(--bg-panel-2);
}

.category-card__top,
.category-card__stats,
.country-depth-card__main,
.country-depth-card__numbers,
.run-timeline__item,
.run-timeline__metrics {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.category-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.category-card__top span {
    color: var(--accent);
    font-weight: 800;
}

.category-card__bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.category-card__stats {
    align-items: baseline;
    flex-wrap: wrap;
}

.country-depth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.country-depth-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.country-depth-card:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
    transform: translateY(-1px);
}

.country-depth-card__main {
    justify-content: flex-start;
}

.country-depth-card__flag {
    font-size: 1.8rem;
}

.country-depth-card__main div {
    display: grid;
    gap: 2px;
}

.country-depth-card__numbers {
    font-size: 0.84rem;
}

.run-timeline {
    display: grid;
    gap: 10px;
}

.run-timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(180px, 1fr) minmax(280px, auto);
    justify-content: stretch;
    padding: 13px 14px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.70);
}

.run-timeline__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--positive);
    box-shadow: 0 0 0 5px rgba(32, 214, 138, 0.12);
}

.run-timeline__item div {
    display: grid;
    gap: 3px;
}

.run-timeline__metrics {
    justify-content: flex-end;
    flex-wrap: wrap;
    font-size: 0.84rem;
}

.run-timeline__metrics span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
}

.indicator-stage {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.9fr) minmax(240px, 0.8fr);
}

.chart-shell {
    padding: 18px;
}

.chart-shell__header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.chart-shell__header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.chart-shell__meta {
    min-width: 0;
    text-align: right;
    font-size: 0.9rem;
}

.indicator-chart {
    width: 100%;
    min-height: 420px;
}

.side-panel {
    padding: 18px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.side-panel__block {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background: rgba(7, 13, 20, 0.70);
}

.prints-table-wrap {
    overflow-x: auto;
}

.prints-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.prints-table th,
.prints-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.46);
    text-align: left;
    white-space: nowrap;
}

.prints-table th {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prints-table tbody tr:hover {
    background: rgba(71, 183, 255, 0.06);
}

.prints-table__loading {
    text-align: center;
    color: var(--muted);
}

.calendar-groups {
    display: grid;
    gap: 16px;
}

.calendar-day {
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
    padding: 14px;
}

.calendar-day__header {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-day__header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.calendar-day__header span,
.calendar-status {
    color: var(--muted);
}

.calendar-importance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.calendar-importance.is-high {
    color: var(--negative);
    background: rgba(232, 64, 64, 0.12);
    border: 1px solid rgba(232, 64, 64, 0.24);
}

.calendar-importance.is-medium {
    color: var(--warning);
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.24);
}

.calendar-importance.is-low {
    color: var(--muted);
    background: rgba(136, 146, 160, 0.12);
    border: 1px solid rgba(136, 146, 160, 0.24);
}

.calendar-table-wrap {
    overflow-x: auto;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.calendar-table th,
.calendar-table td {
    padding: 11px 10px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.46);
    text-align: left;
    white-space: nowrap;
}

.calendar-table th {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.calendar-table__link {
    color: var(--text);
    text-decoration: none;
}

.calendar-table__plain {
    color: var(--text);
}

.calendar-table__link:hover {
    color: var(--accent);
}

.calendar-actual {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.calendar-actual.is-positive {
    color: #58d68d;
}

.calendar-actual.is-negative {
    color: #ff6b6b;
}

.calendar-surprise {
    font-size: 0.9rem;
    line-height: 1;
}

.calendar-status {
    text-transform: capitalize;
    font-weight: 600;
}

.tab-content {
    min-height: 160px;
}

.is-warning {
    color: var(--warning);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shell--landing {
    display: grid;
    gap: 18px;
}

.platform-header {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(210px, auto) minmax(320px, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(70, 105, 128, 0.72);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(12, 23, 33, 0.96), rgba(5, 10, 16, 0.94)),
        var(--bg-panel);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px);
}

.platform-brand,
.platform-nav,
.platform-search,
.hero-actions,
.status-strip,
.time-filter,
.calendar-preview-controls,
.chart-preview-controls,
.platform-footer nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.platform-brand {
    text-decoration: none;
}

.platform-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(71, 183, 255, 0.45);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(135deg, rgba(71, 183, 255, 0.28), rgba(32, 214, 138, 0.12)),
        rgba(7, 13, 20, 0.9);
    color: #ffffff;
    font-weight: 900;
}

.platform-brand strong,
.platform-brand small {
    display: block;
}

.platform-brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
}

.platform-nav {
    justify-content: center;
    flex-wrap: wrap;
}

.platform-nav a,
.platform-footer a {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.platform-nav a:hover,
.platform-footer a:hover {
    color: var(--accent);
}

.platform-search {
    justify-self: end;
    width: 100%;
    padding: 5px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
}

.platform-search input {
    min-width: 0;
    flex: 1;
    height: 34px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.platform-search button,
.primary-action,
.secondary-action,
.time-filter button {
    min-height: 36px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.platform-search button,
.primary-action {
    padding: 0 14px;
    background: linear-gradient(135deg, rgba(32, 214, 138, 0.26), rgba(71, 183, 255, 0.12));
    border-color: rgba(32, 214, 138, 0.48);
}

.secondary-action,
.time-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: rgba(7, 13, 20, 0.72);
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: clamp(18px, 2vw, 34px);
    align-items: stretch;
    min-height: 430px;
    padding: clamp(26px, 3vw, 52px);
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(71, 183, 255, 0.10), transparent 36%),
        linear-gradient(180deg, rgba(13, 24, 34, 0.98), rgba(6, 11, 17, 0.98)),
        var(--bg-panel);
    box-shadow: var(--shadow);
}

.landing-hero__copy {
    display: grid;
    align-content: center;
    justify-items: start;
}

.landing-hero h1 {
    max-width: 980px;
    margin: 0;
    font-size: clamp(2.45rem, 5vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.landing-hero__copy p:not(.eyebrow) {
    max-width: 760px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.6;
}

.landing-hero--terminal {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.landing-hero__content {
    display: grid;
    align-content: center;
    justify-items: start;
}

.landing-hero__copy {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(1rem, 1.2vw, 1.18rem);
    line-height: 1.6;
}

.landing-hero__actions,
.landing-signal-tape {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.landing-signal-tape {
    margin-top: 18px;
}

.landing-signal-tape span {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid rgba(70, 105, 128, 0.46);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.62);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.landing-signal-tape strong {
    color: var(--positive);
}

.terminal-visual {
    display: grid;
    gap: 16px;
    height: 100%;
    min-height: 360px;
    padding: clamp(16px, 1.4vw, 24px);
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 80% 0%, rgba(32, 214, 138, 0.16), transparent 220px),
        linear-gradient(180deg, rgba(16, 31, 42, 0.94), rgba(7, 13, 20, 0.96)),
        var(--bg-panel-2);
}

.terminal-visual__header,
.terminal-visual__heatmap a,
.terminal-visual__heatmap span {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.terminal-visual__header span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.terminal-visual__header strong {
    color: var(--positive);
    font-size: 0.78rem;
}

.terminal-visual__heatmap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.terminal-visual__heatmap a,
.terminal-visual__heatmap span {
    min-height: 72px;
    padding: 12px;
    border: 1px solid rgba(70, 105, 128, 0.46);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.72);
    text-decoration: none;
}

.terminal-visual__heatmap a.is-positive {
    border-color: rgba(32, 214, 138, 0.38);
}

.terminal-visual__heatmap a.is-negative {
    border-color: rgba(255, 91, 91, 0.38);
}

.terminal-visual__candles {
    display: grid;
    grid-template-columns: repeat(8, minmax(16px, 1fr));
    gap: 14px;
    align-items: end;
    min-height: 150px;
    padding: 14px;
    border: 1px solid rgba(70, 105, 128, 0.38);
    border-radius: var(--radius-md);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 25%, 12.5% 100%;
}

.terminal-visual__candles i {
    position: relative;
    display: block;
    height: var(--h);
    min-height: 28px;
    border-radius: 999px;
    background: var(--c);
    box-shadow: 0 0 18px color-mix(in srgb, var(--c), transparent 64%);
}

.terminal-visual__candles i::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -18px;
    bottom: -18px;
    width: 1px;
    background: var(--c);
    transform: translateX(-50%);
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1vw, 20px);
}

.landing-feature {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: clamp(16px, 1.2vw, 22px);
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.94), rgba(7, 13, 20, 0.96)),
        var(--bg-panel-2);
    color: var(--text);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.landing-feature:hover {
    border-color: rgba(32, 214, 138, 0.52);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.landing-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(32, 214, 138, 0.38);
    border-radius: var(--radius-sm);
    color: var(--positive);
    font-weight: 900;
}

.landing-feature h3,
.landing-feature p {
    margin: 0;
}

.landing-feature p {
    color: var(--muted);
    line-height: 1.5;
}

.hero-actions {
    margin-top: 28px;
    flex-wrap: wrap;
}

.hero-actions a {
    min-height: 44px;
}

.market-pulse-widget,
.currency-summary-card,
.trending-card,
.terminal-intelligence-panel,
.terminal-module,
.chart-preview-panel,
.calendar-preview-panel,
.personalization-panel,
.research-entry-panel {
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.94), rgba(7, 13, 20, 0.96)),
        var(--bg-panel-2);
}

.market-pulse-widget {
    display: grid;
    gap: 18px;
    align-content: center;
    padding: clamp(18px, 1.8vw, 28px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.market-pulse-widget__header,
.market-pulse-row,
.currency-summary-card__top,
.trending-card,
.platform-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.market-pulse-widget__header span,
.market-pulse-grid span,
.currency-summary-card__top span,
.currency-score-grid span,
.trending-card small,
.feature-grid span,
.platform-footer p {
    color: var(--muted);
}

.market-pulse-bars {
    display: grid;
    gap: 12px;
}

.market-pulse-row {
    text-decoration: none;
}

.market-pulse-row span:first-child {
    width: 44px;
    font-weight: 900;
}

.market-pulse-bar {
    flex: 1;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.market-pulse-bar i {
    display: block;
    width: var(--bar-value);
    height: 100%;
    border-radius: inherit;
    background: var(--warning);
}

.market-pulse-bar.is-positive i {
    background: var(--positive);
}

.market-pulse-bar.is-negative i {
    background: var(--negative);
}

.market-pulse-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.market-pulse-grid span,
.status-badge,
.feature-grid span {
    padding: 12px;
    border: 1px solid rgba(70, 105, 128, 0.46);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.58);
}

.market-pulse-grid strong {
    display: block;
    color: var(--text);
    font-size: 1.15rem;
}

.status-strip {
    flex-wrap: wrap;
    padding: 0;
}

.status-badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.status-badge i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--positive);
    box-shadow: 0 0 0 5px rgba(32, 214, 138, 0.12);
}

.terminal-intelligence-panel {
    padding: clamp(18px, 1.5vw, 28px);
    box-shadow: var(--shadow);
}

.terminal-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(14px, 1vw, 20px);
}

.terminal-module {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: clamp(16px, 1.1vw, 22px);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.terminal-module__top,
.terminal-signal-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.terminal-module__top span,
.terminal-signal-row span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.terminal-module__top strong {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
}

.terminal-module h3 {
    margin: 0;
    font-size: clamp(1rem, 1vw, 1.15rem);
    line-height: 1.3;
}

.terminal-module p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.48;
}

.terminal-meter {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.terminal-meter i {
    display: block;
    width: var(--bar-value);
    height: 100%;
    border-radius: inherit;
    background: var(--warning);
}

.terminal-meter i.is-positive {
    background: var(--positive);
}

.terminal-meter i.is-negative {
    background: var(--negative);
}

.terminal-meter i.is-neutral {
    background: var(--warning);
}

.terminal-module strong.is-positive {
    color: var(--positive);
}

.terminal-module strong.is-negative {
    color: var(--negative);
}

.terminal-module strong.is-neutral,
.terminal-module strong.is-warning {
    color: var(--warning);
}

.terminal-signal-row {
    padding-top: 12px;
    border-top: 1px solid rgba(70, 105, 128, 0.46);
}

.currency-summary-grid,
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(14px, 1vw, 20px);
}

.currency-summary-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: clamp(16px, 1.1vw, 22px);
    color: var(--text);
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.currency-summary-card:hover,
.trending-card:hover,
.terminal-module:hover {
    border-color: rgba(32, 214, 138, 0.52);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(32, 214, 138, 0.06);
}

.currency-summary-card__top strong {
    display: block;
    font-size: 1.2rem;
}

.stance-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(246, 193, 95, 0.38);
    border-radius: var(--radius-sm);
    color: var(--warning);
    font-size: 0.76rem;
    font-weight: 900;
}

.stance-pill.is-positive {
    border-color: rgba(32, 214, 138, 0.38);
    color: var(--positive);
}

.stance-pill.is-negative {
    border-color: rgba(255, 91, 91, 0.38);
    color: var(--negative);
}

.currency-summary-card__score {
    font-size: clamp(2rem, 3vw, 3.1rem);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.currency-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(70, 105, 128, 0.46);
}

.currency-score-grid strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LANDING PAGE â€” G10 LEADERBOARD
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.landing-page-title {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 4px 2px 0;
}

.landing-page-title h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.05;
}

.landing-tape-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.landing-tape-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(70, 105, 128, 0.52);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.62);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.landing-tape-badge strong {
    color: var(--positive);
}

.leaderboard-panel {
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(13, 24, 34, 0.99), rgba(6, 11, 17, 0.99)),
        var(--bg-panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.leaderboard-panel-head {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.32);
}

.leaderboard-panel-head h2 {
    margin: 0;
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
}

.leaderboard-panel-head p.eyebrow {
    margin: 0 0 6px;
}

.leaderboard-panel-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.78rem;
}

.leaderboard-cols,
.leaderboard-row {
    display: grid;
    grid-template-columns: 36px 72px repeat(3, minmax(0, 1fr)) 80px minmax(110px, 130px) 80px;
    gap: 10px;
    align-items: center;
    padding: 0 22px;
}

.leaderboard-cols {
    min-height: 38px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.24);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.leaderboard-row {
    min-height: 66px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.14);
    border-left: 3px solid transparent;
    text-decoration: none;
    color: var(--text);
    transition: background 160ms ease, border-left-color 160ms ease;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row:hover {
    background: rgba(71, 183, 255, 0.04);
}

.leaderboard-row.is-positive {
    border-left-color: var(--positive);
}

.leaderboard-row.is-negative {
    border-left-color: var(--negative);
}

.leaderboard-row.is-neutral {
    border-left-color: rgba(246, 193, 95, 0.5);
}

.lr-rank {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 900;
    text-align: center;
}

.lr-currency {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.lr-theme {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.lr-theme-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.lr-theme-bar i {
    display: block;
    width: var(--w);
    height: 100%;
    border-radius: inherit;
    background: var(--warning);
    transition: width 400ms ease;
}

.lr-theme-bar i.is-positive { background: var(--positive); }
.lr-theme-bar i.is-negative { background: var(--negative); }
.lr-theme-bar i.is-neutral  { background: var(--warning); }

.lr-theme small {
    font-size: 0.7rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.lr-theme small.is-positive { color: var(--positive); }
.lr-theme small.is-negative { color: var(--negative); }

.lr-score {
    font-size: 1.15rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.lr-score.is-positive { color: var(--positive); }
.lr-score.is-negative { color: var(--negative); }
.lr-score.is-neutral  { color: var(--warning); }

.lr-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(70, 105, 128, 0.32);
}

.lr-label.is-positive {
    border-color: rgba(32, 214, 138, 0.32);
    background: rgba(32, 214, 138, 0.08);
    color: var(--positive);
}

.lr-label.is-negative {
    border-color: rgba(255, 91, 91, 0.32);
    background: rgba(255, 91, 91, 0.08);
    color: var(--negative);
}

.lr-label.is-neutral {
    border-color: rgba(246, 193, 95, 0.32);
    color: var(--warning);
}

.lr-trend {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

/* Landing surprises */
.landing-surprises-panel {
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(13, 24, 34, 0.98), rgba(6, 11, 17, 0.98)),
        var(--bg-panel);
    box-shadow: var(--shadow);
    padding: clamp(16px, 1.5vw, 24px) clamp(16px, 1.5vw, 24px);
}

.landing-surprises-head {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.landing-surprises-head h2 {
    margin: 0;
    font-size: clamp(1.05rem, 1.4vw, 1.35rem);
}

.surprise-chip-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.surprise-chip {
    display: grid;
    gap: 7px;
    padding: 13px;
    border: 1px solid rgba(70, 105, 128, 0.46);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
    text-decoration: none;
    color: var(--text);
    transition: border-color 160ms ease, transform 160ms ease;
}

.surprise-chip:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.surprise-chip__meta {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.surprise-chip__name {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.surprise-chip__value {
    font-size: 1.4rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Landing quick access cards */
.landing-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1vw, 18px);
}

.landing-quick-card {
    display: grid;
    gap: 10px;
    padding: clamp(14px, 1.1vw, 20px);
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.94), rgba(7, 13, 20, 0.96)),
        var(--bg-panel-2);
    color: var(--text);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.landing-quick-card:hover {
    border-color: rgba(32, 214, 138, 0.52);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.landing-quick-card__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(32, 214, 138, 0.38);
    border-radius: var(--radius-sm);
    color: var(--positive);
    font-size: 0.76rem;
    font-weight: 900;
}

.landing-quick-card h3,
.landing-quick-card p {
    margin: 0;
}

.landing-quick-card h3 {
    font-size: 1.05rem;
}

.landing-quick-card p {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   COUNTRY PAGE â€” IMPROVED INDICATOR TABLE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.ind-table {
    display: grid;
    gap: 7px;
}

.ind-header {
    display: grid;
    grid-template-columns: minmax(180px, 2.2fr) 104px 104px minmax(90px, 1.1fr) 48px 72px;
    gap: 10px;
    padding: 0 14px 9px 20px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.38);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    align-items: center;
}

.ind-row {
    display: grid;
    grid-template-columns: minmax(180px, 2.2fr) 104px 104px minmax(90px, 1.1fr) 48px 72px;
    gap: 10px;
    align-items: center;
    min-height: 62px;
    padding: 11px 14px 11px 20px;
    border: 1px solid rgba(70, 105, 128, 0.44);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
    position: relative;
    overflow: hidden;
    transition: border-color 160ms ease, background 160ms ease;
}

.ind-row::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: rgba(70, 105, 128, 0.35);
    border-radius: 0 999px 999px 0;
}

.ind-row.is-positive::before { background: var(--positive); }
.ind-row.is-negative::before { background: var(--negative); }
.ind-row.is-neutral::before  { background: rgba(246, 193, 95, 0.6); }

.ind-row:hover {
    border-color: rgba(71, 183, 255, 0.44);
    background:
        linear-gradient(180deg, rgba(22, 43, 57, 0.96), rgba(9, 17, 25, 0.96)),
        var(--bg-panel-2);
}

.ind-row__name {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ind-row__val {
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ind-row__prev {
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.ind-row__trend {
    font-size: 1.2rem;
    text-align: center;
    line-height: 1;
}

.ind-row__detail a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(71, 183, 255, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(71, 183, 255, 0.06);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.ind-row__detail a:hover {
    border-color: var(--accent);
    background: rgba(71, 183, 255, 0.12);
}

/* Larger sparklines in country indicator table */
.ind-sparkline {
    width: 100%;
    min-width: 80px;
    height: 30px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BANK RESEARCH â€” REFRESH BAR
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.research-refresh-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 13px 18px;
    border: 1px solid rgba(70, 105, 128, 0.54);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(16, 31, 42, 0.92), rgba(8, 14, 21, 0.94)),
        var(--bg-panel-2);
}

.research-refresh-bar__info {
    display: grid;
    gap: 3px;
}

.research-refresh-bar__info strong {
    font-size: 0.9rem;
}

.research-refresh-bar__info small {
    color: var(--muted);
    font-size: 0.76rem;
}

.research-refresh-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.trending-panel {
    padding: clamp(18px, 1.5vw, 28px);
    border: 1px solid rgba(70, 105, 128, 0.66);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(13, 24, 34, 0.98), rgba(6, 11, 17, 0.98)),
        var(--bg-panel);
    box-shadow: var(--shadow);
}

.time-filter {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.time-filter button {
    min-height: 34px;
}

.time-filter button.is-active {
    border-color: var(--accent);
    background: rgba(71, 183, 255, 0.14);
}

.trending-card {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 8px 12px;
    justify-content: stretch;
    padding: 16px;
    color: var(--text);
    text-decoration: none;
}

.trending-card__code {
    font-size: 1.2rem;
    font-weight: 900;
}

.trending-card__direction {
    font-size: 1.2rem;
    font-weight: 900;
}

.trending-card strong {
    justify-self: end;
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

.trending-card small,
.mini-sparkline {
    grid-column: 1 / -1;
}

.mini-sparkline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    align-items: end;
    height: 34px;
}

.mini-sparkline i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--warning);
    clip-path: inset(calc(100% - var(--bar-position)) 0 0 0 round 999px);
}

.mini-sparkline i.is-positive {
    background: var(--positive);
}

.mini-sparkline i.is-negative {
    background: var(--negative);
}

.calendar-preview-panel,
.chart-preview-panel,
.personalization-panel,
.research-entry-panel {
    padding: clamp(18px, 1.5vw, 28px);
    box-shadow: var(--shadow);
}

.calendar-preview-controls,
.chart-preview-controls {
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.calendar-preview-controls label,
.chart-preview-controls label {
    display: grid;
    gap: 7px;
    min-width: 180px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calendar-preview-controls select,
.chart-preview-controls select {
    min-height: 40px;
    border: 1px solid rgba(82, 126, 154, 0.72);
    border-radius: var(--radius-sm);
    background: rgba(7, 13, 20, 0.82);
    color: var(--text);
    padding: 0 12px;
}

.calendar-preview-table-wrap {
    overflow-x: auto;
}

.calendar-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.calendar-preview-table th,
.calendar-preview-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(70, 105, 128, 0.46);
    text-align: left;
    white-space: nowrap;
}

.calendar-preview-table th {
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.impact-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(136, 146, 160, 0.24);
    color: var(--muted);
    font-weight: 900;
}

.impact-high {
    color: var(--negative);
    border-color: rgba(232, 64, 64, 0.32);
}

.impact-medium {
    color: var(--warning);
    border-color: rgba(245, 166, 35, 0.32);
}

.chart-preview-layout {
    display: grid;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
    gap: 18px;
}

.chart-preview-controls {
    display: grid;
    align-content: start;
    margin-bottom: 0;
}

.landing-chart {
    min-height: 340px;
}

.personalization-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 18px;
    align-items: center;
}

.personalization-panel h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.2vw, 2.4rem);
}

.research-entry-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border-color: rgba(71, 183, 255, 0.46);
    background:
        linear-gradient(135deg, rgba(71, 183, 255, 0.12), rgba(32, 214, 138, 0.06)),
        linear-gradient(180deg, rgba(16, 31, 42, 0.94), rgba(7, 13, 20, 0.96)),
        var(--bg-panel-2);
}

.research-entry-panel h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.2vw, 2.4rem);
}

.research-entry-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.feature-grid span {
    display: grid;
    gap: 5px;
    color: var(--text);
    font-weight: 800;
}

.feature-grid strong {
    display: block;
    color: var(--text);
    font-size: 0.94rem;
    text-transform: uppercase;
}

.feature-grid small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}

.platform-footer {
    flex-wrap: wrap;
    padding: 18px 4px 0;
    border-top: 1px solid rgba(70, 105, 128, 0.46);
}

.platform-footer p {
    max-width: 840px;
    margin: 6px 0 0;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .platform-header,
    .landing-hero,
    .chart-preview-layout,
    .yield-chart-grid,
    .personalization-panel,
    .research-entry-panel {
        grid-template-columns: 1fr;
    }

    .platform-search {
        justify-self: stretch;
    }

    .platform-nav {
        justify-content: flex-start;
    }

    .research-entry-actions {
        justify-content: flex-start;
    }

    .surprises-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .news-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stance-window-grid {
        grid-template-columns: 1fr;
    }

    .country-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .indicator-table__header,
    .indicator-row {
        grid-template-columns: minmax(160px, 2fr) minmax(82px, 0.9fr) minmax(82px, 0.9fr) 86px 54px 68px;
    }

    .indicator-stage {
        grid-template-columns: 1fr;
    }

    .calendar-filter-grid {
        grid-template-columns: 1fr;
    }

    .analytics-overview,
    .analytics-card-grid,
    .research-hero,
    .settings-hero,
    .research-controls,
    .settings-grid,
    .research-compare-dock,
    .yield-diff-layout {
        grid-template-columns: 1fr;
    }

    .analytics-kpi-grid,
    .category-card-grid,
    .country-depth-grid,
    .yield-stats-grid,
    .currency-toggle-grid,
    .research-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Final sidebar alignment fix: keep brand width and page offset in sync */
.black-sidebar--global {
    width: 240px;
    flex-basis: 240px;
}

.has-black-global-sidebar .shell {
    width: calc(100% - 240px);
    margin-left: 240px;
    padding: 2rem;
}

.black-sidebar--global .black-sidebar__logo {
    width: auto;
    min-height: 74px;
    padding: 1.5rem 1rem;
    overflow: hidden;
    white-space: nowrap;
    background: transparent;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
}

.black-sidebar--global .black-sidebar__logo::before {
    flex: 0 0 24px;
}

.black-sidebar--global .black-nav-item span:last-child {
    display: inline;
    opacity: 1;
}

@media (max-width: 900px) {
    .black-sidebar--global {
        width: 64px;
        flex-basis: 64px;
    }

    .has-black-global-sidebar .shell {
        width: calc(100% - 64px);
        margin-left: 64px;
        padding: 1rem;
    }

    .black-sidebar--global .black-sidebar__logo {
        justify-content: center;
        padding: 1rem 0;
        font-size: 0;
    }

    .black-sidebar--global .black-nav-item span:last-child {
        display: none;
    }
}

/* Gemini React reference fine-tune */
:root {
    --bg-app: #09090b;
    --bg-sidebar: #121214;
    --bg-card: #18181b;
    --bg-card-hover: #27272a;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-subtle: #27272a;
    --border-focus: #3f3f46;
    --color-positive: #10b981;
    --color-positive-bg: rgba(16, 185, 129, 0.1);
    --color-negative: #f43f5e;
    --color-negative-bg: rgba(244, 63, 94, 0.1);
    --color-warning: #f59e0b;
    --color-neutral: #3b82f6;
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
.black-terminal-shell,
body.has-black-global-sidebar {
    background: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.black-terminal-shell {
    --bt-bg0: var(--bg-app);
    --bt-bg1: var(--bg-sidebar);
    --bt-bg2: var(--bg-card);
    --bt-bg3: var(--bg-card-hover);
    --bt-border: var(--border-subtle);
    --bt-border2: var(--border-focus);
    --bt-text: var(--text-primary);
    --bt-muted: var(--text-secondary);
    --bt-dim: var(--text-muted);
    --bt-blue: var(--color-neutral);
    --bt-green: var(--color-positive);
    --bt-red: var(--color-negative);
    --bt-amber: var(--color-warning);
}

.black-sidebar,
.black-sidebar--global {
    flex: 0 0 240px;
    width: 240px;
    align-items: stretch;
    padding: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
}

.black-sidebar__logo {
    width: auto;
    height: auto;
    min-height: 74px;
    margin: 0;
    padding: 1.5rem 1rem;
    justify-content: flex-start;
    gap: 0.75rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.black-sidebar__logo::before {
    content: "M";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--color-neutral);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.black-sidebar__nav {
    gap: 0;
    padding: 1rem 0.5rem;
}

.black-nav-item {
    min-height: 38px;
    margin-bottom: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-left: 0;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.black-nav-item:hover,
.black-nav-item.is-active {
    background: var(--bg-card);
    color: var(--text-primary);
}

.black-nav-item.is-active {
    position: relative;
}

.black-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    width: 3px;
    height: 70%;
    border-radius: 0 4px 4px 0;
    background: var(--color-neutral);
}

.black-nav-icon {
    flex-basis: 24px;
    color: currentColor;
    font-size: 10px;
}

.black-nav-item span:last-child {
    opacity: 1;
}

.black-nav-divider {
    margin: 0.75rem 0.75rem;
    background: var(--border-subtle);
}

.black-sidebar__toggle {
    display: none;
}

.black-workspace {
    background: var(--bg-app);
}

.black-topbar {
    height: auto;
    min-height: 88px;
    padding: 1.5rem 2rem 0.5rem;
    border-bottom: 0;
    background: var(--bg-app);
}

.black-topbar h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.black-topbar p {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.black-search {
    max-width: 320px;
    margin-left: auto;
}

.black-search input,
.black-search button,
.black-terminal-shell select {
    min-height: 38px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.black-search button {
    padding: 0 0.9rem;
}

.black-pills {
    display: none;
}

.black-content {
    gap: 1.5rem;
    padding: 1.5rem 2rem 2rem;
}

.black-kpi-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
}

.black-kpi-card,
.black-panel,
.black-country-card,
.black-chart-grid > div,
.black-ccy-card,
.black-rate-cell {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
}

.black-kpi-card {
    min-height: 118px;
    padding: 1.25rem;
}

.black-kpi-card span {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.black-kpi-card strong {
    margin-top: 0.45rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.black-kpi-card small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.black-dashboard-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.black-panel--ranking {
    grid-column: span 8;
}

#macro-prints.black-panel {
    grid-column: span 4;
}

.black-side-stack {
    grid-column: span 12;
    grid-row: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.black-lower-grid {
    grid-template-columns: minmax(0, 8fr) minmax(320px, 4fr);
    gap: 1.5rem;
}

.black-panel__head {
    min-height: 54px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.black-panel__head a,
.black-panel__head em {
    color: var(--color-neutral);
    font-size: 0.875rem;
    font-weight: 500;
}

.black-fx-table th,
.black-fx-table td {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.black-fx-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
}

.black-fx-table tbody tr:hover td,
.black-surprise:hover,
.black-calendar-item:hover,
.black-headline:hover,
.black-rate-cell:hover,
.black-ccy-card:hover,
.black-country-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.black-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
}

.black-ccy-link strong,
.black-score,
.black-rate-cell strong,
.black-surprise__value {
    font-family: var(--font-sans);
    font-weight: 600;
}

.black-score-bar {
    width: 100px;
    height: 6px;
    background: var(--border-subtle);
}

.black-stance,
.black-pill {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: capitalize;
}

.black-stance--bull,
.black-pill--green {
    background: var(--color-positive-bg);
    color: var(--color-positive);
}

.black-stance--bear,
.black-pill--red {
    background: var(--color-negative-bg);
    color: var(--color-negative);
}

.black-stance--neut,
.black-pill--blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-neutral);
}

.black-surprise,
.black-calendar-item,
.black-headline {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.black-calendar-controls {
    padding: 1rem 1.25rem;
    border-bottom-color: var(--border-subtle);
}

.black-rates-grid {
    gap: 0;
}

.black-rate-cell {
    border-radius: 0;
    border-top: 0;
    border-left: 0;
    padding: 1rem 1.25rem;
}

.black-ccy-cards,
.black-country-grid,
.black-chart-grid {
    padding: 1.25rem;
    gap: 0.75rem;
}

.black-ccy-card {
    flex-basis: 86px;
    padding: 1rem;
}

.black-country-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.black-chart-grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
}

.black-chart {
    height: 280px;
}

.black-statusbar {
    display: none;
}

body.has-black-global-sidebar {
    --bt-bg1: var(--bg-sidebar);
    --bt-bg2: var(--bg-card);
    --bt-bg3: var(--bg-card-hover);
    --bt-border: var(--border-subtle);
    --bt-border2: var(--border-focus);
    --bt-text: var(--text-primary);
    --bt-muted: var(--text-secondary);
    --bt-dim: var(--text-muted);
    --bt-blue: var(--color-neutral);
    --bt-green: var(--color-positive);
    --bt-red: var(--color-negative);
}

.has-black-global-sidebar .shell {
    width: calc(100% - 240px);
    margin-left: 240px;
    padding: 2rem;
}

.has-black-global-sidebar .calendar-hero,
.has-black-global-sidebar .analytics-hero,
.has-black-global-sidebar .research-hero,
.has-black-global-sidebar .settings-hero,
.has-black-global-sidebar .country-header,
.has-black-global-sidebar .indicator-hero,
.has-black-global-sidebar .stub-panel {
    margin: 0 0 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.has-black-global-sidebar .calendar-hero h1,
.has-black-global-sidebar .analytics-hero h1,
.has-black-global-sidebar .research-hero h1,
.has-black-global-sidebar .settings-hero h1,
.has-black-global-sidebar .country-header h1,
.has-black-global-sidebar .indicator-hero h1,
.has-black-global-sidebar .stub-panel h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.has-black-global-sidebar .calendar-controls,
.has-black-global-sidebar .calendar-panel,
.has-black-global-sidebar .analytics-panel,
.has-black-global-sidebar .research-refresh-bar,
.has-black-global-sidebar .research-compare-dock,
.has-black-global-sidebar .research-controls,
.has-black-global-sidebar .research-card,
.has-black-global-sidebar .research-admin-panel,
.has-black-global-sidebar .research-admin-card,
.has-black-global-sidebar .settings-panel,
.has-black-global-sidebar .settings-status-card,
.has-black-global-sidebar .tab-panel,
.has-black-global-sidebar .chart-shell,
.has-black-global-sidebar .side-panel,
.has-black-global-sidebar .prints-panel,
.has-black-global-sidebar .indicator-controls,
.has-black-global-sidebar .calendar-day,
.has-black-global-sidebar .stat-block {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
}

.has-black-global-sidebar .calendar-controls,
.has-black-global-sidebar .calendar-panel,
.has-black-global-sidebar .analytics-panel,
.has-black-global-sidebar .research-refresh-bar,
.has-black-global-sidebar .research-compare-dock,
.has-black-global-sidebar .research-controls,
.has-black-global-sidebar .research-admin-panel,
.has-black-global-sidebar .settings-grid,
.has-black-global-sidebar .tab-panel,
.has-black-global-sidebar .indicator-controls,
.has-black-global-sidebar .indicator-stage,
.has-black-global-sidebar .prints-panel {
    margin: 0 0 1.5rem;
}

.has-black-global-sidebar .calendar-controls,
.has-black-global-sidebar .research-controls {
    padding: 1.25rem;
}

.has-black-global-sidebar .calendar-table th,
.has-black-global-sidebar .calendar-table td,
.has-black-global-sidebar th,
.has-black-global-sidebar td {
    padding: 0.75rem 1rem;
    border-color: var(--border-subtle);
}

.has-black-global-sidebar input,
.has-black-global-sidebar select,
.has-black-global-sidebar textarea,
.has-black-global-sidebar .control-button,
.has-black-global-sidebar button,
.has-black-global-sidebar .primary-action,
.has-black-global-sidebar .secondary-action,
.has-black-global-sidebar .topbar__link,
.has-black-global-sidebar .back-link,
.has-black-global-sidebar .analytics-download-link,
.has-black-global-sidebar .research-bookmark,
.has-black-global-sidebar .research-card__actions a,
.has-black-global-sidebar .research-compare-button {
    border-color: var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
}

.has-black-global-sidebar .primary-action {
    background: var(--color-positive-bg);
    color: var(--color-positive);
}

.has-black-global-sidebar .settings-grid {
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .black-dashboard-grid,
    .black-lower-grid,
    .black-chart-grid {
        grid-template-columns: 1fr;
    }

    .black-panel--ranking,
    #macro-prints.black-panel,
    .black-side-stack {
        grid-column: auto;
    }

    .black-side-stack {
        grid-template-columns: 1fr;
    }

    .black-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .black-sidebar,
    .black-sidebar--global {
        flex-basis: 64px;
        width: 64px;
    }

    .black-sidebar__logo {
        justify-content: center;
        padding: 1rem 0;
        font-size: 0;
    }

    .black-nav-item span:last-child {
        display: none;
    }

    .black-nav-icon {
        flex-basis: 100%;
    }

    .black-workspace {
        margin-left: 0;
    }

    .has-black-global-sidebar .shell {
        width: calc(100% - 64px);
        margin-left: 64px;
        padding: 1rem;
    }

    .black-topbar,
    .black-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100vw - 16px, 100%);
        padding-top: 12px;
        padding-bottom: 28px;
    }

    .platform-header {
        position: relative;
        top: 0;
        gap: 14px;
    }

    .platform-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .platform-nav a {
        min-height: 34px;
        padding: 7px 9px;
        border: 1px solid rgba(70, 105, 128, 0.46);
        border-radius: var(--radius-sm);
        background: rgba(7, 13, 20, 0.46);
    }

    .landing-hero {
        min-height: auto;
        padding: 22px;
    }

    .landing-hero h1 {
        font-size: clamp(2.2rem, 13vw, 3.5rem);
    }

    .market-pulse-grid,
    .currency-score-grid,
    .feature-grid,
    .landing-features,
    .terminal-visual__heatmap {
        grid-template-columns: 1fr;
    }

    .global-nav {
        position: relative;
        display: grid;
    }

    .global-nav nav {
        justify-content: flex-start;
    }

    .topbar,
    .panel-heading,
    .country-header__stats,
    .country-header__title-row,
    .stub-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .fx-radar-tools {
        justify-content: flex-start;
    }

    .fx-radar-legend__meta {
        width: 100%;
        margin-left: 0;
    }

    .surprises-strip {
        grid-template-columns: 1fr;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .calendar-preview-controls,
    .calendar-export-actions,
    .hero-actions,
    .yield-chart-toolbar,
    .platform-search {
        display: grid;
        grid-template-columns: 1fr;
    }

    .landing-chart {
        min-height: 280px;
    }

    .indicator-table__header {
        display: none;
    }

    .indicator-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stance-row {
        grid-template-columns: 24px minmax(0, 1fr) 52px;
    }

    .category-meter-strip {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .fundamental-meter-grid {
        grid-template-columns: 1fr;
    }

    .yield-table__header {
        display: none;
    }

    .yield-row {
        grid-template-columns: minmax(0, 1fr) repeat(2, minmax(72px, auto));
        gap: 8px;
    }

    .yield-row > strong:nth-of-type(1) {
        grid-column: 2;
    }

    .yield-row > strong:nth-of-type(2) {
        grid-column: 3;
    }

    .yield-row > span {
        font-size: 0.78rem;
    }

    .meter-metric-row {
        grid-template-columns: minmax(62px, 0.8fr) 48px repeat(4, minmax(44px, 0.6fr));
        gap: 5px;
        font-size: 0.68rem;
    }

    .indicator-row__trend {
        text-align: left;
    }

    .analytics-hero__grid,
    .research-geo__grid,
    .research-asset,
    .control-row,
    .chart-shell__header,
    .calendar-hero__row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .chart-shell__meta {
        text-align: left;
    }

    .indicator-chart {
        min-height: 320px;
    }

    .calendar-day__header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .analytics-kpi-grid,
    .category-card-grid,
    .country-depth-grid,
    .run-timeline__item,
    .research-admin-grid {
        grid-template-columns: 1fr;
    }

    .analytics-donut-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .analytics-section-heading {
        display: grid;
        grid-template-columns: 1fr;
    }

    .research-card__header {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .country-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .surprises-panel,
    .currency-stance-panel,
    .yield-diff-panel,
    .news-panel,
    .countries-panel,
    .country-header,
    .tab-panel,
    .stub-panel,
    .indicator-hero,
    .calendar-hero,
    .indicator-controls,
    .calendar-controls,
    .analytics-hero,
    .research-hero,
    .research-controls,
    .chart-shell,
    .side-panel,
    .prints-panel,
    .calendar-panel,
    .analytics-panel,
    .research-warning {
        padding-left: 14px;
        padding-right: 14px;
    }

    .yield-stats-grid {
        grid-template-columns: 1fr;
    }

    .yield-row {
        grid-template-columns: 1fr;
    }

    .yield-row > strong,
    .yield-row > span {
        text-align: left;
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Terminal Leaderboard & Surprise Cards
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Panel wrapper */
.term-panel {
    border: 1px solid rgba(43, 60, 76, 0.8);
    border-radius: var(--radius-lg);
    background: rgba(14, 17, 22, 0.97);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.term-panel-head {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 13px 22px;
    border-bottom: 1px solid rgba(43, 60, 76, 0.55);
}

.term-panel-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}

.term-timestamp {
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--muted);
    white-space: nowrap;
}

.term-panel-link {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.term-panel-link:hover { color: var(--positive); }

/* Table */
.term-table { width: 100%; }

.term-table-head,
.term-row {
    display: grid;
    grid-template-columns: 52px 240px 1fr 108px 108px 108px;
    gap: 8px;
    align-items: center;
    padding: 0 22px;
}

.term-table-head {
    min-height: 34px;
    border-bottom: 1px solid rgba(43, 60, 76, 0.45);
    color: var(--muted);
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.term-row {
    min-height: 62px;
    border-bottom: 1px solid rgba(43, 60, 76, 0.22);
    border-left: 3px solid transparent;
    text-decoration: none;
    color: var(--text);
    transition: background 140ms ease;
}

.term-row:last-child { border-bottom: none; }

.term-row:hover { background: rgba(74, 159, 224, 0.04); }

.term-row.is-positive { border-left-color: var(--positive); }
.term-row.is-negative { border-left-color: var(--negative); }
.term-row.is-neutral  { border-left-color: rgba(245, 166, 35, 0.55); }

.term-row--top { background: rgba(74, 159, 224, 0.025); }

/* Row cells */
.term-rank {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.term-ccy {
    display: flex;
    gap: 10px;
    align-items: center;
}

.term-flag      { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.term-flag--sm  { font-size: 0.95rem; vertical-align: middle; }

.term-ccy-text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
}

.term-ccy-text strong {
    display: block;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    color: var(--accent);
}

/* ASCII bar */
.term-strength { display: flex; align-items: center; }

.term-bar {
    font-family: 'Courier New', 'Lucida Console', Consolas, monospace;
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    white-space: nowrap;
    color: var(--muted);
}

.term-bar.is-positive { color: var(--positive); }
.term-bar.is-negative { color: var(--negative); }
.term-bar.is-neutral  { color: var(--warning); }

/* Sparklines */
.term-spark {
    display: block;
    height: 38px;
    overflow: hidden;
}

.term-spark svg { width: 100%; height: 100%; }

/* Surprise strip */
.term-surprise-strip {
    display: flex;
    gap: 10px;
    padding: 16px 22px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(61, 70, 86, 0.5) transparent;
}

.term-surprise-strip::-webkit-scrollbar { height: 4px; }
.term-surprise-strip::-webkit-scrollbar-track { background: transparent; }
.term-surprise-strip::-webkit-scrollbar-thumb { background: rgba(61, 70, 86, 0.5); border-radius: 2px; }

.term-surprise-card {
    flex: 0 0 210px;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(43, 60, 76, 0.7);
    border-left-width: 3px;
    border-radius: var(--radius-md);
    background: rgba(20, 24, 32, 0.9);
    text-decoration: none;
    color: var(--text);
    transition: border-color 140ms ease, background 140ms ease;
    cursor: pointer;
}

.term-surprise-card:hover {
    border-color: rgba(74, 159, 224, 0.45);
    background: rgba(28, 34, 46, 0.95);
}

.term-surprise-card.is-positive { border-left-color: var(--positive); }
.term-surprise-card.is-negative { border-left-color: var(--negative); }

.term-surprise-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.term-surprise-card__arrow {
    font-size: 1rem;
    color: var(--border-strong);
}

.term-surprise-card__name {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.term-surprise-card__stats {
    font-size: 0.7rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.term-surprise-card__surprise {
    font-size: 0.84rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.term-surprise-card__surprise.is-positive { color: var(--positive); }
.term-surprise-card__surprise.is-negative { color: var(--negative); }

/* Responsive: stack sparkline columns on narrow screens */
@media (max-width: 900px) {
    .term-table-head,
    .term-row {
        grid-template-columns: 42px 1fr 1fr;
    }
    .term-spark,
    .term-table-head span:nth-child(n+4) { display: none; }
}

@media (max-width: 600px) {
    .term-table-head,
    .term-row {
        grid-template-columns: 36px 1fr;
        padding: 0 14px;
    }
    .term-strength,
    .term-table-head span:nth-child(n+3) { display: none; }
    .term-surprise-strip { padding: 14px; }
    .term-surprise-card { flex: 0 0 180px; }
}

/* Reference design consolidation: compact black workstation pages */
:root {
    --color-background-primary: #0a0a0a;
    --color-background-secondary: #111111;
    --color-background-tertiary: #000000;
    --color-border-tertiary: #1f1f1f;
    --color-border-secondary: #2a2a2a;
    --color-text-primary: #e8e8e8;
    --color-text-secondary: #888888;
    --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.black-sidebar__logo,
.global-nav__brand span {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.black-terminal-shell,
body.has-black-global-sidebar {
    font-family: var(--font-sans);
    background: #000;
}

.black-panel,
.black-kpi-card,
.black-country-card,
.black-chart-grid > div,
.black-ccy-card {
    border-color: #1f1f1f;
    border-radius: 5px;
    box-shadow: none;
}

.black-content {
    gap: 10px;
    padding: 14px 18px;
}

.black-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    gap: 10px;
}

.black-chart-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.black-chart {
    height: 300px;
}

body.has-black-global-sidebar {
    --bt-bg0: #000000;
    --bt-bg1: #0a0a0a;
    --bt-bg2: #111111;
    --bt-bg3: #191919;
    --bt-border: #1f1f1f;
    --bt-border2: #2a2a2a;
    --bt-text: #e8e8e8;
    --bt-muted: #888888;
    --bt-dim: #444444;
    --bt-blue: #3b82f6;
    --bt-green: #22c55e;
    --bt-red: #ef4444;
    --bt-amber: #f59e0b;
    --bt-mono: "IBM Plex Mono", Consolas, monospace;
    margin: 0;
    color: #e8e8e8;
    font-size: 13px;
}

body.has-black-global-sidebar::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: none;
}

.black-sidebar--global {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: 52px;
    height: 100vh;
    border-right: 1px solid #1f1f1f;
    background: #0a0a0a;
}

.has-black-global-sidebar .shell {
    width: calc(100% - 52px);
    max-width: none;
    min-height: 100vh;
    margin: 0 0 0 52px;
    padding: 0;
}

.has-black-global-sidebar .calendar-hero,
.has-black-global-sidebar .analytics-hero,
.has-black-global-sidebar .research-hero,
.has-black-global-sidebar .settings-hero,
.has-black-global-sidebar .country-header,
.has-black-global-sidebar .indicator-hero,
.has-black-global-sidebar .stub-panel {
    min-height: 44px;
    margin: 0;
    padding: 12px 18px;
    border: 0;
    border-bottom: 1px solid #1f1f1f;
    border-radius: 0;
    background: #0a0a0a;
    box-shadow: none;
}

.has-black-global-sidebar .calendar-hero h1,
.has-black-global-sidebar .analytics-hero h1,
.has-black-global-sidebar .research-hero h1,
.has-black-global-sidebar .settings-hero h1,
.has-black-global-sidebar .country-header h1,
.has-black-global-sidebar .indicator-hero h1,
.has-black-global-sidebar .stub-panel h1 {
    color: #e8e8e8;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.has-black-global-sidebar .calendar-hero__copy,
.has-black-global-sidebar .panel-copy,
.has-black-global-sidebar .ph-sub,
.has-black-global-sidebar small {
    color: #444444;
}

.has-black-global-sidebar .eyebrow,
.has-black-global-sidebar .control-group__label,
.has-black-global-sidebar .panel-title,
.has-black-global-sidebar .analytics-section-heading .eyebrow,
.has-black-global-sidebar .research-search span,
.has-black-global-sidebar .settings-panel > .eyebrow,
.has-black-global-sidebar .stat-block__label {
    color: #444444;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.has-black-global-sidebar .calendar-controls,
.has-black-global-sidebar .calendar-panel,
.has-black-global-sidebar .analytics-panel,
.has-black-global-sidebar .analytics-donut-card,
.has-black-global-sidebar .research-refresh-bar,
.has-black-global-sidebar .research-compare-dock,
.has-black-global-sidebar .research-controls,
.has-black-global-sidebar .research-card,
.has-black-global-sidebar .research-admin-panel,
.has-black-global-sidebar .research-admin-card,
.has-black-global-sidebar .settings-panel,
.has-black-global-sidebar .settings-status-card,
.has-black-global-sidebar .tab-panel,
.has-black-global-sidebar .chart-shell,
.has-black-global-sidebar .side-panel,
.has-black-global-sidebar .prints-panel,
.has-black-global-sidebar .country-header,
.has-black-global-sidebar .indicator-controls {
    border: 1px solid #1f1f1f;
    border-radius: 5px;
    background: #0a0a0a;
    box-shadow: none;
}

.has-black-global-sidebar .calendar-controls,
.has-black-global-sidebar .calendar-panel,
.has-black-global-sidebar .analytics-panel,
.has-black-global-sidebar .research-refresh-bar,
.has-black-global-sidebar .research-compare-dock,
.has-black-global-sidebar .research-controls,
.has-black-global-sidebar .research-admin-panel,
.has-black-global-sidebar .settings-grid,
.has-black-global-sidebar .tab-panel,
.has-black-global-sidebar .indicator-controls,
.has-black-global-sidebar .indicator-stage,
.has-black-global-sidebar .prints-panel {
    margin: 14px 18px 0;
}

.has-black-global-sidebar .calendar-controls {
    display: grid;
    grid-template-columns: auto auto minmax(420px, 1fr);
    gap: 12px;
    align-items: end;
    padding: 12px;
}

.has-black-global-sidebar .calendar-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 8px;
}

.has-black-global-sidebar .calendar-filter-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.has-black-global-sidebar .calendar-panel {
    padding: 0;
    overflow: hidden;
}

.has-black-global-sidebar .calendar-panel .panel-heading {
    min-height: 48px;
    margin: 0;
    padding: 10px 13px;
    border-bottom: 1px solid #1f1f1f;
}

.has-black-global-sidebar .calendar-panel .panel-heading h2 {
    font-size: 18px;
}

.has-black-global-sidebar .calendar-day {
    margin: 0;
    border: 0;
    border-bottom: 1px solid #1f1f1f;
    border-radius: 0;
    background: #0a0a0a;
}

.has-black-global-sidebar .calendar-day__header {
    padding: 8px 13px;
    border-bottom: 1px solid #1f1f1f;
}

.has-black-global-sidebar .calendar-day__header h3 {
    color: #888888;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.has-black-global-sidebar .calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.has-black-global-sidebar .calendar-table th,
.has-black-global-sidebar .calendar-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #1f1f1f;
    font-size: 12px;
}

.has-black-global-sidebar .calendar-table th {
    color: #444444;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.has-black-global-sidebar .calendar-table tr:hover td {
    background: #111111;
}

.has-black-global-sidebar input,
.has-black-global-sidebar select,
.has-black-global-sidebar textarea {
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    background: #050505;
    color: #e8e8e8;
}

.has-black-global-sidebar .control-button,
.has-black-global-sidebar button,
.has-black-global-sidebar .primary-action,
.has-black-global-sidebar .secondary-action,
.has-black-global-sidebar .topbar__link,
.has-black-global-sidebar .back-link,
.has-black-global-sidebar .analytics-download-link,
.has-black-global-sidebar .research-bookmark,
.has-black-global-sidebar .research-card__actions a,
.has-black-global-sidebar .research-compare-button {
    min-height: 28px;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    background: #111111;
    color: #888888;
    font-size: 12px;
    box-shadow: none;
}

.has-black-global-sidebar .control-button.is-active,
.has-black-global-sidebar .tab-button.is-active {
    border-color: #1d3a6e;
    background: #0f2040;
    color: #3b82f6;
}

.has-black-global-sidebar .primary-action {
    border-color: #0f3d1a;
    background: #0a2a14;
    color: #22c55e;
}

.has-black-global-sidebar .back-link,
.has-black-global-sidebar .topbar__link,
.has-black-global-sidebar .analytics-download-link {
    color: #3b82f6;
}

.has-black-global-sidebar .research-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.has-black-global-sidebar .research-refresh-bar {
    min-height: 48px;
    padding: 9px 13px;
}

.has-black-global-sidebar .research-controls {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 220px 220px 220px;
    gap: 12px;
    padding: 12px;
}

.has-black-global-sidebar .research-card {
    padding: 13px 16px;
}

.has-black-global-sidebar .research-card__header {
    border-bottom: 0;
}

.has-black-global-sidebar .research-card h2 {
    color: #e8e8e8;
    font-size: 16px;
}

.has-black-global-sidebar .research-assets {
    gap: 8px;
}

.has-black-global-sidebar .research-asset {
    border: 1px solid #1f1f1f;
    border-radius: 5px;
    background: #050505;
}

.has-black-global-sidebar .research-outlook--bullish,
.has-black-global-sidebar .bull,
.has-black-global-sidebar .ok {
    background: #0a2a14;
    color: #22c55e;
}

.has-black-global-sidebar .research-outlook--bearish,
.has-black-global-sidebar .bear,
.has-black-global-sidebar .err {
    background: #2a0a0a;
    color: #ef4444;
}

.has-black-global-sidebar .research-outlook--mixed,
.has-black-global-sidebar .research-outlook--watch,
.has-black-global-sidebar .warn {
    background: #2a1a00;
    color: #f59e0b;
}

.has-black-global-sidebar .research-outlook--neutral,
.has-black-global-sidebar .neu,
.has-black-global-sidebar .off {
    background: #111111;
    color: #888888;
}

.has-black-global-sidebar .settings-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.has-black-global-sidebar .settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 10px;
}

.has-black-global-sidebar .settings-panel {
    margin: 0;
    padding: 14px;
}

.has-black-global-sidebar .settings-panel label,
.has-black-global-sidebar .research-search {
    color: #888888;
}

.has-black-global-sidebar .currency-toggle,
.has-black-global-sidebar .settings-switch {
    border-color: #1f1f1f;
    background: #050505;
}

.has-black-global-sidebar .currency-toggle:has(input:checked) {
    border-color: #0f3d1a;
    background: #0a2a14;
    color: #22c55e;
}

.has-black-global-sidebar .country-header {
    display: grid;
    gap: 10px;
}

.has-black-global-sidebar .country-header__title-row {
    gap: 10px;
}

.has-black-global-sidebar .country-header__flag {
    font-size: 28px;
}

.has-black-global-sidebar .country-header__stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.has-black-global-sidebar .stat-block {
    border: 1px solid #1f1f1f;
    border-radius: 5px;
    background: #111111;
    padding: 10px 12px;
}

.has-black-global-sidebar .tabs {
    border-bottom: 1px solid #1f1f1f;
}

.has-black-global-sidebar .tab-button {
    border: 0;
    border-right: 1px solid #1f1f1f;
    border-radius: 0;
    background: transparent;
}

.has-black-global-sidebar .ind-table,
.has-black-global-sidebar .ind-row,
.has-black-global-sidebar .prints-table-wrap,
.has-black-global-sidebar .chart-shell,
.has-black-global-sidebar .side-panel,
.has-black-global-sidebar .analytics-kpi,
.has-black-global-sidebar .analytics-donut-card,
.has-black-global-sidebar .category-card,
.has-black-global-sidebar .country-depth-card {
    border-color: #1f1f1f;
    background: #0a0a0a;
    box-shadow: none;
}

.has-black-global-sidebar .is-positive,
.has-black-global-sidebar .calendar-actual.is-positive,
.has-black-global-sidebar .pos {
    color: #22c55e !important;
}

.has-black-global-sidebar .is-negative,
.has-black-global-sidebar .calendar-actual.is-negative,
.has-black-global-sidebar .neg {
    color: #ef4444 !important;
}

.has-black-global-sidebar .is-warning {
    color: #f59e0b !important;
}

@media (max-width: 1100px) {
    .has-black-global-sidebar .calendar-controls,
    .has-black-global-sidebar .research-controls,
    .has-black-global-sidebar .settings-grid {
        grid-template-columns: 1fr;
    }

    .has-black-global-sidebar .calendar-filter-grid,
    .has-black-global-sidebar .country-header__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .black-lower-grid,
    .black-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* Keep the app sidebar expanded at all viewport widths. */
body.has-black-global-sidebar .black-sidebar,
body.has-black-global-sidebar .black-sidebar--global {
    align-items: flex-start;
    flex-basis: 240px;
    width: 240px;
}

body.has-black-global-sidebar .black-sidebar__logo,
body.has-black-global-sidebar .black-sidebar--global .black-sidebar__logo {
    justify-content: flex-start;
    width: auto;
    min-height: 74px;
    padding: 1.5rem 1rem;
    font-size: 12px;
}

body.has-black-global-sidebar .black-nav-item span:last-child,
body.has-black-global-sidebar .black-sidebar--global .black-nav-item span:last-child {
    display: inline;
    opacity: 1;
}

body.has-black-global-sidebar .black-nav-icon {
    flex: 0 0 18px;
}

body.has-black-global-sidebar .shell {
    width: calc(100% - 240px);
    margin-left: 240px;
}

.countries-directory {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100vh;
    background: var(--bg-app);
}

.countries-directory__hero,
.countries-directory__stats article,
.countries-directory__panel,
.countries-directory__card {
    border: 1px solid var(--border-subtle);
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--bg-card);
    background-size: 32px 32px;
    box-shadow: none;
}

.countries-directory__hero {
    display: grid;
    gap: 8px;
    padding: 22px;
    border-radius: 6px;
}

.countries-directory__hero > div {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.countries-directory__hero a {
    color: var(--color-neutral);
    text-decoration: none;
}

.countries-directory__hero h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 32px;
    line-height: 1.05;
}

.countries-directory__hero p {
    max-width: 720px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.countries-directory__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.countries-directory__stats article {
    padding: 14px;
    border-radius: 6px;
}

.countries-directory__stats span,
.countries-directory__stats small,
.countries-directory__panel > header,
.countries-directory__card dt,
.countries-directory__card footer span {
    color: var(--text-secondary);
}

.countries-directory__stats span,
.countries-directory__panel > header span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.countries-directory__stats strong {
    display: block;
    margin-top: 6px;
    color: var(--color-positive);
    font-size: 28px;
    line-height: 1;
}

.countries-directory__stats small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

.countries-directory__panel {
    overflow: hidden;
    border-radius: 6px;
}

.countries-directory__panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.countries-directory__panel > header em {
    color: var(--color-neutral);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.countries-directory__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    padding: 12px;
}

.countries-directory__card {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.countries-directory__card:hover {
    border-color: var(--border-focus);
    background-color: var(--bg-card-hover);
    transform: translateY(-1px);
}

.countries-directory__card > div:first-child {
    display: grid;
    gap: 5px;
}

.countries-directory__card > div:first-child strong {
    color: var(--color-positive);
    font-size: 24px;
    line-height: 1;
}

.countries-directory__card > div:first-child span {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
}

.countries-directory__card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.countries-directory__card dl div {
    display: grid;
    grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
}

.countries-directory__card dt,
.countries-directory__card dd {
    margin: 0;
    font-size: 12px;
}

.countries-directory__card dd {
    color: var(--text-primary);
    font-weight: 800;
}

.countries-directory__card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.countries-directory__card footer span {
    font-size: 11px;
}

.countries-directory__card footer b {
    color: var(--color-neutral);
    font-size: 12px;
}

@media (max-width: 900px) {
    .countries-directory__stats {
        grid-template-columns: 1fr;
    }

    .countries-directory__hero h1 {
        font-size: 26px;
    }
}

/* Final theme consistency: remove green brand block and keep typography unified. */
body,
.black-terminal-shell,
body.has-black-global-sidebar {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.black-sidebar__logo,
.global-nav__brand span,
body.has-black-global-sidebar .black-sidebar__logo,
body.has-black-global-sidebar .black-sidebar--global .black-sidebar__logo {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.black-sidebar__logo::before,
body.has-black-global-sidebar .black-sidebar__logo::before {
    background: var(--color-neutral);
}

.country-history-card .ind-row__name,
.country-history-card .ind-row__val,
.country-history-card .ind-row__prev,
.country-history-tabs button {
    font-family: inherit;
    font-weight: 650;
}

.rates-research {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-app);
}

.rates-research__hero,
.rates-research__maturities,
.rates-research__stats article,
.rates-card,
.rates-research__diagnostics {
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--bg-card);
    background-size: 32px 32px;
}

.rates-research__hero {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.rates-research__hero > div,
.rates-card header,
.rates-research__stats span,
.rates-research__stats small,
.rates-research__diagnostics p {
    color: var(--text-secondary);
}

.rates-research__hero > div {
    display: flex;
    gap: 6px;
    font-size: 12px;
}

.rates-research__hero a {
    color: var(--color-neutral);
    text-decoration: none;
}

.rates-research__hero section {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.rates-research__hero h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 32px;
    line-height: 1.05;
}

.rates-research__hero p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--text-secondary);
}

.rates-research__hero label {
    display: grid;
    gap: 6px;
    min-width: 220px;
}

.rates-research__hero label span,
.rates-card header span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rates-research__hero select {
    min-height: 38px;
    border: 1px solid var(--border-focus);
    border-radius: 5px;
    background: #050505;
    color: var(--text-primary);
}

.rates-research__maturities {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
}

.rates-research__maturities button {
    display: grid;
    gap: 3px;
    min-height: 58px;
    padding: 10px 12px;
    border: 0;
    border-right: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.rates-research__maturities button:disabled {
    cursor: not-allowed;
}

.rates-research__maturities button:last-child {
    border-right: 0;
}

.rates-research__maturities button.is-active {
    background: #0f2040;
    color: var(--color-neutral);
}

.rates-research__maturities button.is-muted:not(.is-active) {
    color: var(--text-muted);
    opacity: 0.62;
}

.rates-research__maturities button.is-muted:not(.is-active) span {
    color: var(--text-muted);
}

.rates-research__maturities span {
    color: var(--text-secondary);
    font-size: 11px;
}

.rates-research__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.rates-research__stats article {
    padding: 13px;
}

.rates-research__stats span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.rates-research__stats strong {
    display: block;
    margin-top: 6px;
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
}

.rates-research__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
    gap: 12px;
}

.rates-card {
    overflow: hidden;
}

.rates-card--wide {
    min-width: 0;
}

.rates-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.rates-card header em {
    color: #f97316;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.rates-chart {
    height: 340px;
}

.rates-chart--compact {
    height: 300px;
}

.rates-pair-list {
    display: grid;
}

.rates-pair-list button {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) minmax(80px, auto) minmax(80px, auto);
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.rates-pair-list button:hover {
    background: var(--bg-card-hover);
}

.rates-pair-list span {
    font-weight: 800;
    text-align: right;
}

.rates-research__diagnostics {
    padding: 14px;
}

.rates-research__diagnostics strong {
    color: #f97316;
}

@media (max-width: 1180px) {
    .rates-research__maturities,
    .rates-research__stats,
    .rates-research__grid {
        grid-template-columns: 1fr;
    }

    .rates-research__hero section {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Bank research polish and functional filter states. */
.research-workbench {
    font-family: inherit;
    overflow: hidden;
}

.research-workbench__topbar {
    min-height: 48px;
}

.research-terminal-layout {
    grid-template-columns: 260px minmax(0, 1fr);
}

.research-report-feed {
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 12px;
}

.research-terminal-filters__head {
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.research-terminal-search input,
.research-filter-block select {
    background: #050505;
}

.research-chip-row button {
    min-width: 42px;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.research-chip-row button.is-active {
    border-color: #1d3a6e;
    background: #0f2040;
    color: var(--color-neutral);
}

.research-bank-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.has-black-global-sidebar .research-bank-item {
    min-height: auto;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    background: transparent;
    color: inherit;
}

.research-bank-item.is-active {
    background: #0f2040;
}

.has-black-global-sidebar .research-bank-item.is-active {
    background: #0f2040;
}

.research-bank-item.is-active::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--color-neutral);
}

.research-terminal-card {
    display: flex !important;
    height: auto !important;
    min-height: 210px;
    flex: 0 0 auto;
    flex-direction: column;
    overflow: visible;
}

.has-black-global-sidebar .research-terminal-card {
    padding: 16px 18px;
    border-radius: 6px;
    background: #0a0a0a;
}

.research-terminal-card__top {
    margin-bottom: 12px;
}

.research-bank-badge {
    background: #0f2040;
    color: var(--color-neutral);
}

.research-terminal-card h2 {
    max-width: 980px;
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 750;
    line-height: 1.25;
}

.research-terminal-card p {
    max-width: 1180px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.research-terminal-tags span {
    border-color: #1d3a6e;
    background: #050505;
    color: var(--text-primary);
}

.research-terminal-card__footer {
    margin-top: auto;
}

.research-terminal-card__footer button,
.research-terminal-card__footer a,
.research-workbench__top-actions a,
.research-workbench__top-actions button {
    border-radius: 5px;
}

.research-bookmark[aria-pressed="true"] {
    border-color: #0f3d1a;
    background: #0a2a14;
    color: var(--color-positive);
}

.black-sidebar a,
.black-sidebar--global a {
    text-decoration: none;
}

/* High contrast pass for the black dashboard theme. */
body,
.black-terminal-shell,
body.has-black-global-sidebar {
    --bg-app: #000000;
    --bg-sidebar: #070707;
    --bg-card: #0d0d0f;
    --bg-card-hover: #1b1b20;
    --text-primary: #ffffff;
    --text-secondary: #b8c0cc;
    --text-muted: #7f8897;
    --border-subtle: #2b2f38;
    --border-focus: #4b5565;
    --color-positive: #00e08a;
    --color-positive-bg: rgba(0, 224, 138, 0.16);
    --color-negative: #ff4d63;
    --color-negative-bg: rgba(255, 77, 99, 0.16);
    --color-warning: #ffad33;
    --color-neutral: #58a6ff;
}

.black-panel,
.black-kpi-card,
.black-country-card,
.black-chart-grid > div,
.black-ccy-card,
.black-rate-cell,
.research-terminal-filters,
.research-terminal-card,
.research-bank-item,
.country-kpi-grid article,
.country-terminal-card,
.rates-card,
.rates-research__hero,
.rates-research__maturities,
.rates-research__stats article,
.countries-directory__hero,
.countries-directory__stats article,
.countries-directory__panel,
.countries-directory__card {
    border-color: var(--border-subtle);
}

.black-panel__head,
.black-fx-table th,
.research-terminal-filters__head,
.research-terminal-search,
.research-filter-block,
.research-terminal-card__footer,
.country-terminal-card header,
.rates-card header {
    border-color: var(--border-focus);
}

.research-terminal-card p,
.research-terminal-card__footer > span,
.black-kpi-card small,
.black-surprise small,
.black-calendar-item span,
.black-calendar-item em,
.countries-directory__hero p,
.rates-research__hero p {
    color: var(--text-secondary);
}

.research-terminal-tags span,
.research-terminal-card__footer button,
.research-terminal-card__footer a,
.research-chip-row button,
.research-terminal-search input,
.research-filter-block select,
.rates-research__hero select,
.has-black-global-sidebar input,
.has-black-global-sidebar select,
.has-black-global-sidebar textarea {
    border-color: var(--border-focus);
    background: #030303;
    color: #ffffff;
}

.research-outlook--bullish,
.has-black-global-sidebar .research-outlook--bullish,
.bull,
.ok {
    border-color: rgba(0, 224, 138, 0.5);
    background: rgba(0, 224, 138, 0.16);
    color: var(--color-positive);
}

.research-outlook--bearish,
.has-black-global-sidebar .research-outlook--bearish,
.bear,
.err {
    border-color: rgba(255, 77, 99, 0.55);
    background: rgba(255, 77, 99, 0.16);
    color: var(--color-negative);
}

.research-outlook--mixed,
.research-outlook--watch,
.has-black-global-sidebar .research-outlook--mixed,
.has-black-global-sidebar .research-outlook--watch,
.warn {
    border-color: rgba(255, 173, 51, 0.55);
    background: rgba(255, 173, 51, 0.16);
    color: var(--color-warning);
}

.research-chip-row button.is-active,
.research-bank-item.is-active,
.rates-research__maturities button.is-active {
    border-color: rgba(88, 166, 255, 0.65);
    background: rgba(88, 166, 255, 0.18);
    color: var(--color-neutral);
}

.is-positive {
    color: var(--color-positive);
}

.is-negative {
    color: var(--color-negative);
}

.is-neutral {
    color: var(--text-secondary);
}

.black-panel--full {
    grid-column: 1 / -1;
}

.black-panel--news-feed {
    overflow: hidden;
}

.news-feed-layout {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.news-feed-column {
    flex: 1.4 1 0;
    min-width: 0;
    border-right: 1px solid var(--border-subtle);
}

.sentiment-panel {
    flex: 0 0 380px;
    min-width: 0;
}

.news-filter {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.news-filter button,
.sentiment-retry {
    min-height: 28px;
    border: 1px solid var(--border-focus);
    border-radius: 5px;
    background: #030303;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.news-filter button {
    padding: 0 10px;
    white-space: nowrap;
}

.news-filter button.is-active,
.news-filter button:hover,
.sentiment-retry:hover {
    border-color: rgba(88, 166, 255, 0.65);
    background: rgba(88, 166, 255, 0.18);
    color: var(--color-neutral);
}

.news-list-scroll {
    max-height: 520px;
    overflow-y: auto;
}

.news-item {
    display: grid;
    width: 100%;
    gap: 6px;
    padding: 12px 16px 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    border-left: 2px solid transparent;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.news-item:hover,
.news-item.is-selected {
    background: #0f2040;
}

.news-item.is-selected {
    border-left-color: var(--color-neutral);
}

.news-item__meta {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.news-item__meta em,
.news-item small,
.sentiment-selected span,
.asset-impact-list > span,
.theme-pills > span {
    color: var(--text-muted);
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.news-item strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.news-pill,
.theme-pills i,
.sentiment-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 5px;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.news-pill {
    padding: 3px 7px;
}

.news-pill--macro {
    background: rgba(139, 92, 246, 0.16);
    color: #8b5cf6;
}

.news-pill--fx {
    background: rgba(20, 184, 166, 0.16);
    color: #14b8a6;
}

.news-pill--equities {
    background: rgba(245, 158, 11, 0.16);
    color: var(--color-warning);
}

.news-pill--central-banks {
    background: rgba(255, 77, 99, 0.16);
    color: var(--color-negative);
}

.news-pill--geopolitical {
    background: #0c447c;
    color: #b5d4f4;
}

.sentiment-panel__body {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.sentiment-selected {
    display: grid;
    gap: 6px;
}

.sentiment-selected strong {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.sentiment-header {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.sentiment-badge {
    padding: 5px 8px;
}

.sentiment-header strong {
    color: var(--text-secondary);
    font-size: 12px;
}

.sentiment-bars {
    display: grid;
    gap: 9px;
}

.sentiment-bars div,
.asset-impact {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
}

.sentiment-bars span,
.sentiment-bars em,
.asset-impact em {
    color: var(--text-secondary);
    font-size: 11px;
    font-style: normal;
}

.sentiment-bars b,
.asset-impact b {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 5px;
    background: #030303;
}

.sentiment-bars i,
.asset-impact i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.sentiment-bars i.is-negative,
.asset-impact i.is-negative {
    background: var(--color-negative);
}

.sentiment-bars i.is-neutral,
.asset-impact i.is-warning {
    background: var(--color-warning);
}

.sentiment-bars i.is-positive,
.asset-impact i.is-positive {
    background: var(--color-positive);
}

.ai-summary,
.sentiment-error {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    background: #030303;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.sentiment-error {
    color: var(--color-negative);
}

.asset-impact-list,
.theme-pills {
    display: grid;
    gap: 10px;
}

.asset-impact {
    grid-template-columns: 76px minmax(0, 1fr) 80px;
}

.asset-impact strong {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-pills div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.theme-pills i {
    padding: 4px 7px;
    background: #030303;
    color: var(--text-secondary);
}

.sentiment-skeleton {
    display: grid;
    gap: 10px;
}

.sentiment-skeleton i {
    display: block;
    height: 34px;
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    background: #030303;
}

.is-warning {
    color: var(--color-warning);
}

.black-panel--cot {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.cot-pair-selector {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.cot-pair-selector button,
.cot-error button {
    min-height: 28px;
    border: 1px solid var(--border-focus);
    border-radius: 5px;
    background: #030303;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.cot-pair-selector button {
    padding: 0 10px;
}

.cot-pair-selector button.is-active,
.cot-pair-selector button:hover,
.cot-error button:hover {
    border-color: rgba(88, 166, 255, 0.65);
    background: rgba(88, 166, 255, 0.18);
    color: var(--color-neutral);
}

.cot-error {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--color-negative);
    font-size: 12px;
}

.cot-error[hidden] {
    display: none;
}

.cot-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.cot-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.cot-card {
    min-width: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    background: #0a0a0a;
    overflow: hidden;
}

.cot-card header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-focus);
}

.cot-card header span {
    font-size: 13px;
    font-weight: 760;
}

.cot-card header em,
.cot-legend em {
    color: var(--text-muted);
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.cot-legend {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cot-legend i,
.cot-legend b {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.cot-legend b {
    height: 2px;
    border-radius: 0;
    background: #7F77DD;
}

.cot-legend-long {
    background: rgba(0, 224, 138, 0.7);
}

.cot-legend-short {
    background: rgba(255, 77, 99, 0.7);
}

.cot-legend-current {
    background: #7F77DD;
}

.cot-legend-prior {
    background: #AFA9EC;
}

.cot-chart-wrap {
    height: 330px;
    padding: 12px;
}

.cot-chart-wrap--breakdown {
    height: 300px;
}

.cot-card--breakdown {
    margin: 0 10px 10px;
}

.cot-gauge-wrap {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 14px 14px 8px;
}

.cot-gauge-wrap strong {
    font-size: 26px;
    line-height: 1;
}

.cot-gauge-wrap span {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}

.cot-gauge-wrap small {
    color: var(--text-secondary);
    font-size: 12px;
}

.cot-bias-strip {
    display: grid;
    gap: 8px;
    padding: 12px 14px 14px;
}

.cot-bias-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 64px;
    gap: 8px;
    align-items: center;
}

.cot-bias-row strong,
.cot-bias-row em {
    font-size: 11px;
}

.cot-bias-row em {
    justify-self: end;
    padding: 3px 6px;
    border: 1px solid currentColor;
    border-radius: 5px;
    font-style: normal;
    font-weight: 800;
}

.cot-bias-row span {
    display: flex;
    height: 8px;
    overflow: hidden;
    border-radius: 5px;
    background: #030303;
}

.cot-bias-row i,
.cot-bias-row b {
    display: block;
    height: 100%;
}

.cot-bias-row i {
    background: var(--color-positive);
}

.cot-bias-row b {
    background: var(--color-negative);
}

.cot-skeleton-card strong {
    color: var(--text-secondary);
}

.terminal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--bt-border);
}

.terminal-tabs button {
    padding: 7px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--bt-muted);
    cursor: pointer;
    font-family: var(--bt-mono);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.terminal-tabs button:hover,
.terminal-tabs button.is-active {
    color: var(--bt-text);
    border-bottom-color: var(--bt-blue);
}

.terminal-tabs button.hawk { color: var(--bt-amber); }
.terminal-tabs button.dove { color: var(--bt-green); }

.cot-tab-panel,
.planner-panel { display: none; }

.cot-tab-panel.is-active,
.planner-panel.is-active { display: block; }

.cot-tab-panel[data-cot-panel="overview"] {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.cot-tab-panel[data-cot-panel="overview"].is-active { display: grid; }
.cot-chart-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cot-signal-table td small { display: block; margin-top: 2px; color: var(--bt-dim); font-size: 10px; }
.black-panel--cb-terminal,
.black-panel--trade-planner { margin-bottom: 18px; }

.cb-spectrum {
    display: grid;
    grid-template-columns: auto minmax(160px, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 2px 0 14px;
    color: var(--bt-muted);
    font-family: var(--bt-mono);
    font-size: 10px;
    text-transform: uppercase;
}

.cb-spectrum b,
.cb-row b,
.planner-scorebar b {
    overflow: hidden;
    border-radius: 999px;
    background: var(--bt-bg3);
}

.cb-spectrum b { height: 6px; }
.cb-spectrum i { display: block; width: 50%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--bt-green), var(--bt-amber)); }

.cb-terminal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 14px;
    background: var(--bt-border);
    border: 1px solid var(--bt-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cb-terminal-grid .cot-card { border: 0; border-radius: 0; }
.cb-row,
.cb-line,
.cb-news-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--bt-border); color: var(--bt-muted); font-size: 11px; }
.cb-row:last-child,
.cb-line:last-child,
.cb-news-item:last-child { border-bottom: 0; }
.cb-row strong,
.cb-line strong { flex: 0 0 42px; color: var(--bt-text); font-family: var(--bt-mono); font-size: 11px; }
.cb-row b { flex: 1; height: 4px; }
.cb-row b i { display: block; height: 100%; background: var(--bt-blue); }
.cb-row em { flex: 0 0 28px; color: var(--bt-dim); font-style: normal; text-align: right; }
.cb-row small,
.cb-line small,
.cb-news-item small { min-width: 0; overflow: hidden; color: var(--bt-dim); text-overflow: ellipsis; white-space: nowrap; }
.cb-row small { flex: 2; }
.cb-badge,
.cb-line span { padding: 2px 7px; border-radius: 3px; background: var(--bt-bg3); color: var(--bt-muted); font-family: var(--bt-mono); font-size: 9px; font-style: normal; text-transform: uppercase; }
.cb-badge.hawk { background: var(--bt-amber-dim); color: var(--bt-amber); }
.cb-badge.dove { background: var(--bt-green-dim); color: var(--bt-green); }
.cb-news-item { display: block; }
.cb-news-item span,
.cb-news-item strong,
.cb-news-item small { display: block; margin-bottom: 3px; }
.cb-news-item strong { color: var(--bt-text); font-size: 11px; line-height: 1.4; }
.cb-line em { flex: 0 0 76px; color: var(--bt-muted); font-style: normal; }

/* CB live feeds */
.cb-feed-item { display: block; padding: 7px 0; border-bottom: 1px solid var(--bt-border); }
.cb-feed-item:last-child { border-bottom: 0; }
.cb-feed-item a { display: block; color: var(--bt-text); font-size: 11px; line-height: 1.4; margin-bottom: 3px; text-decoration: none; }
.cb-feed-item a:hover { color: var(--bt-blue); }
.cb-feed-item__meta { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--bt-dim); overflow: hidden; }
.cb-feed-item__tag { flex-shrink: 0; padding: 1px 5px; border-radius: 3px; background: var(--bt-bg3); font-family: var(--bt-mono); font-size: 9px; text-transform: uppercase; color: var(--bt-muted); }
.cb-feed-item__desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

/* CB analyze button */
.cb-analyze-btn { display: block; width: 100%; margin: 8px 0 4px; padding: 6px 10px; background: rgba(74,159,224,.06); border: 1px solid rgba(74,159,224,.2); color: var(--bt-blue); border-radius: var(--radius-sm); cursor: pointer; font-size: 11px; text-align: center; }
.cb-analyze-btn:hover:not(:disabled) { background: rgba(74,159,224,.14); border-color: rgba(74,159,224,.4); }
.cb-analyze-btn:disabled { opacity: .4; cursor: not-allowed; }

/* CB AI analysis panel */
.cb-ai-box { padding: 2px 0; }
.cb-ai-stance { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 3px; font-family: var(--bt-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.cb-ai-stance.hawkish { background: var(--bt-amber-dim); color: var(--bt-amber); }
.cb-ai-stance.dovish { background: var(--bt-green-dim); color: var(--bt-green); }
.cb-ai-stance.neutral { background: var(--bt-bg3); color: var(--bt-muted); }
.cb-ai-summary { font-size: 11px; line-height: 1.55; color: var(--bt-text); margin-bottom: 8px; }
.cb-ai-fx { font-size: 10px; color: var(--bt-blue); padding: 4px 8px; background: rgba(74,159,224,.06); border-left: 2px solid var(--bt-blue); margin-bottom: 8px; }
.cb-ai-themes { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.cb-ai-theme { font-size: 9px; padding: 2px 6px; background: var(--bt-bg3); border: 1px solid var(--bt-border); border-radius: 3px; color: var(--bt-muted); font-family: var(--bt-mono); }
.cb-ai-risks { font-size: 10px; color: #e84040; margin-bottom: 4px; }
.cb-ai-ts { font-size: 9px; color: var(--bt-dim); font-family: var(--bt-mono); }
.cb-ai-loading { display: flex; align-items: center; gap: 8px; color: var(--bt-muted); font-size: 11px; padding: 10px 0; }
.cb-ai-loading::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bt-blue); animation: cb-ai-pulse 1.2s ease-in-out infinite; }
@keyframes cb-ai-pulse { 0%,100% { opacity:.25; transform:scale(.75); } 50% { opacity:1; transform:scale(1.25); } }

/* â”€â”€ CB News Terminal (cbn-*) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.cbn-terminal {
    background: #0a0b0c;
    border: 1px solid #2a2c2f;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: #E8E9EA;
    margin-bottom: 18px;
}

/* topbar */
.cbn-topbar {
    background: #111213;
    border-bottom: 1px solid #2a2c2f;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cbn-topbar-title { font-size: 11px; font-weight: 500; color: #9EA3A8; letter-spacing: .1em; text-transform: uppercase; }
.cbn-tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.cbn-tab {
    padding: 4px 9px; border-radius: 4px; border: 1px solid #2a2c2f;
    background: transparent; color: #9EA3A8; cursor: pointer;
    font-size: 11px; font-family: inherit; transition: all .15s;
}
.cbn-tab:hover { border-color: #353739; color: #E8E9EA; }
.cbn-tab.is-active { background: #212326; border-color: #353739; color: #E8E9EA; }
.cbn-tab--hawk { border-color: #7A4E08 !important; color: #E8A020 !important; }
.cbn-tab--dove { border-color: #0A5C42 !important; color: #1DB88A !important; }
.cbn-refresh-btn {
    padding: 4px 10px; border-radius: 4px; border: 1px solid #353739;
    background: transparent; color: #9EA3A8; cursor: pointer; font-family: inherit; font-size: 10px;
}
.cbn-refresh-btn:hover { background: #212326; color: #E8E9EA; }
.cbn-ts { font-size: 10px; color: #5C6168; margin-left: auto; white-space: nowrap; }

/* spectrum */
.cbn-spectrum-bar { background: #111213; border-bottom: 1px solid #2a2c2f; padding: 10px 14px; }
.cbn-spec-labels { font-size: 10px; color: #5C6168; margin-bottom: 6px; display: flex; justify-content: space-between; }
.cbn-spec-track {
    height: 6px; background: #212326; border-radius: 3px;
    position: relative; display: flex; align-items: center;
}
.cbn-spec-mid { position: absolute; left: 50%; width: 1px; height: 10px; background: #353739; transform: translateX(-50%); }
.cbn-spec-dots { position: absolute; width: 100%; height: 100%; }
.cbn-dot {
    position: absolute; width: 9px; height: 9px; border-radius: 50%;
    transform: translateX(-50%); top: -2px; cursor: pointer; transition: transform .15s;
    border: 1px solid rgba(0,0,0,.4);
}
.cbn-dot:hover { transform: translateX(-50%) scale(1.6); }
.cbn-dot-label {
    position: absolute; top: 12px; font-size: 9px;
    white-space: nowrap; transform: translateX(-50%); left: 50%;
    pointer-events: none;
}

/* 2Ã—2 grid */
.cbn-main-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #2a2c2f;
}
.cbn-panel { background: #111213; padding: 12px 14px; }
.cbn-panel--wide { background: #111213; padding: 12px 14px; border-top: 1px solid #2a2c2f; }
.cbn-panel-hdr {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #2a2c2f;
}
.cbn-panel-hdr > span { font-size: 10px; color: #5C6168; letter-spacing: .08em; text-transform: uppercase; }
.cbn-panel-hdr > em { font-size: 10px; color: #9EA3A8; font-style: normal; }
.cbn-empty { padding: 10px 0; font-size: 11px; color: #5C6168; }

/* sentiment rows */
.cbn-sent-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #2a2c2f; }
.cbn-sent-row:last-child { border-bottom: none; }
.cbn-sent-flag { font-size: 14px; width: 20px; text-align: center; }
.cbn-sent-name { width: 36px; color: #9EA3A8; font-size: 11px; }
.cbn-sent-badge { padding: 2px 7px; border-radius: 3px; font-size: 10px; font-weight: 500; min-width: 56px; text-align: center; }
.cbn-badge--hawk { background: #1e1508; color: #E8A020; }
.cbn-badge--dove { background: #071a13; color: #1DB88A; }
.cbn-badge--neutral { background: #1a1b1d; color: #6B7280; }
.cbn-sent-meter { flex: 1; height: 3px; background: #212326; border-radius: 2px; overflow: hidden; }
.cbn-sent-fill { height: 100%; border-radius: 2px; transition: width .5s ease; }
.cbn-sent-score { width: 28px; text-align: right; font-size: 10px; }
.cbn-sent-sub { flex: 2; font-size: 9px; color: #5C6168; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* news items */
.cbn-search {
    width: 100%; margin-bottom: 8px; padding: 5px 8px;
    background: #191b1d; border: 1px solid #2a2c2f; border-radius: 4px;
    color: #E8E9EA; font-family: inherit; font-size: 11px;
}
.cbn-search::placeholder { color: #5C6168; }
.cbn-search:focus { outline: none; border-color: #378ADD; }
.cbn-news-scroll { max-height: 300px; overflow-y: auto; }
.cbn-news-item {
    display: block; width: 100%; text-align: left; padding: 7px 0;
    border: 0; border-bottom: 1px solid #2a2c2f; background: transparent; cursor: pointer;
}
.cbn-news-item:last-child { border-bottom: none; }
.cbn-news-item:hover { background: rgba(255,255,255,.02); }
.cbn-news-item.is-selected { background: #0e1e35; border-left: 2px solid #378ADD; padding-left: 6px; }
.cbn-news-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.cbn-news-bank {
    padding: 1px 5px; border-radius: 2px; font-size: 9px; text-transform: uppercase;
    background: #212326; color: #9EA3A8; letter-spacing: .3px;
}
.cbn-news-meta em { font-size: 10px; color: #5C6168; font-style: normal; }
.cbn-news-item strong { display: block; color: #E8E9EA; font-size: 11px; line-height: 1.4; margin-bottom: 2px; }
.cbn-news-item small { display: block; font-size: 10px; color: #9EA3A8; line-height: 1.3; margin-bottom: 3px; }
.cbn-link { font-size: 10px; color: #378ADD; text-decoration: none; }
.cbn-link:hover { text-decoration: underline; }

/* policy signals (timeline) */
.cbn-tl-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #2a2c2f; font-size: 10px; }
.cbn-tl-row:last-child { border-bottom: none; }
.cbn-tl-date { width: 54px; color: #5C6168; flex-shrink: 0; }
.cbn-tl-bank { width: 32px; color: #9EA3A8; flex-shrink: 0; }
.cbn-tl-dec { padding: 2px 6px; border-radius: 3px; font-weight: 500; flex-shrink: 0; min-width: 40px; text-align: center; font-size: 10px; }
.cbn-dec--hawk { background: #1e1508; color: #E8A020; }
.cbn-dec--dove { background: #071a13; color: #1DB88A; }
.cbn-dec--neutral { background: #1a1b1d; color: #6B7280; }
.cbn-tl-name { color: #E8E9EA; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbn-tl-note { color: #5C6168; flex: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* FX pairs */
.cbn-fx-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #2a2c2f; }
.cbn-fx-row:last-child { border-bottom: none; }
.cbn-fx-pair { width: 76px; font-size: 11px; color: #E8E9EA; font-weight: 500; flex-shrink: 0; }
.cbn-fx-arr { font-size: 14px; width: 16px; flex-shrink: 0; }
.cbn-fx-spread { width: 60px; font-size: 10px; flex-shrink: 0; }
.cbn-fx-note { flex: 1; font-size: 10px; color: #9EA3A8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbn-up { color: #1DB88A; }
.cbn-dn { color: #E24B4A; }

/* trend chart */
.cbn-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.cbn-legend-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #9EA3A8; }
.cbn-legend-item i { display: inline-block; width: 8px; height: 8px; border-radius: 1px; }
.cbn-chart-wrap { position: relative; height: 160px; margin: 8px 0; }

/* AI section */
.cbn-ai-row { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cbn-ai-btn {
    align-self: flex-start; padding: 6px 14px; border-radius: 4px;
    border: 1px solid #353739; background: transparent; color: #9EA3A8;
    cursor: pointer; font-family: inherit; font-size: 11px; transition: all .15s;
}
.cbn-ai-btn:hover:not(:disabled) { background: #212326; color: #E8E9EA; }
.cbn-ai-btn:disabled { opacity: .4; cursor: not-allowed; }
.cbn-ai-out { }
.cbn-ai-box { padding: 2px 0; }
.cbn-ai-source { font-size: 9px; color: #5C6168; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.cbn-ai-stance { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 500; margin-bottom: 8px; }
.cbn-ai-summary { font-size: 11px; line-height: 1.55; color: #E8E9EA; margin-bottom: 8px; }
.cbn-ai-fx { font-size: 10px; color: #378ADD; padding: 4px 8px; background: rgba(55,138,221,.07); border-left: 2px solid #378ADD; margin-bottom: 8px; }
.cbn-ai-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.cbn-ai-tag { font-size: 9px; padding: 2px 6px; background: #212326; border: 1px solid #2a2c2f; border-radius: 3px; color: #9EA3A8; }
.cbn-ai-risks { font-size: 10px; color: #E24B4A; margin-bottom: 4px; }
.cbn-ai-ts { font-size: 9px; color: #5C6168; }
.cbn-ai-assets { display: grid; gap: 3px; margin-top: 6px; }
.cbn-asset { display: flex; justify-content: space-between; align-items: center; padding: 3px 7px; background: #191b1d; border-radius: 3px; font-size: 10px; }
.cbn-asset strong { color: #E8E9EA; }
.cbn-ai-load { display: flex; align-items: center; gap: 8px; color: #9EA3A8; font-size: 11px; padding: 8px 0; }
.cbn-ai-load::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #378ADD; animation: cbn-pulse 1.2s ease-in-out infinite; }
@keyframes cbn-pulse { 0%,100% { opacity:.2; transform:scale(.7); } 50% { opacity:1; transform:scale(1.3); } }

@media (max-width: 900px) {
    .cbn-main-grid { grid-template-columns: 1fr; }
}

/* CB news page (old classes â€” kept for compatibility) */
.black-panel--cb-news { overflow: hidden; }

.cb-news-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.cb-news-filter button {
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    font-family: var(--font-mono, monospace);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.cb-news-filter button:hover { border-color: var(--color-neutral); color: var(--text-primary); }
.cb-news-filter button.is-active { background: var(--color-neutral); border-color: var(--color-neutral); color: #000; }

.cb-news-search-wrap { padding: 8px 14px; border-bottom: 1px solid var(--border-subtle); }
.cb-news-search {
    width: 100%;
    padding: 6px 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
}
.cb-news-search::placeholder { color: var(--text-tertiary); }
.cb-news-search:focus { outline: none; border-color: var(--color-neutral); }

.cb-news-article {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    cursor: pointer;
}
.cb-news-article:hover { background: rgba(255,255,255,.03); }
.cb-news-article.is-selected { background: #0e1e35; border-left: 2px solid var(--color-neutral); padding-left: 12px; }
.cb-news-article__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.cb-news-article__bank {
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: 9px;
    font-family: var(--font-mono, monospace);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.cb-news-article__meta em { font-size: 10px; color: var(--text-tertiary); font-style: normal; }
.cb-news-article strong { display: block; color: var(--text-primary); font-size: 13px; line-height: 1.4; margin-bottom: 3px; }
.cb-news-article small { display: block; color: var(--text-secondary); font-size: 11px; line-height: 1.4; margin-bottom: 4px; }
.cb-news-article__link { font-size: 10px; color: var(--color-neutral); text-decoration: none; }
.cb-news-article__link:hover { text-decoration: underline; }

.cb-ai-source-title { font-size: 10px; color: var(--text-tertiary); margin-bottom: 6px; font-family: var(--font-mono, monospace); text-transform: uppercase; letter-spacing: .3px; }
.cb-ai-assets { display: grid; gap: 4px; margin-top: 8px; }
.cb-ai-asset { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; background: var(--surface-2); border-radius: 3px; font-size: 11px; }
.cb-ai-asset strong { color: var(--text-primary); font-family: var(--font-mono, monospace); }
.cb-ai-asset .is-pos { color: var(--positive); }
.cb-ai-asset .is-neg { color: var(--negative); }

.planner-scorebar {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 120px;
    gap: 10px;
    margin-bottom: 14px;
}

.planner-scorebar > div {
    padding: 10px 12px;
    border: 1px solid var(--bt-border);
    border-radius: var(--radius-md);
    background: var(--bt-bg2);
}

.planner-scorebar span,
.planner-setup-grid label { display: block; margin-bottom: 5px; color: var(--bt-dim); font-family: var(--bt-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.planner-scorebar strong { display: block; color: var(--bt-amber); font-size: 22px; font-weight: 700; }
.planner-scorebar strong.go,
.planner-scorebar i.go,
.planner-rr.good { color: var(--bt-green); }
.planner-scorebar strong.caution,
.planner-scorebar i.caution,
.planner-rr.ok { color: var(--bt-amber); }
.planner-scorebar strong.no,
.planner-scorebar i.no,
.planner-rr.bad { color: var(--bt-red); }
.planner-scorebar b { display: block; height: 4px; margin-top: 6px; background: var(--bt-border); }
.planner-scorebar b i { display: block; height: 100%; background: currentColor; }

.planner-row,
.planner-diff-list div { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; margin-bottom: 3px; border: 1px solid var(--bt-border); border-radius: 3px; background: var(--bt-bg2); }
.planner-row > span { flex: 0 0 18px; color: var(--bt-amber); font-family: var(--bt-mono); font-size: 11px; }
.planner-row strong { flex: 1; color: var(--bt-text); font-size: 12px; font-weight: 500; }
.planner-row small { display: block; margin-top: 2px; color: var(--bt-muted); font-size: 11px; font-weight: 400; }
.planner-row em { color: var(--bt-muted); font-style: normal; font-size: 11px; }
.planner-row button,
.planner-diff-list button,
.terminal-action { padding: 4px 9px; border: 1px solid var(--bt-border2); border-radius: 3px; background: transparent; color: var(--bt-muted); cursor: pointer; font-family: var(--bt-mono); font-size: 10px; }
.planner-row button.is-yes,
.planner-diff-list button.is-yes { border-color: #14532d; background: var(--bt-green-dim); color: var(--bt-green); }
.planner-row button.is-no,
.planner-diff-list button.is-no { border-color: #5a1a1a; background: var(--bt-red-dim); color: var(--bt-red); }
.planner-diff-list { margin: 3px 0 8px 28px; }
.planner-diff-list div { align-items: center; background: var(--bt-bg1); }
.planner-diff-list span { flex: 1; color: var(--bt-muted); font-size: 11px; }
.planner-notes { width: 100%; min-height: 70px; margin-top: 10px; padding: 9px 10px; border: 1px solid var(--bt-border); border-radius: var(--radius-md); background: var(--bt-bg2); color: var(--bt-text); font-family: var(--bt-mono); font-size: 12px; resize: vertical; }
.planner-setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.planner-setup-grid input,
.planner-setup-grid select { width: 100%; padding: 7px 9px; border: 1px solid var(--bt-border); border-radius: 3px; background: var(--bt-bg2); color: var(--bt-text); }
.planner-rr { margin: 12px 0; color: var(--bt-amber); font-family: var(--bt-mono); font-size: 18px; font-weight: 700; }
.terminal-action { background: var(--bt-amber-dim); color: var(--bt-amber); }

.dashboard-tool-shell {
    --bt-bg0: #000000;
    --bt-bg1: #0a0a0a;
    --bt-bg2: #111111;
    --bt-bg3: #191919;
    --bt-border: #1f1f1f;
    --bt-border2: #2a2a2a;
    --bt-text: #e8e8e8;
    --bt-muted: #888888;
    --bt-dim: #444444;
    --bt-blue: #3b82f6;
    --bt-blue-dim: #0f2040;
    --bt-green: #22c55e;
    --bt-green-dim: #0a2a14;
    --bt-red: #ef4444;
    --bt-red-dim: #2a0a0a;
    --bt-amber: #f59e0b;
    --bt-amber-dim: #2a1a00;
    --bt-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    display: grid;
    gap: 18px;
    color: var(--bt-text);
}

.tool-hero {
    border: 1px solid var(--bt-border2);
    border-radius: var(--radius-lg);
    background: var(--bt-bg1);
}

.tool-hero > div {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bt-border);
    color: var(--bt-muted);
    font-size: 12px;
}

.tool-hero a {
    color: var(--bt-blue);
    text-decoration: none;
}

.tool-hero section {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
}

.tool-hero h1 {
    margin: 0 0 6px;
    color: var(--bt-text);
    font-size: 30px;
    line-height: 1.05;
}

.tool-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--bt-muted);
    font-size: 14px;
    line-height: 1.5;
}

.tool-hero section > a {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--bt-border2);
    border-radius: 4px;
    background: var(--bt-bg2);
    font-family: var(--bt-mono);
    font-size: 11px;
    text-transform: uppercase;
}

.dashboard-tool-shell .black-panel {
    border: 1px solid var(--bt-border2);
    background: var(--bt-bg1);
}

@media (max-width: 1120px) {
    .cot-tab-panel[data-cot-panel="overview"].is-active,
    .cot-chart-grid--three,
    .cb-terminal-grid,
    .planner-scorebar,
    .planner-setup-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1120px) {
    .news-feed-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .news-feed-column {
        border-right: 0;
        border-bottom: 1px solid var(--border-subtle);
    }

    .sentiment-panel {
        flex-basis: auto;
    }

    .cot-chart-grid,
    .cot-metric-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   DESIGN SYSTEM — Claude Design handoff (macro-dashboard)
   Applied over existing styles — do not remove existing CSS above
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Design system color tokens */
  --ds-bg:          #0a0a0f;
  --ds-panel:       #111118;
  --ds-panel-2:     #15151f;
  --ds-border:      #1e1e2e;
  --ds-border-strong: #2a2a3e;
  --ds-accent:      #3b82f6;
  --ds-accent-dim:  #1e3a8a;
  --ds-bull:        #22c55e;
  --ds-bear:        #ef4444;
  --ds-neutral:     #94a3b8;
  --ds-hawk:        #f97316;
  --ds-dove:        #6366f1;
  --ds-text-muted:  #475569;
  --ds-text-body:   #cbd5e1;
  --ds-text-heading:#f1f5f9;
  --ds-text-faint:  #64748b;
  --ds-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ds-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ds-sidebar-w:           220px;
  --ds-sidebar-w-collapsed: 56px;
  --ds-radius:    8px;
  --ds-radius-sm: 4px;
  --ds-radius-lg: 12px;
}

/* ── App shell grid ─────────────────────────────────────────────── */
.ds-app {
  display: grid;
  grid-template-columns: var(--ds-sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--ds-bg);
}
.ds-app.collapsed {
  grid-template-columns: var(--ds-sidebar-w-collapsed) 1fr;
}

/* When inside new grid, reset old fixed-sidebar margin/width rules */
.ds-app .shell {
  width: 100% !important;
  margin-left: 0 !important;
  max-width: none;
  min-height: 100vh;
  box-sizing: border-box;
}
/* Hide the old fixed global sidebar when new one is in use */
.ds-app ~ .black-sidebar--global,
.ds-app .black-sidebar--global { display: none !important; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.ds-sidebar {
  background: var(--ds-panel);
  border-right: 1px solid var(--ds-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  z-index: 20;
  flex-shrink: 0;
}

.ds-sb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--ds-border);
  height: 56px;
  flex-shrink: 0;
  overflow: hidden;
  text-decoration: none;
}
.ds-sb-logo .ds-mark {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--ds-accent), var(--ds-dove));
  border-radius: 6px;
  flex: none;
  display: grid;
  place-items: center;
  color: white;
  font-family: var(--ds-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0;
}
.ds-sb-logo .ds-name {
  font-family: var(--ds-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 12px;
  color: var(--ds-text-heading);
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.18s;
}
.ds-app.collapsed .ds-sb-logo .ds-name { opacity: 0; pointer-events: none; }
.ds-app.collapsed .ds-sb-group-label { opacity: 0; pointer-events: none; }
.ds-app.collapsed .ds-sb-item .ds-lbl { opacity: 0; pointer-events: none; }

.ds-sb-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ds-border) transparent;
}
.ds-sb-group { margin-bottom: 18px; }
.ds-sb-group-label {
  font-family: var(--ds-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ds-text-muted);
  padding: 4px 16px 6px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.18s;
}
.ds-sb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  color: var(--ds-text-body);
  text-decoration: none;
  font-size: 13px;
  border-left: 2px solid transparent;
  position: relative;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  white-space: nowrap;
  overflow: hidden;
}
.ds-sb-item:hover {
  background: var(--ds-panel-2);
  color: var(--ds-text-heading);
}
.ds-sb-item.ds-active {
  border-left-color: var(--ds-accent);
  background: linear-gradient(90deg, rgba(59,130,246,0.10), transparent);
  color: var(--ds-text-heading);
}
.ds-sb-item.ds-active .ds-icon { color: var(--ds-accent); }
.ds-icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ds-text-muted);
  transition: color 0.1s;
}
.ds-sb-item:hover .ds-icon { color: var(--ds-text-heading); }
.ds-lbl {
  flex: 1;
  font-family: var(--ds-mono);
  font-size: 12px;
  transition: opacity 0.18s;
}
.ds-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-bull);
  box-shadow: 0 0 6px var(--ds-bull);
  flex: none;
}

.ds-sb-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--ds-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ds-sb-ver {
  font-family: var(--ds-mono);
  font-size: 10px;
  color: var(--ds-text-muted);
  white-space: nowrap;
  transition: opacity 0.18s;
}
.ds-app.collapsed .ds-sb-ver { opacity: 0; }
.ds-sb-collapse {
  background: transparent;
  border: 1px solid var(--ds-border);
  color: var(--ds-text-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  padding: 0;
  transition: color 0.1s, border-color 0.1s;
}
.ds-sb-collapse:hover {
  color: var(--ds-text-body);
  border-color: var(--ds-border-strong);
}

/* ── Topbar ──────────────────────────────────────────────────────── */
.ds-topbar {
  height: 56px;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-panel);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.ds-crumbs {
  font-family: var(--ds-mono);
  font-size: 12px;
  color: var(--ds-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ds-crumbs .ds-sep { opacity: 0.5; }
.ds-crumbs .ds-here { color: var(--ds-text-heading); }
.ds-topbar .ds-spacer { flex: 1; }
.ds-clock {
  font-family: var(--ds-mono);
  font-size: 11px;
  color: var(--ds-text-body);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ds-clock .ds-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-bull);
  box-shadow: 0 0 6px var(--ds-bull);
  animation: ds-pulse 2s infinite;
  flex: none;
}
@keyframes ds-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Inner main wrapper ─────────────────────────────────────────── */
.ds-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.ds-main > * { flex-shrink: 0; }

/* ── Sidebar icon SVG helper ─────────────────────────────────────── */
.ds-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ── Landing page grid-context overrides ───────────────────────── */
.ds-app > .black-workspace {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  height: 100vh;
}
/* UTC clock for landing (reuse design topbar clock styling) */
.ds-app .black-topbar .ds-clock {
  font-family: var(--ds-mono);
  font-size: 11px;
  color: var(--ds-text-body);
  display: flex;
  align-items: center;
  gap: 8px;
}
