/* ==========================================================================
   Sunfowler Wellness — Design System
   Accessibility target: WCAG 2.1 Level AA
   - Body copy never below 1rem (16px); default is 1.0625rem (17px)
   - All text/background pairs verified at >= 4.5:1 (normal) / >= 3:1 (large)
   - Sizing in rem/em only, so browser zoom + user text-spacing overrides work
   - All motion is gated behind prefers-reduced-motion and a manual pause control
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bone:        #f5f6f3;  /* page background */
  --linen:       #e7ede9;  /* alternating band */
  --shell:       #ffffff;  /* raised cards */
  --clay:        #d5ddd7;  /* hairlines, quiet fills */

  /* Blue-greens */
  --forest-900:  #0a2733;  /* deepest — hero ground */
  --forest-800:  #10313e;
  --forest-700:  #13404d;
  --forest-600:  #1d5a67;  /* primary (7.14:1 on --bone, white on it 7.75:1) */
  --forest-400:  #2f7a78;  /* non-text UI only (4.64:1 on --bone) */
  --forest-200:  #a9d9ce;
  --aqua-200:    #9fddcd;  /* pale accent on dark (10.14:1 on --forest-900) */

  /* Pale accents kept from the previous palette — the light tones were left
     alone deliberately when the darks moved bluer. */
  --teal-200:    #c4ece0;  /* pale fill, and text on dark */
  --teal-100:    #e4f2ee;  /* background band */


  /* Warm accent */
  --clay-600:    #a05a2e;  /* driftwood copper    (4.84:1 on --bone) */
  --clay-700:    #8a5729;  /* hover / small text  (5.57:1 on --bone) */
  --clay-100:    #f7e6d8;

  /* Ink */
  --ink:         #131f26;  /* body text          (15.47:1 on --bone) */
  --ink-muted:   #45535a;  /* secondary text      (7.34:1 on --bone) */
  --ink-invert:  #f2f9f6;  /* text on dark       (14.55:1 on --forest-900) */
  --ink-invert-muted: #c8ded7; /*                (11.02:1 on --forest-900) */

  /* Feedback */
  --error:       #9a2f2f;  /* 6.86:1 on --bone */
  --success:     #1f5c3f;  /* 7.28:1 on --bone */

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Karla", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fluid type — min values never drop below 16px */
  --step--1: clamp(0.9375rem, 0.91rem + 0.14vw, 1rem);       /* 15 -> 16  (captions only) */
  --step-0:  clamp(1.0625rem, 1.03rem + 0.16vw, 1.1875rem);  /* 17 -> 19  (body)          */
  --step-1:  clamp(1.1875rem, 1.13rem + 0.29vw, 1.375rem);   /* 19 -> 22  (lead)          */
  --step-2:  clamp(1.375rem, 1.28rem + 0.48vw, 1.75rem);     /* 22 -> 28                  */
  --step-3:  clamp(1.625rem, 1.46rem + 0.83vw, 2.25rem);     /* 26 -> 36                  */
  --step-4:  clamp(1.9375rem, 1.65rem + 1.44vw, 3rem);       /* 31 -> 48                  */
  --step-5:  clamp(2.25rem, 1.7rem + 2.75vw, 4.25rem);       /* 36 -> 68  (hero)          */

  /* Space */
  --sp-3xs: 0.25rem;
  --sp-2xs: 0.5rem;
  --sp-xs:  0.75rem;
  --sp-s:   1rem;
  --sp-m:   1.5rem;
  --sp-l:   2rem;
  --sp-xl:  3rem;
  --sp-2xl: 4rem;
  --sp-3xl: 6rem;
  --section-y: clamp(3.5rem, 2rem + 7vw, 7rem);

  /* Shape */
  --radius-s: 0.375rem;
  --radius-m: 0.75rem;
  --radius-l: 1.25rem;
  --radius-pill: 999px;

  /* Elevation — soft, diffuse, spa-like */
  --shadow-s: 0 1px 2px rgba(10, 39, 51, 0.05), 0 2px 8px rgba(10, 39, 51, 0.04);
  --shadow-m: 0 2px 4px rgba(10, 39, 51, 0.05), 0 12px 28px rgba(10, 39, 51, 0.07);
  --shadow-l: 0 4px 8px rgba(10, 39, 51, 0.05), 0 24px 56px rgba(10, 39, 51, 0.10);

  /* Motion */
  --ease-breath: cubic-bezier(0.42, 0, 0.29, 1);
  --dur-fast: 160ms;
  --dur-base: 280ms;
  --dur-slow: 620ms;

  /* Layout */
  --measure: 68ch;
  --container: 75rem;
  --container-narrow: 46rem;
  --header-h: 4.25rem;
}

@media (min-width: 64rem) {
  :root { --header-h: 5.25rem; }
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

/* Any author rule that sets `display` outranks the browser's own
   `[hidden] { display: none }`, so `.card { display: flex }` alone was enough to
   leave every element the filter script hid still sitting on the page. Scripts
   here hide things with `el.hidden = true`, so that has to hold against every
   component's own display value. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
  overflow-x: hidden;
}

img, picture, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

/* WCAG 1.4.12 Text Spacing — no fixed heights on text blocks; wrap long words */
p, li, dd, dt, figcaption, blockquote, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--forest-800);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.2; }
h4 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.005em; }

h5, h6 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

p { max-width: var(--measure); }

a {
  color: var(--forest-600);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
  transition: color var(--dur-fast) ease;
}

a:hover { color: var(--clay-700); }

strong, b { font-weight: 700; }

/* Small print stays at 16px minimum in real terms */
small { font-size: var(--step--1); }

blockquote {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.4;
  color: var(--forest-700);
  border-left: 3px solid var(--clay-600);
  padding-left: var(--sp-m);
  margin-block: var(--sp-l);
  max-width: 34ch;
}

hr {
  border: 0;
  border-top: 1px solid var(--clay);
  margin-block: var(--sp-xl);
}

::selection { background: var(--forest-200); color: var(--forest-900); }

/* --------------------------------------------------------------------------
   4. Focus — visible on every surface, >= 3:1 against adjacent colours
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--clay-600);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

.on-dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: #f0cda3;
}

:focus:not(:focus-visible) { outline: none; }

/* --------------------------------------------------------------------------
   5. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

@media (min-width: 48rem) {
  .container { width: min(100% - 4rem, var(--container)); }
}

.container--narrow { max-width: var(--container-narrow); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-s);
  top: var(--sp-s);
  z-index: 200;
  transform: translateY(-200%);
  background: var(--forest-800);
  color: var(--ink-invert);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-s);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--dur-fast) ease;
}

.skip-link:focus { transform: translateY(0); color: var(--ink-invert); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 5vw, 4.5rem); }
.section--linen { background: var(--linen); }
.section--teal  { background: var(--teal-100); }
.section--forest { background: var(--forest-800); color: var(--ink-invert-muted); }

.section--forest h2,
.section--forest h3,
.section--forest h4 { color: var(--ink-invert); }
.section--forest a { color: #f0cda3; }
.section--forest a:hover { color: #ffffff; }

.stack > * + * { margin-top: var(--sp-s); }
.stack-m > * + * { margin-top: var(--sp-m); }
.stack-l > * + * { margin-top: var(--sp-l); }

.text-center { text-align: center; }
.text-center p { margin-inline: auto; }

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 56ch;
}

.section--forest .lead { color: var(--ink-invert-muted); }

/* `.card p` is (0,2,0) and outranks the section's inherited colour, so cards on
   a dark ground need their body copy restated or it stays dark-on-dark. */
