/* Child Health & Nutrition -- WASH Focus (GBD 2023 Explorer) */

:root {
  --bg: #f3f8fc;
  --panel-bg: #ffffff;
  --accent: #00aef3;      /* accent blue */
  --accent-soft: #d7efff;
  --accent-strong: #005a9c;
  --accent-ink: #003b70;
  --on-accent: #ffffff;
  --landing-highlight: #eaf6ff;
  --text: #1f2933;
  --muted: #5f6c80;
  --border: #c9d5e3;

  /* WASH buckets */
  --wash-core: #e53935;   /* red */
  --wash-ext:  #ffb300;   /* amber */
  --wash-non:  #9e9e9e;   /* grey */

  /* Nutrition categories */
  --nut-direct:  #2e7d32; /* green */
  --nut-washinfx: #6a1b9a; /* purple */
  --nut-other:   #90a4ae; /* blue-grey */

  /* Nutrition lines */
  --nut-stunting: #2e7d32;
  --nut-wasting:  #6a1b9a;

  /* Sanitation lines */
  --san-basic:  #0277bd;  /* blue */
  --san-safely: #ef6c00;  /* orange */

  /* Health workforce */
  --hrh-doctors: #0277bd;
  --hrh-nurses:  #2e7d32;
  --hrh-bar:     #7fb3d5;
  --hrh-selected: #003b70;
  --hrh-threshold: #c62828;
  --focus: #005fcc;

  /* Chart chrome */
  --grid: #e6ecf2;   /* hairline gridlines */
  --axis: #c9d5e3;   /* baseline */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 0.8rem 1.5rem;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
header h1 {
  font-size: 1.25rem;
  margin: 0;
}
header small {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

#app {
  display: block;
  min-height: calc(100vh - 60px);
}
aside {
  width: 100%;
  max-width: none;
  padding: 0.75rem 1.25rem;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
#content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem 1rem;
  gap: 0.75rem;
}
main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
}
.control-group.compact {
  margin-bottom: 0;
}
/* Presets and individual age chips share one row where there is room, which
   keeps the pinned filter bar short. */
.control-group-wide {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}
.control-group-wide > label {
  flex-basis: 100%;
  margin-bottom: 0;
}
.advanced-filters {
  margin-top: 0.6rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}
.advanced-filters summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  user-select: none;
}
.advanced-filters summary::-webkit-details-marker {
  display: none;
}
.advanced-body {
  padding-top: 0.75rem;
}
/* With "More options" open the bar is ~500px tall; keeping it sticky would
   cover most of the charts on a laptop screen. Unstick it while open, so it
   scrolls away with the page. Closed, the bar stays pinned and compact. */
aside:has(.advanced-filters[open]) {
  position: static;
}

@media (max-width: 900px) {
  aside {
    position: static;
    max-width: 100%;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 640px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  aside {
    max-height: 58vh;
    overflow-y: auto;
  }
}

/* Primary navigation: three large, labelled choices so the country views are
   easy to find (they used to be small pill tabs). */
.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--panel-bg);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}
.tab-btn:hover {
  border-color: var(--accent);
}
.tab-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.tab-title {
  font-size: 1rem;
  font-weight: 600;
}
.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 120, 180, 0.25);
}
.tab-btn.active .tab-kicker {
  color: rgba(255, 255, 255, 0.85);
}
@media (max-width: 640px) {
  .tabs {
    grid-template-columns: 1fr;
  }
}

.hidden {
  display: none !important;
}

