/* ===== Design tokens ===== */
:root {
  --surface-page: #f9f9f7;
  --surface-chart: #fcfcfb;
  --surface-card: #ffffff;
  --ink-primary: #0b0b0b;
  --ink-secondary: #52514e;
  --ink-muted: #898781;
  --ink-grid: #e1e0d9;
  --ink-line: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --origin-foreign: #2a78d6;
  --origin-russian: #eb6834;
  --bg-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='144'%3E%3Cpath d='M0 24.0 L5 25.14 L10 26.25 L15 27.32 L20 28.33 L25 29.24 L30 30.05 L35 30.73 L40 31.28 L45 31.68 L50 31.92 L55 32.0 L60 31.92 L65 31.68 L70 31.28 L75 30.73 L80 30.05 L85 29.24 L90 28.33 L95 27.32 L100 26.25 L105 25.14 L110 24.0 L115 22.86 L120 21.75 L125 20.68 L130 19.67 L135 18.76 L140 17.95 L145 17.27 L150 16.72 L155 16.32 L160 16.08 L165 16.0 L170 16.08 L175 16.32 L180 16.72 L185 17.27 L190 17.95 L195 18.76 L200 19.67 L205 20.68 L210 21.75 L215 22.86 L220 24.0' stroke='%23c3c2b7' stroke-width='1' fill='none' opacity='.55'/%3E%3Cpath d='M0 72.0 L5 73.14 L10 74.25 L15 75.32 L20 76.33 L25 77.24 L30 78.05 L35 78.73 L40 79.28 L45 79.68 L50 79.92 L55 80.0 L60 79.92 L65 79.68 L70 79.28 L75 78.73 L80 78.05 L85 77.24 L90 76.33 L95 75.32 L100 74.25 L105 73.14 L110 72.0 L115 70.86 L120 69.75 L125 68.68 L130 67.67 L135 66.76 L140 65.95 L145 65.27 L150 64.72 L155 64.32 L160 64.08 L165 64.0 L170 64.08 L175 64.32 L180 64.72 L185 65.27 L190 65.95 L195 66.76 L200 67.67 L205 68.68 L210 69.75 L215 70.86 L220 72.0' stroke='%23c3c2b7' stroke-width='1' fill='none' opacity='.55'/%3E%3Cpath d='M0 120.0 L5 121.14 L10 122.25 L15 123.32 L20 124.33 L25 125.24 L30 126.05 L35 126.73 L40 127.28 L45 127.68 L50 127.92 L55 128.0 L60 127.92 L65 127.68 L70 127.28 L75 126.73 L80 126.05 L85 125.24 L90 124.33 L95 123.32 L100 122.25 L105 121.14 L110 120.0 L115 118.86 L120 117.75 L125 116.68 L130 115.67 L135 114.76 L140 113.95 L145 113.27 L150 112.72 L155 112.32 L160 112.08 L165 112.0 L170 112.08 L175 112.32 L180 112.72 L185 113.27 L190 113.95 L195 114.76 L200 115.67 L205 116.68 L210 117.75 L215 118.86 L220 120.0' stroke='%23c3c2b7' stroke-width='1' fill='none' opacity='.55'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --surface-page: #0d0d0d;
    --surface-chart: #1a1a19;
    --surface-card: #17181a;
    --ink-primary: #ffffff;
    --ink-secondary: #c3c2b7;
    --ink-muted: #898781;
    --ink-grid: #2c2c2a;
    --ink-line: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --origin-foreign: #3987e5;
    --origin-russian: #d95926;
    --bg-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='144'%3E%3Cpath d='M0 24.0 L5 25.14 L10 26.25 L15 27.32 L20 28.33 L25 29.24 L30 30.05 L35 30.73 L40 31.28 L45 31.68 L50 31.92 L55 32.0 L60 31.92 L65 31.68 L70 31.28 L75 30.73 L80 30.05 L85 29.24 L90 28.33 L95 27.32 L100 26.25 L105 25.14 L110 24.0 L115 22.86 L120 21.75 L125 20.68 L130 19.67 L135 18.76 L140 17.95 L145 17.27 L150 16.72 L155 16.32 L160 16.08 L165 16.0 L170 16.08 L175 16.32 L180 16.72 L185 17.27 L190 17.95 L195 18.76 L200 19.67 L205 20.68 L210 21.75 L215 22.86 L220 24.0' stroke='%23383835' stroke-width='1' fill='none' opacity='.6'/%3E%3Cpath d='M0 72.0 L5 73.14 L10 74.25 L15 75.32 L20 76.33 L25 77.24 L30 78.05 L35 78.73 L40 79.28 L45 79.68 L50 79.92 L55 80.0 L60 79.92 L65 79.68 L70 79.28 L75 78.73 L80 78.05 L85 77.24 L90 76.33 L95 75.32 L100 74.25 L105 73.14 L110 72.0 L115 70.86 L120 69.75 L125 68.68 L130 67.67 L135 66.76 L140 65.95 L145 65.27 L150 64.72 L155 64.32 L160 64.08 L165 64.0 L170 64.08 L175 64.32 L180 64.72 L185 65.27 L190 65.95 L195 66.76 L200 67.67 L205 68.68 L210 69.75 L215 70.86 L220 72.0' stroke='%23383835' stroke-width='1' fill='none' opacity='.6'/%3E%3Cpath d='M0 120.0 L5 121.14 L10 122.25 L15 123.32 L20 124.33 L25 125.24 L30 126.05 L35 126.73 L40 127.28 L45 127.68 L50 127.92 L55 128.0 L60 127.92 L65 127.68 L70 127.28 L75 126.73 L80 126.05 L85 125.24 L90 124.33 L95 123.32 L100 122.25 L105 121.14 L110 120.0 L115 118.86 L120 117.75 L125 116.68 L130 115.67 L135 114.76 L140 113.95 L145 113.27 L150 112.72 L155 112.32 L160 112.08 L165 112.0 L170 112.08 L175 112.32 L180 112.72 L185 113.27 L190 113.95 L195 114.76 L200 115.67 L205 116.68 L210 117.75 L215 118.86 L220 120.0' stroke='%23383835' stroke-width='1' fill='none' opacity='.6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface-page: #0d0d0d;
  --surface-chart: #1a1a19;
  --surface-card: #17181a;
  --ink-primary: #ffffff;
  --ink-secondary: #c3c2b7;
  --ink-muted: #898781;
  --ink-grid: #2c2c2a;
  --ink-line: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --origin-foreign: #3987e5;
  --origin-russian: #d95926;
  --bg-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='144'%3E%3Cpath d='M0 24.0 L5 25.14 L10 26.25 L15 27.32 L20 28.33 L25 29.24 L30 30.05 L35 30.73 L40 31.28 L45 31.68 L50 31.92 L55 32.0 L60 31.92 L65 31.68 L70 31.28 L75 30.73 L80 30.05 L85 29.24 L90 28.33 L95 27.32 L100 26.25 L105 25.14 L110 24.0 L115 22.86 L120 21.75 L125 20.68 L130 19.67 L135 18.76 L140 17.95 L145 17.27 L150 16.72 L155 16.32 L160 16.08 L165 16.0 L170 16.08 L175 16.32 L180 16.72 L185 17.27 L190 17.95 L195 18.76 L200 19.67 L205 20.68 L210 21.75 L215 22.86 L220 24.0' stroke='%23383835' stroke-width='1' fill='none' opacity='.6'/%3E%3Cpath d='M0 72.0 L5 73.14 L10 74.25 L15 75.32 L20 76.33 L25 77.24 L30 78.05 L35 78.73 L40 79.28 L45 79.68 L50 79.92 L55 80.0 L60 79.92 L65 79.68 L70 79.28 L75 78.73 L80 78.05 L85 77.24 L90 76.33 L95 75.32 L100 74.25 L105 73.14 L110 72.0 L115 70.86 L120 69.75 L125 68.68 L130 67.67 L135 66.76 L140 65.95 L145 65.27 L150 64.72 L155 64.32 L160 64.08 L165 64.0 L170 64.08 L175 64.32 L180 64.72 L185 65.27 L190 65.95 L195 66.76 L200 67.67 L205 68.68 L210 69.75 L215 70.86 L220 72.0' stroke='%23383835' stroke-width='1' fill='none' opacity='.6'/%3E%3Cpath d='M0 120.0 L5 121.14 L10 122.25 L15 123.32 L20 124.33 L25 125.24 L30 126.05 L35 126.73 L40 127.28 L45 127.68 L50 127.92 L55 128.0 L60 127.92 L65 127.68 L70 127.28 L75 126.73 L80 126.05 L85 125.24 L90 124.33 L95 123.32 L100 122.25 L105 121.14 L110 120.0 L115 118.86 L120 117.75 L125 116.68 L130 115.67 L135 114.76 L140 113.95 L145 113.27 L150 112.72 L155 112.32 L160 112.08 L165 112.0 L170 112.08 L175 112.32 L180 112.72 L185 113.27 L190 113.95 L195 114.76 L200 115.67 L205 116.68 L210 117.75 L215 118.86 L220 120.0' stroke='%23383835' stroke-width='1' fill='none' opacity='.6'/%3E%3C/svg%3E");
  color-scheme: dark;
}
:root[data-theme="light"] {
  --surface-page: #f9f9f7;
  --surface-chart: #fcfcfb;
  --surface-card: #ffffff;
  --ink-primary: #0b0b0b;
  --ink-secondary: #52514e;
  --ink-muted: #898781;
  --ink-grid: #e1e0d9;
  --ink-line: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --origin-foreign: #2a78d6;
  --origin-russian: #eb6834;
  --bg-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='144'%3E%3Cpath d='M0 24.0 L5 25.14 L10 26.25 L15 27.32 L20 28.33 L25 29.24 L30 30.05 L35 30.73 L40 31.28 L45 31.68 L50 31.92 L55 32.0 L60 31.92 L65 31.68 L70 31.28 L75 30.73 L80 30.05 L85 29.24 L90 28.33 L95 27.32 L100 26.25 L105 25.14 L110 24.0 L115 22.86 L120 21.75 L125 20.68 L130 19.67 L135 18.76 L140 17.95 L145 17.27 L150 16.72 L155 16.32 L160 16.08 L165 16.0 L170 16.08 L175 16.32 L180 16.72 L185 17.27 L190 17.95 L195 18.76 L200 19.67 L205 20.68 L210 21.75 L215 22.86 L220 24.0' stroke='%23c3c2b7' stroke-width='1' fill='none' opacity='.55'/%3E%3Cpath d='M0 72.0 L5 73.14 L10 74.25 L15 75.32 L20 76.33 L25 77.24 L30 78.05 L35 78.73 L40 79.28 L45 79.68 L50 79.92 L55 80.0 L60 79.92 L65 79.68 L70 79.28 L75 78.73 L80 78.05 L85 77.24 L90 76.33 L95 75.32 L100 74.25 L105 73.14 L110 72.0 L115 70.86 L120 69.75 L125 68.68 L130 67.67 L135 66.76 L140 65.95 L145 65.27 L150 64.72 L155 64.32 L160 64.08 L165 64.0 L170 64.08 L175 64.32 L180 64.72 L185 65.27 L190 65.95 L195 66.76 L200 67.67 L205 68.68 L210 69.75 L215 70.86 L220 72.0' stroke='%23c3c2b7' stroke-width='1' fill='none' opacity='.55'/%3E%3Cpath d='M0 120.0 L5 121.14 L10 122.25 L15 123.32 L20 124.33 L25 125.24 L30 126.05 L35 126.73 L40 127.28 L45 127.68 L50 127.92 L55 128.0 L60 127.92 L65 127.68 L70 127.28 L75 126.73 L80 126.05 L85 125.24 L90 124.33 L95 123.32 L100 122.25 L105 121.14 L110 120.0 L115 118.86 L120 117.75 L125 116.68 L130 115.67 L135 114.76 L140 113.95 L145 113.27 L150 112.72 L155 112.32 L160 112.08 L165 112.0 L170 112.08 L175 112.32 L180 112.72 L185 113.27 L190 113.95 L195 114.76 L200 115.67 L205 116.68 L210 117.75 L215 118.86 L220 120.0' stroke='%23c3c2b7' stroke-width='1' fill='none' opacity='.55'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* ===== Reset & base ===== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--surface-page);
  color: var(--ink-primary);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: 100%;
}
body {
  background-image: var(--bg-texture);
  background-repeat: repeat;
}
/* overflow-x:hidden on body (rather than just html) forces its overflow-y
   to "auto" too, turning body into its own scroll container -- since the
   page actually scrolls at the html/viewport level, that mismatch is what
   breaks position:sticky on .topbar below. */
