/* ==========================================================================
   Dollar Compass — design system
   A calmer, friendlier scorecard for "voting with your dollars".
   Pure CSS, no build step. Works from any folder on a static host.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand palette — forest + warm sand + sunrise gold */
  --forest-900: #0d2b25;
  --forest-800: #123a30;
  --forest-700: #175045;
  --forest-600: #1d6a58;
  --forest-500: #27876f;
  --forest-400: #45a98d;
  --forest-300: #7cc9b1;
  --forest-100: #d8f0e7;
  --forest-50: #eef9f5;

  --sand-50: #fdfaf4;
  --sand-100: #faf3e6;
  --sand-200: #f2e6d1;
  --sand-300: #e6d3b3;

  --gold-600: #a97517;
  --gold-500: #d29922;
  --gold-400: #e8b93f;
  --gold-100: #fbeecd;

  --sky-600: #2a6f97;
  --sky-500: #3d8fbd;
  --sky-100: #dceef8;

  --clay-600: #a64b2a;
  --clay-100: #fbe3d8;

  --berry-600: #7d3c63;
  --berry-100: #f6e2ee;

  /* Neutrals */
  --ink: #14211d;
  --ink-soft: #3d4f49;
  --ink-muted: #64766f;
  --line: #e3e6e0;
  --line-strong: #cfd6ce;
  --paper: #ffffff;
  --paper-2: #fbfcfa;

  /* Grade ramp — honest but not shouty */
  --grade-a: #1a7f5a;
  --grade-a-bg: #e2f4ec;
  --grade-b: #4f9c2f;
  --grade-b-bg: #e9f5df;
  --grade-c: #b8871a;
  --grade-c-bg: #fbf1d8;
  --grade-d: #c35f27;
  --grade-d-bg: #fbe8dd;
  --grade-f: #a23434;
  --grade-f-bg: #f8e2e2;
  --grade-na: #71807b;
  --grade-na-bg: #eceeec;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", monospace;

  /* Space + shape */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(13, 43, 37, .06);
  --shadow-sm: 0 2px 8px rgba(13, 43, 37, .07);
  --shadow: 0 10px 26px -12px rgba(13, 43, 37, .22);
  --shadow-lg: 0 26px 50px -22px rgba(13, 43, 37, .32);

  --ease: cubic-bezier(.22, .68, .36, 1);
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--forest-900);
  margin: 0 0 .5em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

