/* =====================================================================
   Exchange "Economy" tab - realm economy charts
   Chart frame, axes, tooltip and toggle come from market-trade-chart.css;
   this file only adds the layout and the series colours.
   Series colours are the --econ-series-* tokens in base.css (validated with
   the dataviz palette checker on --surface-base, worst adjacent CVD ΔE 17.3).
   ===================================================================== */

.econ-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 24px;
    margin-top: 4px;
}

.econ-chart-page {
    min-width: 0;
}

.econ-chart-page .mkt-trade-chart-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.econ-chart-wrap--mastery {
    aspect-ratio: 560 / 210;
}

/* Stacked segments: a 1px surface edge keeps adjacent fills apart. */
.econ-sink-bar,
.econ-mastery-bar {
    stroke: var(--surface-base);
    stroke-width: 1;
}

.econ-sink-bar--tax,
.econ-mastery-bar--experience,
.econ-legend--tax::before,
.econ-legend--experience::before {
    fill: var(--econ-series-1);
    background: var(--econ-series-1);
}

.econ-sink-bar--listing,
.econ-mastery-bar--yield,
.econ-legend--listing::before,
.econ-legend--yield::before {
    fill: var(--econ-series-2);
    background: var(--econ-series-2);
}

.econ-sink-bar--realm,
.econ-legend--realm::before {
    fill: var(--econ-series-3);
    background: var(--econ-series-3);
}

.econ-sink-bar--supply,
.econ-legend--supply::before {
    fill: var(--econ-series-4);
    background: var(--econ-series-4);
}

/* Window-start total per mastery: a gold tick across the bar. */
.econ-mastery-baseline {
    stroke: var(--text-gold);
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}

.econ-legend--baseline::before {
    width: 0.85rem;
    height: 2px;
    border-radius: 0;
    background: var(--text-gold);
}

.econ-chart-page .mkt-trade-chart-footnote:empty {
    display: none;
}

.econ-chart-page .empty-state {
    border: 1px dashed var(--market-chart-grid);
    border-radius: 4px;
}

/* Gold in Circulation spans the row; economyCharts widens its viewBox to match. */
.econ-chart-page--gold {
    grid-column: 1 / -1;
}
