/* Learn Pilates Foundation · styles
   Layout: course-book. Sticky module index on the left, a reading column in the center that widens for interactive figures. */
:root {
  --bg: #eef1ec; --surface: #ffffff; --ink: #13201a; --muted: #4f5f58; --line: #d3dbd5; --accent: #1f5e50; --accent-ink: #ffffff; --accent-soft: #dde9e3;
  --tile-sage: #cfe0d6; --tile-peach: #f3d2c1; --tile-lilac: #dcd6f2; --tile-plain: #ffffff; --tile-ink: #13201a; --tile-sub: #31443b; --band: #13201a; --band-ink: #ffffff; --band-sub: #c7d3cd; --band-hi: #f3d2c1;
  --m1: #4a74c9; --m2: #7d9fe0; --m3: #2c4f96; --m4: #c8433a; --m5: #c98410; --m6: #2f8a52; --m7: #8a4fb0; --m8: #c4527f; --m9: #178a8a;
  --st-con: #c8372d; --st-ecc: #dd8a1e; --st-str: #4a82c4; --st-iso: #8753b6;
  --mus: #b6463c; --mus-deep: #7b2620; --mus-edge: #6a1f1a; --mus-pale: #f0d5cd; --mus-pale-d: #d2a79c; --tendon: #ece0c8; --tendon-line: #c4ad86;
  --bone-r: #f2ead8; --bone-edge: #a79170; --disc: #c9dbe4; --skin-r: #f7ece4; --skin-edge: #dcc2b1; --floor: #d6dcd9; --steel: #8f9a96;
  --good: #2f7d46; --bad: #b4372f;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ui: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121715; --surface: #1a201e; --ink: #e5ebe8; --muted: #9aa7a2; --line: #2e3835; --accent: #6cc0ad; --accent-ink: #0d1412; --accent-soft: #1f2f2a;
  --tile-sage: #1e2e27; --tile-peach: #33241e; --tile-lilac: #27233a; --tile-plain: #1a201e; --tile-ink: #e5ebe8; --tile-sub: #b7c4be; --band: #0b100e; --band-ink: #e5ebe8; --band-sub: #a9b7b1; --band-hi: #f0c3ae;
  --m1: #7ea2ea; --m2: #a9c3f3; --m3: #5a7fd0; --m4: #ec7a70; --m5: #f0b04a; --m6: #5fc283; --m7: #b88ae0; --m8: #ec86ae; --m9: #4cc4c0;
  --st-con: #e5584c; --st-ecc: #f0a440; --st-str: #6fa2e0; --st-iso: #a97ad6;
  --mus: #c24e43; --mus-deep: #7e2822; --mus-edge: #4a1612; --mus-pale: #5e4642; --mus-pale-d: #82625a; --tendon: #d6c9ae; --tendon-line: #9d8a68;
  --bone-r: #d6cdb8; --bone-edge: #877557; --disc: #4b6370; --skin-r: #342c28; --skin-edge: #5b4a42; --floor: #2c3532; --steel: #6d7975;
  --good: #7fd296; --bad: #f08b83; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #121715; --surface: #1a201e; --ink: #e5ebe8; --muted: #9aa7a2; --line: #2e3835; --accent: #6cc0ad; --accent-ink: #0d1412; --accent-soft: #1f2f2a;
  --tile-sage: #1e2e27; --tile-peach: #33241e; --tile-lilac: #27233a; --tile-plain: #1a201e; --tile-ink: #e5ebe8; --tile-sub: #b7c4be; --band: #0b100e; --band-ink: #e5ebe8; --band-sub: #a9b7b1; --band-hi: #f0c3ae;
  --m1: #7ea2ea; --m2: #a9c3f3; --m3: #5a7fd0; --m4: #ec7a70; --m5: #f0b04a; --m6: #5fc283; --m7: #b88ae0; --m8: #ec86ae; --m9: #4cc4c0;
  --st-con: #e5584c; --st-ecc: #f0a440; --st-str: #6fa2e0; --st-iso: #a97ad6;
  --mus: #c24e43; --mus-deep: #7e2822; --mus-edge: #4a1612; --mus-pale: #5e4642; --mus-pale-d: #82625a; --tendon: #d6c9ae; --tendon-line: #9d8a68;
  --bone-r: #d6cdb8; --bone-edge: #877557; --disc: #4b6370; --skin-r: #342c28; --skin-edge: #5b4a42; --floor: #2c3532; --steel: #6d7975;
  --good: #7fd296; --bad: #f08b83; color-scheme: dark }

* { box-sizing: border-box }
html { scroll-padding-top: 72px }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 var(--ui); margin: 0; -webkit-text-size-adjust: 100% }
a { color: var(--accent) }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
h1, h2, h3, h4, h5 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0 }
.eyebrow { font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block }
.muted { color: var(--muted) }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .95rem var(--ui); padding: 10px 18px; border-radius: 8px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line) }
.btn.icon { padding: 8px 14px; font-size: 1.2rem; background: transparent; color: var(--ink); border-color: var(--line) }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }

