/* Flo Green tokens. Palette from the Flo family (sustainability tokens): paper ground, ink type,
   forest green as the one accent. Square 2px corners, rules instead of shadows. */
:root {
  color-scheme: light;

  --paper: #FEFDFA;
  --paper-2: #F5F1EB;
  --rule: #D8D4CD;
  --ink: #191712;
  --ink-2: #373530;
  --ink-soft: #52504A;
  --ink-faint: #6E6C66;
  --edge: #888681;
  --forest: #205034;
  --forest-press: #133F26;
  --forest-tint: #DDEDDF;
  --forest-2: #6C9173;
  --focus: #205034;
  --error: #8A2B1D; /* form errors only */

  /* Elevation steps for 0, 500, 1000, 1500, 2000, 2500+ m (the map draws the same in map/grid.js). */
  --elev-0: #3D6B4B;
  --elev-1: #356243;
  --elev-2: #2C593C;
  --elev-3: #245034;
  --elev-4: #1C472D;
  --elev-5: #133F26;
  --land-0: #CECBC4;
  --land-2: #B6B1A9;

  --r: 2px;

  --f-head: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --f-body: 'Lato', ui-sans-serif, system-ui, sans-serif;
  --f-ui: 'Inter', ui-sans-serif, system-ui, sans-serif;

  /* Type scale, ratio 1.2 */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.2rem;
  --t-xl: 1.44rem;
  --t-2xl: 1.728rem;
  --t-3xl: 2.074rem;
  --t-4xl: 2.488rem;

  /* Spacing on a 4px grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --d-hover: 160ms;
  --d-state: 240ms;
  --d-reveal: 620ms;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);

  --top-h: 64px;
  --gutter: 24px;
  --wide: 1240px;
  /* 60ch of Lato is about 72 characters of running text (68ch came out near 89) */
  --measure: 60ch;
}

@media (max-width: 899px) {
  :root { --top-h: 56px; --gutter: 16px; }
}

/* Base: reset, type, links, focus. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + var(--s-4)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--f-body);
  overflow-wrap: break-word;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 300; line-height: 1.2; margin: 0 0 var(--s-3); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
p, li, dd, figcaption, legend { text-wrap: pretty; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0; padding: 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 0.18em; text-decoration-thickness: 1px; transition: text-decoration-color var(--d-hover) var(--ease); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* One drawn chevron for every select. It is a file because the CSP takes images from this site only. */
select { appearance: none; background: var(--paper) url("../img/chevron.svg") no-repeat right 12px center / 12px 12px; }
::selection { background: var(--forest-tint); color: var(--ink); }
/* Line icons (assets/lib/icons.js): the stroke stays 1.5px at any size, in the text colour. */
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico path { vector-effect: non-scaling-stroke; }
abbr[title] { text-decoration: none; }
q { quotes: '\201C' '\201D'; }
.num { font-family: var(--f-ui); font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 50; background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4); border-radius: var(--r); }
.skip:focus { top: var(--s-2); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* Top bar, navigation, footer, page frames. */
.top {
  position: sticky; top: 0; z-index: 30;
  height: var(--top-h);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.top__in {
  height: 100%;
  display: flex; align-items: center; gap: var(--s-4);
  padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: var(--s-2); text-decoration: none; min-width: 0; }
.brand .mark { flex: none; }
.brand__name { font-family: var(--f-head); font-weight: 400; font-size: var(--t-lg); letter-spacing: -0.01em; white-space: nowrap; }
.brand__sub { font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-faint); white-space: nowrap; margin-left: var(--s-2); padding-left: var(--s-3); border-left: 1px solid var(--rule); }
.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-5); }
.nav__list { list-style: none; display: flex; gap: var(--s-5); }
.nav__list a, .nav__lang {
  font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm);
  text-decoration: none; color: var(--ink-2);
  padding: var(--s-2) 0; border-bottom: 2px solid transparent;
  transition: border-color var(--d-hover) var(--ease), color var(--d-hover) var(--ease);
}
.nav__list a:hover, .nav__lang:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav__list a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav__lang { letter-spacing: 0.04em; }
.top__menu { display: none; }

