/* EmailDDx shared template styles.
   One token set for every new template. Existing pages keep their own
   inline CSS until the owner moves them onto this file.

   Canonical choices, after the inline styles had drifted:
   --shell: 1060px (homepage). Article pages had used 720–800px.
   --prose: 40rem, the reading measure inside that shell.
   --gutter: 1.25rem, 2.25rem from 48rem. Replaces 36 / 22 / 20 / 18.
   --amber: #C47A1A. The blog index had drifted to #C9842A.
   --ink-faint: #646055. #8E8A7A was about 3.1:1 on --bg.
   Primary buttons keep --accent and use --ink text. White on #E86A3A is about 3.0:1.
*/

:root {
  color-scheme: only light;
  --bg: #F4F1E8;
  --bg-soft: #EDE9DC;
  --bg-wash: #E5E0D0;
  --card: #FFFEF9;
  --ink: #1C1B18;
  --ink-soft: #5C594C;
  --ink-faint: #646055;
  --green: #2F5A22;
  --green-mid: #3D6B2E;
  --green-deep: #1A3A14;
  --green-lt: #D8E6CC;
  --green-soft: #EBF2E4;
  --accent: #E86A3A;
  --accent-deep: #9C3E16;
  --amber: #C47A1A;
  --amber-ink: #8A5608;
  --amber-soft: #F8E8CC;
  --purple: #7B6BC4;
  --purple-ink: #4E4288;
  --border: #1C1B18;
  --line: rgba(28, 27, 24, 0.12);
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-hand: "Caveat", cursive;
  --shell: 1060px;
  --prose: 40rem;
  --gutter: 1.25rem;
  --section-y: 3.5rem;
  --header-h: 4.25rem;
  --shadow: 0 4px 0 var(--accent-deep);
  --focus: 3px solid var(--ink);
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2.25rem;
    --section-y: 5.5rem;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.75rem;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2rem, 7vw, 3.5rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }

p { margin: 0 0 1rem; }

a { color: var(--green-mid); }

a:hover { color: var(--green); }