/* ---------- shell ---------- */
.appbar { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line) }
.top { display: flex; align-items: center; gap: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px }
.brand { font: 700 1.05rem var(--display); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px; white-space: nowrap }
.brand svg { width: 26px; height: 26px }
#menu { display: none; background: none; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink); font: 600 .9rem var(--ui); cursor: pointer }
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto }
.search input { width: 100%; font: 15px var(--ui); padding: 9px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink) }
#search-out { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); padding: 6px; display: flex; flex-direction: column; z-index: 40 }
#search-out[hidden] { display: none }
#search-out a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink) }
#search-out a:hover, #search-out a:focus { background: var(--accent-soft) }
#search-out small { color: var(--muted) }
#search-out .muted { padding: 8px 10px }
#prog { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); white-space: nowrap }
.ring { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); -webkit-mask: radial-gradient(circle 7px, transparent 98%, #000); mask: radial-gradient(circle 7px, transparent 98%, #000) }
#tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); scroll-padding-inline: 12px }
#tabs::-webkit-scrollbar { display: none }
#tabs a { flex: none; font: 600 .9rem var(--ui); color: var(--muted); text-decoration: none; padding: 10px 12px 11px; border-bottom: 2.5px solid transparent; white-space: nowrap }
#tabs a:hover { color: var(--ink) }
#tabs a.cur { color: var(--accent); border-bottom-color: var(--accent) }
#tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 6px }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1360px; margin: 0 auto }
body.side .layout { grid-template-columns: 280px minmax(0, 1fr) }
body:not(.side) #nav { display: none }
#nav { position: sticky; top: var(--barh, 101px); height: calc(100vh - var(--barh, 101px)); overflow-y: auto; padding: 20px 14px 40px 16px; border-right: 1px solid var(--line); font-size: .92rem; padding-left: max(16px, env(safe-area-inset-left, 0px)) }
#nav a { color: var(--ink); text-decoration: none; display: block; padding: 4px 8px; border-radius: 6px }
#nav a:hover { background: var(--accent-soft) }
#nav a.cur { background: var(--accent); color: var(--accent-ink) }
.nav-home { font-weight: 600; margin-bottom: 10px }
.nav-mod { margin-bottom: 2px }
.nav-mh { width: 100%; text-align: left; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 6px; display: grid; grid-template-columns: 22px 1fr auto 14px; gap: 6px; align-items: baseline; font: 600 .9rem var(--display); padding: 7px 8px }
.nav-mh:hover { background: var(--accent-soft) }
.nav-mh:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }
.nav-mh .chev { width: 12px; height: 12px; align-self: center; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s }
.nav-mod.open .chev { transform: rotate(90deg) }
.nav-mod.here > .nav-mh { color: var(--accent) }
.nav-mod ul { margin-bottom: 8px !important }
.nav-mh .mn { font: 500 .78rem var(--mono); color: var(--accent) }
.nav-mh small { color: var(--muted); font: 500 .72rem var(--mono) }
.nav-mod ul { list-style: none; margin: 0; padding: 0 0 0 22px }
#nav li a { font-size: .88rem; color: var(--muted); position: relative; padding-left: 20px }
#nav li a::before { content: ""; position: absolute; left: 6px; top: .72em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--line) }
#nav li a.done::before { background: var(--accent); border-color: var(--accent) }
#nav li a.cur { color: var(--accent-ink) }
#nav a.nav-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); border-radius: 0; font-size: .82rem; color: var(--muted) }
#nav a.nav-foot.cur { border-radius: 6px }
#scrim { display: none }
main { min-width: 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 28px 80px }
main > * { max-width: 920px; margin-left: auto; margin-right: auto }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr }
  body.side #menu { display: inline-block }
  body.side .layout { grid-template-columns: 1fr }
  #nav { position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 86vw); background: var(--surface); z-index: 50; transform: translateX(-102%); transition: transform .25s; border-right: 1px solid var(--line); padding-top: calc(20px + env(safe-area-inset-top, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)) }
  .nav-open #nav { transform: none }
  .nav-open #scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 45 }
  #prog span:last-child { display: none }
}
@media (max-width: 560px) { .brand span { display: none } .search { max-width: none } }
@media (prefers-reduced-motion: reduce) { #nav, .nav-mh .chev { transition: none } }

/* ---------- home ---------- */
.hero { padding: 24px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 28px }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; letter-spacing: -.02em; margin: 8px 0 14px }
.lead { font: 1.12rem/1.6 var(--read); max-width: 62ch; margin: 0 0 20px }
.sec { font: 600 .78rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px }
section { margin-bottom: 34px }
.path { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--line); margin-left: 17px }
.path li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 0 0 22px; margin-left: -19px }
.path .pn { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font: 600 .9rem var(--mono) }
.path li.complete .pn { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.path a { text-decoration: none; color: var(--ink) }
.path h3 { font-size: 1.25rem; margin-top: 6px }
.path p { margin: 4px 0; font-family: var(--read); max-width: 60ch }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px }
.tool { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink) }
.tool b { font: 600 1.05rem var(--display); color: var(--accent) }
.tool span { font-size: .93rem; color: var(--muted) }
.about p { font-family: var(--read); max-width: 70ch }