h1 { font-size: clamp(2.1rem, 1.4rem + 3.1vw, 3.7rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
h3 { font-size: clamp(1.18rem, 1.05rem + .55vw, 1.5rem); }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; letter-spacing: -.005em; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
a { color: var(--forest-700); text-underline-offset: 2px; }
a:hover { color: var(--forest-500); }
img { max-width: 100%; display: block; }
strong { font-weight: 650; }
small { font-size: .84rem; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--forest-300); color: var(--forest-900); }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.section { padding: clamp(52px, 7vw, 96px) 0; }
.section-tight { padding: clamp(36px, 4.5vw, 60px) 0; }
.alt-bg { background: var(--paper); }
.sand-bg { background: var(--sand-100); }
.forest-bg { background: var(--forest-900); color: var(--forest-100); }
.forest-bg h1, .forest-bg h2, .forest-bg h3 { color: #fff; }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.center-x { display: flex; flex-direction: column; align-items: center; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--forest-800); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 10px; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- 4. Eyebrow / lede / prose ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--forest-600);
  margin-bottom: .9em;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.forest-bg .eyebrow { color: var(--forest-300); }

.lede { font-size: clamp(1.06rem, 1rem + .4vw, 1.3rem); color: var(--ink-soft); line-height: 1.6; }
.section-intro { max-width: 68ch; }
.section-intro.center { margin-inline: auto; }

/* ---------- 5. Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(253, 250, 244, .88);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 68px; padding-block: 10px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.16rem; color: var(--forest-900);
  text-decoration: none; letter-spacing: -.02em; flex: 0 0 auto;
}
.brand:hover { color: var(--forest-700); }
.brand__mark {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  background: radial-gradient(120% 120% at 20% 15%, var(--forest-400), var(--forest-700) 60%, var(--forest-900));
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), var(--shadow-xs);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__sub {
  display: block; font-family: var(--font-body); font-weight: 500;
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-muted);
}

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block; padding: 9px 13px; border-radius: var(--radius-pill);
  font-size: .92rem; font-weight: 550; color: var(--ink-soft); text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.nav__link:hover { background: var(--forest-50); color: var(--forest-800); }
.nav__link[aria-current="page"] { background: var(--forest-100); color: var(--forest-800); font-weight: 650; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--paper); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px;
  background: var(--forest-800); border-radius: 2px; transition: transform .2s var(--ease);
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(4px); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 10px 20px 18px;
    display: none;
  }
  .nav[data-open="true"] { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { padding: 13px 14px; font-size: 1rem; border-radius: var(--radius-sm); }
}

/* Eight primary links is a lot for a mid-size laptop. Tighten the header
   between the hamburger breakpoint and the full desktop width so the nav
   never wraps or overflows before it collapses into the menu. */
@media (min-width: 901px) and (max-width: 1200px) {
  .site-header__inner { gap: 10px; }
  .nav__link { padding: 9px 9px; font-size: .86rem; }
  .brand { font-size: 1.06rem; }
  .brand__sub { display: none; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  --btn-bg: var(--forest-700);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-size: .95rem; font-weight: 650;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
  box-shadow: var(--shadow-sm); line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn--gold { --btn-bg: var(--gold-500); --btn-fg: #2a1d02; }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--forest-800);
  border-color: var(--line-strong); box-shadow: none;
}
.btn--ghost:hover { background: var(--paper); border-color: var(--forest-400); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--forest-800); }
.btn--sm { padding: 9px 15px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.chip-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--paper); border: 1px solid var(--line-strong);
  font-size: .85rem; font-weight: 550; color: var(--ink-soft);
  text-decoration: none; transition: border-color .16s, color .16s, background .16s;
}
.chip-link:hover { border-color: var(--forest-400); color: var(--forest-800); background: var(--forest-50); }

/* ---------- 7. Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(46px, 6vw, 84px) clamp(56px, 7vw, 100px); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 55% at 82% 8%, rgba(232, 185, 63, .18), transparent 62%),
    radial-gradient(65% 60% at 8% 92%, rgba(69, 169, 141, .22), transparent 60%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; gap: clamp(34px, 4vw, 56px); align-items: center; }
@media (min-width: 940px) { .hero__inner { grid-template-columns: 1.08fr .92fr; } }
.hero h1 { margin-bottom: .45em; }
.hero h1 .hl {
  background: linear-gradient(180deg, transparent 58%, var(--forest-300) 58%);
  padding-inline: 2px;
}
.hero__actions { margin-top: 1.8rem; }
.hero__note {
  margin-top: 1.1rem; font-size: .87rem; color: var(--ink-muted);
  display: flex; align-items: flex-start; gap: 8px;
}
.hero__note svg { flex: 0 0 16px; margin-top: 3px; color: var(--forest-500); }

.hero__panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-lg);
}
.hero__panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hero__panel-head h3 { margin: 0; font-size: 1.06rem; }
.hero__panel-head span { font-size: .76rem; color: var(--ink-muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- 8. Grade badges & rings ---------- */
.grade {
  --g: var(--grade-c); --gb: var(--grade-c-bg);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 10px; background: var(--gb); color: var(--g);
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  border: 1px solid color-mix(in srgb, var(--g) 24%, transparent);
}
.grade--a { --g: var(--grade-a); --gb: var(--grade-a-bg); }
.grade--b { --g: var(--grade-b); --gb: var(--grade-b-bg); }
.grade--c { --g: var(--grade-c); --gb: var(--grade-c-bg); }
.grade--d { --g: var(--grade-d); --gb: var(--grade-d-bg); }
.grade--f { --g: var(--grade-f); --gb: var(--grade-f-bg); }
.grade--na { --g: var(--grade-na); --gb: var(--grade-na-bg); }

.ring {
  --val: 0; --ring-size: 74px; --ring-w: 7px;
  --rc: var(--forest-500);
  position: relative; width: var(--ring-size); height: var(--ring-size);
  flex: 0 0 var(--ring-size); border-radius: 50%;
  background:
    conic-gradient(var(--rc) calc(var(--val) * 1%), var(--line) 0);
  display: grid; place-items: center;
}
.ring::after {
  content: ""; position: absolute; inset: var(--ring-w);
  background: var(--paper); border-radius: 50%;
}
.ring__label {
  position: relative; z-index: 1; font-family: var(--font-display);
  font-weight: 700; font-size: calc(var(--ring-size) * .3);
  color: var(--forest-900); line-height: 1;
}
.ring--a { --rc: var(--grade-a); } .ring--b { --rc: var(--grade-b); }
.ring--c { --rc: var(--grade-c); } .ring--d { --rc: var(--grade-d); }
.ring--f { --rc: var(--grade-f); } .ring--na { --rc: var(--grade-na); }
.ring--lg { --ring-size: 132px; --ring-w: 11px; }

/* ---------- 9. Cards ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-xs); height: 100%;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--forest-300); }

.company-card { position: relative; }
.company-card__top { display: flex; align-items: flex-start; gap: 14px; }
.company-card__score { text-align: center; flex: 0 0 auto; }
.company-card__score b {
  display: block; font-family: var(--font-display); font-size: 1.5rem;
  color: var(--forest-800); line-height: 1;
}
.company-card__score small { font-size: .64rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-muted); font-weight: 650; }
.company-card h3 { margin: 0 0 3px; font-size: 1.16rem; }
.company-card h3 a { color: inherit; text-decoration: none; }
.company-card h3 a:hover { color: var(--forest-600); text-decoration: underline; }
.company-card__meta { font-size: .8rem; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 5px 10px; }
.company-card__tagline { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.company-card__foot { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--forest-600);
}
.mini-bars { display: grid; gap: 4px; margin-top: 2px; }
.mini-bar { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; font-size: .74rem; color: var(--ink-muted); }
.mini-bar__track { height: 5px; background: var(--line); border-radius: 4px; overflow: hidden; }
/* `display: block` is load-bearing, not cosmetic. This element is a <span>, so
   without it the box is INLINE — and inline boxes ignore height and width.
   The fill then collapsed to zero and the track rendered as a bare grey line. */
.mini-bar__fill { display: block; height: 100%; border-radius: 4px; background: var(--forest-400); }
.mini-bar__fill--a { background: var(--grade-a); }
.mini-bar__fill--b { background: var(--grade-b); }
.mini-bar__fill--c { background: var(--grade-c); }
.mini-bar__fill--d { background: var(--grade-d); }
.mini-bar__fill--f { background: var(--grade-f); }
.mini-bar__fill--na { background: var(--grade-na); }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: .72rem; font-weight: 600; padding: 4px 9px;
  border-radius: var(--radius-pill); background: var(--forest-50);
  color: var(--forest-700); border: 1px solid var(--forest-100);
}
.badge--gold { background: var(--gold-100); color: var(--gold-600); border-color: #f0dfae; }
.badge--sky { background: var(--sky-100); color: var(--sky-600); border-color: #c6e2f1; }
.badge--muted { background: var(--paper-2); color: var(--ink-muted); border-color: var(--line); }
.badge--clay { background: var(--clay-100); color: var(--clay-600); border-color: #f3cfbe; }

/* Source-coverage marker: how many independent assessments back a score.
   A single-source score is shown in a muted style so it reads as "thinner
   evidence", never as a worse company. */
.source-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 650; line-height: 1.2;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--forest-50); color: var(--forest-700);
  border: 1px solid var(--forest-100); white-space: nowrap;
}
.source-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--forest-400); flex: 0 0 6px;
}
.source-badge--solid { background: #e6f4ec; color: #14513a; border-color: #bfe3d3; }
.source-badge--solid::before { background: var(--grade-a); }
.source-badge--single { background: var(--paper-2); color: var(--ink-muted); border-color: var(--line-strong); }
.source-badge--single::before { background: var(--grade-na); }

/* Evidence row: names WHO did the looking, not just how many sources, so a
   visitor can tell a score resting on our own reading alone from one that
   independent organisations have also checked. */
.evidence-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 9px 11px; margin-top: 12px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: #fbfcfa;
}
.evidence-row__label {
  font-size: .68rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-muted);
}
.evidence-row__who {
  font-size: .76rem; color: var(--ink-soft); line-height: 1.35;
  min-width: 0; flex: 1 1 12ch;
}

