/* Neckbreather
   Layout: one calm reading column, a sticky "on this page" rail on wide screens,
   and a home page built around the patient's journey as a vertical route. */
:root {
  --bg: #f4f7f5;          /* cool off-white with a green bias */
  --surface: #ffffff;
  --ink: #18241f;
  --muted: #4b5c56;
  --line: #d3ddd8;
  --pine: #1f5a4c;        /* the one accent */
  --pine-strong: #164438;
  --pine-soft: #e1ede8;
  --warn: #a12a1f;
  --warn-soft: #fbeceb;
  --tip: #855400;
  --tip-soft: #fbf1df;
  --on-pine: #ffffff;
  --shadow: rgba(22, 52, 44, 0.08);
  --diagram-warm: #c2462f;
  --diagram-dry: #4d7e9e;

  --f-display: "Martel", "Noto Serif Devanagari", Georgia, serif;
  --f-body: "Mukta", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.95rem;
  --step-0: 1.1875rem;   /* 19px body */
  --step-1: 1.4rem;
  --step-2: 1.75rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.3rem, 1.6rem + 3vw, 3.6rem);

  --measure: 66ch;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1715; --surface: #16211e; --ink: #e3ebe8; --muted: #a3b4ae; --line: #2a3a35;
    --pine: #82c6b3; --pine-strong: #a6dccd; --pine-soft: #1b2e29;
    --warn: #ff9585; --warn-soft: #36191a; --tip: #e9b85e; --tip-soft: #312717;
    --on-pine: #0f1715; --shadow: rgba(0, 0, 0, 0.35);
    --diagram-warm: #ff8a70; --diagram-dry: #8ec2e4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1715; --surface: #16211e; --ink: #e3ebe8; --muted: #a3b4ae; --line: #2a3a35;
  --pine: #82c6b3; --pine-strong: #a6dccd; --pine-soft: #1b2e29;
  --warn: #ff9585; --warn-soft: #36191a; --tip: #e9b85e; --tip-soft: #312717;
  --on-pine: #0f1715; --shadow: rgba(0, 0, 0, 0.35);
  --diagram-warm: #ff8a70; --diagram-dry: #8ec2e4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 9rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
html[lang="hi"] body { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pine-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--f-display); line-height: 1.2; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); font-weight: 700; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3 { line-height: 1.4; letter-spacing: 0; }
p, ul, ol, dl { margin: 0; }
strong { font-weight: 600; }

.skip { position: absolute; left: -999px; top: 0; background: var(--pine); color: var(--on-pine); padding: 0.6rem 1rem; z-index: 50; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* Gutter wrapper used by every band */
.bar, .site-nav ul, .main > *, .footer-inner {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: calc(1180px + 2 * max(16px, env(safe-area-inset-left, 0px)));
  margin-left: auto; margin-right: auto;
}

/* Header */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--surface);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.bm-ring { fill: var(--pine-soft); stroke: var(--pine); stroke-width: 2; }
.bm-wave { fill: none; stroke: var(--pine); stroke-width: 2.4; stroke-linecap: round; }
.bar-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: nowrap; justify-content: flex-end; }

.emergency-link {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.85rem;
  border: 2px solid var(--warn); border-radius: 999px; color: var(--warn);
  font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1.3;
}
.emergency-link:hover, .emergency-link.is-current { background: var(--warn-soft); color: var(--warn); }
.em-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--warn); }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: 1rem; }
.lang > * { padding: 0.3rem 0.8rem; line-height: 1.3; text-decoration: none; }
.lang-current { background: var(--pine); color: var(--on-pine); font-weight: 600; }
.lang a { color: var(--ink); }
.lang-soon { color: var(--muted); opacity: 0.7; cursor: not-allowed; }

.menu-btn {
  display: none; font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.95rem; cursor: pointer;
}
.site-nav { border-top: 1px solid var(--line); }
.nav-lang { display: none; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.4rem; padding-block: 0.15rem; }
.site-nav a { display: inline-block; padding: 0.55rem 0; color: var(--muted); text-decoration: none; font-size: 1.02rem; font-weight: 500; border-bottom: 3px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--pine); }