@media (max-width: 1099px) {
  .brand__sub { display: none; }
}
@media (max-width: 899px) {
  .top__in { gap: var(--s-3); }
  .top__menu {
    display: inline-flex; margin-left: auto;
    font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm);
    background: none; border: 1px solid var(--ink); border-radius: var(--r);
    padding: var(--s-1) var(--s-3); min-height: 36px; align-items: center;
  }
  .no-js .top__menu { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: var(--top-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: var(--s-2) var(--gutter) var(--s-4);
    /* the open menu covers the page below the bar, so the page never shows through under it */
    height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h)); overflow-y: auto;
  }
  .js .nav:not(.is-open) { display: none; }
  .no-js .top { height: auto; position: static; }
  .no-js .top__in { flex-wrap: wrap; padding-top: var(--s-3); padding-bottom: var(--s-3); }
  .no-js .nav { position: static; padding: 0; border: 0; height: auto; overflow: visible; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a, .nav__lang { display: block; padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
  .nav__list a[aria-current="page"] { border-bottom-color: var(--rule); font-weight: 600; }
  .nav .btn { margin-top: var(--s-4); align-self: flex-start; }
}

/* Page frames */
.main { display: block; }
.page { max-width: 1000px; margin: 0 auto; padding: var(--s-7) var(--gutter) var(--s-8); }
.page--wide { max-width: var(--wide); }
.page--read { max-width: 780px; }
.ph { margin-bottom: var(--s-6); }
.ph h1 { margin-bottom: var(--s-2); }
.ph__meta { font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-soft); margin-bottom: var(--s-3); }
.ph__lead { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); margin-top: var(--s-3); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-7); align-items: start; }
.split--map { grid-template-columns: minmax(0, 1fr) 300px; }
.sect { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--rule); }
.sect__h { margin-top: var(--s-7); }
.side__h { font-family: var(--f-ui); font-weight: 600; font-size: var(--t-sm); letter-spacing: 0; margin: var(--s-5) 0 var(--s-2); }
.side__h:first-child { margin-top: 0; }
.side__note { font-size: var(--t-sm); color: var(--ink-soft); margin-top: var(--s-2); }
.note { font-size: var(--t-sm); color: var(--ink-soft); max-width: var(--measure); }
@media (max-width: 899px) {
  .page { padding-top: var(--s-6); }
  .split, .split--map { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  h1 { font-size: var(--t-2xl); }
}

/* Footer */
.foot { border-top: 1px solid var(--rule); background: var(--paper); font-size: var(--t-sm); color: var(--ink-soft); }
.foot__in {
  max-width: var(--wide); margin: 0 auto; padding: var(--s-7) var(--gutter) var(--s-6);
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6);
}
.foot__brand { display: flex; align-items: center; gap: var(--s-2); font-family: var(--f-head); font-size: var(--t-lg); color: var(--ink); margin-bottom: var(--s-3); }
.foot__about p { max-width: 46ch; }
.foot__links { list-style: none; display: grid; gap: var(--s-2); align-content: start; }
.foot__links a { color: var(--ink-2); }
.foot__attr { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: var(--s-4); margin: 0; font-size: var(--t-xs); color: var(--ink-faint); }
.foot__updated { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-faint); }
@media (max-width: 699px) {
  .foot__in { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
}

/* Controls and shared pieces. Primary = black fill, secondary = outline, no shadows. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5);
  font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink); border-radius: var(--r);
  background: transparent; color: var(--ink);
  transition: background-color var(--d-hover) var(--ease), color var(--d-hover) var(--ease), border-color var(--d-hover) var(--ease);
}
.btn--sm { min-height: 36px; padding: 0 var(--s-4); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--ink-2); }
.btn--line:hover, .btn--line[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn--quiet { border-color: transparent; text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 0.2em; }
.btn--quiet:hover { text-decoration-color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; }

.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--r); }
.seg button {
  min-height: 34px; min-width: 44px; padding: 0 var(--s-3);
  font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm);
  background: transparent; border: 0;
  transition: background-color var(--d-hover) var(--ease), color var(--d-hover) var(--ease);
}
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.badges { display: inline-flex; flex-wrap: wrap; gap: var(--s-1); }
.badge {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 var(--s-2);
  font-family: var(--f-ui); font-weight: 500; font-size: var(--t-xs); line-height: 1;
  border: 1px solid var(--ink); border-radius: var(--r); white-space: nowrap;
}
.badge--verified { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.badge--coe { border-color: var(--ink-2); }
.badge--preview { border-style: dashed; color: var(--ink-soft); border-color: var(--edge); }

.chips { display: inline-flex; flex-wrap: wrap; gap: var(--s-1); }
.chip {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 var(--s-2);
  font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-2);
  background: var(--paper-2); border-radius: var(--r); white-space: nowrap;
}

.none { color: var(--ink-faint); font-style: italic; }
.ref { font-family: var(--f-ui); font-size: 0.7em; line-height: 0; margin-left: 2px; }
.ref a { text-decoration: none; color: var(--forest); padding: 0 1px; }
.ref a:hover { text-decoration: underline; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-soft); margin-bottom: var(--s-4); }
.crumbs li + li::before { content: '/'; margin-right: var(--s-2); color: var(--rule); }
.crumbs a { color: var(--ink-soft); }

/* Tables */
.tablewrap { overflow-x: auto; border-top: 1px solid var(--ink); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th, .table td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-3); border-bottom: 1px solid var(--rule); }
.table thead th { font-family: var(--f-ui); font-weight: 600; font-size: var(--t-xs); color: var(--ink-soft); white-space: nowrap; }
.table thead th button { display: inline-flex; align-items: center; white-space: nowrap; font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: transparent; }
.table thead th button:hover { text-decoration-color: var(--edge); }
.table tbody th { font-weight: 400; }
.table .r { text-align: right; }
.table td:first-child, .table th:first-child { padding-left: 0; }
.table td:last-child, .table th:last-child { padding-right: 0; }
/* A year range with no edition: quiet, so it reads as a note between the rows, not as a result. */
.table .row--gap td { color: var(--ink-soft); }
.table .row--gap td:first-child { white-space: nowrap; }
.table .c-gap { font-size: var(--t-xs); max-width: 64ch; }
.cell__sub { display: block; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); margin-top: 2px; }

