/* Vegans for AI: design tokens, base styles and components.
   Reference: /styleguide/ and design/DESIGN.md. Mobile first. */

/* Self-hosted variable fonts. No third-party requests. SIL OFL. */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  /* Site accent: marigold, the color of the three nodes in the logo mark. It
     is final, no longer interim. To change the accent, edit only these seven
     lines and the seven at the top of the dark block below, plus
     design/og.html and public/favicon.svg. Nothing else in the CSS, pages or
     charts hardcodes it. Contrast targets (WCAG): --on-accent on --accent and
     --accent-hover 4.5:1; --accent-ink on paper, surface, surface-2 and
     --accent-wash 4.5:1; --accent-line on paper, surface and surface-2 3:1.
     --accent-paper is the flat hero cut-out and never carries text. */
  --accent: #e0b13a;
  --accent-hover: #cf9f2a;
  --accent-line: #a37b14;
  --accent-ink: #7d5a08;
  --accent-wash: #f8eed3;
  --accent-paper: #eed698;
  --on-accent: #141413;
  /* Logo mark leaf on the page background (the nodes use --accent). */
  --mark-leaf: var(--forest);
  /* Older names for the primary button; they follow the accent tokens. */
  --sun: var(--accent);
  --sun-hover: var(--accent-hover);
  --on-sun: var(--on-accent);
  --paper: #faf9f5;
  --surface: #fdfcf8;
  --surface-2: #f0eee6;
  --ink: #141413;
  --ink-2: #494740;
  --ink-3: #666158;
  --line: #dcd8ce;
  --line-strong: #898276;
  /* Muted greens, separate from chart semantics. */
  --forest: #304b3e;
  --leaf: #68795b;
  --sage-paper: #d7decc;
  --on-forest: #faf9f5;
  --forest-muted: #d8dfd3;
  /* Legacy token names are retained for existing pages and script hooks.
     --beet is the animal agriculture brick red. */
  --beet: #9a3f38;
  --beet-ink: #84302b;
  --beet-wash: #f4e3e1;
  --turmeric: #68795b;
  --turmeric-ink: #4b603e;
  --turmeric-wash: #e8ecdf;
  --v-true: #68795b; --v-true-ink: #4b603e; --v-true-wash: #e8ecdf;
  --v-rough: #766a42; --v-rough-ink: #5c5430; --v-rough-wash: #edebdb;
  --v-mislead: #9a3f38; --v-mislead-ink: #84302b; --v-mislead-wash: #f4e3e1;
  --v-unsourced: #797166; --v-unsourced-ink: #5e584f; --v-unsourced-wash: #f0eee6;
  --danger: #a2312c;
  --viz-surface: #fdfcf8;
  --viz-ai: #5b7987;
  --viz-animal: #9a3f38;
  --viz-plant: #68795b;
  --viz-other: #797166;
  --viz-grid: #e3dfd6;
  --viz-axis: #898276;
  --viz-wash-opacity: 0.16;
  --ai-ink: #415e6a;
  --ai-wash: #e5ecee;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  --step-hero: clamp(2.75rem, 1.8rem + 4vw, 5.25rem);
  --leading: 1.7;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --gutter: 1rem;
  --measure: 38rem;
  --wide: 72rem;

  --radius-s: 5px;
  --radius-m: 8px;
  --radius-l: 10px;
  --shadow-card: none;
  --shadow-pop: 0 2px 8px rgba(20, 20, 19, 0.08);
}
/* Light is the default, including when scripts or storage are unavailable. */
:root[data-theme="dark"] {
  color-scheme: dark;
  /* Site accent, dark theme. See the note in the light block above. */
  --accent: #e0b13a;
  --accent-hover: #cf9f2a;
  --accent-line: #e0b13a;
  --accent-ink: #ecc869;
  --accent-wash: #433a1c;
  --accent-paper: #5c4c22;
  --on-accent: #141413;
  /* Logo mark leaf on dark paper: the pale sage paper tone of the light theme. */
  --mark-leaf: #d7decc;
  --paper: #1f1e1d;
  --surface: #282725;
  --surface-2: #33312d;
  --ink: #faf9f5;
  --ink-2: #ded9ce;
  --ink-3: #beb7aa;
  --line: #49453e;
  --line-strong: #938b7e;
  --forest: #283f34;
  --leaf: #afbd9f;
  --sage-paper: #414b39;
  --on-forest: #faf9f5;
  --forest-muted: #d8dfd3;
  --beet: #c4746f;
  --beet-ink: #ebb5b0;
  --beet-wash: #46302e;
  --turmeric: #afbd9f;
  --turmeric-ink: #c0cdb1;
  --turmeric-wash: #333c2e;
  --v-true: #afbd9f; --v-true-ink: #c0cdb1; --v-true-wash: #333c2e;
  --v-rough: #bdb185; --v-rough-ink: #d6cfa8; --v-rough-wash: #3c3a2a;
  --v-mislead: #c4746f; --v-mislead-ink: #ebb5b0; --v-mislead-wash: #46302e;
  --v-unsourced: #bcb3a5; --v-unsourced-ink: #ded6c8; --v-unsourced-wash: #3a3732;
  --danger: #eda7ab;
  --viz-surface: #282725;
  --viz-ai: #9bb6c1;
  --viz-animal: #c4746f;
  --viz-plant: #afbd9f;
  --viz-other: #bcb3a5;
  --viz-grid: #403c36;
  --viz-axis: #938b7e;
  --viz-wash-opacity: 0.24;
  --ai-ink: #b3cbd4;
  --ai-wash: #2d3c42;
  --shadow-card: none;
  --shadow-pop: 0 2px 8px rgba(20, 20, 19, 0.08);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--space-5); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  /* Subtle texture is behind the text, never an overlay over glyphs. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' opacity='.025' filter='url%28%23grain%29' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading);
  font-kerning: normal;
  overflow-wrap: anywhere;
}
main { min-width: 0; width: 100%; flex: 1 0 auto; padding-bottom: var(--space-8); }
img, svg { max-width: 100%; height: auto; }
img { background: var(--forest); color: var(--on-forest); }
table, .chart, .stat__value, output { font-variant-numeric: tabular-nums; }
.grid > *, .hero--split > *, .estimator > *, .home-story > *, .chart__body > *, .field, .form, .site-header__inner > * { min-width: 0; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1.18;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.3;
}
h4 { font-family: var(--font-display); font-size: var(--step-0); font-weight: 500; line-height: 1.4; }
p, ul, ol, dl, blockquote, figure, table, pre { margin: 0; }
* + p, * + ul, * + ol, * + dl, * + blockquote, * + table { margin-top: var(--space-4); }
li + li { margin-top: var(--space-2); }
ul, ol { padding-left: 1.4em; }
strong, b { font-weight: 750; }
small { font-size: var(--step--1); }

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 3px;
}
::selection { background: var(--accent); color: var(--on-accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-7) 0; }
code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9em; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
pre {
  background: var(--surface-2);
  border-radius: var(--radius-m);
  padding: var(--space-4);
  overflow-x: auto;
  font-size: var(--step--1);
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -10rem;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-s);
  font-weight: 700;
}
.skip-link:focus { top: var(--space-3); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.page { padding-block: var(--space-6) var(--space-8); }
.section { margin-top: var(--space-8); }
.section > * + * { margin-top: var(--space-5); }
.section.section--flush { margin-top: var(--space-6); }
.section > h2 + * { margin-top: var(--space-4); }
.section__intro { max-width: var(--measure); color: var(--ink-2); }
.prose { max-width: var(--measure); }
.prose > * + h2 { margin-top: var(--space-7); }
.prose > * + h3 { margin-top: var(--space-6); }
.prose > h2 + *, .prose > h3 + * { margin-top: var(--space-3); }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink); max-width: var(--measure); }
.stack > * + * { margin-top: var(--space-5); }
.grid { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
.grid > * { margin-top: 0; }

@media (min-width: 40rem) {
  :root { --gutter: 2rem; --step-0: 1.1875rem; --step-1: 1.375rem; --step-2: 1.75rem; --step-3: 2.375rem; }
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding-block: var(--space-7) var(--space-9); }
}
@media (min-width: 60rem) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section { margin-top: var(--space-9); }
}

/* ---------- Site header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  padding-block: var(--space-3);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--ink); }
/* "for" is set in Fraunces italic, as in the logo sheet. A plain span, so the
   link still reads "Vegans for AI". */
