/* Yoga Collective — site stylesheet
   Palette: indigo ink on pale sage, turmeric accent.
   Type: Young Serif (display), Figtree (text), IBM Plex Mono (Sanskrit & labels). */

/* ---------- Tokens ---------- */
:root {
  --bg: #F2F3EE;
  --surface: #FBFBF8;
  --surface-2: #E6E9E0;
  --ink: #1C2230;
  --ink-2: #454D5E;
  --muted: #676F7E;
  --line: #D3D7CB;
  --line-strong: #B9BEB0;
  --accent: #34458A;
  --accent-hover: #283670;
  --accent-ink: #FFFFFF;
  --accent-soft: #E0E4F2;
  --spice: #9A6412;
  --spice-soft: #F3E7CF;
  --caution: #9E3F2B;
  --caution-soft: #F5E3DD;
  --shadow: 0 1px 2px rgb(28 34 48 / .05), 0 8px 24px rgb(28 34 48 / .07);

  --font-display: "Young Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.2vw, 2.125rem);
  --step-4: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem);
  --step-5: clamp(2.75rem, 1.8rem + 4vw, 4.75rem);

  --radius: 10px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11141B;
    --surface: #171B24;
    --surface-2: #1F2430;
    --ink: #E6E7E2;
    --ink-2: #BCC0C7;
    --muted: #8E94A1;
    --line: #2B3140;
    --line-strong: #3C4354;
    --accent: #A3B0EE;
    --accent-hover: #C0C9F5;
    --accent-ink: #11141B;
    --accent-soft: #232A46;
    --spice: #E2A94A;
    --spice-soft: #2F2715;
    --caution: #EB9580;
    --caution-soft: #37201B;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11141B;
  --surface: #171B24;
  --surface-2: #1F2430;
  --ink: #E6E7E2;
  --ink-2: #BCC0C7;
  --muted: #8E94A1;
  --line: #2B3140;
  --line-strong: #3C4354;
  --accent: #A3B0EE;
  --accent-hover: #C0C9F5;
  --accent-ink: #11141B;
  --accent-soft: #232A46;
  --spice: #E2A94A;
  --spice-soft: #2F2715;
  --caution: #EB9580;
  --caution-soft: #37201B;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; color: var(--ink); }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.eyebrow, .toc-label, .foot-head, .card-kicker, .pager-dir, .callout-title, .summary-title, .page-meta {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 28px; height: 28px; color: var(--accent); flex: none; }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.01em; white-space: nowrap; }

.site-nav { margin-left: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav-item { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 .9375rem/1 var(--font-text); color: var(--ink-2);
  background: none; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.nav-trigger:hover, .nav-trigger[aria-expanded="true"] { color: var(--ink); background: var(--surface-2); }
.nav-item.is-active > .nav-trigger { color: var(--accent); }
.chev { width: 12px; height: 12px; transition: transform .2s; }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px; padding: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.nav-item:first-child .nav-menu, .nav-item:nth-child(2) .nav-menu { right: auto; left: 0; }
.nav-trigger[aria-expanded="true"] + .nav-menu { display: block; }
.nav-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-menu a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.nav-menu a:hover { background: var(--surface-2); color: var(--ink); }
.nav-menu a[aria-current="page"] { background: var(--accent-soft); }
.nav-menu a[aria-current="page"] .menu-title { color: var(--accent); }
.menu-title { font-weight: 600; font-size: .9375rem; line-height: 1.35; }
.menu-blurb { font-size: .8125rem; color: var(--muted); line-height: 1.4; }

.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 14px; font: 600 .875rem/1 var(--font-text); color: var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    padding: 8px var(--gutter) 20px;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-trigger { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 1.0625rem; border-radius: 0; }
  .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: none; }
  .nav-menu, .nav-item:first-child .nav-menu, .nav-item:nth-child(2) .nav-menu {
    position: static; width: auto; box-shadow: none; border: 0; background: none; padding: 0 0 12px;
  }
}