/* ---------- lesson ---------- */
.l-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px }
.l-head h1, .pg-head h1, .ex-head h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.015em; margin: 8px 0 10px }
.l-meta { font: 500 .78rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em }
.goals { margin-top: 16px; background: var(--accent-soft); border-radius: 10px; padding: 12px 16px }
.goals b { font: 600 .78rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent) }
.goals ul { margin: 6px 0 0; padding-left: 1.2em }
.l-body { font: 1.06rem/1.7 var(--read) }
.l-body > p, .l-body > ul, .l-body > ol { max-width: 68ch }
.l-body h3 { font-size: 1.4rem; margin: 34px 0 10px }
.l-body li { margin-bottom: 4px }
.flow { counter-reset: f; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px }
.flow li { counter-increment: f; position: relative; padding-left: 36px; font-family: var(--ui); font-size: 1rem; min-height: 26px }
.flow li::before { content: counter(f); position: absolute; left: 0; top: 0; font: 600 .8rem var(--mono); width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center }
.checks { list-style: none; padding: 0; font-family: var(--ui) }
.checks li { padding-left: 26px; position: relative; margin-bottom: 6px }
.checks li::before { content: ""; position: absolute; left: 0; top: .25em; width: 15px; height: 15px; border: 2px solid var(--accent); border-radius: 4px }
.call { display: block; margin: 22px 0; padding: 14px 18px; border-radius: 10px; font: 1rem/1.6 var(--ui); max-width: 72ch }
.call .ch { display: block; font: 600 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px }
.call.key { background: var(--accent-soft) } .call.key .ch { color: var(--accent) }
.call.pil { background: color-mix(in srgb, var(--m7) 12%, var(--surface)) } .call.pil .ch { color: var(--m7) }
.call.exam { background: color-mix(in srgb, var(--m5) 14%, var(--surface)) } .call.exam .ch { color: color-mix(in srgb, var(--m5) 80%, var(--ink)) }
.keyline { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: .92rem }
.keyline i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; margin-right: 4px }
.tbl { overflow-x: auto; margin: 16px 0 }
.tbl table { border-collapse: collapse; width: 100%; font: .94rem/1.45 var(--ui) }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
.tbl th { font: 500 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.w { margin: 22px 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-family: var(--ui); font-size: 1rem }
.check { margin-top: 40px; padding: 20px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line) }
.check h2 { font-size: 1.3rem; margin-bottom: 12px }
.l-foot { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; align-items: stretch }
.l-foot > .btn { align-self: flex-start }
.pn-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px }
.pn-nav a { display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font: 600 1rem var(--display); background: var(--surface) }
.pn-nav small { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.pn-next { text-align: right }

/* ---------- quiz ---------- */
.q { display: flex; flex-direction: column; gap: 12px }
.q-meta { display: flex; justify-content: space-between; gap: 8px; font: 500 .78rem var(--mono); color: var(--muted); flex-wrap: wrap }
.pips { display: flex; gap: 4px } .pips i { width: 16px; height: 5px; border-radius: 3px; background: var(--line) } .pips i.ok { background: var(--good) } .pips i.no { background: var(--bad) } .pips i.cur { background: var(--ink) }
.q-prompt { font: 600 1.12rem/1.4 var(--display); margin: 0 }
.opts { display: flex; flex-direction: column; gap: 8px }
.opt { font: 1rem var(--ui); text-align: left; padding: 11px 14px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer }
.opt:hover:not(:disabled) { border-color: var(--accent) }
.opt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)) }
.opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)) }
.feedback { padding: 10px 12px; border-radius: 8px; background: var(--bg); margin-bottom: 10px }
.q-result { display: flex; flex-direction: column; gap: 8px; align-items: flex-start }
.big { font: 700 2.6rem/1 var(--display); font-variant-numeric: tabular-nums }