.section--forest .card { background: rgba(242, 249, 246, 0.06); border-color: rgba(200, 222, 215, 0.24); }
.section--forest .card--flat { background: transparent; }
.section--forest .card p { color: var(--ink-invert-muted); }

.eyebrow {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-700);
  margin-bottom: var(--sp-xs);
}

.section--forest .eyebrow { color: #e5c49b; }

.section-head { max-width: 46rem; margin-bottom: var(--sp-xl); }
.section-head.text-center { margin-inline: auto; }

/* Headings and their supporting copy need air between them wherever they
   appear; .eyebrow supplies its own bottom margin and simply collapses. */
.section-head > * + *,
.page-head .container > * + * { margin-top: var(--sp-s); }

/* Decorative leaf/seed divider */
.rule-ornament {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  color: var(--forest-400);
  margin-block: var(--sp-m);
}
.rule-ornament::before,
.rule-ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.text-center .rule-ornament { justify-content: center; }

/* --------------------------------------------------------------------------
   6. Buttons — all interactive targets are at least 44x44 CSS px (WCAG 2.5.5)

   Colour rules are written as `.btn.btn--variant` on purpose. Dark section
   wrappers set `a { color: ... }`, which at (0,1,1) outranks a single-class
   variant and silently repaints button labels; doubling the class wins that
   fight. Keep the doubled form when adding a variant.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 2.875rem;      /* 46px */
  padding: 0.75rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-breath),
              color var(--dur-base) var(--ease-breath),
              border-color var(--dur-base) var(--ease-breath),
              transform var(--dur-fast) ease,
              box-shadow var(--dur-base) var(--ease-breath);
}

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

.btn.btn--primary {
  background: var(--forest-600);
  color: #ffffff;              /* 7.75:1 */
  box-shadow: var(--shadow-s);
}
.btn.btn--primary:hover { background: var(--forest-700); color: #ffffff; box-shadow: var(--shadow-m); }

.btn.btn--accent {
  background: var(--clay-600);
  color: #ffffff;              /* 5.25:1 */
  box-shadow: var(--shadow-s);
}
.btn.btn--accent:hover { background: var(--clay-700); color: #ffffff; box-shadow: var(--shadow-m); }

.btn.btn--ghost {
  background: transparent;
  color: var(--forest-600);
  border-color: var(--forest-600);
}
.btn.btn--ghost:hover { background: var(--forest-600); color: #ffffff; }

.btn.btn--on-dark {
  background: transparent;
  color: var(--ink-invert);
  border-color: rgba(242, 249, 246, 0.55);
}
.btn.btn--on-dark:hover { background: var(--ink-invert); color: var(--forest-800); border-color: var(--ink-invert); }

.btn.btn--solid-light {
  background: var(--bone);
  color: var(--forest-700);
  box-shadow: var(--shadow-s);
}
.btn.btn--solid-light:hover { background: #ffffff; color: var(--forest-800); }

.btn--wide { width: 100%; }
.btn--lg { min-height: 3.25rem; padding: 0.95rem 2rem; font-size: var(--step-1); }

@media (min-width: 30rem) {
  .btn--wide { width: auto; }
  .btn-row--stack .btn { width: auto; }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-s);
  margin-top: var(--sp-l);
}
.text-center .btn-row { justify-content: center; }

.btn-row--stack { flex-direction: column; align-items: stretch; }
@media (min-width: 30rem) { .btn-row--stack { flex-direction: row; align-items: center; } }

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.15em;
  min-height: 2.75rem;
}
.link-arrow svg { transition: transform var(--dur-base) var(--ease-breath); flex: none; }
.link-arrow:hover svg { transform: translateX(0.28em); }

/* --------------------------------------------------------------------------
   7. Header + navigation (mobile first: drawer, then inline bar)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 246, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

/* --- Transparent over a dark opening -------------------------------------
   Only on pages that open on a hero or banner; elsewhere light nav text would
   sit on a light page head and vanish. A sticky header takes flow space, so
   the dark section is pulled up under it and re-pads itself.
   -------------------------------------------------------------------------- */
body[data-header="over-dark"] .hero,
body[data-header="over-dark"] .page-banner {
  margin-top: calc(var(--header-h) * -1);
}

body[data-header="over-dark"] .hero { padding-top: calc(var(--header-h) + var(--sp-2xl)); }
body[data-header="over-dark"] .page-banner { padding-top: calc(var(--header-h) + var(--sp-xl)); }

body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* A short gradient behind the bar, fading to nothing. The header still reads as
   transparent — you watch the animation through it — while nav text keeps a
   guaranteed floor to sit on whatever the artwork is doing underneath. */
body[data-header="over-dark"] .site-header:not([data-scrolled="true"])::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(100% + 3rem);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(7, 32, 43, 0.78) 0%,
    rgba(7, 32, 43, 0.52) 52%,
    rgba(7, 32, 43, 0) 100%);
}

/* Brand and the mobile control sit in the bar at every width */
body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .brand { color: var(--ink-invert); }
body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .brand__mark { color: var(--teal-200); }
body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .brand__word span { color: var(--ink-invert-muted); }

body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .nav-toggle {
  color: var(--ink-invert);
  border-color: rgba(242, 249, 246, 0.45);
}
body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) :focus-visible {
  outline-color: #f0cda3;
}

/* The links only join the bar at desktop. On mobile they live in a solid drawer
   below it, where they must stay dark on light. */
@media (min-width: 64rem) {
  /* `> li > a` and not a descendant selector on purpose: the dropdown panel
     hangs inside this list but has its own light background, so its links keep
     the normal dark text whatever the bar behind them is doing. */
  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .primary-nav__list > li > a,
  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .submenu-toggle {
    color: var(--ink-invert);
  }

  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .primary-nav__list > li > a:hover,
  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .submenu-toggle:hover {
    color: #f0cda3;
  }

  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .primary-nav__list > li > a[aria-current="page"],
  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .submenu-toggle[data-within="true"] {
    color: var(--ink-invert);
    border-bottom-color: #f0cda3;
  }

  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .nav-cta .btn.btn--ghost {
    color: var(--ink-invert);
    border-color: rgba(242, 249, 246, 0.55);
    background: transparent;
  }
  body[data-header="over-dark"] .site-header:not([data-scrolled="true"]) .nav-cta .btn.btn--ghost:hover {
    background: var(--ink-invert);
    color: var(--forest-800);
    border-color: var(--ink-invert);
  }
}

.site-header[data-scrolled="true"] {
  border-bottom-color: var(--clay);
  box-shadow: var(--shadow-s);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-s);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--forest-800);
  padding-block: 0.4rem;
}

.brand__mark { flex: none; color: var(--forest-600); }

.brand__word {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.brand__word span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

@media (min-width: 64rem) {
  .brand__word { font-size: 1.5rem; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  min-width: 2.875rem;
  padding: 0.5rem 0.9rem;
  background: transparent;
  border: 1px solid var(--clay);
  border-radius: var(--radius-pill);
  color: var(--forest-700);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle__bars { position: relative; width: 1.125rem; height: 0.75rem; flex: none; }
.nav-toggle__bars span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-breath), opacity var(--dur-fast) ease;
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 50%; margin-top: -1px; }
.nav-toggle__bars span:nth-child(3) { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(0.3125rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-0.3125rem) rotate(-45deg); }

.primary-nav {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--bone);
  border-bottom: 1px solid var(--clay);
  box-shadow: var(--shadow-m);
  padding: var(--sp-s) 0 var(--sp-l);
  max-height: calc(100svh - var(--header-h));
  overflow-y: auto;
}

