/* YOU.0 — CODES and COURSES.
   Board 03-codes-page.png is the reference: a cinematic hero with the picture
   bleeding off the right, HUD stacks at the far edge, a white library of tall
   Code cards, an editorial band, and a black Labyrinth teaser.
   Colour is signal: a Code's themeColor arrives as --theme and is used for
   thin lines, glows and state — never as a page fill. */

/* ── Library hero ───────────────────────────────────────────────────────── */
.lib-hero { position: relative; overflow: hidden; min-height: min(86vh, 780px); display: grid; align-items: center; }
.lib-hero__media {
  position: absolute; inset: 0 0 0 24%; z-index: -1;
  /* The supplied hero crops carry their own HUD lettering at the edges; the
     mask lets the picture dissolve before it collides with the page's own. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 15%, #000 58%, transparent 84%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 15%, #000 58%, transparent 84%);
}
.lib-hero__media .art, .lib-hero__media img, .lib-hero__film { width: 100%; height: 100%; object-fit: cover; object-position: 8% 50%; }
/* No picture yet: the generated plate stays a wash behind the words, with its
   shot-list name still legible. */
.lib-hero__media .art--plate { opacity: .55; }
.lib-hero__media .art { position: absolute; inset: 0; }
.lib-hero__fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, transparent 18%),
    linear-gradient(90deg, var(--bg) 0%, rgba(237, 240, 243, .82) 22%, rgba(237, 240, 243, .1) 52%, transparent 70%);
}
.lib-hero__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center; padding-top: calc(var(--nav-h) + 3rem); padding-bottom: clamp(3rem, 7vw, 6rem);
}
.lib-hero__text { max-width: min(100%, 40rem); }
.lib-hero__title {
  margin-top: 1.1rem;
  font-family: var(--font-display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(3.4rem, 11vw, 9rem); letter-spacing: .1em; line-height: .92;
}
.lib-hero__sub {
  margin-top: .9rem; font-size: clamp(.95rem, 1.6vw, 1.35rem); letter-spacing: .22em;
  text-transform: uppercase; color: var(--fg-2); font-weight: 300;
}
.lib-hero__intro { margin-top: 1.5rem; }
.lib-hero__intro .prose { max-width: min(100%, 26rem); color: var(--fg-2); }
.lib-hero__cta { margin-top: 2rem; }
.lib-hero__side { display: grid; gap: var(--s-3); justify-items: end; text-align: right; align-self: center; }
.lib-hero__side .hud-list { justify-items: end; }
.lib-hero__side .rule { width: 68px; justify-self: end; }
.lib-hero__count { display: grid; gap: var(--s-1); justify-items: end; }
.lib-hero__count .mark-num { font-family: var(--font-mark); font-size: 1.5rem; }
.lib-hero__count em { font-style: normal; font-size: var(--fs-micro); letter-spacing: var(--track-hud); color: var(--fg-3); }

@media (max-width: 900px) {
  .lib-hero { min-height: 0; }
  .lib-hero__media { inset: 0; opacity: .5; -webkit-mask-image: none; mask-image: none; }
  .lib-hero__fade { background: linear-gradient(180deg, rgba(237, 240, 243, .6), var(--bg) 78%); }
  .lib-hero__inner { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--nav-h) + 2.5rem); }
  .lib-hero__side { justify-items: start; text-align: left; grid-auto-flow: row; }
  .lib-hero__side .hud-list { justify-items: start; }
  .lib-hero__side .rule { justify-self: start; }
  .lib-hero__count { justify-items: start; }
}

/* ── A whole-page background (pages.background) ─────────────────────────────
   Fixed behind everything, so the light sections sit on it instead of on
   paper; the dark ones (the Labyrinth teaser, the footer) keep their own
   paint. /codes carries one: the RESET mesh, turned on its side. */
.page-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); }
.page-backdrop picture, .page-backdrop__img { display: block; width: 100%; height: 100%; max-width: none; }
.page-backdrop__img { object-fit: cover; }
.has-backdrop .env--light { background: transparent; }
.has-backdrop .lib-hero.tech-grid::before { opacity: .18; }

