/* ============================================================
   prenatalcardiology.org — "Field Notes" design system v3
   Canvas: warm paper. Ink: deep blue. One accent: muted coral.
   Display: Newsreader (editorial serif, self-hosted).
   Body: Public Sans. Mono: system mono, sparse.
   Motif: hand-drawn winding line = the nonlinear care journey.
   ============================================================ */

@import url("fonts/fonts.css");

:root {
  --paper: #F6F1E7;
  --paper-deep: #EFE7D8;
  --paper-card: #FBF8F1;
  --ink: #1E2A38;
  --ink-soft: #43505E;
  --ink-faint: #626C7A;
  --coral: #B34E36;
  --coral-deep: #A8432D;
  --coral-wash: #F3E2D9;
  --sage: #4A6555;
  --sage-wash: #E4EBE4;
  --amber: #B98A2F;
  --night: #16202D;
  --line: #DCD2BF;
  --line-strong: #C9BCA4;
  --radius: 14px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  --shadow-card: 0 1px 2px rgba(63, 50, 33, 0.06), 0 10px 28px -14px rgba(63, 50, 33, 0.22);
  --shadow-lift: 0 2px 4px rgba(63, 50, 0.07), 0 18px 44px -16px rgba(67, 50, 33, 0.3);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* paper grain — fixed overlay, no scroll repaint cost */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.66' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--coral-wash); color: var(--coral-deep); }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--coral-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 10000;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---------- type scale ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.32rem; line-height: 1.25; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.8vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin: 0 0 12px;
}
/* eyebrow discipline: max 1 per 3 sections; several sections below intentionally drop it */

.small { font-size: 0.85rem; color: var(--ink-faint); }
.mono { font-family: var(--mono); font-size: 0.85em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }

em { font-style: italic; }
strong { font-weight: 650; color: var(--ink); }

/* ---------- layout shells ---------- */

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { color: var(--ink-soft); max-width: 56ch; }

.alt { background: var(--paper-deep); }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head-inner {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark { display: grid; place-items: center; }
.brand-name { display: block; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; line-height: 1.1; }
.brand-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  font-size: 0.86rem;
  font-weight: 550;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: rgba(30, 42, 56, 0.05); }
.site-nav a[aria-current="page"] { color: var(--coral-deep); font-weight: 700; }

.lang-switch {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 13px !important;
  color: var(--ink) !important;
  font-weight: 650 !important;
  margin-left: 8px;
}
.lang-switch:hover { border-color: var(--coral); color: var(--coral-deep) !important; }

.nav-toggle {
  display: none;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 100px);
  overflow: hidden;
}
.hero-grid {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { max-width: 34em; margin-bottom: 28px; }
.hero-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 14px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero-fact {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 46em;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hero-fact strong { color: var(--ink-soft); }
.hero-fact a { color: var(--amber); }

.hero-visual { position: relative; }
.hero-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}
.hero-caption {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-top: 10px;
}

/* winding journey line behind hero */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 900' fill='none'%3E%3Cpath d='M-40 760 C 240 700, 380 640, 520 560 S 840 420, 980 300 S 1180 160, 1260 60' stroke='%23C4593F' stroke-opacity='0.16' stroke-width='2.5' stroke-dasharray='1 10' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: cover;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 650;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s, color 0.18s, border-color 0.18s;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn.primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(196, 89, 63, 0.55);
}
.btn.primary:hover { background: var(--coral-deep); color: #fff; box-shadow: 0 14px 30px -10px rgba(168, 67, 45, 0.6); transform: translateY(-1px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.ghost:hover { border-color: var(--ink); background: rgba(30, 42, 56, 0.04); }

/* ---------- three doors (entry tracks) ---------- */

.entry-tracks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.track-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
}
.track-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-strong);
}
.track-card h3 { font-size: 1.38rem; margin: 0 0 8px; }
.track-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; flex-grow: 1; }
.track-card .when {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 14px;
  display: block;
}
.track-card .go {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--coral-deep);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.track-card .go::after { content: " →"; }
.track-card:hover .go { color: var(--coral); }

.track-card.t-red .when { color: var(--coral-deep); }
.track-card.t-amber .when { color: var(--amber); }

/* ---------- stage rail (the pathway) ---------- */

.stage-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  counter-reset: stage;
}
.stage-node {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
  position: relative;
}
.stage-node:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.stage-node h3 { font-size: 1.12rem; margin: 2px 0 4px; }
.stage-node p { font-size: 0.8rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.stage-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.stage-node .week {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--coral-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* horizontal pathway line connecting stages */
.stage-rail::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -18px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
  border-radius: 2px;
}

/* ---------- card grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.info-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.info-card h3 { margin: 2px 0 6px; }
.info-card p { font-size: 0.88rem; color: var(--ink-soft); margin: 0; flex-grow: 1; }
.card-img {
  border-radius: 10px;
  margin: -8px -6px 10px;
  width: calc(100% + 12px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.info-card .eyebrow { margin-bottom: 2px; }

/* night section keeps dark images at home on warm paper */
.night {
  background: var(--night);
  color: #E9E4D8;
  border-radius: calc(var(--radius) + 8px);
  margin: 0 auto;
  width: min(1280px, calc(100% - 32px));
}
.night h2, .night h3 { color: #F4F0E6; }
.night .section-head p { color: #B9C2CE; }

/* ---------- article pages ---------- */

.article-shell {
  width: min(720px, calc(100% - 48px));
  margin: clamp(48px, 6vw, 80px) auto clamp(64px, 8vw, 110px);
}
.article-shell h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  margin: 2.4em 0 0.7em;
  scroll-margin-top: 100px;
}
.article-shell h2:first-of-type { margin-top: 1.4em; }
.article-shell h3 { margin: 2em 0 0.6em; font-size: 1.18rem; }
.article-shell p, .article-shell li { color: var(--ink-soft); }
.article-shell p strong { color: var(--ink); }

.stage-head { margin-bottom: 8px; }
.stage-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; text-wrap: balance; }
.stage-head .lead { margin: 14px 0 0; }
.stage-head .eyebrow { color: var(--coral-deep); }

.article-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.article-meta .chip { background: var(--paper-deep); color: var(--ink-soft); }
.article-meta .chip.accent { background: var(--coral-wash); color: var(--coral-deep); }

/* glossary search + list */
.gloss-tools { margin: 0 0 28px; }
.gloss-search {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 14px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-card);
  color: var(--ink);
}
.gloss-search:focus { outline: none; border-color: var(--coral); }
.gloss-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.gloss-nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 4px 9px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-soft);
}
.gloss-nav a:hover { background: var(--coral-wash); color: var(--coral-deep); }
.gloss-section h2 {
  font-size: 1.3rem;
  margin: 2em 0 0.4em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line-strong);
}

