/* intolerance.app design system (Phase 3, frontend-design skill).
   Thesis: careful investigation under uncertainty, a respected REFERENCE work, not a
   clinic brochure. Trust earned by rigor + restraint + polish, never decoration.
   Signature: the suspect->pattern distinction (the site's own thesis, made visual).
   Honors the pinned brief exactly: base #F1F0F5, ink #282726, Montserrat titles,
   Newsreader serif-italic accent (the honest-aside register), Inter body.
   Accent = MONOCHROME INK (owner-chosen 2026-07-03): maximum restraint, no colour, so
   nothing reads as a safe/unsafe verdict (MDR-safe by construction). Hierarchy comes
   from weight, hairline rules, and the struck-serif suspect->pattern signature. */

/* ---------- Fonts (SELF-HOSTED, owner-ruled 2026-07-23) ----------
   Variable woff2 served from our own /fonts (no Google CDN → no visitor IP to Google;
   the privacy notice's "no third-party requests" is then literally true). Montserrat
   needs the 750 display weight, so a variable font is required. font-display:swap keeps
   text visible during load. Files: @fontsource-variable, latin subset. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/fonts/montserrat-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  /* The aside register is Newsreader ITALIC only (opsz-variable for optical sizing). */
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-latin-opsz-italic.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* pinned */
  --paper: #f1f0f5;          /* cool base */
  --ink: #282726;            /* near-black */
  /* surfaces */
  --paper-raised: #fbfbfd;   /* lifted cool white for cards/rail */
  --rule: #d9d7e0;           /* hairline dividers, cool grey */
  --rule-strong: #bcb9c6;
  --muted: #6a6770;          /* secondary text */
  --muted-soft: #6c6976;     /* softer secondary; darkened to clear WCAG AA (4.73:1 on
                                paper) for the rail micro-labels + copyright */
  /* Accent = MONOCHROME INK (owner-chosen 2026-07-03). Maximum restraint: no colour
     partitions foods or reads as a verdict; hierarchy comes from weight + rule + the
     struck-serif signature. Token names kept (--accent/--rule-accent) as the accent-slot
     roles; all resolve to ink so the palette is a disciplined single-hue system. */
  --accent: #282726;         /* accent role -> ink */
  --accent-strong: #000000;    /* strongest accent -> black */
  --rule-accent: #282726;          /* the "worth testing" rule -> ink (was signal-amber) */
  /* type */
  --display: 'Montserrat', system-ui, sans-serif;
  --aside: 'Newsreader', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* A PINCH OF COLOUR (owner-directed 2026-09-10, live design session, #689): the
     2026-07-03 monochrome ruling is extended, not reversed. Colour is now permitted for
     AMBIENT light and emphasis ONLY -- it must never encode a food-safety verdict, and
     every evidence-strength indicator (the topic-tile bars) stays ink-tonal, not hued.
     One accent (sage) + two warm wash tones used only as blurred background light. */
  --accent-color: #2f6b4f;
  --accent-color-soft: #9fd3b6;
  --wash-warm: #f6c9a0;
  --wash-yellow: #f3e3a3;
  --flag-warm: #c2603a;      /* the single "something happened here" marker (Figure A) */
  /* rhythm */
  /* --measure is a FIXED rem width, not ch. ch scales per element's own font-size AND
     font-family, so the old `.content > * { max-width: 68ch; margin-inline: auto }` gave
     an H2 (Montserrat, 1.4rem), a body paragraph (Inter, 1.0625rem) and a blockquote
     (Newsreader italic, 1.12rem) three DIFFERENT computed pixel widths -- each then
     re-centered itself at that different width, so each sat at a different left edge on
     the page (measured 2026-09-10: 5 distinct left edges site-wide). A fixed rem number
     is the same regardless of the element's font, which is what "one column" requires. */
  --measure: 42rem;      /* article text column (~ the OWID/NHS reading measure) */
  --content-wide: 52rem; /* wider allowance for tables/figures than the text measure */
  --shell-max: 60rem;
  --col: 70rem;          /* the v2 homepage's wider 12-col grid container */
  --gutter: 1.5rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* clip, not hidden: overflow-x:hidden with overflow-y left at its default computes
     overflow-y to auto too (CSS Overflow Module 3, the mismatched-axis rule -- "clip" is
     explicitly exempt from it), which silently makes html/body a scroll container and
     breaks position:sticky for every descendant (verified: the sticky .site-header
     scrolled off with the page instead of pinning at top:0 until this changed). clip
     still stops a wide child from forcing horizontal scroll; it just does not also
     hijack the vertical axis. */
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  overflow-wrap: break-word; /* long words/URLs wrap instead of overflowing */
  font-feature-settings: 'kern' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Skip link + a11y ---------- */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus {
  left: 1rem; top: 1rem; z-index: 20;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 0.85rem; border-radius: 5px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Header ---------- */
/* ---------- Global header nav (Phase A / A1) ----------
   Mobile-first. Pure HTML/CSS via <details> (no JS dependency): the hamburger and the
   Topics/Language dropdowns are <details>/<summary>. On desktop the primary nav is forced
   inline and the hamburger is hidden. Keyboard-accessible (summary is focusable; Esc/Enter
   native); visible focus states inherited from the global :focus-visible rule. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 90%, white);
  backdrop-filter: saturate(1.1) blur(6px);
}
.header-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem 1.1rem;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.by-gimetry {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  padding-left: 0.7rem;
  margin-left: -0.3rem;
  border-left: 1px solid var(--rule);
}
@media (max-width: 40rem) { .by-gimetry { display: none; } }

/* <details> menus: strip native marker; summary reads as a control */
.menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { list-style: none; margin: 0; padding: 0; }
.menu-panel a { text-decoration: none; color: var(--ink); display: block; }

/* the primary nav links + summaries */
.site-nav a,
.site-nav .topics > summary {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav .topics > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.topics > summary::after { content: ''; display: inline-block; width: 0.4em; height: 0.4em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.topics[open] > summary::after { transform: translateY(1px) rotate(-135deg); }

/* right cluster */
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.55rem; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-size: 0.92rem; color: var(--ink);
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.35rem 0.8rem; cursor: pointer;
}
.search-trigger:hover { border-color: var(--muted); }
.search-icon { width: 0.85em; height: 0.85em; border: 1.6px solid currentColor; border-radius: 50%; position: relative; }
.search-icon::after { content: ''; position: absolute; right: -3px; bottom: -2px; width: 5px; height: 1.6px; background: currentColor; transform: rotate(45deg); }
.search-label { display: none; } /* icon-only on mobile; label shown on desktop */
.lang-switcher > summary {
  font-size: 0.92rem; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.35rem 0.7rem;
}
.lang-switcher > summary::after { content: ''; width: 0.38em; height: 0.38em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }

/* hamburger (mobile) */
.nav-toggle { padding: 0.3rem; }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.bars { position: relative; }
.bars::before, .bars::after { content: ''; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }

/* dropdown panels: floating cards */
.topics > .menu-panel,
.lang-switcher > .menu-panel {
  background: var(--paper-raised, #fff);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(40, 39, 38, 0.1);
  padding: 0.35rem;
  min-width: 12rem;
}
.topics > .menu-panel a,
.lang-switcher > .menu-panel a { padding: 0.45rem 0.6rem; border-radius: 5px; font-size: 0.95rem; }
.topics > .menu-panel a:hover,
.lang-switcher > .menu-panel a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* MOBILE: nav lives behind the hamburger, drops as a full-width panel under the header */
.nav-shell > .site-nav {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 10px 24px rgba(40, 39, 38, 0.08);
  padding: 0.6rem 1.25rem 1rem;
  display: flex; flex-direction: column; gap: 0.15rem;
}
.nav-shell > .site-nav > a,
.topics > summary { padding: 0.55rem 0.2rem; }
.topics > .menu-panel { box-shadow: none; border: none; padding: 0 0 0.3rem 0.8rem; min-width: 0; }

/* DESKTOP: inline nav, no hamburger, real dropdowns */
@media (min-width: 52rem) {
  .header-inner { padding: 0.75rem 1.75rem; }
  .nav-shell > summary { display: none; }
  .nav-shell > .site-nav {
    position: static; display: flex; flex-direction: row; align-items: center;
    gap: 1.3rem; background: none; border: none; box-shadow: none; padding: 0;
    margin-left: 1.4rem;
  }
  .nav-shell > .site-nav > a, .topics > summary { padding: 0; }
  .topics { position: relative; }
  .topics > .menu-panel {
    position: absolute; top: calc(100% + 0.6rem); left: 0;
    box-shadow: 0 8px 24px rgba(40, 39, 38, 0.1); border: 1px solid var(--rule);
    padding: 0.35rem;
  }
  .lang-switcher { position: relative; }
  .lang-switcher > .menu-panel { position: absolute; top: calc(100% + 0.5rem); right: 0; }
  .search-label { display: inline; }
}

/* ---------- Search dialog (Phase A / A3, Pagefind UI) ---------- */
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 38%, transparent);
  padding: 4rem 1rem 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.search-panel[hidden] { display: none; }
.search-box {
  position: relative;
  width: 100%;
  max-width: 40rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(40, 39, 38, 0.22);
  padding: 1.4rem 1.4rem 1rem;
}
.search-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  font-size: 1.6rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
}
.search-close:hover { color: var(--ink); }
/* Pagefind UI theme -> our tokens (self-hosted CSS variables the UI reads) */
#pf-search {
  --pagefind-ui-primary: var(--ink);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--paper);
  --pagefind-ui-border: var(--rule);
  --pagefind-ui-font: var(--body);
  --pagefind-ui-border-radius: 8px;
}

