/* 248 Anthems — Spyglass Hill · "Dunes, Then Trees"
 * Brand System v2: bone page, graphite ink, Barlow Condensed display,
 * Inter text, IBM Plex Mono data. Lime = the one system signal.
 *
 * TWO support colors, strictly one per movement — dune (holes 1–5, the
 * seaside opening) and forest (holes 6–18, Del Monte Forest). They must never
 * appear inside the same band: that separation IS the concept. Orange is
 * reserved for exactly one moment on the page — the seam itself.
 */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Inter Var';
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bone: #F4F3F0;          /* cooler than the Georgia sites — coastal light */
  --bone-hi: #FAF9F7;
  --graphite: #1E1E1E;
  --charcoal: #0D0D0D;
  --ash: #D6D4CF;
  --ink: #1F2020;
  --ink-dim: #57595A;
  --lime: #CCFF00;
  --orange: #FF6A00;
  --orange-deep: #B84800;

  /* the two movements */
  --dune: #B6A88C;          /* wind-blown sand under coastal grey */
  --dune-deep: #85775C;
  --forest: #2F4A39;        /* Monterey / Del Monte pine */
  --forest-deep: #1E3325;

  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-text: 'Inter Var', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Plex Mono', ui-monospace, 'SF Mono', monospace;

  --maxw: 1440px;
  --gutter: clamp(1rem, 5vw, 4.5rem);
  --hairline: color-mix(in srgb, var(--graphite) 14%, transparent);
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  font-family: var(--font-text);
  font-variation-settings: 'wght' 420;
  background: var(--bone);
  color: var(--ink);
  font-size: clamp(0.98rem, 0.93rem + 0.25vw, 1.08rem);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .1em; }
::selection { background: var(--lime); color: var(--graphite); }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.anthems :focus-visible, .footer :focus-visible { outline-color: var(--lime); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1; text-transform: uppercase; letter-spacing: .005em; }
em { font-style: normal; border-bottom: 2px solid var(--lime); }
.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--lime); color: var(--graphite);
  padding: .8rem 1.2rem; font-family: var(--font-mono); text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  padding: .75rem var(--gutter);
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: border-color .6s ease;
}
body.is-playing .masthead { border-bottom-color: color-mix(in srgb, var(--forest) 55%, transparent); }
.masthead-mark { display: inline-flex; align-items: baseline; gap: .45rem; text-decoration: none; font-family: var(--font-display); }
.mark-num { background: var(--graphite); color: var(--bone); font-weight: 700; font-size: 1.05rem; padding: .1em .3em .12em; letter-spacing: .02em; }
.mark-word { font-weight: 600; letter-spacing: .3em; font-size: .82rem; }
.masthead-nav { display: flex; gap: clamp(.9rem, 2.4vw, 2rem); }
.masthead-nav a {
  text-decoration: none; font-size: .84rem; font-variation-settings: 'wght' 560;
  color: var(--ink-dim); padding-bottom: .15em;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.masthead-nav a:hover, .masthead-nav a[aria-current] { color: var(--ink); border-color: var(--lime); }
.masthead-meta { font-size: .62rem; color: var(--ink-dim); display: inline-flex; align-items: center; gap: .55em; }
.key-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ash); transition: background .6s ease; }
body.is-playing .key-dot { background: var(--lime); animation: dot-beat 1.071s ease-in-out infinite; }
@keyframes dot-beat { 0%, 100% { transform: scale(1); } 28% { transform: scale(1.45); } }
@media (max-width: 900px) { .masthead-meta { display: none; } }