/* ---------- 10. Score bars ---------- */
.score-row { display: grid; gap: 6px; padding-block: 11px; border-bottom: 1px dashed var(--line); }
.score-row:last-child { border-bottom: 0; }
.score-row__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.score-row__label { font-size: .92rem; font-weight: 600; color: var(--forest-900); }
.score-row__val { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-muted); }
.score-track { height: 9px; background: var(--line); border-radius: 6px; overflow: hidden; }
/* Same inline-span trap as .mini-bar__fill above — see that note. */
.score-fill { display: block; height: 100%; border-radius: 6px; transition: width .8s var(--ease); background: var(--forest-400); }
.score-fill--a { background: var(--grade-a); } .score-fill--b { background: var(--grade-b); }
.score-fill--c { background: var(--grade-c); } .score-fill--d { background: var(--grade-d); }
.score-fill--f { background: var(--grade-f); }
.score-row__note { font-size: .82rem; color: var(--ink-muted); margin: 0; }

/* ---------- 10b. Composite / partner rating rows ---------- */
.partner-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.partner-row:last-child { border-bottom: 0; }
.partner-row--total {
  margin-top: 6px; padding-top: 16px;
  border-top: 2px solid var(--forest-200, var(--line-strong));
  border-bottom: 0;
}
.partner-row__logo {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 12px; display: grid; place-items: center;
  background: var(--forest-50); color: var(--forest-700);
  font-family: var(--font-display); font-weight: 700; font-size: .82rem;
  border: 1px solid var(--forest-100);
}
.partner-row__body { min-width: 0; display: block; }
.partner-row__body strong { display: block; font-size: .95rem; color: var(--forest-900); line-height: 1.3; }
.partner-row__meta { display: block; font-size: .8rem; color: var(--ink-muted); line-height: 1.4; }
.partner-row__val {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--forest-800); text-align: right; white-space: nowrap;
}
.partner-row__w {
  font-family: var(--font-mono); font-size: .76rem; color: var(--ink-muted);
  background: var(--sand-100); border-radius: var(--radius-pill);
  padding: 3px 9px; white-space: nowrap;
}
.partner-row--total .partner-row__val { color: var(--forest-600); font-size: 1.35rem; }
@media (max-width: 560px) {
  .partner-row { grid-template-columns: 38px 1fr auto; gap: 10px; }
  .partner-row__w { display: none; }
  .partner-row__logo { width: 38px; height: 38px; flex-basis: 38px; font-size: .74rem; }
}