.primary-nav[data-open="true"] { display: block; }

.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
}

.primary-nav__list a {
  display: block;
  padding: 0.85rem 0.25rem;
  min-height: 2.875rem;
  font-size: var(--step-1);
  font-family: var(--font-display);
  color: var(--forest-800);
  text-decoration: none;
  border-bottom: 1px solid var(--clay);
}

.primary-nav__list a:hover { color: var(--clay-700); }

.primary-nav__list a[aria-current="page"] {
  color: var(--clay-700);
  font-style: italic;
}

/* --- Submenu ------------------------------------------------------------
   The parent is a button, not a link: its own page sits first inside the menu,
   so no single control has to be both a destination and a disclosure. */
.has-submenu { position: relative; }

.submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 0.25rem;
  min-height: 2.875rem;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--clay);
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--forest-800);
  text-align: left;
  cursor: pointer;
}

.submenu-toggle:hover { color: var(--clay-700); }
.submenu-toggle[data-within="true"] { color: var(--clay-700); font-style: italic; }

.submenu-chevron { flex: none; transition: transform var(--dur-base) var(--ease-breath); }
.submenu-toggle[aria-expanded="true"] .submenu-chevron { transform: rotate(180deg); }

.submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--sp-s);
}

.submenu a {
  font-size: var(--step-0);
  padding: 0.7rem 0.25rem;
}

.nav-cta { padding: var(--sp-m) 1.25rem 0; display: grid; gap: var(--sp-2xs); }

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

  .primary-nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    max-height: none;
    overflow: visible;
    margin-left: auto;
  }

  .primary-nav__inner { display: flex; align-items: center; gap: var(--sp-l); }

  .primary-nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-m);
    padding: 0;
  }

  .primary-nav__list a {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 0;
    min-height: auto;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.01em;
  }

  .primary-nav__list a[aria-current="page"] {
    font-style: normal;
    border-bottom-color: var(--clay-600);
  }

  .submenu-toggle {
    width: auto;
    padding: 0.5rem 0;
    min-height: auto;
    border-bottom: 2px solid transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .submenu-toggle[data-within="true"] {
    font-style: normal;
    color: var(--forest-800);
    border-bottom-color: var(--clay-600);
  }

  .submenu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 12rem;
    padding: var(--sp-2xs);
    background: var(--shell);
    border: 1px solid var(--clay);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-l);
    z-index: 110;
  }

  /* Bridges the gap so the pointer can travel from button to panel */
  .submenu::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -0.75rem;
    height: 0.75rem;
  }

  .submenu a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-s);
    border-bottom: 0;
    font-size: 1rem;
    white-space: nowrap;
  }

  .submenu a:hover { background: var(--linen); }
  .submenu a[aria-current="page"] { background: var(--forest-200); color: var(--forest-800); }

  .nav-cta { display: flex; gap: var(--sp-2xs); padding: 0; }
  .nav-cta .btn { padding: 0.6rem 1.15rem; font-size: 1rem; }
}

body[data-nav-open="true"] { overflow: hidden; }
@media (min-width: 64rem) { body[data-nav-open="true"] { overflow: visible; } }

/* --------------------------------------------------------------------------
   8. Hero — the breath
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--forest-900);
  color: var(--ink-invert);
  overflow: hidden;
  min-height: clamp(34rem, 88svh, 54rem);
  display: grid;
  align-items: center;
  padding-block: var(--sp-3xl) var(--sp-2xl);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* Static fallback ground: shows before JS paints, and when motion is reduced */
.hero__ground {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(58% 46% at 50% 52%, rgba(47, 122, 120, 0.42) 0%, rgba(10, 39, 51, 0) 68%),
    radial-gradient(80% 60% at 18% 12%, rgba(29, 90, 103, 0.5) 0%, rgba(10, 39, 51, 0) 62%),
    radial-gradient(70% 55% at 88% 88%, rgba(160, 90, 46, 0.26) 0%, rgba(10, 39, 51, 0) 60%),
    linear-gradient(168deg, #10313e 0%, #0a2733 55%, #07202b 100%);
}

/* Scrim guarantees text contrast no matter where the animation is in its cycle */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Small screens: the copy runs full width but only occupies the middle band,
     roughly 29% to 81%, and breath.js moves its focal point to y 0.88 here. So
     the scrim is weighted to the copy rather than spread evenly, the same trick
     the wide layout plays horizontally: shade where the words are, and let the
     bloom below them stay bright. */
  background:
    linear-gradient(to bottom,
      rgba(7, 32, 43, 0.60) 0%,
      rgba(7, 32, 43, 0.78) 26%,
      rgba(7, 32, 43, 0.76) 62%,
      rgba(7, 32, 43, 0.68) 82%,
      rgba(7, 32, 43, 0.22) 94%,
      rgba(7, 32, 43, 0.14) 100%);
}

/* Wide screens: copy occupies the left column only, so the scrim is weighted
   left. That buys the animation a genuinely luminous right-hand side while
   white text on the left stays comfortably past 4.5:1 at every phase. */
@media (min-width: 64rem) {
  .hero__scrim {
    background:
      linear-gradient(102deg,
        rgba(7, 32, 43, 0.90) 0%,
        rgba(7, 32, 43, 0.84) 26%,
        rgba(7, 32, 43, 0.62) 52%,
        rgba(7, 32, 43, 0.14) 76%,
        rgba(7, 32, 43, 0.02) 100%),
      linear-gradient(to bottom,
        rgba(7, 32, 43, 0.34) 0%,
        rgba(7, 32, 43, 0.00) 32%,
        rgba(7, 32, 43, 0.00) 62%,
        rgba(7, 32, 43, 0.44) 100%);
  }
}

.hero__inner {
  position: relative;
  display: grid;
  gap: var(--sp-xl);
}

.hero__copy { max-width: 40rem; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e5c49b;                     /* 8.1:1 on --forest-900 */
  margin-bottom: var(--sp-m);
}

.hero__eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  flex: none;
}

.hero h1 {
  font-size: var(--step-5);
  color: var(--ink-invert);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: italic;
  color: #ecd7b4;
  font-weight: 400;
}

.hero__lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-invert-muted);
  margin-top: var(--sp-m);
  max-width: 34rem;
}

@media (min-width: 64rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: end;
    gap: var(--sp-2xl);
  }
}