@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .site-nav { display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-block: 0.4rem 0.8rem; }
  .site-nav a { display: block; padding: 0.6rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--pine); font-weight: 600; }
}
@media (max-width: 600px) {
  .bar-tools > .lang { display: none; }
  .site-nav.is-open .nav-lang { display: block; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 1rem max(16px, env(safe-area-inset-left, 0px)); }
}
@media (max-width: 480px) {
  .brand { gap: 0.4rem; }
  .brand-mark { width: 26px; height: 26px; }
  .brand span { font-size: 1.08rem; }
  .emergency-link { padding: 0.28rem 0.65rem; gap: 0.35rem; }
  .bar { gap: 0.5rem; }
  .emergency-link, .lang, .menu-btn { font-size: 0.92rem; }
  .lang > * { padding: 0.28rem 0.6rem; }
}

/* Page head */
.main { padding-bottom: 4rem; }
.page-head {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem;
  align-items: start; padding-block: 3rem 2.5rem;
}
.page-head--plain { grid-template-columns: minmax(0, 1fr); }
.page-head-text { display: grid; gap: 1.25rem; min-width: 0; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 40ch; }
html[lang="hi"] .lede { line-height: 1.7; }
.hero-img { margin: 0; }
.hero-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; border-radius: var(--radius); }

.keypoints { background: var(--pine-soft); border-radius: var(--radius); padding: 1.25rem 1.5rem 1.4rem; margin-top: 0.5rem; max-width: 46rem; }
.keypoints h2 { font-family: var(--f-body); font-size: 1.05rem; font-weight: 700; color: var(--pine); letter-spacing: 0; margin-bottom: 0.6rem; }
.keypoints ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.keypoints li { position: relative; padding-left: 1.6rem; line-height: 1.5; }
.keypoints li::before { content: ""; position: absolute; left: 0.1rem; top: 0.55em; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2.5px solid var(--pine); }

@media (max-width: 820px) {
  .page-head { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 1.75rem 1.5rem; }
  .page-head .hero-img { order: -1; }
  .hero-img img { aspect-ratio: 3 / 2; }
}

/* Body: rail + prose */
.page-body { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; align-items: start; border-top: 1px solid var(--line); padding-top: 2.5rem; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 7.5rem); font-size: 1rem; }
.toc h2 { font-family: var(--f-body); font-size: 0.95rem; font-weight: 700; color: var(--muted); margin-bottom: 0.6rem; letter-spacing: 0; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 0.15rem; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); border-left-color: var(--pine); }
.page-body:not(:has(.toc)) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) {
  .page-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}

.prose { min-width: 0; max-width: var(--measure); display: flex; flex-direction: column; gap: 1.1rem; }
.prose > h2 { margin-top: 2.2rem; padding-top: 0.2rem; }
.prose > h2:first-child { margin-top: 0; }
.prose > h3 { margin-top: 1.4rem; }
.prose ul, .prose ol { padding-left: 1.4rem; display: grid; gap: 0.45rem; }
.prose li::marker { color: var(--pine); }
.prose em { font-style: italic; }

/* Callouts */
.callout { border-radius: var(--radius); padding: 1rem 1.25rem; border-left: 5px solid; }
.callout.warning { background: var(--warn-soft); border-color: var(--warn); }
.callout.warning strong:first-child { color: var(--warn); }
.callout.tip { background: var(--tip-soft); border-color: var(--tip); }
.callout.tip strong:first-child { color: var(--tip); }
.note { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.8rem; margin-top: 1rem; }

/* Steps: a real sequence, so numbered */
.steps ol { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.1rem; min-height: 2.2rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--pine); color: var(--on-pine);
  display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; line-height: 1;
}

/* Checklist */
.checklist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; display: grid; gap: 0.6rem; }
.checklist h3 { margin: 0; }
.checklist ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before { content: ""; position: absolute; left: 0.15rem; top: 0.45em; width: 1.05rem; height: 0.6rem; border-left: 3px solid var(--pine); border-bottom: 3px solid var(--pine); transform: rotate(-45deg) translate(0.05rem, -0.05rem); }