/* ---------- widgets ---------- */
.map-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start }
.map-grid.solo { grid-template-columns: 1fr }
@media (max-width: 760px) { .map-grid { grid-template-columns: 1fr } }
.map-col { display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.bodymap, .mini, .wide-svg, .pose-svg, .thumb-svg { display: block; width: 100%; height: auto }
.wide-svg { max-width: 620px } .mini { max-width: 420px; margin: 0 auto }
.bodymap .skn { fill: var(--skin-r); stroke: var(--skin-edge); stroke-width: 1.5 }
.skn { fill: var(--skin-r); stroke: var(--skin-edge); stroke-width: 1.5; pointer-events: none }
.bn { fill: var(--bone-r); stroke: var(--bone-edge); stroke-width: 1.2; pointer-events: none }
.bodymap .bone { fill: none; stroke: var(--bone-edge); stroke-width: 1.4; stroke-dasharray: 4 3; pointer-events: none }
svg text { font: 600 12px var(--ui) }
.bodymap .badge circle { fill: var(--surface); stroke-width: 2 } .bodymap .badge text { font: 600 11px var(--mono); fill: var(--ink) } .badge { cursor: pointer }
.rm { cursor: pointer } .rm.other, .rm.rigm { pointer-events: none }
.has-sel .rm, .has-sel .badge { opacity: .38 } .has-sel .rm.on, .has-sel .badge.on { opacity: 1 }
.rm.on .ol { stroke: var(--ink); stroke-width: 2 }
.mus { cursor: pointer } .has-sel .mus { fill-opacity: .2 } .has-sel .mus.on { fill-opacity: 1; stroke: var(--ink); stroke-width: 2 }
.mus.deepm { stroke-dasharray: 3 2; stroke: var(--ink) }
.lm-line { fill: none !important; stroke-width: 7; stroke-linecap: round; stroke-opacity: .75; cursor: pointer }
.has-sel .lm-line { stroke-opacity: .15 } .has-sel .lm-line.on { stroke-opacity: 1 }
.rm-b { cursor: pointer } .has-sel .rm-b { opacity: .35 } .has-sel .rm-b.on { opacity: 1 } .rm-b.on .bn { fill: color-mix(in srgb, var(--accent) 35%, var(--bone-r)) }
@media (prefers-reduced-motion: no-preference) { .rm, .rm-b, .badge, .mus { transition: opacity .2s, fill-opacity .2s } }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { font: 600 .84rem var(--ui); display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--mc, var(--accent)) }
.chip.on { border-color: var(--mc, var(--accent)); background: color-mix(in srgb, var(--mc, var(--accent)) 16%, var(--surface)) }
.mcard { display: flex; flex-direction: column; gap: 10px; border: 1.5px solid var(--mc); border-radius: 10px; padding: 16px; min-width: 0; background: var(--surface) }
.mhead { display: flex; align-items: center; gap: 10px } .mhead h4 { font-size: 1.15rem }
.mnum { font: 600 .82rem var(--mono); width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--mc); color: #fff; flex: none }
.mfacts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; font-size: .94rem }
.mfacts dt { font: 500 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px }
.mfacts dd { margin: 0 }
@media (max-width: 420px) { .mfacts { grid-template-columns: 1fr } }
.mini-wrap { background: var(--bg); border-radius: 8px; padding: 8px }
.exlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px }
.exlist li { background: var(--bg); border-radius: 8px; padding: 9px 11px }
.exrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px } .exrow b { font-family: var(--display) }
.exlist p { margin: 2px 0 0; font-size: .92rem }
.tag { font: 500 .66rem var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted) }
.t-shortens { color: var(--st-con); border-color: var(--st-con) } .t-lengthens { color: var(--st-ecc); border-color: var(--st-ecc) } .t-holds { color: var(--st-iso); border-color: var(--st-iso) } .t-relax { color: var(--bad); border-color: var(--bad) }
.pairs, .tri { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 12px }
.pair { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: .94rem; display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.pair b { font-family: var(--display) }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px }
.sw { display: inline-block; width: 20px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: middle }
.wh { font-size: 1.1rem; margin: 18px 0 4px }
.reveal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 8px }
.reveal { font: .94rem var(--ui); text-align: left; padding: 10px 12px; border-radius: 8px; border: 1.5px dashed var(--line); background: var(--bg); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 2px }
.reveal b { color: var(--accent); visibility: hidden } .reveal.open b { visibility: visible } .reveal.open { border-style: solid; border-color: var(--accent) }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px }
.seg button { font: 600 .86rem var(--ui); padding: 7px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink) }
.sorter .pool { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; margin-bottom: 12px }
.buckets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px }
@media (max-width: 600px) { .buckets { grid-template-columns: 1fr } }
.bucket { border: 2px dashed var(--line); border-radius: 10px; padding: 10px; min-height: 110px; cursor: pointer; background: var(--bg) }
.bucket h5 { font-size: 1rem; margin-bottom: 8px } .bucket > div { display: flex; flex-wrap: wrap; gap: 5px }
.placed { font-size: .84rem; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); cursor: pointer }
.placed.ok { border-color: var(--good); color: var(--good) } .placed.no { border-color: var(--bad); color: var(--bad); text-decoration: line-through }
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start }
@media (max-width: 700px) { .lab { grid-template-columns: 1fr } }
.lab-ctrl { display: flex; flex-direction: column; gap: 12px }
.slider { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted) }
.slider input { width: 100%; accent-color: var(--accent) }
.lab-read { display: flex; align-items: baseline; gap: 10px } .lab-read b { font: 700 1.5rem var(--display) } .deg { font: 600 1.1rem var(--mono); color: var(--muted) }
.lab-mus { display: flex; flex-direction: column; gap: 6px; font-size: .94rem }
.lab-fig { background: var(--bg); border-radius: 10px; max-width: 380px; width: 100%; justify-self: center }
.scap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
@media (max-width: 560px) { .scap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.scap { margin: 0; background: var(--bg); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 4px }
.scap svg { width: 100%; height: auto }
.scap figcaption { display: flex; flex-direction: column; font-size: .88rem } .scap b { font-family: var(--display) } .scap small { color: var(--muted) }
.breath { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center }
@media (max-width: 700px) { .breath { grid-template-columns: 1fr } }
.br-fig svg { max-width: 300px; margin: 0 auto }
.br-ctrl { display: flex; flex-direction: column; gap: 12px; align-items: flex-start }
.br-count { display: flex; align-items: baseline; gap: 12px } .br-phase { font: 700 2rem var(--display) } .br-num { font: 600 1.4rem var(--mono); color: var(--accent) }
.br-arrows, .br-down { transition: opacity .3s }
.can-svg svg { max-width: 520px }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); margin-left: 6px }
.timeline li { position: relative; padding: 0 0 16px 22px }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent) }
.yr { font: 600 .9rem var(--mono); color: var(--accent) } .timeline p { margin: 2px 0 0; font-size: .97rem }
.plist { padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px } .plist li b { font-family: var(--display); margin-right: 8px }
.gl-bar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px }
.gl-bar input, .filters input, .filters select, .an select, .cb-own input, .cb-own select { font: 15px var(--ui); padding: 9px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink) }
.gl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px }
.gl { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line) }
.gl h5 { font-size: 1.02rem } .gl p { margin: 4px 0 6px; font-size: .93rem }
.gl-fig { background: var(--surface); border-radius: 6px } .gl-fig svg { max-height: 200px }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px }
.eq { background: var(--bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px }
.eq svg { width: 100%; height: auto; background: var(--surface); border-radius: 6px }
.eq h5 { font-size: 1.05rem } .eq p { margin: 0; font-size: .92rem }
.spq { display: flex; flex-direction: column; gap: 10px; align-items: flex-start }
.spring-svg { width: 100%; max-width: 440px; height: auto; background: var(--bg); border-radius: 8px }
.spq .opts { width: 100% }
.an { display: flex; flex-direction: column; gap: 12px }
.an-pick { display: flex; flex-direction: column; gap: 4px; font-weight: 600 }
.an-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px }
@media (max-width: 700px) { .an-grid { grid-template-columns: 1fr } }
.an-fig { background: var(--bg); border-radius: 8px; padding: 8px }
.an-form { display: flex; flex-direction: column; gap: 10px } .an-form label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600 }
.an-res { font-size: .88rem; font-weight: 600 } .an-res.ok { color: var(--good) } .an-res.no { color: var(--bad) }
.faults { display: flex; flex-direction: column; gap: 8px }
.fault { background: var(--bg); border-radius: 8px; padding: 10px 14px }
.fault summary { cursor: pointer; font: 600 1rem var(--display) }
.fault dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 10px 0 0; font-size: .94rem }
.fault dt { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 3px } .fault dd { margin: 0 }
.seg.wrap button { text-align: left }
.sf-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
@media (max-width: 640px) { .sf-cols { grid-template-columns: 1fr } }
.sf { border-radius: 10px; padding: 12px; border: 1.5px solid var(--line) }
.sf h5 { font-size: 1rem; display: flex; justify-content: space-between } .sf ul { margin: 8px 0 0; padding-left: 1.1em; font-size: .94rem }
.sf-avoid { border-color: var(--bad) } .sf-avoid h5 { color: var(--bad) } .sf-modify { border-color: var(--st-ecc) } .sf-modify h5 { color: color-mix(in srgb, var(--st-ecc) 75%, var(--ink)) } .sf-ok { border-color: var(--good) } .sf-ok h5 { color: var(--good) }
.sf-tag { font: 600 .68rem var(--mono); text-transform: uppercase; padding: 2px 7px; border-radius: 4px; margin-right: 8px; border: 1px solid }
.sf-tag.sf-ok { color: var(--good) } .sf-tag.sf-modify { color: color-mix(in srgb, var(--st-ecc) 75%, var(--ink)) } .sf-tag.sf-avoid { color: var(--bad) }