/* ---------- Shell: content column + case-file rail ---------- */
/* A4: a single CENTERED column (no left-pinned rail). Wide container so tables/figures
   have room; article TEXT is constrained to the reading measure and centered within it. */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (max-width: 34rem) {
  .shell { padding: 0 1.15rem; }
}

/* Trust furniture (was the case-file rail): a horizontal metadata strip at the top of the
   page: last-reviewed + source count + the honest method note. Content pages only. */
.rail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.4rem;
  max-width: var(--content-wide);
  margin: 1.4rem auto 0;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}
.rail[aria-hidden='true'] { display: none; }
.rail dl { display: flex; flex-wrap: wrap; align-items: baseline; margin: 0; }
.rail dt {
  /* Small caps, not tracked-out uppercase: the tracked ALL-CAPS eyebrow label is one of
     the most recognisable generic-AI template tells (frontend-design skill review,
     2026-09-10). Small caps reads as an editorial/citation convention instead (the same
     device style guides use for a source label), keeps the label visually distinct from
     its value without borrowing the SaaS-dashboard vocabulary this "trust furniture"
     otherwise deliberately avoids (see the monochrome-accent note above). */
  font-family: var(--display);
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  color: var(--muted-soft);
  margin-left: 1.25rem;
}
.rail dl dt:first-of-type { margin-left: 0; }
.rail dd { margin: 0 0 0 0.4rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.rail .rail-note { margin: 0 0 0 1.25rem; font-style: italic; font-family: var(--aside); color: var(--muted); }
@media (max-width: 34rem) { .rail .rail-note { margin-left: 0; flex-basis: 100%; } }

/* ---------- Main content ---------- */
main { min-width: 0; }
.content {
  /* ONE container edge for this page, matching the hero/tiles/trust-strip's own
     --content-wide centering above it -- this is the other half of the alignment fix:
     the container itself must share the same left edge as everything else on the page,
     not just its own children share an edge with each other. */
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: 1.9rem 0 3rem;
}
/* Prose children get a FIXED rem measure and hug the container's own left edge
   (margin-inline: 0, never auto) -- auto-centering each child at ITS OWN width was the
   bug (see --measure's definition above). Right edge goes ragged short of the wider
   container; that is normal, deliberate editorial-column behaviour, not a leftover gap. */
.content > * { max-width: var(--measure); margin-inline: 0; }
.content > .table-wrap,
.content > figure,
.content > table { max-width: 100%; }

h1 {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 1.1rem;
}
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 2.6rem 0 0.85rem;
}
h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.9rem 0 0.5rem;
}
p { margin: 0 0 1.05rem; }

