/* === Explore page (Global Macro Database) ===
   Adapted from the U.S. State Macro History explorer. Design tokens below map
   the component palette onto GMD's blue brand colours (see styles.css). */
:root {
  /* Match GMD's blue brand (see --blue / --blue-dark in styles.css) so the
     Explore UI shares the site's accent rather than a stray Bootstrap blue. */
  --accent: #0074F0;
  --accent-dark: #005ec4;
  --text: #1d2733;
  --text-muted: #5b6b7b;
  --border: #e1e7ec;
  --bg-tinted: #f0f8ff;
  /* --mono inherited from styles.css (richer fallback stack); don't redefine. */
}

/* The Explore widget lives inside .container, whose global `ul`/`li` rules
   (disc bullets, 2em indent, 1.5em bottom margin) would otherwise bloat the
   dropdown lists. Reset list styling inside the widget; component rules below
   re-add the padding each list/option actually wants. */
#explore ul { list-style: none; margin: 0; padding: 0; }
/* NB: no `font-size` here — its ID specificity would override the component
   option rules (.combobox-option etc.) and bloat the dropdowns to 16px. */
#explore li { margin: 0; }

.explore-controls {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  margin: 16px 0 20px;
}
.compare-toggle { grid-column: 1 / -1; display: inline-flex; justify-self: start; gap: 4px; background: #eef2f7; padding: 3px; border-radius: 8px; margin-bottom: 12px; }
.compare-toggle button { border: 0; background: transparent; padding: 6px 14px; border-radius: 6px; font: inherit; font-weight: 600; color: #41506b; cursor: pointer; }
.compare-toggle button[aria-selected="true"] { background: var(--accent-dark); color: #fff; }
/* min-width:0 lets the 1fr grid track shrink below the combobox's long,
   non-wrapping value so it ellipsis-truncates instead of overflowing the
   viewport on narrow screens. */
.explore-field { display: block; position: relative; min-width: 0; }
.explore-field[hidden] { display: none; }
.explore-field > span,
.explore-field-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.explore-states-limit {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

/* Income-group filter bar inside the country dropdown, under the search box */
.ms-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tinted);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.ms-filterbar select {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}
.ms-filterbar select:focus { outline: none; border-color: var(--accent); }

/* === Combobox (filterable dropdown) === */
.combobox { position: relative; }
.combobox-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.combobox-toggle:hover { border-color: #b5b5b5; }
.combobox.open .combobox-toggle {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}
.combobox-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combobox-current.placeholder { color: var(--text-muted); }
.combobox-arrow {
  flex: none;
  margin-left: 10px;
  color: var(--text-muted);
  transition: transform 0.12s ease;
}
.combobox.open .combobox-arrow { transform: rotate(180deg); }

.combobox-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  z-index: 50;
  overflow: hidden;
}
.combobox-search {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--bg-tinted);
}
.combobox-search:focus { background: #fff; }
.combobox-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 300px;
  overflow-y: auto;
}
/* #explore prefix: out-specify the global `.container li { font-size: 1rem }`
   (styles.css), which would otherwise bloat these dropdown rows to 16px. */
#explore .combobox-group-label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  cursor: default;
}
#explore .combobox-option {
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}
.combobox-option.highlighted { background: var(--accent); color: #fff; }
/* Variables that carry per-source data (Sources mode) get a subtle pill so they
   stand out in the picker without crowding the label. */
.combobox-option.has-sources::after {
  content: 'sources';
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 0, 0, .06);
  vertical-align: 1px;
}
.combobox-option.has-sources.highlighted::after {
  color: #fff;
  background: rgba(255, 255, 255, .25);
}
#explore .combobox-empty {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* === Multi-select (countries, max-N) === */
.ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.ms-option.ms-disabled { opacity: 0.35; cursor: not-allowed; }
.ms-option.ms-checked { color: var(--accent); font-weight: 500; }
.ms-box {
  flex: none;
  width: 14px; height: 14px;
  border: 1.5px solid #c0c0c0;
  border-radius: 3px;
  background: #fff;
  position: relative;
  transition: background 0.1s, border-color 0.1s;
}
.ms-option.ms-checked .ms-box {
  background: var(--accent);
  border-color: var(--accent);
}
.ms-option.ms-checked .ms-box::after {
  content: "";
  position: absolute;
  left: 3px; top: -1px;
  width: 4px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ms-option:hover:not(.ms-disabled) { background: var(--bg-tinted); }
.ms-option.highlighted { background: transparent; }
.ms-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0 4px 0 auto;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  flex: none;
  transition: background 0.1s, color 0.1s;
  user-select: none;
}
.ms-clear:hover { background: var(--bg-tinted); color: var(--text); }
.ms-clear[hidden] { display: none; }
.ms-toggle .combobox-current {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* === Chart caption + FRED-style metadata strip === */
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  margin: 0 0 8px;
}
.chart-title-block {
  min-width: 0;
  flex: 1 1 auto;
  height: 40px;
  overflow: hidden;
}
#explore .chart-caption {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Active transformations shown as compact pills under the title, so the
   variable name stays clean no matter how many transforms are applied.
   The row keeps a fixed min-height (one pill tall) even when empty, so
   toggling a display option doesn't shift the metadata box up or down. */
