/* ============================================================
   REFRESH 2026-11 — loaded after main.css.

   Palette from a stained tissue slide (H&E): cool slide glass,
   hematoxylin violet for text and lines, eosin rose used in one
   place only — the cells with the GNAS change and the diagram
   paths. The brand green stays for "done" and the logo.

   Type: IBM Plex Sans throughout, self-hosted. A book serif (Literata) for headings was tried and dropped for now: it clashed with the sans-only subpages.
   ============================================================ */

:root {
  --gq-slide: #f4f5f8;
  --gq-slide-2: #eaebf2;
  --gq-ink: #221e47;
  --gq-ink-2: #48446e;
  --gq-ink-3: #625e88;
  --gq-mist: #d6d7e6;
  --gq-eosin: #b13f68;
  --gq-eosin-cell: #eab0c5;
  --gq-eosin-soft: #f6e2ea;
  --gq-leaf: #2e7a41;
  --gq-paper: #ffffff;

  --gq-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gq-container: 1240px;
  --measure: 38rem;

  /* Legacy tokens, remapped so every page picks up the new palette. */
  --bg: var(--gq-slide);
  --bg-2: var(--gq-slide-2);
  --surface: var(--gq-paper);
  --surface-2: var(--gq-slide-2);
  --border: var(--gq-mist);
  --color-text: var(--gq-ink);
  --color-text-muted: var(--gq-ink-2);
  --color-text-faint: var(--gq-ink-3);
  --color-primary: var(--gq-ink);
  --color-dark: var(--gq-ink);
  --color-accent: var(--gq-leaf);
  --color-accent-hover: #24633a;
  --gradient-primary: linear-gradient(135deg, var(--gq-leaf), #24633a);
  --gradient-hero: none;
}

[data-theme="dark"] {
  --gq-slide: #141229;
  --gq-slide-2: #1b1935;
  --gq-ink: #ecebf8;
  --gq-ink-2: #c5c2de;
  --gq-ink-3: #a19dc2;
  --gq-mist: #34315a;
  --gq-eosin: #f292b5;
  --gq-eosin-cell: #8f3b60;
  --gq-eosin-soft: #3b2142;
  --gq-leaf: #72c487;
  --gq-paper: #1e1c3b;

  --bg: var(--gq-slide);
  --bg-2: var(--gq-slide-2);
  --surface: var(--gq-paper);
  --surface-2: var(--gq-slide-2);
  --border: var(--gq-mist);
  --color-text: var(--gq-ink);
  --color-text-muted: var(--gq-ink-2);
  --color-text-faint: var(--gq-ink-3);
  --color-primary: var(--gq-ink);
  --color-dark: var(--gq-ink);
  --color-accent: var(--gq-leaf);
}

/* overflow-x: hidden (main.css) turns <body> into a scroll container, which breaks position: sticky; clip hides the same overflow without that side effect. */
html, body { overflow-x: clip; }

body {
  font-family: var(--gq-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--gq-slide);
  color: var(--gq-ink);
}

.navbar { background: color-mix(in srgb, var(--gq-slide) 92%, transparent); backdrop-filter: blur(8px); }
[data-theme="dark"] .navbar { background: color-mix(in srgb, var(--gq-slide) 92%, transparent); }

:focus-visible { outline: 2px solid var(--gq-eosin); outline-offset: 3px; border-radius: 2px; }

/* Filled buttons keep the deep green in both themes: white text on the light dark-mode green would not be readable. */
.cta-button, .btn-primary { background: #2e7a41 !important; color: #ffffff !important; border-color: #2e7a41 !important; }
.cta-button:hover, .btn-primary:hover { background: #24633a !important; }
.btn-secondary {
  background: transparent !important;
  color: var(--gq-ink) !important;
  border: 1.5px solid var(--gq-ink) !important;
}
.btn-secondary:hover {
  background: var(--gq-ink) !important;
  color: var(--gq-slide) !important;
}
[data-theme="dark"] .btn-outline:hover {
  background: #2e7a41;
  border-color: #2e7a41;
  color: #ffffff;
}
[data-theme="dark"] .stat-number {
  background: none;
  -webkit-text-fill-color: var(--gq-leaf);
  color: var(--gq-leaf);
}

/* Navbar: button reset for hamburger, prevent wrapping on tablet, match container padding on mobile. */
.nav-link { white-space: nowrap; }
button.hamburger {
  background: transparent;
  border: 0;
  padding: 0.25rem;
}
@media (max-width: 960px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    margin-left: 0;
    align-items: flex-start;
    background: var(--gq-slide);
    border-top: 1px solid var(--gq-mist);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    box-shadow: var(--shadow-medium);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  .nav-menu.active { transform: translateY(0); }
  .theme-toggle { margin-left: auto; margin-right: 0.35rem; }
  .hamburger { display: flex !important; margin-left: 0; }
}
@media (max-width: 768px) {
  .nav-container { padding: 0.75rem 1rem; }
}
@media (max-width: 480px) {
  .nav-container { padding: 0.75rem 0.75rem; }
}

/* Subpage typography, spacing, forms, and inline clinical disclaimer. */
.intro-section { padding: 4.5rem 0; }
.intro-section:has(> .container > .breadcrumbs) { padding-top: 6.5rem; }
.projects-section { padding: 4.5rem 0; }
@media (max-width: 768px) {
  .intro-section,
  .projects-section { padding: 3rem 0; }
  .intro-section:has(> .container > .breadcrumbs) { padding-top: 5.5rem; }
}

.intro-section h1 {
  font-family: var(--gq-sans);
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--gq-ink);
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.intro-section h2,
.gq-mosaic-band--page h2,
.gq-diagram-head h2 {
  font-family: var(--gq-sans);
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--gq-ink);
  margin: 0 0 1rem;
  text-wrap: balance;
}
.gq-ripple__list h3,
.gq-flow__text h3 {
  font-family: var(--gq-sans);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--gq-ink);
}
.intro-statement { max-width: 52rem; }
.intro-grid:not(:has(> :nth-child(2))) { grid-template-columns: 1fr; }

.medical-disclaimer--inline {
  padding: 1.15rem 1.4rem;
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-left: 3px solid var(--gq-ink-3);
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--gq-ink-2);
  max-width: 52rem;
}
.medical-disclaimer--inline strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--gq-ink);
}
.medical-disclaimer--inline p { margin: 0; }
.medical-disclaimer--inline p + p { margin-top: 0.6rem; }