/* Links are ink-coloured in the mono palette, so the UNDERLINE is what marks them as
   links. Keep it always-on and clear; thicken + darken on hover/focus for feedback. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: var(--muted-soft);
}
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; text-decoration-color: var(--ink); }

/* Answer-first opening (GEO): larger, calm, the honest lead. */
.answer-first, .content > p:first-of-type {
  font-size: 1.19rem;
  line-height: 1.58;
  color: var(--ink);
}

/* The honest-aside register: epistemic hedges set in Newsreader italic, a distinct
   voice pulled out of body. The type ENCODES the epistemics. */
.aside-note, blockquote {
  font-family: var(--aside);
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--accent-strong);
}
blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 2px solid var(--accent);
}
blockquote p { margin: 0.4rem 0; }
blockquote strong { font-style: normal; font-family: var(--body); font-weight: 600; color: var(--ink); }

/* The pre-v2 homepage hero/tile/trust-strip rules (.home-hero, .hero-thesis, .search-hero,
   .topic-section, .tile-grid, .tile, .home-trust) were removed 2026-09-10 -- superseded by
   the v2 sections below (.home2-hero, .tiles2, .evidence-band) and confirmed unused
   anywhere else in src/ before deletion. */
.home-content { padding-top: 1.5rem; }

/* Rhythm for the homepage's narrative section (frontend-design skill + finishing.md
   review, 2026-09-10: "if every heading is the same size as every other heading, the
   page has no rhythm" -- the sitewide h2 rule is identical for all four sections here,
   reads as one dry wall of same-weight text). Scoped to .home-content only, not the
   sitewide h2, so article pages are untouched. */