/* ---------- 10c. Method-basis cards (about page) ---------- */
.method-basis {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.method-basis__logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  display: grid; place-items: center; background: var(--forest-50);
  color: var(--forest-700); font-family: var(--font-display);
  font-weight: 700; font-size: .76rem; border: 1px solid var(--forest-100);
}
.method-basis strong { display: block; font-size: .92rem; color: var(--forest-900); }
.method-basis span.meta { display: block; font-size: .78rem; color: var(--ink-muted); }

/* ---------- 11. Forms & filters ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: .88rem; font-weight: 650; color: var(--forest-900); }
.field .hint { font-size: .78rem; color: var(--ink-muted); }
input[type="text"], input[type="url"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--paper);
  width: 100%; transition: border-color .16s, box-shadow .16s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--forest-400);
  box-shadow: 0 0 0 4px rgba(69, 169, 141, .16);
}
textarea { min-height: 110px; resize: vertical; }
select {
  appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364766f' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
}
.field-row { display: grid; gap: 16px; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }
.checkbox-line { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); }
.checkbox-line input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--forest-600); flex: 0 0 18px; }

.filter-bar {
  display: grid; gap: 12px; align-items: end;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-xs);
}
@media (min-width: 780px) { .filter-bar { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.filter-bar .field { margin: 0; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-muted); }
.search-wrap input { padding-left: 38px; }

.form-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow-sm);
}
.form-status {
  margin-top: 16px; padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; display: none;
}
.form-status[data-state="success"] { display: block; background: var(--grade-a-bg); color: #14513a; border: 1px solid #bfe3d3; }
.form-status[data-state="error"] { display: block; background: var(--grade-f-bg); color: #7d2626; border: 1px solid #eec4c4; }
.form-status[data-state="info"] { display: block; background: var(--sky-100); color: #1d5470; border: 1px solid #c6e2f1; }

/* ---------- 12. Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 620px; }
thead th {
  text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700; padding: 13px 16px;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--forest-50); }

/* ---------- 13. Directional "swaps" ---------- */
.swap {
  display: grid; gap: 12px; align-items: center;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px;
}
@media (min-width: 700px) { .swap { grid-template-columns: 1fr auto 1fr; } }
.swap__side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.swap__arrow { display: grid; place-items: center; color: var(--forest-500); }
.swap__name { font-weight: 650; font-size: .95rem; }
.swap__why { font-size: .8rem; color: var(--ink-muted); }

