/* 248 Anthems — Royal Palm · "The Colonnade"
 * Brand System v2: bone page warmed to Boca daylight, graphite ink,
 * Barlow Condensed display, Inter text, IBM Plex Mono data.
 * Signal Lime is the system signal. ONE support colour: polished brass —
 * rules and numerals only. One whisper of coral, used exactly once (the
 * fine-print block where two third-party claims get corrected).
 * The page's own texture is a measured interval: faint vertical hairlines
 * at a fixed pitch, the colonnade abstracted into a grid. */

/* ---------- 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: #F9F5EC;
  --bone-hi: #FDFAF3;
  --graphite: #1E1E1E;
  --charcoal: #0D0D0D;
  --ash: #DFD8C8;
  --ink: #23211B;
  --ink-dim: #625C4D;
  --lime: #CCFF00;
  --brass: #A8813C;          /* rules, strokes, non-text marks */
  --brass-deep: #7C5C22;     /* anything set as type (AA on bone) */
  --coral: #D8543A;          /* one block, one time */
  --coral-deep: #B33A22;

  --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) 15%, transparent);
  --col: clamp(42px, 4.1667vw, 60px);   /* the planting interval, 1440/24 */
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
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; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--lime); color: var(--graphite); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--graphite); outline-offset: 3px; }
.anthems :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); }
strong { font-variation-settings: 'wght' 660; }
.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; }

/* ---------- the measure: the colonnade as a page grid ---------- */
.measure {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--graphite) 5%, transparent) 0 1px,
    transparent 1px var(--col));
}
body > *:not(.measure) { position: relative; z-index: 1; }

/* ---------- 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(--brass) 62%, 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 { color: var(--ink); border-color: var(--lime); }
.masthead-meta { font-size: .62rem; color: var(--ink-dim); display: inline-flex; align-items: center; gap: .55em; white-space: nowrap; }
.beat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ash); transition: background .5s ease, transform .12s ease; }
body.is-playing .beat-dot { background: var(--lime); box-shadow: 0 0 0 1px var(--graphite); }
.beat-dot.hit { transform: scale(1.55); }
@media (max-width: 880px) { .masthead-meta { display: none; } }

/* ---------- ratio stripe (24 + 8 = 32 units) ---------- */
.stripe { display: flex; gap: 3px; height: 22px; }
.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) 40%, 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: .7rem; color: var(--ink-dim); display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.hero-kicker::before { content: ''; width: 44px; height: 2px; background: var(--brass); flex: none; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(4rem, 15.5vw, 12.5rem);
  line-height: .84; letter-spacing: -.004em;
  color: var(--charcoal);
}
.hero h1 span { display: block; }
.hero h1 span + span { margin-left: .055em; }
.hero-sub {
  margin-top: 1.9rem; max-width: 60ch;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.6;
  color: #423D33;
}

/* ---------- the palm glyph (shared by all three registers) ---------- */
.pl-trunk { stroke: var(--graphite); fill: none; opacity: .8; stroke-linecap: round; }
.pl-shaft { opacity: .95; }
.pl-ring { stroke: var(--graphite); opacity: .3; fill: none; }
.pl-frond { stroke: var(--graphite); fill: none; opacity: .62; stroke-linecap: round; }
.pl-glow, .pl-pool { fill: var(--lime); opacity: 0; }

/* the palisade — 32 columns in elevation: the ratio stripe standing up */
.palisade { margin-top: clamp(2.4rem, 6vh, 4rem); }
/* the rank keeps its natural proportion on wide screens and is drawn taller
   as the viewport narrows, so 32 columns never collapse into a hairline comb */