/* The hero over it: its picture fills it and the words stand on the right
   (/codes: the 004 RELEASE card in its world, card on the left). The picture
   is held by its left edge, so a screen narrower than the picture loses the
   far right of the world and never the card. The shade is weighted to the
   words, never a veil over the whole picture. */
.lib-hero--bleed { background: #0b0a2e; color: #fff; }
.lib-hero__bleed { position: absolute; inset: 0; z-index: -1; }
.lib-hero__bleed picture, .lib-hero__bleed-img { display: block; width: 100%; height: 100%; max-width: none; }
/* Where the picture is held is its own focal point (set on the picture in
   the admin; picture() writes it as object-position) — /codes: the RELEASE
   portal, 40% across, left of the words. */
.lib-hero__bleed-img { object-fit: cover; object-position: 50% 50%; }
.lib-hero__bleed::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(270deg, rgba(5, 4, 26, .8) 0%, rgba(5, 4, 26, .56) 30%, rgba(5, 4, 26, 0) 58%);
}
.lib-hero--bleed .lib-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 32rem); padding-top: calc(var(--nav-h) + 1.5rem); padding-bottom: 2rem; }
.lib-hero--bleed .lib-hero__text, .lib-hero--bleed .lib-hero__side { grid-column: 2; }
.lib-hero--bleed .lib-hero__title { font-size: clamp(3.2rem, 7.4vw, 7rem); }
.lib-hero--bleed .lib-hero__sub { color: rgba(255, 255, 255, .82); }
.lib-hero--bleed .lib-hero__intro .prose { color: rgba(255, 255, 255, .8); }
.lib-hero--bleed .lib-hero__cta { margin-top: 1.6rem; }
/* The side words follow the main ones — two quiet lines and the count —
   instead of a stack against the far edge. */