/* ---------- 14. Steps / lists ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step__num {
  counter-increment: step; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; background: var(--forest-100);
  color: var(--forest-800); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
}
.step__num::before { content: counter(step); }
.step h3 { margin-bottom: .25em; font-size: 1.14rem; }

.check-list, .dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li, .dash-list li { display: grid; grid-template-columns: 20px 1fr; gap: 11px; font-size: .95rem; align-items: start; }
.check-list svg { color: var(--grade-a); margin-top: 4px; }
.dash-list svg { color: var(--gold-600); margin-top: 4px; }
.dash-list li { color: var(--ink-soft); }

.callout {
  border-radius: var(--radius); padding: 18px 20px;
  background: var(--forest-50); border: 1px solid var(--forest-100);
  font-size: .93rem; color: var(--forest-800);
}
.callout--gold { background: var(--gold-100); border-color: #f0dfae; color: #6b4a0d; }
.callout--sky { background: var(--sky-100); border-color: #c6e2f1; color: #1d5470; }
.callout h4 { margin-bottom: .35em; }

/* ---------- 15. Stat tiles ---------- */
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-xs);
}
.stat__num { font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); color: var(--forest-700); line-height: 1.05; }
.stat__label { font-size: .84rem; color: var(--ink-muted); margin-top: 4px; }

/* ---------- 16. Steps of ripple / impact chain ---------- */
.chain { display: grid; gap: 14px; }
@media (min-width: 860px) { .chain { grid-template-columns: repeat(4, 1fr); } }
.chain__item {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 20px; position: relative;
}
.chain__item span {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-400);
  display: block; margin-bottom: 6px;
}
.chain__item p { font-size: .88rem; color: var(--forest-100); margin: 0; }

/* ---------- 17. Accordion ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.acc + .acc { margin-top: 10px; }
.acc summary {
  cursor: pointer; padding: 16px 18px; font-weight: 650; font-size: 1rem;
  color: var(--forest-900); display: flex; align-items: center; gap: 12px;
  list-style: none; font-family: var(--font-body);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; flex: 0 0 10px;
  border-right: 2px solid var(--forest-500); border-bottom: 2px solid var(--forest-500);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease);
}
.acc[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.acc__body { padding: 0 18px 18px; font-size: .94rem; color: var(--ink-soft); }

/* ---------- 18. Empty / loading ---------- */
.empty-state {
  text-align: center; padding: 46px 22px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius); background: var(--paper); color: var(--ink-muted);
}
.skeleton {
  border-radius: var(--radius); background: linear-gradient(90deg, var(--line) 25%, var(--paper-2) 37%, var(--line) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 19. Footer ---------- */
.site-footer { background: var(--forest-900); color: var(--forest-100); padding: clamp(40px, 5vw, 68px) 0 28px; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: var(--forest-100); text-decoration: none; font-size: .9rem; }
.site-footer a:hover { color: var(--gold-400); text-decoration: underline; }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-about { font-size: .9rem; color: rgba(216, 240, 231, .78); max-width: 42ch; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 12px 22px; justify-content: space-between;
  font-size: .8rem; color: rgba(216, 240, 231, .7);
}
.footer-bottom p { margin: 0; }

/* ---------- 20. Detail page ---------- */
.detail-head {
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding-block: clamp(26px, 3.4vw, 44px);
}
.detail-head__grid { display: grid; gap: 26px; align-items: center; }
@media (min-width: 820px) { .detail-head__grid { grid-template-columns: 1fr auto; } }
.detail-head__title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.detail-head__title h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); margin: 0; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: var(--ink-muted); margin: 0 0 14px; }
.detail-meta strong { color: var(--ink-soft); font-weight: 600; }