/* Scroll hint */
.hero__scroll {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  color: var(--ink-invert-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  align-items: center;
  gap: 0.5rem;
  flex-direction: column;
}
@media (min-width: 64rem) and (min-height: 44rem) { .hero__scroll { display: flex; } }
.hero__scroll:hover { color: var(--ink-invert); }

/* --------------------------------------------------------------------------
   8b. Page banner — a full-bleed image behind a page heading
   -------------------------------------------------------------------------- */
.page-banner {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: clamp(24rem, 66svh, 40rem);
  padding-block: var(--sp-2xl) var(--sp-xl);
  background: var(--forest-900);
  color: var(--ink-invert);
  overflow: hidden;
}

/* The still artwork is the floor: it shows if scripting is off or water.js
   fails, and the canvas paints over it when the animation is running. */
.page-banner__img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Narrow screens: the guide is a thing to look at, not a texture behind text,
   so it drops into the flow beneath the copy at full strength. The banner is a
   grid here purely to order copy -> canvas -> control; the image, scrim and
   readout are all out of flow and unaffected. */
.page-banner { display: grid; }
.page-banner__inner { order: 1; }

.page-banner__canvas {
  order: 2;
  position: relative;
  z-index: 0;
  width: min(17rem, 58vw);
  aspect-ratio: 1 / 1;
  height: auto;
  margin: var(--sp-xl) auto 0;
  border-radius: var(--radius-l);
  opacity: 0;                     /* raised by the script once it has painted */
  transition: opacity 600ms var(--ease-breath);
}

/* Wide screens: back to a full-bleed layer behind the copy. */
@media (min-width: 64rem) {
  .page-banner__canvas {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    aspect-ratio: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-banner__canvas { transition: none; }
}

.water-toggle {
  order: 4;
  position: relative;
  margin: var(--sp-s) auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(200, 222, 215, 0.45);
  background: rgba(7, 32, 43, 0.72);
  color: var(--ink-invert);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color var(--dur-base) ease;
}

@media (min-width: 64rem) {
  .water-toggle {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    margin: 0;
  }
}

.water-toggle:hover { background: rgba(29, 90, 103, 0.9); }
.water-toggle:focus-visible { outline: 3px solid #f0cda3; outline-offset: 3px; }
.water-toggle .icon-pause { display: block; }
.water-toggle .icon-play { display: none; }
.water-toggle[aria-pressed="true"] .icon-pause { display: none; }
.water-toggle[aria-pressed="true"] .icon-play { display: block; }

/* Holds every text/background pair in the banner past 4.5:1 no matter where
   the artwork's pale shoals happen to land behind the copy. */
.page-banner__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      rgba(7, 32, 43, 0.78) 0%,
      rgba(7, 32, 43, 0.66) 42%,
      rgba(7, 32, 43, 0.74) 100%);
}

@media (min-width: 64rem) {
  /* Copy sits left, so the right-hand water is allowed to stay open. */
  .page-banner__scrim {
    background:
      linear-gradient(100deg,
        rgba(7, 32, 43, 0.88) 0%,
        rgba(7, 32, 43, 0.80) 38%,
        rgba(7, 32, 43, 0.46) 66%,
        rgba(7, 32, 43, 0.06) 100%),
      linear-gradient(to bottom,
        rgba(7, 32, 43, 0.28) 0%,
        rgba(7, 32, 43, 0.06) 40%,
        rgba(7, 32, 43, 0.36) 100%);
  }
}

/* The floating banner is the one page where the artwork has a subject rather
   than a texture, and she sits in the middle of the frame. The stock scrim
   thins out gradually across the whole width, which put its weakest shade
   exactly under the last line of copy — the analytic worst case (lead text on
   a foam crest) came out at 4.19:1. So this one holds a firm wash over a
   narrower copy column and then gets out of the way quickly, which both clears
   4.5:1 with room to spare and leaves her more light than the stock scrim did.

   Wide screens only. Narrow ones stack the copy over the full width, where the
   inherited top-to-bottom scrim is the right shape. */
@media (min-width: 64rem) {
  .page-banner--float .page-banner__copy { max-width: 34rem; }

  .page-banner--float .page-banner__scrim {
    background:
      linear-gradient(100deg,
        rgba(6, 27, 39, 0.92) 0%,
        rgba(6, 27, 39, 0.88) 32%,
        rgba(6, 27, 39, 0.86) 50%,
        rgba(6, 27, 39, 0.44) 64%,
        rgba(6, 27, 39, 0.12) 80%,
        rgba(6, 27, 39, 0.04) 100%),
      linear-gradient(to bottom,
        rgba(6, 27, 39, 0.30) 0%,
        rgba(6, 27, 39, 0.06) 42%,
        rgba(6, 27, 39, 0.32) 100%);
  }
}

.page-banner__inner { position: relative; }
.page-banner__copy { max-width: 40rem; }


/* A banner whose canvas is atmosphere rather than an example keeps it
   full-bleed at every width. */
.page-banner--ambient .page-banner__canvas {
  grid-area: auto;
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
}
.page-banner--ambient .water-toggle {
  grid-area: auto;
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
}
.page-banner h1 { color: var(--ink-invert); }
.page-banner .lead { color: var(--ink-invert-muted); }
/* Brighter than the --aqua-200 used elsewhere on dark: the banner eyebrow is
   small bold text over a live animation, so it needs the extra headroom. */
.page-banner .eyebrow { color: var(--teal-200); }
.page-banner :focus-visible { outline-color: #f0cda3; }

.page-banner .breadcrumb { padding-block: 0; margin-bottom: var(--sp-l); }
.page-banner .breadcrumb a { color: var(--ink-invert-muted); }
.page-banner .breadcrumb a:hover { color: #ffffff; }
.page-banner .breadcrumb li::after { color: var(--aqua-200); }
.page-banner .breadcrumb [aria-current="page"] { color: var(--ink-invert); }

/* --------------------------------------------------------------------------
   9. Grids + cards
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-m); }

@media (min-width: 40rem) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60rem) {
  .grid { gap: var(--sp-l); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--shell);
  border: 1px solid var(--clay);
  border-radius: var(--radius-l);
  padding: var(--sp-m);
  box-shadow: var(--shadow-s);
  transition: box-shadow var(--dur-base) var(--ease-breath),
              transform var(--dur-base) var(--ease-breath),
              border-color var(--dur-base) ease;
}

.card:hover { box-shadow: var(--shadow-m); transform: translateY(-3px); border-color: var(--forest-200); }

.card--flat { box-shadow: none; background: transparent; }
.card--flat:hover { transform: none; box-shadow: none; }

@media (min-width: 48rem) { .card { padding: var(--sp-l); } }

.card h3 { margin-bottom: var(--sp-2xs); }
.card p { color: var(--ink-muted); }

/* Whole-card link target, keyboard focus still lands on the real anchor */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card:has(.card__link:focus-visible) {
  outline: 3px solid var(--clay-600);
  outline-offset: 3px;
}
.card .card__link:focus-visible { outline: none; }

.card__media {
  border-radius: var(--radius-m);
  overflow: hidden;
  margin: calc(var(--sp-m) * -1) calc(var(--sp-m) * -1) var(--sp-m);
  border-bottom: 1px solid var(--clay);
  aspect-ratio: 16 / 10;
}

@media (min-width: 48rem) {
  .card__media { margin: calc(var(--sp-l) * -1) calc(var(--sp-l) * -1) var(--sp-m); }
}

.card__media > * { width: 100%; height: 100%; }
.card__media img { object-fit: cover; }

/* An article preview reads as a narrow band, half the height of a standard
   card image, so the headline and standfirst carry the card. Applies wherever
   post cards appear: the journal, the category indexes, the homepage row and
   the related lists at the foot of articles and guides. */
.post-card .card__media { aspect-ratio: 32 / 10; }

.card__foot { margin-top: auto; padding-top: var(--sp-m); }

/* Numbered step card */
.step-card { counter-increment: step; }
.step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--forest-600);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: var(--sp-s);
}

/* Pills / tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--forest-200);
  color: var(--forest-800);          /* 8.9:1 */
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.tag--clay { background: var(--clay-100); color: var(--clay-700); }
.tag--teal { background: var(--teal-200); color: var(--forest-800); }
.tag--outline { background: transparent; border: 1px solid var(--clay); color: var(--ink-muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--sp-2xs); }

/* --------------------------------------------------------------------------
   10. Editorial / blog
   -------------------------------------------------------------------------- */
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: var(--sp-2xs);
}

.post-card__meta .dot { color: var(--forest-400); }

/* A meditation card's still carries the whole picture; card-preview.js lays a
   canvas over it and moves. The canvas starts transparent so a half-painted
   first frame is never shown, and fades back out when the animation stops,
   which returns the card to the artwork rather than freezing mid-breath. */
