/* Betty Johnson School of Dance: chrome first, then shared pieces, then bare elements. */
:root {
  --tone-olive: #74805b;
  /* ink deepened a touch from #10160d so small running copy clears AA on the olive ground */
  --tone-soil: #070a05;
  --tone-chalk: #fffdf3;
  --tone-tape: #ff6a1a;
  --face-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --face-text: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --step-body: clamp(1rem, 0.94rem + 0.3vw, 1.1875rem);
  --step-small: clamp(0.92rem, 0.9rem + 0.12vw, 1rem);
  --step-h1: clamp(1.75rem, 0.9rem + 3.9vw, 4.875rem);
  --step-h2: clamp(1.625rem, 0.95rem + 2.6vw, 3.5rem);
  --step-h3: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --step-pull: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  --step-turn: 180ms;
  --step-press: 200ms;
  /* side inset of the page content; widened below so content stands clear of the corner plates */
  --measure-edge: clamp(3.5rem, 5vw, 4.25rem);
  /* vertical clearance under the top plates and above the bottom ones */
  --measure-plate: clamp(3.5rem, 5vw, 4.25rem);
  --measure-gap: clamp(1rem, 2.4vw, 2rem);
  --measure-band: clamp(2.5rem, 9vh, 6.5rem);
  --measure-page: 86rem;
  --measure-inset: max(0.5rem, env(safe-area-inset-left));
}
/* Past the phone the lower plates are wide: the content column is inset to stand beside them, never under them. */
@media (min-width: 40.0625rem) { :root { --measure-edge: 8.5rem; } }
@media (min-width: 62rem) { :root { --measure-edge: 11.5rem; } }

/* Skip link: .bypass, appears on keyboard focus */
.bypass {
  position: fixed; z-index: 90; top: 0.5rem; left: 50%;
  transform: translate(-50%, -200%);
  background: var(--tone-soil); color: var(--tone-chalk);
  padding: 0.75rem 1rem; font-weight: 600;
}
.bypass:focus { transform: translate(-50%, 0); }

/* Corner plates: .wing plus one of .wing-ul .wing-ur .wing-ll .wing-lr; the name plate adds .wing-name. Four corners, nothing between. */
.wing {
  position: fixed; z-index: 50;
  display: flex; align-items: center; gap: 0.55rem;
  min-height: 2.75rem; padding: 0.6rem 0.95rem;
  background: var(--tone-olive); color: var(--tone-soil);
  font: 600 var(--step-small)/1.2 var(--face-text);
  text-decoration: none;
  transition: color var(--step-turn) ease-out, background-color var(--step-turn) ease-out;
}
.wing:hover, .wing[aria-current="page"] {
  text-decoration: underline; text-decoration-color: var(--tone-tape);
  text-decoration-thickness: 0.22em; text-underline-offset: 0.3em;
}
.wing-ul { top: max(0.5rem, env(safe-area-inset-top)); left: var(--measure-inset); }
.wing-ur { top: max(0.5rem, env(safe-area-inset-top)); right: max(0.5rem, env(safe-area-inset-right)); }
.wing-ll { bottom: max(0.5rem, env(safe-area-inset-bottom)); left: var(--measure-inset); }
.wing-lr { bottom: max(0.5rem, env(safe-area-inset-bottom)); right: max(0.5rem, env(safe-area-inset-right)); }
.wing-name { max-width: 24rem; }
.wing-badge { width: 2.5rem; height: auto; flex: none; }
.wing-short { display: none; }

@media (max-width: 61.9375rem) {
  .wing-full { display: none; }
  .wing-short { display: inline; }
}
@media (max-width: 40rem) {
  .wing { padding: 0.5rem 0.7rem; }
  .wing-name { max-width: 12.5rem; font-size: 0.92rem; }
  .wing-badge { width: 2rem; }
}