/* Fact list (processor pages) */
.factlist { margin: 0; border-top: 1px solid var(--ink); }
.fact { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
.fact dt { font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); color: var(--ink-soft); padding-top: 2px; }
.fact dd { margin: 0; }
.fact__note { font-size: var(--t-xs); color: var(--ink-faint); margin: var(--s-1) 0 0; }
.plain { list-style: none; }
.plain li + li { margin-top: 2px; }
.links { list-style: none; display: grid; gap: 2px; }
.links__k { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); display: inline-block; min-width: 9em; }
@media (max-width: 599px) {
  .fact { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
}

/* Processor and province lists */
.plist { list-style: none; border-top: 1px solid var(--rule); }
.plist li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); }
.plist__n { font-size: var(--t-xs); color: var(--ink-2); }
.plist__n--zero { color: var(--ink-faint); }
.pitems { list-style: none; display: grid; gap: var(--s-1); }
.pitems--cols { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: var(--s-6); }
.pitem { padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); }
.pitem__name { font-weight: 700; }
.pitem__meta { display: block; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); margin: 2px 0 var(--s-1); }
.counts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.counts li { display: inline-flex; align-items: center; gap: var(--s-2); }
.altlist { list-style: none; columns: 2 280px; column-gap: var(--s-6); }
.altlist li { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); break-inside: avoid; font-size: var(--t-sm); }

/* Potensi notes rows: label, share mark, value */
.notes__rows { list-style: none; display: grid; gap: var(--s-1); }
.nrow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 3.2em; align-items: center; gap: var(--s-3); font-size: var(--t-sm); }
.nrow__val { text-align: right; font-size: var(--t-xs); }
.notes__n, .notes__thin { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); margin-top: var(--s-2); }
.share__track { stroke: var(--rule); stroke-width: 1; }
.share__ci { stroke: var(--forest-2); stroke-width: 2; stroke-linecap: round; }
.share__dot { fill: var(--forest); stroke: var(--paper); stroke-width: 2; }

.empty { padding: var(--s-5) 0; color: var(--ink-2); }
.empty--teach { border: 1px solid var(--rule); border-radius: var(--r); padding: var(--s-5); background: var(--paper-2); max-width: 640px; }
.empty--teach p:last-child { margin-bottom: 0; }

.lotnotes { list-style: none; display: grid; gap: var(--s-2); }
.lotnotes li { padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); }
.lotnotes__p { display: block; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }

.sources { padding-left: 1.6em; display: grid; gap: var(--s-2); font-size: var(--t-sm); }
.sources li::marker { font-family: var(--f-ui); color: var(--forest); }
.sources li:target { background: var(--forest-tint); }
.sources__pub { display: block; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }

.actions { list-style: none; display: grid; gap: var(--s-3); }
.actions .btn { width: 100%; }
.actions__try span { font-family: var(--f-ui); font-size: var(--t-sm); font-weight: 500; }

/* Lot tables on a phone: one block per lot. Year and rank with the score, the farm with the price,
   then the process (and province). The header row stays for screen readers. */
@media (max-width: 599px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table--stack, .table--stack tbody { display: block; }
  .table--stack tr {
    display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: var(--s-3); row-gap: var(--s-1);
    grid-template-areas: "year rank . score" "farm farm farm price" "proc proc proc proc" "prov prov prov prov";
    padding: var(--s-3) 0; border-bottom: 1px solid var(--rule);
  }
  .table--stack td, .table--stack td:first-child, .table--stack td:last-child { display: block; padding: 0; border: 0; }
  .table--stack .c-year { grid-area: year; color: var(--ink-soft); }
  .table--stack .c-rank { grid-area: rank; }
  .table--stack .c-score { grid-area: score; }
  .table--stack .c-farm { grid-area: farm; }
  .table--stack .c-price { grid-area: price; }
  .table--stack .c-proc { grid-area: proc; }
  .table--stack .c-prov { grid-area: prov; }
  .table--stack .c-proc, .table--stack .c-prov { font-size: var(--t-xs); color: var(--ink-soft); }
  .table--stack tr.row--gap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "year" "gap"; }
  .table--stack .c-gap { grid-area: gap; }
  .table--stack td[data-l]::before { content: attr(data-l) "\00a0"; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
}

/* The dot map, its legend and the altitude filter. */
.map { position: relative; overflow: hidden; background: var(--paper); }
.map__canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.map--3d .map__canvas { touch-action: none; }
.map--3d .map__canvas:not(.map__canvas3d) { visibility: hidden; }
.map__canvas3d { cursor: grab; }
/* The open province's name on the map, beside the card (left is set from the card's edge). */
.map__title {
  position: absolute; top: var(--s-4); left: var(--s-4); z-index: 3; margin: 0; pointer-events: none;
  font-family: var(--f-head); font-weight: 300; font-size: var(--t-xl); line-height: 1.2; color: var(--ink);
  text-shadow: 0 0 2px var(--paper), 0 0 6px var(--paper), 0 0 12px var(--paper); /* stays legible over dots */
}
@media (max-width: 899px) { .map__title { top: var(--s-2); font-size: var(--t-lg); } }
.map__ctl { position: absolute; top: var(--s-3); right: var(--s-3); z-index: 4; display: grid; gap: var(--s-1); }
.map__ctl[hidden] { display: none; }
.map__ctl button {
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--ink);
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r); cursor: pointer;
  transition: background-color var(--d-hover) var(--ease);
}
.map__ctl button:hover { background: var(--paper-2); }
.map__status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  margin: 0; font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-soft); text-align: center; max-width: 32ch;
}
.map__tip {
  position: absolute; z-index: 4; pointer-events: none;
  min-width: 160px; max-width: 260px; padding: var(--s-2) var(--s-3);
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r);
  font-family: var(--f-ui); font-size: var(--t-xs); line-height: 1.45; color: var(--ink-2);
}
.map__tip strong { display: block; font-weight: 600; font-size: var(--t-sm); color: var(--ink); }
.map__tip-l { display: block; }
.map__tip-l:last-child:not(:first-of-type) { color: var(--ink-faint); }