.med-card__art,
.post-feature__media { position: relative; }
.card-preview__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 420ms var(--ease-breath);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .card-preview__canvas { transition: none; }
}

/* Meditation cards repeat the indicators from the guide's own header, so they
   carry the same icons. The span is the flex item; the icon sits inside it at a
   tighter gap than the row's own. */
.post-card__meta .meta-ico { display: inline-flex; align-items: center; gap: 0.35rem; }
.post-card__meta .meta-ico svg { color: var(--forest-400); flex: none; }

.post-card h3 a {
  color: var(--forest-800);
  text-decoration: none;
  background-image: linear-gradient(var(--clay-600), var(--clay-600));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size var(--dur-base) var(--ease-breath), color var(--dur-fast) ease;
  padding-bottom: 0.08em;
}

.post-card:hover h3 a,
.post-card h3 a:focus-visible { background-size: 100% 2px; color: var(--forest-700); }

/* Featured post — stacks on mobile, splits at desktop */
.post-feature {
  display: grid;
  gap: var(--sp-m);
  background: var(--shell);
  border: 1px solid var(--clay);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-s);
}

.post-feature__media { aspect-ratio: 16 / 10; }
.post-feature__media > * { width: 100%; height: 100%; }
.post-feature__body { padding: 0 var(--sp-m) var(--sp-l); display: flex; flex-direction: column; }
/* The feature card's heading is an h2 rather than the .card h3 the grid cards
   use, so it needs the same space under it to sit level with them. */
.post-feature__body h2 { margin-bottom: var(--sp-2xs); }

@media (min-width: 56rem) {
  .post-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; align-items: stretch; }
  .post-feature__media { aspect-ratio: auto; height: 100%; min-height: 24rem; }
  .post-feature__body { padding: var(--sp-xl); justify-content: center; }
  .post-feature__body h2 { font-size: var(--step-3); }
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-s);
  padding-block: var(--sp-m);
  border-block: 1px solid var(--clay);
  margin-bottom: var(--sp-xl);
}

@media (min-width: 52rem) {
  .filter-bar { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-l); }
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--clay);
  background: transparent;
  color: var(--ink-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.chip:hover { border-color: var(--forest-600); color: var(--forest-600); }

.chip[aria-pressed="true"] {
  background: var(--forest-600);
  border-color: var(--forest-600);
  color: #ffffff;
}

.search-field { position: relative; display: flex; align-items: center; min-width: min(100%, 18rem); }
.search-field svg { position: absolute; left: 0.9rem; color: var(--ink-muted); pointer-events: none; }
.search-field input[type="search"] { padding-left: 2.75rem; }

.results-count { font-size: var(--step--1); color: var(--ink-muted); margin-bottom: var(--sp-m); }

.empty-state {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-m);
  border: 1px dashed var(--clay);
  border-radius: var(--radius-l);
  color: var(--ink-muted);
}

/* Article body */
.article-head { padding-block: var(--sp-2xl) var(--sp-l); }
.article-head h1 { max-width: 20ch; }

.article-hero {
  border-radius: var(--radius-m);
  overflow: hidden;
  /* A third of the old 16:9 height: a band that sets the tone without holding
     the article's opening line below the fold. */
  aspect-ratio: 48 / 9;
  margin-bottom: var(--sp-l);
  border: 1px solid var(--clay);
}
.article-hero > * { width: 100%; height: 100%; }

.prose { max-width: var(--container-narrow); margin-inline: auto; }
.prose > * + * { margin-top: var(--sp-m); }
.prose > h2 { margin-top: var(--sp-2xl); font-size: var(--step-3); }
.prose > h3 { margin-top: var(--sp-xl); }
.prose > h2 + p, .prose > h3 + p { margin-top: var(--sp-s); }
.prose ul, .prose ol { padding-left: 1.35rem; max-width: var(--measure); }
.prose li + li { margin-top: var(--sp-2xs); }
.prose li::marker { color: var(--clay-600); }
.prose figure { margin-block: var(--sp-xl); }
.prose figure img { border-radius: var(--radius-m); }
.prose figcaption {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-top: var(--sp-2xs);
  padding-left: var(--sp-xs);
  border-left: 2px solid var(--clay-600);
}

.pull-quote {
  background: var(--linen);
  border: 0;
  border-left: 4px solid var(--clay-600);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  padding: var(--sp-l);
  max-width: none;
  font-size: var(--step-2);
}
.pull-quote cite {
  display: block;
  margin-top: var(--sp-s);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.callout {
  background: var(--clay-100);
  border-radius: var(--radius-m);
  padding: var(--sp-m);
  border: 1px solid #ecdcc9;
}
.callout h2,
.callout h3 { font-size: var(--step-1); color: var(--clay-700); margin-bottom: var(--sp-2xs); }
.callout p { color: var(--ink); }
.callout h4 {
  font-size: var(--step-0);
  color: var(--clay-700);
  margin: var(--sp-m) 0 var(--sp-3xs);
}

/* The Practice Guide panel carries an h3 lead over h4 subsections in one box,
   so the two levels are set apart by form rather than by size alone: a serif
   heading with a rule under it, then small uppercase labels. */
.callout--guide h3 {
  font-size: var(--step-1);
  color: var(--ink);
  padding-bottom: var(--sp-2xs);
  border-bottom: 1px solid var(--clay);
  margin-bottom: var(--sp-s);
}
.callout--guide h4 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--sp-m);
  margin-bottom: var(--sp-2xs);
}

.author-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-m);
  padding: var(--sp-m);
  background: var(--linen);
  border-radius: var(--radius-l);
  margin-top: var(--sp-2xl);
}
.author-box__avatar { width: 4.5rem; height: 4.5rem; border-radius: 50%; overflow: hidden; flex: none; }
.author-box__avatar > * { width: 100%; height: 100%; }
.author-box p { font-size: var(--step--1); color: var(--ink-muted); }

/* Data tables inside articles. The wrapper scrolls on its own so a wide table
   never pushes the page sideways, and carries tabindex so keyboard users can
   reach the scroll region (WCAG 2.1.1). */
.table-wrap {
  overflow-x: auto;
  margin-block: var(--sp-l);
  border: 1px solid var(--clay);
  border-radius: var(--radius-m);
  background: var(--shell);
  -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline: 3px solid var(--clay-600); outline-offset: 2px; }

.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: var(--step--1);
}

.prose th,
.prose td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--clay);
}

.prose thead th {
  background: var(--linen);
  color: var(--forest-800);
  font-weight: 700;
  white-space: nowrap;
}

.prose tbody tr:last-child td { border-bottom: 0; }
.prose td { color: var(--ink-muted); }
.prose td:first-child { color: var(--ink); font-weight: 600; }

/* Reference list, folded away by default — long enough to bury the article's
   end, but part of the argument, so not hidden behind a link either. */
.sources {
  margin-top: var(--sp-2xl);
  border: 1px solid var(--clay);
  border-radius: var(--radius-m);
  background: var(--linen);
}

.sources > summary {
  cursor: pointer;
  padding: var(--sp-s) var(--sp-m);
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest-700);
  list-style-position: inside;
}
.sources > summary span { font-weight: 400; color: var(--ink-muted); }
.sources > summary:hover { color: var(--clay-700); }
.sources > summary:focus-visible { outline: 3px solid var(--clay-600); outline-offset: -3px; border-radius: var(--radius-m); }

.sources__body { padding: 0 var(--sp-m) var(--sp-m); }
.sources__body h3 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: var(--sp-m);
}