.answer-box {
  background: var(--coral-wash);
  border-left: 3px solid var(--coral);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 26px;
  margin: 28px 0 40px;
}
.answer-box .eyebrow { color: var(--coral-deep); }
.answer-box p { font-family: var(--serif); font-size: 1.13rem; line-height: 1.55; color: var(--ink); margin: 0; }

.evidence-box {
  background: var(--sage-wash);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 26px 0;
}
.evidence-box .eyebrow { color: var(--sage); margin-bottom: 6px; }
.evidence-box p { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }

a.cite {
  font-size: 0.8em;
  color: var(--ink-faint);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  white-space: nowrap;
}
a.cite:hover { color: var(--coral-deep); }
.faq-src { margin: 10px 0 0; }

.term-grid { margin: 1.2em 0; }
.term-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.term-row:first-child { border-top: 1px solid var(--line); }
.term-row dt {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.term-row dt .mono { color: var(--ink-faint); font-size: 0.78rem; }
.term-row dd { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }

.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.chip.ok { background: var(--sage-wash); color: var(--sage); }
.chip.caution { background: var(--coral-wash); color: var(--coral-deep); }
.chip.urgent { background: var(--coral-deep); color: #fff; }

.article-figure {
  margin: 40px 0 8px;
}
.article-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.article-figure figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-top: 10px;
}

.question-list {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
}
.question-list ol { margin: 12px 0 14px; padding-left: 22px; }
.question-list li { margin: 8px 0; }
.question-list .small { display: block; margin-top: 10px; }

/* ---------- FAQ (details/summary) ---------- */

.faq-block { margin: 48px 0 8px; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  padding: 20px 44px 20px 0;
  position: relative;
  transition: color 0.18s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--coral-deep); }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
  border-color: var(--coral);
}
.faq-item .faq-a {
  padding: 0 40px 22px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- article nav ---------- */

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(720px, calc(100% - 48px));
  margin: 0 auto clamp(56px, 8vw, 96px);
}
.article-nav a {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-card);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.article-nav a:hover { border-color: var(--coral); color: var(--coral-deep); transform: translateY(-2px); }

/* ---------- updates log ---------- */

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.log-list { display: flex; flex-direction: column; }
.log-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.log-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.log-item:first-child { border-top: 1px solid var(--line); }
.log-item time {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.log-item h3 { margin: 0 0 4px; font-size: 1.15rem; }
.log-item h3 a { color: var(--ink); text-decoration: none; }
.log-item h3 a:hover { color: var(--coral-deep); }
.log-item p { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.log-item .kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------- footer ---------- */

.disclaimer-band {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.disclaimer-band-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}
.disclaimer-band p { font-size: 0.85rem; color: var(--ink-soft); max-width: 72ch; }

.site-foot {
  background: var(--night);
  color: #C6CCD6;
  padding: clamp(48px, 6vw, 72px) 0 0;
}
.site-foot-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
.site-foot .foot-h {
  color: #F4F0E6;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 7px 0; }
.site-foot a { color: #C6CCD6; text-decoration: none; font-size: 0.88rem; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .brand { color: #F4F0E6; margin-bottom: 14px; }
.site-foot .brand-name { color: #F4F0E6; }
.site-foot .brand-sub { color: #E3B08F; }
.site-foot > .site-foot-inner > div:first-child p {
  font-size: 0.85rem;
  color: #9AA3B0;
  max-width: 36ch;
  line-height: 1.6;
}

.foot-legal {
  border-top: 1px solid rgba(230, 224, 210, 0.14);
  padding: 20px 0;
}
.foot-legal-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #8B94A2;
}

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .stage-rail { grid-template-columns: repeat(2, 1fr); }
  .stage-rail::before { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .site-foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    display: none;
    box-shadow: var(--shadow-lift);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 8px; border-bottom: 1px solid rgba(220, 210, 191, 0.5); border-radius: 0; }
  .lang-switch { border: none; padding: 11px 8px !important; margin-left: 0; }
  .nav-toggle { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; }
  .entry-tracks { grid-template-columns: 1fr; }
  .night { width: calc(100% - 32px); border-radius: var(--radius); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .stage-rail { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .site-foot-inner { grid-template-columns: 1fr; gap: 28px; }
  .log-item { grid-template-columns: 1fr; gap: 4px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- print ---------- */

@media print {
  body::before, .site-head, .article-nav, .site-foot, .disclaimer-band { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .answer-box, .evidence-box, .question-list { border: 1px solid #999; background: #fff; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* screen-reader-only glossary aliases (searchable, invisible) */
.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;
}

.log-title { font-family: var(--font-body); font-size: 1.05rem; font-weight: 650; margin: 0 0 6px; }