/* Legal / Privacy page readable hierarchy and summary box */
.legal-doc { max-width: 48rem; }
.legal-doc p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gq-ink-2);
  margin: 0 0 0.95rem;
}
.legal-doc h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 2.25rem 0 0.75rem;
  color: var(--gq-ink);
}
.legal-doc h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 1.4rem 0 0.5rem;
  color: var(--gq-ink);
}
.legal-doc ul {
  margin: 0.5rem 0 1.2rem 1.35rem;
  color: var(--gq-ink-2);
  line-height: 1.65;
}
.legal-doc li { margin-bottom: 0.45rem; }
.gq-summary-box {
  margin: 1.5rem 0 2rem;
  padding: 1.2rem 1.4rem;
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-left: 4px solid var(--gq-leaf);
  border-radius: 8px;
}
.gq-summary-box h2 {
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
}
.gq-summary-box ul {
  margin: 0 0 0 1.2rem;
  font-size: 0.94rem;
}

/* Form inputs: crisp border in light/dark, no vertical jump on focus */
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--gq-mist);
  background: var(--gq-paper);
  color: var(--gq-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gq-leaf);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gq-leaf) 18%, transparent);
  transform: none;
}
.gq-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.5rem;
}
.gq-fieldset legend {
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--gq-ink);
  font-size: 1rem;
}
.gq-form-notice {
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.95rem;
  background: var(--gq-slide-2);
  border: 1px solid var(--gq-mist);
  border-left: 3px solid var(--gq-eosin);
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--gq-ink-2);
}
.gq-form-rodo {
  margin-top: 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--gq-ink-3);
}
.gq-single-card { max-width: 44rem; }
.gq-registry-dl {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: 0.6rem 1.5rem;
  margin: 1rem 0 0;
}
.gq-registry-dl dt { font-weight: 600; font-size: 0.9rem; color: var(--gq-ink); }
.gq-registry-dl dd { margin: 0; font-size: 0.94rem; color: var(--gq-ink-2); }
@media (max-width: 640px) {
  .gq-registry-dl { grid-template-columns: 1fr; gap: 0.2rem; }
  .gq-registry-dl dt { margin-top: 0.55rem; }
}

/* ── Homepage ─────────────────────────────────────────────── */

.container,
.nav-container {
  max-width: var(--gq-container);
}

.gq-home {
  --measure: 38rem;
  max-width: var(--gq-container);
  margin: 0 auto;
  padding: 6.5rem 2rem 0;
}

.gq-home h1,
.gq-home h2 {
  font-family: var(--gq-sans);
  font-weight: 600;
  color: var(--gq-ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.gq-home h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); line-height: 1.15; margin: 0; }
.gq-home h3 { font-family: var(--gq-sans); font-size: 1.05rem; font-weight: 600; line-height: 1.35; margin: 0; color: var(--gq-ink); }
.gq-home p { margin: 0; text-wrap: pretty; }
/* Text for screen readers only. */
.gq-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; }

.gq-link {
  color: var(--gq-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gq-eosin);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}
.gq-link:hover { color: var(--gq-eosin); }

.gq-button {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--gq-ink);
  color: var(--gq-slide);
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--gq-ink);
}
.gq-button:hover { background: transparent; color: var(--gq-ink); }
.gq-button--quiet { background: transparent; color: var(--gq-ink); }
.gq-button--quiet:hover { background: var(--gq-ink); color: var(--gq-slide); }

/* Hero: the pitch on the left, the research flow on the right, the three ways in below. */
.gq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 29rem);
  grid-template-areas:
    "text flow"
    "doors doors";
  column-gap: 4rem;
  row-gap: 3.5rem;
  align-items: start;
}
.gq-hero__text { grid-area: text; }
.gq-hero__org { font-size: 0.9rem; color: var(--gq-ink-3); margin-bottom: 1.25rem; }
.gq-hero h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 1.5rem;
}
.gq-hero__lead { font-size: 1.15rem; line-height: 1.55; color: var(--gq-ink-2); max-width: var(--measure); }

