/*
 * TOE Energy Dashboard — public styles
 * All values use theme CSS variables where possible.
 * Fonts (Manrope, Orbitron) are enqueued by the Spiel theme; do not re-declare.
 *
 * Grid markup uses wp-block-post-template / is-layout-grid / columns-N classes so
 * WordPress's own layout CSS applies. Plugin CSS here is the authoritative fallback
 * and for plugin-specific overrides only.
 */

/* ── Dashboard wrapper ───────────────────────────────────────── */

.toe-energy-dashboard {
    --toe-accent: var(--wp--preset--color--gold, #f0a500);

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    margin-inline: auto;
    padding-inline: var(--wp--preset--spacing--60);
    padding-block: var(--wp--preset--spacing--60);
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: var(--wp--preset--font-size--medium);
    letter-spacing: -0.005em;
    line-height: 1.4;
    color: var(--wp--preset--color--contrast);
}

/* ── Header ─────────────────────────────────────────────────── */

.toe-energy-dashboard__header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
    margin-block-end: var(--wp--preset--spacing--40);
}

.toe-energy-dashboard__greeting {
    font-family: Orbitron, sans-serif;
    font-size: var(--wp--preset--font-size--x-large);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

/* ── Header navigation ────────────────────────────────────── */

.toe-energy-dashboard__nav {
    display: flex;
    gap: var(--wp--preset--spacing--30);
    margin-inline-start: auto;
}

.toe-energy-dashboard__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    color: inherit;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.15s ease;
}

.toe-energy-dashboard__nav-link:hover,
.toe-energy-dashboard__nav-link:focus-visible {
    color: var(--toe-accent);
}

.toe-energy-dashboard__nav-icon {
    display: block;
    flex-shrink: 0;
}

.toe-energy-dashboard__nav-link:hover .toe-energy-dashboard__nav-icon {
    color: var(--toe-accent);
}

/* ── Sticky section tab navigation ─────────────────────────── */

.toe-energy-dashboard__section-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-inline: calc(-1 * var(--wp--preset--spacing--60));
    padding-inline: var(--wp--preset--spacing--60);
}

.toe-energy-dashboard__section-nav-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 2px;
    padding-block: 6px;
}

.toe-energy-dashboard__section-tab {
    padding: 5px 12px;
    font-family: Manrope, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.toe-energy-dashboard__section-tab:hover {
    color: var(--toe-accent);
}

.toe-energy-dashboard__section-tab--active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* ── Light theme overrides for section nav ─────────────────── */

.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__section-nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: #e2e8f0;
}

.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__section-tab {
    color: #64748b;
}

.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__section-tab:hover {
    color: var(--toe-accent);
}

.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__section-tab--active {
    color: #1a1a1a;
    background: #f1f5f9;
}

/* Admin bar offset for sticky nav */

.admin-bar .toe-energy-dashboard__section-nav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .toe-energy-dashboard__section-nav {
        top: 46px;
    }
}

/* ── Mobile: smaller tabs ──────────────────────────────────── */

@media (max-width: 600px) {
    .toe-energy-dashboard__section-tab {
        font-size: 10px;
        padding: 5px 10px;
    }
}

/* ── Gated content placeholder ──────────────────────────────── */

.toe-energy-dashboard__gated {
    position: relative;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 32px 20px;
    margin-bottom: 1rem;
}

.toe-energy-dashboard__gated-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    max-width: 400px;
}

.toe-energy-dashboard__gated-icon {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.2);
}

.toe-energy-dashboard__gated-title {
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.toe-energy-dashboard__gated-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.5;
}

.toe-energy-dashboard__gated-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    font-family: Manrope, sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #ffffff;
    background: var(--toe-accent, #f0a500);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.toe-energy-dashboard__gated-btn:hover {
    opacity: 0.85;
    color: #ffffff;
}

/* Light theme */
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__gated {
    border-color: #e2e8f0;
}

.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__gated-icon {
    color: #cbd5e1;
}

.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__gated-title {
    color: #64748b;
}

.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__gated-text {
    color: #94a3b8;
}

/* ── Sections container ──────────────────────────────────────── */

.toe-energy-dashboard__sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Sections vertical scroller ─────────────────────────────── */

/* Viewport is a plain wrapper — no height/overflow constraints.
   JS auto-scrolls the page to bring sections under the sticky ticker. */

/* ── Section (category group) ────────────────────────────────── */

.toe-energy-dashboard__section {
    display: flex;
    flex-direction: column;
}

.toe-energy-dashboard__section-header {
    border-bottom: 3px solid var(--wp--preset--color--contrast);
    margin-block-end: var(--wp--preset--spacing--30);
    padding-block-end: var(--wp--preset--spacing--20);
}

.toe-energy-dashboard__section-label {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0 !important;
}

/* Override theme heading margins — WP generates high-specificity rules
   from theme.json core/post-content elements.heading */
.toe-energy-dashboard h2,
.toe-energy-dashboard h3,
.toe-energy-dashboard h4,
.toe-energy-dashboard :where(h2),
.toe-energy-dashboard :where(h3),
.toe-energy-dashboard :where(h4),
.entry-content .toe-energy-dashboard h2,
.entry-content .toe-energy-dashboard h3,
.entry-content .toe-energy-dashboard h4,
.wp-block-post-content .toe-energy-dashboard h2,
.wp-block-post-content .toe-energy-dashboard h3,
.wp-block-post-content .toe-energy-dashboard h4 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}

/* ── 4-column post grid ──────────────────────────────────────── */

.toe-energy-dashboard__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    gap: var(--wp--preset--spacing--30);
    align-items: stretch;
}

@media (max-width: 1024px) {
    .toe-energy-dashboard__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .toe-energy-dashboard__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card (list item) ────────────────────────────────────────── */

.toe-energy-dashboard__card {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20);
    border: 1px solid var(--wp--preset--color--secondary);
    padding: 0.4rem 1rem 0.5rem !important;
    word-break: normal;
    overflow-wrap: anywhere;
    height: 100%;
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
}

/* Reset any inherited margins/padding on card children */
.toe-energy-dashboard__card > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-width: 0;
}

.toe-energy-dashboard__card--span-2 {
    grid-column: span 2;
}

.toe-energy-dashboard__card--span-4 {
    grid-column: 1 / -1;
}

.toe-energy-dashboard__card--error {
    border-style: dashed;
}

.toe-energy-dashboard__card--unavailable {
    border-style: dashed;
    opacity: 0.55;
}

.toe-energy-dashboard__card--stale {
    border-style: dashed;
    border-color: #f0a500;
    opacity: 0.8;
}

.toe-energy-dashboard__stale-badge {
    display: inline-block;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    color: #f0a500;
    letter-spacing: 0.02em;
}

.toe-energy-dashboard__unavailable-msg {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--tertiary);
    font-style: italic;
    margin: 0.25rem 0;
}

