/* Embed-specific layout only; all colour roles come from embed v1 + ERM. */
[hidden] { display: none !important; }
.ef-embed { padding-bottom: 0; }
main, .controls, .view-controls, .chart-panel, .indicator-control { min-width: 0; }
.controls { display: grid; gap: .875rem; margin-bottom: var(--spacing-flow-default); max-width: 90ch; }
.indicator-label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
#indicatorCount { font-size: .875rem; }
.indicator-nav { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem; gap: .5rem; }
.indicator-step.ef-button { padding: .35rem; }
.indicator-step.ef-button > svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.indicator-control .ef-select { width: 100%; }
.breakdown-control { border: 0; padding: 0; margin: 0; min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.ef-chip, .ef-button { min-height: 2.25rem; height: auto; white-space: normal; padding: .4rem .8rem; }
.ef-select { min-height: 2.25rem; height: auto; padding-block: .4rem; }
.ef-label { line-height: 1.3; }
.view-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; }
.view-options { flex-wrap: wrap; flex-shrink: 0; gap: 1.25rem; overflow: visible; border-bottom: 0; }
.view-options .ef-tab { padding: .65rem .25rem .55rem; min-height: 2.25rem; font-size: .9375rem; }
.country-filter, .year-filter { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.country-filter { position: relative; }
.country-filter > .ef-label, .year-filter > .ef-label { margin: 0; flex-shrink: 0; }
.country-filter > .ef-select { width: 14rem; }
#countryCount { min-width: 0; overflow-wrap: anywhere; text-align: left; }
.country-name { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; }
.country-name > span { min-width: 0; overflow-wrap: anywhere; }
.country-flag { display: block; width: 24px; height: 18px; flex-shrink: 0; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / 6%); }
.year-filter > .ef-select { width: 7rem; }
.year-play.ef-button { width: 2.25rem; flex-shrink: 0; padding: .4rem; }
.year-play svg { display: block; width: 1rem; height: 1rem; margin: auto; fill: currentColor; }
.year-play .pause-icon, .year-play[aria-pressed="true"] .play-icon { display: none; }
.year-play[aria-pressed="true"] .pause-icon { display: block; }
.country-panel { position: absolute; top: calc(100% + .5rem); left: 0; width: 100%; z-index: 10; }
.country-search { width: 100%; min-height: 2.25rem; background: var(--field); color: var(--field-foreground); border: 1px solid var(--field-border); border-radius: calc(var(--radius) - 2px); padding: .4rem .6rem; }
.country-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-block: .5rem; font-size: .875rem; }
.country-list { max-height: 18rem; overflow: auto; padding: .25rem; }
.country-option { display: flex; gap: .6rem; align-items: center; min-height: 2.25rem; padding: .35rem; border-radius: calc(var(--radius) - 2px); cursor: pointer; }
.country-option:hover { background: var(--hover); }
.country-option input { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.country-option:has(input:disabled) { color: var(--muted-foreground); cursor: default; }
.chart-panel { padding-top: .75rem; }
#chart { position: relative; width: 100%; min-width: 0; height: 39.1rem; }
.map-range-legend { position: absolute; inset: 0; pointer-events: none; }
.map-range-button { position: absolute; display: block; padding: 0; border: 0; border-radius: 0; background: transparent; pointer-events: auto; cursor: pointer; }
.map-range-button::after { content: ''; position: absolute; inset: 1px 5px; border-block: 1px solid var(--background); }
.map-range-button.is-active::after, .map-range-button:focus-visible::after { outline: 2px solid var(--heading); outline-offset: 1px; }
.map-range-button:focus-visible { outline: none; }
.map-range-hint { position: absolute; color: var(--heading); font-family: var(--font-roboto); font-size: 1rem; font-weight: 600; text-align: center; pointer-events: none; }
#status { margin-bottom: var(--spacing-flow-default); max-width: 75ch; }
#status:empty { display: none; }
#retry { margin-bottom: var(--spacing-flow-default); }
.view-notes { font-size: .9375rem; }
.view-notes p { margin-block: .75rem 0; }
.footnote-segment + .footnote-segment { margin-inline-start: .75rem; }
.ef-tooltip { max-width: min(28rem, 85vw); white-space: normal; font-size: .875rem; }
.ef-tooltip p { margin: .3rem 0; }
.poverty-tooltip { width: 18rem; max-width: calc(100vw - 24px); padding: .75rem 1rem; box-shadow: var(--shadow-header); }
.tooltip-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.tooltip-heading > strong { color: var(--heading); font-size: 1rem; }
.tooltip-items { max-height: min(26rem, 55vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.tooltip-items:focus-visible { outline: 2px solid var(--foreground); outline-offset: -2px; }
.tooltip-item { padding-block: .32rem; }
.tooltip-item:last-child { padding-bottom: .15rem; }
.tooltip-item-heading { color: var(--heading); }
.tooltip-item-name { overflow-wrap: anywhere; line-height: 1.3; }
.tooltip-item-value { color: var(--neutral-900); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
[data-theme="dark"] .tooltip-track > .tooltip-item-value { color: var(--foreground); }
/* All items share a proportional scale, with space for the largest value label. */
.tooltip-bar { margin-top: .2rem; padding-right: 4.25rem; background: var(--map-no-data); }
.tooltip-track { position: relative; height: 1.2rem; }
.tooltip-fill { display: block; height: 100%; box-shadow: inset 0 0 0 1px currentColor; }
.tooltip-track > .tooltip-item-value { position: absolute; top: 0; height: 100%; margin-left: .5rem; display: flex; align-items: center; }
.tooltip-no-data { display: block; margin-top: .2rem; color: var(--muted-foreground); }
.tooltip-flag { margin-top: .35rem; color: var(--muted-foreground); font-size: .75rem; line-height: 1.3; }
.highcharts-point:focus-visible { outline-offset: -3px; }
.highcharts-map-navigation .highcharts-button-symbol { stroke: var(--foreground); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
  .view-controls { gap: .75rem; }
  .view-options { width: 100%; justify-content: space-between; gap: .75rem; }
  .country-filter, .year-filter { width: 100%; }
  .country-filter > .ef-select, .year-filter > .ef-select { flex: 1; min-width: 0; width: auto; }
  #chart { height: 34.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