:focus { outline: none; }

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-pill);
  z-index: 80;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.shell {
  width: min(var(--shell), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.prose { max-width: var(--prose); }

.prose > * { max-width: 38rem; }

.prose h2,
.prose h3 { scroll-margin-top: 5.5rem; }

.prose h2 { margin-top: 2.2rem; }

.prose h3 { margin-top: 1.4rem; }

.prose a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

.prose ul,
.prose ol { padding-left: 1.2rem; margin: 0 0 1rem; }

.prose li { margin: 0.35rem 0; }

.prose li strong { font-weight: 700; }

.eyebrow {
  font-family: var(--font-hand);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--green-mid);
  margin: 0 0 0.4rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 38rem;
}

.updated {
  color: var(--ink-faint);
  font-size: 0.92rem;
  margin: 0.8rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 2.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font: 700 1rem/1.2 var(--font-sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  text-align: center;
  box-shadow: 3px 4px 0 rgba(28, 27, 24, 0.12);
}

.btn:hover { color: var(--ink); background: var(--bg-soft); }

.btn-go {
  background: var(--accent);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.btn-go:hover {
  background: #f07d52;
  color: var(--ink);
}

.btn:active { transform: translateY(1px); }

.btn-row.is-center { justify-content: center; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 241, 232, 0.94);
  border-bottom: 2.5px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  width: min(var(--shell), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo:hover { color: var(--ink); }

.logo-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--green);
  box-shadow: 2px 3px 0 rgba(28, 27, 24, 0.15);
  padding: 4px;
}

.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.nav-details { margin-left: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font: 700 0.95rem/1 var(--font-sans);
  cursor: pointer;
  list-style: none;
}

.nav-toggle::-webkit-details-marker { display: none; }

.nav-toggle-bars {
  width: 1rem;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 -5px 0 var(--ink), 0 5px 0 var(--ink);
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 2.5px solid var(--ink);
  padding: 0.4rem var(--gutter) 1rem;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-details[open] .site-nav { display: flex; }

.site-nav > a,
.guides-toggle {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}

.guides { position: relative; min-width: 0; }

.guides-toggle {
  width: 100%;
  justify-content: space-between;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.guides-caret {
  display: none;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.35rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.guides-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.guides-menu a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.guides-name { font-weight: 800; letter-spacing: -0.02em; }

.guides-desc {
  color: var(--ink-faint);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
}

.site-nav > a:hover,
.site-nav > a[aria-current="page"],
.guides-toggle:hover,
.guides-menu a:hover,
.guides-menu a[aria-current="page"] {
  color: var(--ink);
  background: rgba(28, 27, 24, 0.06);
}

a.diagnosis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #F5F2E6;
  padding: 10px 16px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 #1A3A14;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.site-nav a.diagnosis-btn,
.final-cta a.diagnosis-btn {
  background: var(--green);
  color: #F5F2E6;
  padding: 10px 16px;
  min-height: 0;
  font-weight: 700;
}

.site-nav a.diagnosis-btn:hover,
.final-cta a.diagnosis-btn:hover,
a.diagnosis-btn:hover {
  background: var(--green-mid);
  color: #F5F2E6;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #1A3A14;
}

a.diagnosis-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #1A3A14;
}

.site-nav a.nav-cta {
  align-self: flex-start;
  width: auto;
  margin-top: 0.4rem;
  margin-left: 0;
}

@media (min-width: 68rem) {
  .nav-details > .nav-toggle { display: none; }

  .nav-details .site-nav,
  .nav-details[open] .site-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .guides-toggle {
    width: auto;
    font-weight: 600;
  }

  .guides-caret { display: inline-block; }

  .guides-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    z-index: 50;
    width: min(22rem, calc(100vw - 2rem));
    padding: 0.4rem;
    background: var(--card);
    border: 2.5px solid var(--ink);
    border-radius: 16px;
    box-shadow: 4px 5px 0 rgba(28, 27, 24, 0.12);
  }

  .guides.is-open .guides-menu { display: flex; }

  .site-nav a.nav-cta {
    margin: 0 0 0 6px;
  }
}

@media (max-width: 22.5rem) {
  .logo { font-size: 0.98rem; }
  .logo-mark { width: 32px; height: 32px; }
}

/* Sample banner */

.sample-banner {
  background: var(--amber-soft);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 0.75rem var(--gutter);
  font-size: 0.95rem;
}

.sample-banner p {
  width: min(var(--shell), 100%);
  margin: 0 auto;
  overflow-wrap: anywhere;
}

.sample-banner a { color: var(--ink); font-weight: 700; }

/* Hero and sections */

.hero {
  padding: var(--section-y) 0 2.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(255, 254, 249, 0.95), transparent 70%),
    var(--bg);
}

.hero-inner { width: min(44rem, calc(100% - (var(--gutter) * 2))); margin-inline: auto; }

.hero h1 { margin-inline: auto; max-width: 18em; }

.hero .lede { margin-inline: auto; }

.section { padding: var(--section-y) 0; }

.section-title { margin: 0 0 1rem; }

.step-grid,
.card-grid,
.stat-grid,
.footer-grid {
  display: grid;
  gap: 0.9rem;
}

.step {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 4px 5px 0 rgba(28, 27, 24, 0.08);
}

.step-num {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--green-mid);
  display: block;
  margin-bottom: 0.2rem;
}

.card-grid {
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.spoke-card,
.hub-card,
.case-tease,
.related a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.1rem;
  color: inherit;
  text-decoration: none;
  box-shadow: 4px 5px 0 rgba(28, 27, 24, 0.08);
}

a.spoke-card:hover,
a.hub-card:hover,
.related a:hover,
.spoke-card a:hover {
  color: var(--green);
}

.spoke-card h3,
.hub-card h3,
.related h3,
.case-tease h3 {
  margin: 0;
  font-size: 1.08rem;
}

.spoke-card h3 a,
.case-tease h3 a {
  color: inherit;
  text-decoration: none;
}

.spoke-card h3 a:hover,
.case-tease h3 a:hover { text-decoration: underline; }

.card-kicker,
.card-path,
.legacy-note,
.card-meta {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

.card-kicker {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.card-blurb { margin: 0; color: var(--ink-soft); }

.legacy-note a { color: var(--green-mid); }

.hub-card .card-title,
.spoke-card .card-title { font-weight: 800; letter-spacing: -0.02em; }

/* Hub */

.page-head.is-flush { padding-top: 0; }

.hub-layout { display: block; }

.toc {
  margin: 1.25rem 0 0.5rem;
  padding: 0.35rem 1rem 0.9rem;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.toc summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
  cursor: pointer;
  list-style: none;
}

.toc summary::-webkit-details-marker { display: none; }

.toc summary::after {
  content: "";
  margin-left: auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: translateY(-2px) rotate(45deg);
}

.toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }

.hub-intro {
  display: grid;
  gap: 0.85rem;
  margin: 0 auto 1.5rem;
}

.hub-intro p { margin: 0; max-width: 40rem; }

.hub-kicker {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
}

.symptom-block { margin: 0 auto 1.75rem; }

.symptom-block h2 { margin-bottom: 0.8rem; }

.symptom-card {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.95rem 1.05rem;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 5px 0 rgba(28, 27, 24, 0.08);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.symptom-card:hover { background: var(--green-soft); }

.toc ol { list-style: none; margin: 0; padding: 0; }

.toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.toc a:hover { text-decoration: underline; }

.part-of { margin: 0.4rem 0 0; font-weight: 600; }

.crumbs { padding-top: 1.1rem; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.crumbs li { display: flex; align-items: center; gap: 0.4rem; }

.crumbs li + li::before { content: "›"; color: var(--ink-faint); }

.crumbs a { color: var(--green-mid); }

.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }

/* Case, related, CTA */

.case-card,
.author,
.nutshell {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.15rem 1.2rem;
  box-shadow: 5px 6px 0 rgba(28, 27, 24, 0.08);
}

.case-card { margin: 1.6rem 0; }

.stat-grid { margin: 0.8rem 0 0; }

.stat-grid div {
  background: var(--green-soft);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
}

.stat-grid dt { font-size: 0.82rem; color: var(--ink-soft); }

.stat-grid dd {
  margin: 0.15rem 0 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.related { padding: 0.5rem 0 1rem; }

.related h2 { margin-bottom: 0.9rem; }

.final-cta {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #f4f1e8;
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.final-cta-rings {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(54rem, 150%);
  height: auto;
  transform: translate(-50%, -50%);
  stroke: rgba(216, 230, 204, 0.28);
  pointer-events: none;
}

.final-cta-inner {
  position: relative;
  z-index: 1;
  width: min(40rem, calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.final-cta-kicker {
  margin: 0 0 0.6rem;
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--green-lt);
}

.final-cta h2 {
  margin: 0 auto;
  max-width: 16em;
  color: #f4f1e8;
  font-size: clamp(1.85rem, 4vw, 2.7rem);
}

.final-cta h2 span { color: var(--green-lt); }

.final-cta p {
  margin: 0.9rem auto 0;
  max-width: 34rem;
  color: #d9d3c4;
}

.final-cta .diagnosis-btn { margin-top: 1.35rem; }

/* FAQ, author, tables */

.faq { margin: 1.5rem 0 0.5rem; }

.faq-item {
  border-top: 2px solid var(--line);
}

.faq-item:last-child { border-bottom: 2px solid var(--line); }

.faq-item summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  font-weight: 700;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  margin-left: auto;
  font-weight: 800;
}

.faq-item[open] summary::after { content: "–"; }

.faq-body { padding: 0 0 0.9rem; color: var(--ink-soft); }

.author {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  margin: 1.6rem 0;
}

.author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink);
}

.author-name { margin: 0; font-weight: 800; }

.author-role,
.author p { margin: 0.15rem 0 0; }

.author-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }

.author-links a { min-height: 24px; font-weight: 700; }

.nutshell {
  background: var(--green-soft);
  margin: 1.2rem 0;
}

.table-wrap { margin: 0 0 1rem; max-width: 100%; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-size: 0.95rem;
}

caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th { background: var(--bg-soft); }

@media (max-width: 40rem) {
  table, thead, tbody, tr, th, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { border-bottom: 2px solid var(--line); padding: 0.4rem 0; }
  td { border: 0; padding: 0.35rem 0.75rem; }
  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }
}

code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.about-grid {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.about-grid img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--ink);
}