.lib-hero--bleed .lib-hero__side { justify-items: start; text-align: left; align-self: start; gap: .5rem; }
.lib-hero--bleed .lib-hero__side .hud-list { display: flex; flex-wrap: wrap; gap: .15rem 1rem; justify-items: start; }
.lib-hero--bleed .lib-hero__side .hud-list li { font-size: .68rem; letter-spacing: .3em; color: rgba(255, 255, 255, .72); }
.lib-hero--bleed .lib-hero__count { justify-items: start; grid-auto-flow: column; align-items: baseline; gap: .6rem; }
.lib-hero--bleed .lib-hero__count em { color: rgba(255, 255, 255, .55); }
@media (max-width: 859px) {
  /* A phone is too narrow for a picture this wide to be cropped to it: it
     runs whole across the top, under the bar, and fades into its own blue,
     and the words sit below it. */
  .lib-hero--bleed { min-height: 0; display: block; padding-top: var(--nav-h); }
  .lib-hero__bleed { position: relative; inset: auto; z-index: 0; height: min(76vw, 22rem); }
  .lib-hero__bleed-img { -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
  .lib-hero__bleed::after { display: none; }
  .lib-hero--bleed .lib-hero__inner { grid-template-columns: minmax(0, 1fr); padding-top: .4rem; padding-bottom: 2.6rem; }
  .lib-hero--bleed .lib-hero__text, .lib-hero--bleed .lib-hero__side { grid-column: 1; }
}

/* THE FILTERS OVER THE MESH read as buttons. Arian, 2026-09-24: "They need
   to all be the same size a button as the find your code button … if it is
   not colored, and then it needs to be white in the background so that we
   can see the word." FIND YOUR CODE's own measure (components.css .btn); a
   white ground until chosen, ink once chosen. */
.page-codes .lib-list .chip {
  min-height: 50px; padding: 0 1.8rem;
  font-size: var(--fs-hud); font-weight: 500; letter-spacing: var(--track-wide);
  background: #fff; color: #15151c; border-color: rgba(21, 21, 28, .16);
}
.page-codes .lib-list .chip:hover { background: #eef0f4; }
.page-codes .lib-list .chip.is-active { background: #15151c; color: #fff; border-color: #15151c; }

/* A page colour (pages.paint): the page wears it under everything, and the
   hero's picture runs straight on into it — /codes: its header's own blue.
   That picture is its own shade, so the veil for the words stays off. */
.has-paint { background: var(--page-paint); }
.has-paint main .env { background: transparent; }
.has-paint .lib-hero--bleed { background: var(--page-paint); }
.has-paint .lib-hero__bleed::after { display: none; }
/* One surface, so no hairline where one section meets the next (rhythm.css
   draws one between two dark sections; this is more specific, on purpose). */
.has-paint main .env + .env { border-top: 0; }

/* ── The library band: chips + grid ─────────────────────────────────────── */
.lib-list { padding-top: clamp(2.5rem, 5vw, 4rem); }
.lib-list .chips { margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.lib-list .sec-head { margin-bottom: 1.2rem; }
.grid--courses { --min: 320px; --grid-gap: clamp(1rem, 2vw, 1.6rem); }
.lib-featured { margin-bottom: clamp(1rem, 2vw, 1.6rem); }
.lib-list--courses { border-top: 1px solid var(--line); }
/* The featured course is a big picture; its words need their own ground. */
.lib-featured .card-course__text { background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 30%, rgba(0,0,0,.88) 72%); padding-top: 4rem; }
.grid--courses .card-course__title { font-size: clamp(1.2rem, 1.7vw, 1.65rem); overflow-wrap: break-word; }

@media (max-width: 760px) { .grid--courses { --min: 260px; } }

/* ── An editorial band written in the page's sections ───────────────────── */
.lib-band { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 56%); align-items: stretch; }
.lib-band--flip { direction: rtl; }
.lib-band--flip > * { direction: ltr; }
.lib-band__media { position: relative; min-height: clamp(260px, 34vw, 460px); background: var(--bg-3); }
.lib-band__media .art { position: absolute; inset: 0; }
.lib-band__media .art img { width: 100%; height: 100%; object-fit: cover; }
.lib-band__body { min-width: 0; padding: clamp(2.2rem, 5vw, 4.5rem) clamp(1.2rem, 4vw, 4rem); align-self: center; max-width: 46rem; }
.lib-band__title {
  margin-top: 1.1rem; display: grid;
  font-family: var(--font-display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(1.5rem, 2.9vw, 2.5rem); letter-spacing: .1em; line-height: 1.15;
}
.lib-band__prose { margin-top: 1.8rem; }
.lib-band__prose .prose { max-width: none; }
/* A numbered list in a band becomes the board's three HUD columns. */
.lib-band__prose ol {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: clamp(1rem, 2.2vw, 2rem); padding: 0; margin-top: 1.4rem; list-style: none; counter-reset: band;
  border-top: 1px solid var(--line); padding-top: 1.4rem;
}
.lib-band__prose ol li { counter-increment: band; margin: 0; font-size: var(--fs-small); line-height: 1.6; }
.lib-band__prose ol li::before {
  content: counter(band); display: block; margin-bottom: .7rem;
  font-family: var(--font-mark); font-size: 1.5rem; line-height: 1; color: var(--fg);
}
.lib-band__prose ol li strong {
  display: block; margin-bottom: .45rem; font-weight: 400;
  font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg);
}
@media (max-width: 860px) {
  .lib-band, .lib-band--flip { grid-template-columns: 1fr; direction: ltr; }
  .lib-band__media { min-height: 48vw; }
}

/* ── Labyrinth teaser ───────────────────────────────────────────────────── */
.lib-teaser { position: relative; overflow: hidden; min-height: clamp(360px, 44vw, 560px); display: grid; align-items: center; }
/* The approved Labyrinth banner carries its own lettering at the right edge;
   the picture runs wider than the section so that edge sits off-screen. */
.lib-teaser__media { position: absolute; inset: 0 -42% 0 0; z-index: -1; }
.lib-teaser__media .art { position: absolute; inset: 0; }
.lib-teaser__media .art img { width: 100%; height: 100%; object-fit: cover; object-position: 0 74%; }
.lib-teaser__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(165deg, rgba(4,5,7,.97) 0%, rgba(4,5,7,.5) 22%, transparent 40%),
    linear-gradient(90deg, rgba(4,5,7,.96) 0%, rgba(4,5,7,.78) 34%, rgba(4,5,7,.34) 78%, rgba(4,5,7,.5) 100%);
}
.lib-teaser__inner { display: flex; justify-content: space-between; align-items: center; gap: var(--s-5); padding-block: clamp(3rem, 7vw, 5.5rem); }
.lib-teaser__text { max-width: min(100%, 40rem); }
.lib-teaser__title {
  margin-top: 1rem; display: grid;
  font-family: var(--font-display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(1.35rem, 2.5vw, 2.25rem); letter-spacing: .1em; line-height: 1.12;
}
.lib-teaser__body { margin-top: 1.2rem; display: grid; gap: var(--s-1); color: var(--fg-2); font-size: var(--fs-small); }
.lib-teaser__text .btn { margin-top: 1.8rem; }
.lib-teaser__labels { align-self: center; }
@media (max-width: 760px) { .lib-teaser__inner { flex-direction: column; align-items: flex-start; } }

/* ── A Code takes over the page (brief §8) ──────────────────────────────── */
.code-hero { position: relative; overflow: hidden; --theme: var(--electric); }
.code-hero__wash { position: absolute; inset: 0; z-index: -1; }
.code-hero__wash .art { position: absolute; inset: 0; }
.code-hero__wash .art img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.2); transform: scale(1.15); opacity: .5; }
.code-hero__wash::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 78% 30%, color-mix(in srgb, var(--theme) 34%, transparent), transparent 62%),
    linear-gradient(90deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 78%, transparent) 46%, color-mix(in srgb, var(--bg) 40%, transparent) 100%);
}
.code-hero__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38%); gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  padding-top: calc(var(--nav-h) + clamp(2rem, 6vw, 4.5rem)); padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.code-hero__num .mark-num { font-family: var(--font-mark); font-size: clamp(3.4rem, 9vw, 7rem); line-height: 1; }
.code-hero__title {
  margin-top: .4rem; font-family: var(--font-display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(2rem, 5.6vw, 4.4rem); letter-spacing: .12em; line-height: 1;
}
.code-hero__words { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: 1.1rem; font-size: var(--fs-hud); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-2); }
.code-hero__words span { position: relative; }
.code-hero__words span + span::before { content: '/'; position: absolute; left: -.95rem; opacity: .45; }
.code-hero__state { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: 1.3rem; }
.code-hero__summary { margin-top: 1.3rem; max-width: min(100%, 34rem); color: var(--fg-2); }
.code-hero__affirm {
  margin-top: 1.4rem; max-width: min(100%, 34rem); padding-left: 1.2rem; border-left: 2px solid transparent;
  border-image: var(--prism-v) 1; font-size: var(--fs-small); letter-spacing: .14em; line-height: 1.8;
  text-transform: uppercase; color: var(--fg-2);
}
.code-hero__cta { margin-top: 2.2rem; }
.code-hero__art { position: relative; justify-self: center; width: min(100%, 420px); }
/* A Code's plate is a designed card, not a background: show all of it. The
   box takes the picture's own proportions instead of cropping to 9:16 —
   Ana's posters range from 0.56 to 0.81 wide. */