/* ---------- pages ---------- */
.pg-head { margin-bottom: 22px }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px } .filters input { flex: 1; min-width: 200px } .filters .seg { margin: 0 }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px }
.lib-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: var(--ink) }
.lib-card:hover { border-color: var(--accent) }
.lc-fig { background: var(--bg); border-radius: 8px } .lc-fig svg, .ml-card svg { height: 150px }
.lib-card h3 { font-size: 1.2rem; margin: 4px 0 } .lib-card p { margin: 0; font-size: .92rem; color: var(--muted) }
.lvl { display: inline-block; margin-top: 8px; font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent) }
.back { font-weight: 600; text-decoration: none; display: inline-block; margin-bottom: 12px }
.ex-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: end; margin-bottom: 18px }
@media (max-width: 760px) { .ex-head { grid-template-columns: 1fr } }
.ex-ana { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: .94rem }
.ex-ana dt { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 3px } .ex-ana dd { margin: 0; font-weight: 600 }
.player { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px }
main > .exercise, main > .crumbs:has(+ .exercise) { max-width: 1060px }
.pl-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center }
.view { font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted) }
.pl-fig { background: var(--bg); border-radius: 8px; overflow-x: auto }
.pl-fig svg { min-width: 620px }
.pl-ctrl { display: flex; gap: 8px; align-items: center } .pl-ctrl input { flex: 1; accent-color: var(--accent) }
.stages { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px }
.stages button { font: 600 .88rem var(--ui); display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer }
.stages button span { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font: 600 .76rem var(--mono) }
.stages button.on { border-color: var(--accent); background: var(--accent-soft) } .stages button.on span { background: var(--accent); color: var(--accent-ink) }
.stage-info h3 { font-size: 1.15rem } .stage-info p { margin: 4px 0; font-family: var(--read); max-width: 70ch }
.breath-tag { font: 600 .78rem var(--mono) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--accent) }
.mstates { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 14px; font-size: .9rem }
.mstates b { margin-right: 4px }
.ex-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 22px 0 }
.ex-cols h2 { font-size: 1.1rem; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--ink) }
.ex-cols ul { padding-left: 1.1em; margin: 0 } .ex-cols p { margin: 0 0 8px }
.safe { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; font-size: .92rem }
.ml { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px }
@media (max-width: 760px) { .ml { grid-template-columns: 1fr } .ml-list { flex-direction: row !important; flex-wrap: wrap } }
.ml-list { display: flex; flex-direction: column; gap: 4px }
.ml-list button { text-align: left; font: 600 .92rem var(--ui); padding: 8px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer }
.ml-list button[aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink) }
.ml-body h2 { font-size: 1.8rem; margin-bottom: 10px } .ml-body .sec { margin-top: 22px }
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px }
.ml-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px }
.ml-card svg { background: var(--bg); border-radius: 6px } .ml-card div { display: flex; flex-direction: column; font-size: .9rem } .ml-card small { color: var(--muted) }
.cb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start }
@media (max-width: 820px) { .cb { grid-template-columns: 1fr } }
.cb-cat { margin-bottom: 12px } .cb-cat h4 { font-size: .95rem; margin-bottom: 6px }
.cb-add { display: inline-flex; gap: 6px; align-items: baseline; font: .9rem var(--ui); margin: 0 6px 6px 0; padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer }
.cb-add small { color: var(--muted) }
.cb-own { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px }
.cb-plan { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px }
.cb-stats { display: flex; gap: 22px } .cb-stats div { display: flex; flex-direction: column } .cb-stats b { font: 700 1.8rem var(--display) } .cb-stats span { font-size: .82rem; color: var(--muted) }
.bal { display: flex; flex-direction: column; gap: 5px; margin-top: 10px }
.bal-row { display: grid; grid-template-columns: 120px 1fr 24px; gap: 8px; align-items: center; font-size: .88rem }
.bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden } .bar i { display: block; height: 100%; background: var(--accent) }
.warn { margin: 10px 0 0; padding-left: 1.1em; color: color-mix(in srgb, var(--st-ecc) 75%, var(--ink)); font-size: .92rem } .good { color: var(--good); font-weight: 600; margin: 10px 0 0 }
.cb-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: c }
.cb-list li { counter-increment: c; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg) }
.cb-b { grid-column: 1; font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted) }
.cb-list b { grid-column: 1 } .cb-list small { grid-column: 1; color: var(--muted) }
.cb-act { grid-column: 2; grid-row: 1 / span 3; display: flex; gap: 4px; align-items: center }
.cb-act button { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer }
.fc-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 10px }
.fc-meta { font: 500 .8rem var(--mono); color: var(--muted) }
.fc { width: min(560px, 100%); min-height: 230px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; padding: 26px; font: 600 1.4rem/1.35 var(--display); display: flex; align-items: center; justify-content: center; text-align: center }
.fc .fc-back { display: none; font: 400 1.08rem/1.55 var(--read) }
.fc.flip .fc-front { display: none } .fc.flip .fc-back { display: block } .fc.flip { border-color: var(--accent); background: var(--accent-soft) }
.fc-btns { justify-content: center }
.mock { margin-top: 10px }