/* The two tracks, one short paragraph each. The research rule takes the eosin of the flow beside it, so the eye pairs them; the open-knowledge rule takes the leaf green of what is already public. */
.gq-tracks { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1.1rem; max-width: var(--measure); }
.gq-tracks__item { display: grid; gap: 0.2rem; justify-items: start; padding-left: 1rem; border-left: 3px solid var(--gq-mist); }
.gq-tracks__item .gq-link { margin-top: 0.3rem; font-size: 0.95rem; }
.gq-tracks__item strong { font-size: 1.1rem; font-weight: 600; color: var(--gq-ink); }
.gq-tracks__item span { font-size: 1.05rem; line-height: 1.55; color: var(--gq-ink-2); }
.gq-tracks__item--research { border-left-color: var(--gq-eosin); }
.gq-tracks__item--knowledge { border-left-color: var(--gq-leaf); }

/* Hero flow, drawn like a PRISMA chart. The count column has a fixed width so every connector runs under it and the counts read as one falling column: 317, 8, 1, the empty slot. Each box holds only the count, the stage name and its status. */
.gq-flow { grid-area: flow; margin: 0; --ncol: 5.5rem; }
.gq-flow__title { font-size: 0.95rem; font-weight: 600; color: var(--gq-ink); margin-bottom: 0.75rem; }
/* The four directions as one strip above the funnel. A, C and D are letters only; B, the direction the funnel belongs to, carries its name and status, and the funnel's first connector drops from its letter (A is sized for that). When B's name wraps, the letters stretch to its height. */
.gq-dirs { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 0.25rem; }
.gq-dir { flex: none; width: 1.7rem; min-height: 2.3rem; display: grid; place-items: center; background: var(--gq-slide-2); border-radius: 4px; font-size: 0.8rem; font-weight: 600; color: var(--gq-ink-3); }
/* B steps forward: white, a soft shadow, and an eosin top edge that ties it to the eosin connectors below (the shadow alone disappears in dark mode). */
.gq-dir--active {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.8rem 0.35rem 0.55rem;
  background: var(--gq-paper);
  box-shadow: inset 0 2px 0 var(--gq-eosin), 0 1px 2px color-mix(in srgb, var(--gq-ink) 10%, transparent), 0 6px 16px color-mix(in srgb, var(--gq-ink) 8%, transparent);
  color: var(--gq-ink);
  font-size: 0.9rem;
  line-height: 1.25;
}
.gq-dir--active b { color: var(--gq-eosin); }
.gq-dir--active .gq-dir__name { min-width: 0; }
.gq-dir--active .gq-status { margin-left: auto; font-size: 0.8rem; font-weight: 400; white-space: nowrap; }
.gq-flow__stages { list-style: none; margin: 0; padding: 0; }
.gq-flow__box {
  display: grid;
  grid-template-columns: var(--ncol) minmax(0, 1fr);
  background: var(--gq-paper);
  border: 1px solid color-mix(in srgb, var(--gq-ink) 26%, var(--gq-mist));
  border-radius: 3px;
}
.gq-flow__n {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.25rem;
  border-right: 1px solid var(--gq-mist);
  text-align: center;
}
.gq-flow__n b { font-size: 1.55rem; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; color: var(--gq-ink); }
.gq-flow__n small { font-size: 0.72rem; line-height: 1.2; color: var(--gq-ink-3); }
/* Stage name and status share one row and wrap only when the column is narrow; the lab box puts its link on a row of its own. */
.gq-flow__text { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; min-width: 0; padding: 0.6rem 0.9rem; }
.gq-flow__text h3 { font-size: 0.98rem; }
.gq-flow__text .gq-status { font-size: 0.82rem; white-space: nowrap; }
.gq-flow__cta { flex-basis: 100%; font-size: 0.9rem; }

/* Connector: an eosin line under the count column with a small arrowhead; what dropped out on the way is written beside it. */
.gq-flow__via {
  position: relative;
  min-height: 1.7rem;
  padding: 0.35rem 0 0.5rem calc(var(--ncol) / 2 + 0.9rem);
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--gq-ink-3);
}
.gq-flow__via::before {
  content: "";
  position: absolute;
  left: calc(var(--ncol) / 2 - 1px);
  top: 0;
  bottom: 5px;
  width: 2px;
  background: var(--gq-eosin);
}
.gq-flow__via::after {
  content: "";
  position: absolute;
  left: calc(var(--ncol) / 2 - 5px);
  bottom: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--gq-eosin);
}
/* The step computation cannot take: the line breaks into dashes, and the last box is an empty slot. */
.gq-flow__via--gap::before { background: repeating-linear-gradient(to bottom, var(--gq-eosin) 0 4px, transparent 4px 8px); }
.gq-flow__stage--slot .gq-flow__box { background: transparent; border: 1.5px dashed var(--gq-eosin); }
.gq-flow__stage--slot .gq-flow__n { border-right: 1.5px dashed color-mix(in srgb, var(--gq-eosin) 40%, transparent); }
.gq-flow__stage--slot .gq-flow__n small { color: var(--gq-eosin); }
.gq-flow__empty { display: block; width: 1.55rem; height: 1.55rem; border: 1.5px dashed var(--gq-eosin); border-radius: 3px; }

.gq-flow__note { margin-top: 0.9rem; font-size: 0.85rem; line-height: 1.5; color: var(--gq-ink-3); }
.gq-flow__note .gq-link { white-space: nowrap; }
.gq-flow__note .gq-link + .gq-link { margin-left: 0.6rem; }