.code-hero__art .art { aspect-ratio: auto; max-height: min(78vh, 760px); display: grid; place-items: center; background: transparent; }
.code-hero__art .art img { width: 100%; height: auto; max-height: min(78vh, 760px); object-fit: contain; }
.code-hero__art::after {
  content: ''; position: absolute; inset: -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--theme) 55%, transparent), transparent 72%);
  filter: blur(22px);
}
.code-hero__frame { position: absolute; inset: -10px; border: 1px solid var(--line); pointer-events: none; }
.code-hero__frame::before, .code-hero__frame::after { content: ''; position: absolute; width: 22px; height: 22px; border: 1px solid var(--line-strong); }
.code-hero__frame::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.code-hero__frame::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

.code-unlock__actions { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-3); align-items: center; }
.cta-note { margin-top: .9rem; display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); }

@media (max-width: 900px) {
  .code-hero__inner { grid-template-columns: 1fr; }
  .code-hero__art { order: -1; width: min(72%, 240px); justify-self: start; }
  .code-hero__wash::after { background: radial-gradient(120% 60% at 70% 10%, color-mix(in srgb, var(--theme) 30%, transparent), transparent 62%), linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent), var(--bg) 62%); }
}

/* The teaching blocks */
.code-read__blocks { display: grid; gap: clamp(2.4rem, 5vw, 4rem); }
.code-block { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(1rem, 3vw, 3rem); align-items: start; }
.code-block + .code-block { border-top: 1px solid var(--line); padding-top: clamp(2.4rem, 5vw, 4rem); }
.code-block__head { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.code-block__num .mark-num { font-family: var(--font-mark); font-size: 1.6rem; color: var(--fg-3); }
.code-block__title { margin-top: .6rem; font-family: var(--font-ui); font-weight: 400; font-size: 1rem; letter-spacing: .28em; text-transform: uppercase; }
.code-block__title::after { content: ''; display: block; width: 46px; height: 2px; margin-top: .9rem; background: var(--prism); }
@media (max-width: 760px) { .code-block { grid-template-columns: 1fr; } .code-block__head { position: static; } }

/* The technical readout */
.code-data { --theme: var(--cyan); }
.readout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); gap: clamp(1.4rem, 4vw, 3.5rem); border: 1px solid var(--line); padding: clamp(1.2rem, 3vw, 2.2rem); background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.readout__rows { display: grid; gap: 0; align-content: start; }
.readout__row { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); gap: var(--s-3); padding: .7rem 0; border-bottom: 1px solid var(--line); }
.readout__row:last-child { border-bottom: 0; }
.readout__row dt { font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); }
.readout__row dd { margin: 0; font-family: var(--font-mark); font-size: 1rem; letter-spacing: .08em; }
.readout__force { display: grid; align-content: start; gap: var(--s-2); padding-left: clamp(0px, 2vw, 2rem); border-left: 1px solid var(--line); }
.readout__force-label { font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); }
.readout__force-num .mark-num { font-family: var(--font-mark); font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; }
.readout__bar { position: relative; display: block; height: 2px; background: var(--line); }
.readout__bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--prism); }
@media (max-width: 760px) { .readout { grid-template-columns: 1fr; } .readout__force { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 1.2rem; } }