.palisade svg { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 250; }
.ground-line { stroke: var(--brass); stroke-width: 1; opacity: .55; }
.palisade .pl-trunk, .palisade .pl-ring, .palisade .pl-frond { vector-effect: non-scaling-stroke; }
.palisade .pl-glow { display: none; }
.pl-bar { fill: color-mix(in srgb, var(--graphite) 10%, transparent); transition: fill .2s ease; }
.palm-8 .pl-bar { fill: color-mix(in srgb, var(--lime) 42%, var(--bone)); }
.palm.on .pl-bar { fill: color-mix(in srgb, var(--graphite) 82%, transparent); }
.palm-8.on .pl-bar { fill: var(--lime); }
/* when a structure column lights, its palm draws in reverse out of the dark */
.palisade .palm.on .pl-trunk, .palisade .palm.on .pl-ring { stroke: var(--bone-hi); opacity: .9; }
.palisade .palm-8.on .pl-trunk, .palisade .palm-8.on .pl-ring { stroke: var(--graphite); opacity: .85; }
.pl-datum { stroke: var(--brass); stroke-width: 1.4; fill: none; opacity: .85; vector-effect: non-scaling-stroke; }
.palisade-caption {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .6rem; color: var(--ink-dim); margin-top: .8rem;
  border-top: 1px solid var(--hairline); padding-top: .6rem;
}
.pc-mid { color: var(--brass-deep); }
@media (max-width: 720px) { .pc-mid { display: none; } }

.hero-data {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
}
.hero-data > div { background: var(--bone); padding: 1rem 1.1rem 1.1rem; }
.hero-data dt { font-size: .58rem; color: var(--ink-dim); margin-bottom: .5rem; }
.hero-data dd {
  margin: 0; font-family: var(--font-display); text-transform: uppercase;
  font-weight: 600; font-size: clamp(1.1rem, 1.9vw, 1.55rem); line-height: 1;
  color: var(--brass-deep);
}

/* ---------- section scaffolding ---------- */
/* Scoped by class on purpose — a bare `section` rule leaks into the player's
   internal <section> panels and the guide's sections. */
.anthems, .system, .uses, .colonnade, .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(--brass-deep); }
.sec-rule { flex: 1; height: 1px; background: var(--hairline); transition: background .6s ease; }
body.is-playing .sec-rule { background: color-mix(in srgb, var(--brass) 55%, transparent); }
.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: #423D33; }
.sub-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); display: flex; gap: .9rem; align-items: baseline; color: var(--charcoal); }
.sub-no { font-size: .66rem; color: var(--brass-deep); }

/* ---------- 01 · anthems (dark panel) ---------- */
.anthems { background: var(--charcoal); color: var(--bone); }
.anthems .sec-no { color: color-mix(in srgb, var(--brass) 78%, var(--bone)); }
.anthems .sec-kicker { color: color-mix(in srgb, var(--bone) 58%, transparent); }
.anthems .sec-rule { background: color-mix(in srgb, var(--bone) 16%, transparent); }
body.is-playing .anthems .sec-rule { background: color-mix(in srgb, var(--brass) 70%, transparent); }
.anthems .sec-intro h2 { color: var(--bone); }
.anthems .sec-sub { color: color-mix(in srgb, var(--bone) 74%, transparent); }
.player-shell {
  position: relative; margin-top: clamp(2rem, 5vh, 3rem);
  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) 46%, transparent); }
.stage-note { margin-top: 1.1rem; font-size: .6rem; color: color-mix(in srgb, var(--bone) 44%, 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: stretch; }
.measure-block { display: grid; grid-template-rows: auto 1fr; }
.ruler-fig { border: 1px solid var(--hairline); padding: 1.1rem 1.1rem 1rem; background: var(--bone-hi); }
.ruler-fig svg { display: block; width: 100%; height: auto; }
.ruler-fig figcaption { font-size: .58rem; color: var(--ink-dim); margin-top: .7rem; letter-spacing: .1em; font-family: var(--font-mono); }
.rl-back { fill: var(--graphite); opacity: .85; }
.rl-down { fill: var(--lime); stroke: var(--graphite); stroke-width: .8; }
.rl-head { stroke: var(--coral); stroke-width: 2; }
.rl-brass { fill: var(--brass-deep) !important; }
#ruler-ticks line { stroke: var(--graphite); opacity: .35; stroke-width: 1; }
#ruler-ticks line.beat { stroke: var(--brass); opacity: .95; stroke-width: 1.4; }
#ruler-ticks text { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; fill: var(--ink-dim); }

.pulse-block {
  margin-top: 1px; background: var(--graphite); color: var(--bone);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  display: grid; justify-items: center; align-content: center; gap: 1rem;
}
.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) 58%, 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: .54rem; color: color-mix(in srgb, var(--bone) 52%, transparent); text-align: center; max-width: 30ch; line-height: 1.7; }