html { overflow-x: hidden; scroll-behavior: smooth; }
#by-good, #ranked, #site-footer { scroll-margin-top: var(--topbar-h, 70px); }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 560; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
code, .mono { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--origin-foreign); }
:focus-visible { outline: 2px solid var(--origin-foreign); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-page);
}
.topbar-brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 20rem;
}
.wordmark {
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: 1.05rem;
  color: var(--ink-primary);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
}
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 10rem;
}
.topnav a {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  text-decoration: none;
  user-select: none;
}
.topnav a:hover { color: var(--origin-foreign); }
.theme-btn {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--ink-line);
  background: transparent;
  color: var(--ink-secondary);
  cursor: pointer;
}
.theme-btn:hover { border-color: var(--origin-foreign); color: var(--ink-primary); }

/* ===== Hero ===== */
.hero {
  padding: 3.5rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 2.5rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.08;
}
.hero .dek {
  margin-top: 1rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 52ch;
}
.legend-key {
  display: flex;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}
.legend-key .swatch { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-key .dot { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.dot.foreign { background: var(--origin-foreign); }
.dot.russian { background: var(--origin-russian); }
.chart-legend-top { margin-bottom: 0.6rem; }
.chart-legend-bottom { margin: 0.75rem 0.25rem 0; }
.legend-key.interactive .swatch { cursor: pointer; }
.legend-key .swatch.off { opacity: 0.4; text-decoration: line-through; }
.legend-total { color: var(--ink-primary); font-weight: 600; }
.chart-note { font-size: 0.78rem; color: var(--ink-muted); margin: 0.4rem 0.25rem 0; }

/* hero chart: foreign vs Russian imports, 1897 & 1898 */
.hero-chart-wrap {
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-chart);
  border: 1px solid var(--border);
  padding: 0.75rem 0.75rem 0.5rem;
}
#heroChart { height: 190px; }
.hero-chart-caption {
  margin: 0.25rem 0.25rem 0;
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: right;
}

/* ===== Hero stat tiles ===== */
.hero-stats {
  max-width: 1120px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  justify-content: center;
}
.hero-stats-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.stat-tile { background: var(--surface-card); padding: 1rem 1.5rem; flex: 0 0 auto; }
.stat-value { font-family: "Fraunces", serif; font-size: 1.6rem; font-weight: 560; font-variant-numeric: proportional-nums; }
.stat-label { font-size: 0.76rem; color: var(--ink-muted); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Sections ===== */
section.panel {
  max-width: 1120px;
  margin: 3.5rem auto 0;
  padding: 0 1.5rem;
}
section.panel:last-of-type { margin-bottom: 4rem; }
.panel-head { margin-bottom: 1.25rem; }
.panel-head h2 { font-size: 1.5rem; }
.panel-head p { color: var(--ink-secondary); margin-top: 0.4rem; max-width: 62ch; line-height: 1.55; }

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.control-group { display: flex; flex-direction: column; gap: 0.4rem; }
.control-group label.group-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 600;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  overflow: hidden;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  color: var(--ink-secondary);
  user-select: none;
}
.seg input:checked + label { background: var(--ink-primary); color: var(--surface-page); font-weight: 600; }
.seg label:hover { color: var(--ink-primary); }

.text-input, select.year-select {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  background: var(--surface-page);
  color: var(--ink-primary);
  min-width: 220px;
}

/* ===== Combobox (custom, replaces native datalist) ===== */
.combobox-group { position: relative; }
.combobox-wrap { position: relative; }
.combobox-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.combobox-wrap .text-input { padding-right: 2.2rem; }
.listbox {
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: var(--surface-card);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  box-shadow: 0 8px 24px var(--border);
}
.listbox[hidden] { display: none; }
.listbox li {
  padding: 0.45rem 0.6rem;
  font-size: 0.87rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink-primary);
}
.listbox li[aria-selected="true"] { background: var(--origin-foreign); color: #fff; }
.listbox li:hover:not([aria-selected="true"]) { background: var(--surface-page); }
.listbox .listbox-empty { color: var(--ink-muted); font-style: italic; cursor: default; }
.listbox .listbox-empty:hover { background: none; }

/* ===== Ranked chart: Select all/none links + on-chart checkboxes ===== */
.checklist-actions { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-muted); font-size: 0.8rem; }
.link-btn {
  font-family: inherit;
  font-size: 0.8rem;
  background: none;
  border: none;
  color: var(--origin-foreign);
  cursor: pointer;
  padding: 0.1rem 0.2rem;
}
.link-btn:hover { text-decoration: underline; }