.toe-energy-dashboard__card-source {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wp--preset--color--primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toe-energy-dashboard__card-title {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 !important;
    flex-grow: 1;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
    max-width: 100%;
}

.toe-energy-dashboard__card-title a {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

.toe-energy-dashboard__card-title a:hover,
.toe-energy-dashboard__card-title a:focus-visible {
    color: var(--wp--preset--color--primary);
}

.toe-energy-dashboard__card-byline {
    font-size: var(--wp--preset--font-size--x-small);
    color: var(--wp--preset--color--tertiary);
    margin: 0;
    margin-block-start: auto;
}

/* ── Meta / muted text ──────────────────────────────────────── */

.toe-energy-dashboard__meta {
    font-size: var(--wp--preset--font-size--x-small);
    color: var(--wp--preset--color--tertiary);
    margin: 0;
}

/* ── Buttons ────────────────────────────────────────────────── */

.toe-energy-dashboard__btn {
    display: inline-block;
    background-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1.0625rem 2.125rem;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s ease;
}

.toe-energy-dashboard__btn:hover,
.toe-energy-dashboard__btn:focus-visible {
    background-color: var(--wp--preset--color--primary);
    outline: 1px dotted var(--wp--preset--color--primary);
    outline-offset: 2px;
}

/* ── Live Ticker ───────────────────────────────────────────── */

.toe-energy-dashboard__ticker-section {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--wp--preset--color--base, #ffffff);
    margin-block-end: 0;
}

.toe-energy-dashboard__ticker-section--top {
    position: relative;
    top: auto;
    z-index: 1;
    padding-block-end: 0.5rem;
}

.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__ticker-section {
    background: #111318;
}

@media (prefers-color-scheme: dark) {
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__ticker-section {
        background: #111318;
    }
}

.toe-energy-dashboard__ticker {
    background: #0a0e17;
    border: 1px solid #1e2330;
    border-radius: 2px;
    margin-block-start: var(--wp--preset--spacing--30);
    font-family: Manrope, sans-serif;
    max-width: 100%;
}

.toe-energy-dashboard__ticker--error {
    padding: 0.625rem 1rem;
}

/* Each layer is a horizontal row: pinned label + scrolling track */
.toe-energy-dashboard__ticker-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1e2330;
}

.toe-energy-dashboard__ticker-row:last-child {
    border-bottom: none;
}

/* Pinned category label on the left */
.toe-energy-dashboard__ticker-label {
    flex-shrink: 0;
    width: 9rem;
    padding: 0.15rem 0.5rem;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    background: #0d1119;
    border-right: 1px solid #1e2330;
    text-align: center;
    line-height: 1.3;
}

.toe-energy-dashboard__ticker-header {
    display: flex;
    align-items: baseline;
    gap: var(--wp--preset--spacing--40);
}

.toe-energy-dashboard__ticker-attr {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--wp--preset--color--tertiary, #757575);
    margin-left: auto;
}

/* Scrolling area — overflow hidden with fade edges */
.toe-energy-dashboard__ticker-scroll {
    flex: 1;
    overflow: hidden !important;
    position: relative;
    padding-block: 0.15rem;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.toe-energy-dashboard__ticker-scroll::before,
.toe-energy-dashboard__ticker-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3rem;
    z-index: 2;
    pointer-events: none;
}
.toe-energy-dashboard__ticker-scroll::before {
    left: 0;
    background: linear-gradient(to right, #0a0e17, transparent);
}
.toe-energy-dashboard__ticker-scroll::after {
    right: 0;
    background: linear-gradient(to left, #0a0e17, transparent);
}

.toe-energy-dashboard__ticker-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 2.5rem;
    white-space: nowrap;
    -webkit-animation: toe-ticker-scroll 60s linear infinite;
    animation: toe-ticker-scroll 60s linear infinite;
    width: max-content;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.toe-energy-dashboard__ticker:hover .toe-energy-dashboard__ticker-track {
    -webkit-animation-play-state: paused;
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .toe-energy-dashboard__ticker-track {
        animation: none;
        overflow-x: auto;
    }
}

@-webkit-keyframes toe-ticker-scroll {
    0%   { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}
@keyframes toe-ticker-scroll {
    0%   { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}

.toe-energy-dashboard__ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-size: var(--wp--preset--font-size--medium);
    line-height: 1;
}

.toe-energy-dashboard__ticker-name {
    color: #f0a500;
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--wp--preset--font-size--small);
    letter-spacing: 0.04em;
}

.toe-energy-dashboard__ticker-price {
    color: #e2e8f0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.toe-energy-dashboard__ticker-change {
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.toe-energy-dashboard__ticker-change--up {
    color: #00c853;
}

.toe-energy-dashboard__ticker-change--down {
    color: #ff1744;
}

.toe-energy-dashboard__ticker-change--flat {
    color: #6b7280;
}

/* Responsive: stack label above track on narrow screens */
@media (max-width: 600px) {
    .toe-energy-dashboard__ticker-row {
        flex-direction: column;
        align-items: stretch;
    }
    .toe-energy-dashboard__ticker-label {
        width: auto;
        border-right: none;
        border-bottom: 1px solid #1e2330;
        text-align: left;
        padding: 0.4rem 0.75rem;
    }
}



/* ── Oil Prices ─────────────────────────────────────────────── */

.toe-oil-prices__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-oil-prices__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-oil-prices__currency {
    font-size: 1rem;
    font-weight: 600;
    vertical-align: super;
    margin-inline-end: 0.1em;
    color: var(--wp--preset--color--primary);
}

.toe-energy-dashboard__card-excerpt {
    font-size: var(--wp--preset--font-size--x-small);
    margin: 0;
}

/* ── Spot Prices ───────────────────────────────────────────── */

.toe-spot-prices__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-spot-prices__change {
    font-family: Manrope, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 0;
    line-height: 1;
}

.toe-spot-prices__change--up {
    color: #00c853;
}

.toe-spot-prices__change--down {
    color: #ff1744;
}

.toe-spot-prices__change--flat {
    color: var(--wp--preset--color--tertiary);
}

.toe-spot-prices__sparkline,
.toe-oil-prices__sparkline {
    margin: var(--wp--preset--spacing--20) 0;
    line-height: 0;
}

.toe-sparkline {
    display: block;
    width: 100%;
    height: 32px;
}

/* ── Market Spreads ────────────────────────────────────────── */

.toe-spreads__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-spreads__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-spreads__currency {
    font-size: 1rem;
    font-weight: 600;
    vertical-align: super;
    margin-inline-end: 0.1em;
    color: var(--wp--preset--color--primary);
}

.toe-spreads__na {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    color: var(--wp--preset--color--tertiary);
}

.toe-spreads__change--positive .toe-spreads__currency {
    color: #00c853;
}

.toe-spreads__change--negative {
    color: #ff1744;
}

.toe-spreads__change--negative .toe-spreads__currency {
    color: #ff1744;
}

.toe-spreads__change--neutral {
    color: var(--wp--preset--color--tertiary);
}

.toe-spreads__health {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
    width: fit-content;
}

.toe-spreads__health--good {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
}

.toe-spreads__health--caution {
    background: rgba(255, 171, 0, 0.15);
    color: #ffab00;
}

.toe-spreads__health--warning {
    background: rgba(255, 23, 68, 0.15);
    color: #ff1744;
}

.toe-spreads__health--neutral {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.toe-spreads__sparkline {
    margin: var(--wp--preset--spacing--20) 0;
    line-height: 0;
}

/* ── Spread Tooltips ───────────────────────────────────────── */

.toe-spreads__card {
    position: relative;
}

.toe-spread-info-btn,
.toe-info-btn {
    background: none;
    border: none;
    color: #00b4d8;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.15s;
    vertical-align: middle;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}
.toe-spread-info-btn:hover,
.toe-spread-info-btn:focus-visible,
.toe-info-btn:hover,
.toe-info-btn:focus-visible {
    opacity: 1;
}
.toe-info-btn--inline {
    position: static;
    font-size: 12px;
    padding: 0 0 0 4px;
}

.toe-spread-tooltip {
    position: fixed;
    z-index: 9999;
    width: 300px;
    background: #0d1017;
    border: 1px solid #f0a500;
    border-radius: 6px;
    padding: 14px 16px;
    font-family: Manrope, sans-serif;
    font-size: 12px;
    color: #c8cdd6;
    line-height: 1.5;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}
.toe-spread-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toe-tt-title {
    font-size: 13px;
    font-weight: 700;
    color: #f0a500;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(240,165,0,0.3);
}
.toe-tt-section {
    margin-bottom: 10px;
}
.toe-tt-label {
    font-size: 10px;
    font-weight: 700;
    color: #f0a500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.toe-tt-text {
    color: #c8cdd6;
}
.toe-tt-formula {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    padding: 6px 8px;
    font-family: monospace;
    font-size: 11px;
    color: #00b4d8;
}
.toe-tt-color-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 3px;
    font-size: 11px;
}
.toe-tt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}
.toe-tt-dot.green  { background: #22c55e; }
.toe-tt-dot.amber  { background: #f0a500; }
.toe-tt-dot.red    { background: #ef4444; }
.toe-tt-why {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    color: #a0a8b4;
    font-style: italic;
}

/* Default: tooltip above icon — caret points down from bottom */
.toe-spread-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: #0d1017;
    border-right: 1px solid #f0a500;
    border-bottom: 1px solid #f0a500;
    transform: rotate(45deg);
}
/* Flipped: tooltip below icon — caret points up from top */
.toe-spread-tooltip.flip-up::before {
    bottom: auto;
    top: -6px;
    border-right: none;
    border-bottom: none;
    border-left: 1px solid #f0a500;
    border-top: 1px solid #f0a500;
}

.toe-section-hint {
    font-size: 11px;
    color: #5a6272;
    margin-top: -4px;
    margin-bottom: 8px;
}

/* ── Futures Curve ──────────────────────────────────────────── */

.toe-futures__header {
    display: flex;
    align-items: baseline;
    gap: var(--wp--preset--spacing--40);
}

.toe-futures__attr {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--wp--preset--color--tertiary, #757575);
    margin-left: auto;
}

.toe-futures__rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.toe-futures__row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--wp--preset--color--secondary, #2e2e2e);
}

.toe-futures__row:last-child {
    border-bottom: none;
}

.toe-futures__commodity-label {
    flex-shrink: 0;
    width: 11rem;
    padding: 0.6rem 0.75rem;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
}

.toe-futures__scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Right fade edge to signal more content */
.toe-futures__row::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3rem;
    pointer-events: none;
    z-index: 1;
}

.toe-futures__row {
    position: relative;
}

.toe-futures__contracts {
    display: flex;
    gap: 0;
    padding: 0.4rem 0;
    width: max-content;
}

.toe-futures__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.3rem 0.75rem;
    min-width: 4.5rem;
    opacity: 0.7;
    border-left: 2px solid transparent;
}

.toe-futures__cell--front {
    opacity: 1;
}

.toe-futures__month {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.toe-futures__change {
    font-size: 0.65rem;
    margin-left: 0.15em;
}

.toe-futures__change--up {
    color: #00c853;
}

.toe-futures__change--down {
    color: #ff1744;
}

.toe-futures__change--flat {
    color: var(--wp--preset--color--tertiary);
}

.toe-futures__price {
    font-family: Orbitron, sans-serif;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.toe-futures__unit {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--wp--preset--color--tertiary, #757575);
}

.toe-futures__through {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: var(--wp--preset--font-size--x-small);
    color: var(--wp--preset--color--tertiary, #757575);
    white-space: nowrap;
    font-style: italic;
}

/* Mobile: narrower label, show front + 2 initially */
@media (max-width: 600px) {
    .toe-futures__commodity-label {
        width: 6rem;
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
    }
    .toe-futures__cell {
        min-width: 4rem;
        padding: 0.3rem 0.5rem;
    }
}

/* ── US Energy Map ─────────────────────────────────────────── */

.toe-map__header {
    display: flex;
    align-items: baseline;
    gap: var(--wp--preset--spacing--40);
}

.toe-map__attr {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--wp--preset--color--tertiary, #757575);
    margin-left: auto;
}

.toe-map__container {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
}

.toe-map__canvas {
    width: 100%;
    height: 840px;
    border-radius: 4px;
    z-index: 1;
}

.toe-map__legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    font-size: var(--wp--preset--font-size--x-small);
    color: var(--wp--preset--color--tertiary, #757575);
}

.toe-map__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.toe-map__legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Trade volume callout ───────────────────────────────── */

.toe-map__trade-control {
    pointer-events: auto;
}

.toe-map__trade-callout {
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'Manrope', sans-serif;
    min-width: 180px;
}

.toe-map__trade-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #f0a500;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toe-map__trade-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
}

.toe-map__trade-row--net {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toe-map__trade-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.toe-map__trade-value {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #e0e0e0;
}

.toe-map__trade-period {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 6px;
    text-align: right;
}

/* Light theme */
.toe-energy-dashboard[data-scheme="light"] .toe-map__trade-callout {
    background: rgba(255, 255, 255, 0.92);
    border-color: #cbd5e1;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__trade-title {
    color: #1e40af;
    border-bottom-color: #e2e8f0;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__trade-row--net {
    border-top-color: #e2e8f0;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__trade-label {
    color: #64748b;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__trade-value {
    color: #1a1a1a;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__trade-period {
    color: #94a3b8;
}

/* ── Entity detail panel (map click) ───────────────────── */

.toe-map__detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 90vw;
    height: 100%;
    z-index: 1100;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    font-family: 'Manrope', sans-serif;
}

.toe-map__detail-panel--open {
    transform: translateX(0);
}

.toe-map__detail-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.toe-map__detail-header-text {
    flex: 1;
    min-width: 0;
}

.toe-map__detail-title {
    font-size: 14px;
    font-weight: 800;
    color: #f0a500;
    margin: 0 0 2px;
    line-height: 1.3;
}

.toe-map__detail-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.toe-map__detail-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.toe-map__detail-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.toe-map__detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.toe-map__detail-loading {
    text-align: center;
    padding: 32px 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* ── Detail panel: info rows ──────────────────────────── */

.toe-map__detail-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin-bottom: 16px;
    font-size: 12px;
}

.toe-map__detail-info-label {
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.toe-map__detail-info-value {
    color: #e0e0e0;
}

/* ── Detail panel: connection groups ──────────────────── */

.toe-map__detail-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.35);
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toe-map__detail-group {
    margin-bottom: 12px;
}

.toe-map__detail-group-name {
    font-size: 12px;
    font-weight: 700;
    color: #296DEB;
    margin-bottom: 4px;
}

.toe-map__detail-conn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    margin: 2px 0;
    border-radius: 4px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.1s;
}

.toe-map__detail-conn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.toe-map__detail-conn-name {
    flex: 1;
    min-width: 0;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toe-map__detail-conn-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(41, 109, 235, 0.15);
    color: #296DEB;
}

.toe-map__detail-conn-badge--product {
    background: rgba(240, 165, 0, 0.15);
    color: #f0a500;
}

.toe-map__detail-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    padding: 8px 0;
}

.toe-map__detail-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.toe-map__detail-stat {
    flex: 1;
    text-align: center;
}

.toe-map__detail-stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #f0a500;
    display: block;
}

.toe-map__detail-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Light theme ──────────────────────────────────────── */

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-panel {
    background: rgba(255, 255, 255, 0.97);
    border-left-color: #e2e8f0;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-header {
    border-bottom-color: #e2e8f0;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-title {
    color: #1e40af;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-subtitle {
    color: #64748b;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-close {
    background: #f1f5f9;
    color: #64748b;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-close:hover {
    background: #e2e8f0;
    color: #1a1a1a;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-info-label {
    color: #94a3b8;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-info-value {
    color: #334155;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-section-title {
    color: #94a3b8;
    border-bottom-color: #e2e8f0;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-conn {
    background: #f8fafc;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-conn:hover {
    background: #f1f5f9;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-conn-name {
    color: #334155;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-stats {
    background: #f8fafc;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-stat-value {
    color: #1e40af;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-stat-label {
    color: #64748b;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-loading {
    color: #94a3b8;
}

.toe-energy-dashboard[data-scheme="light"] .toe-map__detail-empty {
    color: #94a3b8;
}

/* ── Mobile: full-width panel ─────────────────────────── */

@media (max-width: 600px) {
    .toe-map__detail-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        top: auto;
        bottom: 0;
        height: 60%;
        transform: translateY(100%);
    }
    .toe-map__detail-panel--open {
        transform: translateY(0);
    }
}