/* Definition lists */
.terms dl { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr); border-top: 1px solid var(--line); }
.terms dt, .terms dd { padding: 0.8rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.terms dt { font-weight: 700; padding-right: 1rem; }
@media (max-width: 600px) {
  .terms dl { grid-template-columns: minmax(0, 1fr); }
  .terms dt { border-bottom: 0; padding-bottom: 0; }
  .terms dd { padding-top: 0.2rem; }
}

/* Figures */
.figure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.figure { display: grid; gap: 0.6rem; align-content: start; }
.figure img, .method img { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.figure p { font-size: 1rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 600px) { .figure-pair { grid-template-columns: minmax(0, 1fr); } }

.method { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: start; }
.method > p:first-child { margin: 0; }
.method-text { display: grid; gap: 0.9rem; min-width: 0; }
.method-text ul { padding-left: 1.4rem; display: grid; gap: 0.35rem; }
@media (max-width: 700px) { .method { grid-template-columns: minmax(0, 1fr); } .method img { max-width: 22rem; } }

/* Change grid */
.change-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2rem; }
.change { border-top: 3px solid var(--pine); padding-top: 0.9rem; display: grid; gap: 0.5rem; align-content: start; }
.change h3 { font-size: 1.25rem; }
.change p:last-child { margin-top: 0.2rem; }
.change p:last-child a { font-weight: 600; }
@media (max-width: 600px) { .change-grid { grid-template-columns: minmax(0, 1fr); } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 1.02rem; line-height: 1.45; min-width: 36rem; }
th, td { text-align: left; vertical-align: top; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--pine-soft); font-weight: 700; color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 9rem; }

/* HME diagram */
.hme-diagram { margin: 0.5rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 0.75rem 0.9rem; }
.hme-diagram svg { width: 100%; height: auto; display: block; }
.hme-diagram figcaption { text-align: center; font-size: 1rem; color: var(--muted); margin-top: 0.4rem; padding-inline: 0.5rem; }
.d-head { font-family: var(--f-display); font-weight: 700; font-size: 20px; fill: var(--ink); text-anchor: middle; }
.d-label { font-family: var(--f-body); font-size: 16px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.d-small { font-family: var(--f-body); font-size: 14px; fill: var(--muted); text-anchor: middle; }
.d-hme { fill: var(--pine-soft); stroke: var(--pine); stroke-width: 3; }
.d-foam { fill: var(--surface); stroke: var(--pine); stroke-width: 1.5; stroke-dasharray: 3 3; }
.d-arrow { fill: none; stroke-width: 4; stroke-linecap: round; }
.d-warm { stroke: var(--diagram-warm); }
.d-dry { stroke: var(--diagram-dry); }
.d-warm-fill { fill: var(--diagram-warm); }
.d-dry-fill { fill: var(--diagram-dry); }

/* Prev / next */
.prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.pn { display: grid; gap: 0.15rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.pn:hover { border-color: var(--pine); }
.pn-next { text-align: right; }
.pn-dir { font-size: 0.95rem; color: var(--muted); }
.pn-title { font-family: var(--f-display); font-weight: 700; color: var(--ink); font-size: 1.15rem; line-height: 1.3; }
@media (max-width: 560px) { .prevnext { grid-template-columns: minmax(0, 1fr); } .pn-next { text-align: left; } }

/* Home */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; align-items: center; padding-block: 3.5rem 3rem; }
.home-hero-text { display: grid; gap: 1.5rem; min-width: 0; }
.home-hero h1 { font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.5rem); line-height: 1.08; letter-spacing: -0.025em; max-width: 14ch; }
html[lang="hi"] .home-hero h1 { line-height: 1.3; letter-spacing: 0; }
.home-hero-img { margin: 0; }
.home-hero-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; border-radius: var(--radius); }
@media (max-width: 820px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 1.5rem 2rem; }
  .home-hero-img { order: -1; }
  .home-hero-img img { aspect-ratio: 4 / 3; }
}

