/* METRONOME main stylesheet. Layout, components, motion. Tokens live in tokens.css.
   Vocabulary comes from the rehearsal room: movements (sections), measures
   (containers), staves and noteheads (lists), the podium (header), the pulse
   rail (the mechanic), desks (form fields), the colophon (footer). */

/* ---------- base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-unison);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--fg);
}

::selection { background: var(--mahogany-deep); color: var(--cream); }
[data-theme="slate"] ::selection { background: var(--cream); color: var(--slate); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0;
}
.downbeat:focus-visible,
.upbeat:focus-visible,
.podium-cta:focus-visible,
.skip-link:focus-visible { border-radius: var(--r-pill); }
/* the rest checkbox is transparent, so its label wears the focus ring */
.rest-toggle input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

:where([id]) { scroll-margin-top: 6rem; }
:where(.movement[id]) { scroll-margin-top: 3rem; }
#top { scroll-margin-top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: var(--s-3);
  left: var(--s-3);
  z-index: var(--z-skip);
  padding: var(--s-3) var(--s-5);
  background: var(--slate);
  color: var(--cream);
  border-radius: var(--r-pill);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(calc(-100% - 1.5rem));
}
.skip-link:focus-visible { transform: none; }

/* ---------- text roles ---------- */
.measure {
  width: min(100% - 2 * var(--edge), var(--measure-width));
  margin-inline: auto;
}

.tempo-mark {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}
.tempo-mark--accent { color: var(--accent); }

.phrase {
  max-width: var(--phrase-width);
  color: var(--muted);
}
.phrase strong { color: var(--fg); font-weight: 600; }
.phrase a { color: var(--accent); text-underline-offset: 3px; }

h1, h2, h3, .grand-line {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 em, h2 em, .grand-line em { font-style: italic; color: var(--accent); }

.interval-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  vertical-align: middle;
  padding: 0.2em 0.75em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}
.interval-chip::before {
  content: "";
  width: 0.6em;
  height: 0.48em;
  border-radius: 50%;
  background: var(--accent-raw);
  transform: rotate(-18deg);
}

.sample-flag {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: var(--r-pill);
  background: var(--mahogany-deep);
  color: var(--cream);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
[data-theme="slate"] .sample-flag { background: var(--cream); color: var(--slate); }

/* ---------- movements (the section contract) ---------- */
.movement { padding-block: var(--movement-pad); }
.movement--flush { padding-block: 0; }
.movement--hairline { border-top: 1px solid var(--line); }
.movement[data-theme="slate"] { background: var(--bg); color: var(--fg); }

.movement-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-7);
}
.movement-head h2 { font-size: var(--t-octave-fifth); }
.movement-head .interval-chip { position: relative; top: -0.35em; }
.movement-lede { margin-bottom: var(--s-6); }

/* ---------- the pulse rail (the mechanic) ---------- */
/* the beat rail. On any page with a podium it is the podium's bottom edge and
   travels with it; on the 404 bar of rest it lies along the top of the page. */