/* The closing unlock band */
.code-unlock { --theme: var(--electric); position: relative; }
.code-unlock::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--prism); }
.code-unlock__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-5); }
.code-unlock__eyebrow { font-size: var(--fs-hud); letter-spacing: var(--track-hud); color: var(--fg-3); }
.code-unlock__eyebrow span { margin-right: .7rem; }
.code-unlock__title { margin-top: .7rem; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 3.4vw, 2.6rem); letter-spacing: .12em; text-transform: uppercase; }
.code-unlock__sub { margin-top: .6rem; font-size: var(--fs-micro); letter-spacing: var(--track-hud); color: var(--fg-3); text-transform: uppercase; }

/* The locked gate in front of the experience */
.code-gate { display: grid; align-items: center; min-height: 68vh; }
/* THE BAND CLEARS THE BAR ITSELF. rhythm.css zeroes a band's .wrap padding
   (`.env.section > .wrap`), so the inner's own clearance below never took,
   and the gate — centred in 68vh — stood hard against the bar on an iPhone:
   the number touched it, and a protocol's line above the number went under
   it. Three classes, to outrank rhythm.css's band padding. */
.env.code-gate.section { padding-top: max(var(--pad-section), calc(var(--nav-h) + var(--s-5))); }
.code-gate__inner { padding-top: calc(var(--nav-h) + 2rem); text-align: center; display: grid; justify-items: center; gap: var(--s-3); }
/* The protocol and the step, when a protocol brought them here. */
.code-gate__of { margin: 0; font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.code-gate__num .mark-num { font-family: var(--font-mark); font-size: clamp(3rem, 8vw, 5.5rem); }
.code-gate__title { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.6rem, 4vw, 3rem); letter-spacing: .14em; text-transform: uppercase; }
.code-gate__note { display: flex; gap: var(--s-2); align-items: center; font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); }
.code-gate__cta { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center; justify-content: center; margin-top: 1.6rem; }
.code-gate__cta .cta-note { margin-top: 0; }