.chart-card {
  background: var(--surface-chart);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1rem 0.5rem;
}
.by-good-chart-wrap { position: relative; }
.floating-total {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  background: var(--surface-chart);
  border: 1px solid var(--ink-line);
  box-shadow: 0 4px 14px var(--border);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--ink-primary);
  white-space: nowrap;
}
#rankedChart { min-height: 320px; }
.rank-chart-wrap { position: relative; }
.rank-checkbox-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.rank-checkbox { position: absolute; width: 14px; height: 14px; margin: 0; pointer-events: auto; cursor: pointer; }

.hidden-list { margin-bottom: 1rem; }
.hidden-list-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.hidden-list-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.2rem 0.8rem;
}
.hidden-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
  cursor: pointer;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 11px;
  color: var(--ink-secondary);
}
.hidden-item input { cursor: pointer; }
.hidden-item:hover { color: var(--ink-primary); }

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.92rem;
  background: var(--surface-chart);
  border: 1px dashed var(--ink-line);
  border-radius: 6px;
}

.ranked-count { font-size: 0.82rem; color: var(--ink-muted); margin-bottom: 0.6rem; }

.no-data-block {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-card);
}
.no-data-block h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
}
#noDataList {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}
.no-data-col {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 160px;
  min-width: 0;
}
.no-data-col li { margin: 0 0 0.35rem; }
#noDataList li::before { content: "· "; color: var(--ink-muted); }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: 3rem;
  background: var(--surface-page);
}
footer .wrap {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.6;
}
footer code { background: var(--surface-card); padding: 0.1rem 0.3rem; border-radius: 3px; }

@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; }
  #heroChart { height: 160px; }
}