/* ---------- ratio stripe (24 + 8 = 32 units) ---------- */
.stripe { display: flex; gap: 3px; height: 24px; }
.stripe span { flex: 1; background: color-mix(in srgb, var(--graphite) 14%, transparent); transition: background .3s ease; }
.stripe span.u-down { background: color-mix(in srgb, var(--lime) 38%, var(--bone)); }
.stripe span.lit { background: var(--graphite); }
.stripe span.u-down.lit { background: var(--lime); }
.stripe-dark span { background: color-mix(in srgb, var(--bone) 13%, transparent); }
.stripe-dark span.u-down { background: color-mix(in srgb, var(--lime) 22%, transparent); }
.stripe-dark span.lit { background: var(--bone); }
.stripe-dark span.u-down.lit { background: var(--lime); }
.stripe-caption { display: flex; justify-content: space-between; gap: 1rem; font-size: .6rem; color: var(--ink-dim); margin-top: .55rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(5rem, 10vh, 7.5rem) var(--gutter) clamp(3rem, 6vh, 5rem); max-width: var(--maxw); margin: 0 auto; }
.crumb { font-size: .64rem; color: var(--ink-dim); margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); border-bottom: 1px solid var(--lime); }
.crumb [aria-current] { color: var(--ink); }
.hero-kicker { font-size: .72rem; color: var(--ink-dim); display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.hero-kicker::before { content: ''; width: 44px; height: 2px; background: var(--graphite); flex: none; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(4.2rem, 14vw, 11rem);
  line-height: .88; letter-spacing: .002em;
  color: var(--charcoal);
}
.hero-sub {
  margin-top: 1.8rem; max-width: 60ch;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.6;
  color: #3B3D3D;
}

/* the two-worlds bar: 5 dune units, a seam, 13 forest units */
.worlds {
  margin-top: clamp(2.4rem, 5.5vh, 3.6rem);
  display: grid; grid-template-columns: 5fr auto 13fr; gap: 0;
  border: 1px solid var(--ash);
}
.world { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .2rem; }
.world-dune { background: color-mix(in srgb, var(--dune) 16%, var(--bone)); }
.world-forest { background: color-mix(in srgb, var(--forest) 10%, var(--bone)); }
.world-seam {
  width: 3px; background: var(--orange);
  position: relative;
}
.world-seam::after {
  content: 'THE TURN'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(90deg); transform-origin: center;
  font-family: var(--font-mono); font-weight: 500; font-size: .55rem; letter-spacing: .22em;
  color: var(--orange-deep); background: var(--bone); padding: .25em .5em; white-space: nowrap;
}
.world-no { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .14em; color: var(--ink-dim); }
.world-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 2.1rem); text-transform: uppercase; line-height: 1.02; color: var(--charcoal); margin-top: .35rem; }
.world-dune .world-name { color: var(--dune-deep); }
.world-forest .world-name { color: var(--forest-deep); }
.world-note { font-size: .88rem; color: #3B3D3D; margin-top: .5rem; max-width: 46ch; }
.hero .stripe { margin-top: clamp(2.4rem, 5.5vh, 3.6rem); }

/* ---------- section scaffolding ---------- */
.anthems, .system, .uses, .turn, .manage, .related { padding-block: clamp(4rem, 9vh, 7.5rem); }
.sec-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: clamp(1.8rem, 4vh, 2.8rem); }
.sec-no { font-size: .78rem; color: var(--ink-dim); }
.sec-rule { flex: 1; height: 1px; background: var(--hairline); }
.sec-kicker { font-size: .66rem; color: var(--ink-dim); }
.sec-intro h2 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); color: var(--charcoal); max-width: 18ch; }
.sec-sub { margin-top: 1.1rem; max-width: 68ch; color: #3B3D3D; }

/* ---------- 01 · anthems (dark player panel) ---------- */
.anthems { background: var(--charcoal); color: var(--bone); }
.anthems .sec-no, .anthems .sec-kicker { color: color-mix(in srgb, var(--bone) 55%, transparent); }
.anthems .sec-rule { background: color-mix(in srgb, var(--bone) 16%, transparent); }
.anthems .sec-intro h2 { color: var(--bone); }
.anthems .sec-sub { color: color-mix(in srgb, var(--bone) 72%, transparent); }

/* the honest pending note — this is the first site in the series to ship one */
.pending {
  margin-top: clamp(1.6rem, 4vh, 2.4rem);
  border-left: 3px solid var(--orange);
  background: color-mix(in srgb, var(--bone) 6%, transparent);
  padding: 1.2rem clamp(1.1rem, 2.6vw, 1.8rem);
  max-width: 78ch;
}
.pending-kicker { display: block; font-size: .6rem; color: var(--orange); margin-bottom: .55rem; }
.pending p { font-size: .95rem; color: color-mix(in srgb, var(--bone) 82%, transparent); }
.pending p + p { margin-top: .6rem; }

.player-shell {
  position: relative; margin-top: clamp(1.6rem, 4vh, 2.4rem);
  background: var(--graphite);
  border: 1px solid color-mix(in srgb, var(--bone) 13%, transparent);
  border-top: 3px solid color-mix(in srgb, var(--bone) 13%, transparent);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  transition: border-top-color .6s ease;
}
body.is-playing .player-shell { border-top-color: var(--lime); }
#spectrum { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .5; }
#player { position: relative; }
.anthems .ap {
  --ap-accent: var(--lime);
  --ap-accent-fg: var(--charcoal);
  --ap-font: var(--font-text);
  --ap-radius: 0; --ap-row-radius: 0;
}
.anthems .ap-title { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: .01em; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.anthems .ap-kicker, .anthems .ap-panel-title, .anthems .ap-time, .anthems .ap-row-num,
.anthems .ap-badge, .anthems .ap-lib-course, .anthems .ap-sub, .anthems .ap-status { font-family: var(--font-mono); }
.anthems .ap-sub, .anthems .ap-status { font-size: .72rem; letter-spacing: .06em; }
.rs-progress-wrap { position: relative; margin-top: 1.5rem; }
.rs-progress-wrap .stripe { height: 18px; }
.rs-progress-wrap .stripe-caption { color: color-mix(in srgb, var(--bone) 45%, transparent); }
.stage-note { margin-top: 1.1rem; font-size: .6rem; color: color-mix(in srgb, var(--bone) 42%, transparent); text-align: center; }

/* ---------- 02 · system ---------- */
.system-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.6rem, 4vw, 3.2rem); margin-top: clamp(1.8rem, 4vh, 2.6rem); align-items: start; }
.frames-ribbon { border: 1px solid var(--hairline); padding: 1.1rem; }
.frames { display: flex; gap: 3px; height: 30px; }
.frames.down { margin-top: 3px; }
.frames span { flex: 1; background: var(--graphite); opacity: .09; transition: opacity .18s ease; }
.frames.down span { background: var(--lime); opacity: .22; }
.frames span.lit { opacity: .92; }
.frames.down span.lit { opacity: 1; }
.frames-caption { display: flex; justify-content: space-between; font-size: .58rem; color: var(--ink-dim); margin-top: .6rem; }
.pulse-block {
  margin-top: 1px; background: var(--graphite); color: var(--bone);
  padding: clamp(1.2rem, 2.5vw, 2rem);
  display: grid; justify-items: center; gap: .6rem;
}
.pulse-ring { width: min(210px, 58vw); height: auto; }
.pulse-ring .pr-outer { stroke: color-mix(in srgb, var(--bone) 30%, transparent); stroke-width: 1; }
.pulse-ring .pr-inner { stroke: var(--lime); stroke-width: 1.6; }
.pulse-ring .pr-num { font-family: var(--font-display); font-weight: 600; font-size: 34px; fill: var(--bone); }
.pulse-ring .pr-unit { font-family: var(--font-mono); font-size: 10px; letter-spacing: .35em; fill: color-mix(in srgb, var(--bone) 55%, transparent); }
#pulse-ticks line { stroke: color-mix(in srgb, var(--bone) 38%, transparent); stroke-width: 1; }
#pulse-ticks line.q { stroke: var(--lime); stroke-width: 1.6; }
.pulse-core { transform-origin: 100px 100px; }
body:not(.is-playing) .pulse-core { animation: breathe 1.071s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.05); } }
.pulse-caption { font-size: .56rem; color: color-mix(in srgb, var(--bone) 48%, transparent); text-align: center; }
.method-cards { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.method-card { background: var(--bone-hi); padding: clamp(1.3rem, 2.6vw, 2rem); }
.method-card h3 { font-size: 1.5rem; display: flex; gap: .8rem; align-items: baseline; margin-bottom: .7rem; }
.card-no { font-size: .62rem; color: var(--ink-dim); }
.method-card p { color: #3B3D3D; font-size: .96rem; max-width: 62ch; }
.footnote { margin-top: 1rem; padding-top: .7rem; border-top: 1px dashed var(--hairline); font-size: .62rem !important; letter-spacing: .04em; line-height: 1.7; color: var(--ink-dim) !important; font-weight: 400; }

/* ---------- 03 · uses ---------- */
.uses { padding-top: 0; }
.uses-grid {
  list-style: none; padding: 0; margin: clamp(1.6rem, 4vh, 2.4rem) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
}
.use { background: var(--bone); padding: clamp(1.2rem, 2.4vw, 1.8rem); }
.use-no { display: block; font-size: .6rem; color: var(--ink-dim); margin-bottom: 1.6rem; }
.use h3 { font-size: 1.45rem; margin-bottom: .45rem; }
.use p { font-size: .92rem; color: #3B3D3D; max-width: 40ch; }

/* ═════════════ 04 · THE TURN — the signature ═════════════ */
.turn { border-top: 1px solid var(--hairline); }
.turn-frame {
  margin-top: clamp(1.8rem, 4vh, 2.6rem);
  border: 1px solid var(--ash); background: var(--bone-hi);
  padding: clamp(.8rem, 2vw, 1.6rem) clamp(.6rem, 1.6vw, 1.2rem) clamp(1rem, 2vw, 1.4rem);
}
#turn-svg { display: block; width: 100%; height: auto; }

/* dune grammar — holes 1–5 only */
.tn-dune-contour { fill: none; stroke: var(--dune-deep); stroke-width: 1.1; opacity: .5; }
.tn-dune-fill { fill: color-mix(in srgb, var(--dune) 34%, transparent); stroke: none; }
.tn-ocean line { stroke: var(--dune-deep); stroke-width: 1.2; opacity: .34; stroke-linecap: round; }
.tn-bar-dune { fill: color-mix(in srgb, var(--dune) 62%, var(--bone)); stroke: var(--dune-deep); stroke-width: 1; }

/* forest grammar — holes 6–18 only */
.tn-corridor { stroke: var(--forest); stroke-width: 1.1; opacity: .42; stroke-linecap: round; }
.tn-pine { stroke: var(--forest); stroke-width: 1.2; opacity: .55; stroke-linecap: round; }
.tn-bar-forest { fill: color-mix(in srgb, var(--forest) 46%, var(--bone)); stroke: var(--forest-deep); stroke-width: 1; }

/* the seam — the only place the two grammars touch, and the page's one orange */
.tn-seam { stroke: var(--orange); stroke-width: 2.4; }
.tn-seam-label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .18em; fill: var(--orange-deep); }

/* the constant */
.tn-tempo { stroke: var(--lime); stroke-width: 3; stroke-linecap: round; }
.tn-tempo-shadow { stroke: var(--graphite); stroke-width: 5; stroke-linecap: round; opacity: .9; }
.tn-tempo-label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .14em; fill: var(--graphite); }

.tn-axis { stroke: var(--graphite); stroke-width: 1; opacity: .35; }
.tn-num { font-family: var(--font-mono); font-weight: 500; font-size: 11px; fill: var(--ink-dim); }
.tn-name { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .02em; fill: var(--graphite); }
.tn-par { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; fill: var(--ink-dim); }
.tn-yds { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .06em; fill: var(--ink-dim); }
.tn-caption { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .14em; fill: var(--ink-dim); }

/* bars grow on reveal; the tempo line draws across */
.tn-bar { transform-origin: center bottom; transform: scaleY(0); }
.turn-frame.in .tn-bar { transform: scaleY(1); transition: transform 1.05s cubic-bezier(.22, .8, .28, 1); }
.tn-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.turn-frame.in .tn-draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.4, 0, .2, 1) .35s; }
/* on beat the tempo line pulses along its length — it never changes height */
body.is-playing .turn-frame.in .tn-tempo { animation: tempo-run 2.143s linear infinite; stroke-dasharray: 10 26; }
@keyframes tempo-run { to { stroke-dashoffset: -72; } }

