/* ============================================================
   RAY EMILIO — DESIGN SYSTEM
   Ported from _redesign for rayemilio.com/*.dc.html
   Four colors, two typefaces, one rule weight (2px), one accent.
   ============================================================ */

/* --- 1. Tokens ------------------------------------------- */

:root {
  --paper: #fff;
  --ink: #000;
  --electric: #1a40ff;
  --muted: #666;

  --fill: #f4f4f2;
  --stripe: #f2f2f0;
  --body-ink: #222;
  --sub-ink: #444;
  --invert-muted: #bbb;
  --invert-line: #333;

  --rule: 2px solid #000;
  --rule-w: 2px;

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* Keep page content close to the viewport edge while retaining a
     deliberate, responsive gutter. */
  --pad-x: clamp(16px, 2vw, 24px);
  /* Narrative and information-heavy sections use a wider reading inset.
     Structural bands, grids, media, and controls continue to run full width. */
  --read-x: clamp(20px, 5vw, 72px);
  --pad-y: clamp(28px, 5vw, 64px);
}

/* --- 2. Base --------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font: inherit;
}

img,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
}

::selection {
  background: var(--electric);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--electric);
  outline-offset: -3px;
}

summary {
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

/* Build strips links whose target page is "off". */
.unpublished-link {
  display: none;
}

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

/* --- 3. Frame -------------------------------------------- */

.frame {
  width: 100%;
  min-height: 100vh;
}

/* --- 4. Nav ---------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: var(--rule);
  background: var(--paper);
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav__brand {
  padding: 17px 22px;
  border-right: var(--rule);
  white-space: nowrap;
}

.nav__brand span {
  color: var(--electric);
}

.nav__links {
  display: flex;
  grid-column: 3;
}

/* The header player is injected into every built page. It is hidden until a
   real track has played, so an idle header has exactly the same footprint as
   the original navigation. */
.mini-player[hidden] {
  display: none;
}