.home-content h2 {
  font-size: 1.7rem;
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
.home-content h2:first-of-type { margin-top: 2.75rem; }

/* "Start where you are": was a dense bulleted list (dot + bold question + answer, all
   the same weight, no air). Hairline dividers between rows instead of bullets read
   closer to a reference-list convention (OWID/NHS) and give each question room. */
.home-content ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.home-content ul li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
}
.home-content ul li:first-child { border-top: none; padding-top: 0; }
.home-content ul li:last-child { padding-bottom: 0; }


/* Scroll-in reveal, CSS-only: never applies without both reduced-motion permission AND
   browser support for scroll-driven animations, and the base (unanimated) state is
   opacity:1 -- so on any browser where either condition fails, content is simply static
   and fully visible from the first paint (same invisible-content-is-forbidden rule as
   the existing hero underline reveal above). */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .home-content > h2,
    .home-content > p,
    .home-content > ul,
    .home-content > blockquote {
      animation: home-content-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    @keyframes home-content-rise {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
  }
}

/* ---------- The signature: suspect -> pattern (inline component) ---------- */
.suspect-pattern {
  margin: 1.75rem 0 2rem;
  padding: 1.35rem 1.4rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 1.14rem;
  line-height: 1.5;
}
.suspect {
  font-family: var(--aside);
  font-style: italic;
  color: var(--muted);
}
.arrow { color: var(--muted-soft); margin: 0 0.5rem; font-variant: normal; }
.pattern {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-strong);
  border-bottom: 2px solid var(--rule-accent);
  padding-bottom: 1px;
}