.source-list { padding-left: 1.2rem; }
.source-list li {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: 0.55rem;
  overflow-wrap: anywhere;
}
.source-list li a { color: var(--forest-600); }

/* Reading progress bar */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--clay-600);
  z-index: 120;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   10b. Square breath guide (meditations)
   -------------------------------------------------------------------------- */
.breath-box {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 32rem;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--forest-900);
  box-shadow: var(--shadow-l);
  isolation: isolate;
}

.breath-box__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.breath-box__readout {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  gap: 0.35rem;
}

/* The inner square brightens under the readout at the top of the inhale, so
   the cue carries its own well of shade and stays past 4.5:1 at every phase. */
.breath-box__readout::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(closest-side,
    rgba(7, 32, 43, 0.82) 0%,
    rgba(7, 32, 43, 0.62) 45%,
    rgba(7, 32, 43, 0) 78%);
}

/* The track guide runs its sphere across the lower half, so its readout is
   pinned to the top rather than centred over the artwork. */
.breath-box--track .breath-box__readout { align-content: start; padding-top: 10%; }

.breath-box__phase {
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-invert);
  margin: 0;
  max-width: none;
}

.breath-box__count {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 6vw, 5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--aqua-200);
  margin: 0;
  max-width: none;
  font-variant-numeric: tabular-nums;
}

/* Count pips. One per count in the current phase, filling as it runs, so the
   numeral above them is legible as a countdown rather than as a label. Sized
   and spaced to read at a glance from across a room, since someone following
   the practice is not looking closely. */
.breath-box__pips {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.breath-box__pips span {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink-invert);
  /* The pips sit below the numeral, past the point where the readout's scrim
     has faded out, and the inner square behind them brightens on the inhale.
     Measured against that background a plain pip came out at 1.3-2.2:1, under
     the 3:1 that meaningful non-text UI needs. The dark halo travels with each
     pip, so contrast no longer depends on what the animation is doing. */
  box-shadow: 0 0 0 2px rgba(7, 32, 43, 0.62);
  opacity: 0.55;
  transition: opacity var(--dur-base) ease, background-color var(--dur-base) ease;
}

.breath-box__pips span.is-on {
  background: var(--ink-invert);
  opacity: 1;
}

.breath-box__toggle {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(200, 222, 215, 0.45);
  background: rgba(7, 32, 43, 0.72);
  color: var(--ink-invert);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color var(--dur-base) ease;
}

.breath-box__toggle:hover { background: rgba(29, 90, 103, 0.9); }
.breath-box__toggle:focus-visible { outline: 3px solid #f0cda3; outline-offset: 3px; }
.breath-box__toggle .icon-pause { display: block; }
.breath-box__toggle .icon-play { display: none; }
.breath-box__toggle[aria-pressed="true"] .icon-pause { display: none; }
.breath-box__toggle[aria-pressed="true"] .icon-play { display: block; }

/* The floating guide puts the figure low in the frame and the cue above her,
   so the two never sit on top of each other. Every other guide centres its
   shape, so the cue can sit in the middle of it. */
.breath-box__readout--top {
  place-content: start center;
  padding-top: 12%;
}

.breath-box__readout--top::before {
  inset: 0 0 42% 0;
  background: radial-gradient(closest-side,
    rgba(6, 27, 39, 0.80) 0%,
    rgba(6, 27, 39, 0.58) 48%,
    rgba(6, 27, 39, 0) 82%);
}

/* A banner carrying a breadcrumb needs the crumb to clear the copy under it. */
.page-banner__inner > .breadcrumb { padding-inline: 0; }

/* Guide + its written description, side by side on wide screens */
/* Single column at every width. It used to split into two above 60rem, with
   the animation on one side and the written pattern on the other, which put
   them in competition: the eye went to the moving half and the counts read as
   a caption to it. Stacked, the animation is the practice and the pattern is
   the same practice in words, one after the other. */
.guide-layout { display: grid; gap: var(--sp-xl); }

.pattern-list { list-style: none; margin: 0; padding: 0; counter-reset: beat; }
.pattern-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  /* The count belongs to the instruction beside it. At the old 2.5rem reserve
     plus a --sp-s gap the digit sat 40px from its own text, far enough to read
     as a separate column of numbers rather than as part of the line. */
  gap: 0.7rem;
  align-items: baseline;
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--clay);
}
.pattern-list b {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  color: var(--forest-600);
  /* Just wide enough to hold a single count and keep the text column aligned
     down the list; a two-digit count would widen its own row only. */
  min-width: 1.2rem;
  text-align: center;
}
.pattern-list span { color: var(--ink-muted); }
.pattern-list strong { display: block; color: var(--ink); font-weight: 700; }

/* Numbered steps. Close cousin of .pattern-list, but each step carries a
   heading and more than one line, so the text column is a block container
   rather than a span. */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  max-width: 46rem;
}
.step-list { border-top: 1px solid var(--clay); }
.step-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-s) var(--sp-m);
  padding: var(--sp-m) 0;
  border-bottom: 1px solid var(--clay);
  align-items: start;
}
.step-list b { padding-top: 0.25rem; }
.step-list b {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1;
  color: var(--forest-600);
  min-width: 2.5rem;
}
.step-list h3 { margin: 0; font-size: var(--step-1); }
.step-list p {
  margin: 0 0 var(--sp-2xs);
  max-width: none;
  color: var(--ink-muted);
}
.step-list p:last-child { margin-bottom: 0; }

/* Each step opens and closes on its own, so the heading is a trigger. The
   shared accordion styles do the work; these only fit it to the step layout. */
.step-list .accordion__trigger {
  /* Shorter than the standalone accordion rows, but still a 44px target — the
   heading alone is only about 28px tall, which is an uncomfortably thin thing
   to hit on a phone. */
  min-height: 2.75rem;
  padding: 0.25rem 0;
  font-size: var(--step-1);
  color: var(--ink);
  max-width: 40rem;
}
.step-list .accordion__trigger:hover { color: var(--forest-600); }
/* Clay all but disappears on the linen band (1.17:1); this reads at 3.25:1. */
.step-list .accordion__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-color: #76848a;
}
.step-list .accordion__panel { padding: var(--sp-2xs) 0 0; }

/* Narrow screens: the number sits above rather than squeezing the text into a
   column too thin to read. */
@media (max-width: 30rem) {
  .step-list li { grid-template-columns: 1fr; gap: var(--sp-2xs); }
  .step-list b { font-size: var(--step-1); }
}

/* Meditation index cards */
.med-card__art {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: var(--sp-m);
  border: 1px solid var(--clay);
}
.med-card__art > * { width: 100%; height: 100%; object-fit: cover; }

.med-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  list-style: none;
  margin: 0 0 var(--sp-s);
  padding: 0;
  font-size: var(--step--1);
  color: var(--ink-muted);
}
.med-meta li { display: inline-flex; align-items: center; gap: 0.4rem; }
.med-meta svg { color: var(--forest-400); flex: none; }

/* --------------------------------------------------------------------------
   11. Events
   -------------------------------------------------------------------------- */
.event-card { display: grid; gap: var(--sp-m); align-items: start; }

@media (min-width: 44rem) {
  .event-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-l); align-items: center; }
}

/* `.card p` is (0,2,0) and outranks this block's own (0,1,0) colour, which left
   the day number inheriting muted grey on a dark ground. Both parts state their
   colour explicitly so no ancestor rule can reach them. */