.wordmark__for { font-style: italic; font-weight: 400; }
/* Logo mark: a leaf split by its midrib, with three marigold nodes. */
.mark { width: 1.75rem; height: 1.75rem; flex: none; }
.mark__big { fill: var(--mark-leaf); }
.mark__small { fill: var(--accent); }
.mark__gap { fill: var(--paper); }
/* On dark paper and on the forest footer the leaf is pale, so the nodes shrink
   and the background rings each one (gold on a pale leaf is low contrast). */
:root[data-theme="dark"] .mark__small,
.site-footer .mark__small { transform-box: fill-box; transform-origin: center; transform: scale(0.74); }

.nav-toggle, .theme-toggle {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  min-height: 2.5rem;
  cursor: pointer;
}
.nav-toggle:hover, .theme-toggle:hover { border-color: var(--ink-2); }
.nav-toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.theme-toggle { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.theme-toggle::before {
  content: "";
  width: 0.9rem; height: 0.9rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-left-width: 0.45rem;
}
.nav-toggle { display: none; order: 1; }
@media (max-width: 29.99rem) {
  .theme-toggle { width: 2.5rem; padding: 0; justify-content: center; }
  .theme-toggle__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
.theme-toggle { order: 2; }
.site-nav { flex-basis: 100%; order: 3; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: var(--step--1);
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
/* For Luddites: a small drawn heart appears beside the label on hover and
   focus (and stays on that page). Its margins cancel out and the link keeps
   room for it, so nothing moves when it appears. It is aria-hidden. */
.nav-heart {
  display: inline-block;
  width: 0.82em; height: 0.82em;
  margin-left: 0.24em; margin-right: -1.06em;
  vertical-align: -0.06em;
  fill: var(--accent);
  stroke: var(--accent-line);
  stroke-width: 1.3;
  stroke-linejoin: round;
  overflow: visible;
  opacity: 0;
  transform: scale(0.3);
  transform-origin: 50% 70%;
  transition: opacity 0.16s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-luddites:hover .nav-heart,
.nav-luddites:focus-visible .nav-heart,
.nav-luddites[aria-current="page"] .nav-heart { opacity: 1; transform: scale(1); }
.site-nav .nav-luddites { padding-right: 1.15rem; }
.site-footer .nav-heart { stroke: none; }

/* With scripting on, phones collapse the menu behind the toggle; without it the links simply wrap. */
@media (scripting: enabled) and (max-width: 75.99rem) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; }
  .site-nav.is-open { display: block; padding-bottom: var(--space-2); }
  .site-nav.is-open ul { flex-direction: column; gap: var(--space-1); }
  .site-nav.is-open a { display: block; font-size: var(--step-0); padding: 0.6rem 0.8rem; }
}
@media (min-width: 48rem) {
  .site-header__inner { padding-block: var(--space-4); }
  .wordmark { font-size: 1.25rem; }
}
@media (min-width: 76rem) {
  .site-header__inner { flex-wrap: nowrap; }
  .site-nav { flex-basis: auto; order: 1; }
  .theme-toggle { order: 2; }
  .site-nav ul { flex-wrap: wrap; justify-content: flex-end; column-gap: 0.125rem; }
  /* Ten links on one row: slightly tighter pills than the phone menu. */
  .site-nav a { padding-inline: 0.6rem; }
  .site-nav .nav-luddites { padding-right: 1.05rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: var(--space-6) var(--space-7);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.site-footer__inner { display: grid; gap: var(--space-5); }
.site-footer__inner > * { margin-top: 0; }
.site-footer .wordmark { font-size: 1rem; margin: 0; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.site-footer__links li + li { margin-top: 0; }
.site-footer__note { max-width: var(--measure); }
@media (min-width: 48rem) {
  .site-footer__inner { grid-template-columns: auto 1fr; align-items: start; column-gap: var(--space-7); }
  .site-footer__inner > :nth-child(n + 3) { grid-column: 2; }
}

/* ---------- Hero ---------- */
.hero { padding-block: var(--space-6) var(--space-7); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-hero);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 14ch;
  color: var(--ink);
  text-wrap: balance;
}
.hero__lede {
  margin-top: var(--space-5);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34rem;
}
.hero__actions { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero__figure { margin-top: var(--space-7); }
@media (min-width: 60rem) {
  .hero { padding-block: var(--space-8) var(--space-8); }
  .hero--split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
  .hero--split .hero__figure { margin-top: 0; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--surface-2); text-decoration: none; }
.button--primary { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.button--primary:hover { background: var(--sun-hover); border-color: var(--sun-hover); color: var(--on-sun); }
.button--quiet { border-color: transparent; color: var(--accent-ink); padding-inline: 0.5rem; }
.button--quiet:hover { background: var(--accent-wash); }
.button[disabled], .button[aria-disabled="true"] { border-style: dashed; cursor: not-allowed; }

/* ---------- Stat callouts ---------- */
.stats { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.stats > * { margin-top: 0; }
@media (min-width: 40rem) { .stats { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
.stat {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-m);
  padding: calc(var(--space-5) + 6px) var(--space-5) var(--space-4);
  border: 1px solid var(--line);
  border-top: 2px solid var(--stat-color, var(--accent-line));
}
.chart .stat { background: var(--paper); }
.stat > * { margin-top: 0; }
.stat--animal { --stat-color: var(--beet); }
.stat--plant { --stat-color: var(--turmeric); }
.stat--ai { --stat-color: var(--viz-ai); }
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 1.9rem + 2.6vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stat__unit { display: block; font-weight: 700; color: var(--ink); }
.stat > .stat__unit { margin-top: var(--space-2); }
.stat__label { color: var(--ink-2); }
.stat > * + .stat__label { margin-top: var(--space-2); }
.stat > .source-line { margin-top: var(--space-3); }
.stat > .stat__label + .stat__value { margin-top: var(--space-3); }

/* Inline source link that sits next to a number */
.source-line { font-size: var(--step--1); color: var(--ink-3); line-height: 1.45; }
.source-line a { color: var(--ink-2); }
.source-line a:hover { color: var(--accent-ink); }

/* ---------- Disclaimer (travels with every chart) ---------- */
.disclaimer {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--step--1);
  line-height: 1.5;
  max-width: none;
}
.disclaimer::before {
  /* A quiet leaf marker; the full caution is always written beside it. */
  content: "";
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.2rem;
  border-radius: 80% 0 80% 0;
  background: var(--accent-line);
}

/* ---------- Unaffiliated label ---------- */
.unaffiliated {
  display: inline-block;
  margin-left: 0.35em;
  padding: 0.05em 0.5em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--ink-2);
  vertical-align: 0.08em;
  white-space: nowrap;
}

/* ---------- Callout note ---------- */
.note {
  border-left: 2px solid var(--accent-line);
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  color: var(--ink-2);
  max-width: var(--measure);
}

/* ---------- Verdict badges ---------- */
.verdict {
  --v: var(--v-unsourced); --v-ink: var(--v-unsourced-ink); --v-wash: var(--v-unsourced-wash);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.8em 0.3em 0.6em;
  border-radius: 999px;
  background: var(--v-wash);
  color: var(--v-ink);
  font-weight: 800;
  font-size: var(--step--1);
  line-height: 1.2;
  white-space: nowrap;
}
.verdict::before {
  content: "";
  width: 1em;
  height: 1em;
  flex: none;
  background: var(--v);
  -webkit-mask: var(--v-icon) center / contain no-repeat;
  mask: var(--v-icon) center / contain no-repeat;
}
.verdict--true {
  --v: var(--v-true); --v-ink: var(--v-true-ink); --v-wash: var(--v-true-wash);
  --v-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.9 5.6-4.6 5.5a1 1 0 0 1-1.5.05L3.6 8.9a1 1 0 1 1 1.45-1.4l1.4 1.45 3.9-4.65a1 1 0 0 1 1.55 1.3Z'/%3E%3C/svg%3E");
}
.verdict--roughly {
  --v: var(--v-rough); --v-ink: var(--v-rough-ink); --v-wash: var(--v-rough-wash);
  --v-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm0 2v12A6 6 0 0 1 8 2Z'/%3E%3C/svg%3E");
}
.verdict--misleading {
  --v: var(--v-mislead); --v-ink: var(--v-mislead-ink); --v-wash: var(--v-mislead-wash);
  --v-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9.3 1.1a1.5 1.5 0 0 0-2.6 0L.2 13.3A1.5 1.5 0 0 0 1.5 15.5h13a1.5 1.5 0 0 0 1.3-2.2ZM8 5a1 1 0 0 1 1 1v3.5a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1Zm0 6.6a1.1 1.1 0 1 1 0 2.2 1.1 1.1 0 0 1 0-2.2Z'/%3E%3C/svg%3E");
}
.verdict--unsourced {
  --v-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-dasharray='3 2.3'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3C/svg%3E");
}

/* ---------- Claim cards ---------- */
.claim-list { display: grid; gap: var(--space-5); }
.claim-list > * { margin-top: 0; }
.claim-card {
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: var(--space-5);
  border: 1px solid var(--line);
}
.claim-card > .verdict { font-size: var(--step-0); padding: 0.4em 0.95em 0.4em 0.7em; }
.claim-card__claim {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.15;
  quotes: "\201C" "\201D";
}
.claim-card__claim::before { content: open-quote; }
.claim-card__claim::after { content: close-quote; }
.claim-card__body { margin-top: var(--space-4); color: var(--ink-2); max-width: var(--measure); }
.claim-card__body > * + * { margin-top: var(--space-3); }
.claim-card .source-line { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
@media (min-width: 48rem) {
  .claim-card { display: grid; grid-template-columns: 10rem minmax(0, 1fr); column-gap: var(--space-6); padding: var(--space-6); }
  .claim-card > .verdict { grid-row: 1 / span 3; align-self: start; justify-self: start; margin-top: 0.2rem; }
  .claim-card > :not(.verdict) { grid-column: 2; }
  .claim-card__claim { margin-top: 0; }
}

/* ---------- Objection and answer pairs ---------- */
.objection { max-width: 46rem; }
.objection + .objection { margin-top: var(--space-7); padding-top: var(--space-7); border-top: 1px solid var(--line); }
.objection__q {
  position: relative;
  padding: var(--space-4) var(--space-5);
  background: var(--surface-2);
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--ink);
}
.objection__a { margin-top: var(--space-5); padding-left: var(--space-5); border-left: 2px solid var(--accent-line); }
.objection__a > * + * { margin-top: var(--space-3); }
.objection__a .source-line { margin-top: var(--space-4); }

/* ---------- Example cards (progress) ---------- */
.example-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-m);
  padding: var(--space-5);
  border: 1px solid var(--line);
}
.example-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.tag {
  display: inline-block;
  padding: 0.1em 0.6em;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink-2);
}
.tag--ai { background: var(--ai-wash); color: var(--ai-ink); }
.tag--animal { background: var(--beet-wash); color: var(--beet-ink); }
.tag--plant { background: var(--turmeric-wash); color: var(--turmeric-ink); }
.example-card h3 { margin-top: var(--space-3); }
.example-card p { color: var(--ink-2); margin-top: var(--space-3); }
.example-card .source-line { margin-top: auto; padding-top: var(--space-4); }

/* ---------- Tables (sources) ---------- */
.table-tools { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-4); }
.table-tools .field { margin: 0; flex: 1 1 16rem; max-width: 24rem; }
.table-count { color: var(--ink-3); font-size: var(--step--1); margin: 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  line-height: 1.45;
}
.data-table caption { text-align: left; font-weight: 700; padding-bottom: var(--space-2); color: var(--ink); }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: var(--space-3); border-bottom: 1px solid var(--line); }
.data-table thead th { color: var(--ink-2); font-weight: 750; border-bottom: 2px solid var(--line-strong); white-space: nowrap; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tbody tr:target { background: var(--accent-wash); }
.table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; background: var(--surface); border-radius: var(--radius-m); border: 1px solid var(--line); }
/* Phones: each row becomes a labelled block. Cells need data-label. */
@media (max-width: 47.99rem) {
  .data-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .data-table--stack tr { display: block; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
  .data-table--stack th, .data-table--stack td { display: block; position: relative; padding: var(--space-1) 0 var(--space-1) 7rem; border: 0; text-align: left; }
  .data-table--stack td::before { content: attr(data-label); position: absolute; left: 0; top: var(--space-1); width: 6.5rem; color: var(--ink-3); font-weight: 700; }
  .data-table--stack td[data-label=""] { padding-left: 0; }
  .data-table--stack td[data-label=""]::before { content: none; }
  .data-table--stack td.num { text-align: left; white-space: normal; }
  .data-table--stack th[scope="row"] { display: block; font-size: var(--step-0); padding: 0 0 var(--space-2); }
}
@media (min-width: 48rem) {
  .table-wrap { overflow-x: auto; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-5); max-width: 34rem; }
.form > * { margin-top: 0; }
.field { display: grid; gap: var(--space-2); }
.field > * { margin-top: 0; }
.field label, .field legend, .label { font-weight: 750; color: var(--ink); }
.field__hint { font-size: var(--step--1); color: var(--ink-3); }
.field__error { font-size: var(--step--1); font-weight: 700; color: var(--danger); display: flex; gap: 0.4em; align-items: baseline; }
.field__error::before { content: "!"; display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--danger); color: var(--surface); font-size: 0.8em; flex: none; }
input, select, textarea, button { font: inherit; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.9rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.4;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select {
  appearance: auto;
  padding-right: 0.8rem;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 1px; border-color: var(--accent-line); }
.field [aria-invalid="true"] { border-color: var(--danger) !important; border-width: 2px !important; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Range slider with a live value */
.range-field__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.range-field output {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--ink);
  white-space: nowrap;
}
.range-field__scale { display: flex; justify-content: space-between; font-size: var(--step--1); color: var(--ink-3); }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2.75rem;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--line-strong); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.5rem; height: 1.5rem;
  margin-top: calc(3px - 0.75rem);
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--accent);
}
input[type="range"]::-moz-range-thumb {
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--accent);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 6px var(--accent-wash); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 6px var(--accent-wash); }
.range-field--animal input[type="range"]::-webkit-slider-thumb { background: var(--beet); box-shadow: 0 0 0 1.5px var(--beet); }
.range-field--animal input[type="range"]::-moz-range-thumb { background: var(--beet); box-shadow: 0 0 0 1.5px var(--beet); }
.range-field--animal input[type="range"]::-moz-range-progress { background: var(--beet); }