.chart-transforms {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  height: 20px;
  min-height: 20px;
  margin: 1px 0 0;
  overflow: hidden;
}
.transform-pill {
  display: inline-block;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--accent-dark);
  background: var(--bg-tinted);
  border: 1px solid #cfe2f9;
  border-radius: 999px;
  white-space: nowrap;
}

.chart-metadata {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 0 8px;
  padding: 16px 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.chart-metadata > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 0; }
.chart-metadata dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chart-metadata dd { margin: 0; font-size: 13px; color: var(--text); }
#metaSeriesId { font-family: var(--mono); font-size: 12.5px; }
#metaCoverage,
#metaLatest,
#metaUpdated {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
#metaLatest span + span,
#metaUpdated span + span { color: var(--text-muted); }

/* === Source coverage panel === */
.coverage-panel {
  --coverage-label-width: clamp(220px, 34%, 360px);
  margin: 14px 0 4px;
}
.coverage-panel[hidden] { display: none; }
.coverage-title { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 6px; }
.coverage-summary { font-size: 13px; color: var(--text); margin: 0 0 8px; }
.coverage-grid { display: grid; gap: 4px 12px; }
.coverage-density-row,
.coverage-axis-row,
.coverage-tl-row {
  display: grid;
  grid-template-columns: var(--coverage-label-width) minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
}
.coverage-density-row { margin: 0 0 2px; }
.coverage-axis-row { margin: 0 0 8px; }
.coverage-strip { width: 100%; height: 10px; display: block; }
.coverage-density-label {
  font-weight: 600;
  color: var(--text);
}
.coverage-strip-cell { cursor: default; }
.coverage-strip-cell:hover { stroke: #004f9f; stroke-width: 0.25; }
.coverage-axis {
  position: relative;
  height: 20px;
  border-top: 1px solid var(--border);
}
.coverage-axis-tick {
  position: absolute;
  top: -4px;
  width: 1px;
  height: 6px;
  background: var(--border);
}
.coverage-axis-tick span {
  position: absolute;
  top: 7px;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 1;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coverage-axis-tick:first-child span { transform: translateX(0); }
.coverage-axis-tick:last-child span { transform: translateX(-100%); }
.coverage-tl-row { margin: 2px 0; font-size: 12px; }
.coverage-tl-label {
  min-width: 0;
  text-align: left;
  color: var(--text-muted);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
}
.coverage-spacer { align-self: stretch; }
.coverage-tl-track { position: relative; min-width: 0; height: 12px; background: #f1f4f8; border-radius: 3px; }
.coverage-tl-bar { position: absolute; top: 0; height: 12px; border-radius: 3px; cursor: default; }
.coverage-tl-bar:hover { box-shadow: 0 0 0 2px rgba(0, 98, 204, 0.18); }

/* === Time range bar === */
.time-range-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 16px;
  font-size: 13px;
}
.time-range-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.time-range-presets {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.time-range-presets button {
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.time-range-presets button:first-child { border-left: 0; }
.time-range-presets button:hover { background: var(--bg-tinted); color: var(--text); }
.time-range-presets button.active { background: var(--accent); color: #fff; }
.time-range-inputs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.time-range-inputs input {
  width: 70px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
  background: #fff;
  color: var(--text);
}
.time-range-inputs input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

/* === Chart === */
.chart-wrap { position: relative; }
.chart-hover-dots {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  display: none;
  z-index: 3;
}
.explore-chart {
  display: block;
  width: 100%;
  padding: 8px 0 0;
  background: #fff;
}

/* === Chart toolbar === */
.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 16px 0 16px;
  flex-wrap: wrap;
}
.chart-toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chart-toolbar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.chart-toolbar-actions { position: relative; }
@media (min-width: 769px) {
  .chart-toolbar-actions { padding-left: 10px; }
  .chart-toolbar-actions::before {
    content: "";
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 1px;
    background: var(--border);
  }
}
.chart-toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.chart-toolbar-toggle::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #cfcfcf;
  transition: background 0.12s;
}
.chart-toolbar-toggle[hidden] { display: none; }
.chart-toolbar-toggle:hover { border-color: var(--accent); color: var(--accent); }
.chart-toolbar-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 123, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.chart-toolbar-toggle.active::before { background: var(--accent); }
.chart-download { position: relative; }
.chart-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
/* Reserve room for the widest label ("Link copied") and centre the text so the
   button keeps a constant width when the label swaps on click. */
.chart-share-btn span { min-width: 5.7em; text-align: center; }
.chart-share-btn:hover { border-color: var(--accent); color: var(--accent); }
.chart-share-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.chart-download-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.chart-download-toggle:hover { border-color: var(--accent); color: var(--accent); }
.chart-download.open .chart-download-toggle {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.12);
}
.chart-download-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  margin: 0;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  min-width: 240px;
  z-index: 30;
}
.chart-download-menu ul { list-style: none; margin: 0; padding: 0; }
.chart-download-section {
  margin: 4px 0 2px;
  padding: 6px 12px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chart-download-section + ul + .chart-download-section {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 6px;
}
.chart-download-menu li { margin: 0; }
.chart-download-menu button {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
}
.chart-download-menu button:hover { background: var(--bg-tinted); }

/* Subtle "Report error" pill aligned with the chart title. */
.chart-report-btn {
  position: static;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.12s, background 0.12s, border-color 0.12s, color 0.12s;
}
.chart-report-btn:hover,
.chart-report-btn:focus-visible {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 600px) {
  /* Drop to an icon-only button on narrow screens so it doesn't crowd the plot. */
  .chart-report-btn span { display: none; }
  .chart-report-btn { padding: 5px; }
  /* The 5 metadata fields share one flex row via `flex: 1 1 0`; on a phone that
     squeezes each column to ~50px and the values collide. Give each a half-width
     basis so they wrap to a readable 2-column grid instead. */
  .chart-metadata > div { flex: 1 1 calc(50% - 12px); }
}

/* === Report-error dialog === */
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.report-modal[hidden] { display: none; }
.report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 43, 86, 0.45);
}
.report-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  padding: 22px 24px 24px;
}
.report-dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
}
.report-dialog-close:hover { background: var(--bg-tinted); color: var(--text); }
.report-dialog-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}
.report-dialog-intro {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.report-field-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.report-field-label:first-of-type { margin-top: 0; }
.report-select {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  padding: 8px 34px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
}
.report-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.12);
}
#reportText {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  resize: vertical;
  min-height: 96px;
}
#reportText:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.12);
}
#reportText.invalid { border-color: #d64545; }
/* .report-dialog scope out-specifies the global `.container p { font-size: 1.02rem }`. */
.report-dialog .report-context {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}
.report-turnstile:not(:empty) { margin-top: 14px; }
.report-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.report-btn-secondary,
.report-btn-primary {
  padding: 8px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.report-btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.report-btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.report-btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}