/* Footer: .curtain holds .curtain-floor, the drawn plan .blocking and its legend .blocking-key */
.curtain {
  container-type: inline-size;
  padding: var(--measure-band) var(--measure-edge) calc(var(--measure-plate) + 2rem);
}
@media (max-width: 40rem) {
  /* room for the bottom plates and the cookie notice above them, so the last lines can be read */
  .curtain { padding-bottom: calc(max(0.5rem, env(safe-area-inset-bottom)) + 10.5rem); }
}
.curtain-floor {
  max-width: var(--measure-page); margin-inline: auto;
  display: grid; gap: var(--measure-gap);
}
@container (min-width: 46rem) {
  .curtain-floor { grid-template-columns: 5fr 7fr; align-items: start; }
}
.blocking { margin: 0; }
.blocking svg { width: 100%; height: auto; max-width: 30rem; display: block; }
.blocking-key { font-size: var(--step-small); display: grid; gap: 1rem; }
.blocking-key p, .blocking-key address { margin: 0; font-style: normal; }
.blocking-name { font: 800 var(--step-h3)/1.1 var(--face-display); }
.blocking-where { max-width: 34rem; }
.blocking-door { max-width: 34rem; }
/* link rows wrap as balanced inline text, so no link is left alone on a line */
.blocking-ways {
  list-style: none; margin: 0; padding: 0;
  display: block; text-wrap: balance;
}
.blocking-ways li { display: inline-block; margin-right: 1.4rem; white-space: nowrap; }
.blocking-ways li:last-child { margin-right: 0; }
.blocking-ways a, .cookie-turn { display: inline-flex; align-items: center; min-height: 2.75rem; }
.blocking-fine { font-size: 0.92rem; }
.cookie-turn {
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 0.22em;
}
.open-line { font-weight: 600; }