.mini-player {
  grid-column: 2;
  min-width: 0;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mini-player__play {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--electric);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.mini-player__play:hover,
.mini-player__play:focus-visible {
  background: var(--ink);
}

.mini-player__title {
  flex: 0 1 170px;
  min-width: 0;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.mini-player__bar {
  position: relative;
  flex: 1 1 120px;
  min-width: 45px;
  height: 16px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  background: repeating-linear-gradient(90deg, #000 0 1px, transparent 1px 7px);
}

.mini-player__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--electric);
  opacity: 0.85;
}

.mini-player__time {
  flex: none;
  min-width: 68px;
  text-align: right;
  white-space: nowrap;
}

.mini-player__native {
  display: none !important;
}

.nav__link {
  display: flex;
  align-items: center;
  padding: 17px 20px;
  border-left: var(--rule);
  transition: background 0.12s, color 0.12s;
}

.nav__link:hover,
.nav__link:focus-visible {
  background: var(--ink);
  color: #fff;
}

.nav__link[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}

.nav__link--cta {
  background: var(--electric);
  color: #fff;
}

.nav__link--cta:hover,
.nav__link--cta:focus-visible {
  background: var(--ink);
}

.nav__toggle {
  display: none;
  align-items: center;
  padding: 17px 20px;
  border-left: var(--rule);
  font: inherit;
  letter-spacing: 0.06em;
}

/* --- 5. Sections & bars ---------------------------------- */

.section {
  border-bottom: var(--rule);
}

.section--pad {
  padding: var(--pad-y) var(--read-x);
}

.section--invert {
  background: var(--ink);
  color: #fff;
}

.section--tall {
  padding-block: clamp(48px, 7vw, 96px);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px var(--pad-x);
  border-bottom: var(--rule);
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bar__meta {
  color: var(--muted);
}

.bar__link {
  color: var(--electric);
}

.bar__link:hover {
  text-decoration: underline;
}

.section--invert .bar {
  border-bottom-color: var(--electric);
}

.section--invert .bar__meta {
  color: var(--invert-muted);
}

/* Inner rules go grey against an inverted ground so they read as
   dividers rather than as the page frame. */
.section--invert .cell,
.section--invert .row,
.section--invert .price {
  border-color: var(--invert-line);
}

/* --- 6. Page header -------------------------------------- */

.crumb {
  margin-bottom: clamp(16px, 3vw, 26px);
  font: 700 12px/1.5 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crumb a {
  color: var(--muted);
}

.crumb a:hover {
  color: var(--electric);
}

.eyebrow {
  margin-bottom: clamp(18px, 3vw, 28px);
  font: 700 12px/1.5 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow--accent {
  color: var(--electric);
  letter-spacing: 0.14em;
  font-size: 13px;
}

.eyebrow--mark {
  color: var(--electric);
  letter-spacing: 0.1em;
}

.h1 {
  margin: 0;
  font: 700 clamp(52px, 11vw, 140px) / 0.86 var(--sans);
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.h1--xl {
  font-size: clamp(64px, 15vw, 196px);
  line-height: 0.84;
}

.h1--long {
  font-size: clamp(44px, 9.5vw, 124px);
}

.h2 {
  margin: 0 0 28px;
  font: 700 clamp(30px, 5vw, 58px) / 0.98 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.h2--sm {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
}

.h3 {
  font: 700 clamp(22px, 2.6vw, 28px) / 1.02 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.body-copy {
  margin: 0 0 16px;
  max-width: 46ch;
  font: 400 16px/1.5 var(--sans);
  color: var(--body-ink);
}

.body-copy:last-child {
  margin-bottom: 0;
}

.link-mono {
  display: inline-block;
  color: var(--electric);
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.link-mono:hover {
  text-decoration: underline;
}

.deck {
  margin: clamp(22px, 3vw, 34px) 0 0;
  max-width: 52ch;
  font: 400 clamp(17px, 2vw, 21px) / 1.45 var(--sans);
}

.lede {
  margin: 0;
  max-width: 48ch;
  font: 400 clamp(17px, 2vw, 22px) / 1.42 var(--sans);
}

.split-end {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
  margin-top: clamp(24px, 4vw, 44px);
}

/* --- 7. Buttons ------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 28px;
  border: var(--rule);
  font: 700 14px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.12s, color 0.12s;
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: #fff;
}

.btn--primary {
  background: var(--electric);
  color: #fff;
}

.btn--sm {
  padding: 16px;
  font-size: 13px;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn {
  flex: 1;
}

/* --- 8. Grids -------------------------------------------- */

.grid {
  display: grid;
}

.g2 {
  grid-template-columns: 1fr 1fr;
}

.g2-wide {
  grid-template-columns: 1.3fr 1fr;
}

.g3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.g4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* Cells are divided by borders, never gap. */
.cell {
  padding: clamp(24px, 3vw, 36px) 24px;
  border-right: var(--rule);
  border-bottom: var(--rule);
}

.cell--flush-r {
  border-right: 0;
}

.cell--flush-b {
  border-bottom: 0;
}

.cell--pad-lg {
  padding: clamp(28px, 4vw, 56px) var(--pad-x);
}

.cell--pad-xl {
  padding: clamp(36px, 5vw, 72px) var(--pad-x);
}

.cell--electric {
  background: var(--electric);
  color: #fff;
}

.cell--ink {
  background: var(--ink);
  color: #fff;
}

.cell__n {
  margin-bottom: 14px;
  font: 700 12px/1 var(--mono);
  color: var(--electric);
}

.cell--electric .cell__n {
  color: #fff;
  opacity: 0.85;
}

.cell__title {
  font: 700 clamp(22px, 2.6vw, 28px) / 1.02 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.cell__body {
  margin-top: 10px;
  font: 400 13px/1.5 var(--sans);
  color: var(--sub-ink);
}

.cell--electric .cell__body,
.cell--ink .cell__body {
  color: #fff;
  opacity: 0.9;
}

.cell--ink .cell__body {
  color: var(--invert-muted);
  opacity: 1;
}

/* Index cards: whole cell is a link that inverts on hover. */
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 148px;
  padding: clamp(22px, 3vw, 32px) 22px;
  border-right: var(--rule);
  border-bottom: var(--rule);
  transition: background 0.12s, color 0.12s;
}

.card:hover,
.card:focus-visible {
  background: var(--electric);
  color: #fff;
}

.card__n {
  font: 700 12px/1 var(--mono);
  color: var(--electric);
}

.card:hover .card__n,
.card:focus-visible .card__n {
  color: #fff;
}

.card__title {
  display: block;
  font: 700 clamp(24px, 3vw, 30px) / 1 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.card__body {
  display: block;
  margin-top: 8px;
  font: 400 12px/1.4 var(--mono);
  color: var(--muted);
}

.card:hover .card__body,
.card:focus-visible .card__body {
  color: #fff;
}

/* --- 9. Marquee ------------------------------------------ */

.marquee {
  overflow: hidden;
  border-bottom: var(--rule);
  background: var(--ink);
  color: #fff;
}

.marquee__inner {
  display: inline-flex;
  padding: 13px 0;
  white-space: nowrap;
  font: 700 15px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: marquee 32s linear infinite;
}

.marquee:hover .marquee__inner {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --- 10. Audio player ------------------------------------ */
/* Progressive enhancement: markup ships a native <audio controls>.
   site.js swaps in the custom transport and adds .player--ready. */

.player {
  display: flex;
  align-items: stretch;
  border-bottom: var(--rule);
}

/* Filtered rows must stay out of layout even though .player sets display. */
.player[hidden] {
  display: none;
}

.player:last-child {
  border-bottom: 0;
}

.player__play,
.player__bar,
.player__time {
  display: none;
}

.player--ready .player__play,
.player--pending .player__play {
  display: flex;
  align-items: center;
  justify-content: center;
}

.player--ready .player__bar,
.player--pending .player__bar {
  display: block;
}

.player--ready .player__time,
.player--pending .player__time {
  display: flex;
  align-items: center;
  justify-content: center;
}

.player--ready .player__native,
.player--pending .player__native {
  display: none;
}

.player__native {
  flex: 1;
  min-width: 180px;
  align-self: center;
  padding: 10px 14px;
}

.player__play {
  flex: none;
  width: 64px;
  border-right: var(--rule);
  background: var(--electric);
  color: #fff;
  font-size: 16px;
  transition: background 0.12s;
}

.player__play:hover,
.player__play:focus-visible {
  background: var(--ink);
}

.player__n {
  flex: none;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: var(--rule);
  font: 700 12px/1 var(--mono);
  color: var(--electric);
}

.player__meta {
  flex: none;
  width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px 18px;
  border-right: var(--rule);
}

.player__title {
  display: block;
  font: 700 17px/1.15 var(--sans);
  text-transform: uppercase;
}

.player__credit {
  display: block;
  margin-top: 3px;
  font: 400 12px/1.3 var(--mono);
  color: var(--muted);
}

.player__bar {
  position: relative;
  flex: 1;
  min-width: 60px;
  align-self: stretch;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  background: repeating-linear-gradient(90deg, #000 0 1px, transparent 1px 9px);
}

.player__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--electric);
  opacity: 0.85;
}

.player__tag {
  flex: none;
  width: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: var(--rule);
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
}

.player__time {
  flex: none;
  width: 108px;
  padding: 0 6px;
  border-left: var(--rule);
  font: 700 12px/1 var(--mono);
  text-align: center;
}

/* Row whose audio file has not been supplied yet. */
.player--pending .player__play {
  background: var(--fill);
  color: var(--muted);
  cursor: not-allowed;
}

.player--pending .player__title,
.player--pending .player__tag {
  color: var(--muted);
}

.player--pending .player__fill {
  background: var(--fill);
}

.player--pending .player__bar {
  cursor: default;
  opacity: 0.35;
}

.player--pending .player__time {
  color: var(--muted);
}

/* --- 11. Filter bar -------------------------------------- */

.filters {
  display: flex;
  overflow-x: auto;
  border-bottom: var(--rule);
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filters__btn {
  padding: 14px 20px;
  border-right: var(--rule);
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.filters__btn:last-child {
  border-right: 0;
}

.filters__btn:hover {
  background: var(--ink);
  color: #fff;
}

.filters__btn[aria-pressed="true"] {
  background: var(--electric);
  color: #fff;
}

/* --- 12. Stats, quotes, testimonials --------------------- */

.stat__n {
  font: 700 clamp(40px, 6vw, 72px) / 1 var(--sans);
  letter-spacing: -0.04em;
}

.stat__label {
  margin-top: 10px;
  font: 700 12px/1.3 var(--mono);
  color: var(--muted);
  text-transform: uppercase;
}

.cell--electric .stat__label,
.cell--ink .stat__label {
  color: #fff;
  opacity: 0.85;
}

.statement {
  margin: 0;
  max-width: 22ch;
  font: 700 clamp(32px, 5.5vw, 76px) / 0.98 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.statement--wide {
  max-width: 26ch;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1;
}

.statement--narrow {
  max-width: 20ch;
  font-size: clamp(34px, 6vw, 84px);
}

.attrib {
  margin-top: 24px;
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--electric);
  text-transform: uppercase;
}

.section--invert .statement + p {
  margin: 28px 0 0;
  max-width: 52ch;
  font: 400 clamp(15px, 2vw, 18px) / 1.5 var(--sans);
  color: var(--invert-muted);
}

.teaching-poem {
  display: grid;
  margin: 0;
  gap: 1.5em clamp(28px, 5vw, 72px);
  font: 400 clamp(18px, 2vw, 24px) / 1.6 var(--sans);
}

.teaching-poem p {
  margin: 0;
}

.teaching-poem p + p {
  margin-top: 1.5em;
}

@media (min-width: 800px) {
  .teaching-poem {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.testi__quote {
  margin: 0 0 18px;
  font: 500 clamp(17px, 2vw, 20px) / 1.4 var(--sans);
}

.testi__by {
  font: 700 12px/1.4 var(--mono);
  color: var(--electric);
  text-transform: uppercase;
}

/* --- 13. Numbered rows ----------------------------------- */

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: grid;
  grid-template-columns: 80px 1fr;
  border-bottom: var(--rule);
}

.row:last-child {
  border-bottom: 0;
}

.row--svc {
  grid-template-columns: 90px 1.1fr 1fr;
}

.row__n {
  padding: clamp(20px, 2.5vw, 30px) 22px;
  border-right: var(--rule);
  font: 700 clamp(28px, 4vw, 44px) / 1 var(--sans);
  color: var(--electric);
}

.row__main {
  padding: clamp(20px, 2.5vw, 30px) 24px;
}

.row--svc .row__main {
  align-self: center;
  border-right: var(--rule);
  font: 700 clamp(22px, 2.8vw, 32px) / 1 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.row__title {
  font: 700 19px/1.1 var(--sans);
  text-transform: uppercase;
}

.row__body {
  margin-top: 6px;
  max-width: 60ch;
  font: 400 14px/1.5 var(--sans);
  color: var(--sub-ink);
}

.row--svc .row__body {
  margin-top: 0;
  align-self: center;
  padding: clamp(20px, 2.5vw, 30px) 24px;
}

/* --- 14. Pricing ----------------------------------------- */

.price {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3vw, 40px) 26px;
  border-right: var(--rule);
  border-bottom: var(--rule);
}

.price__name {
  font: 700 22px/1 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.price__flag {
  padding: 4px 7px;
  vertical-align: middle;
  background: #fff;
  color: var(--electric);
  font: 700 10px/1 var(--mono);
}

.price__amount {
  margin: 18px 0 4px;
  font: 700 clamp(36px, 5vw, 56px) / 1 var(--sans);
  letter-spacing: -0.04em;
}

.price__tiers {
  display: grid;
  margin-top: 18px;
  border-top: var(--rule);
}

.price__tier {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: var(--rule);
  font: 700 14px/1 var(--mono);
  text-transform: uppercase;
}

.price__tier strong {
  font: 700 clamp(28px, 3.5vw, 42px) / 1 var(--sans);
  letter-spacing: -0.04em;
  text-transform: none;
}

.price__unit {
  font: 700 14px/1 var(--mono);
  color: var(--muted);
}

.price--electric .price__unit {
  color: #fff;
  opacity: 0.8;
}

.price__body {
  margin-top: 14px;
  font: 400 14px/1.5 var(--sans);
  color: var(--sub-ink);
}

.price--electric {
  background: var(--electric);
  color: #fff;
}

.price--electric .price__body {
  color: #fff;
  opacity: 0.92;
}

/* --- 15. Link / spec lists ------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
}

.linkrow {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 26px) 24px;
  border-bottom: var(--rule);
  font: 700 15px/1.3 var(--mono);
  text-transform: uppercase;
  transition: background 0.12s, color 0.12s;
}

.linkrow:last-child {
  border-bottom: 0;
}

a.linkrow:hover,
a.linkrow:focus-visible {
  background: var(--ink);
  color: #fff;
}

.linkrow__mark {
  color: var(--electric);
}

a.linkrow:hover .linkrow__mark,
a.linkrow:focus-visible .linkrow__mark {
  color: #fff;
}

.linkrow--spec {
  font-size: 13px;
}

.linkrow__value {
  color: var(--muted);
  text-align: right;
}

a.linkrow:hover .linkrow__value {
  color: #fff;
}

/* Coverage rows (press) */
.cov {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2.4vw, 26px) var(--pad-x);
  border-bottom: var(--rule);
  transition: background 0.12s, color 0.12s;
}

.cov:last-child {
  border-bottom: 0;
}

.cov:hover,
.cov:focus-visible {
  background: var(--electric);
  color: #fff;
}

.cov__title {
  font: 700 clamp(17px, 2vw, 22px) / 1.2 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.cov__src {
  font: 700 12px/1.3 var(--mono);
  white-space: nowrap;
  text-align: right;
  text-transform: uppercase;
}

/* --- 16. Media ------------------------------------------- */

.media {
  display: block;
  border-bottom: var(--rule);
}

.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keep the Lessons infographic at its native width so it stays crisp. */
.media--lessons-infographic {
  width: 100%;
  max-width: 970px;
  margin-inline: auto;
}

.media--lessons-infographic img {
  height: auto;
}

.media--band {
  height: clamp(220px, 32vw, 420px);
  overflow: hidden;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.gallery__cell {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-right: var(--rule);
  border-bottom: var(--rule);
}

.gallery__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed--tall {
  aspect-ratio: auto;
  height: 380px;
}

.embed--panel {
  aspect-ratio: auto;
  height: 620px;
}

.embed-cell {
  border-right: var(--rule);
  border-bottom: var(--rule);
}

.embed-cell__label {
  padding: 12px 16px;
  border-bottom: var(--rule);
  font: 700 11px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Placeholder tile for assets that have not been supplied yet. */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(220px, 32vw, 420px);
  background: repeating-linear-gradient(45deg, var(--stripe) 0 22px, #fff 22px 44px);
}

.placeholder__label {
  padding: 12px 18px;
  border: var(--rule);
  background: #fff;
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.1em;
  color: #999;
  text-transform: uppercase;
  text-align: center;
}

/* --- 17. Wordmark wall ----------------------------------- */

.wordmark {
  padding: clamp(28px, 3.5vw, 44px) 20px;
  border-right: var(--rule);
  border-bottom: var(--rule);
  font: 700 clamp(15px, 1.6vw, 19px) / 1.1 var(--sans);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-align: center;
  transition: background 0.12s, color 0.12s;
}

a.wordmark:hover,
a.wordmark:focus-visible {
  background: var(--ink);
  color: #fff;
}

.wordmark--accent {
  color: var(--electric);
}

/* --- 18. FAQ (native details, zero JS) ------------------- */

.faq__item {
  border-bottom: var(--rule);
}

.faq__item:last-child {
  border-bottom: 0;
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2.4vw, 26px) var(--pad-x);
  font: 700 clamp(17px, 2vw, 21px) / 1.2 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.faq__x {
  flex: none;
  color: var(--electric);
  font-size: 22px;
  transition: transform 0.12s;
}

.faq__item[open] .faq__x {
  transform: rotate(45deg);
}

.faq__a {
  padding: 0 var(--pad-x) clamp(20px, 2.6vw, 28px);
  max-width: 68ch;
  font: 400 15px/1.55 var(--sans);
  color: var(--sub-ink);
}

/* --- 19. Footer ------------------------------------------ */

.foot {
  display: flex;
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.foot > * {
  flex: 1;
  padding: 18px 22px;
  border-right: var(--rule);
}

.foot > *:last-child {
  border-right: 0;
}

.foot__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.foot__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  text-align: right;
}

.foot__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.foot__social-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.foot a:hover {
  color: var(--electric);
}

/* --- 20. Prose (legacy page bodies) ---------------------- */
/* Legacy content keeps its own markup; this gives it the
   design system's typography inside the same frame. */

.prose {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(28px, 4vw, 56px) var(--read-x) clamp(40px, 6vw, 80px);
}

.prose > * {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.prose h1 {
  margin: 0 0 clamp(20px, 3vw, 32px);
  font: 700 clamp(40px, 8vw, 96px) / 0.9 var(--sans);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  max-width: none;
}

.prose h2 {
  margin: clamp(36px, 5vw, 56px) 0 16px;
  padding-top: 16px;
  border-top: var(--rule);
  font: 700 clamp(22px, 3vw, 34px) / 1.05 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.prose h3,
.prose h4 {
  margin: 28px 0 10px;
  font: 700 13px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prose p,
.prose li,
.prose dd,
.prose article,
.prose section,
.prose figcaption,
.prose div {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose a {
  color: var(--electric);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.prose a:hover {
  background: var(--electric);
  color: #fff;
  text-decoration: none;
}

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose dt {
  margin-top: 1em;
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose dd {
  margin: 0 0 0.2em;
  color: var(--sub-ink);
}

.prose hr {
  width: 100% !important;
  height: 0;
  margin: clamp(32px, 5vw, 56px) 0;
  border: 0;
  border-top: var(--rule);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 24px;
  border-left: var(--rule);
  font: 500 clamp(17px, 2vw, 21px) / 1.4 var(--sans);
}

.prose blockquote p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.prose figure {
  margin: clamp(28px, 4vw, 44px) 0;
  max-width: none;
}

.prose figcaption {
  margin-bottom: 10px;
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.prose .testimonials figcaption {
  margin: 8px 0 0;
  color: var(--electric);
}

.page-teaching-testimonials .testimonials {
  column-gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

/* Contact fields borrow the site's ruled, high-contrast visual language. */
.contact-form {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(0, 4fr);
  gap: 22px 28px;
  max-width: 900px;
  margin: 32px 0;
  padding: 28px 0;
  border-block: var(--rule);
}

.contact-form > label {
  align-self: start;
  padding-top: 14px;
  font: 700 12px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-form > label span {
  color: var(--muted);
}

.contact-form__input {
  width: 100%;
  min-width: 0;
  padding: 13px 15px;
  border: var(--rule);
  border-radius: 0;
  background: var(--fill);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
}

textarea.contact-form__input {
  resize: vertical;
  min-height: 180px;
}

.contact-form__input:focus-visible {
  outline: 3px solid var(--electric);
  outline-offset: 3px;
}

.contact-form__submit {
  grid-column: 2;
  justify-self: start;
  min-height: 48px;
  padding: 14px 32px;
  border: var(--rule);
  background: var(--electric);
  color: #fff;
  font: 700 13px/1.4 var(--mono);
  text-transform: uppercase;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  background: var(--ink);
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.contact-form .contact-form__status {
  grid-column: 2;
  margin: 0;
  font: 500 15px/1.5 var(--sans);
}

.contact-form__status:empty {
  display: none;
}

.contact-form__status--error {
  color: #a12020;
}

.contact-form__status--success {
  color: var(--electric);
}

.contact-form__trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.prose iframe {
  max-width: 100%;
  border: var(--rule);
}

.prose img {
  border: var(--rule);
}

.prose .image-gallery,
.prose .product-grid,
.prose .articles,
.prose .products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin: clamp(24px, 3vw, 36px) 0;
  padding: 0;
  max-width: none;
  list-style: none;
  border-top: var(--rule);
  border-left: var(--rule);
}

.prose .image-gallery > *,
.prose .product-grid > li,
.prose .articles > li,
.prose .products-list > li {
  margin: 0;
  padding: 14px;
  border-right: var(--rule);
  border-bottom: var(--rule);
}

.prose .image-gallery img,
.prose .product-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 0;
}

/* Sheet-music pages need their full portrait pages readable, not cropped into
   square thumbnails. Keep this treatment local to the Unreleased page. */
.prose .page-compositions .image-gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.prose .page-compositions .image-gallery > .image-link {
  display: block;
  padding: clamp(10px, 1.5vw, 18px);
  background: var(--fill);
  transition: background-color 140ms ease;
}

.prose .page-compositions .image-gallery > .image-link:hover,
.prose .page-compositions .image-gallery > .image-link:focus-visible {
  background: var(--electric);
}

.prose .page-compositions .image-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 2480 / 3509;
  object-fit: contain;
}

/* Unreleased is a compact, single-panel listening surface. The HTML keeps
   every panel available when JavaScript is unavailable; the [hidden] state
   below takes panels out of layout after the tabs are enhanced. */
.prose .page-compositions .unreleased-tabs {
  margin-top: clamp(26px, 4vw, 46px);
}

.prose .page-compositions .unreleased-tabs__tablist {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-top: var(--rule);
  border-left: var(--rule);
  scrollbar-width: thin;
}

.prose .page-compositions .unreleased-tabs__tab {
  flex: 0 0 auto;
  padding: 13px 16px;
  border-right: var(--rule);
  border-bottom: var(--rule);
  background: var(--fill);
  font: 700 11px/1.25 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}

.prose .page-compositions .unreleased-tabs__tab:hover,
.prose .page-compositions .unreleased-tabs__tab:focus-visible,
.prose .page-compositions .unreleased-tabs__tab[aria-selected="true"] {
  background: var(--electric);
  color: #fff;
}

.prose .page-compositions .unreleased-tabs__panels {
  border-bottom: 0;
}

.prose .page-compositions .unreleased-tabs__panel {
  margin: 0;
  padding: clamp(24px, 4vw, 48px) 0 0;
}

.prose .page-compositions .unreleased-tabs__panel[hidden] {
  display: none;
}

.prose .page-compositions .unreleased-tabs__panel h2,
.prose .page-compositions .unreleased-tabs__panel header h2 {
  margin: 0 0 clamp(14px, 2vw, 22px);
  padding: 0;
  border: 0;
  font: 700 clamp(20px, 2.4vw, 30px) / 1 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.prose .page-compositions .unreleased-tabs__description {
  max-width: 72ch;
  margin: 0 0 clamp(22px, 3vw, 34px);
  color: var(--body-ink);
}

.prose .page-compositions .unreleased-tabs__panel .audio {
  margin: 0 0 clamp(26px, 4vw, 46px);
  border-top: var(--rule);
}

.prose .page-compositions .unreleased-tabs__panel .player__play {
  width: 48px;
}

.prose .page-compositions .unreleased-tabs__panel .player__meta {
  width: min(290px, 34%);
  padding: 11px 14px;
}

.prose .page-compositions .unreleased-tabs__panel .player__title {
  font-size: 14px;
  line-height: 1.2;
}

.prose .page-compositions .unreleased-tabs__panel .video {
  margin: clamp(28px, 4vw, 52px) 0 0;
}

/* In-page score viewer. Native dialog supplies modal semantics and a focus
   boundary; the image remains a same-page href fallback if JS is unavailable. */
.prose .page-compositions .score-modal {
  width: min(96vw, 1100px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: var(--rule);
  background: var(--paper);
  color: var(--ink);
}

.prose .page-compositions .score-modal::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.prose .page-compositions .score-modal__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(94vh - 4px);
}

.prose .page-compositions .score-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: var(--rule);
}

.prose .page-compositions .score-modal__title {
  margin: 0;
  padding: 0;
  border: 0;
  font: 700 clamp(18px, 2.2vw, 28px) / 1.1 var(--sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.prose .page-compositions .score-modal__close,
.prose .page-compositions .score-modal__control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 48px;
  min-height: 48px;
  border: var(--rule);
  background: var(--paper);
  font: 700 24px/1 var(--sans);
  transition: background-color 140ms ease, color 140ms ease;
}

.prose .page-compositions .score-modal__close:hover,
.prose .page-compositions .score-modal__close:focus-visible,
.prose .page-compositions .score-modal__control:hover,
.prose .page-compositions .score-modal__control:focus-visible {
  background: var(--electric);
  color: #fff;
}

.prose .page-compositions .score-modal__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 2vw, 22px);
  min-height: 0;
  padding: clamp(12px, 2vw, 24px);
}

.prose .page-compositions .score-modal__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.prose .page-compositions .score-modal__figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(76vh, 900px);
  aspect-ratio: 2480 / 3509;
  object-fit: contain;
  border: var(--rule);
}

.prose .page-compositions .score-modal__figure figcaption {
  margin: 10px 0 0;
  color: var(--ink);
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.prose .page-compositions .score-modal__count {
  margin: 0;
  padding: 10px 18px 14px;
  color: var(--muted);
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

/* Released has one large page title followed by several catalog sections.
   Keep the section rhythm and heading scale local to this page. */
.prose .page-songs > section {
  margin-top: clamp(36px, 5vw, 64px);
}

.prose .page-songs > section + section {
  margin-top: clamp(48px, 7vw, 88px);
}

.prose .page-songs > h1,
.prose .page-songs > section h1 {
  margin: 0 0 clamp(16px, 2vw, 26px);
  padding: 0;
  border: 0;
  font: 700 clamp(20px, 2.3vw, 30px) / 1.08 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.prose .page-songs > h1 {
  margin-top: clamp(48px, 7vw, 88px);
}

.prose .page-songs > h1 + section {
  margin-top: 0;
}

/* Meeting and payment logos are wide wordmarks, not square thumbnails.
   Give each one a generous card and preserve its original proportions so
   the whole card remains an obvious, comfortable hit target. */
.prose.page-meeting .image-gallery,
.prose.page-pay .image-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.prose.page-meeting .image-gallery > *,
.prose.page-pay .image-gallery > * {
  min-height: clamp(160px, 17vw, 220px);
  padding: clamp(20px, 3vw, 34px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prose.page-meeting .image-gallery .image-link,
.prose.page-pay .image-gallery .image-link {
  color: inherit;
  text-decoration: none;
  transition: background-color 140ms ease;
}

.prose.page-meeting .image-gallery .image-link:hover,
.prose.page-meeting .image-gallery .image-link:focus-visible,
.prose.page-pay .image-gallery .image-link:hover,
.prose.page-pay .image-gallery .image-link:focus-visible {
  background: var(--electric);
}

.prose.page-meeting .image-gallery img,
.prose.page-pay .image-gallery img {
  width: 100%;
  height: auto;
  max-height: 180px;
  aspect-ratio: auto;
  object-fit: contain;
}

.prose.page-pay .pay-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(28px, 4vw, 48px) 0 0;
  border-top: var(--rule);
  border-left: var(--rule);
}

.prose.page-pay .pay-detail {
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  border-right: var(--rule);
  border-bottom: var(--rule);
}

.prose.page-pay .pay-detail h3 {
  margin: 0 0 20px;
  color: var(--ink);
}

.prose.page-pay .pay-detail h3 + dl + h3 {
  margin-top: 32px;
}

.prose.page-pay .pay-detail dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.prose.page-pay .pay-detail dt,
.prose.page-pay .pay-detail dd {
  margin: 0;
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.04em;
}

.prose.page-pay .pay-detail dt {
  color: var(--muted);
}

.prose.page-pay .pay-detail dd {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .prose.page-meeting .image-gallery,
  .prose.page-pay .image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .prose .page-compositions .unreleased-tabs__tablist {
    flex-wrap: wrap;
    overflow-x: hidden;
  }

  .prose .page-compositions .unreleased-tabs__tab {
    flex: 1 1 12rem;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .prose.page-meeting .image-gallery,
  .prose.page-pay .image-gallery {
    grid-template-columns: 1fr;
  }

  .prose.page-meeting .image-gallery > *,
  .prose.page-pay .image-gallery > * {
    min-height: 150px;
  }

  .prose.page-pay .pay-details {
    grid-template-columns: 1fr;
  }

  .prose .page-compositions .score-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .prose .page-compositions .score-modal__panel {
    max-height: calc(100vh - 24px);
  }

  .prose .page-compositions .score-modal__body {
    gap: 6px;
    padding: 8px;
  }

  .prose .page-compositions .score-modal__close,
  .prose .page-compositions .score-modal__control {
    min-width: 42px;
    min-height: 42px;
  }

  .prose .page-compositions .score-modal__figure img {
    max-height: calc(100vh - 170px);
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .prose.page-pay .pay-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.prose .image-gallery iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

/* Legacy video collections become deliberate media cards without changing
   the full-width structural rhythm of the page. */
.prose .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(24px, 4vw, 44px) 0;
  border-top: var(--rule);
  border-left: var(--rule);
}

.prose .video-grid > figure,
.prose .video-grid > iframe {
  min-width: 0;
  margin: 0;
  border: 0;
  border-right: var(--rule);
  border-bottom: var(--rule);
  background: var(--fill);
}

.prose .video-grid > figure {
  display: flex;
  flex-direction: column;
}

.prose .video-grid figcaption {
  min-height: 74px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: var(--rule);
  color: var(--ink);
}

.prose .video-grid figcaption .grid {
  display: block;
}

.prose .video-grid iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

/* Released's video collection is compact on larger screens while preserving
   a readable 16:9 player; stacked players get breathing room on phones. */
.prose .page-songs .music-videos .video-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 641px) and (max-width: 900px) {
  .prose .page-songs .music-videos .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .prose .page-songs .music-videos .video-grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
    border-bottom: 0;
  }

  .prose .page-songs .music-videos .video-grid > iframe {
    border-bottom: var(--rule);
  }
}

/* Sound Bath is a centered, editorial page rather than a full-width prose
   surface. Keep the treatment scoped so other legacy pages are unchanged. */
.prose .page-wellness {
  width: min(100%, 900px);
  margin-inline: auto;
  text-align: center;
}

.prose .page-wellness > article {
  width: 100%;
  margin-inline: auto;
}

.prose .page-wellness h1 {
  max-width: 860px;
  margin: 0 auto clamp(26px, 4vw, 42px);
  font: 500 clamp(25px, 3.2vw, 42px) / 1.16 var(--mono);
  letter-spacing: 0.08em;
  text-transform: none;
  text-wrap: balance;
}

.prose .page-wellness h1 div {
  font: inherit;
  line-height: inherit;
}

.prose .page-wellness .training {
  width: 100%;
  margin: 0 auto clamp(36px, 5vw, 58px);
  padding: 0;
  list-style: none;
  text-align: center;
}

.prose .page-wellness .training small {
  display: block;
  font: 500 clamp(10px, 1.25vw, 14px) / 1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.prose .page-wellness .training li {
  margin: 0;
}

.prose .page-wellness > article > hr {
  width: min(70%, 560px) !important;
  margin: 0 auto clamp(58px, 8vw, 88px);
  border-top: 1px solid currentColor;
}

.prose .page-wellness figure {
  width: min(100%, 760px);
  margin: 0 auto clamp(28px, 4vw, 48px);
}

.prose .page-wellness > article:first-child > div > figure {
  text-align: left;
}

.prose .page-wellness img {
  display: block;
  margin-inline: auto;
  border: 0;
}

.prose .page-wellness > article:first-child img {
  width: min(100%, 620px);
}

.prose .page-wellness .experience {
  margin-top: clamp(44px, 7vw, 76px);
}

.prose .page-wellness .experience figure {
  margin-bottom: clamp(34px, 5vw, 56px);
}

.prose .page-wellness .instruments {
  display: inline-block;
  margin: 0;
  padding-left: 1.25em;
  text-align: left;
}

.prose .page-wellness .experience > div:last-child img {
  width: min(100%, 398px);
}

@media (max-width: 640px) {
  .prose .page-wellness h1 {
    font-size: clamp(24px, 7vw, 36px);
    letter-spacing: 0.045em;
  }

  .prose .page-wellness .training small {
    letter-spacing: 0.035em;
  }

  .prose .page-wellness > article > hr {
    width: 82% !important;
  }
}

/* The Articles page contains linked cover images rather than video embeds,
   but it follows the same orderly card-grid language. */
.prose .page-articles .articles {
  display: block;
  margin: clamp(24px, 4vw, 44px) 0;
  padding: 0;
  border: 0;
}

.prose .page-articles .articles > .grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 0;
  border-top: var(--rule);
  border-left: var(--rule);
}

.prose .page-articles .articles .column,
.prose .page-articles .articles .column > div {
  display: contents;
}

.prose .page-articles .articles .image-link {
  display: block;
  padding: 8px;
  border-right: var(--rule);
  border-bottom: var(--rule);
  background: var(--fill);
}

.prose .page-articles .articles .image-link:hover,
.prose .page-articles .articles .image-link:focus-visible {
  background: var(--electric);
}

.prose .page-articles .articles .image-link img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 0;
}

/* Keep the comments label at the same compact secondary-heading scale used
   by the Released and Unreleased catalog sections. */
.prose .page-articles .comments > header h1 {
  margin: 0 0 clamp(16px, 2vw, 26px);
  padding: 0;
  border: 0;
  font: 700 clamp(20px, 2.3vw, 30px) / 1.08 var(--sans);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.prose .product-grid p {
  margin: 8px 0 0;
  font: 700 11px/1.4 var(--mono);
  text-transform: uppercase;
}

.prose input[type="text"],
.prose input[type="search"] {
  width: 100%;
  max-width: 34ch;
  padding: 14px 16px;
  border: var(--rule);
  font: 700 13px/1 var(--mono);
  text-transform: uppercase;
}

.prose input:focus-visible {
  outline: 3px solid var(--electric);
  outline-offset: 0;
}

.prose audio {
  width: 100%;
}

.prose .audio-item {
  margin: 0;
}

/* --- 21. Responsive -------------------------------------- */

@media (max-width: 900px) {
  .nav__toggle {
    display: flex;
    grid-column: 3;
  }

  .nav__links {
    display: none;
    grid-column: 1 / -1;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: var(--paper);
    border-bottom: var(--rule);
    /* Keep the menu/header seam solid even if a theme overrides --rule. */
    border-top: 2px solid var(--ink);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    z-index: 60;
  }

  .mini-player {
    width: min(100%, 430px);
  }

  .nav--open .nav__links,
  .nav__toggle[aria-expanded="true"] + .nav__links {
    display: flex;
  }

  .nav__link {
    padding: 16px 22px;
    border-left: 0;
    border-bottom: var(--rule);
  }

  .nav__link:last-child {
    border-bottom: 0;
  }

  .g3,
  .g4 {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .g2,
  .g2-wide,
  .split-end {
    grid-template-columns: 1fr;
  }

  .split-end > * + * {
    margin-top: 8px;
  }

  .row--svc {
    grid-template-columns: 1fr;
  }

  .row--svc .row__n,
  .row--svc .row__main {
    border-right: 0;
    border-bottom: var(--rule);
  }

  .cov {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cov__src {
    text-align: left;
  }

  .prose .page-articles .articles > .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* A cell that only had a right border now needs a bottom one. */
  .cell--flush-b,
  .price {
    border-bottom: var(--rule);
  }
}

@media (max-width: 640px) {
  .mini-player {
    gap: 5px;
    padding-inline: 6px;
  }

  .mini-player__title {
    flex-basis: 0;
    flex-grow: 1;
  }

  .mini-player__time {
    min-width: 56px;
    font-size: 10px;
  }

  .mini-player__bar {
    flex-basis: 58px;
  }

  .mini-player__title {
    overflow: hidden;
  }

  .nav__brand {
    padding-inline: 14px;
  }

  .nav__toggle {
    padding-inline: 12px;
  }

  /* The open mobile menu has an explicit solid seam against the header. */
  .nav,
  .nav__links {
    border-bottom: 2px solid var(--ink);
  }

  /* Higher specificity preserves two columns over the generic .g3 rule. */
  .grid.grid--lesson-list {
    grid-template-columns: 1fr 1fr;
  }

  .grid--lesson-list .cell {
    padding: 22px 14px;
    border-right: var(--rule);
    border-bottom: var(--rule);
  }

  .grid--lesson-list .cell:nth-child(even) {
    border-right: 0;
  }

  .grid--lesson-list .cell--empty {
    display: none;
  }

  .grid--lesson-list:not(.grid--subjects) .cell:last-child,
  .grid--subjects .cell:nth-child(5) {
    border-bottom: 0;
  }

  .grid--lesson-list .cell__title {
    font-size: clamp(18px, 5.5vw, 24px);
  }

  .grid--lesson-list .cell__n {
    margin-bottom: 10px;
  }

  .g2,
  .g3,
  .g4,
  .gallery {
    grid-template-columns: 1fr;
  }

  .cell,
  .card,
  .price,
  .gallery__cell,
  .wordmark,
  .embed-cell {
    border-right: 0;
  }

  .player {
    flex-wrap: wrap;
  }

  .player__meta {
    width: auto;
    flex: 1;
    border-right: 0;
  }

  .player__tag {
    display: none;
  }

  .player--ready .player__bar {
    flex-basis: 100%;
    min-height: 34px;
    border-top: var(--rule);
  }

  .player__time {
    width: auto;
    flex: none;
    padding: 0 14px;
  }

  .btn-row {
    flex-direction: column;
  }

  .foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  }

  .foot > * {
    min-width: 0;
    padding: 14px 8px;
    border-right: var(--rule);
    border-bottom: 0;
    text-align: center;
  }

  .foot > *:first-child {
    text-align: left;
  }

  .foot > *:last-child {
    border-right: 0;
  }

  .foot__email {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .foot__contact {
    justify-content: center;
    gap: 6px;
  }

  .foot__social {
    flex-shrink: 0;
  }

  .contact-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .contact-form > label {
    padding-top: 12px;
  }

  .contact-form__submit,
  .contact-form .contact-form__status {
    grid-column: 1;
    margin-top: 12px;
  }

  .foot__meta {
    justify-content: flex-end;
    flex-wrap: wrap;
    text-align: right;
  }

  .prose .image-gallery,
  .prose .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .prose .video-grid,
  .prose .page-articles .articles > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .mini-player {
    gap: 3px;
    padding-inline: 2px;
  }

  .mini-player__title {
    display: none;
  }

  .mini-player__bar {
    min-width: 34px;
    flex-basis: 34px;
  }

  .mini-player__time {
    min-width: 50px;
    font-size: 9px;
  }
}

/* --- 22. Motion & print ---------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee__inner {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .nav,
  .marquee,
  .player__play,
  .player__bar,
  .player__time {
    display: none !important;
  }

  .frame {
    border: 0;
    max-width: none;
  }
}

/* --- Student lesson photos: static masonry ---------------- */
.student-gallery {
  border-bottom: var(--rule);
}

.student-gallery__track {
  column-count: 2;
  column-gap: clamp(12px, 2vw, 20px);
  padding: clamp(12px, 2vw, 20px) var(--pad-x);
}

.student-gallery__item {
  display: block;
  width: 100%;
  margin: 0 0 clamp(12px, 2vw, 20px);
  break-inside: avoid;
}

.student-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 700px) {
  .student-gallery__track {
    column-count: 3;
  }
}

@media (min-width: 1100px) {
  .student-gallery__track {
    column-count: 4;
  }
}

@media (max-width: 359px) {
  .student-gallery__track {
    column-count: 1;
  }
}