/* ── The Code experience (player) ───────────────────────────────────────── */
.page-player { background: var(--black); }
.player {
  --theme: var(--cyan);
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto;
  padding-top: var(--nav-h); position: relative; overflow: hidden;
}
.player::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 60% at 50% 12%, color-mix(in srgb, var(--theme) 26%, transparent), transparent 66%);
}
.player__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 1rem var(--gutter); border-bottom: 1px solid var(--line); }
.player__back { display: inline-flex; align-items: center; gap: var(--s-3); font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-2); }
.player__back:hover { color: var(--fg); }
.player__count { font-family: var(--font-mark); font-size: var(--fs-hud); letter-spacing: .2em; color: var(--fg-3); }

.player__stage { display: grid; align-items: center; justify-items: center; padding: clamp(1.5rem, 5vw, 4rem) var(--gutter); }
.player__steps { width: min(100%, 44rem); }
.player__step { display: grid; justify-items: center; text-align: center; gap: var(--s-3); }
.js .player__step { display: none; }
.js .player__step.is-current { display: grid; animation: stepIn .7s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.js .player__steps > .player__step + .player__step { margin-top: 0; }
.player__step + .player__step { margin-top: clamp(2.5rem, 6vw, 4rem); }
.player__step-num { font-size: var(--fs-micro); letter-spacing: var(--track-hud); color: var(--fg-3); }
.player__step-num .mark-num { font-family: var(--font-mark); font-size: 1.1rem; color: var(--fg-2); }
.player__step-num em { font-style: normal; }
.player__step-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.6rem, 5vw, 3.2rem); letter-spacing: .12em; text-transform: uppercase; line-height: 1.1; }
.player__step-body { display: grid; gap: var(--s-2); max-width: min(100%, 34rem); color: var(--fg-2); font-size: clamp(.95rem, 1.4vw, 1.1rem); line-height: 1.75; }
.player__cue { min-height: 1.4em; font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); }
.player__media { width: min(100%, 32rem); }
.player__media audio { width: 100%; }
.player__media--film video { width: 100%; }
.player__single { width: min(100%, 44rem); display: grid; gap: var(--s-4); justify-items: start; }
.player__prose { max-width: none; }

/* The breath orb */
.player__orb { position: relative; width: min(46vw, 210px); aspect-ratio: 1; display: grid; place-items: center; margin-block: .6rem; }
.player__orb span {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.9), color-mix(in srgb, var(--theme) 70%, transparent) 42%, transparent 72%);
  box-shadow: 0 0 60px -6px color-mix(in srgb, var(--theme) 70%, transparent);
  transform: scale(.55); transition: transform 4s linear;
}
.player__orb::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line); }

.player__controls { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin-top: clamp(1.6rem, 4vw, 2.6rem); padding-bottom: 2.4rem; }
.no-js .player__controls { display: none; }
.player__btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: transparent; color: inherit; border-radius: 50%; transition: background var(--t-fast), color var(--t-fast); }
.player__btn:hover { background: var(--fg); color: var(--bg); }
.player__btn[disabled] { opacity: .3; cursor: default; }
.player__play {
  min-width: 156px; height: 44px; padding: 0 1.6rem; border-radius: 999px; border: 1px solid transparent; color: var(--black);
  background: linear-gradient(var(--white), var(--white)) padding-box, var(--prism) border-box;
  font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase;
}
.player__timer { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font-family: var(--font-mark); font-size: var(--fs-hud); letter-spacing: .2em; color: var(--fg-3); }