/* Processor list for a cluster or a regency. */
.map__pop {
  position: absolute; z-index: 5; width: 288px; max-width: calc(100% - 16px); max-height: calc(100% - 16px); overflow-y: auto;
  padding: var(--s-3) var(--s-4) var(--s-1); background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r);
}
.map__pop-h { margin: 0 var(--s-6) var(--s-2) 0; font-family: var(--f-ui); font-weight: 600; font-size: var(--t-sm); color: var(--ink); }
.map__pop-x {
  position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--r); color: var(--ink-soft); cursor: pointer;
}
.map__pop-x:hover { color: var(--ink); background: var(--paper-2); }
.map__pop-list { list-style: none; margin: 0; padding: 0; }
.map__pop-list li { padding: var(--s-2) 0; border-top: 1px solid var(--rule); }
.map__pop-a { font-weight: 700; font-size: var(--t-sm); }
.map__pop-m { display: block; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
.map--mini { aspect-ratio: 4 / 3; border: 1px solid var(--rule); border-radius: var(--r); }
.map--province { aspect-ratio: 16 / 10; border-top: 1px solid var(--ink); }
.map__msg { position: absolute; right: var(--s-3); bottom: var(--s-3); max-width: min(360px, calc(100% - 24px)); margin: 0; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); background: var(--paper); padding: var(--s-1) var(--s-2); border: 1px solid var(--rule); border-radius: var(--r); }

/* Legend: elevation scale (also the altitude filter) and the three keys. */
.legend { display: grid; grid-template-columns: auto auto; column-gap: var(--s-5); row-gap: var(--s-1); align-items: center; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
.legend__title { grid-column: 1; margin: 0; font-weight: 500; color: var(--ink-2); }
.legend__scale { grid-column: 1; position: relative; display: grid; grid-template-columns: repeat(6, 36px) auto; align-items: end; }
.legend__stop { display: grid; justify-items: start; gap: 2px; }
.legend__lbl { font-size: 11px; color: var(--ink-soft); }
.legend__unit { padding-left: var(--s-1); font-size: 11px; }
.ldot { display: block; border-radius: 50%; background: var(--elev-0); }
.ldot--0 { width: 5px; height: 5px; background: var(--elev-0); }
.ldot--1 { width: 6px; height: 6px; background: var(--elev-1); }
.ldot--2 { width: 7px; height: 7px; background: var(--elev-2); }
.ldot--3 { width: 8px; height: 8px; background: var(--elev-3); }
.ldot--4 { width: 9px; height: 9px; background: var(--elev-4); }
.ldot--5 { width: 10px; height: 10px; background: var(--elev-5); }
.legend__keys { grid-column: 2; grid-row: 1 / span 3; list-style: none; display: grid; gap: 2px; }
.legend__keys li { display: flex; align-items: center; gap: var(--s-2); white-space: nowrap; }
.kdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kdot--coffee { background: var(--elev-3); }
.kdot--other { background: var(--land-2); }
.kdot--pin { width: 14px; height: 14px; background: var(--ink); border: 2.5px solid var(--paper); outline: 1px solid var(--ink); }

.altrange { grid-column: 1; position: relative; width: calc(36px * 5 + 10px); height: 20px; }
.altrange::before { content: ''; position: absolute; left: 4px; right: 4px; top: 9px; height: 2px; background: var(--rule); }
.altrange__sel { position: absolute; top: 9px; height: 2px; background: var(--ink); left: 4px; right: 4px; }
.altrange input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 20px; margin: 0;
  -webkit-appearance: none; appearance: none; background: none; pointer-events: none;
}
.altrange input[type="range"]::-webkit-slider-runnable-track { background: none; height: 20px; }
.altrange input[type="range"]::-moz-range-track { background: none; }
.altrange input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); cursor: grab;
}
.altrange input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); cursor: grab;
}
.altrange input[type="range"]:focus-visible { outline: none; }
.altrange input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--focus); outline-offset: 2px; }
.altrange input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--focus); outline-offset: 2px; }
.legend__out { font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.legend__out:not(:empty)::before { content: '·'; padding: 0 var(--s-2); color: var(--ink-faint); }
/* On a phone the legend folds behind a button in the tool row, so the first screen is the map; the
   button repeats an active altitude filter. */
.legend__toggle { display: none; gap: 6px; }
.legend__toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.legend__state:not(:empty) { opacity: 0.72; } /* readable on the paper and on the hover ink */

/* Island tabs (home.css keeps them on the bottom edge of the map). */
.islands__list { list-style: none; display: flex; overflow-x: auto; scrollbar-width: none; }
.islands__list::-webkit-scrollbar { display: none; }
.islands__list li { flex: 1 0 auto; }
.islands__list a {
  display: flex; align-items: baseline; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-3) var(--s-4);
  font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); color: var(--ink-soft); text-decoration: none; white-space: nowrap;
  border-top: 2px solid transparent; margin-top: -1px;
  transition: color var(--d-hover) var(--ease), border-color var(--d-state) var(--ease);
}
.islands__list a:hover { color: var(--ink); }
.islands__list a[aria-current="true"] { color: var(--ink); border-top-color: var(--ink); }
.islands__n { font-size: var(--t-xs); color: var(--ink-faint); }