/* ---------- sign-up gate ---------- */
body.gated .appbar, body.gated .layout { display: none }
#gate { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; background: var(--bg);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 32px }
.gate-in { width: 100%; max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center }
@media (max-width: 820px) { .gate-in { grid-template-columns: 1fr; gap: 24px } .gate-fig { display: none } }
.gate-pitch h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; letter-spacing: -.02em; margin: 8px 0 12px }
.gate-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px }
.gate-list li { display: flex; flex-direction: column; padding-left: 18px; border-left: 3px solid var(--accent) }
.gate-list b { font: 600 1.05rem var(--display) } .gate-list span { color: var(--muted); font-size: .95rem }
.gate-fig { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; max-width: 520px }
.gate-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: 0 10px 30px rgba(0, 0, 0, .06) }
.gate-form { display: flex; flex-direction: column; gap: 8px }
.gate-form h2, .gate-privacy h2 { font-size: 1.6rem }
.gate-form p { margin: 0 0 6px }
.gate-form label { font-weight: 600; font-size: .92rem; margin-top: 6px }
.gate-form input[type=email], .gate-form input:not([type]) { font: 16px var(--ui); padding: 11px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink) }
.g-check { display: grid !important; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-weight: 400 !important; margin-top: 10px !important; align-items: start }
.g-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent) }
.g-err { color: var(--bad); font-weight: 600; min-height: 1.2em; margin: 4px 0 0 !important }
.gate-form .btn { padding: 13px 18px; font-size: 1.02rem }
.g-small { font-size: .84rem; color: var(--muted); margin-top: 6px !important }
.linkish { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer }
.g-demo { font-size: .84rem; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--m5) 14%, var(--surface)) }
.gate-privacy { display: flex; flex-direction: column; gap: 6px; font-size: .95rem } .gate-privacy p { margin: 0 0 6px } .gate-privacy .btn { align-self: flex-start; margin-top: 8px }