/* ---------- Page head ---------- */
.page-head { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs .sep { color: var(--line-strong); }
.page-head h1 { font-size: var(--step-5); letter-spacing: -.02em; max-width: 16ch; }
.lede { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.55; color: var(--ink-2); max-width: 44ch; margin-top: 20px; }
.page-meta { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); margin-top: 28px; }
.page-meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--spice); margin-right: 20px; vertical-align: middle; }

/* ---------- Article layout ---------- */
.article-layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(36px, 5vw, 64px) clamp(48px, 6vw, 80px);
}
.article-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
.article-layout.no-toc .prose { margin-inline: auto; }
.toc { position: sticky; top: calc(var(--header-h) + 32px + env(safe-area-inset-top, 0px)); align-self: start; max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; }
.toc-label { color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 5px 0 5px 16px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none; font-size: .875rem; line-height: 1.4;
}
.toc a:hover { color: var(--ink); }
.toc a.is-current { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 900px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
  .toc ol { columns: 2 180px; column-gap: 24px; border: 0; }
  .toc a { padding-left: 0; border: 0; }
}

.wide-body { padding-block: clamp(36px, 5vw, 64px) clamp(48px, 6vw, 80px); }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-3); margin-top: 2.4em; padding-top: .2em; letter-spacing: -.01em; }
.prose h3 { font-size: var(--step-2); margin-top: 1.9em; }
.prose h4 { font-family: var(--font-text); font-weight: 700; font-size: 1rem; margin-top: 1.6em; }
.prose > h2:first-child { margin-top: 0; }
.prose > .summary:first-child + h2 { margin-top: 1.8em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 650; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p strong, .prose li strong { color: var(--ink); }
em.sa, i.sa, .sa { font-family: var(--font-mono); font-style: normal; font-size: .92em; color: var(--spice); }
.sources { font-size: .9375rem; }
.sources li { color: var(--muted); }

/* Summary box */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.summary-title { color: var(--spice); margin-bottom: 10px; }
.summary ul { margin: 0; padding-left: 1.2em; }
.summary li { color: var(--ink); }

/* Callouts */
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; }
.callout-title { color: var(--accent); margin-bottom: 6px; }
.callout p { color: var(--ink); }
.callout p + p { margin-top: .6em; }
.callout.caution { border-left-color: var(--caution); background: var(--caution-soft); }
.callout.caution .callout-title { color: var(--caution); }

/* Pull quote */
.pull-quote { margin: 2.2em 0; padding: 0; }
.pull-quote blockquote { margin: 0; }
.pull-quote blockquote p { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.35; color: var(--ink); text-wrap: balance; }
.pull-quote figcaption { margin-top: 12px; font-size: .875rem; color: var(--muted); }
.pull-quote figcaption::before { content: ""; display: inline-block; width: 24px; height: 1px; background: var(--spice); vertical-align: middle; margin-right: 10px; }

/* Steps: real sequences only */
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 26px 58px; margin: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font: 500 .875rem/1 var(--font-mono); color: var(--accent); background: var(--surface); border: 1px solid var(--line-strong);
}
.steps > li::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 6px; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps > li > h3, .steps > li > h4 { font-family: var(--font-text); font-weight: 700; font-size: 1.0625rem; margin: 6px 0 4px; }
.steps > li > p + p { margin-top: .5em; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 520px; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-wrap th { font-family: var(--font-mono); font-weight: 500; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td { color: var(--ink-2); }
.table-wrap td:first-child { color: var(--ink); font-weight: 600; }

/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.prose .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.link-card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s, box-shadow .2s;
}
.link-card:hover { border-color: var(--accent); color: var(--ink); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .link-card:hover { transform: translateY(-2px); } }
.card-kicker { color: var(--spice); }
.card-title { font-family: var(--font-display); font-size: 1.3125rem; line-height: 1.25; }
.card-text { font-size: .9375rem; color: var(--muted); line-height: 1.55; }

/* Compare columns */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.compare-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.compare-col h3, .compare-col h4 { font-family: var(--font-text); font-weight: 700; font-size: 1.0625rem; margin: 0 0 8px; }
.compare-col ul { margin: 0; padding-left: 1.2em; font-size: .9375rem; }
.compare-col p { font-size: .9375rem; }

/* ---------- Pose field cards ---------- */
.pose { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 3vw, 34px); margin-top: 2em; }
.prose > .pose { margin-top: 1.6em; }
.pose > * + * { margin-top: 1em; }
.pose > h2 { margin: 0; padding: 0; font-size: var(--step-3); }
.pose-sanskrit { margin-top: 6px !important; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-family: var(--font-mono); color: var(--spice); font-size: .9375rem; }
.pose-say { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); }
.pose-say::before { content: "/"; margin-right: 1px; }
.pose-say::after { content: "/"; margin-left: 1px; }
.pose-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-block: 1.4em !important;
}
.pose-facts > div { background: var(--bg); padding: 12px 14px; }
.pose-facts dt { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pose-facts dd { margin: 4px 0 0; font-size: .9375rem; color: var(--ink); line-height: 1.4; font-weight: 500; }
.level { display: inline-flex; align-items: center; gap: 8px; }
.level::before { content: ""; width: 26px; height: 6px; border-radius: 3px; flex: none;
  background: linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 9px, var(--line-strong) 9px 17px, transparent 17px 18px, var(--line-strong) 18px 26px); }