/* Home: the toolbar and the map hold still while the island steps scroll over the map, and the island
   tab bar holds the bottom edge. --bar-h is the toolbar's height (home.js measures it). */
.scrolly { position: relative; --bar-h: 108px; --tabs-h: 49px; --stage-h: calc(100dvh - var(--top-h) - var(--bar-h)); }
.stage__bar {
  position: sticky; top: var(--top-h); z-index: 4;
  display: flex; align-items: center; gap: var(--s-5) var(--s-6); flex-wrap: wrap;
  padding: var(--s-3) var(--gutter);
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.find { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-1); flex: 1 1 360px; min-width: 0; max-width: 520px; }
.find .count { margin: 0; font-size: var(--t-xs); color: var(--ink-soft); }
.tools { display: flex; align-items: center; gap: var(--s-2); }
.stage__bar .legend { margin-left: auto; }
.stage { position: sticky; top: calc(var(--top-h) + var(--bar-h)); height: var(--stage-h); }
.stage .map { position: absolute; inset: 0 0 var(--tabs-h) 0; }
.islands { position: sticky; bottom: 0; z-index: 4; background: var(--paper); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }

.search { position: relative; display: flex; }
.search input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 var(--s-4);
  font-family: var(--f-ui); font-size: var(--t-md);
  background: var(--paper); border: 1px solid var(--ink); border-right: 0; border-radius: var(--r) 0 0 var(--r);
}
.search input::placeholder { color: var(--ink-faint); }
.search__go { min-height: 44px; padding: 0 var(--s-4); font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 0 var(--r) var(--r) 0; }
.search__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10; list-style: none;
  max-height: 360px; overflow-y: auto; background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r);
}
.search__list li { padding: var(--s-2) var(--s-3); cursor: pointer; border-bottom: 1px solid var(--rule); }
.search__list li:last-child { border-bottom: 0; }
.search__list li[aria-selected="true"], .search__list li:hover { background: var(--paper-2); }
.search__list .opt__name { display: block; font-weight: 700; font-size: var(--t-sm); }
.search__list .opt__meta { display: block; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
.search__list .opt--none { cursor: default; color: var(--ink-soft); font-size: var(--t-sm); }

/* Steps scroll over the sticky map: cards on the left, the map stays clickable around them. A card never
   scrolls inside itself: a long card makes its step longer and the page carries it past the map. */
.steps { position: relative; z-index: 2; margin-top: calc(-1 * var(--stage-h)); pointer-events: none; }
.step {
  min-height: var(--stage-h); display: flex; align-items: center;
  padding: var(--s-6) var(--gutter) calc(var(--tabs-h) + var(--s-6));
  scroll-margin-top: calc(var(--bar-h) - var(--s-4)); /* html's scroll-padding-top already covers the top bar */
}
.step__card {
  pointer-events: auto; width: 400px; max-width: 100%;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r);
  padding: var(--s-5);
}
.step__card h2, .step__card .step__prov-h { font-family: var(--f-head); font-weight: 300; font-size: var(--t-2xl); color: var(--ink); margin: 0 0 var(--s-1); }
.step__card h3, .step__card h4 { font-family: var(--f-ui); font-weight: 600; font-size: var(--t-xs); letter-spacing: 0; color: var(--ink-2); margin: var(--s-4) 0 var(--s-2); }
/* A clicked province takes over its island's card; the way back sits above its name. */
.step__back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 0 0 var(--s-2); padding: 0;
  font-family: var(--f-ui); font-weight: 500; font-size: var(--t-xs); color: var(--ink-2); background: none; border: 0;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em;
}
.step__back:hover { color: var(--ink); text-decoration-color: var(--edge); }
.step__back .ico--back { width: 12px; height: 12px; transform: rotate(-90deg); }
.step .step__prov .empty--teach { margin-top: var(--s-4); padding: var(--s-4); font-size: var(--t-sm); }
.step__card .plist li { padding: 6px 0; }
.step__counts { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: var(--s-1); }
.step__alt { font-size: var(--t-sm); color: var(--ink-soft); margin: 0; }
.step__more { font-size: var(--t-sm); margin: var(--s-2) 0 0; }
/* The province page link sits under the counts, where a tall panel cannot push it under the tab bar. */
.step__open { font-size: var(--t-sm); margin: var(--s-2) 0 0; }
.step__open a { display: inline-flex; align-items: center; gap: 6px; }
.step__open .ico--go { width: 12px; height: 12px; transform: rotate(90deg); }
.step .empty { font-size: var(--t-sm); padding: var(--s-3) 0 0; }
.plist--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4); }
.pitems--compact .pitem { padding: var(--s-1) 0 var(--s-2); }
.pitems--compact .pitem__name { font-size: var(--t-md); }
.pitems--compact .pitem__meta { margin-bottom: 0; }