/* The one motion on load: the stages appear top to bottom, each connector drawing down just before its box, and the sequence stops at the empty slot. Only in the two-column hero, where the flow is on screen at load; on narrow screens it sits below the fold and is simply there. */
@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .gq-flow__box { animation: gq-flow-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(0.2s + var(--i) * 0.32s); }
  .gq-flow__via::before { transform-origin: top; animation: gq-flow-draw 0.24s ease-out both; animation-delay: calc(var(--i) * 0.32s - 0.04s); }
  .gq-flow__via::after,
  .gq-flow__via span { animation: gq-flow-fade 0.3s ease-out both; animation-delay: calc(0.12s + var(--i) * 0.32s); }
}
@keyframes gq-flow-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes gq-flow-draw { from { transform: scaleY(0); } }
@keyframes gq-flow-fade { from { opacity: 0; } }

/* Each door is one link. Every door has the same inner padding so the hover tint frames its text evenly; the row is pulled left by that padding so the first door's text still lines up with the headline. */
.gq-doors {
  grid-area: doors;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--gq-mist);
  margin-left: -1.5rem;
}
.gq-door {
  display: block;
  padding: 1.25rem 1.5rem 1.4rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.gq-door + .gq-door { border-left: 1px solid var(--gq-mist); }
.gq-door:hover { background: var(--gq-slide-2); }
.gq-door:focus-visible { background: var(--gq-slide-2); outline: 2px solid var(--gq-eosin); outline-offset: -2px; }
.gq-door strong { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.gq-door span { color: var(--gq-ink-2); font-size: 0.95rem; }
.gq-door:hover strong { color: var(--gq-eosin); text-decoration: underline; text-underline-offset: 0.2em; }

/* Mosaic: the tissue sketch beside what mosaicism means for a GNAS test. */
.gq-mosaic-band {
  margin: 6rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 4rem;
  align-items: center;
}
.gq-mosaic { margin: 0; }
/* The field fades to nothing inside its own box (a mask in Mosaic.astro), so the box can run a little past the column without showing an edge. Percentages here are of the figure's width. */
.gq-mosaic svg { display: block; width: 114%; height: auto; margin: -6% -7% -5%; }
.gq-mosaic__ground { fill: var(--gq-paper); }
.gq-cell ellipse { fill: color-mix(in srgb, var(--gq-mist) 45%, var(--gq-paper)); stroke: var(--gq-mist); stroke-width: 1.2; }
.gq-cell__nucleus { fill: color-mix(in srgb, var(--gq-ink) 55%, var(--gq-paper)); }
.gq-cell--changed ellipse { fill: var(--gq-eosin-cell); stroke: color-mix(in srgb, var(--gq-eosin) 55%, var(--gq-eosin-cell)); }
.gq-cell--changed .gq-cell__nucleus { fill: var(--gq-ink); }
.gq-mosaic figcaption { margin-top: 0.85rem; font-size: 0.9rem; line-height: 1.5; color: var(--gq-ink-3); max-width: 30rem; }
.gq-mosaic-band__text { display: grid; gap: 1rem; justify-items: start; max-width: var(--measure, 38rem); }
.gq-mosaic-band__text > p { color: var(--gq-ink-2); }
.gq-mosaic-band__text > .gq-mosaic-band__lead { font-size: 1.25rem; line-height: 1.5; color: var(--gq-ink); }
.gq-mosaic-band__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 0.25rem; }
/* The same band on a subpage ("Co to jest FD"): the section around it sets the spacing, and the heading keeps the subpage style. */
.gq-mosaic-band--page { margin: 0; }
.gq-mosaic-band--page h2, .gq-mosaic-band--page .section-eyebrow { margin: 0; }

/* Why: the family story, set as reading text, not as a card. */
.gq-why {
  margin: 4.5rem 0 0;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--gq-mist);
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  column-gap: 3.5rem;
  row-gap: 1rem;
}
.gq-why h2 { grid-row: span 3; font-size: 1.6rem; }
.gq-why > p:first-of-type { font-size: 1.3rem; line-height: 1.55; max-width: var(--measure); }
.gq-why .gq-link { justify-self: start; }
.gq-why__disclaimer { font-size: 0.875rem; color: var(--gq-ink-3); max-width: var(--measure); }

/* Bands: the ledger, what we seek, the source, who we are. */
.gq-band { margin: 6rem 0 0; }
.gq-band__head { display: grid; gap: 0.6rem; margin-bottom: 2rem; max-width: var(--measure); }
.gq-band__head p { color: var(--gq-ink-2); }

.gq-ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--gq-mist); }
.gq-ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  column-gap: 3rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gq-mist);
}
.gq-ledger__status { display: inline-block; margin-top: 0.45rem; font-size: 0.85rem; color: var(--gq-ink-3); }
.gq-ledger__body { display: grid; gap: 0.6rem; justify-items: start; max-width: var(--measure); }
.gq-ledger__body p { color: var(--gq-ink-2); }

.gq-seek { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; margin: 0 0 1.5rem; }
.gq-seek dt { font-weight: 600; margin-bottom: 0.4rem; }
.gq-seek dd { margin: 0; color: var(--gq-ink-2); }
/* .gq-home in front: `.gq-home p { margin: 0 }` would otherwise win and glue the note/links to neighbours. */
.gq-home .gq-seek__note { color: var(--gq-ink-3); font-size: 0.95rem; margin-bottom: 1.75rem; }