.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.form-panel { max-width: 40rem; background: var(--surface); border-radius: var(--radius-l); padding: var(--space-5); border: 1px solid var(--line); }
@media (min-width: 40rem) { .form-panel { padding: var(--space-6); } }

/* Footprint estimator: inputs beside the two-sided result on wide screens */
.estimator { display: grid; gap: var(--space-6); }
.estimator > * { margin-top: 0; }
@media (min-width: 60rem) { .estimator { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; } }

/* ---------- Charts ---------- */
.chart {
  background: var(--viz-surface);
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  padding: var(--space-5) var(--space-4) var(--space-4);
  min-width: 0;
}
@media (min-width: 40rem) { .chart { padding: var(--space-6) var(--space-6) var(--space-5); } }
.chart__caption { max-width: var(--measure); }
.chart__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.15;
  color: var(--ink);
}
.chart__desc { display: block; margin-top: var(--space-2); color: var(--ink-2); }
.chart__body { margin-top: var(--space-4); }
.chart__body > * + * { margin-top: var(--space-4); }
.chart__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); align-items: center; }
.chart__meta > * { margin-top: 0; }
.chart__scale {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5em;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink-2);
}
.chart__scale::before {
  /* A tiny ruler: evenly spaced ticks for linear, bunching ticks for log */
  content: "";
  width: 1.6rem;
  height: 0.7rem;
  margin-top: 0.3em;
  flex: none;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 4v7h22M8 4v7m7-7v7m7-7v7' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chart__scale--log { color: var(--beet-ink); }
.chart__scale--log::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 4v7h22M12 4v7m6-7v7m4-7v7' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
}
.chart__legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--step--1); color: var(--ink-2); }
.chart__legend li { margin: 0; display: inline-flex; align-items: center; gap: 0.45em; }
.swatch { width: 0.85rem; height: 0.85rem; border-radius: 3px; flex: none; background: var(--viz-ai); display: inline-block; }
.swatch--ai { background: var(--viz-ai); }
.swatch--animal { background: var(--viz-animal); }
.swatch--plant { background: var(--viz-plant); }
.swatch--other { background: var(--viz-other); }
.swatch--wash { background: color-mix(in srgb, var(--swatch-color, var(--viz-animal)) 30%, var(--viz-surface)); box-shadow: inset 0 0 0 1.5px var(--swatch-color, var(--viz-animal)); }
.swatch--wash.swatch--ai { --swatch-color: var(--viz-ai); }
.swatch--wash.swatch--plant { --swatch-color: var(--viz-plant); }
.swatch--wash.swatch--other { --swatch-color: var(--viz-other); }
.chart__plot { position: relative; width: 100%; }
.chart__plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__headline { font-size: var(--step-1); line-height: 1.4; color: var(--ink); max-width: var(--measure); }
.chart__headline strong { font-family: var(--font-display); font-weight: 500; font-size: 1.35em; }
.chart__aside { font-size: var(--step--1); color: var(--ink-2); max-width: var(--measure); }
.chart__notes { margin-top: var(--space-3); }
.chart__notes > * + * { margin-top: var(--space-2); }
.chart__error {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-s);
  border: 2px solid var(--danger);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 650;
}
.chart__loading { color: var(--ink-3); font-size: var(--step--1); }
.chart__sources { font-size: var(--step--1); color: var(--ink-2); padding-left: 1.3em; line-height: 1.45; }
.chart__sources li + li { margin-top: var(--space-1); }
.chart__sources-title { font-size: var(--step--1); font-weight: 750; color: var(--ink); }
.chart__table summary { cursor: pointer; font-size: var(--step--1); font-weight: 750; color: var(--accent-ink); padding-block: var(--space-1); }
.chart__table[open] summary { margin-bottom: var(--space-3); }
.chart__table .table-wrap { overflow-x: auto; }
.chart .disclaimer { margin-top: var(--space-5); }