/* library how-to panel */
.howto { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 18px }
.howto summary { cursor: pointer; padding: 12px 16px; font: 600 .95rem var(--ui); color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px }
.howto summary::-webkit-details-marker { display: none }
.howto summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(-45deg); transition: transform .18s; margin-right: 4px }
.howto[open] summary::before { transform: rotate(45deg) }
.howto summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px }
.howto > div { padding: 0 16px 14px; font-size: .95rem }
.howto > div p { margin: 0 0 10px }
.howto .keyline { margin-bottom: 12px }
.howto .tip { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; margin: 0 }
@media (prefers-reduced-motion: reduce) { .howto summary::before { transition: none } }
.keyline > span { white-space: nowrap; display: inline-flex; align-items: center }

/* homepage course card + course overview */
.course-card { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; transition: border-color .15s }
.course-card:hover { border-color: var(--accent) }
.cc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; margin-bottom: 14px }
.cc-head b { font: 700 1.1rem var(--display) }
.cc-head span { color: var(--accent); font: 600 .92rem var(--ui) }
.cc-mods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; font: 500 .95rem var(--ui) }
.cc-mods li { display: flex; gap: 10px; align-items: baseline }
.cc-mods .pn { font: 500 .8rem var(--mono); color: var(--accent); min-width: 14px }
.course-prog { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 28px }
.course-prog > div { flex: 1 1 240px; display: grid; gap: 4px }
.course-prog .bar { margin-top: 6px; max-width: 360px }
.maker { margin-top: 18px; font-size: .9rem }
@media (prefers-reduced-motion: reduce) { .course-card { transition: none } }

/* breadcrumbs */
.crumbs { margin-bottom: 14px; font: 500 .85rem var(--ui) }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; color: var(--muted) }
.crumbs li { display: flex; align-items: center; min-width: 0 }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--line-strong, var(--muted)); opacity: .7 }
.crumbs a { color: var(--muted); text-decoration: none; border-radius: 4px }
.crumbs a:hover { color: var(--accent); text-decoration: underline }
.crumbs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.crumbs [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100% }
@media (max-width: 640px) { .crumbs li.mod { display: none } }
/* lesson numbers in the sidebar */
#nav li a .ln { font: 500 .74rem var(--mono); color: var(--accent); margin-right: 7px }
#nav li a.cur .ln { color: inherit; opacity: .85 }