.home-body { display: grid; gap: 3.5rem; }

/* The journey: a vertical route with stops. */
.journey { border-top: 1px solid var(--line); padding-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem 3rem; }
.journey h2 { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 8rem); align-self: start; }
.journey ol { list-style: none; padding: 0; margin: 0; counter-reset: stop; position: relative; }
.journey ol::before { content: ""; position: absolute; left: 1.2rem; top: 1.4rem; bottom: 1.4rem; width: 3px; background: var(--pine); opacity: 0.35; border-radius: 3px; }
.journey li { counter-increment: stop; position: relative; padding: 0 0 2rem 4rem; color: var(--muted); line-height: 1.5; }
.journey li:last-child { padding-bottom: 0; }
.journey li::before {
  content: counter(stop); position: absolute; left: 0; top: 0;
  width: 2.45rem; height: 2.45rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--pine);
  color: var(--pine); font-weight: 700; display: grid; place-items: center; font-size: 1.1rem; line-height: 1;
}
.journey li a { display: block; font-family: var(--f-display); font-size: var(--step-1); line-height: 1.25; color: var(--ink); text-decoration: none; margin-bottom: 0.3rem; padding-top: 0.2rem; }
.journey li a strong { font-weight: 700; }
.journey li a:hover { color: var(--pine); text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 820px) {
  .journey { grid-template-columns: minmax(0, 1fr); }
  .journey h2 { position: static; }
}