/* Closing bands */
.band { border-top: 1px solid var(--rule); }
.band__in { max-width: var(--wide); margin: 0 auto; padding: var(--s-8) var(--gutter); }
.band__in--split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); align-items: start; }
.band__in--split p { max-width: var(--measure); }
.band__lead { color: var(--ink-2); max-width: var(--measure); }
.band__more { margin-top: var(--s-4); font-size: var(--t-sm); }
.band--sourcing { background: var(--paper-2); }
.band h2 { font-size: var(--t-2xl); }

@media (max-width: 899px) {
  /* the map keeps a good share of the first screen; the steps scroll under it */
  .scrolly { --stage-h: min(56svh, 70vw); }
  .stage__bar { position: static; padding: var(--s-3) var(--gutter); gap: var(--s-3); }
  .find { flex-basis: 100%; max-width: none; }
  .stage__bar .legend { margin-left: 0; flex-basis: 100%; display: none; }
  .stage__bar .legend.is-open { display: grid; }
  .tools { flex-wrap: wrap; }
  .legend__toggle { display: inline-flex; }
  .stage { top: var(--top-h); z-index: 3; height: var(--stage-h); background: var(--paper); border-bottom: 1px solid var(--rule); }
  .stage .map { inset: 0; }
  .steps { margin-top: 0; pointer-events: auto; }
  .step { min-height: 0; display: block; padding: var(--s-5) var(--gutter) 0; scroll-margin-top: calc(var(--stage-h) - var(--s-4)); }
  .step--intro { display: none; }
  .step__card { width: auto; border: 0; border-bottom: 1px solid var(--rule); padding: 0 0 var(--s-6); }
  .band__in { padding: var(--s-7) var(--gutter); }
  .band__in--split { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .legend { grid-template-columns: minmax(0, 1fr); }
  .legend__keys { grid-column: 1; grid-row: auto; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
}

/* Without JavaScript there is no map: the steps read as a plain list of islands. */
.no-js .stage, .no-js .tools, .no-js .legend { display: none; }
.no-js .steps { margin-top: 0; pointer-events: auto; }
.no-js .step { min-height: 0; display: block; padding: var(--s-6) var(--gutter) 0; }
.no-js .step--intro { display: none; }
.no-js .step__card { width: auto; max-width: 760px; }

/* Filter rows (directory and dashboard) and the directory table. */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-4);
  padding: var(--s-4) 0; margin-bottom: var(--s-3);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.filters .field { display: grid; gap: var(--s-1); min-width: 150px; margin: 0; }
.filters .field--grow { flex: 1 1 260px; }
.filters label, .filters legend { font-family: var(--f-ui); font-weight: 500; font-size: var(--t-xs); color: var(--ink-soft); }
.filters input[type="search"], .filters input[type="number"], .filters select {
  min-height: 40px; padding: 0 var(--s-3); font-family: var(--f-ui); font-size: var(--t-sm);
  background-color: var(--paper); border: 1px solid var(--edge); border-radius: var(--r);
}
.filters input:focus-visible, .filters select:focus-visible { border-color: var(--ink); }
.filters select { padding-right: 36px; }
.field--alt { border: 0; padding: 0; display: flex !important; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.field--alt legend { width: 100%; margin-bottom: var(--s-1); padding: 0; }
.field--alt input { width: 86px; }
.field--checks { align-content: end; }
.field--actions { min-width: 0 !important; }
.check { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-2); min-height: 32px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.unit { font-weight: 400; color: var(--ink-faint); }
.count { font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-soft); margin: var(--s-2) 0 var(--s-3); }
.filters__active { flex-basis: 100%; margin: 0; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
/* The dashboard keeps its filters to one strip, so the first tiles show in the first screen. */
.filters--dash { padding: var(--s-3) 0; margin-bottom: 0; }
.filters--dash .field { min-width: 140px; }
@media (min-width: 900px) {
  .filters--dash .filters__active { flex: 1 1 160px; min-height: 40px; display: flex; align-items: center; justify-content: flex-end; text-align: right; }
}

.table--dir tbody th a { font-weight: 700; }
.table--dir .badges { margin-top: var(--s-1); }
.table--dir td:nth-child(3) { min-width: 180px; }

@media (max-width: 699px) {
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .filters .field { min-width: 0; }
  .filters select, .filters input[type="search"] { width: 100%; min-width: 0; }
  .filters .field--grow, .filters .field--alt, .filters .field--checks, .filters__active { grid-column: 1 / -1; }
  .field--alt input { flex: 1 1 0; width: auto; min-width: 0; }
  .filters .field--actions { justify-self: start; }
  .filters--dash .field--alt { grid-column: auto; }
  .table--dir, .table--dir tbody, .table--dir tr, .table--dir th, .table--dir td { display: block; }
  .table--dir thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--dir tr { padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
  .table--dir th, .table--dir td { border: 0; padding: 2px 0 !important; text-align: left !important; }
  .table--dir td:nth-child(5) { display: none; }
}

/* Sorted column: the arrow shows the direction (aria-sort says it to screen readers). Every sortable
   header keeps the arrow's room, so the columns do not shift when the sort moves. */
.table th button .ico--sort { width: 10px; height: 10px; margin-left: 4px; visibility: hidden; }
.table th[aria-sort] .ico--sort { visibility: visible; }
.table th[aria-sort="descending"] .ico--sort { transform: rotate(180deg); }

/* Dashboard: tabs, chart figures, chart marks. One accent (forest); text stays in ink tokens. */
.page--dash .ph { margin-bottom: var(--s-4); }
.page--dash .ph__lead { font-size: var(--t-md); margin-top: var(--s-2); }
.tabs__list { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--ink); margin: var(--s-4) 0 var(--s-4); overflow-x: auto; }
.tabs__tab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-5);
  font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); color: var(--ink-soft); text-decoration: none;
  border: 1px solid transparent; border-bottom: 0; border-radius: var(--r) var(--r) 0 0; margin-bottom: -1px;
  transition: color var(--d-hover) var(--ease);
}
.tabs__tab:hover { color: var(--ink); }
.tabs__tab[aria-selected="true"] { color: var(--ink); background: var(--paper); border-color: var(--ink); border-bottom: 1px solid var(--paper); }
.js .tabs__panel[data-inactive] { display: none; }
.tabs__panel { padding-bottom: var(--s-6); }
.no-js .tabs__panel + .tabs__panel { margin-top: var(--s-8); }