.report-btn-primary:hover { filter: brightness(0.95); }
.report-btn-primary:disabled { opacity: 0.6; cursor: default; filter: none; }
.report-status {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.report-status[hidden] { display: none; }
.report-status.ok { color: #1c7c4a; }
.report-status.err { color: #d64545; }

/* === Custom multi-country chart tooltip === */
.chart-tooltip {
  display: none;
  position: fixed;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 8px 12px 9px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: #222;
  pointer-events: none;
  z-index: 1000;
  max-width: 340px;
}
.chart-tooltip .tt-header {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  padding: 0;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
/* Reset the site's global table styling (borders, box-shadow, zebra rows,
   60% width) which would otherwise leak into the tooltip's table and draw an
   ugly grid of cell borders inside the hover card. */
.chart-tooltip table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  font-size: inherit;
}
.chart-tooltip th,
.chart-tooltip td { border: 0; background: transparent; }
.chart-tooltip tr:nth-child(even),
.chart-tooltip tr:hover { background: transparent; }
.chart-tooltip .tt-table { border-collapse: collapse; width: 100%; }
.chart-tooltip .tt-table td { padding: 2px 0; vertical-align: middle; }
.chart-tooltip .tt-dot { font-size: 14px; line-height: 1; padding-right: 8px; width: 1em; }
.chart-tooltip .tt-state { padding-right: 28px; min-width: 120px; white-space: nowrap; color: #555; }
.chart-tooltip .tt-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; color: #111; padding-left: 8px; }
.chart-tooltip .tt-single {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  white-space: nowrap;
}
.chart-tooltip .tt-single .tt-year { font-weight: 600; color: #333; font-variant-numeric: tabular-nums; }
.chart-tooltip .tt-single .tt-state { font-weight: 500; }
.chart-tooltip .tt-single .tt-state::after { content: ":"; color: var(--text-muted); }
.chart-tooltip .tt-single .tt-val { font-weight: 600; font-variant-numeric: tabular-nums; color: #111; }

.explore-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 380px;
  color: var(--text-muted);
  font-size: 14px;
}
.explore-status {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* Notice shown when a transform can't be applied (e.g. Index = 100 with no
   overlapping years). Amber, sits in the gap above the chart. */
.explore-notice {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #8a5a00;
  background: #fff8e6;
  border: 1px solid #f1d99b;
  border-radius: 6px;
}
.explore-notice[hidden] { display: none; }
#sourceNote { grid-column: 1 / -1; margin: 0; }
#sourceNote.explore-notice {
  padding: 6px 10px;
  line-height: 1.25;
  font-size: 14px; /* match the combobox dropdowns above */
}

@media (max-width: 768px) {
  .explore-controls { grid-template-columns: 1fr; gap: 14px; }
  .coverage-panel { --coverage-label-width: minmax(130px, 42%); }
  .chart-header { gap: 8px; }
  .chart-toolbar { flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .chart-toolbar-toggle, .chart-download-toggle { padding: 5px 9px; font-size: 12px; }
  #explore .chart-caption { font-size: 14px; }
  .chart-tooltip { font-size: 11px; padding: 6px 10px 7px; max-width: 280px; }
  .chart-tooltip .tt-state { min-width: 90px; padding-right: 16px; }
}
