/* Resources-owned prepared insert; reused unchanged by Admin and public News. */
.editorial-chart { --trade-export: #164a72; --trade-import: #987018; margin: 1.5rem 0; padding: 1rem; border: 1px solid #ccd4dd; border-radius: .5rem; color: #172d43; background: #f7f9fb; overflow-wrap: anywhere; }
/* Explicit roles beat the public H2/H3 scale, so a chart never outranks the body section around it. */
.public-site .editorial-chart :is(.editorial-chart__subtitle, .trade-section__nested-title) { font-size: 1.1rem; line-height: 1.3; }
.editorial-chart .editorial-chart__title { margin: 0 0 .5rem; font-size: 1.35rem; line-height: 1.35; }
.editorial-chart__legend p { margin: .5rem 0; }
.editorial-chart__key::before { content: ""; display: inline-block; width: .8rem; height: .8rem; margin-right: .5rem; }
.editorial-chart__key--1::before { background: var(--trade-export); }
.editorial-chart__key--2::before { background: var(--trade-import); }
.editorial-chart__bar--1 { fill: var(--trade-export); }
.editorial-chart__bar--2 { fill: var(--trade-import); }
.editorial-chart__plot { display: block; width: 100%; max-width: 42rem; height: auto; }
.editorial-chart__table-wrap { max-width: 100%; }
.editorial-chart table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .95rem; }
.editorial-chart caption { text-align: left; margin: .5rem 0; }
.editorial-chart th, .editorial-chart td { padding: .6rem .4rem; border-bottom: 1px solid #ccd4dd; text-align: left; overflow-wrap: anywhere; vertical-align: top; }
.editorial-chart td { font-variant-numeric: tabular-nums; }
.editorial-chart__source { font-size: .9rem; line-height: 1.5; }
.editorial-chart a { color: #164a72; text-decoration: underline; }
.editorial-chart--series .editorial-chart__table-wrap { overflow-x: auto; margin-block: 1rem; }
.editorial-chart--series table { min-width: 42rem; table-layout: auto; }
.editorial-chart--series th { overflow-wrap: normal; }
.editorial-chart--series th[scope="row"] { white-space: nowrap; }
.editorial-chart--series td { white-space: nowrap; }
.editorial-chart--series td small { display: block; color: #405368; }
.editorial-chart--series .trade-section { margin-block: 1rem; }
.editorial-chart--series .trade-product-list { padding-inline-start: 0; }
.editorial-chart--series td.editorial-chart__product-name { min-width: 16rem; max-width: 24rem; white-space: normal; }
.editorial-chart__scroll-hint { display: none; }
@media (max-width: 40rem) {
    .editorial-chart__history:not(.editorial-chart__history--compact) .editorial-chart__plot { min-width: 50rem; max-width: none; }
    .editorial-chart__scroll-hint { display: block; font-size: .9rem; }
}

/* The same frozen SVG paths, with HTML axes that do not shrink with the plot. */
.editorial-chart__history--compact { container-type: inline-size; margin-block: 1.75rem; }
.trade-history-compact { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); grid-template-rows: 12rem auto; gap: .75rem .5rem; padding-right: 1.25rem; }
.trade-history-compact__y { display: flex; flex-direction: column; justify-content: space-between; font-size: .9rem; font-variant-numeric: tabular-nums; }
.trade-history-compact__y > span { display: flex; height: 0; align-items: center; justify-content: flex-end; white-space: nowrap; }
.editorial-chart .trade-history-compact__plot { width: 100%; max-width: none; height: 12rem; border: 0; overflow: visible; }
.trade-history-compact__plot .trade-chart__line { vector-effect: non-scaling-stroke; stroke-width: 3; }
.trade-history-compact__plot .trade-chart__grid { vector-effect: non-scaling-stroke; }
.trade-history-compact__years { grid-column: 2; display: flex; justify-content: space-between; min-height: 1.5rem; font-size: 1rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.trade-history-compact__tick { flex: 0 0 4ch; margin-inline: -2ch; text-align: center; }
.trade-history-compact__tick > span { white-space: nowrap; }
@container (max-width: 16rem) {
    .trade-history-compact__years { min-height: 3rem; }
    .trade-history-compact__tick--alternate { padding-top: 1.5rem; }
}
.editorial-chart__units { font-size: .95rem; }
.editorial-chart__exact { margin-block: 1rem; border-block-start: 1px solid #ccd4dd; }
.editorial-chart__exact > summary { padding-block: .75rem; font-weight: 600; cursor: pointer; }
.editorial-chart :is(summary, a, [tabindex]):focus-visible { outline: 2px solid #164a72; outline-offset: 3px; }
.editorial-chart__comparison { margin-block: 1.25rem; }
.editorial-chart__comparison-row { margin-block: .75rem; }
.editorial-chart__comparison-row p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin: 0 0 .25rem; font-variant-numeric: tabular-nums; }
.editorial-chart__comparison-row .editorial-chart__plot { height: 1.5rem; max-width: none; }
.editorial-chart__bar--export { fill: var(--trade-export); }
.editorial-chart__bar--import { fill: var(--trade-import); }
.editorial-chart__bar--prior { fill-opacity: .65; }
.editorial-chart__baseline { stroke: #405368; stroke-width: 1; vector-effect: non-scaling-stroke; }
.editorial-chart__unit { font-weight: 400; }
/* Optional compact use of the shared product row; explorer defaults stay intact. */
.editorial-chart .trade-product-list--editorial li { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
.editorial-chart .trade-product-list--editorial .trade-product-list__value { grid-column: 1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; text-align: left; }
.editorial-chart .trade-product-list--editorial .trade-product-list__value small { font-size: .9rem; text-align: right; }
.editorial-chart .trade-product-list--editorial .trade-product-list__share { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; }
.editorial-chart .trade-product-list--editorial .trade-product-list__value strong { font-size: 1rem; }
@media (max-width: 40rem) {
    .editorial-chart .trade-product-list--editorial .trade-product-list__value { grid-template-columns: minmax(0, 1fr); }
    .editorial-chart .trade-product-list--editorial .trade-product-list__value small { grid-row: 2; text-align: left; }
    .editorial-chart .trade-product-list--editorial .trade-product-list__share { grid-row: 3; }
}