/* Leaflet tooltip override */
.toe-map__tooltip {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    background: #1a1d24;
    color: #e2e8f0;
    border: 1px solid #2a2d34;
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.toe-map__tooltip strong {
    color: #f0a500;
}

/* Override Leaflet default tooltip arrow */
.leaflet-tooltip.toe-map__tooltip::before {
    border-top-color: #1a1d24;
}

/* Leaflet popup override — dark theme */
.toe-map__popup .leaflet-popup-content-wrapper {
    background: #1a1d24;
    color: #e0e0e0;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
}

.toe-map__popup .leaflet-popup-tip {
    background: #1a1d24;
}

.toe-map__popup .leaflet-popup-close-button {
    color: #888;
    font-size: 16px;
}

.toe-map__popup .leaflet-popup-close-button:hover {
    color: #fff;
}

.toe-map__popup-content {
    line-height: 1.5;
}

.toe-map__popup-title {
    display: block;
    color: #f0a500;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: var(--wp--preset--font-size--small);
}

.toe-map__popup-row {
    margin-bottom: 1px;
}

.toe-map__popup-label {
    color: #888;
}

.toe-map__popup-value {
    color: #e0e0e0;
}

/* Override Leaflet layer control for dark theme */
.toe-map__canvas .leaflet-control-layers {
    background: #1a1d24;
    border: 1px solid #2a2d34;
    border-radius: 4px;
    color: #e2e8f0;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
}

.toe-map__canvas .leaflet-control-layers-separator {
    border-top-color: #2a2d34;
}

.toe-map__canvas .leaflet-control-layers label {
    color: #e2e8f0;
}

/* Override Leaflet zoom control for dark theme */
.toe-map__canvas .leaflet-control-zoom a {
    background: #1a1d24;
    color: #e2e8f0;
    border-color: #2a2d34;
}

.toe-map__canvas .leaflet-control-zoom a:hover {
    background: #2a2d34;
}

/* Override Leaflet attribution for dark theme */
.toe-map__canvas .leaflet-control-attribution {
    font-size: 0.6rem;
    background: rgba(10, 14, 23, 0.75);
    color: #6b7280;
}

.toe-map__canvas .leaflet-control-attribution a {
    color: #6b7280;
}

/* Pop-out fullscreen button */
.toe-map-popout__btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    background: #1a1d24 !important;
    color: #e2e8f0 !important;
    border-color: #2a2d34 !important;
    line-height: 30px !important;
    text-decoration: none !important;
}