/* Proof strip */

.proof { background: var(--bg-soft); }

/* Footer */

.site-footer {
  background: var(--ink);
  color: #f4f1e8;
  padding: 2.5rem 0 2rem;
}

.site-footer a { color: #f4f1e8; text-decoration: none; }

.site-footer a:hover { text-decoration: underline; }

.footer-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}

.footer-tag { color: #d9d3c4; margin: 0 0 0.8rem; }

.site-footer h2 {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d9d3c4;
  margin: 0 0 0.45rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0;
}

.footer-note {
  margin: 1.6rem 0 0;
  color: #d9d3c4;
  font-size: 0.88rem;
}

/* Gallery */

.gallery-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.gallery-list a {
  display: block;
  min-height: 44px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--ink);
}

.gallery-list a span { display: block; color: var(--ink-faint); font-size: 0.88rem; font-weight: 500; }

.gallery-list strong { font-size: 1.05rem; }

@media (min-width: 40rem) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .step-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 60rem) {
  .hub-layout {
    display: grid;
    grid-template-columns: 14.5rem minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: calc(var(--header-h) + 0.75rem);
    margin-top: 0;
    max-height: calc(100vh - var(--header-h) - 1.5rem);
    overflow: auto;
  }

  .toc summary::after { display: none; }

  .about-grid { grid-template-columns: auto 1fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .card-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