.home-alert { background: var(--warn-soft); border-left: 6px solid var(--warn); border-radius: var(--radius); padding: 1.5rem 1.75rem; display: grid; gap: 0.6rem; max-width: 52rem; }
.home-alert h3 { color: var(--warn); font-size: var(--step-2); }
.home-alert p:last-child a { display: inline-block; margin-top: 0.3rem; background: var(--warn); color: var(--bg); padding: 0.55rem 1.1rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.home-alert p:last-child a:hover { filter: brightness(1.1); color: var(--bg); }

.home-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.home-more-item { border-top: 3px solid var(--pine); padding-top: 1rem; display: grid; gap: 0.5rem; align-content: start; }
.home-more-item p { color: var(--muted); }
.home-more-item p:last-child a { font-weight: 600; }
@media (max-width: 600px) { .home-more { grid-template-columns: minmax(0, 1fr); } }

.featured { display: grid; gap: 1.25rem; border-top: 1px solid var(--line); padding-top: 2.5rem; }
.featured > h2 { font-size: var(--step-2); }

/* Story cards */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 2rem; padding-top: 0.5rem; }
.story-card a { display: grid; gap: 1rem; text-decoration: none; color: var(--ink); }
.story-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 15%; border-radius: var(--radius); }
.story-card-text { display: grid; gap: 0.5rem; }
.story-card blockquote { margin: 0; font-family: var(--f-display); font-size: var(--step-1); line-height: 1.35; font-weight: 700; }
.story-card blockquote::before { content: "\201C"; }
.story-card blockquote::after { content: "\201D"; }
.story-card-name { color: var(--muted); }
.story-card-link { color: var(--pine); font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.story-card a:hover .story-card-link { text-decoration-thickness: 2px; }
.story-card--big a { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.story-card--big blockquote { font-size: var(--step-3); line-height: 1.25; }
@media (max-width: 700px) { .story-card--big a { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .story-card--big blockquote { font-size: var(--step-2); } }
.more-stories { color: var(--muted); margin-top: 2rem; }

/* Story page */
.story-head { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 3rem; align-items: center; padding-block: 3rem 2.5rem; }
.story-img { margin: 0; }
.story-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); }
.story-head-text { display: grid; gap: 1rem; min-width: 0; }
.story-kicker a { color: var(--muted); font-weight: 600; text-decoration: none; }
.story-kicker a:hover { color: var(--pine); text-decoration: underline; }
.story-quote { margin: 0.5rem 0 0; font-family: var(--f-display); font-size: var(--step-3); line-height: 1.25; font-weight: 700; color: var(--pine); border-left: 4px solid var(--pine); padding-left: 1.25rem; }
.story-quote::before { content: "\201C"; }
.story-quote::after { content: "\201D"; }
.story-body { margin-inline: auto; border-top: 1px solid var(--line); padding-top: 2rem; }
.story-body h3 { margin-top: 1.5rem; font-size: var(--step-1); }
@media (max-width: 820px) {
  .story-head { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 1.5rem; }
  .story-img img { aspect-ratio: 4 / 3; }
}

/* Glossary */
.glossary dl { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.glossary dt { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; padding-top: 1rem; }
.glossary dd { margin: 0.2rem 0 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--ink); }

/* Resources */
.resources dl { display: grid; gap: 1rem; }
.resources dt a { font-weight: 600; font-size: 1.15rem; }
.resources dd { margin: 0.1rem 0 0; color: var(--muted); }

/* Emergency page */
.emergency { padding-block: 2.5rem; display: grid; gap: 1.5rem; }
.emergency-lede { font-size: var(--step-1); color: var(--muted); }
.emergency .prose { max-width: 48rem; }
.alert-card { border: 4px solid var(--warn); border-radius: 10px; background: var(--surface); padding: 1.75rem 2rem 2rem; display: grid; gap: 1.1rem; }
.alert-card h2 { color: var(--warn); font-size: clamp(2.1rem, 1.5rem + 3vw, 3.2rem); line-height: 1.1; margin: 0; }
.alert-card ul { list-style: none; padding: 0; display: grid; gap: 1rem; font-size: 1.35rem; line-height: 1.45; }
.alert-card li { padding-left: 1.6rem; position: relative; }
.alert-card li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--warn); }
@media (max-width: 480px) { .alert-card { padding: 1.25rem 1.25rem 1.5rem; } .alert-card ul { font-size: 1.2rem; } }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-inner { padding-block: 2.5rem 3rem; display: grid; gap: 0.8rem; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.footer-inner > p { max-width: 70ch; }
.footer-brand { font-family: var(--f-display); font-weight: 800; color: var(--ink); font-size: 1.2rem; }
.footer-small { font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Before / after: two panels side by side, stacked on small screens */
.slides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; align-items: start; min-width: 0; }
.slide { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.slide::before {
  content: attr(data-label); font-family: var(--f-display); font-weight: 800; font-size: var(--step-2);
  color: var(--pine); border-bottom: 3px solid var(--pine); padding-bottom: 0.4rem; line-height: 1.25;
}
.slide-intro { font-size: var(--step-1); line-height: 1.5; color: var(--muted); }
.slide > h2 { margin-top: 1.6rem; font-size: var(--step-2); }
.slide > .slide-intro + h2 { margin-top: 0.4rem; }
@media (max-width: 900px) {
  .slides:not(.slides--compact) { grid-template-columns: minmax(0, 1fr); }
  .slides:not(.slides--compact) .slide + .slide { border-top: 1px solid var(--line); padding-top: 2rem; }
}
/* Pages built around a before/after pair use the full width */
.page-body:has(> .prose > .slides:not(.slides--compact)) { grid-template-columns: minmax(0, 1fr); }
.page-body:has(> .prose > .slides:not(.slides--compact)) .toc { display: none; }
.prose:has(> .slides:not(.slides--compact)) { max-width: none; }

/* Compact pairs (diagrams) */
.slides--compact { gap: 1rem; }
.slides--compact .slide { gap: 0.5rem; }
.slides--compact .slide::before { font-size: 1.1rem; border-bottom-width: 2px; padding-bottom: 0.25rem; }
.slides--compact .slide img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); width: 100%; }
.slides--compact .slide p:last-child { font-size: 0.98rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 460px) { .slides--compact { grid-template-columns: minmax(0, 1fr); } }