.turn-legend { display: flex; flex-wrap: wrap; gap: 1.4rem 2.2rem; margin-top: 1.2rem; font-size: .6rem; color: var(--ink-dim); }
.turn-legend span { display: inline-flex; align-items: center; gap: .5em; }
.turn-legend i { width: 16px; height: 10px; display: inline-block; }
.lg-dune { background: color-mix(in srgb, var(--dune) 62%, var(--bone)); border: 1px solid var(--dune-deep); }
.lg-forest { background: color-mix(in srgb, var(--forest) 46%, var(--bone)); border: 1px solid var(--forest-deep); }
.lg-tempo { background: var(--lime); border: 1px solid var(--graphite); height: 5px !important; }
.lg-seam { background: var(--orange); width: 4px !important; }

/* the record */
.record { margin-top: clamp(2.6rem, 6vh, 4rem); display: grid; grid-template-columns: 7fr 5fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: start; }
.rec-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); display: flex; gap: .9rem; align-items: baseline; margin-bottom: 1.4rem; }
.rec-no { font-size: .64rem; color: var(--ink-dim); }
.rec-grid { border-top: 1px solid var(--hairline); }
.rec-row { display: grid; grid-template-columns: minmax(170px, 250px) 1fr; gap: .8rem 2rem; padding: .8rem 0; border-bottom: 1px solid var(--hairline); }
.rec-row dt { font-size: .62rem; color: var(--ink-dim); padding-top: .3em; }
.rec-row dd { margin: 0; font-size: .95rem; }
.rec-side { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); align-self: start; }
.rec-note { background: var(--bone-hi); padding: 1.2rem 1.3rem 1.4rem; }
.rec-note h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; text-transform: uppercase; color: var(--charcoal); margin-bottom: .5rem; }
.rec-note p { font-size: .88rem; color: #3B3D3D; }
.rec-note .mono { display: block; font-size: .58rem; color: var(--ink-dim); margin-bottom: .5rem; }

/* the caveat block — where sources disagree, we say so */
.caveat { margin-top: 1.6rem; border-left: 3px solid var(--ash); padding: .1rem 0 .1rem 1.1rem; }
.caveat p { font-size: .82rem; color: var(--ink-dim); max-width: 74ch; }

/* ---------- 05 · course management teaser ---------- */
.manage { padding-top: 0; }
.manage-card {
  margin-top: clamp(1.6rem, 4vh, 2.4rem);
  display: grid; grid-template-columns: 1fr auto; gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  background: var(--graphite); color: var(--bone);
  padding: clamp(1.8rem, 4vw, 3rem);
  border-top: 3px solid var(--lime);
}
.manage-card h3 { font-size: clamp(2rem, 4.4vw, 3.2rem); color: var(--bone); max-width: 16ch; }
.manage-card p { margin-top: .9rem; max-width: 56ch; color: color-mix(in srgb, var(--bone) 74%, transparent); font-size: .98rem; }
.manage-link {
  display: inline-flex; align-items: center; gap: .8rem; white-space: nowrap;
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; font-size: .72rem; text-transform: uppercase;
  color: var(--charcoal); background: var(--lime);
  padding: 1rem 1.6rem; text-decoration: none;
  transition: transform .22s ease;
}
.manage-link:hover { transform: translateX(5px); }
.manage-meta { margin-top: 1.4rem; font-size: .58rem; color: color-mix(in srgb, var(--bone) 45%, transparent); }

/* ---------- 06 · related ---------- */
.related { border-top: 1px solid var(--hairline); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin-top: clamp(1.6rem, 4vh, 2.4rem); }
.rel-card {
  position: relative; background: var(--bone); text-decoration: none;
  padding: clamp(1.4rem, 2.8vw, 2.2rem); min-height: 190px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem;
  transition: background .25s ease;
}
.rel-card:hover { background: var(--bone-hi); }
.rel-no { position: absolute; top: 1.2rem; left: 1.4rem; font-size: .6rem; color: var(--ink-dim); }
.rel-card h3 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); color: var(--charcoal); }
.rel-card p { font-size: .62rem; color: var(--ink-dim); }
.rel-arrow { position: absolute; top: 1.05rem; right: 1.4rem; font-size: 1.1rem; color: var(--ink-dim); transition: transform .25s ease, color .25s ease; }
.rel-card:hover .rel-arrow { transform: translateX(5px); color: var(--ink); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding-block: clamp(2.4rem, 5vh, 3.6rem); }
.footer .stripe { margin-bottom: 2.2rem; height: 16px; }
.footer-cols { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-end; }
.footer-line { margin-top: 1rem; font-variation-settings: 'wght' 560; }
.footer-sub { font-size: .6rem; color: var(--ink-dim); margin-top: .4rem; }
.footer-links { display: grid; gap: .8rem; font-size: .64rem; justify-items: end; }
.footer-links a { text-decoration: none; color: var(--ink-dim); border-bottom: 1px solid var(--hairline); padding-bottom: .15em; }
.footer-links a:hover { color: var(--ink); border-color: var(--lime); }
@media (max-width: 700px) { .footer-links { justify-items: start; } }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .system-grid { grid-template-columns: 1fr; }
  .record { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .uses-grid { grid-template-columns: 1fr 1fr; }
  .manage-card { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 820px) {
  .worlds { grid-template-columns: 1fr; }
  .world-seam { width: auto; height: 3px; }
  .world-seam::after { transform: translate(-50%, -50%); }
}
@media (max-width: 760px) {
  .related-grid { grid-template-columns: 1fr; }
  .rel-card { min-height: 0; padding-top: 2.6rem; }
  .rec-row { grid-template-columns: 1fr; gap: .2rem; }
}
@media (max-width: 700px) {
  /* the strip stays legible: it pans inside its frame rather than shrinking */
  .turn-frame { overflow-x: auto; }
  #turn-svg { min-width: 860px; }
}
@media (max-width: 600px) {
  .uses-grid { grid-template-columns: 1fr; }
  .masthead-nav a { font-size: .78rem; }
}
@media (max-width: 400px) { .mark-word { display: none; } }

/* ---------- reduced motion: fully composed, static, annotated ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tn-bar { transform: scaleY(1); transition: none; }
  .tn-draw { stroke-dashoffset: 0; transition: none; }
  body.is-playing .turn-frame.in .tn-tempo { animation: none; stroke-dasharray: none; }
  body:not(.is-playing) .pulse-core { animation: none; }
  body.is-playing .key-dot { animation: none; }
  .masthead, .sec-rule, .player-shell, .key-dot, .rel-card, .rel-arrow,
  .manage-link, .stripe span, .reveal { transition: none; }
}