.toe-map-popout__btn:hover {
    background: #2a2d34 !important;
    color: #f0a500 !important;
}

/* Export layer data control */
.toe-map-export__btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    background: #1a1d24 !important;
    color: #e2e8f0 !important;
    border-color: #2a2d34 !important;
    line-height: 30px !important;
    text-decoration: none !important;
    cursor: pointer;
}

.toe-map-export__btn:hover {
    background: #2a2d34 !important;
    color: #f0a500 !important;
}

.toe-map-export__menu {
    position: absolute;
    top: 0;
    left: 36px;
    background: #0d1017;
    border: 1px solid #3a3f4b;
    border-radius: 6px;
    min-width: 240px;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    padding: 4px 0;
}

.toe-map-export__menu::before {
    content: 'Export CSV';
    display: block;
    padding: 6px 12px 4px;
    color: #f0a500;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #2a2d34;
    margin-bottom: 2px;
}

.toe-map-export__item,
.toe-map-export__item:link,
.toe-map-export__item:visited,
.toe-map-export__item:active {
    display: block;
    padding: 7px 12px;
    color: #e2e8f0 !important;
    text-decoration: none !important;
    font-family: Manrope, sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.4;
    background: transparent;
}

.toe-map-export__item:hover {
    background: #1a1d24 !important;
    color: #f0a500 !important;
}

@media (max-width: 600px) {
    .toe-map__canvas {
        height: 560px;
    }
    .toe-map__legend {
        gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
    }
}

/* ── Market Indicators ──────────────────────────────────────── */