/* Home: what is a laryngectomy */
.whatis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; border-top: 1px solid var(--line); padding-top: 2.5rem; }
.whatis-text { display: flex; flex-direction: column; gap: 1.1rem; max-width: var(--measure); min-width: 0; }
.whatis-text p:last-child a { font-weight: 600; }
@media (max-width: 820px) { .whatis { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.slides--diagram { max-width: 52rem; }

/* Contact band */
.contact-band { background: var(--pine-soft); border-top: 1px solid var(--line); }
.contact-inner {
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: calc(1180px + 2 * max(16px, env(safe-area-inset-left, 0px))); margin-inline: auto;
  padding-block: 2.5rem; display: grid; gap: 0.6rem;
}
.contact-inner h2 { font-size: var(--step-2); }
.contact-inner p { max-width: 60ch; }
.contact-email a { font-family: var(--f-display); font-weight: 700; font-size: var(--step-1); color: var(--pine); overflow-wrap: anywhere; user-select: all; }
.whatis .slides--compact { max-width: 52rem; }

/* Stoma illustration */
.stoma-figure { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 1rem 1.25rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stoma-figure img { width: 100%; border-radius: calc(var(--radius) - 2px); }
.stoma-figure p:last-child { font-size: 1rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 420px) { .stoma-figure { grid-template-columns: minmax(0, 1fr); } .stoma-figure img { max-width: 14rem; } }

/* Bracelet */
.bracelet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.bracelet-photos { display: block; }
.bracelet-photos p { margin: 0; }
.bracelet-photos img { width: 100%; height: auto; background: #fff; border-radius: calc(var(--radius) - 2px); }
.bracelet-text { display: grid; gap: 0.8rem; }
@media (max-width: 700px) { .bracelet { grid-template-columns: minmax(0, 1fr); } }

/* Mobile polish: comfortable tap targets, no tap delay, and a header that fits 320px phones. */
a, button, summary { touch-action: manipulation; }
.brand, .emergency-link, .menu-btn { min-height: 44px; }
.menu-btn { min-width: 44px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.journey li > a, dt > a { display: inline-block; padding-block: 0.4rem; margin-block: -0.4rem; }
.journey li > a { display: block; margin-block: -0.2rem -0.1rem; }
@media (max-width: 360px) {
  .bar { gap: 0.35rem; }
  .brand-mark { display: none; }
  .brand span { font-size: 1rem; }
  .bar-tools { gap: 0.35rem; }
  .emergency-link { padding-inline: 0.55rem; gap: 0.3rem; font-size: 0.88rem; }
  .menu-btn { padding-inline: 0.7rem; font-size: 0.88rem; }
}
.lang > * { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; padding-inline: 1rem; line-height: 1.5; }
.site-nav .lang > a { display: inline-flex; padding: 0 1rem; border-bottom: 0; font-size: inherit; font-weight: 500; color: var(--ink); }

/* Image viewer: tap or click a picture to open it full size, then zoom and pan. */
img[data-zoomable] { cursor: zoom-in; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8, 14, 12, 0.98); display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex: none;
  padding: calc(env(safe-area-inset-top, 0px) + 0.5rem) max(12px, env(safe-area-inset-right, 0px)) 0.5rem max(12px, env(safe-area-inset-left, 0px));
}
.lb-zoom { display: flex; gap: 0.5rem; }
.lb button {
  min-width: 44px; min-height: 44px; padding: 0 0.9rem; font: inherit; font-size: 1.4rem; line-height: 1; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; cursor: pointer;
}
.lb button:hover { background: rgba(255, 255, 255, 0.26); }
.lb button:disabled { opacity: 0.35; cursor: default; }
.lb button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb-stage { flex: 1; min-height: 0; overflow: auto; display: flex; touch-action: pan-x pan-y pinch-zoom; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lb-stage img { margin: auto; max-width: none; flex: none; background: #fff; border-radius: 4px; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.lb-stage.is-zoomed img { cursor: grab; }
.lb-stage.is-dragging img { cursor: grabbing; }
.lb-cap { flex: none; margin: 0; padding: 0.6rem max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 0.8rem) max(16px, env(safe-area-inset-left, 0px)); color: #e8efec; font-size: 0.95rem; line-height: 1.45; text-align: center; }
.footer-copy { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.4rem; }