/* ---------- Tables (case-file data styling) ---------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--rule); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding: 0.6rem 0.8rem; }
th, td { text-align: left; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--paper);
  position: sticky; top: 0;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--paper) 45%, transparent); }
td:first-child { font-weight: 500; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.82rem; color: var(--muted); margin: 0 auto 0.4rem; max-width: var(--content-wide); padding-top: 1.5rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumbs li::after { content: "›"; margin-left: 0.35rem; color: var(--rule-strong); }
.breadcrumbs li:last-child::after { content: ""; }

/* ---------- End-of-article GIMETRY card (#689) ---------- */
.gimetry-card {
  max-width: var(--content-wide); margin: 3rem auto 0; padding: 1.75rem 2rem;
  border-radius: 14px; color: var(--paper);
  background: radial-gradient(60% 80% at 100% 0%, #3d6e57 0%, transparent 60%), #24302a;
}
.gimetry-card-heading { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: #fff; margin: 0 0 0.6rem; }
.gimetry-card-body { color: #cfcdd6; line-height: 1.55; margin: 0 0 1.1rem; max-width: 52ch; }
.gimetry-card-cta {
  display: inline-block; background: var(--wash-warm); color: var(--ink); font-family: var(--display);
  font-weight: 700; text-decoration: none; padding: 0.7rem 1.2rem; border-radius: 8px; margin: 0 0 0.9rem;
}
.gimetry-card-cta:hover { color: var(--ink); }
.gimetry-card-mdr { color: #a7a4b3; font-size: 0.78rem; line-height: 1.5; margin: 0; max-width: 56ch; }

/* ---------- Sources + related ---------- */
.sources { font-size: 0.92rem; color: var(--muted); }
.sources a { word-break: break-word; }
.related {
  max-width: var(--content-wide);
  margin: 3rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.related h2 { margin-top: 0; font-size: 1.05rem; }
.related ul { padding-left: 1.1rem; }
.related a { text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 70%, white);
}
.footer-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.disclosure { max-width: var(--measure); line-height: 1.6; }
.footer-nav { display: flex; gap: 1.15rem; margin: 0.75rem 0 0.4rem; flex-wrap: wrap; }
.footer-nav a { color: var(--accent); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.copyright { margin-top: 0.35rem; color: var(--muted-soft); }

/* ==================== Homepage v2 (#689, owner-directed 2026-09-10) ====================
   A wider 12-col grid container (.col/.grid) alongside the existing --shell-max, used
   only by the v2 homepage sections. Article pages are untouched. */
.col { max-width: var(--col); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }

/* ---------- Hero ---------- */
.home2-hero { position: relative; padding-block: 3rem 2rem; }
.home2-hero-copy { grid-column: 1 / 7; }
.home2-hero-fig { grid-column: 8 / 13; align-self: center; margin: 0; }
@media (max-width: 60rem) {
  .home2-hero-copy, .home2-hero-fig { grid-column: 1 / -1; }
  .home2-hero-fig { margin-top: 2rem; }
}
/* Ambient wash: grainy blurred colour light behind the figure only, never behind
   text (WCAG contrast measured against the darkest wash point: still >= 4.5:1 for
   .eyebrow's muted text). Colour here is AMBIENT, never a food-safety verdict --
   see the --accent-color token note above. */
.wash { position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none; overflow: hidden; }
.wash::before {
  content: ''; position: absolute; right: -8%; top: -20%; width: 62%; height: 140%;
  background:
    radial-gradient(40% 45% at 30% 40%, color-mix(in srgb, var(--wash-warm) 70%, transparent), transparent 70%),
    radial-gradient(45% 50% at 75% 35%, color-mix(in srgb, var(--wash-yellow) 65%, transparent), transparent 70%),
    radial-gradient(55% 60% at 60% 80%, color-mix(in srgb, var(--accent-color-soft) 75%, transparent), transparent 70%);
  filter: blur(30px) saturate(1.05); opacity: 0.85;
}
@media (max-width: 60rem) { .wash { left: 0; width: 100%; transform: none; } }
.eyebrow { font-size: 0.85rem; color: var(--muted); margin: 0 0 1rem; }
.eyebrow b { color: var(--accent-color); font-weight: 600; }
.home2-hero-copy h1 {
  font-family: var(--display); font-weight: 750; font-size: clamp(2rem, 4.2vw, 2.8rem);
  line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; margin: 0;
  /* German compound nouns (Lebensmittelunverträglichkeiten) are long enough at this
     column width to break mid-word without hyphenation -- lang="de" on <html> lets the
     browser hyphenate at real syllable boundaries instead. */
  hyphens: auto;
}
.home2-hero-copy .hero-thesis {
  font-family: var(--aside); font-style: italic; font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.4; color: var(--muted); max-width: 34ch; margin: 1rem 0 1.6rem; text-wrap: balance;
}
.home2-hero-copy .hero-thesis .pattern {
  font-style: normal; color: var(--ink); border-bottom: 2px solid var(--accent-color); padding-bottom: 1px;
}
.search-hero2 {
  /* A real button, not an input-shaped box: pill radius (not a text-field's rounded
     rect), content-width (not full-bleed like a field), no placeholder-style question
     inside it -- see the markup comment for why. */
  display: inline-flex; align-items: center; gap: 0.55rem; width: auto;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--muted); border-radius: 999px; padding: 0.6rem 1.4rem; cursor: pointer;
}
.search-hero2:hover { border-color: var(--ink); }
.hero2-quick { margin: 1rem 0 0; font-size: 0.92rem; color: var(--muted); }
.hero2-quick a { margin-right: 0.9rem; }

/* Figure A: delayed-reaction timeline */
.tl { width: 100%; height: auto; }
.tl-axis { stroke: var(--rule); }
.tl-thr { stroke: var(--accent-color); stroke-dasharray: 3 4; stroke-width: 1.2; }
.tl-lab { font-family: var(--body); font-size: 11px; fill: var(--muted); }
.tl-food { font-family: var(--body); font-size: 11px; fill: var(--ink); }
.tl-meal { fill: var(--ink); }
.tl-load { fill: color-mix(in srgb, var(--accent-color-soft) 65%, var(--paper)); }
.tl-sym { fill: none; stroke: var(--ink); stroke-width: 2; }
.tl-flag circle { fill: var(--flag-warm); }
.home2-hero-fig figcaption { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin-top: 0.6rem; }
@media (prefers-reduced-motion: no-preference) {
  .tl-meal { transform-origin: center; transform-box: fill-box; animation: tl-pop 0.6s var(--ease, cubic-bezier(0.2,0.7,0.2,1)) both; }
  .tl-meal:nth-of-type(2) { animation-delay: 0.15s; } .tl-meal:nth-of-type(3) { animation-delay: 0.3s; }
  .tl-load { transform-origin: bottom; transform-box: fill-box; animation: tl-rise 0.7s var(--ease, cubic-bezier(0.2,0.7,0.2,1)) both; }
  .tl-load:nth-of-type(2) { animation-delay: 0.2s; } .tl-load:nth-of-type(3) { animation-delay: 0.4s; } .tl-load:nth-of-type(4) { animation-delay: 0.6s; }
  .tl-sym { stroke-dasharray: 420; stroke-dashoffset: 420; animation: tl-draw 1.1s var(--ease, cubic-bezier(0.2,0.7,0.2,1)) 0.9s both; }
  .tl-flag { transform-origin: center; transform-box: fill-box; animation: tl-pop 0.5s var(--ease, cubic-bezier(0.2,0.7,0.2,1)) 1.8s both; }
  @keyframes tl-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
  @keyframes tl-rise { from { transform: scaleY(0); } to { transform: none; } }
  @keyframes tl-draw { to { stroke-dashoffset: 0; } }
}

/* ---------- Evidence band ---------- */
.evidence-band { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding-block: 1.75rem; margin-top: 1rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.stat b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.95rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent-color); }
.stat span { font-size: 0.82rem; color: var(--muted); display: block; margin-top: 0.3rem; }
/* The date is a date, not a headline figure: at the numerals' size it wrapped to two
   lines and outweighed the two counts beside it. */
.stat-date b { font-size: 1.3rem; line-height: 1.2; }
.auth { margin: 1.2rem 0 0; font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.auth b { color: var(--ink); font-weight: 500; }
@media (max-width: 40rem) { .stats { grid-template-columns: 1fr 1fr; row-gap: 1.2rem; } }

/* ---------- Topic tiles v2 ---------- */
.topic-section2 { margin-top: 3.5rem; }
.section-head h2 { font-size: 1.7rem; font-weight: 700; margin: 0; }
.section-lead { font-size: 1.05rem; color: var(--muted); max-width: 52ch; margin: 0.5rem 0 1.75rem; line-height: 1.5; }
.tiles2 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
@media (max-width: 60rem) { .tiles2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 30rem) { .tiles2 { grid-template-columns: 1fr; } }
.tile2 {
  display: flex; flex-direction: column; gap: 0.5rem; height: 100%;
  padding: 1.1rem 1.15rem 1rem; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--paper-raised); text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tile2:hover { border-color: var(--ink); transform: translateY(-2px); }
.tile2 h3 { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 0; }
.tile2 p { margin: 0; font-size: 0.92rem; color: var(--muted); line-height: 1.45; flex: 1; }
.tile2-meta { display: flex; gap: 0.6rem; align-items: center; font-size: 0.78rem; color: var(--muted); flex-wrap: wrap; }
.ev { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; color: var(--ink); }
.ev i { width: 2.4rem; height: 0.35rem; border-radius: 2px; background: linear-gradient(to right, var(--ink) var(--p), var(--rule) 0); display: block; }

/* ---------- Claim anatomy ---------- */
.claim-section { margin-top: 3.5rem; }
.claim2 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: start; }
.sample2 {
  grid-column: 1 / 8; background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: 10px; padding: 1.6rem 1.8rem; font-size: 1.12rem; line-height: 1.6;
}
.sample2 mark { background: none; border-bottom: 2px solid var(--accent-color); padding-bottom: 1px; color: inherit; }
.cite2 { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); }
.claim2 ol { grid-column: 8 / 13; margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.95rem; }
.claim2 li { margin-bottom: 0.9rem; line-height: 1.5; }
@media (max-width: 60rem) { .sample2, .claim2 ol { grid-column: 1 / -1; } .claim2 ol { margin-top: 1.5rem; } }

/* ---------- GIMETRY bridge ---------- */
.bridge2 {
  margin-top: 3.5rem; border-radius: 14px; padding: 2.5rem;
  background: radial-gradient(60% 80% at 100% 0%, #3d6e57 0%, transparent 60%), #24302a;
  color: var(--paper); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: center;
}
.bridge2-copy { grid-column: 1 / -1; }
@media (max-width: 60rem) { .bridge2 { padding: 1.75rem; } .bridge2-copy { grid-column: 1 / -1; } }
.bridge2-copy h2 { font-size: 1.7rem; color: #fff; margin: 0 0 0.8rem; }
.bridge2-copy p { color: #cfcdd6; max-width: 44ch; line-height: 1.55; margin: 0 0 1.2rem; }
.bridge2-cta {
  display: inline-block; max-width: 100%; box-sizing: border-box; background: var(--wash-warm); color: var(--ink); font-family: var(--display);
  font-weight: 700; text-decoration: none; padding: 0.85rem 1.4rem; border-radius: 8px;
  margin: 0 1rem 0.8rem 0; transition: transform 0.15s ease;
}
.bridge2-cta:hover { transform: translateY(-2px); }
/* The CTA and the secondary link used to sit inline, so in this narrow column the
   secondary link broke mid-phrase ("Erst die / Methode lesen"). A wrapping flex row
   moves each control as one unit instead (owner review, 2026-09-10). */
.bridge2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; }
.bridge2-cta { margin: 0; }
.bridge2-secondary { color: #fff; text-decoration-color: #8b889a; white-space: nowrap; }
.bridge2-copy small { display: block; color: #a7a4b3; font-size: 0.78rem; margin-top: 1rem; max-width: 48ch; line-height: 1.5; }
.cc { width: 100%; height: auto; }
.cc-lab { font-family: var(--body); font-size: 11px; fill: #a7a4b3; }
.cc-cap { font-family: var(--body); font-size: 11px; fill: #a7a4b3; }
.cc-w-a { fill: #3d3b3f; } .cc-w-b { fill: #55525a; }
/* filled = the food was eaten that day; outline = it was not */
.cc-pt { fill: #fff; }
.cc-pt-off { fill: none; stroke: #8b889a; stroke-width: 1.5; }

/* NOTE (2026-09-10): two :nth-of-type rules used to live here, hiding the homepage's
   2nd and 3rd markdown sections because the evidence band and the GIMETRY bridge had
   made them redundant. display:none removes them from the LAYOUT, not from the served
   HTML -- so both sections were still shipping to crawlers and still being written into
   the Pagefind index (verified by decompressing dist/pagefind/fragment/de_*.pf_fragment),
   which is what produced search hits pointing at text no reader could see. The fix was
   to resolve the duplication in the drafts instead: section 3 deleted (bridgeBody says
   the same thing), section 2 cut down to the one claim the components do not make. */

/* ---------- Motion (deliberate + minimal; honored reduced) ----------
   IMPORTANT: content must NEVER be left invisible if animation does not run
   (no-JS, reduced-motion, or a screenshot captured mid-flight). So we do NOT
   animate opacity on body content. Only the hero signature gets one subtle,
   opacity-safe reveal, and only when motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .home-hero .hero-thesis .pattern {
    animation: underline-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
  }
  @keyframes underline-in {
    from { border-bottom-color: transparent; }
    to { border-bottom-color: var(--rule-accent); }
  }
}