/* SVG marks (colors by role so both themes switch without a redraw) */
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-grid--minor { stroke-opacity: 0.6; }
.viz-axis { stroke: var(--viz-axis); stroke-width: 1; shape-rendering: crispEdges; }
.viz-tick { fill: var(--ink-3); font-family: var(--font-body); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.viz-axis-title { fill: var(--ink-2); font-family: var(--font-body); font-size: 13px; font-weight: 700; }
.viz-label { fill: var(--ink); font-family: var(--font-body); font-size: 14.5px; font-weight: 650; }
.viz-value { fill: var(--ink); font-family: var(--font-body); font-size: 14px; font-weight: 800; }
.viz-sub { fill: var(--ink-2); font-family: var(--font-body); font-size: 12.5px; }
.viz-mark { fill: var(--viz-ai); }
.viz-mark.k-ai { fill: var(--viz-ai); }
.viz-mark.k-animal { fill: var(--viz-animal); }
.viz-mark.k-plant { fill: var(--viz-plant); }
.viz-mark.k-other { fill: var(--viz-other); }
.viz-line { stroke: var(--viz-ai); stroke-width: 2; stroke-linecap: round; fill: none; }
.viz-line.k-animal { stroke: var(--viz-animal); }
.viz-line.k-plant { stroke: var(--viz-plant); }
.viz-line.k-other { stroke: var(--viz-other); }
.viz-range { opacity: 0.35; }
.viz-wash { fill-opacity: var(--viz-wash-opacity); }
.viz-ring { stroke: var(--viz-surface); stroke-width: 2; }
.viz-hit { fill: transparent; cursor: default; }
.viz-row:hover .viz-mark, .viz-row.is-active .viz-mark { filter: brightness(1.12); }
.viz-leader { stroke: var(--ink-3); stroke-width: 1; }
.viz-grow { transform-box: fill-box; transform-origin: left center; animation: viz-grow 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
/* The area chart's small square changes size from its corner when the view switches (charts.js). */
.viz-morph { transform-box: fill-box; transform-origin: left bottom; }
/* View buttons, inside the caption under the title so they stay put when the caption text changes.
   The pressed one is filled and carries a solid dot; the other has an empty ring. */
.chart__views { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.chart__views ~ .chart__desc { margin-top: var(--space-4); }
.chart__views .button { min-height: 2.75rem; padding: 0.5rem 1rem; font-size: var(--step--1); }
.chart__views .button::before {
  content: ""; flex: none; width: 0.7em; height: 0.7em; border-radius: 50%;
  border: 2px solid currentColor; box-sizing: border-box;
}
.chart__views .button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chart__views .button[aria-pressed="true"]::before { background: currentColor; }
@keyframes viz-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.viz-tooltip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  max-width: 16rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  font-size: var(--step--1);
  line-height: 1.4;
  color: var(--ink-2);
}
.viz-tooltip strong { display: block; color: var(--ink); font-size: var(--step-0); }

/* Two-sided comparison (footprint result) */
.compare__sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.compare__sides > * { margin-top: 0; }
.compare__side { border-top: 2px solid var(--viz-ai); padding-top: var(--space-3); min-width: 0; }
.compare__side > * { margin: 0; }
.compare__side > .compare__unit, .compare__side > .compare__range { margin-top: var(--space-1); }
.compare__side.k-animal { border-top-color: var(--viz-animal); }
.compare__side.k-plant { border-top-color: var(--viz-plant); }
.compare__side.k-other { border-top-color: var(--viz-other); }
.compare__label { font-weight: 750; color: var(--ink-2); font-size: var(--step--1); }
.compare__value {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  line-height: 1.05;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.compare__unit { font-size: var(--step--1); color: var(--ink-2); }
.compare__range { font-size: var(--step--1); color: var(--ink-3); }

/* ---------- Specimens (style guide only) ---------- */
.swatches { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.swatches > * { margin-top: 0; }
.token { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: var(--surface); font-size: var(--step--1); }
.token > * { margin: 0; }
.token__chip { height: 4rem; background: var(--chip); }
.token__name { padding: var(--space-2) var(--space-3) 0; font-weight: 750; }
.token__hex { padding: 0 var(--space-3) var(--space-2); color: var(--ink-3); }
.chip-paper { --chip: var(--paper); } .chip-surface { --chip: var(--surface); } .chip-ink { --chip: var(--ink); }
.chip-ink2 { --chip: var(--ink-2); } .chip-accent { --chip: var(--accent); } .chip-beet { --chip: var(--beet); }
.chip-turmeric { --chip: var(--turmeric); } .chip-other { --chip: var(--viz-other); } .chip-line { --chip: var(--line); }
.specimen { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-5); }
.specimen > * + * { margin-top: var(--space-4); }
.specimen__label { font-size: var(--step--1); color: var(--ink-3); }
.type-sample { display: grid; gap: var(--space-4); }
.type-sample > * { margin-top: 0; }
.toc { columns: 2 10rem; column-gap: var(--space-6); padding-left: 1.9em; }
.toc li { break-inside: avoid; }

/* ---------- Status pages ---------- */
.status-page { padding-block: var(--space-8); }
.status-page h1 { font-size: var(--step-hero); font-weight: 500; line-height: 1.06; max-width: 14ch; }
.status-page p { max-width: var(--measure); font-size: var(--step-1); color: var(--ink-2); }
.status-mark { display: block; width: 5rem; height: 5rem; margin-bottom: var(--space-5); }
.status-mark__missing { fill: none; stroke: var(--accent-line); stroke-width: 1; stroke-dasharray: 2 1.6; }

/* ---------- Photographic prints on paper ---------- */
.hero-band { border-bottom: 1px solid var(--line); }
.hero-band .hero__lede { color: var(--ink); font-size: clamp(1.125rem, 1rem + 0.3vw, 1.3125rem); line-height: 1.65; }
.hero-band .hero__title { max-width: 12ch; }
.hero-band .hero--split { align-items: center; }
.hero__photos { position: relative; isolation: isolate; margin-top: var(--space-6); min-width: 0; padding: var(--space-3); }
.hero__cutout { position: absolute; z-index: -1; pointer-events: none; width: 45%; height: auto; }
.hero__cutout--sage { fill: var(--sage-paper); top: 0; right: 0; }
.hero__cutout--clay { fill: var(--accent-paper); bottom: 0; left: 0; width: 34%; }
.hero__photo, .photo-strip img, .page-band, .example-card__photo, .home-story__photo {
  display: block; width: 100%; object-fit: cover;
  border: 5px solid var(--surface-2);
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.06);
}
.hero__photo { aspect-ratio: 3 / 2; border-radius: 24px; object-position: left center; }
.photo-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.photo-strip img { min-width: 0; aspect-ratio: 1; border-width: 3px; border-radius: var(--radius-m); }
.photo-strip img[src="/img/pig.jpg"], .photo-strip img[src="/img/cow.jpg"] { object-position: right center; }
.home-proportion { margin-block: var(--space-7) var(--space-8); }
.home-proportion .chart { background: var(--surface-2); }
.home-proportion .disclaimer { background: var(--surface); }
.page-band { height: clamp(11rem, 24vw, 19rem); border-radius: 14px; margin-bottom: var(--space-7); }
.example-card__photo { aspect-ratio: 16 / 9; border-radius: var(--radius-s); margin-bottom: var(--space-5); }
.home-story { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: center; }
.home-story > * { margin-top: 0; }
.home-story__photo { aspect-ratio: 4 / 3; border-radius: 14px; }
.home-story > .hero__actions { grid-column: 1 / -1; }
.section > h2:not(.visually-hidden)::after, .section > .prose > h2::after {
  content: ""; display: block; width: 2.5rem; height: 2px;
  background: var(--accent-line); margin-top: var(--space-4);
}
/* A shared left edge and a wider reading measure balance Numbers' wide charts. */
.page--numbers { --measure: 44rem; }
.page--numbers > .section { padding-top: var(--space-6); border-top: 1px solid var(--line); }
.claim-card, .example-card, .form-panel { box-shadow: var(--shadow-card); }
.site-footer {
  background: var(--forest); color: var(--forest-muted);
  border: 0; padding-block: var(--space-7) var(--space-8);
}
.site-footer a, .site-footer .wordmark, .site-footer .wordmark:hover { color: var(--on-forest); }
.site-footer .mark__big { fill: var(--on-forest); }
.site-footer .mark__small { fill: var(--accent); }
.site-footer .wordmark { font-size: 1.25rem; }
.site-footer :focus-visible { outline-color: var(--on-forest); }
.viz-line.k-animal { stroke-dasharray: 7 3; }
.viz-line.k-plant { stroke-dasharray: 2 3; }
.viz-line.k-other { stroke-dasharray: 8 3 2 3; }
.chip-sun { --chip: var(--sun); }
.chip-ai { --chip: var(--viz-ai); }
/* Sliders share the series palette; the outline is visible in every category. */
.range-field:not(.range-field--animal):not(.range-field--plant) input[type="range"]::-webkit-slider-thumb { background: var(--viz-ai); box-shadow: 0 0 0 1.5px var(--viz-ai); }
.range-field:not(.range-field--animal):not(.range-field--plant) input[type="range"]::-moz-range-thumb { background: var(--viz-ai); box-shadow: 0 0 0 1.5px var(--viz-ai); }
.range-field:not(.range-field--animal):not(.range-field--plant) input[type="range"]::-moz-range-progress { background: var(--viz-ai); }
input[type="range"]:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: var(--radius-s); }
@media (min-width: 60rem) {
  .hero__photos { margin-top: 0; }
  .hero-band .hero--split { gap: var(--space-7); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .home-story { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-7) var(--space-8); }
  .home-story--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .home-story--reverse > .prose { grid-column: 2; grid-row: 1; }
  .home-story--reverse > .home-story__photo { grid-column: 1; grid-row: 1; }
  /* Keep the caption semantic and source order intact; only the body div dissolves. */
  .home-proportion .chart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-7); row-gap: var(--space-4); }
  .home-proportion .chart__body { display: contents; }
  .home-proportion .chart__caption { grid-column: 1; grid-row: 1; }
  .home-proportion .chart__headline { grid-column: 1; grid-row: 2; }
  .home-proportion .chart__aside { grid-column: 1; grid-row: 3; }
  .home-proportion .chart__meta { grid-column: 1; grid-row: 4; align-self: start; }
  .home-proportion .chart__drawing { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .home-proportion .chart__references, .home-proportion .chart__table, .home-proportion .disclaimer { grid-column: 1 / -1; }
  .home-proportion .chart__references { border-top: 1px solid var(--line); padding-top: var(--space-4); }
  .home-proportion .chart__body > *, .home-proportion .disclaimer { margin-top: 0; }
}
@media (max-width: 39.99rem) {
  .site-header__inner { column-gap: var(--space-2); }
  .hero-band .hero { padding-top: var(--space-7); }
  .hero-band .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__photos { max-width: 28rem; margin-inline: auto; }
  .range-field__top { flex-wrap: wrap; }
  .range-field__scale { gap: var(--space-3); }
  .data-table th, .data-table td { overflow-wrap: anywhere; }
  .chart__legend li { min-width: 0; }
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .viz-mark, .swatch { forced-color-adjust: none; }
  .verdict::before { background: CanvasText; }
}
@media print {
  .site-header, .site-footer, .nav-toggle, .theme-toggle, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .chart { break-inside: avoid; border-color: #999; }
  .chart__table { display: block; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