.pulse-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: var(--z-rail);
  background: var(--cream-3);
}
.podium .pulse-rail {
  position: absolute;
  top: auto;
  bottom: 0;
}
.pulse-rail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mahogany-deep);
  transform-origin: left center;
  transform: scaleX(1);
  animation: count-bar var(--bar) steps(4, jump-start) infinite;
}
@keyframes count-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.tempo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.pulse-dot {
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: var(--mahogany-deep);
  animation: throb var(--beat) ease-in-out infinite;
}
@keyframes throb {
  0% { transform: scale(1); opacity: 1; }
  45% { transform: scale(0.68); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* the rest toggle: a real checkbox, so it works without JavaScript */
.rest-toggle {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.rest-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.rest-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  pointer-events: none;
}
.rest-toggle .when-resting { display: none; }
html:has(#tempo-rest:checked) .rest-toggle .when-counting,
html.is-resting .rest-toggle .when-counting { display: none; }
html:has(#tempo-rest:checked) .rest-toggle .when-resting,
html.is-resting .rest-toggle .when-resting { display: inline; }
html:has(#tempo-rest:checked) .pulse-rail::after,
html.is-resting .pulse-rail::after { animation: none; transform: scaleX(1); }
html:has(#tempo-rest:checked) .pulse-dot,
html.is-resting .pulse-dot { animation: none; opacity: 0.55; }

/* ---------- podium (header) ---------- */
.podium {
  position: sticky;
  top: 0;
  z-index: var(--z-podium);
  background: var(--cream);
}
.podium .measure {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 4rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-third);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark svg { width: 1.35em; height: 1.35em; color: var(--mahogany-deep); }

.podium-nav {
  display: flex;
  gap: var(--s-5);
  margin-left: auto;
}
.podium-nav a {
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
}
.podium-nav a:hover,
.podium-nav a[aria-current] { color: var(--fg); }
.podium-nav a[aria-current="page"] { color: var(--accent); }

.podium-cta {
  padding: 0.55em 1.2em;
  border-radius: var(--r-pill);
  background: var(--mahogany-deep);
  color: var(--cream);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.podium-cta:hover { background: var(--slate); }
.podium .tempo-chip { margin-left: var(--s-2); }

.backstage-btn {
  display: none;
  padding: 0.45em 1em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: var(--t-small);
  font-weight: 600;
}

/* ---------- backstage (menu overlay) ---------- */
.backstage {
  position: fixed;
  inset: 0;
  z-index: var(--z-backstage);
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s-6) var(--edge) var(--s-7);
  background: var(--slate);
  color: var(--cream);
}
.backstage.is-open { display: flex; }
.backstage-close {
  align-self: flex-end;
  padding: 0.45em 1.1em;
  border: 1px solid rgba(248, 245, 238, 0.4);
  border-radius: var(--r-pill);
  font-size: var(--t-small);
  font-weight: 600;
}
.backstage nav { display: grid; gap: var(--s-4); }
.backstage nav a {
  font-family: var(--font-display);
  font-size: var(--t-octave-third);
  line-height: var(--lh-heading);
  text-decoration: none;
}
.backstage nav a em { font-style: italic; color: var(--mahogany-lift); }
.backstage nav a:hover { color: var(--mahogany-lift); }
.backstage .tempo-mark { color: #aba595; }

/* ---------- buttons ---------- */
.downbeat,
.upbeat {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.7em;
  border-radius: var(--r-pill);
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.downbeat {
  background: var(--mahogany-deep);
  color: var(--cream);
}
.downbeat:hover { background: var(--slate); }
[data-theme="slate"] .downbeat { background: var(--cream); color: var(--slate); }
[data-theme="slate"] .downbeat:hover { background: var(--mahogany-lift); color: var(--slate); }
.upbeat {
  border: 1px solid var(--line-strong);
  color: var(--fg);
}
.upbeat:hover { border-color: var(--accent); color: var(--accent); }
.beat-arrow { transition: transform var(--dur-2) var(--ease-out); }
.downbeat:hover .beat-arrow,
.upbeat:hover .beat-arrow { transform: translateX(4px); }

/* ---------- overture (hero) ---------- */
.overture { padding-block: clamp(5rem, 14vh, 9rem) var(--movement-pad); }
.overture-marks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-7);
}
.overture h1 {
  font-size: var(--t-grand);
  max-width: 13ch;
  margin-bottom: var(--s-5);
}
.overture .interval-chip { margin-bottom: var(--s-4); }
.overture-base {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s-6);
  margin-top: var(--s-6);
}
.overture-base .phrase { font-size: var(--t-second); flex: 1 1 24rem; }
.overture-ctas { display: flex; flex-wrap: wrap; gap: var(--s-4); }

/* the opening scale: a decorative stave with noteheads stepping upward */
.opening-scale {
  margin-top: var(--s-8);
  height: calc(8 * var(--stave-gap) + 1px);
  position: relative;
  background: repeating-linear-gradient(
    to top,
    var(--stave-line) 0 1px,
    transparent 1px calc(var(--stave-gap) * 2)
  );
}
.opening-scale i {
  position: absolute;
  width: 1.05rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--mahogany-bright);
  transform: rotate(-18deg);
  bottom: calc(var(--degree) * var(--stave-gap) - 0.4rem);
  left: calc(var(--step) * 12.5%);
}

/* ---------- staves + noteheads (lists) ---------- */
.stave-row {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: var(--s-5);
  align-items: center;
  padding-block: var(--s-6);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.stave-row:first-of-type { border-top: 1px solid var(--line); }

.ledger {
  display: block;
  position: relative;
  height: calc(4 * var(--stave-gap) + 1px);
  background: repeating-linear-gradient(
    to bottom,
    var(--stave-line) 0 1px,
    transparent 1px var(--stave-gap)
  );
}
.ledger .notehead {
  position: absolute;
  left: 50%;
  width: 1rem;
  height: 0.78rem;
  border-radius: 50%;
  background: var(--accent-raw);
  transform: translateX(-50%) rotate(-18deg);
  bottom: calc(var(--degree, 0) * (var(--stave-gap) / 2) - 0.39rem + 1px);
  transition: transform var(--dur-2) var(--ease-out);
}
.stave-row:hover .notehead { transform: translateX(-50%) rotate(-18deg) scale(1.25); }

.stave-row h3 { font-size: var(--t-fifth); margin-bottom: var(--s-1); }
.stave-row .phrase { font-size: var(--t-small); }
.stave-tail {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  justify-self: end;
  text-align: right;
}
.fee-from {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.stave-row .beat-arrow { color: var(--accent); }
.stave-row:hover h3 { color: var(--accent); }

/* ---------- the week (timetable, the conversion object) ---------- */
.week-note { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center; margin-bottom: var(--s-6); }
.day-stave { padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.day-stave:first-of-type { border-top: 1px solid var(--line); }
.day-name {
  font-family: var(--font-display);
  font-size: var(--t-fourth);
  margin-bottom: var(--s-4);
}
.day-name span { font-family: var(--font-body); font-size: var(--t-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); margin-left: var(--s-3); }
.slots {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-block: var(--s-2);
  background: repeating-linear-gradient(
    to bottom,
    var(--stave-line) 0 1px,
    transparent 1px 0.85rem
  );
}
.slot {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.55em 1em;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--t-small);
  text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.slot::before {
  content: "";
  width: 0.72rem;
  height: 0.56rem;
  border-radius: 50%;
  background: var(--accent-raw);
  transform: rotate(-18deg);
  flex: none;
}
.slot:hover { border-color: var(--accent); transform: translateY(-2px); }
.slot b { font-weight: 700; font-variant-numeric: tabular-nums; }
.slot .muted-note { color: var(--muted); }
.slot-verb { color: var(--accent); font-weight: 600; }
.slot--taken { opacity: 0.5; }
.slot--taken::before { background: var(--muted); }

/* ---------- tuition ---------- */
.fee-lines { border-top: 1px solid var(--line); max-width: 46rem; }
.fee-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-5);
  align-items: baseline;
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.fee-line h3 { font-size: var(--t-fifth); margin-bottom: var(--s-1); }
.fee-line .phrase { font-size: var(--t-small); }
.fee-price {
  font-family: var(--font-display);
  font-size: var(--t-octave);
  white-space: nowrap;
}
.fee-price span { font-family: var(--font-body); font-size: var(--t-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.fee-footnote { margin-top: var(--s-5); font-size: var(--t-small); }

/* ---------- faculty ---------- */
.faculty-line { display: grid; gap: var(--s-6); grid-template-columns: repeat(3, 1fr); }
.chair-card {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-6);
  background: var(--bg-2);
}
.chair-card .ledger { width: 3.4rem; margin-bottom: var(--s-5); }
.chair-card h3 { font-size: var(--t-fifth); margin-bottom: var(--s-1); }
.chair-card .tempo-mark { display: block; margin-bottom: var(--s-4); }
.chair-card .phrase { font-size: var(--t-small); }

/* ---------- count-in (the first four weeks, one bar each) ---------- */
.count-in {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: bar;
}
.bar-step {
  padding-top: var(--s-5);
  border-top: 2px solid var(--line-strong);
  position: relative;
}
.bar-step::before {
  content: "";
  position: absolute;
  top: -0.42rem;
  left: 0;
  width: 0.85rem;
  height: 0.66rem;
  border-radius: 50%;
  background: var(--accent);
  transform: rotate(-18deg);
}
.bar-step .tempo-mark { display: block; margin-bottom: var(--s-4); }
.bar-step h3 { font-size: var(--t-fourth); margin-bottom: var(--s-3); }
.bar-step .phrase { font-size: var(--t-small); }

/* ---------- refrains (FAQ accordion) ---------- */
.refrain h3 { font-family: var(--font-body); font-size: var(--t-unison); }
.refrains { border-top: 1px solid var(--line); max-width: 52rem; }
.refrain { border-bottom: 1px solid var(--line); }
.refrain-trigger {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: var(--s-5);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--t-fourth);
  line-height: var(--lh-heading);
}
.refrain-trigger:hover { color: var(--accent); }
.refrain-glyph { font-family: var(--font-body); color: var(--accent); flex: none; transition: transform var(--dur-2) var(--ease-out); }
.refrain-trigger[aria-expanded="true"] .refrain-glyph { transform: rotate(45deg); }
.refrain-panel { overflow: hidden; }
.refrain-panel .phrase { padding-bottom: var(--s-5); }

/* ---------- the chair form ---------- */
.chair-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
.chair-aside .grand-line { font-size: var(--t-octave-third); margin-bottom: var(--s-5); }
.chair-aside .phrase { margin-bottom: var(--s-5); }
.chair-aside dl { display: grid; gap: var(--s-3); font-size: var(--t-small); }
.chair-aside dt { font-size: var(--t-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.chair-aside a { color: var(--accent); text-underline-offset: 3px; }

.chair-form { display: grid; gap: var(--s-5); }
.desk { display: grid; gap: var(--s-2); }
.desk label {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.desk input,
.desk select,
.desk textarea {
  font: inherit;
  color: var(--fg);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  padding: 0.7em 0.9em;
  width: 100%;
}
[data-theme="slate"] .desk input,
[data-theme="slate"] .desk select,
[data-theme="slate"] .desk textarea {
  background: var(--slate-2);
  color: var(--cream);
  border-color: var(--line-strong);
}
.desk textarea { min-height: 7.5rem; resize: vertical; }
/* errors take --accent so each ground gets the strength that reads on it:
   mahogany deep on cream (9.25:1), mahogany lifted on slate (5.27:1) */
.desk-err { font-size: var(--t-small); color: var(--accent); }
[data-theme="slate"] .desk.is-flat input,
.desk.is-flat input,
.desk.is-flat select { border-color: var(--accent); }
.desk-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }

/* the honeypot desk sits offstage for everyone, including AT */
.desk--offstage { position: absolute; left: -6000px; top: auto; }

.reservation-errors {
  border: 1px solid var(--accent);
  border-radius: var(--r-2);
  padding: var(--s-5);
}
.reservation-errors h3 { font-size: var(--t-fourth); margin-bottom: var(--s-3); }
.reservation-errors ul { display: grid; gap: var(--s-2); }
.reservation-errors a { color: var(--accent); }
.reservation-status { min-height: 1.5em; font-size: var(--t-small); }

/* the draft note and the scripts-off notice: both plain, both near the fields */
.reservation-note {
  font-size: var(--t-small);
  color: var(--muted);
  max-width: var(--phrase-width);
}
.reservation-nojs {
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  padding: var(--s-5);
  font-size: var(--t-small);
  color: var(--muted);
}
.reservation-nojs a { color: var(--accent); text-underline-offset: 3px; }
/* the office address is one long token: let it break rather than push the page */
.reservation-nojs, .reservation-note { overflow-wrap: anywhere; }
html:not(.js) .reservation-nojs { display: block; }
.encore {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-2);
  padding: var(--s-5);
  display: grid;
  gap: var(--s-4);
}
.encore textarea {
  font: inherit;
  font-size: var(--t-small);
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  padding: var(--s-3);
  min-height: 9rem;
  width: 100%;
}
[data-theme="slate"] .encore textarea { color: var(--cream); }
.encore-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- frontispiece (interior banner) ---------- */
.frontispiece {
  padding-block: var(--s-9) var(--s-8);
  border-bottom: 1px solid var(--line);
}
.frontispiece h1 { font-size: var(--t-double-octave); margin-block: var(--s-4); }
.breadcrumb { display: flex; gap: 0.6em; font-size: var(--t-small); color: var(--muted); }
.breadcrumb a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.breadcrumb [aria-current] { color: var(--fg); }

/* interior program entries */
.programme { display: grid; gap: var(--s-6); grid-template-columns: 4rem 1fr; padding-block: var(--s-7); border-bottom: 1px solid var(--line); }
.programme:last-of-type { border-bottom: 0; }
.programme h3 { font-size: var(--t-octave); margin-bottom: var(--s-3); }
.programme .phrase + .phrase { margin-top: var(--s-3); }
.programme-facts { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.fact-chip {
  padding: 0.35em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- coda (CTA band) ---------- */
.coda { text-align: center; }
.coda .grand-line { font-size: var(--t-octave-fifth); max-width: 22ch; margin-inline: auto; margin-bottom: var(--s-5); }
.coda .phrase { margin-inline: auto; margin-bottom: var(--s-6); }
.coda .overture-ctas { justify-content: center; }

/* ---------- colophon (footer) ---------- */
.colophon { border-top: 1px solid var(--line); padding-block: var(--s-8); }
.colophon-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-7); }
.colophon h2 { font-size: var(--t-fifth); margin-bottom: var(--s-3); }
.colophon-col h3 { font-family: var(--font-body); font-size: var(--t-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); }
.colophon-col ul { display: grid; gap: var(--s-2); padding: 0; list-style: none; font-size: var(--t-small); }
.colophon-col a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.colophon-col a:hover { color: var(--accent); }
.colophon-base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.colophon-base .tempo-mark { margin-right: auto; }

/* ---------- swell (reveal motion; gated so no-JS shows everything) ---------- */
html.js .swell {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: calc(var(--swell-step, 0) * (var(--beat) / 8));
}
html.js .swell.is-sounding { opacity: 1; transform: none; }
html.js [data-swell="1"] { --swell-step: 1; }
html.js [data-swell="2"] { --swell-step: 2; }
html.js [data-swell="3"] { --swell-step: 3; }

/* ---------- styleguide page ---------- */
.plate { padding-block: var(--s-7); border-bottom: 1px solid var(--line); }
.plate h2 { font-size: var(--t-octave); margin-bottom: var(--s-5); }
.plate h3 { font-size: var(--t-fourth); margin-block: var(--s-5) var(--s-3); }
.plate h4 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-fifth); line-height: var(--lh-heading); }
.plate caption { text-align: left; }
.swatch-rack { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.swatch { display: grid; gap: var(--s-2); font-size: var(--t-small); }
.swatch i { display: block; width: 8.5rem; height: 4.5rem; border-radius: var(--r-2); border: 1px solid var(--line); }
.scale-demo { display: grid; gap: var(--s-4); }
.scale-demo > div { display: flex; align-items: baseline; gap: var(--s-5); flex-wrap: wrap; }
.scale-demo .tempo-mark { min-width: 12rem; }
.sheet-scroll { overflow-x: auto; }
.plate table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: var(--t-small); }
.plate th, .plate td { text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.plate th { font-size: var(--t-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }

/* ---------- the empty measure (404) ---------- */
.empty-measure {
  min-height: 100svh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: var(--s-8) var(--edge);
}
.empty-measure .ledger { width: 16rem; margin-inline: auto; margin-bottom: var(--s-7); }
.whole-rest {
  position: absolute;
  left: 50%;
  top: var(--stave-gap);
  transform: translateX(-50%);
  width: 1.6rem;
  height: calc(var(--stave-gap) - 2px);
  background: var(--mahogany-deep);
}
.empty-measure h1 { font-size: var(--t-double-octave); margin-bottom: var(--s-4); }
.empty-measure .phrase { margin-inline: auto; margin-bottom: var(--s-6); }
.empty-measure .overture-ctas { justify-content: center; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .podium-nav, .podium-cta, .podium .tempo-chip { display: none; }
  .backstage-btn { display: inline-flex; margin-left: auto; }
  .chair-form-grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .faculty-line { grid-template-columns: 1fr; }
  .count-in { grid-template-columns: 1fr 1fr; }
  .colophon-grid { grid-template-columns: 1fr 1fr; }
  .programme { grid-template-columns: 1fr; gap: var(--s-4); }
  .programme .ledger { width: 3.4rem; }
}
@media (max-width: 600px) {
  .podium .measure { gap: var(--s-3); }
  .rest-long { display: none; }
  .fee-line { grid-template-columns: 1fr; gap: var(--s-2); }
  .fee-price { white-space: normal; }
  .stave-row { grid-template-columns: 3rem 1fr; }
  .stave-tail { grid-column: 2; justify-self: start; text-align: left; }
  .desk-row { grid-template-columns: 1fr; }
  .count-in { grid-template-columns: 1fr; gap: var(--s-5); }
  .colophon-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .opening-scale i { width: 0.85rem; height: 0.66rem; }
}

/* ---------- preferences: the pulse rests, nothing is lost ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse-rail::after { animation: none; transform: scaleX(1); }
  .pulse-dot { animation: none; opacity: 0.55; }
  html.js .swell { opacity: 1; transform: none; transition: none; }
  .slot, .notehead, .beat-arrow, .downbeat, .upbeat { transition: none; }
}

/* ---------- print: the schedule survives the printer ---------- */
@media print {
  .pulse-rail, .podium, .backstage, .skip-link, .colophon { display: none; }
  body { background: #fff; color: #000; }
  .movement { padding-block: 1.5rem; }
  a { text-decoration: none; }
}