.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(--brass-deep); }
.method-card p { color: #423D33; 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); display: flex; flex-direction: column; }
.use-no { display: block; font-size: .6rem; color: var(--brass-deep); margin-bottom: 1.5rem; }
.use h3 { font-size: 1.45rem; margin-bottom: .45rem; }
.use p { font-size: .92rem; color: #423D33; max-width: 40ch; }
.use-play {
  margin-top: auto; padding-top: 1.2rem;
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .1em;
  font-size: .63rem; text-transform: uppercase; text-align: left;
  color: var(--brass-deep); background: none; border: 0; cursor: pointer;
  transition: color .2s ease;
}
.use-play:hover { color: var(--charcoal); }
.up-icon, .up-eq { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1.4px solid currentColor; border-radius: 50%; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.up-icon svg { width: 12px; height: 12px; }
.use-play:hover .up-icon { background: var(--charcoal); color: var(--bone); border-color: var(--charcoal); }
.up-eq { display: none; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 6px; background: var(--charcoal); border-color: var(--charcoal); }
.up-eq i { width: 2.5px; background: var(--lime); animation: up-eq 1.071s ease-in-out infinite; }
.up-eq i:nth-child(2) { animation-delay: .27s; }
.up-eq i:nth-child(3) { animation-delay: .54s; }
@keyframes up-eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }
.use-play.is-live { color: var(--charcoal); }
.use-play.is-live .up-eq { display: inline-flex; }
.use-play.is-live .up-icon { display: none; }
.use-play.is-current { color: var(--charcoal); }
.up-label { line-height: 1.4; }

/* ---------- 04 · the colonnade ---------- */
.colonnade { border-top: 1px solid var(--hairline); }
.avenue { margin-top: clamp(2.2rem, 5vh, 3.4rem); }
.avenue-frame {
  border-block: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--bone-hi) 0%, var(--bone) 62%, color-mix(in srgb, var(--brass) 6%, var(--bone)) 100%);
  padding-block: clamp(.6rem, 1.4vw, 1.4rem);
}
.avenue-frame svg { display: block; width: 100%; height: auto; }
.avenue-caption {
  max-width: var(--maxw); margin: 1rem auto 0; padding-inline: var(--gutter);
  display: grid; gap: .7rem;
}
.plan-m { display: none; width: 100%; height: auto; margin-bottom: .5rem; }
.plan-m .pm-label { font-family: var(--font-mono); font-size: 15px; letter-spacing: .1em; fill: var(--ink-dim); font-weight: 500; }
.plan-m .pm-label.brass { fill: var(--brass-deep); }
.av-cap-a { font-size: .6rem; color: var(--brass-deep); }
.av-cap-b { font-size: .88rem; color: var(--ink-dim); max-width: 74ch; }