.player__foot { border-top: 1px solid var(--line); }
.player__foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 1.1rem var(--gutter); }
.player__complete .btn { min-width: 220px; }
.player__next { display: grid; gap: var(--s-1); justify-items: end; text-align: right; padding-right: 2rem; position: relative; }
.player__next .i-arrow { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.player__next-label { font-size: var(--fs-micro); letter-spacing: var(--track-hud); color: var(--fg-3); }
.player__next-name { font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 560px) {
  .player__foot-inner { flex-direction: column; align-items: stretch; }
  .player__complete .btn { width: 100%; justify-content: center; }
  .player__next { justify-items: start; text-align: left; padding-right: 0; padding-left: 0; }
  .player__next .i-arrow { position: static; transform: none; }
}

/* ── Course page ────────────────────────────────────────────────────────── */
.course-hero { position: relative; overflow: hidden; min-height: min(82vh, 760px); display: grid; align-items: end; }
.course-hero__media { position: absolute; inset: 0; z-index: -1; }
.course-hero__media .art { position: absolute; inset: 0; }
.course-hero__media .art img, .course-hero__film { width: 100%; height: 100%; object-fit: cover; }
.course-hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(4,5,7,.8) 0%, rgba(4,5,7,.35) 55%, transparent 88%),
    linear-gradient(180deg, rgba(4,5,7,.8) 0%, rgba(4,5,7,.5) 32%, rgba(4,5,7,.95) 86%);
}
/* .wrap centres itself; the hero column stays left-aligned inside it. */
.course-hero__inner { padding-top: calc(var(--nav-h) + clamp(4rem, 14vw, 10rem)); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.course-hero__inner > * { max-width: min(100%, 52rem); }
.course-hero__kicker { font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); }
.course-hero__title { margin-top: 1rem; font-family: var(--font-display); font-weight: 300; font-size: clamp(2.1rem, 6.4vw, 5rem); letter-spacing: .1em; line-height: 1; text-transform: uppercase; }
.course-hero__sub { margin-top: 1rem; font-size: var(--fs-hud); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-2); }
.course-hero__thesis { margin-top: 1.3rem; max-width: min(100%, 36rem); font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--fg-2); }
.course-hero__state { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: 1.4rem; }
.course-hero__meta { margin-top: 1rem; font-size: var(--fs-micro); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-3); }
.course-hero__progress { display: flex; align-items: center; gap: var(--s-3); margin-top: 1.1rem; }
.course-hero__progress em { font-style: normal; font-size: var(--fs-micro); letter-spacing: var(--track-hud); color: var(--fg-2); }
.meter--inline { position: relative; display: block; width: min(240px, 46vw); height: 2px; }
.course-hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-3); align-items: center; margin-top: 2rem; }

.course-body__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.course-body__main .prose { max-width: min(100%, 42rem); }
.course-body__side { display: grid; gap: var(--s-4); position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.course-panel { border: 1px solid var(--line); padding: 1.2rem; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.course-panel__title { font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); }
.course-panel__title span { margin-right: .6rem; }
.course-panel__list { margin-top: .9rem; display: grid; gap: var(--s-2); font-size: var(--fs-small); color: var(--fg-2); }
.course-panel__list li { display: flex; gap: var(--s-2); align-items: baseline; }
.course-panel__list li::before { content: ''; flex: none; width: 5px; height: 5px; background: var(--electric); transform: rotate(45deg) translateY(-1px); }
.teacher { display: flex; gap: var(--s-3); margin-top: 1rem; }
.teacher__portrait { flex: none; width: 84px; height: 84px; overflow: hidden; border-radius: 50%; }
.teacher__portrait img { width: 100%; height: 100%; object-fit: cover; }
.teacher__name { font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; }
.teacher__role { font-size: var(--fs-micro); letter-spacing: var(--track-hud); color: var(--fg-3); text-transform: uppercase; }
.teacher__bio { margin-top: .6rem; font-size: var(--fs-small); color: var(--fg-2); }
.teacher .bracket-link { margin-top: .8rem; }
@media (max-width: 860px) { .course-body__grid { grid-template-columns: 1fr; } .course-body__side { position: static; } }

/* The curriculum */
.outline { display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); padding: 0; list-style: none; }
.outline__module { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.outline__module-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3) var(--s-4); align-items: baseline; }
.outline__module-num .mark-num { font-family: var(--font-mark); font-size: 1.5rem; color: var(--fg-3); }
.outline__module-title { font-family: var(--font-ui); font-weight: 400; font-size: 1rem; letter-spacing: .22em; text-transform: uppercase; }
.outline__module-sum { margin-top: .5rem; font-size: var(--fs-small); color: var(--fg-2); max-width: min(100%, 40rem); }
.outline__module-count { font-size: var(--fs-micro); letter-spacing: var(--track-hud); color: var(--fg-3); white-space: nowrap; }
.outline__lessons { margin-top: 1rem; padding: 0; list-style: none; display: grid; }
.outline__lesson a, .outline__lesson-inner {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto 1.6rem; gap: var(--s-3); align-items: center;
  padding: .85rem 0; border-top: 1px solid var(--line);
}
.outline__lesson a:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.outline__lesson-num { font-family: var(--font-mark); font-size: .9rem; color: var(--fg-3); }
.outline__lesson-text { display: grid; min-width: 0; gap: var(--s-1); }
.outline__lesson-title { font-size: .95rem; letter-spacing: .08em; }
.outline__lesson-sum { font-size: var(--fs-small); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.outline__lesson-meta { font-size: var(--fs-micro); letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.outline__lesson:not(.is-open) .outline__lesson-title { color: var(--fg-2); }
.outline__lock, .outline__tick { display: grid; place-items: center; color: var(--fg-3); }
.outline__tick { color: var(--cyan); }
@media (max-width: 700px) {
  .outline__module-head { grid-template-columns: auto minmax(0, 1fr); }
  .outline__module-count { grid-column: 2; }
  .outline__lesson a, .outline__lesson-inner { grid-template-columns: 2rem minmax(0, 1fr) 1.4rem; }
  .outline__lesson-meta { display: none; }
}

.course-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); margin-top: clamp(2rem, 5vw, 3.5rem); padding-top: clamp(1.6rem, 4vw, 2.5rem); border-top: 1px solid var(--line); }
.course-cta__eyebrow { font-size: var(--fs-hud); letter-spacing: var(--track-hud); color: var(--fg-3); }
.course-cta__eyebrow span { margin-right: .7rem; }
.course-cta__title { margin-top: .6rem; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.4rem, 3vw, 2.2rem); letter-spacing: .12em; text-transform: uppercase; }
.course-cta__side { display: flex; flex-wrap: wrap; gap: var(--s-3); }