.gq-source { display: grid; gap: 0.75rem; justify-items: start; max-width: var(--measure); }
.gq-source p { color: var(--gq-ink-2); }
.gq-source__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.gq-who { font-size: 1.25rem; line-height: 1.55; max-width: var(--measure); }
.gq-home .gq-who__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 1.25rem; }

.gq-closing {
  margin: 6rem 0 0;
  padding: 3.5rem 0 5rem;
  border-top: 1px solid var(--gq-mist);
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}
.gq-closing p { color: var(--gq-ink-2); }
.gq-closing__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

/* ── Diagrams ─────────────────────────────────────────────────
   `--p` (0–1) comes from scripts/scrolly.ts as the reader scrolls;
   each element appears from its own `--at`. Default 1: without the
   script, or with reduced motion, everything is shown whole. */

.gq-scrolly { --p: 1; margin: 6rem 0 0; }
.gq-diagram-head { display: grid; gap: 0.6rem; margin-bottom: 2.25rem; max-width: var(--measure); }
.gq-diagram-head p { color: var(--gq-ink-2); }

.gq-node,
.gq-line {
  --rv: clamp(0, calc((var(--p) - var(--at, 0)) * 7), 1);
}
.gq-node {
  opacity: calc(0.16 + var(--rv) * 0.84);
  transform: translateY(calc((1 - var(--rv)) * 10px));
}
.gq-line {
  fill: none;
  stroke: var(--gq-eosin);
  stroke-width: 2;
  stroke-linecap: round;
  /* Drawn by dash offset over pathLength="1"; no vector-effect, which would break that normalisation. */
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--rv));
}
.gq-line--dashed {
  stroke: var(--gq-ink-3);
  stroke-dasharray: 4 5;
  stroke-dashoffset: 0;
  opacity: var(--rv);
}

.gq-status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--gq-ink-2); }
.gq-status svg { width: 0.75rem; height: 0.75rem; flex: none; }
.gq-status__fill { fill: var(--gq-leaf); }
.gq-status__ring { fill: none; stroke: var(--gq-ink-3); stroke-width: 1.4; }
.gq-status--partial .gq-status__ring { stroke: var(--gq-leaf); }
.gq-status--maybe .gq-status__ring { stroke-dasharray: 2 2; }