/* avenue drawing grammar */
.av-floor { stroke: var(--brass); stroke-width: 1; fill: none; opacity: .55; }
.av-horizon { stroke: var(--graphite); stroke-width: 1; opacity: .18; }
.av-centre { stroke: var(--graphite); stroke-width: 1; stroke-dasharray: 5 12; fill: none; opacity: .22; }
.av-vp { fill: none; stroke: var(--brass-deep); stroke-width: 1.2; opacity: .8; }
.av-vp-cross { stroke: var(--brass-deep); stroke-width: 1; fill: none; opacity: .8; }
#avenue .rank-8 .pl-trunk, #avenue .rank-8 .pl-frond { stroke: var(--brass-deep); }
#avenue .pl-pool, #avenue .pl-glow { transition: opacity 1.1s ease; }
#avenue .pl-trunk { transition: opacity 1.1s ease; }
#avenue .palm.on .pl-pool { opacity: .78; transition: opacity .08s linear; }
#avenue .palm.on .pl-glow { opacity: 1; transition: opacity .08s linear; }
#avenue .palm.on .pl-trunk { opacity: 1; transition: opacity .08s linear; }
#avenue .pl-shaft { transition: stroke 1.1s ease; }
#avenue .palm.on .pl-shaft { stroke: #6F8A00; transition: stroke .08s linear; }
#av-notes text { font-family: var(--font-mono); font-size: 15px; letter-spacing: .1em; fill: var(--ink-dim); font-weight: 500; }
#av-notes text.brass { fill: var(--brass-deep); }
.av-sheet-rule { stroke: var(--graphite); stroke-width: 1; opacity: .16; }
.pt-axis { stroke: var(--brass); stroke-width: 1; opacity: .6; }
.pt-datum { stroke: var(--brass); stroke-width: 1.6; opacity: .9; }
.pt { stroke: var(--graphite); stroke-width: 1.2; opacity: .5; transition: stroke 1.1s ease, opacity 1.1s ease, stroke-width 1.1s ease; }
.pt-down { stroke: var(--brass-deep); stroke-width: 1.6; opacity: .85; }
.pt.on { stroke: #6F8A00; opacity: 1; stroke-width: 2.8; transition: none; }
.svg-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; fill: var(--ink-dim); font-weight: 500; }
.svg-stat { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; fill: var(--brass-deep); font-weight: 500; }

/* draw-on reveal for the avenue floor + hands strata */
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .draw, .reveal.in .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1.7s cubic-bezier(.4, 0, .2, 1) .1s; }