@media (prefers-reduced-motion: reduce) {
  .js .player__step.is-current { animation: none; }
  .player__orb span { transition: none; }
}

/* A draft tag next to a state badge belongs in the line, not in the page's
   corner (the shared .draft-tag is absolute by default). */
.code-hero__state .draft-tag, .course-hero__state .draft-tag, .lib-hero__text .draft-tag {
  position: static; display: inline-block; vertical-align: middle;
}

/* CARD DATA sits beside Ana's collector card — the card is the artefact the
   readout describes, so they belong on one row. */
.code-data__inner { display: grid; grid-template-columns: 1fr minmax(240px, 34%); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.code-data__card { margin: 0; display: grid; gap: var(--s-3); justify-items: center; }
.code-data__card img { width: 100%; height: auto; border-radius: var(--r-2); box-shadow: 0 40px 90px -40px rgba(0,0,0,.9); }
.code-data__card figcaption { font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3); text-align: center; }
@media (max-width: 820px) { .code-data__inner { grid-template-columns: 1fr; } .code-data__card { max-width: 340px; } }

/* ── A Code is a protocol: how long it runs, what it does, what comes with
      it, and what it covers. (Domain 01 content, Sep 2026.) ────────────── */
.code-hero__meta {
  margin-top: .9rem;
  font-size: var(--fs-hud); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3);
}
.code-hero__purpose { margin-top: 1.1rem; max-width: 34rem; color: var(--fg-2); line-height: 1.6; }
.code-hero__purpose em {
  font-style: normal; display: block; margin-bottom: .3em;
  font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-3);
}
.code-hero__includes { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.code-hero__includes li {
  border: 1px solid var(--line); padding: .32em .7em;
  font-size: var(--fs-micro); letter-spacing: var(--track-hud); text-transform: uppercase; color: var(--fg-2);
}

.code-covers { border-top: 1px solid var(--line); }
.code-covers__list {
  list-style: none; padding: 0;
  margin-top: clamp(1.2rem, 2.5vw, 1.8rem);
  display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  border-top: 1px solid var(--line);
}
.code-covers__list li {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: var(--s-3); align-items: baseline;
  padding: .8rem .2rem; border-bottom: 1px solid var(--line);
  color: var(--fg-2); font-size: var(--fs-small); line-height: 1.5;
}
.code-covers__list .mark-num { color: var(--fg-3); font-size: .95rem; }