/* ---------- homepage (design D) ---------- */
main > .home { max-width: 1240px }
.home { color: var(--ink) }
.home h2 { font: 800 clamp(2.2rem, 4.4vw, 3.6rem)/1 var(--display); letter-spacing: -.03em; margin: 0 }
.home .kicker { margin: 0 0 12px; font: 600 .95rem var(--ui); color: var(--accent) }
.home .more { font-weight: 600; text-decoration: none }
.home .more:hover { text-decoration: underline }
.home .pill { align-self: flex-start; background: var(--surface); color: var(--tile-sub); border-radius: 999px; padding: 5px 12px; font: 600 .8rem var(--ui) }
.tile-sage { background: var(--tile-sage) } .tile-peach { background: var(--tile-peach) } .tile-lilac { background: var(--tile-lilac) } .tile-plain { background: var(--tile-plain) }
.pill-btn { border-radius: 999px !important; padding: 15px 28px !important; font-size: 1.02rem !important; background: var(--ink) !important; border-color: var(--ink) !important; color: var(--bg) !important }
.pill-btn.light { background: var(--surface) !important; border-color: var(--surface) !important; color: var(--ink) !important }
.h-hero { display: flex; flex-wrap: wrap; gap: 40px 48px; align-items: center; padding: 20px 0 32px }
.h-copy { flex: 1 1 440px; min-width: 0 }
.home .badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; background: var(--surface); border-radius: 999px; padding: 7px 15px; font-size: .9rem; font-weight: 500; color: var(--tile-sub) }
.home .badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--good) }
.h-copy h1 { font: 800 clamp(3rem, 6.2vw, 5.8rem)/.98 var(--display); letter-spacing: -.035em; margin: 0 }
.h-copy h1 span { color: var(--accent) }
.h-lead { margin: 24px 0 30px; max-width: 520px; font-size: 1.2rem; color: var(--muted) }
.carousel { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 12px }
.car-stage { position: relative; border-radius: 32px; overflow: hidden; min-height: 440px; display: flex }
.car-slide { flex: 1; display: flex; color: var(--tile-ink) }
.car-slide[hidden] { display: none }
.slide-fig { margin: 0; flex: 1; padding: 24px 28px 22px; display: flex; flex-direction: column; gap: 8px }
.sf-img { flex: 1; display: flex; align-items: center; min-height: 300px }
.sf-img svg { width: 100%; max-height: 330px }
.slide-fig figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px }
.slide-fig figcaption b { font: 700 1.7rem var(--display) }
.slide-fig figcaption span { font-size: .95rem; color: var(--tile-sub) }
.slide-quote { margin: 0; flex: 1; padding: 44px 40px 34px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px }
.slide-quote svg { fill: currentColor; opacity: .3 }
.slide-quote blockquote { margin: 0; font: 700 clamp(1.5rem, 2.5vw, 2.05rem)/1.22 var(--display); letter-spacing: -.01em }
.slide-quote figcaption { display: flex; align-items: center; gap: 14px }
.slide-quote figcaption small { display: block; color: var(--tile-sub); font-size: .92rem }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); flex: none }
.car-thumb img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover }
.car-nav { position: absolute; right: 16px; top: 16px; display: flex; gap: 8px }
.car-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center }
.car-btn.dark { background: var(--ink); color: var(--bg) }
.car-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round }
.car-thumbs { display: flex; align-items: center; gap: 10px }
.car-thumb { width: 82px; height: 64px; border-radius: 16px; padding: 6px; cursor: pointer; border: 2.5px solid transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--tile-ink) }
.car-thumb[aria-pressed="true"] { border-color: var(--ink) }
.car-thumb svg { width: 100%; height: 100% }
.car-thumb span { font: 800 2.2rem/1 var(--display); opacity: .6 }
.car-count { margin-left: auto; font-size: .9rem; color: var(--muted) }
.h-stats { margin: 8px 0 0; background: var(--surface); border-radius: 28px; padding: 28px 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 0; text-align: center }
.h-stats > div + div { border-left: 1px solid var(--line) }
.h-stats dt { font: 800 2.7rem/1 var(--display); letter-spacing: -.02em }
.h-stats dd { margin: 6px 0 0; color: var(--muted) }
.h-lab { padding: 96px 0 24px }
.h-lab-map { margin-top: 28px; border-radius: 32px; padding: 26px; color: var(--tile-ink) }
.h-lab-map .w { margin: 0 }
.h-sub { margin: 18px 0 24px; max-width: 470px; color: var(--muted) }
.h-key { margin-top: 72px; background: var(--band); color: var(--band-ink); border-radius: 36px; padding: 48px; display: flex; flex-wrap: wrap; gap: 30px 56px; align-items: center }
.h-key h2 { flex: 1 1 260px; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.04 }
.h-key h2 span { color: var(--band-hi) }
.h-key ul { flex: 2 1 540px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px }
.h-key li { border-top: 4px solid var(--c); padding-top: 14px }
.h-key b { display: block; font-size: 1.1rem }
.h-key li span { font-size: .93rem; color: var(--band-sub) }
.h-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px 40px; margin-bottom: 28px }
.h-play { padding-top: 88px }
.play-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px }
.play-card { border-radius: 28px; padding: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--tile-ink) }
.play-card.tile-plain .pill { background: var(--bg) }
.pc-fig { height: 190px; display: flex; align-items: center }
.pc-fig svg { width: 100%; height: 100% }
.pc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px }
.pc-foot h3 { font: 700 1.45rem var(--display); margin: 0 }
.pc-foot h3 a { color: inherit; text-decoration: none }
.pc-foot h3 a:hover { text-decoration: underline }
.pc-stage { font-size: .9rem; color: var(--tile-sub); display: block; min-height: 1.4em }
.pc-play { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center }
.pc-play svg { width: 20px; height: 20px; fill: currentColor }
.pc-play .i-pause, .play-card.on .pc-play .i-play { display: none }
.play-card.on .pc-play .i-pause { display: inline }
.h-path { padding-top: 88px }
.h-path ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px }
.h-path ol a { background: var(--surface); border-radius: 22px; padding: 18px 22px; display: flex; gap: 16px; align-items: center; color: var(--ink); text-decoration: none; height: 100%; box-sizing: border-box }
.h-path ol a:hover { outline: 2px solid var(--accent) }
.h-path .n { font: 800 2rem var(--display); color: var(--accent); min-width: 30px }
.h-path b { display: block; font-weight: 600 }
.h-path small { font-size: .88rem; color: var(--muted) }
.h-tools { padding-top: 88px }
.h-tools h2 { margin-bottom: 28px }
.h-tools > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px }
.h-tools a { background: var(--surface); border-radius: 26px; padding: 24px 26px; color: var(--ink); text-decoration: none }
.h-tools a:hover { outline: 2px solid var(--accent) }
.h-tools b { display: block; font: 700 1.35rem var(--display); margin-bottom: 4px }
.h-tools span { font-size: .94rem; color: var(--muted) }
.h-foot { margin-top: 80px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; font-size: .88rem; color: var(--muted) }
.h-foot p { margin: 0; max-width: 780px }
@media (max-width: 640px) {
  .h-hero { padding-top: 4px }
  .car-stage { min-height: 360px; border-radius: 26px }
  .h-key, .h-lab-map { padding: 22px 16px; border-radius: 28px }
  .h-stats { padding: 22px }
  .h-lab, .h-play, .h-path, .h-tools { padding-top: 64px }
}
.slide-fig .pill { max-width: calc(100% - 112px) }
@media (max-width: 640px) { .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) } .h-stats dt { font-size: 2.2rem } .h-stats > div:nth-child(3) { border-left: 0 } }