.level[data-level="2"]::before { background: linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 9px, var(--accent) 9px 17px, transparent 17px 18px, var(--line-strong) 18px 26px); }
.level[data-level="3"]::before { background: linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 9px, var(--accent) 9px 17px, transparent 17px 18px, var(--accent) 18px 26px); }
.pose h3, .pose h4 { font-family: var(--font-text); font-weight: 700; font-size: 1rem; margin-top: 1.4em; }
.pose h3 + *, .pose h4 + * { margin-top: .5em; }
.pose ol.cues { padding-left: 1.4em; }
.pose ol.cues li::marker { font-family: var(--font-mono); font-size: .8125rem; color: var(--accent); }
.pose-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px 28px; }
.pose-notes > div > h3, .pose-notes > div > h4 { margin-top: .4em; }
.pose-notes ul { padding-left: 1.2em; margin: .5em 0 0; font-size: .9375rem; }
.pose-caution { font-size: .9375rem; padding: 12px 16px; background: var(--caution-soft); border-radius: 8px; color: var(--ink) !important; }
.pose-caution strong { color: var(--caution); }

/* ---------- Pose library / filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 24px; }
.filter-bar label { font-weight: 600; font-size: .9375rem; }
.filter-input {
  flex: 1 1 260px; max-width: 420px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 18px;
}
.filter-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-count { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 .875rem/1 var(--font-text); color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 14px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pose-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.pose-index a {
  display: grid; gap: 2px; align-content: start; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .2s;
}
.pose-index a:hover { border-color: var(--accent); color: var(--ink); }
.pose-index .pi-name { font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.3; }
.pose-index .pi-sa { font-family: var(--font-mono); font-size: .8125rem; color: var(--spice); }
.pose-index .pi-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .8125rem; color: var(--muted); }
.empty-note { color: var(--muted); padding: 24px 0; }

/* Glossary */
.glossary { margin: 0; display: grid; gap: 0; }
.gloss-entry { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 4px 28px; }
.gloss-entry dt { font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.35; color: var(--ink); }
.gloss-entry dt .pose-say { display: block; margin-top: 2px; }
.gloss-entry dd { margin: 0; color: var(--ink-2); }
.gloss-letter { font-family: var(--font-mono); font-size: .8125rem; color: var(--spice); letter-spacing: .08em; padding: 28px 0 8px; border-bottom: 1px solid var(--line-strong); }
@media (max-width: 640px) { .gloss-entry { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); }
.prose .faq + .faq { margin-top: 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--font-display); font-size: 1.25rem; line-height: 1.35; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--font-mono); font-size: 1.375rem; color: var(--accent); transition: transform .2s;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq > div { padding: 0 0 20px; }
.faq > div > * + * { margin-top: .8em; }