.control-group {
  margin-bottom: 0.9rem;
}
.control-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.control-group select,
.control-group input[type="range"],
.control-group input[type="text"],
.control-group input[type="search"] {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  background: #f9fbff;
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip-group-grid {
  margin-top: 0;
}
.age-preset,
.age-chip {
  border: 1px solid var(--border);
  background: #f5f9ff;
  color: var(--text);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.77rem;
  line-height: 1.2;
}
.age-preset.active,
.age-chip.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.age-chip {
  min-width: 5.8rem;
  text-align: center;
}
.age-chip[aria-pressed="false"] {
  opacity: 0.8;
}
.radio-row,
.checkbox-col {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.radio-row label,
.checkbox-col label {
  font-size: 0.85rem;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.slider-value {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  margin-top: 0.1rem;
}

button {
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  cursor: pointer;
}
button.secondary {
  background: transparent;
  color: var(--accent);
}
button:disabled {
  opacity: 0.6;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.panel {
  background: var(--panel-bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 4px 10px rgba(15, 40, 80, 0.04);
}
.panel h2 {
  font-size: 1rem;
  margin: 0 0 0.1rem;
}
.panel p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.chart-box {
  position: relative;
  width: 100%;
  min-height: 200px;
}
.chart-box canvas {
  display: block;
}
.chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chart-table {
  overflow-x: auto;
  max-height: 18rem;
  border-top: 1px solid var(--border);
  padding-top: 0.45rem;
}
.chart-table table { border-collapse: collapse; width: 100%; font-size: 0.75rem; }
.chart-table th,
.chart-table td { border: 1px solid var(--border); padding: 0.3rem 0.4rem; text-align: left; white-space: nowrap; }
.chart-table th { background: #edf5fb; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#healthSummary,
#nutritionSummary {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 0.25rem;
}
#healthSummary strong,
#nutritionSummary strong {
  color: var(--accent);
}
footer {
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 0.25rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
}
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.5rem;
  margin-bottom: 0.4rem;
}
.status {
  font-size: 0.75rem;
  color: var(--muted);
}
.status.error {
  color: #c62828;
}
button.full-width {
  width: 100%;
}
button.full-width + button.full-width {
  margin-top: 0.4rem;
}

/* Country combobox (all 44 LDCs; see initCountryCombobox() in app.js) */
.combobox {
  position: relative;
}
.combobox input {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  background: #f9fbff;
}
.combobox [role="listbox"] {
  position: absolute;
  z-index: 20;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  max-height: 18rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(15, 40, 80, 0.15);
}
.combo-group {
  padding: 0.35rem 0.6rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.combo-option {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.combo-option.active {
  background: var(--accent-soft);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.combo-option[aria-selected="true"] {
  font-weight: 600;
}
.combo-option[aria-disabled="true"] {
  color: var(--muted);
  cursor: default;
}
.combo-tag {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.combo-empty {
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.country-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.country-note:empty {
  display: none;
}

/* LDC overview */
.overview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  align-items: flex-end;
}
.overview-controls .control-group {
  margin-bottom: 0.2rem;
}
.control-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.summary-text {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 0.25rem;
}
.summary-text strong {
  color: var(--accent);
}
.pending-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.5rem 1rem;
}
.pending-group h3 {
  font-size: 0.8rem;
  margin: 0 0 0.2rem;
}
.pending-group ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Header navigation */
.header-nav {
  display: flex;
  gap: 0.5rem;
}

/* Landing page (replaces the old blocking splash) */
.landing {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.landing-hero h2 {
  font-size: 1.45rem;
  line-height: 1.3;
  margin: 0 0 0.6rem;
}
.landing-hero p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 48rem;
}
.landing-choose {
  padding: 1.15rem;
  border: 2px solid var(--accent-strong);
  border-radius: 14px;
  background: var(--landing-highlight);
  box-shadow: 0 8px 24px rgba(15, 40, 80, 0.1);
}
.landing-choose-heading {
  margin-bottom: 1rem;
}
.landing-choose-heading h3 {
  margin: 0.15rem 0 0.3rem;
  color: var(--accent-ink);
  font-size: 1.2rem;
}
.landing-choose-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.landing-eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
}
.landing-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
  min-height: 14rem;
  padding: 1.15rem;
  border-radius: 12px;
  border: 2px solid var(--accent-strong);
  background: var(--panel-bg);
  color: var(--text);
  box-shadow: 0 5px 12px rgba(15, 40, 80, 0.09);
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.landing-card:hover,
.landing-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 40, 80, 0.17);
  background: var(--accent-soft);
}
.landing-card-featured {
  background: var(--accent-strong);
  color: var(--on-accent);
}
.landing-card-featured:hover,
.landing-card-featured:focus-visible {
  background: var(--accent-ink);
}
.landing-card-kicker {
  align-self: flex-start;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.landing-card-title {
  font-size: 1.18rem;
  font-weight: 750;
  color: var(--accent-ink);
}
.landing-card-text {
  color: var(--muted);
  line-height: 1.45;
}
.landing-card-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  color: var(--accent-strong);
  font-weight: 750;
}
.landing-card-action [aria-hidden="true"] {
  font-size: 1.35rem;
  line-height: 1;
}
.landing-card-featured .landing-card-title,
.landing-card-featured .landing-card-text,
.landing-card-featured .landing-card-action {
  color: var(--on-accent);
}
.landing-card-featured .landing-card-action {
  border-top-color: var(--accent-soft);
}
.landing-section {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem 1.1rem;
}
.landing-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.landing-section h4 {
  margin: 0.6rem 0 0.25rem;
  font-size: 0.9rem;
}
.landing-section p,
.landing-section li {
  font-size: 0.88rem;
  line-height: 1.5;
}
.landing-section p {
  margin: 0.3rem 0;
}
.standalone-notice {
  border-width: 2px;
  border-color: var(--accent-strong);
}
.standalone-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-size: 0.7rem !important;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.standalone-notice ul {
  margin: 0.65rem 0;
  padding-left: 1.25rem;
}
.third-party-notice {
  margin-top: 0.8rem;
}
.third-party-notice pre {
  max-height: 14rem;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  white-space: pre-wrap;
  font-size: 0.72rem;
}
.standalone-methodology-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 1rem;
  background: rgba(15, 40, 80, 0.72);
}
.standalone-methodology-dialog {
  width: min(72rem, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--panel-bg);
  box-shadow: 0 12px 30px rgba(15, 40, 80, 0.28);
}
.standalone-methodology-dialog iframe {
  width: 100%;
  height: calc(100% - 3rem);
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-bg);
}
.standalone-methodology-close {
  display: block;
  margin-left: auto;
}
.bucket-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0;
}
.bucket-list li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.swatch {
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 3px;
  transform: translateY(0.1rem);
}
.cause-lists summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.4rem 0;
}
.bucket-cause-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0 1.5rem;
}
.bucket-cause-lists ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.bucket-cause-lists p {
  grid-column: 1 / -1;
}
.caveat,
.disclaimer {
  color: var(--muted);
}
.citation {
  border-left: 3px solid var(--accent-soft);
  padding-left: 0.6rem;
}
.source-entry + .source-entry {
  border-top: 1px solid var(--grid);
  margin-top: 0.6rem;
}