/* Diagram 2: rings rising from one cell, the list beside them, the wider context under the horizon line, below the rings. */
.gq-ripple {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "rings list" "horizon list";
  grid-template-rows: auto 1fr;
  column-gap: 3.5rem;
}
.gq-ripple__rings { grid-area: rings; width: 100%; height: auto; overflow: visible; }
.gq-ripple__list { grid-area: list; align-self: center; }
.gq-ripple__horizon { stroke: var(--gq-mist); stroke-width: 1.5; }
.gq-ripple__ring { stroke: var(--gq-ink-2); stroke-width: 1.6; }
.gq-ripple__ring--1 { stroke: var(--gq-eosin); stroke-width: 2.2; }
.gq-ripple__far { stroke: var(--gq-eosin); opacity: calc(var(--rv) * 0.7); }
.gq-ripple__cell { fill: var(--gq-eosin-cell); stroke: var(--gq-eosin); stroke-width: 1.4; }
.gq-ripple__nucleus { fill: var(--gq-ink); }
.gq-ripple__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: ring; }
.gq-ripple__list > li { counter-increment: ring; }
.gq-ripple__list > li h3::before { content: counter(ring); display: inline-block; min-width: 1.4em; color: var(--gq-ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.gq-ripple__num { font-family: var(--gq-sans); font-size: 11px; fill: var(--gq-ink-3); text-anchor: middle; }
.gq-node--flat { display: grid; gap: 0.3rem; justify-items: start; padding-left: 1rem; border-left: 2px solid var(--gq-mist); }
.gq-node--flat p { font-size: 0.95rem; color: var(--gq-ink-2); }
.gq-horizon {
  grid-area: horizon;
  align-self: start;
  margin-top: 1.5rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px dashed color-mix(in srgb, var(--gq-eosin) 55%, transparent);
  max-width: var(--measure);
}
.gq-horizon h3 { font-weight: 500; color: var(--gq-ink-3); font-size: 0.95rem; }
.gq-horizon p { color: var(--gq-ink-3); font-size: 0.92rem; }

/* Wide screens with room: the stage sticks while the diagram builds. */
@media (min-width: 960px) and (min-height: 700px) {
  .gq-scrolly { height: 190vh; }
  .gq-scrolly__stage { position: sticky; top: calc(64px + 4vh); }
  /* Set by scrolly.ts when the stage is taller than the room under its sticky top. */
  .gq-scrolly--loose { height: auto; }
  .gq-scrolly--loose .gq-scrolly__stage { position: static; }
}

@media (max-width: 959px) {
  .gq-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "flow" "doors"; row-gap: 3rem; }
  .gq-flow { max-width: 34rem; }
  .gq-mosaic-band { column-gap: 2.5rem; }
  .gq-ripple { grid-template-columns: minmax(0, 1fr); grid-template-areas: "rings" "list" "horizon"; grid-template-rows: auto; row-gap: 2rem; }
  .gq-horizon { margin-top: 0; }
  .gq-ripple__rings { max-width: 26rem; }
}

@media (max-width: 760px) {
  .gq-home { padding: 5.5rem 1rem 0; }
  .gq-hero { row-gap: 2.5rem; }
  .gq-flow { --ncol: 4.25rem; }
  /* Narrower letters, and B's letter moved left with them so it still sits over the first connector; B's status is dropped for room. */
  .gq-dir:not(.gq-dir--active) { width: 1.25rem; }
  .gq-dir--active { padding-left: 0.35rem; }
  .gq-dir--active .gq-status { display: none; }
  .gq-flow__n b { font-size: 1.4rem; }
  .gq-mosaic-band { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; margin-top: 4.5rem; }
  .gq-mosaic-band--page { margin-top: 0; }
  /* On a phone the faded sides can reach the screen edge, never past it. */
  .gq-mosaic svg { width: calc(100% + 2rem); margin: -1.5rem -1rem -1.25rem; }
  .gq-doors { grid-template-columns: minmax(0, 1fr); margin-left: 0; }
  .gq-door, .gq-door + .gq-door { padding: 1rem 0; border-left: 0; border-bottom: 1px solid var(--gq-mist); }
  .gq-why { grid-template-columns: minmax(0, 1fr); }
  .gq-why h2 { grid-row: auto; }
  .gq-ledger__row { grid-template-columns: minmax(0, 1fr); row-gap: 0.75rem; }
  .gq-seek { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gq-scrolly { height: auto; }
  .gq-scrolly__stage { position: static; }
  .gq-node { transform: none; }
}

/* Links no stylesheet rule reaches (the sitemap, inline citations) fell back to the browser's blue, unreadable on the dark slide. Zero specificity, so every existing link rule still wins. */
:where(a:not([class])) { color: var(--gq-leaf); }

/* The contact form kept white fields in dark mode. */
[data-theme="dark"] .form-group :is(input, select, textarea) { background: var(--gq-paper); color: var(--gq-ink); border-color: var(--gq-mist); }

/* ── Simplified Navigation (flat, single-button lang switch) ── */
.nav-menu { gap: 1.15rem; }
.lang-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 32px;
  padding: 0 0.55rem;
  border-radius: 7px;
  border: 1px solid var(--gq-mist);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gq-ink);
  text-decoration: none;
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.lang-switch-link:hover {
  border-color: var(--gq-leaf);
  color: var(--gq-leaf);
  background: var(--gq-slide-2);
}

/* ── Homepage Hub Hero (distinctive editorial split) ────────── */
.gq-hero--hub {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  grid-template-areas: "text routes";
  column-gap: 3rem;
  row-gap: 2.5rem;
  align-items: start;
}
.gq-hero--hub h1 {
  font-size: clamp(2.1rem, 3.6vw, 2.95rem);
  line-height: 1.1;
}
.gq-proof-strip {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--gq-mist);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gq-ink-3);
}
.gq-proof-strip li {
  position: relative;
}
.gq-proof-strip li + li::before {
  content: "·";
  margin-right: 1.25rem;
  color: var(--gq-mist);
}

/* Compact horizontal H&E mini-funnel on the homepage hero: preserves the visual
   signature of 317 -> 8 -> 1 -> [empty lab slot] without adding hero bloat. */
.gq-minifunnel {
  margin: 1.85rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--gq-mist);
}
.gq-minifunnel__cap {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--gq-ink-3);
  margin: 0 0 0.7rem;
}
.gq-minifunnel__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.gq-minifunnel__step {
  position: relative;
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-top: 2.5px solid var(--gq-eosin);
  border-radius: 5px;
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.1rem;
}
.gq-minifunnel__step b {
  font-size: 1.15rem;
  line-height: 1.1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gq-ink);
}
.gq-minifunnel__step span {
  font-size: 0.76rem;
  line-height: 1.25;
  color: var(--gq-ink-3);
}
.gq-minifunnel__step--gap {
  background: transparent;
  border: 1.5px dashed var(--gq-eosin);
}
.gq-minifunnel__step--gap b {
  color: var(--gq-eosin);
}

/* Responsive 2-column grid (replaces inline style="grid-template-columns: repeat(2, 1fr)") */
.projects-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gq-story-p {
  font-size: 1.03rem;
  line-height: 1.68;
  color: var(--gq-ink-2);
  max-width: 44rem;
  margin: 0 0 1.05rem;
}
.gq-story-details {
  margin-top: 1.25rem;
  max-width: 48rem;
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
}
.gq-story-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gq-ink);
}
.gq-story-details[open] summary {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--gq-mist);
}
.gq-table ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}
.gq-routes {
  grid-area: routes;
  display: grid;
  gap: 1.25rem;
}
.gq-route {
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-left: 4px solid var(--gq-leaf);
  border-radius: 6px;
  padding: 1.15rem 1.35rem;
}
.gq-route--eosin {
  border-left-color: var(--gq-eosin);
}
.gq-route__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gq-leaf);
  margin: 0 0 0.65rem;
}
.gq-route--eosin .gq-route__label {
  color: var(--gq-eosin);
}
.gq-route__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.gq-route__list li + li {
  border-top: 1px solid var(--gq-mist);
}
.gq-route__item {
  display: block;
  padding: 0.7rem 0.4rem;
  margin: 0 -0.4rem;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.gq-route__item:hover {
  background: var(--gq-slide);
}
.gq-route__item strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gq-ink);
  margin-bottom: 0.15rem;
}
.gq-route__item:hover strong {
  color: var(--gq-eosin);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.gq-route__item span {
  display: block;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--gq-ink-2);
}
.gq-why__links { margin-top: 0; }