.toe-market-indicators__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-market-indicators__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-market-indicators__units {
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

/* ── Drilling Intelligence ─────────────────────────────────── */

.toe-drilling__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-drilling__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-drilling__units {
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

/* ── Storage ──────────────────────────────────────────────── */

.toe-storage__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-storage__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-storage__units {
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

/* ── SPR Tracker (within Storage section) ───────────────────── */

.toe-spr__change {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.toe-spr__change--up {
    color: #00c853;
}

.toe-spr__change--down {
    color: #ff1744;
}

.toe-spr__change-icon {
    font-size: 0.6em;
    vertical-align: middle;
    margin-inline-end: 0.2em;
}

.toe-spr__range {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin: var(--wp--preset--spacing--20) 0 0;
}

.toe-spr__health-badge {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
    width: fit-content;
}

.toe-spr__health--normal {
    color: #00c853;
}

.toe-spr__health-badge.toe-spr__health--normal {
    background: rgba(0, 200, 83, 0.15);
}

.toe-spr__health--caution {
    color: #ffab00;
}

.toe-spr__health-badge.toe-spr__health--caution {
    background: rgba(255, 171, 0, 0.15);
}

.toe-spr__health--tight {
    color: #ff1744;
}

.toe-spr__health-badge.toe-spr__health--tight {
    background: rgba(255, 23, 68, 0.15);
}

/* ── Section Explainer ────────────────────────────────────────── */

.toe-energy-dashboard__section-explainer {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--tertiary);
    line-height: 1.5;
    margin: 0 0 var(--wp--preset--spacing--40);
    max-width: 80ch;
}

/* ── WPSR Inventory ──────────────────────────────────────────── */

.toe-wpsr__row-header {
    margin-block: var(--wp--preset--spacing--30) 0;
}

.toe-wpsr__row-label {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp--preset--color--tertiary);
    margin: 0;
}

.toe-wpsr__schedule {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin-inline-start: auto;
}

.toe-wpsr__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-wpsr__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-wpsr__units {
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

.toe-wpsr__change {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.toe-wpsr__change--up {
    color: #00c853;
}

.toe-wpsr__change--down {
    color: #ff1744;
}

.toe-wpsr__change--flat {
    color: var(--wp--preset--color--tertiary);
}

.toe-wpsr__change-icon {
    font-size: 0.6em;
    vertical-align: middle;
    margin-inline-end: 0.2em;
}

.toe-wpsr__change-pct {
    color: var(--wp--preset--color--tertiary);
    font-weight: 500;
    margin-inline-start: 0.3em;
}

.toe-wpsr__avg-badge {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
    width: fit-content;
}

.toe-wpsr__avg--normal {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
}

.toe-wpsr__avg--surplus {
    background: rgba(255, 171, 0, 0.15);
    color: #ffab00;
}

.toe-wpsr__avg--tight {
    background: rgba(255, 23, 68, 0.15);
    color: #ff1744;
}

.toe-wpsr__sparkline {
    margin: var(--wp--preset--spacing--20) 0;
    line-height: 0;
}

/* ── Days of Supply ─────────────────────────────────────────── */

.toe-dos__schedule {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin-inline-start: auto;
}

.toe-dos__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-dos__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-dos__units {
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

.toe-dos__change {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.toe-dos__change--up {
    color: #00c853;
}

.toe-dos__change--down {
    color: #ff1744;
}

.toe-dos__change--flat {
    color: var(--wp--preset--color--tertiary);
}

.toe-dos__change-icon {
    font-size: 0.6em;
    vertical-align: middle;
    margin-inline-end: 0.2em;
}

.toe-dos__range-badge {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
    width: fit-content;
}

.toe-dos__health--normal {
    color: #00c853;
}

.toe-dos__range-badge.toe-dos__health--normal {
    background: rgba(0, 200, 83, 0.15);
}

.toe-dos__health--surplus {
    color: #ffab00;
}

.toe-dos__range-badge.toe-dos__health--surplus {
    background: rgba(255, 171, 0, 0.15);
}

.toe-dos__health--tight {
    color: #ff1744;
}

.toe-dos__range-badge.toe-dos__health--tight {
    background: rgba(255, 23, 68, 0.15);
}

.toe-dos__normal-range {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin: var(--wp--preset--spacing--20) 0 0;
}

.toe-dos__sparkline {
    margin: var(--wp--preset--spacing--20) 0;
    line-height: 0;
}

/* ── Imports & Exports ──────────────────────────────────────── */

.toe-impexp__kpi-card {
    position: relative;
}

.toe-impexp__kpi-card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-impexp__kpi-value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #e2e8f0;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-impexp__kpi-units {
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

.toe-impexp__net--importer {
    color: #ff6d00;
}

.toe-impexp__net--exporter {
    color: #00c853;
}

.toe-impexp__net-badge {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
    width: fit-content;
}

.toe-impexp__net-badge--importer {
    background: rgba(255, 109, 0, 0.15);
    color: #ff6d00;
}

.toe-impexp__net-badge--exporter {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
}

.toe-impexp__wow {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.toe-impexp__wow--up {
    color: #00c853;
}

.toe-impexp__wow--down {
    color: #ff1744;
}

.toe-impexp__period-tag {
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin-inline-start: 0.5em;
}

/* Side-by-side columns for imports & exports */
.toe-impexp__columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--40);
    margin-block-start: var(--wp--preset--spacing--30);
}

@media (max-width: 768px) {
    .toe-impexp__columns {
        grid-template-columns: 1fr;
    }
}

.toe-impexp__column {
    min-width: 0;
}

.toe-impexp__column-title {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp--preset--color--tertiary);
    margin: 0 0 var(--wp--preset--spacing--20) 0;
}

.toe-impexp__country-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.toe-impexp__country-row {
    display: grid;
    grid-template-columns: 6.5rem 1fr 3.5rem;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.toe-impexp__country-row:last-child {
    border-bottom: none;
}

@media (max-width: 600px) {
    .toe-impexp__country-row {
        grid-template-columns: 5.5rem 1fr 3rem;
    }
}

.toe-impexp__country-name {
    font-family: Manrope, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.toe-impexp__opec-tag {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(240, 165, 0, 0.2);
    color: #f0a500;
    padding: 0.05rem 0.2rem;
    border-radius: 3px;
    margin-inline-start: 0.2em;
    vertical-align: middle;
}

.toe-impexp__country-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.toe-impexp__country-bar {
    height: 100%;
    background: #00b4d8;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.toe-impexp__country-bar--export {
    background: #f0a500;
}

.toe-impexp__country--opec .toe-impexp__country-bar {
    background: #ff6d00;
}

.toe-impexp__country-value {
    font-family: Manrope, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #e2e8f0;
    text-align: right;
    line-height: 1.2;
}

/* ── Refinery Utilization ───────────────────────────────────── */

.toe-refinery__row-header {
    margin-block: var(--wp--preset--spacing--30) 0;
}

.toe-refinery__row-label {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp--preset--color--tertiary);
    margin: 0;
}

.toe-refinery__schedule {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin-inline-start: auto;
}

.toe-refinery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 600px) {
    .toe-refinery__grid {
        grid-template-columns: 1fr !important;
    }
}

.toe-refinery__card {
    position: relative;
}

.toe-refinery__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-refinery__value {
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    letter-spacing: -0.02em;
    margin: var(--wp--preset--spacing--20) 0;
}

.toe-refinery__units {
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

.toe-refinery__change {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.toe-refinery__change--up {
    color: #00c853;
}

.toe-refinery__change--down {
    color: #ff1744;
}

.toe-refinery__change--flat {
    color: var(--wp--preset--color--tertiary);
}

.toe-refinery__change-icon {
    font-size: 0.6em;
    vertical-align: middle;
    margin-inline-end: 0.2em;
}

.toe-refinery__change-pct {
    color: var(--wp--preset--color--tertiary);
    font-weight: 500;
    margin-inline-start: 0.3em;
}

.toe-refinery__avg-badge {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
    width: fit-content;
}

.toe-refinery__avg--normal {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
}

.toe-refinery__avg--surplus {
    background: rgba(255, 171, 0, 0.15);
    color: #ffab00;
}

.toe-refinery__avg--tight {
    background: rgba(255, 23, 68, 0.15);
    color: #ff1744;
}

.toe-refinery__sparkline {
    margin: var(--wp--preset--spacing--20) 0;
    line-height: 0;
}

.toe-refinery__turnaround-badge {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 171, 0, 0.15);
    color: #ffab00;
    margin-inline-start: 0.5em;
    vertical-align: middle;
}

/* PADD utilization bars */
.toe-refinery__padd-bars {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20);
    padding: var(--wp--preset--spacing--30);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    margin-block-start: var(--wp--preset--spacing--30);
}

.toe-refinery__padd-bar {
    display: grid;
    grid-template-columns: 10rem 1fr 3rem;
    align-items: center;
    gap: var(--wp--preset--spacing--30);
}

@media (max-width: 600px) {
    .toe-refinery__padd-bar {
        grid-template-columns: 7rem 1fr 3rem;
    }
}

.toe-refinery__padd-label {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    color: var(--wp--preset--color--secondary);
}

.toe-refinery__padd-track {
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

.toe-refinery__padd-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease;
}

.toe-refinery__padd-fill--high {
    background: #00c853;
}

.toe-refinery__padd-fill--normal {
    background: var(--wp--preset--color--primary);
}

.toe-refinery__padd-fill--low {
    background: #ff1744;
}

.toe-refinery__padd-value {
    font-family: Orbitron, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-align: right;
}

/* ── STEO Forecasts ─────────────────────────────────────────── */

.toe-steo__schedule {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin-inline-start: auto;
}

.toe-steo__chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--40);
}

@media (max-width: 768px) {
    .toe-steo__chart-grid {
        grid-template-columns: 1fr;
    }
}

.toe-steo__chart-card {
    background: #1a1d24;
    border: 1px solid #2a2d34;
    border-radius: 0.5rem;
    padding: var(--wp--preset--spacing--40);
}

.toe-steo__chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--wp--preset--spacing--30);
}

.toe-steo__chart-title {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #f7fafc;
    margin: 0;
}

.toe-steo__current-price {
    font-family: Orbitron, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    color: #e2e8f0;
}

.toe-steo__canvas-wrap {
    position: relative;
    height: 160px;
}

/* ── COT Positioning ────────────────────────────────────────── */

.toe-cot__schedule {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin-inline-start: auto;
}

.toe-cot__card .toe-energy-dashboard__card-title {
    flex-grow: 0;
}

.toe-cot__net-label {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp--preset--color--tertiary);
    margin: var(--wp--preset--spacing--20) 0 0;
}

.toe-cot__net-value {
    font-family: Orbitron, sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0.15rem 0 var(--wp--preset--spacing--20);
}

.toe-cot__net-value--long {
    color: #00c853;
}

.toe-cot__net-value--short {
    color: #ff1744;
}

.toe-cot__net-units {
    font-family: Manrope, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-inline-start: 0.25em;
    vertical-align: middle;
    color: var(--wp--preset--color--tertiary);
}

.toe-cot__change {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    margin: 0 0 var(--wp--preset--spacing--20);
    line-height: 1.3;
}

.toe-cot__change--up {
    color: #00c853;
}

.toe-cot__change--down {
    color: #ff1744;
}

.toe-cot__change--flat {
    color: var(--wp--preset--color--tertiary);
}

.toe-cot__change-icon {
    font-size: 0.6em;
    vertical-align: middle;
    margin-inline-end: 0.2em;
}

.toe-cot__bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.toe-cot__bar-long {
    background: #00c853;
    transition: width 0.3s ease;
}

.toe-cot__bar-short {
    background: #ff1744;
    transition: width 0.3s ease;
}

.toe-cot__bar-legend {
    display: flex;
    justify-content: space-between;
    font-family: Manrope, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0 0 var(--wp--preset--spacing--20);
}

.toe-cot__bar-legend-long {
    color: #00c853;
}

.toe-cot__bar-legend-short {
    color: #ff1744;
}

.toe-cot__oi {
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 500;
    color: var(--wp--preset--color--tertiary);
    margin: 0 0 var(--wp--preset--spacing--20);
}

.toe-cot__sentiment {
    display: inline-block;
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
    width: fit-content;
}

.toe-cot__sentiment--bullish {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
}

.toe-cot__sentiment--neutral {
    background: rgba(255, 171, 0, 0.15);
    color: #ffab00;
}

.toe-cot__sentiment--bearish {
    background: rgba(255, 23, 68, 0.15);
    color: #ff1744;
}

.toe-cot__sparkline {
    margin: var(--wp--preset--spacing--20) 0;
    line-height: 0;
}

/* ── News Feed ──────────────────────────────────────────────── */

.toe-news-feed__card .toe-energy-dashboard__card-byline {
    margin-top: auto !important;
}

.toe-news-feed__headline {
    color: inherit;
    text-decoration: none;
    display: inline;
    margin: 0 !important;
    padding: 0 !important;
}