/* Timed sequence (routines) */
.prose ol.sequence { list-style: none; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.sequence > li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 2px 16px; padding: 12px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.sequence > li:last-child { border-bottom: 0; }
.seq-time { grid-row: span 2; font-family: var(--font-mono); font-size: .8125rem; color: var(--spice); padding-top: 3px; font-variant-numeric: tabular-nums; }
.seq-name { font-weight: 600; color: var(--ink); }
.seq-note { font-size: .875rem; color: var(--muted); line-height: 1.5; }

/* ---------- Breath pacer ---------- */
.pacer { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 4vw, 36px); display: grid; gap: 22px; justify-items: center; text-align: center; }
.pacer-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pacer-stage { position: relative; width: min(260px, 70vw); aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; }
.pacer-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); }
.pacer-ring.r2 { inset: 16%; border-style: dashed; }
.pacer-orb {
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, color-mix(in srgb, var(--accent) 55%, var(--surface)), var(--accent) 70%);
  transform: scale(.42); opacity: .9;
}
.pacer-text { position: absolute; display: grid; gap: 2px; color: var(--accent-ink); pointer-events: none; }
.pacer-phase { font-family: var(--font-display); font-size: 1.5rem; }
.pacer-count { font-family: var(--font-mono); font-size: .875rem; font-variant-numeric: tabular-nums; opacity: .85; }
.pacer-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; }
.pacer-desc { max-width: 46ch; font-size: .9375rem; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .9375rem/1 var(--font-text); padding: 13px 22px; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); text-decoration: none;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.pacer-cycles { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Pager ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-block: 0 clamp(48px, 7vw, 96px); }
.pager-link { display: grid; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface); transition: border-color .2s; }
.pager-link:hover { border-color: var(--accent); color: var(--ink); }
.pager-link.next { text-align: right; }
.pager-dir { color: var(--muted); }
.pager-title { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager > span { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 56px 32px; font-size: .9375rem; }
.foot-top { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 48px; }
.foot-brand p { margin-top: 14px; color: var(--muted); line-height: 1.6; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 28px 24px; }
.foot-head { color: var(--ink); margin-bottom: 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot-col a { color: var(--muted); text-decoration: none; line-height: 1.4; }
.foot-col a:hover { color: var(--accent); text-decoration: underline; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; max-width: 90ch; }
@media (max-width: 820px) { .foot-top { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Home ---------- */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero .eyebrow { color: var(--spice); margin-bottom: 22px; }
.hero h1 { font-size: var(--step-5); letter-spacing: -.025em; line-height: 1.04; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { max-width: 40ch; margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-art { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; justify-self: center; }
.hero-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ha-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.ha-ring.dash { stroke-dasharray: 2 6; }
.ha-horizon { stroke: var(--spice); stroke-width: 1.5; }
.ha-orb { fill: var(--accent); transform-origin: 200px 200px; transform: scale(.78); }
.ha-halo { fill: var(--accent); opacity: .12; transform-origin: 200px 200px; }
.ha-label { font-family: var(--font-display); font-size: 22px; fill: var(--accent-ink); text-anchor: middle; }
.ha-label.exhale { opacity: 0; }
.ha-tick { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; fill: var(--muted); text-anchor: middle; }
@media (prefers-reduced-motion: no-preference) {
  .ha-orb { animation: breathe 10s ease-in-out infinite; }
  .ha-halo { animation: halo 10s ease-in-out infinite; }
  .ha-label.inhale { animation: lblIn 10s linear infinite; }
  .ha-label.exhale { animation: lblOut 10s linear infinite; }
}
@keyframes breathe { 0% { transform: scale(.62); } 40% { transform: scale(1); } 100% { transform: scale(.62); } }
@keyframes halo { 0% { transform: scale(.7); opacity: .06; } 40% { transform: scale(1.18); opacity: .16; } 100% { transform: scale(.7); opacity: .06; } }
@keyframes lblIn { 0%, 38% { opacity: 1; } 42%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes lblOut { 0%, 38% { opacity: 0; } 42%, 97% { opacity: 1; } 100% { opacity: 0; } }
.hero-caption { text-align: center; font-size: .8125rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 210px; order: -1; justify-self: start; }
}

.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .eyebrow { color: var(--spice); margin-bottom: 12px; }
.section-head h2 { font-size: var(--step-4); letter-spacing: -.02em; max-width: 18ch; }
.section-head p { color: var(--ink-2); max-width: 48ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: minmax(0, 1fr); } }

.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); counter-reset: path; }
.path li { counter-increment: path; padding: 26px 28px 8px 0; }
.path li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.path-num { font-family: var(--font-mono); font-size: .8125rem; color: var(--spice); }
.path-num::before { content: "Step " counter(path); }
.path h3 { font-size: 1.625rem; margin: 10px 0 10px; }
.path p { color: var(--ink-2); font-size: 1rem; }
.path a.more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.path a.more:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .path { grid-template-columns: minmax(0, 1fr); }
  .path li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .path li { padding-bottom: 24px; }
}

.sutra { background: var(--accent); color: var(--accent-ink); }
.sutra .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.sutra-sa { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .02em; opacity: .85; }
.sutra-ref { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-top: 12px; }
.sutra blockquote { margin: 0; font-family: var(--font-display); font-size: var(--step-4); line-height: 1.15; letter-spacing: -.015em; }
.sutra p.sutra-note { margin-top: 20px; font-size: 1rem; opacity: .85; max-width: 52ch; line-height: 1.6; }
.sutra a { color: inherit; font-weight: 600; }
.sutra a:hover { color: inherit; opacity: .8; }
@media (max-width: 820px) { .sutra .wrap { grid-template-columns: minmax(0, 1fr); } }

.limbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); gap: 1px; counter-reset: limb; }
.limbs li { counter-increment: limb; background: var(--surface); padding: 22px 22px 24px; display: grid; gap: 4px; align-content: start; }
.limbs li::before { content: counter(limb); font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
.limb-sa { font-family: var(--font-display); font-size: 1.375rem; color: var(--ink); }
.limb-en { font-size: .9375rem; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 900px) { .limbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .limbs { grid-template-columns: minmax(0, 1fr); } }

.families { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .families { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .families { grid-template-columns: minmax(0, 1fr); } }

.home-closing { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.home-closing h2 { font-size: var(--step-4); letter-spacing: -.02em; max-width: 20ch; }
.home-closing p { color: var(--ink-2); margin-top: 14px; max-width: 52ch; }
@media (max-width: 760px) { .home-closing { grid-template-columns: minmax(0, 1fr); } }

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

/* ---------- Pose Library hub ---------- */
.library-chips { display: grid; gap: 10px; margin-bottom: 28px; }
.pose-index .pi-meta .level { gap: 6px; }
.library-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 28px 40px; margin-top: clamp(48px, 6vw, 72px); padding-top: 36px; border-top: 1px solid var(--line); }
.library-notes h2 { font-size: 1.375rem; margin-bottom: 10px; }
.library-notes p { color: var(--ink-2); font-size: .9375rem; }
.library-notes .level { font-weight: 600; color: var(--ink); }

/* ---------- Photography ---------- */
.page-banner { margin: clamp(28px, 4vw, 44px) 0 0; aspect-ratio: 1600 / 686; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.page-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .page-banner { aspect-ratio: 3 / 2; border-radius: 10px; } }
.home-banner { padding-block: clamp(28px, 4vw, 48px) 0; }
.home-banner .page-banner { margin: 0; }
.hero { border-bottom: 0; }
.link-card { overflow: hidden; }
.card-media { display: block; margin: -20px -22px 10px; aspect-ratio: 3 / 2; max-width: none; overflow: hidden; background: var(--surface-2); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
@media (prefers-reduced-motion: no-preference) { .link-card:hover .card-media img { transform: scale(1.03); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-banner img, :root:not([data-theme="light"]) .card-media img { filter: brightness(.9); } }
:root[data-theme="dark"] .page-banner img, :root[data-theme="dark"] .card-media img { filter: brightness(.9); }
.credits { columns: 2 260px; column-gap: 32px; }
.credits li { break-inside: avoid; }