.card .event-date,
.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4.75rem;
  padding: 0.65rem 0;
  border-radius: var(--radius-m);
  background: var(--forest-800);
  color: var(--ink-invert);
  flex: none;
}
.event-date__mon {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e5c49b;
}
.event-date__day {
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1.05;
  color: var(--ink-invert);   /* 12.6:1 on --forest-800 */
}

.event-card__body h3 { font-size: var(--step-1); }
.event-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: var(--sp-2xs);
  font-size: var(--step--1);
  color: var(--ink-muted);
  list-style: none;
  padding: 0;
}
.event-card__facts li { display: inline-flex; align-items: center; gap: 0.4rem; }
.event-card__facts svg { color: var(--forest-400); flex: none; }

.event-card__action { display: grid; gap: var(--sp-2xs); justify-items: stretch; }
@media (min-width: 44rem) { .event-card__action { justify-items: end; min-width: 11rem; } }

.seats-left { font-size: var(--step--1); color: var(--clay-700); font-weight: 700; text-align: center; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--1);
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
}
.status-badge--open { background: #d6ebdf; color: #1f5c3f; }
.status-badge--few { background: var(--clay-100); color: var(--clay-700); }
.status-badge--full { background: var(--clay); color: var(--ink-muted); }
.status-badge::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }

/* Impact ledger */
.impact-strip {
  display: grid;
  gap: var(--sp-l);
  text-align: center;
}
@media (min-width: 40rem) { .impact-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .impact-strip { grid-template-columns: repeat(4, 1fr); } }

.impact-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 300;
  line-height: 1;
  color: var(--ink-invert);
}
.impact-stat span {
  display: block;
  margin-top: var(--sp-2xs);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-invert-muted);
}

/* --------------------------------------------------------------------------
   12. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-m); }

.form-grid { display: grid; gap: var(--sp-m); }
@media (min-width: 40rem) { .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.field { display: grid; gap: 0.4rem; }

/* Grid and flex children default to min-width:auto, and an <input>'s
   min-content width is its default 20-character size. In a narrow single
   column that refuses to shrink and pushes the page sideways, so every form
   wrapper is told explicitly that it may. */
.form,
.form-grid,
.field,
.fieldset,
.inline-form,
.search-field,
.password-field { min-width: 0; }

.field input,
.field select,
.field textarea { min-width: 0; }

.field > label,
.fieldset > legend {
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest-800);
  letter-spacing: 0.005em;
}

.field__hint {
  font-size: var(--step--1);
  color: var(--ink-muted);
  order: 3;
}

.req { color: var(--clay-700); font-weight: 700; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  background: var(--shell);
  border: 1px solid #7d8b90;              /* 3.52:1 against --shell */
  border-radius: var(--radius-s);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
  appearance: none;
}

textarea { min-height: 8rem; resize: vertical; }

input::placeholder, textarea::placeholder { color: #5e6d72; opacity: 1; }  /* 5.38:1 */

input:hover, select:hover, textarea:hover { border-color: var(--forest-400); }

input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--clay-600);
  outline-offset: 1px;
  border-color: var(--forest-600);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2345535a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
}

/* Error state — never colour alone (WCAG 1.4.1): icon + text + border */
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
  border-width: 2px;
  background-color: #fdf5f4;
}

.field__error {
  display: none;
  align-items: flex-start;
  gap: 0.4rem;
  order: 4;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--error);
}
.field__error::before { content: "\26A0"; font-size: 1em; line-height: 1.4; }
.field__error[data-visible="true"] { display: flex; }

.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--sp-s); }
.fieldset > legend { padding: 0; margin-bottom: 0.25rem; }

/* Checkbox + radio: 1.5rem control, 44px row target */
.check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.55rem 0;
  min-height: 2.75rem;
  cursor: pointer;
  font-size: var(--step-0);
}

.check input[type="checkbox"],
.check input[type="radio"] {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.15rem 0 0;
  accent-color: var(--forest-600);
  cursor: pointer;
  flex: none;
}

.check span { color: var(--ink); }
.check small { display: block; color: var(--ink-muted); }

/* Segmented radio group rendered as cards (donation, event type) */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2xs);
}
@media (min-width: 40rem) { .option-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 40rem) { .option-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.75rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
  border: 1px solid var(--clay);
  border-radius: var(--radius-m);
  background: var(--shell);
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option b { font-family: var(--font-display); font-size: var(--step-2); line-height: 1; color: var(--forest-800); }
.option span { font-size: var(--step--1); color: var(--ink-muted); line-height: 1.3; }

.option:hover { border-color: var(--forest-400); }

.option:has(input:checked) {
  border-color: var(--forest-600);
  border-width: 2px;
  background: #eaf2f5;
  box-shadow: var(--shadow-s);
}
.option:has(input:checked) b { color: var(--forest-700); }

.option:has(input:focus-visible) { outline: 3px solid var(--clay-600); outline-offset: 3px; }

/* Toggle: one-time vs monthly */
.switch-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--linen);
  border-radius: var(--radius-pill);
  border: 1px solid var(--clay);
}

.switch-group .option {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  min-height: 2.875rem;
  box-shadow: none;
}
.switch-group .option b { font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.switch-group .option:has(input:checked) { background: var(--shell); box-shadow: var(--shadow-s); border-width: 0; }

/* Form status region */
.form-status {
  display: none;
  gap: 0.75rem;
  align-items: flex-start;
  padding: var(--sp-m);
  border-radius: var(--radius-m);
  font-weight: 600;
}
.form-status[data-state="error"] { display: flex; background: #fdf2f0; border: 1px solid #e6bdb6; color: var(--error); }
.form-status[data-state="success"] { display: flex; background: #eef6ef; border: 1px solid #bcd9c3; color: var(--success); }
.form-status svg { flex: none; margin-top: 0.15rem; }

/* The icon has to agree with the message: a tick on success, a warning
   triangle on error. Colour alone would not carry this (WCAG 1.4.1). */
.form-status__ok,
.form-status__warn { display: none; }
.form-status[data-state="success"] .form-status__ok { display: block; }
.form-status[data-state="error"] .form-status__warn { display: block; }
.form-status p { max-width: 52ch; }
.form-status strong { display: block; margin-bottom: 0.15rem; }

.form-note { font-size: var(--step--1); color: var(--ink-muted); }

/* Password field with an inline Show/Hide control */
.password-field { position: relative; display: flex; align-items: center; }
.password-field input { padding-right: 5.25rem; }

.password-toggle {
  position: absolute;
  right: 0.35rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.8rem;
  background: var(--linen);
  border: 1px solid var(--clay);
  border-radius: var(--radius-s);
  color: var(--forest-700);
  font-size: var(--step--1);
  font-weight: 700;
  cursor: pointer;
}
.password-toggle:hover { background: var(--forest-200); }

/* Inline newsletter. Single column at every width: the button sits under the
   field rather than beside it, which is what narrow screens always did. Side
   by side put the hint and the error message under a half-width field and left
   the button floating next to them. */
.inline-form { display: grid; gap: var(--sp-s); }
.inline-form .field { gap: 0.35rem; }
.inline-form > .btn { justify-self: stretch; }

/* Panel wrapper for forms */
.panel {
  background: var(--shell);
  border: 1px solid var(--clay);
  border-radius: var(--radius-l);
  padding: var(--sp-m);
  box-shadow: var(--shadow-m);
}
@media (min-width: 48rem) { .panel { padding: var(--sp-xl); } }

.panel--quiet { box-shadow: none; background: var(--linen); border-color: transparent; }

/* --------------------------------------------------------------------------
   13. Accordion (resources / FAQ)
   -------------------------------------------------------------------------- */
.accordion { border-top: 1px solid var(--clay); }

.accordion__item { border-bottom: 1px solid var(--clay); }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-m);
  width: 100%;
  min-height: 3.5rem;
  padding: var(--sp-s) 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--forest-800);
}