/* The board: one 12-column grid of bordered tiles, half or full width. Tiles in a row share its height. */
.vizgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-4); align-items: stretch; }
.viz {
  margin: 0; min-width: 0; grid-column: span 6; display: flex; flex-direction: column;
  padding: var(--s-4) var(--s-5); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r);
}
.viz--12 { grid-column: 1 / -1; }
.viz__cap { display: grid; gap: 2px; padding-bottom: var(--s-2); border-bottom: 1px solid var(--rule); margin-bottom: var(--s-3); }
.viz__title { margin: 0; font-family: var(--f-head); font-weight: 300; font-size: var(--t-lg); line-height: 1.3; color: var(--ink); }
.viz--table .tablewrap { border-top: 0; }
.viz--table .table thead th { padding-top: 0; }
.viz__note { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
.viz__wait { font-size: var(--t-sm); color: var(--ink-faint); }
.viz__body svg { width: 100%; height: auto; overflow: visible; }
.viz__empty { font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-soft); padding: var(--s-5) 0; }
.caveat { font-size: var(--t-sm); color: var(--ink-2); max-width: var(--measure); padding: var(--s-3) var(--s-4); background: var(--paper-2); border-radius: var(--r); }

/* Chart marks */
.ax line, .ax path { stroke: var(--rule); stroke-width: 1; shape-rendering: crispEdges; }
.ax text, .lbl { font-family: var(--f-ui); font-size: 11px; fill: var(--ink-soft); }
.lbl--strong { fill: var(--ink); font-weight: 500; }
.lbl--val { fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.grid line { stroke: var(--paper-2); stroke-width: 1; }
.mk { fill: var(--forest); }
.mk--hollow { fill: var(--paper); stroke: var(--forest); stroke-width: 1.5; }
.mk--muted { fill: var(--land-2); } /* outside the filters: context, recessive */
.mk--bar { fill: var(--forest); }
.mk--bar-muted { fill: var(--rule); }
.mk--line { stroke: var(--forest-2); stroke-width: 2; stroke-linecap: round; }
.mk--ci { stroke: var(--forest-2); stroke-width: 2; stroke-linecap: round; }
.hit { fill: transparent; cursor: pointer; }
.hit:hover + .mk, .row:hover .mk { fill: var(--forest-press); }
.row--off .mk, .row--off .mk--line { opacity: 0.25; }
.sel .mk { fill: var(--ink); }
[data-chart] .row { cursor: pointer; }
[data-chart] .row:focus-visible { outline: none; }
[data-chart] .row:focus-visible .hit { stroke: var(--focus); stroke-width: 2; }
.legend-strip { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-3); font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
.legend-strip span { display: inline-flex; align-items: center; gap: var(--s-2); }
.legend-strip svg, .viz__body .legend-strip svg { flex: none; width: 12px; height: 12px; }
.vtip {
  position: fixed; z-index: 40; pointer-events: none; max-width: 280px;
  padding: var(--s-2) var(--s-3); background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r);
  font-family: var(--f-ui); font-size: var(--t-xs); line-height: 1.45; color: var(--ink-2);
}
.vtip strong { display: block; color: var(--ink); font-weight: 600; font-size: var(--t-sm); }
.toplist { list-style: none; columns: 2 180px; column-gap: var(--s-6); font-size: var(--t-sm); }
.toplist li { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-1) 0; border-bottom: 1px solid var(--rule); break-inside: avoid; }
.toplist .num { white-space: nowrap; }

@media (max-width: 899px) {
  .vizgrid { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .viz { grid-column: 1 / -1; padding: var(--s-3) var(--s-4); }
}

/* The processor list on a phone: one block per processor (name and altitude, province and COE lots,
   then its processes); the header row stays for screen readers. */
@media (max-width: 599px) {
  .table--procs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table--procs, .table--procs tbody { display: block; }
  .table--procs tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-3); row-gap: 2px;
    grid-template-areas: "name alt" "prov coe" "proc proc"; padding: var(--s-3) 0; border-bottom: 1px solid var(--rule);
  }
  .table--procs th, .table--procs td, .table--procs td:first-child, .table--procs td:last-child { display: block; padding: 0; border: 0; }
  .table--procs .c-name { grid-area: name; font-weight: 700; }
  .table--procs .c-alt { grid-area: alt; }
  .table--procs .c-prov { grid-area: prov; font-size: var(--t-xs); color: var(--ink-soft); }
  .table--procs .c-coe { grid-area: coe; font-size: var(--t-xs); color: var(--ink-soft); }
  .table--procs .c-coe::before { content: attr(data-l) "\00a0"; font-family: var(--f-ui); }
  .table--procs .c-proc { grid-area: proc; margin-top: var(--s-1); }
}