/* ── Shared Subpage Visual Components (anti-wall-of-text) ──── */
.gq-stepper {
  margin: 0 0 1.5rem;
}
.gq-stepper ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.gq-stepper li a,
.gq-stepper li span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--gq-mist);
  background: var(--gq-paper);
  color: var(--gq-ink-2);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.gq-stepper li a:hover {
  border-color: var(--gq-leaf);
  color: var(--gq-ink);
}
.gq-stepper li.is-active span {
  background: var(--gq-ink);
  border-color: var(--gq-ink);
  color: var(--gq-slide);
  font-weight: 600;
}

.gq-jumpbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-radius: 8px;
  font-size: 0.9rem;
}
.gq-jumpbar a {
  color: var(--gq-ink);
  font-weight: 500;
  text-decoration: none;
}
.gq-jumpbar a:hover {
  color: var(--gq-eosin);
  text-decoration: underline;
}

/* 30-second relief strip on /co-to-jest/ */
.gq-tldr {
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.4rem;
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-left: 4px solid var(--gq-leaf);
  border-radius: 8px;
}
.gq-tldr__head {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gq-leaf);
  margin: 0 0 0.9rem;
}
.gq-tldr__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.gq-tldr__item strong {
  display: block;
  font-size: 0.98rem;
  color: var(--gq-ink);
  margin-bottom: 0.25rem;
}
.gq-tldr__item p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--gq-ink-2);
}

/* Decision tree on /diagnostyka/ */
.gq-tree {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.gq-tree__step {
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-radius: 8px;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.gq-tree__step--highlight {
  border-color: var(--gq-eosin);
  box-shadow: inset 0 3px 0 var(--gq-eosin);
}
.gq-tree__badge {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gq-ink-3);
}
.gq-tree__step--highlight .gq-tree__badge { color: var(--gq-eosin); }
.gq-tree__step h3 { margin: 0; font-size: 1.05rem; color: var(--gq-ink); }
.gq-tree__step p { margin: 0; font-size: 0.94rem; line-height: 1.55; color: var(--gq-ink-2); }
.gq-tree__split {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.25rem;
}
.gq-tree__branch {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  background: var(--gq-slide);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--gq-ink-2);
}
.gq-tree__branch strong { color: var(--gq-ink); }

/* Responsive data tables (Polish GNAS labs, Treatment comparison, Method labels) */
.gq-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--gq-mist);
  border-radius: 8px;
  background: var(--gq-paper);
  margin-top: 1.5rem;
}
.gq-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.94rem;
  line-height: 1.5;
  text-align: left;
}
.gq-table th {
  padding: 0.85rem 1rem;
  background: var(--gq-slide-2);
  color: var(--gq-ink);
  font-weight: 600;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gq-mist);
}
.gq-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--gq-mist);
  color: var(--gq-ink-2);
  vertical-align: top;
}
.gq-table tbody tr:last-child td { border-bottom: 0; }
.gq-table td strong { color: var(--gq-ink); }
.gq-table tr.is-featured td:first-child {
  box-shadow: inset 3px 0 0 var(--gq-leaf);
}
.gq-table__meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.84rem;
  color: var(--gq-ink-3);
}

/* Executive summary card on /badania/ */
.gq-exec {
  margin: 1.75rem 0 0;
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-left: 4px solid var(--gq-eosin);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
}
.gq-exec__grid {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.7rem 1.5rem;
  margin: 0;
}
.gq-exec__grid dt {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gq-ink);
}
.gq-exec__grid dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--gq-ink-2);
}

/* Research page HeroFlow + Directions layout */
.gq-research-flow {
  display: grid;
  grid-template-columns: minmax(0, 29rem) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
/* Override legacy homepage hero grid-area: flow so HeroFlow stays in column 1 here. */
.gq-research-flow .gq-flow {
  grid-area: auto;
}
.gq-scrolly--embedded {
  margin: 0;
  padding: 4.5rem 0;
  border-top: 1px solid var(--gq-mist);
}
.gq-scrolly--embedded .gq-scrolly__stage {
  max-width: var(--gq-container);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Compact checklist / milestones strip */
.gq-milestones {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.gq-milestones li {
  background: var(--gq-paper);
  border: 1px solid var(--gq-mist);
  border-radius: 8px;
  padding: 0.95rem 1.05rem;
}
.gq-milestones__year {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gq-leaf);
  margin-bottom: 0.25rem;
}
.gq-milestones p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--gq-ink-2);
}