.accordion__trigger:hover { color: var(--clay-700); }

.accordion__icon {
  flex: none;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--clay);
  display: grid;
  place-items: center;
  transition: transform var(--dur-base) var(--ease-breath), background-color var(--dur-fast) ease;
}
.accordion__trigger[aria-expanded="true"] .accordion__icon { transform: rotate(45deg); background: var(--forest-200); }

.accordion__panel { padding-bottom: var(--sp-m); }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--forest-900);
  color: var(--ink-invert-muted);
  padding-block: var(--sp-2xl) var(--sp-m);
  margin-top: auto;
}

.site-footer h2, .site-footer h3 { color: var(--ink-invert); }

.footer-grid { display: grid; gap: var(--sp-xl); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-2xl); } }

.footer-brand .brand { color: var(--ink-invert); }
.footer-brand .brand__mark { color: #e5c49b; }
.footer-brand .brand__word span { color: var(--ink-invert-muted); }
.footer-brand p { margin-top: var(--sp-s); font-size: var(--step--1); max-width: 34ch; }

.footer-col h2 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--sp-s);
}

/* The sign-up column carries a form rather than a list of links. It sits on
   --forest-900, so the field needs its own light ground to stay legible. */
.footer-col--signup p {
  margin: 0 0 var(--sp-s);
  font-size: var(--step--1);
  max-width: 32ch;
}
.footer-form { display: grid; gap: var(--sp-xs); }
.footer-form .field { margin: 0; min-width: 0; }
.footer-form input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-s);
  border: 1px solid #7d8b90;
  background: var(--shell);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
}
.footer-form input::placeholder { color: #5e6d72; }
.footer-form .btn { justify-self: start; }
.footer-form .field__error { color: #f0cda3; font-size: var(--step--1); margin: 0.2rem 0 0; }
/* The status panel brings its own light background and its own text colour,
   even inside the dark footer. Forcing the footer's inverted text here put
   near-white on near-white: the form worked, the reply was unreadable. */
.footer-form .form-status p { color: inherit; font-size: var(--step--1); }

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: 0.15rem; }
.footer-col a {
  display: inline-block;
  padding: 0.45rem 0;
  color: var(--ink-invert-muted);
  text-decoration: none;
  font-size: var(--step--1);
}
.footer-col a:hover { color: #ffffff; text-decoration: underline; }

.footer-bottom {
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-m);
  border-top: 1px solid rgba(200, 222, 215, 0.2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
  font-size: var(--step--1);
}
@media (min-width: 48rem) {
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-bottom p { color: var(--ink-invert-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--sp-s); }
.footer-legal a { color: var(--ink-invert-muted); font-size: var(--step--1); padding: 0.45rem 0; display: inline-block; }

.social-row { display: flex; gap: var(--sp-2xs); margin-top: var(--sp-m); }
.social-row a {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(200, 222, 215, 0.3);
  color: var(--ink-invert-muted);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.social-row a:hover { background: rgba(242, 249, 246, 0.14); color: #ffffff; }

/* --------------------------------------------------------------------------
   15. Misc pieces
   -------------------------------------------------------------------------- */
.breadcrumb { padding-block: var(--sp-m) 0; font-size: var(--step--1); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.breadcrumb li::after { content: "/"; margin-left: 0.5rem; color: var(--forest-400); }
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb [aria-current="page"] { color: var(--forest-700); font-weight: 700; }

.page-head { padding-block: var(--sp-2xl) var(--sp-xl); }
.page-head h1 { max-width: 18ch; }

/* Two-column media + copy block */
.split { display: grid; gap: var(--sp-xl); align-items: center; }
/* Centring is right when one side is an image and the other is a caption. Two
   columns of text want their headings on the same line instead, or the shorter
   column drifts down and the pair stops reading as a pair. */
.split--top { align-items: start; }
@media (min-width: 56rem) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2xl); }
  .split--reverse > *:first-child { order: 2; }
}

.frame {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-l);
  aspect-ratio: 4 / 5;
  max-height: 34rem;
}
.frame > * { width: 100%; height: 100%; }
.frame--wide { aspect-ratio: 16 / 11; }

/* Scroll reveal. Scoped to .js (set by an inline script in <head>) so that if
   scripting is off or site.js fails to load, the content is simply visible
   rather than permanently hidden. Neutralised under reduced motion below. */
.js .reveal { opacity: 0; transform: translateY(1.25rem); }
.js .reveal[data-revealed="true"] {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-breath), transform var(--dur-slow) var(--ease-breath);
}

/* Illustrative SVG art placeholders */
.art { display: block; width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   16. Reduced motion + print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
  .card:hover { transform: none; }
}

@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
  .chip[aria-pressed="true"] { border-width: 3px; }
  .option:has(input:checked) { border: 3px solid Highlight; }
  .hero__canvas, .hero__ground { display: none; }
}


/* A quieter callout. The standard one is an interruption; this one sits beside
   the written pattern saying the animation is optional, which should read as a
   note rather than a warning. */
.callout--quiet {
  background: var(--linen);
  border-color: var(--clay);
}

/* Print control. Hidden by default and revealed only once the `js` class is
   on <html>, because without JavaScript the button cannot do anything and a
   dead control is worse than none. Hidden again in the printout itself. */
.print-row { margin-top: var(--sp-m); }
.print-btn { display: none; }
.js .print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--clay);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease;
}
.js .print-btn:hover { background: var(--linen); color: var(--ink); }
.js .print-btn:focus-visible { outline: 3px solid var(--clay-600); outline-offset: 2px; }

@media print {
  /* Chrome, the breath animations, the sign-up forms and the card grids all
     exist to be interacted with. On paper they are ink with no function, so
     everything that cannot be acted on from a printed page comes out. */
  .site-header,
  .site-footer,
  .hero,
  .hero__canvas,
  .read-progress,
  .filter-bar,
  .results-count,
  .print-row,
  .breadcrumb,
  .page-banner,
  .article-hero,
  .card__media,
  .med-card__art,
  .breath-box,
  .breath-pause,
  form,
  .form-status,
  .btn-row,
  .btn,
  .hero__scroll,
  [data-breath-canvas],
  [data-water-canvas] { display: none !important; }

  /* The related-articles block at the foot of every article and guide: a
     grid of cards whose only purpose is to be clicked. It carries its own
     class because the section is otherwise just .section--linen, which other
     sections use for their own reasons. */
  .section--related { display: none !important; }

  body { background: #fff; color: #000; font-size: 11.5pt; }
  .container, .container--narrow { max-width: none; padding: 0; }

  /* An external link's destination is worth the ink; an internal one prints
     as a relative path that means nothing off the site, so it stays bare. */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9.5pt; word-break: break-all; }

  /* Accordion panels are collapsed in the page and would print empty. */
  .accordion__panel[hidden], [hidden] { display: block !important; }
  .accordion__icon { display: none !important; }

  /* Keep the paper readable: no heading stranded at the foot of a page, no
     single line of a paragraph carried over, no table split mid-row. */
  h1, h2, h3 { break-after: avoid-page; page-break-after: avoid; }
  p, li { orphans: 2; widows: 2; }
  table, tr, figure, .callout { break-inside: avoid; page-break-inside: avoid; }
  .prose > * + * { margin-top: 0.6em; }
}