/* Marks added with the charts: the altitude band, row rules, muted hollow dots, counts inside dots. */
.band { fill: var(--forest-tint); }
.rule { stroke: var(--paper-2); stroke-width: 1; }
.mk--hollow.mk--muted-line { stroke: var(--land-2); }
.lbl--in { fill: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; }
[data-chart] .row--static, [data-chart] g[data-tip]:not([data-set]) { cursor: default; }
[data-chart] .cell[data-set] { cursor: pointer; }
.cell:hover .mk:not(.mk--muted) { fill: var(--forest-press); }
.sel .mk, .cell.sel .mk { fill: var(--ink); }
.viz__more { margin: var(--s-2) 0 0; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--ink-soft); }
.dash__count { margin: 0 0 var(--s-4); font-family: var(--f-ui); font-size: var(--t-sm); color: var(--ink-soft); }
.dash__count:empty { display: none; }
.vtip span { display: block; }
.toplist li[data-tip] { cursor: default; }

/* Sourcing and correction forms. */
.steps3 { list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); border-top: 1px solid var(--ink); padding-top: var(--s-5); }
.steps3 li { counter-increment: st; }
.steps3 li::before { content: counter(st); display: block; font-family: var(--f-head); font-weight: 300; font-size: var(--t-3xl); line-height: 1; color: var(--forest); margin-bottom: var(--s-3); }
.steps3 h2 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.steps3 p { font-size: var(--t-sm); color: var(--ink-2); margin: 0; }
@media (max-width: 699px) { .steps3 { grid-template-columns: minmax(0, 1fr); } }

.form { display: grid; gap: var(--s-5); max-width: 720px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
@media (max-width: 599px) { .form__row { grid-template-columns: minmax(0, 1fr); } }
.form .field { display: grid; align-content: start; gap: var(--s-1); margin: 0; min-width: 0; }
.form label, .form legend { font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); color: var(--ink-2); }
.form legend { padding: 0; }
.form input:not([type="checkbox"]):not([type="radio"]), .form select, .form textarea {
  width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3);
  font-family: var(--f-body); font-size: var(--t-md);
  background-color: var(--paper); border: 1px solid var(--edge); border-radius: var(--r);
}
.form select { padding-right: 36px; }
.form textarea { resize: vertical; line-height: 1.5; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { border-color: var(--ink); }
.form [aria-invalid="true"] { border-color: var(--error); }
.err { font-family: var(--f-ui); font-size: var(--t-xs); color: var(--error); margin: 0; }
.hint { font-size: var(--t-xs); color: var(--ink-soft); margin: 0; }
.req { font-weight: 400; font-size: var(--t-xs); color: var(--ink-faint); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.field--processors { border-top: 1px solid var(--rule) !important; padding-top: var(--s-3) !important; }
.checkgroup { margin-top: var(--s-3); columns: 2 220px; column-gap: var(--s-5); }
.checkgroup__h { column-span: all; font-family: var(--f-ui); font-weight: 600; font-size: var(--t-xs); color: var(--ink-soft); margin: 0 0 var(--s-1); }
.checkgroup .check { display: flex; break-inside: avoid; }
.field--radios { display: flex !important; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.field--radios legend { width: 100%; margin-bottom: var(--s-1); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__privacy { font-size: var(--t-xs); color: var(--ink-soft); margin: 0; }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.form__status { font-family: var(--f-ui); font-size: var(--t-sm); margin: 0; min-height: 1.5em; }
.form__status--ok { color: var(--forest); }
.form__status--fail { color: var(--error); }
/* Without JavaScript the form cannot post JSON: the WhatsApp or email link is the way to send. */
.form__nojs { font-size: var(--t-xs); color: var(--ink-2); margin: 0; }
.js .form__nojs, .no-js .form [type="submit"] { display: none; }
.form[aria-busy="true"] [type="submit"] { cursor: progress; }

/* Reading pages: methodology, 404. */
.toc { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: var(--s-4) 0; margin-bottom: var(--s-6); }
.toc__h { font-family: var(--f-ui); font-weight: 600; font-size: var(--t-xs); color: var(--ink-soft); margin-bottom: var(--s-2); }
.toc ol { columns: 2 220px; column-gap: var(--s-6); padding-left: 1.4em; font-size: var(--t-sm); }
.toc li { padding: 2px 0; }
.prose { max-width: var(--measure); }
.prose section { margin-bottom: var(--s-6); }
.prose h2 { font-size: var(--t-xl); margin-top: var(--s-6); }
.prose p { line-height: 1.7; }
.nf { padding-top: var(--s-9); padding-bottom: var(--s-9); }
.nf p:last-child { display: flex; flex-wrap: wrap; gap: var(--s-3); }