.verdict {
  border-left: 4px solid var(--forest-400); padding: 4px 0 4px 18px;
  font-size: 1.03rem; color: var(--ink-soft);
}
.kv { display: grid; gap: 14px; }
.kv--2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kv__item { font-size: .92rem; }
.kv__item dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; margin-bottom: 3px; }
.kv__item dd { margin: 0; color: var(--ink-soft); }

.chart-box { height: 320px; width: 100%; }
@media (max-width: 520px) { .chart-box { height: 280px; } }

.sticky-note {
  background: var(--gold-100); border: 1px solid #f0dfae; border-radius: var(--radius);
  padding: 18px; font-size: .92rem; color: #6b4a0d;
}
.sticky-note h4 { color: #6b4a0d; margin-bottom: .4em; }

/* ---------- 21. Planner ---------- */
.planner-grid { display: grid; gap: 24px; }
@media (min-width: 880px) { .planner-grid { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.planner-result {
  background: var(--forest-900); color: var(--forest-100);
  border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 90px;
}
.planner-result h3 { color: #fff; }
.planner-total { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); color: var(--gold-400); line-height: 1; }
.planner-lines { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.planner-lines li { display: flex; justify-content: space-between; gap: 14px; font-size: .9rem; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
.planner-lines li span:last-child { font-family: var(--font-mono); color: #fff; white-space: nowrap; }

/* ---------- 22. Resource links ---------- */
.link-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 17px; text-decoration: none;
  box-shadow: var(--shadow-xs); transition: transform .16s var(--ease), border-color .16s, box-shadow .16s;
  height: 100%;
}
.link-card:hover { transform: translateY(-2px); border-color: var(--forest-300); box-shadow: var(--shadow); }
.link-card__icon {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  background: var(--forest-50); color: var(--forest-700); display: grid; place-items: center;
  font-size: 1rem; font-weight: 700; font-family: var(--font-display);
}
.link-card strong { display: block; color: var(--forest-900); font-size: .98rem; }
.link-card span.desc { display: block; font-size: .85rem; color: var(--ink-muted); margin-top: 3px; }
.link-card .ext { margin-left: auto; color: var(--ink-muted); flex: 0 0 auto; }

/* ---------- 22b. Local finders (farmers markets, credit unions) ---------- */
.finder-panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow-sm);
}
.finder-form {
  display: grid; gap: 12px; align-items: end;
}
@media (min-width: 720px) { .finder-form { grid-template-columns: 1.5fr .9fr auto; } }
.finder-form .field { margin: 0; }

.finder-status {
  margin-top: 16px; padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: .9rem; border: 1px solid var(--line);
  background: var(--paper-2); color: var(--ink-soft);
}
.finder-status[hidden] { display: none; }
.finder-status[data-state="error"] { background: var(--grade-f-bg); color: #7d2626; border-color: #eec4c4; }
.finder-status[data-state="info"] { background: var(--sky-100); color: #1d5470; border-color: #c6e2f1; }

.finder-centre {
  margin: 20px 0 0; font-size: .92rem; color: var(--ink-soft);
}
.finder-centre__note { color: var(--ink-muted); font-size: .82rem; }
.finder-subhead { margin: 32px 0 4px; font-size: 1.14rem; }
.finder-subhead__note { font-size: .85rem; color: var(--ink-muted); max-width: 70ch; }

.place-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 660px) { .place-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .place-grid { grid-template-columns: repeat(3, 1fr); } }

.place {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 17px;
  box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 8px;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s;
}
.place:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--forest-300); }
.place__head { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; }
.place__name { margin: 0; font-size: 1.05rem; }
.place__dist {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: .76rem; font-weight: 600;
  color: var(--forest-700); background: var(--forest-50);
  border: 1px solid var(--forest-100); border-radius: var(--radius-pill);
  padding: 3px 9px; white-space: nowrap;
}
.place__addr { margin: 0; font-size: .84rem; color: var(--ink-muted); }
.place__meta { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.place__hours { font-family: var(--font-mono); font-size: .78rem; color: var(--forest-700); }
.place__note { margin: 0; font-size: .8rem; color: var(--gold-600); }
.place__links { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.place__links .chip-link { font-size: .8rem; padding: 6px 11px; }
.place--skeleton { gap: 0; }
.place--skeleton:hover { transform: none; box-shadow: var(--shadow-xs); border-color: var(--line); }

.osm-credit { margin-top: 22px; font-size: .76rem; color: var(--ink-muted); }

.benefit-grid { display: grid; gap: 18px; margin-top: 8px; }
@media (min-width: 700px) { .benefit-grid { grid-template-columns: repeat(3, 1fr); } }
.benefit {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-xs);
}
.benefit__num {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--forest-100); color: var(--forest-800); margin-bottom: 10px;
}
.benefit h3 { font-size: 1.02rem; margin-bottom: .35em; }
.benefit p { font-size: .89rem; color: var(--ink-soft); margin: 0; }

/* ---------- 23. Progress & misc ---------- */
.progress-line { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress-line > i { display: block; height: 100%; background: var(--gold-500); border-radius: 6px; }

.marquee-note {
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center;
  font-size: .82rem; color: var(--ink-muted);
}
.tag { display: inline-block; font-size: .78rem; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--sand-100); color: var(--ink-soft); }

/* ---------- 26. Partner banner (external link-out) ---------- */
/* A labelled, disclosed link to a like-minded service. It is framed as an
   explicit EXTERNAL link rather than a blended-in endorsement, because the
   site's whole argument is that a claim should travel with its source — so a
   partner placement says so on its face, in the banner header, rather than
   arriving dressed up as our own editorial. */
.partner-banner {
  margin-top: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.partner-banner__label {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0; padding: 11px 16px;
  font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--forest-700); background: var(--forest-50);
  border-bottom: 1px solid var(--forest-100);
}
.partner-banner__label .badge { text-transform: none; letter-spacing: 0; }
/* line-height:0 kills the inline-image baseline gap so no sliver of the dark
   plate shows beneath the artwork. */
.partner-banner__link { display: block; line-height: 0; background: var(--forest-900); }
.partner-banner__link img { width: 100%; height: auto; display: block; }
.partner-banner__link:focus-visible { outline: 3px solid var(--gold-500); outline-offset: -3px; }
.partner-banner__body { padding: 18px; display: grid; gap: 14px; }
.partner-banner__body p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.partner-banner__fine {
  border-top: 1px dashed var(--line); padding-top: 14px;
  font-size: .73rem; line-height: 1.6; color: var(--ink-muted);
}
.partner-banner__fine p { font-size: inherit; margin: 0 0 .6em; }
.partner-banner__fine p:last-child { margin-bottom: 0; }

/* Affiliate-link notice inside the banner. Deliberately LOUDER than the legal
   boilerplate around it: this is the disclosure that matters most, so it takes
   the clay accent rather than the muted grey used for fine print.
   Specificity is `p.partner-banner__note` so it beats the
   `.partner-banner__body p` size rule. */
.partner-banner__body p.partner-banner__note {
  background: var(--clay-100); border: 1px solid #f3cfbe; color: #6b2a12;
  border-radius: var(--radius-sm); padding: 13px 15px; font-size: .86rem;
}
.partner-banner__note strong { color: #5a2210; }

/* ---------- 24. Print ---------- */
@media print {
  .site-header, .site-footer, .btn, .filter-bar, .skip-link, .hero__panel { display: none !important; }
  body { background: #fff; font-size: 11.5pt; }
  .card, .form-card { break-inside: avoid; box-shadow: none; border-color: #bbb; }
  .section { padding: 14px 0; }
}

/* ---------- 25. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