/* Copy IBAN inline button on /donacje/ */
.gq-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.gq-copy-btn {
  padding: 0.32rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--gq-mist);
  background: var(--gq-slide);
  color: var(--gq-ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.gq-copy-btn:hover {
  border-color: var(--gq-leaf);
  color: var(--gq-leaf);
}

@media (max-width: 959px) {
  .gq-hero--hub { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "routes"; }
  .gq-tldr__grid,
  .gq-tree,
  .gq-milestones { grid-template-columns: minmax(0, 1fr); }
  .gq-research-flow { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 760px) {
  .projects-grid--2 { grid-template-columns: minmax(0, 1fr); }
  .gq-minifunnel__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gq-exec__grid { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .gq-exec__grid dt { margin-top: 0.6rem; }
  .gq-exec__grid dt:first-child { margin-top: 0; }
  .gq-scrolly--embedded .gq-scrolly__stage { padding: 0 1rem; }
  .gq-table th, .gq-table td { padding: 0.7rem 0.75rem; font-size: 0.88rem; }
}

/* ── Footer (from PR #29) ────────────────────────────────────
   A dark band closes every page in both themes, with a ruled medical note and legal line. */
.footer {
  --ft-bg: #221e47;
  --ft-head: #ffffff;
  --ft-text: #d9d7ec;
  --ft-muted: #aeabcd;
  --ft-rule: rgba(236, 235, 248, 0.16);
  background: var(--ft-bg);
  color: var(--ft-text);
  border-top: 0;
  margin-top: 0;
  padding: 4rem 0 2.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
[data-theme="dark"] .footer { --ft-bg: #0c0a1c; border-top: 1px solid var(--gq-mist); }
.footer :focus-visible { outline-color: #f292b5; }

.footer-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 3rem;
  margin: 0;
  text-align: left;
}
.footer-brand { display: grid; gap: 0.75rem; align-content: start; max-width: 22rem; }
.footer-brand p { margin: 0; color: var(--ft-muted); font-size: 0.9rem; }
.footer-brand .footer-brand__name { color: var(--ft-head); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-section__title {
  margin: 0 0 0.9rem;
  font-family: var(--gq-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ft-head);
}
.footer-section ul, .footer-bottom__links { list-style: none; margin: 0; padding: 0; }
.footer-section li { margin: 0 0 0.55rem; }
.footer a { color: var(--ft-text); text-decoration: none; font-size: inherit; }
.footer-section a { font-size: 0.92rem; }
.footer a:hover { color: var(--ft-head); text-decoration: underline; text-underline-offset: 3px; }

.footer .medical-disclaimer {
  max-width: none;
  margin: 3rem 0 0;
  padding: 1.75rem 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--ft-rule);
  border-radius: 0;
}
.footer .medical-disclaimer strong { display: block; margin-bottom: 0.35rem; font-size: 0.88rem; font-weight: 600; color: var(--ft-head); }
.footer .medical-disclaimer p { max-width: 52rem; margin: 0; font-size: 0.85rem; line-height: 1.6; color: var(--ft-muted); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 0;
  border-top: 0;
  text-align: left;
  font-size: 0.85rem;
  color: var(--ft-muted);
}
.footer-bottom p { margin: 0; }
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-bottom a { color: var(--ft-muted); }

@media (max-width: 900px) {
  .footer-content { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; text-align: left; }
}
@media (max-width: 600px) {
  .footer { padding: 3rem 0 2rem; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .footer-section a { display: inline-block; padding: 0.15rem 0; }
}

/* ── Materials for the family doctor (from PR #30) ─────────── */
.gq-materials__lead { max-width: 40rem; margin: 0.75rem 0 0; color: var(--gq-ink-2); }
.gq-materials__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.gq-materials__groups { columns: 2; column-gap: 3rem; margin-top: 2rem; }
.gq-materials__group { break-inside: avoid; margin-bottom: 2rem; }
.gq-materials__group h3 { font-size: 1rem; font-weight: 600; margin: 0 0 0.75rem; color: var(--gq-ink); }
.gq-materials__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.gq-materials__group li { display: grid; gap: 0.2rem; padding-left: 0.9rem; border-left: 2px solid var(--gq-mist); }
.gq-materials__role { font-size: 0.82rem; font-weight: 600; color: var(--gq-ink-3); }
.gq-materials__cite { font-size: 0.92rem; line-height: 1.5; color: var(--gq-ink-2); }
.gq-materials__cite a { color: var(--gq-leaf); white-space: nowrap; }
.gq-materials__url { display: none; }
.gq-materials__note { max-width: 40rem; margin: 2rem 0 0; font-size: 0.85rem; color: var(--gq-ink-3); }
@media (max-width: 760px) {
  .gq-materials__groups { columns: 1; }
}

@media print {
  html.gq-print-materials body > *:not(#materialy) { display: none !important; }
  html.gq-print-materials body { background: #fff; color: #000; font-size: 10.5pt; }
  html.gq-print-materials #materialy { border: 0 !important; padding: 0 !important; }
  html.gq-print-materials .gq-materials__actions,
  html.gq-print-materials .section-eyebrow { display: none !important; }
  html.gq-print-materials .gq-materials__groups { columns: 1; margin-top: 1rem; }
  html.gq-print-materials .gq-materials__group { break-inside: auto; margin-bottom: 0.9rem; }
  html.gq-print-materials .gq-materials__group ul { gap: 0.45rem; }
  html.gq-print-materials .gq-materials__group li { break-inside: avoid; }
  html.gq-print-materials .gq-materials__url { display: block; font-size: 8.5pt; color: #333; }
  html.gq-print-materials .gq-materials__cite a { color: #000; text-decoration: none; }
  html.gq-print-materials * { color: #000 !important; }
}