/* Source notes under charts */
.note {
  font-size: 0.78rem;
  color: var(--muted);
}
.source-note {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--grid);
  padding-top: 0.4rem;
  margin-top: 0.2rem;
}
.source-note a,
.landing a {
  color: var(--accent);
}

/* Plain-language help under controls */
.control-help {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}

/* "Values / % split" toggle inside the age-band charts */
.mode-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0.65rem;
  background: #f5f9ff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mode-control .control-label {
  margin: 0;
}
.mode-toggle {
  display: inline-flex;
  border: 1px solid var(--accent);
  border-radius: 999px;
  overflow: hidden;
}
.mode-btn {
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  padding: 0.3rem 0.8rem;
}
.mode-btn.active {
  background: var(--accent);
  color: #ffffff;
}
.mode-control .control-help {
  flex-basis: 100%;
}

/* Age-profile heatmap (an HTML table: every cell shows its value as text) */
.heatmap-wrap {
  overflow-x: auto;
}
.heatmap {
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 0.8rem;
  min-width: 100%;
}
.heatmap caption {
  text-align: left;
  font-size: 0.78rem;
  color: var(--muted);
  padding-bottom: 0.35rem;
}
.heatmap th {
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
  padding: 0.3rem 0.4rem;
  text-align: center;
}
.heatmap tbody th {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--panel-bg);
}
.heatmap td {
  text-align: center;
  padding: 0.4rem 0.35rem;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  min-width: 3.6rem;
}
.heatmap td:last-child {
  font-weight: 700;
}
.link-button {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  border-radius: 2px;
}

/* Country entry points on the comparison page */
.country-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.6rem;
}
.country-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.country-card-name {
  font-weight: 600;
}
.country-card-note {
  font-size: 0.75rem;
  color: var(--muted);
}
.country-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.open-btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

/* Glossary on the landing page */
.glossary dt {
  font-weight: 600;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
.glossary dd {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

/* Header link to the methodology page */
.nav-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  color: var(--accent);
  text-decoration: none;
}
.nav-link:hover {
  background: var(--accent-soft);
}
.more-link {
  color: var(--accent);
  font-weight: 600;
}

/* Methodology page */
.method {
  max-width: 50rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  line-height: 1.6;
  font-size: 0.95rem;
}
.method h2 {
  font-size: 1.2rem;
  margin: 2.2rem 0 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.method h3 {
  font-size: 1rem;
  margin: 1.2rem 0 0.4rem;
}
.method h4 {
  font-size: 0.9rem;
  margin: 0.6rem 0 0.25rem;
}
.method a {
  color: var(--accent);
}
.method-lede {
  font-size: 1.05rem;
  color: var(--text);
}
.method-toc {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
}
.method-toc h2 {
  border: none;
  margin: 0 0 0.3rem;
  padding: 0;
  font-size: 1rem;
}
.method-toc ol {
  margin: 0;
  padding-left: 1.3rem;
  columns: 2 16rem;
}
.method-steps li {
  margin-bottom: 0.6rem;
}
.method-table {
  border-collapse: collapse;
  margin: 0.6rem 0;
  font-size: 0.88rem;
  width: 100%;
}
.method-table th,
.method-table td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
.method-table thead th,
.method-table tbody th {
  background: #edf5fb;
  font-weight: 600;
}
.method-table.numeric td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.method-table tr.total th,
.method-table tr.total td {
  border-top: 2px solid var(--text);
}
.worked {
  background: #f5f9ff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin: 0.8rem 0;
}
.worked h3 {
  margin-top: 0.2rem;
}
.callout {
  background: #fff8e6;
  border: 1px solid #f3d27a;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin: 0.8rem 0;
}
.bucket-defs dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-top: 0.7rem;
}
.bucket-defs dd {
  margin: 0.2rem 0 0 1.3rem;
}
.inline-list {
  display: inline;
}
@media (max-width: 640px) {
  .method-table {
    display: block;
    overflow-x: auto;
  }
}

.edition-note {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  border-left: 4px solid var(--accent-strong);
  background: var(--landing-highlight);
  color: var(--text);
  font-size: 0.9rem;
}