/* Consent notice: the olive oval .usher above the lower-right plate, with .usher-words and .usher-choice */
.usher {
  position: fixed; z-index: 60;
  right: max(0.5rem, env(safe-area-inset-right));
  bottom: calc(max(0.5rem, env(safe-area-inset-bottom)) + 3.5rem);
  max-width: 24rem; padding: 1.1rem 2rem 1.2rem;
  background: var(--tone-olive); color: var(--tone-soil);
  border-radius: 50%/50%;
  box-shadow: 0 0 0 0.14rem var(--tone-soil);
  text-align: center;
}
.usher[hidden] { display: none; }
.usher-words { margin: 0 0 0.6rem; font-size: 0.95rem; line-height: 1.3; }
.usher-choice { display: flex; justify-content: center; gap: 0.6rem; }
.usher-choice button {
  flex: 1 1 0; min-height: 2.75rem; padding: 0 1.1rem; cursor: pointer;
  border: 0; border-radius: 999px;
  background: var(--tone-soil); color: var(--tone-chalk);
  font: 600 0.95rem/1 var(--face-text);
}
@media (max-width: 40rem) {
  /* a compact two-line notice; the pills are drawn small inside a full-size touch area */
  .usher {
    max-width: calc(100vw - 1rem);
    bottom: calc(max(0.5rem, env(safe-area-inset-bottom)) + 3.3rem);
    padding: 0.4rem 0.8rem 0; border-radius: 1.4rem;
  }
  .usher-words { margin: 0; font-size: 0.9rem; line-height: 1.2; white-space: nowrap; }
  .usher-choice { gap: 0; }
  .usher-choice button {
    flex: 0 1 7rem; min-height: 2.6rem;
    padding: 0 0.5rem; font-size: 0.9rem;
    border: 0.5rem solid transparent; background-clip: padding-box;
  }
  /* while the notice shows, the opening band keeps its last link clear above it */
  body:has(#cookie-bar:not([hidden])) main > :first-child { padding-bottom: 9rem; }
}

/* Offer: the round tape-orange sticker #perk.token, pressed in once (.is-in), still after that */
.token {
  position: fixed; z-index: 55;
  top: calc(max(0.5rem, env(safe-area-inset-top)) + 3.75rem);
  right: calc(max(0.5rem, env(safe-area-inset-right)) + 1.5rem);
  width: 14rem; aspect-ratio: 1; padding: 2.2rem 1.6rem 1.6rem;
  display: grid; place-content: center;
  background: var(--tone-tape); color: var(--tone-soil);
  border-radius: 50%; box-shadow: 0 0 0 0.14rem var(--tone-soil);
  text-align: center;
  opacity: 0; transform: rotate(-7deg) scale(1.14);
  transition: transform var(--step-press) cubic-bezier(0.3, 0.7, 0.4, 1), opacity var(--step-press) ease-out;
}
.token[hidden] { display: none; }
.token.is-in { opacity: 1; transform: rotate(-7deg) scale(1); }
.token-words { margin: 0; font: 600 0.95rem/1.3 var(--face-text); }
.token-words a { display: block; margin-top: 0.4rem; font-weight: 600; }
.token-off {
  position: absolute; top: 0.55rem; left: 50%; transform: translateX(-50%);
  width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer;
  color: var(--tone-soil); font: 600 1.4rem/1 var(--face-text);
}
@media (max-width: 40rem) {
  /* On the phone the sticker is not pinned: it is pressed onto the page itself, in the closing
     spread ahead of the footer, well away from the opening photograph and the h1. */
  .token {
    position: relative; z-index: auto; top: auto; right: auto;
    width: 12.5rem; margin: 0 var(--measure-edge) 0 auto;
    padding: 2.7rem 1.4rem 1.5rem;
  }
  /* until it is pressed in, and after it is closed, it takes no room on the page */
  .token:not(.is-in) {
    position: absolute; right: var(--measure-edge);
    visibility: hidden; pointer-events: none;
  }
  .token-words { font-size: 0.9rem; line-height: 1.25; }
}

/* The rehearsal mark: .spike is one strip of orange tape; add .spike-small, .spike-long; .spike-pending fills when .arrived */
.spike {
  display: inline-block; vertical-align: middle;
  width: 3.4em; height: 0.62em;
  background: var(--tone-tape);
  box-shadow: inset 0 0 0 0.09em var(--tone-soil);
  clip-path: polygon(3% 18%, 0 46%, 4% 70%, 1% 100%, 97% 88%, 100% 60%, 96% 34%, 99% 0);
  transform: rotate(-4deg);
  transition: background-color var(--step-turn) ease-out, transform var(--step-turn) ease-out;
}
.spike-small { width: 1.8em; height: 0.5em; }
.spike-long { width: 100%; height: 0.8rem; transform: rotate(-0.6deg); }
.spike-pending { background: transparent; box-shadow: inset 0 0 0 0.14em var(--tone-tape), inset 0 0 0 0.24em var(--tone-soil); }
.spike-pending.arrived, .arrived .spike-pending { background: var(--tone-tape); }

/* Floor line, the only drawn rule: .floorline, a dark line the marks stand on (never between text blocks) */
.floorline { display: block; height: 0.2rem; background: var(--tone-soil); border: 0; margin: 0; }

/* Page opening for inner pages: .overture with .overture-words (h1, mark, lead) and .overture-shot (a .still) */
.overture {
  container-type: inline-size;
  padding: calc(var(--measure-plate) + 1.5rem) var(--measure-edge) var(--measure-band);
}
.overture-floor {
  max-width: var(--measure-page); margin-inline: auto;
  display: grid; gap: var(--measure-gap); align-items: end;
}
@container (min-width: 48rem) {
  .overture-floor { grid-template-columns: 5fr 7fr; }
}
.overture-words h1 { margin-bottom: 0.4em; }
.overture-words .spike { display: block; width: min(14rem, 70%); height: 0.9rem; margin-bottom: 1.4rem; }
.overture-lead { font-size: calc(var(--step-body) * 1.15); max-width: 32rem; }

/* Editorial spread on a 12-column grid: .spread, children take .bars-3 .bars-5 .bars-7 .bars-12; .wide-shot breaks to the edge */
main { container-type: inline-size; }
.spread {
  max-width: var(--measure-page); margin-inline: auto;
  padding: var(--measure-band) var(--measure-edge);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--measure-gap);
}
@container (min-width: 48rem) {
  .spread { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .bars-3 { grid-column: span 3; }
  .bars-4 { grid-column: span 4; }
  .bars-5 { grid-column: span 5; }
  .bars-7 { grid-column: span 7; }
  .bars-8 { grid-column: span 8; }
  .bars-12 { grid-column: 1 / -1; }
}
.wide-shot { grid-column: 1 / -1; margin-inline: calc(var(--measure-edge) * -1 + 0.5rem); }
.wide-shot .still-line { padding-inline: calc(var(--measure-edge) - 0.5rem); }

/* Reading columns: .score (2 columns when room), .score-three (3); .score-open gives the large chalk initial */
.score { container-type: inline-size; }
.score-text { max-width: 40rem; }
@container (min-width: 38rem) { .score-text { column-count: 2; column-gap: var(--measure-gap); max-width: none; } }
@container (min-width: 58rem) { .score-three .score-text { column-count: 3; } }
.score-text p { margin: 0 0 1em; break-inside: avoid-column; }
.score-open > p:first-child::first-letter {
  float: left; margin: 0.06em 0.12em 0 0;
  font: 800 4.1em/0.8 var(--face-display); color: var(--tone-chalk);
}

/* Pulled line of advice in warm white: .pull (large only), optional .pull-by for who said it */
.pull { margin: 0; font: 800 var(--step-pull)/1.14 var(--face-display); color: var(--tone-chalk); }
.pull-by { display: block; margin-top: 0.8rem; font: 600 var(--step-small)/1.3 var(--face-text); color: var(--tone-soil); }

/* Photograph with caption: figure.still > img + figcaption.still-line; crops .still-wide .still-tall .still-room */
.still { margin: 0; }
.still img { display: block; width: 100%; height: auto; object-fit: cover; }
.still-wide img { aspect-ratio: 16 / 9; }
.still-room img { aspect-ratio: 4 / 3; }
.still-tall img { aspect-ratio: 4 / 5; }
.still-line { margin-top: 0.6rem; font-size: var(--step-small); line-height: 1.35; max-width: 36rem; }

/* The plain email link that ends each page: a.ask-link, starts at a mark */
.ask-link {
  display: inline-flex; align-items: center; gap: 0.7em; min-height: 2.75rem;
  font: 800 var(--step-h3)/1.15 var(--face-display); text-decoration: none;
}
.ask-link:hover { text-decoration: underline; text-decoration-thickness: 0.12em; text-underline-offset: 0.2em; }
.ask-link:hover .spike { transform: rotate(-4deg) translateX(0.3em); }

/* Mark-in-margin list for classes and steps: ul.taped > li; each item starts at a small mark in the left margin */
.taped { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.taped > li { position: relative; padding-left: 2.8rem; }
.taped > li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 1.9rem; height: 0.5rem; background: var(--tone-tape);
  box-shadow: inset 0 0 0 0.08rem var(--tone-soil); transform: rotate(-4deg);
}

/* Reveal utility: add .cue-in; the script adds .arrived once seen (only marks change; text and photos stay still) */
.cue-in { transition: none; }

/* Facts list: dl.notes with dt/dd pairs, for class specs and practical details */
.notes { margin: 0; display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr; gap: 0.6rem 1.4rem; font-size: var(--step-body); }
.notes dt { font-weight: 600; }
.notes dd { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .token, .token.is-in { opacity: 1; transform: rotate(-7deg); }
  .spike-pending { background: var(--tone-tape); }
}

/* Bare elements */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--tone-olive); color: var(--tone-soil);
  font: 400 var(--step-body)/1.55 var(--face-text);
  overflow-wrap: break-word;
}
h1, h2, h3 {
  margin: 0 0 0.5em; font-family: var(--face-display); font-weight: 800;
  line-height: 1.04; letter-spacing: 0; text-wrap: balance;
}
h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--tone-tape); text-decoration-thickness: 0.16em; }
:focus-visible {
  outline: 0.19rem solid var(--tone-tape); outline-offset: 0.12rem;
  box-shadow: 0 0 0 0.38rem var(--tone-soil);
}
button { font: inherit; color: inherit; }
address { font-style: normal; }

html, body { overflow-x: clip; }
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* The corner plates are pinned to the window, whatever the rule above says of header links. */
header a.wing { position: fixed; z-index: 50; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