.toe-news-feed__headline:hover,
.toe-news-feed__headline:focus-visible {
    color: var(--wp--preset--color--primary);
}

/* ── Dark theme (Bloomberg terminal) ────────────────────────── */

.toe-energy-dashboard[data-scheme="dark"] {
    background: #111318;
    color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__section-header {
    border-bottom: 2px solid #f0a500;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__section-label {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__card {
    background: #1a1d24;
    border: 1px solid #2a2d34;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
    border-radius: 4px;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-oil-prices__card {
    border-top: 2px solid #f0a500;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spot-prices__card {
    border-top: 2px solid #00b4d8;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spot-prices__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spot-prices__card .toe-oil-prices__currency {
    color: #f0a500;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spot-prices__card .toe-oil-prices__value {
    color: #f0a500;
}
/* Spreads — dark */
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__card {
    border-top: 2px solid #a78bfa;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__value {
    color: #a78bfa;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__currency {
    color: #a78bfa;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__change--positive {
    color: #00c853;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__change--positive .toe-spreads__currency {
    color: #00c853;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__change--negative {
    color: #ff1744;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-spreads__change--negative .toe-spreads__currency {
    color: #ff1744;
}
/* WPSR — dark */
.toe-energy-dashboard[data-scheme="dark"] .toe-wpsr__card {
    border-top: 2px solid #2dd4bf;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-wpsr__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-wpsr__value {
    color: #2dd4bf;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-wpsr__units {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-wpsr__row-label {
    color: #9ca3af;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-wpsr__schedule {
    color: #6b7280;
}
/* Refinery — dark */
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__card {
    border-top: 2px solid #a78bfa;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__value {
    color: #a78bfa;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__units {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__row-label {
    color: #9ca3af;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__schedule {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__padd-label {
    color: #9ca3af;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__padd-track {
    background: rgba(255, 255, 255, 0.08);
}
.toe-energy-dashboard[data-scheme="dark"] .toe-refinery__padd-value {
    color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-news-feed__card {
    border-top: 2px solid #00b4d8;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__card-source {
    color: #00b4d8;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-oil-prices__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-news-feed__card .toe-energy-dashboard__card-title {
    color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__card-title a {
    color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__card-title a:hover,
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__card-title a:focus-visible {
    color: #00b4d8;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__card-byline,
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__meta,
.toe-energy-dashboard[data-scheme="dark"] .toe-energy-dashboard__card-excerpt {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-oil-prices__value {
    color: #f0a500;
    font-size: 1.5rem;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-oil-prices__currency {
    color: #f0a500;
    font-size: 1rem;
}
/* Futures — dark */
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__commodity-label {
    color: #f0a500;
    background: #0d1119;
    border-right: 1px solid #1e2330;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__row {
    border-bottom-color: #1e2330;
    background: #1a1d24;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__cell--front {
    border-left-color: #f0a500;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__month {
    color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__price {
    color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__cell--front .toe-futures__price {
    color: #f0a500;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__unit {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__through {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__attr {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__row::after {
    background: linear-gradient(to left, #1a1d24, transparent);
}
.toe-energy-dashboard[data-scheme="dark"] .toe-futures__scroll {
    scrollbar-color: #2a2d34 transparent;
}

/* Map — dark */
.toe-energy-dashboard[data-scheme="dark"] .toe-map__canvas {
    border: 1px solid #2a2d34;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-map__attr {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-map__legend {
    color: #6b7280;
}

.toe-energy-dashboard[data-scheme="dark"] .toe-market-indicators__card {
    border-top: 2px solid #34d399;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-market-indicators__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-market-indicators__value {
    color: #34d399;
    font-size: 1.5rem;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-market-indicators__value--up {
    color: #34d399;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-market-indicators__value--down {
    color: #f87171;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-market-indicators__units {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-drilling__card {
    border-top: 2px solid #fb923c;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-drilling__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-drilling__value {
    color: #fb923c;
    font-size: 1.5rem;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-drilling__units {
    color: #6b7280;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-storage__card {
    border-top: 2px solid #60a5fa;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-storage__card .toe-energy-dashboard__card-title {
    color: #ffffff;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-storage__value {
    color: #60a5fa;
    font-size: 1.5rem;
}
.toe-energy-dashboard[data-scheme="dark"] .toe-storage__units {
    color: #6b7280;
}

/* ── Light theme ─────────────────────────────────────────────── */

.toe-energy-dashboard[data-scheme="light"] {
    background: var(--wp--preset--color--base, #ffffff);
    color: var(--wp--preset--color--contrast, #1a1a1a);
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__section-header {
    border-bottom: 2px solid var(--wp--preset--color--primary, #296DEB);
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__section-label {
    color: var(--wp--preset--color--contrast, #1a1a1a);
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
}
/* Ticker — light */
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker-section {
    background: var(--wp--preset--color--base, #ffffff);
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker-row {
    border-bottom-color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker-label {
    background: #f1f5f9;
    border-right-color: #e2e8f0;
    color: #64748b;
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker-scroll::before {
    background: linear-gradient(to right, #f8fafc, transparent);
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker-scroll::after {
    background: linear-gradient(to left, #f8fafc, transparent);
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker-name {
    color: #1e40af;
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__ticker-price {
    color: #1a1a1a;
}
/* Spot Prices — light */
.toe-energy-dashboard[data-scheme="light"] .toe-spot-prices__card {
    border-top: 2px solid #0284c7;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spot-prices__card .toe-oil-prices__value {
    color: #0369a1;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spot-prices__card .toe-oil-prices__currency {
    color: #0369a1;
}
/* Oil Prices — light */
.toe-energy-dashboard[data-scheme="light"] .toe-oil-prices__card {
    border-top: 2px solid #d97706;
}
.toe-energy-dashboard[data-scheme="light"] .toe-oil-prices__value {
    color: #b45309;
    font-size: 1.5rem;
}
.toe-energy-dashboard[data-scheme="light"] .toe-oil-prices__currency {
    color: #b45309;
    font-size: 1rem;
}
/* Spreads — light */
.toe-energy-dashboard[data-scheme="light"] .toe-spreads__card {
    border-top: 2px solid #7c3aed;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spreads__value {
    color: #6d28d9;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spreads__currency {
    color: #6d28d9;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spreads__change--positive {
    color: #16a34a;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spreads__change--positive .toe-spreads__currency {
    color: #16a34a;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spreads__change--negative {
    color: #dc2626;
}
.toe-energy-dashboard[data-scheme="light"] .toe-spreads__change--negative .toe-spreads__currency {
    color: #dc2626;
}
/* Futures — light */
.toe-energy-dashboard[data-scheme="light"] .toe-futures__commodity-label {
    color: #1e40af;
    background: #f1f5f9;
    border-right: 1px solid #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-futures__row {
    border-bottom-color: #e2e8f0;
    background: #ffffff;
}
.toe-energy-dashboard[data-scheme="light"] .toe-futures__cell--front {
    border-left-color: #1e40af;
}
.toe-energy-dashboard[data-scheme="light"] .toe-futures__cell--front .toe-futures__price {
    color: #1e40af;
}
.toe-energy-dashboard[data-scheme="light"] .toe-futures__row::after {
    background: linear-gradient(to left, #ffffff, transparent);
}
.toe-energy-dashboard[data-scheme="light"] .toe-futures__scroll {
    scrollbar-color: #cbd5e1 transparent;
}
/* Market Indicators — light */
.toe-energy-dashboard[data-scheme="light"] .toe-market-indicators__card {
    border-top: 2px solid #059669;
}
.toe-energy-dashboard[data-scheme="light"] .toe-market-indicators__value {
    color: #047857;
    font-size: 1.5rem;
}
.toe-energy-dashboard[data-scheme="light"] .toe-market-indicators__value--up {
    color: #16a34a;
}
.toe-energy-dashboard[data-scheme="light"] .toe-market-indicators__value--down {
    color: #dc2626;
}
/* Drilling — light */
.toe-energy-dashboard[data-scheme="light"] .toe-drilling__card {
    border-top: 2px solid #ea580c;
}
.toe-energy-dashboard[data-scheme="light"] .toe-drilling__value {
    color: #c2410c;
    font-size: 1.5rem;
}
/* Storage — light */
.toe-energy-dashboard[data-scheme="light"] .toe-storage__card {
    border-top: 2px solid #2563eb;
}
.toe-energy-dashboard[data-scheme="light"] .toe-storage__value {
    color: #1d4ed8;
    font-size: 1.5rem;
}
/* WPSR — light */
.toe-energy-dashboard[data-scheme="light"] .toe-wpsr__card {
    border-top: 2px solid #0d9488;
}
.toe-energy-dashboard[data-scheme="light"] .toe-wpsr__value {
    color: #0f766e;
    font-size: 1.5rem;
}
/* Refinery — light */
.toe-energy-dashboard[data-scheme="light"] .toe-refinery__card {
    border-top: 2px solid #7c3aed;
}
.toe-energy-dashboard[data-scheme="light"] .toe-refinery__value {
    color: #6d28d9;
    font-size: 1.5rem;
}
.toe-energy-dashboard[data-scheme="light"] .toe-refinery__padd-track {
    background: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-refinery__padd-bars {
    background: #f8fafc;
}
/* News — light */
.toe-energy-dashboard[data-scheme="light"] .toe-news-feed__card {
    border-top: 2px solid #0284c7;
}
/* Imports/Exports — light */
.toe-energy-dashboard[data-scheme="light"] .toe-impexp__kpi-value {
    color: var(--wp--preset--color--contrast, #1a1a1a);
}
.toe-energy-dashboard[data-scheme="light"] .toe-impexp__country-name {
    color: var(--wp--preset--color--contrast, #1a1a1a);
}
.toe-energy-dashboard[data-scheme="light"] .toe-impexp__country-value {
    color: var(--wp--preset--color--contrast, #1a1a1a);
}
.toe-energy-dashboard[data-scheme="light"] .toe-impexp__country-bar-wrap {
    background: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-impexp__country-row {
    border-bottom-color: #f1f5f9;
}
.toe-energy-dashboard[data-scheme="light"] .toe-impexp__columns {
    gap: var(--wp--preset--spacing--50);
}
/* Card sources and bylines — light */
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__card-source {
    color: var(--wp--preset--color--primary, #296DEB);
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__card-title a:hover,
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__card-title a:focus-visible {
    color: var(--wp--preset--color--primary, #296DEB);
}
/* Map — light */
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas {
    border: 1px solid #cbd5e1;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__tooltip {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__tooltip strong {
    color: #1e40af;
}
.toe-energy-dashboard[data-scheme="light"] .leaflet-tooltip.toe-map__tooltip::before {
    border-top-color: #ffffff;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__popup .leaflet-popup-content-wrapper {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__popup .leaflet-popup-tip {
    background: #ffffff;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__popup .leaflet-popup-close-button {
    color: #64748b;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__popup .leaflet-popup-close-button:hover {
    color: #1a1a1a;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__popup-title {
    color: #1e40af;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__popup-label {
    color: #64748b;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__popup-value {
    color: #1a1a1a;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas .leaflet-control-layers {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas .leaflet-control-layers-separator {
    border-top-color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas .leaflet-control-layers label {
    color: #334155;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas .leaflet-control-zoom a {
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas .leaflet-control-zoom a:hover {
    background: #f1f5f9;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85);
    color: #64748b;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map__canvas .leaflet-control-attribution a {
    color: #64748b;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-popout__btn {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-popout__btn:hover {
    background: #f1f5f9 !important;
    color: #1e40af !important;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__btn {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__btn:hover {
    background: #f1f5f9 !important;
    color: #1e40af !important;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__menu {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__menu::before {
    color: #1e40af;
    border-bottom-color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__item,
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__item:link,
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__item:visited,
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__item:active {
    color: #334155 !important;
}
.toe-energy-dashboard[data-scheme="light"] .toe-map-export__item:hover {
    background: #f1f5f9 !important;
    color: #1e40af !important;
}
/* STEO charts — light */
.toe-energy-dashboard[data-scheme="light"] .toe-steo__chart-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.toe-energy-dashboard[data-scheme="light"] .toe-steo__chart-title {
    color: var(--wp--preset--color--contrast, #1a1a1a);
}
.toe-energy-dashboard[data-scheme="light"] .toe-steo__current-price {
    color: var(--wp--preset--color--contrast, #1a1a1a);
}
/* Stale/error cards — light */
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__card--stale {
    border-color: #d97706;
}
/* Skeleton loading — light */
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__skeleton-line {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 800px 100%;
}
.toe-energy-dashboard[data-scheme="light"] .toe-energy-dashboard__skeleton-block {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 800px 100%;
}
/* Tooltip — light (appended to body, outside dashboard wrapper) */
.toe-spread-tooltip.toe-tt--light {
    background: #ffffff;
    border-color: #296DEB;
    color: #334155;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.toe-spread-tooltip.toe-tt--light .toe-tt-title {
    color: #296DEB;
    border-bottom-color: rgba(41, 109, 235, 0.3);
}
.toe-spread-tooltip.toe-tt--light .toe-tt-label {
    color: #296DEB;
}
.toe-spread-tooltip.toe-tt--light .toe-tt-formula {
    background: #f1f5f9;
    color: #1e40af;
}
.toe-spread-tooltip.toe-tt--light .toe-tt-text {
    color: #334155;
}
.toe-spread-tooltip.toe-tt--light .toe-tt-why {
    border-top-color: #e2e8f0;
    color: #64748b;
}
.toe-spread-tooltip.toe-tt--light .toe-tt-color-row {
    color: #334155;
}
.toe-spread-tooltip.toe-tt--light::before {
    background: #ffffff;
    border-right-color: #296DEB;
    border-bottom-color: #296DEB;
}
.toe-spread-tooltip.toe-tt--light.flip-up::before {
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: #296DEB;
    border-top-color: #296DEB;
}
/* Info button — light */
.toe-energy-dashboard[data-scheme="light"] .toe-spread-info-btn,
.toe-energy-dashboard[data-scheme="light"] .toe-info-btn {
    color: var(--wp--preset--color--primary, #296DEB);
}

/* ── Auto scheme — dark overrides follow OS preference ───────── */

@media (prefers-color-scheme: dark) {
    .toe-energy-dashboard[data-scheme="auto"] { background: #111318; color: #e2e8f0; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__section-header { border-bottom: 2px solid #f0a500; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__section-label { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__card { background: #1a1d24; border: 1px solid #2a2d34; box-shadow: 0 2px 12px rgba(0,0,0,0.5); border-radius: 4px; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-oil-prices__card { border-top: 2px solid #f0a500; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-market-indicators__card { border-top: 2px solid #34d399; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spot-prices__card { border-top: 2px solid #00b4d8; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spot-prices__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spot-prices__card .toe-oil-prices__currency { color: #f0a500; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spot-prices__card .toe-oil-prices__value { color: #f0a500; }
    /* Spreads — auto dark */
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__card { border-top: 2px solid #a78bfa; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__value { color: #a78bfa; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__currency { color: #a78bfa; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__change--positive { color: #00c853; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__change--positive .toe-spreads__currency { color: #00c853; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__change--negative { color: #ff1744; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-spreads__change--negative .toe-spreads__currency { color: #ff1744; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-news-feed__card { border-top: 2px solid #00b4d8; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__card-source { color: #00b4d8; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-oil-prices__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-market-indicators__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-news-feed__card .toe-energy-dashboard__card-title { color: #e2e8f0; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__card-title a { color: #e2e8f0; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__card-title a:hover,
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__card-title a:focus-visible { color: #00b4d8; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__card-byline,
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__meta,
    .toe-energy-dashboard[data-scheme="auto"] .toe-energy-dashboard__card-excerpt { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-oil-prices__value { color: #f0a500; font-size: 1.5rem; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-oil-prices__currency { color: #f0a500; font-size: 1rem; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-market-indicators__value { color: #34d399; font-size: 1.5rem; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-market-indicators__value--up { color: #34d399; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-market-indicators__value--down { color: #f87171; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-market-indicators__units { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-drilling__card { border-top: 2px solid #fb923c; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-drilling__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-drilling__value { color: #fb923c; font-size: 1.5rem; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-drilling__units { color: #6b7280; }
    /* WPSR — auto dark */
    .toe-energy-dashboard[data-scheme="auto"] .toe-wpsr__card { border-top: 2px solid #2dd4bf; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-wpsr__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-wpsr__value { color: #2dd4bf; font-size: 1.5rem; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-wpsr__units { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-wpsr__row-label { color: #9ca3af; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-wpsr__schedule { color: #6b7280; }
    /* Refinery — auto dark */
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__card { border-top: 2px solid #a78bfa; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__value { color: #a78bfa; font-size: 1.5rem; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__units { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__row-label { color: #9ca3af; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__schedule { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__padd-label { color: #9ca3af; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-refinery__padd-value { color: #e2e8f0; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-storage__card { border-top: 2px solid #60a5fa; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-storage__card .toe-energy-dashboard__card-title { color: #ffffff; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-storage__value { color: #60a5fa; font-size: 1.5rem; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-storage__units { color: #6b7280; }
    /* Map — auto dark */
    .toe-energy-dashboard[data-scheme="auto"] .toe-map__canvas { border: 1px solid #2a2d34; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-map__attr { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-map__legend { color: #6b7280; }
    /* Futures — auto dark */
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__commodity-label { color: #f0a500; background: #0d1119; border-right: 1px solid #1e2330; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__row { border-bottom-color: #1e2330; background: #1a1d24; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__cell--front { border-left-color: #f0a500; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__month { color: #e2e8f0; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__price { color: #e2e8f0; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__cell--front .toe-futures__price { color: #f0a500; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__unit { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__through { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__attr { color: #6b7280; }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__row::after { background: linear-gradient(to left, #1a1d24, transparent); }
    .toe-energy-dashboard[data-scheme="auto"] .toe-futures__scroll { scrollbar-color: #2a2d34 transparent; }
}

/* ── Loading overlay ───────────────────────────────────────────────────── */

.toe-energy-dashboard__loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp--preset--color--contrast, #000000);
    transition: opacity 0.6s ease;
}

.toe-energy-dashboard__loading-overlay--hidden {
    opacity: 0;
    pointer-events: none;
}

.toe-energy-dashboard__loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--wp--preset--spacing--40, 1rem);
    text-align: center;
    padding: var(--wp--preset--spacing--40, 1rem);
}

.toe-energy-dashboard__loading-logo {
    font-family: var(--wp--preset--font-family--orbitron, 'Orbitron', sans-serif);
    font-size: var(--wp--preset--font-size--x-large, 1.5rem);
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    animation: toe-loading-pulse 2s ease-in-out infinite;
}

@keyframes toe-loading-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

.toe-energy-dashboard__loading-message {
    font-family: var(--wp--preset--font-family--manrope, 'Manrope', sans-serif);
    font-size: var(--wp--preset--font-size--small, 0.9rem);
    color: var(--wp--preset--color--tertiary, #757575);
    min-height: 1.4em;
    transition: opacity 0.3s ease;
}

.toe-energy-dashboard__loading-message--fade {
    opacity: 0;
}

.toe-energy-dashboard__loading-bar {
    width: min(280px, 60vw);
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.toe-energy-dashboard__loading-bar-fill {
    width: 40%;
    height: 100%;
    background: var(--wp--preset--color--primary, #296DEB);
    border-radius: 2px;
    animation: toe-loading-slide 1.5s ease-in-out infinite;
}

@keyframes toe-loading-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ── Lazy section skeletons ─────────────────────────────────────────────── */

@keyframes toe-skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.toe-energy-dashboard__section--lazy .toe-energy-dashboard__skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: var(--wp--preset--spacing--40, 1rem);
}

.toe-energy-dashboard__skeleton-line {
    border-radius: 4px;
    background: linear-gradient(90deg, #1a1d24 25%, #2a2d34 50%, #1a1d24 75%);
    background-size: 800px 100%;
    animation: toe-skeleton-shimmer 1.5s ease-in-out infinite;
}

.toe-energy-dashboard__skeleton-line--tag {
    width: 40%;
    height: 0.75rem;
}

.toe-energy-dashboard__skeleton-line--title {
    width: 80%;
    height: 1rem;
}

.toe-energy-dashboard__skeleton-line--value {
    width: 50%;
    height: 1.5rem;
}

.toe-energy-dashboard__skeleton-block {
    height: 400px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1a1d24 25%, #2a2d34 50%, #1a1d24 75%);
    background-size: 800px 100%;
    animation: toe-skeleton-shimmer 1.5s ease-in-out infinite;
}

.toe-energy-dashboard__section--loading {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toe-energy-dashboard__section--error .toe-energy-dashboard__skeleton-card,
.toe-energy-dashboard__section--error .toe-energy-dashboard__skeleton-block {
    animation: none;
    background: #1a1d24;
    opacity: 0.4;
}

/* ── Sidebar News ─────────────────────────────────────────────── */

.toe-sidebar-news__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.toe-sidebar-news__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: var(--wp--preset--spacing--30) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.toe-sidebar-news__item:last-child {
    border-bottom: none;
}

.toe-sidebar-news__source {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp--preset--color--primary);
}

.toe-sidebar-news__title {
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    line-height: 1.35;
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.toe-sidebar-news__title:hover {
    color: var(--wp--preset--color--primary);
}

.toe-sidebar-news__date {
    font-size: var(--wp--preset--font-size--x-small);
    color: var(--wp--preset--color--tertiary);
}

/* Sidebar News — dark */
.toe-sidebar-news[data-scheme="dark"] .toe-sidebar-news__item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.toe-sidebar-news[data-scheme="dark"] .toe-sidebar-news__source {
    color: #00b4d8;
}

.toe-sidebar-news[data-scheme="dark"] .toe-sidebar-news__title {
    color: #e2e8f0;
}

.toe-sidebar-news[data-scheme="dark"] .toe-sidebar-news__title:hover {
    color: #00b4d8;
}

/* ── Sidebar Price Charts ─────────────────────────────────────── */

.toe-sidebar-charts__list {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--40);
}

.toe-sidebar-charts__range-selector {
    display: flex;
    gap: 0.25rem;
}

.toe-sidebar-charts__range-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--wp--preset--color--tertiary);
    font-family: Manrope, sans-serif;
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.toe-sidebar-charts__range-btn:hover {
    border-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);
}

.toe-sidebar-charts__range-btn--active {
    background: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    color: #fff;
}

.toe-sidebar-charts__change-label {
    font-weight: 400;
    color: var(--wp--preset--color--tertiary);
    margin-inline-start: 0.3em;
}

.toe-sidebar-charts__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toe-sidebar-charts__header {
    display: flex;
    align-items: baseline;
    gap: var(--wp--preset--spacing--30);
    flex-wrap: wrap;
}

.toe-sidebar-charts__name {
    font-size: var(--wp--preset--font-size--small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--wp--preset--color--tertiary);
}

.toe-sidebar-charts__price {
    font-family: Orbitron, sans-serif;
    font-size: var(--wp--preset--font-size--large);
    font-weight: 800;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
}

.toe-sidebar-charts__currency {
    font-size: 0.7em;
    font-weight: 600;
    vertical-align: super;
    margin-inline-end: 0.05em;
    color: var(--wp--preset--color--primary);
}

.toe-sidebar-charts__change {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 600;
    margin: 0;
}

.toe-sidebar-charts__change--up {
    color: #00c853;
}

.toe-sidebar-charts__change--down {
    color: #ff1744;
}

.toe-sidebar-charts__change--flat {
    color: var(--wp--preset--color--tertiary);
}

.toe-sidebar-charts__chart {
    margin-top: 0.25rem;
}

.toe-sidebar-charts__chart svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Sidebar Charts — dark */
.toe-sidebar-charts[data-scheme="dark"] .toe-sidebar-charts__price {
    color: #f0a500;
}

.toe-sidebar-charts[data-scheme="dark"] .toe-sidebar-charts__currency {
    color: #00b4d8;
}