/* four hands */
.hands { margin-top: clamp(3rem, 7vh, 5rem); }
.hands-lede { margin-top: 1rem; max-width: 66ch; color: #423D33; }
.hands-fig { margin-top: clamp(1.4rem, 3vh, 2rem); border: 1px solid var(--hairline); background: var(--bone-hi); padding: clamp(.8rem, 2vw, 1.6rem); }
.hands-fig svg { display: block; width: 100%; height: auto; }
.hands-warn { margin-top: .8rem; font-size: .58rem; color: var(--brass-deep); border-top: 1px solid var(--hairline); padding-top: .6rem; }
#hands-strata .hs-line { fill: none; stroke: var(--brass); stroke-linecap: round; }
#hands-strata .hs-current { stroke: var(--graphite); }
#hands-strata .hs-lead { stroke: var(--brass); stroke-width: 1; }
#hands-strata .hs-label { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; font-weight: 500; fill: var(--brass-deep); }
#hands-strata .hs-label-now { fill: var(--charcoal); }
#hands .hs-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; font-weight: 500; fill: var(--ink-dim); }
.hands-list { list-style: none; padding: 0; margin: clamp(1.4rem, 3vh, 2rem) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.hands-list li { background: var(--bone); padding: 1.2rem 1.2rem 1.4rem; display: grid; gap: .35rem; align-content: start; border-top: 3px solid transparent; }
.hands-list li:nth-child(1) { border-top-color: color-mix(in srgb, var(--brass) 26%, transparent); }
.hands-list li:nth-child(2) { border-top-color: color-mix(in srgb, var(--brass) 48%, transparent); }
.hands-list li:nth-child(3) { border-top-color: color-mix(in srgb, var(--brass) 72%, transparent); }
.hands-list li:nth-child(4) { border-top-color: var(--graphite); }
.hl-year { font-size: .6rem; color: var(--brass-deep); }
.hl-name { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.05; color: var(--charcoal); }
.hl-note { font-size: .86rem; color: var(--ink-dim); line-height: 1.55; }

/* the record */
.record { margin-top: clamp(3rem, 7vh, 5rem); }
.rec-grid { border-top: 1px solid var(--hairline); margin-top: 1.6rem; }
.rec-row { display: grid; grid-template-columns: minmax(190px, 260px) 1fr; gap: .4rem 2rem; padding: .85rem 0; border-bottom: 1px solid var(--hairline); }
.rec-row dt { font-size: .62rem; color: var(--brass-deep); padding-top: .3em; }
.rec-row dd { margin: 0; font-size: .96rem; max-width: 76ch; }
.fineprint {
  margin-top: 2.2rem; border-left: 3px solid var(--coral);
  background: var(--bone-hi); padding: 1.4rem clamp(1.2rem, 3vw, 2rem);
  max-width: 82ch; display: grid; gap: .8rem;
}
.fp-kicker { font-size: .6rem; color: var(--coral-deep); }
.fineprint p { font-size: .93rem; color: #423D33; }

/* ---------- 05 · 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(--brass-deep); }
.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; }
  .hands-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .uses-grid { grid-template-columns: 1fr 1fr; }
  .hero-data { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .palisade svg { aspect-ratio: 1600 / 430; }
}
@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; }
  /* Phones get the whole drawing rather than a pannable slice: the sheet's
     own 15px annotations would set below legibility, so they step aside and
     the plan ruler is restated at a readable size under the figure. */
  #av-notes, #hands-strata .hs-label, #hands-strata .hs-lead { display: none; }
  .plan-m { display: block; }
  #avenue .pl-trunk, #avenue .pl-frond, #avenue .pl-ring,
  .av-floor, .av-horizon, .av-centre, .av-vp, .av-vp-cross { vector-effect: non-scaling-stroke; }
  #hands .hs-title { font-size: 22px; }
  /* the label gutter is gone, so the strata take the whole sheet */
  #hands-strata { transform: translateX(-264px) scaleX(1.217); }
  .avenue-frame { padding-block: 1rem; }
  /* the ruler's annotation would set at ~6px once scaled — hold it legible */
  #ruler .svg-label { font-size: 17px; }
  #ruler .svg-stat { font-size: 19px; }
  #ruler-ticks text { font-size: 15px; }
  .anthems .ap-badge { white-space: nowrap; }
}
@media (max-width: 600px) {
  .uses-grid, .hands-list { grid-template-columns: 1fr; }
  .masthead-nav a { font-size: .78rem; }
  .palisade { margin-inline: calc(var(--gutter) * -0.5); }
  .palisade svg { aspect-ratio: 1600 / 470; }
  .hero-kicker { align-items: flex-start; }
  .hero-kicker::before { margin-top: .62em; }
}
@media (max-width: 400px) {
  .mark-word { display: none; }
}

/* ---------- reduced motion: composed, instant, fully lit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .draw { stroke-dashoffset: 0 !important; transition: none !important; }
  body:not(.is-playing) .pulse-core { animation: none; }
  .up-eq i { animation: none; height: 9px; }
  .beat-dot { transition: none; }
  .beat-dot.hit { transform: none; }
  /* the colonnade is delivered fully drawn and fully lit, no sequencing */
  .pl-bar { transition: none; }
  #avenue .pl-pool { opacity: .5; transition: none; }
  #avenue .pl-glow { opacity: .95; transition: none; }
  #avenue .pl-trunk { opacity: 1; transition: none; }
  #avenue .pl-shaft { stroke: #6F8A00; transition: none; }
  .pt { stroke: #6F8A00; opacity: 1; stroke-width: 2.2; transition: none; }
  .pt-down { stroke: var(--brass-deep); stroke-width: 1.6; }
  .masthead, .sec-rule, .player-shell, .rel-card, .rel-arrow, .stripe span,
  .use-play, .up-icon, .up-eq, .reveal { transition: none; }
}
