:root {
  --fg: #1b1b1b;
  --muted: #666;
  --accent: #6b3410;
  --bg: #fbf9f5;
  --bg-alt: #f1ede4;
  --rule: #d8d2c4;
  --link: #2a5d8f;
  --max: 920px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* The UA stylesheet only sets [hidden] { display: none } at its own low
   precedence, so ANY author rule that sets display (e.g. .surprise-card:
   display: grid) silently defeats the attribute and renders hidden nodes.
   That shipped: /surprise/ drew all 37 cards at once instead of dealing one.
   Restate the rule here so the attribute always wins. */
[hidden] { display: none !important; }

body {
  font: 16px/1.55 Georgia, "Iowan Old Style", Palatino, serif;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-alt);
}
.site-title {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.site-header nav a { margin-left: 1rem; color: var(--fg); }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
main > article:not(.composer-chapter),
main > section:not(.works-index):not(.composer-chapter) {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.4rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

h1 { font-size: 2rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }

.landing { max-width: 720px; margin: 0 auto 2rem; text-align: center; }
.landing h1 { margin-top: 0.5rem; font-weight: 400; font-variant: small-caps; letter-spacing: 0.04em; }
.landing-lede { color: #4a4a4a; font-size: 1.05rem; line-height: 1.6; }

.featured-composers, .composer-index {
  max-width: 960px;
  margin: 0 auto 2.5rem;
}
.featured-composers h2, .composer-index h2 {
  text-align: center;
  font-weight: 400;
  font-variant: small-caps;
  letter-spacing: 0.15em;
  border: none;
  color: var(--accent);
  margin-bottom: 1rem;
}
.composer-index-help { text-align: center; color: var(--muted); margin: 0 0 1.2rem; font-size: 0.9rem; font-style: italic; }

.featured-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 0;
}
.featured-list li { background: var(--bg-alt); border: 1px solid var(--rule); border-radius: 4px; }
.featured-link {
  display: block;
  padding: 1rem 1.2rem;
  color: inherit;
  text-decoration: none;
}
.featured-link:hover { background: #ede8d8; }
.featured-name { display: block; font-size: 1.15rem; font-weight: 600; color: var(--accent); }
.featured-dates { display: block; color: var(--muted); font-size: 0.85rem; font-style: italic; margin: 0.15rem 0; }
.featured-count { display: block; color: var(--muted); font-size: 0.8rem; font-family: var(--mono); }

.composer-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.2rem 1.4rem;
  margin: 0;
  font-size: 0.92rem;
}
.composer-grid li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.25rem 0;
  border-bottom: 1px dotted var(--rule);
}
.composer-grid a { color: var(--fg); }
.composer-grid a:hover { color: var(--accent); }
.composer-grid-count { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }

.composer-stub { max-width: var(--max); margin: 0 auto 2.5rem; }
.composer-stub-body { color: #3a3a3a; line-height: 1.6; }
.composer-stub-body .enriched-heading {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  text-align: center;
  color: #6a5a3a;
  font-size: 0.92rem;
  margin: 1.4rem 0 0.6rem;
}
.composer-stub-body hr {
  border: none;
  border-top: 1px solid #d8cfbe;
  max-width: 60%;
  margin: 1.6rem auto 0;
}

/* ─── Timeline strip (alternating, equal-spaced) ──────────────── */
.chapter-timeline {
  margin: 0 auto 2rem;
  max-width: 960px;
  padding: 1rem 1rem 1.5rem;
}
.timeline-bar {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  position: relative;
  border-top: 2px solid var(--accent);
  margin-top: 6rem;     /* room for the upper labels */
  padding: 1.6rem 0 5.6rem;  /* room for dots + lower labels */
}
.timeline-event {
  position: relative;
  text-align: center;
}
.timeline-dot {
  position: absolute;
  top: -1.85rem;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px var(--bg);
}
.timeline-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 9.5rem;
  text-align: center;
}
.timeline-up .timeline-label   { bottom: 2rem; }
.timeline-down .timeline-label { top: 2rem; }
.timeline-year {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}
.timeline-text {
  display: block;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #3a3a3a;
  margin-top: 0.15rem;
}

@media (max-width: 720px) {
  .chapter-timeline { padding: 0; }
  .timeline-bar {
    display: block;
    border: none;
    margin: 0;
    padding: 0;
  }
  .timeline-event {
    display: grid;
    grid-template-columns: 4rem 1fr;
    column-gap: 0.8rem;
    padding: 0.4rem 0;
    border-bottom: 1px dotted var(--rule);
    text-align: left;
  }
  .timeline-dot { display: none; }
  .timeline-label {
    position: static;
    transform: none;
    width: auto;
    display: contents;
  }
  .timeline-year { text-align: right; }
}

/* ─── "Where to start" listening guide ───────────────────────── */
.listening-guide {
  max-width: 920px;
  margin: 1rem auto 2rem;
  background: #fdf8e8;
  border: 1px solid #e8d99a;
  border-left: 4px solid var(--accent);
  padding: 1.2rem 1.6rem 1.4rem;
  border-radius: 3px;
}
.listening-guide h3 {
  margin: 0 0 0.8rem;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 400;
  font-size: 1rem;
}
.listening-guide ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  counter-reset: pick;
}
.listening-guide li {
  counter-increment: pick;
  position: relative;
  padding-left: 1.6rem;
}
.listening-guide li::before {
  content: counter(pick, decimal);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 600;
  opacity: 0.6;
}
.pick-link {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.2rem;
}
.pick-link:hover .pick-title { text-decoration: underline; }
.pick-cat {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.pick-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}
.pick-blurb {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #3a3a3a;
}
.pick-spotify {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #1db954;
  border: 1px solid #1db954;
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
}
.pick-spotify::before { content: "\25B6  "; font-size: 0.6rem; }
.pick-spotify:hover { background: #1db954; color: #fff; }
.work-listen { margin: 0.4rem 0 0; }
.badge.spotify-badge {
  color: #1db954;
  border: 1px solid #1db954;
  background: transparent;
  text-decoration: none;
}
.badge.spotify-badge:hover { background: #1db954; color: #fff; }
.genre-tags { margin: 0.45rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.genre-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}
.scores-hint {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  border-left: 2px solid #1db954;
  padding-left: 0.6rem;
}

/* ─── Geographic map ─────────────────────────────────────────── */
.chapter-map {
  margin: 1.5rem auto 2rem;
  padding: 0;
}
.chapter-map svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.chapter-map figcaption {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0.6rem auto 0;
  font-style: italic;
  text-align: center;
  max-width: 760px;
}

/* Historic-map mode: real engraving + absolute-positioned pins */
.map-historic {
  position: relative;
  margin: 0 auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 4px 14px rgba(0,0,0,0.06);
}
.map-historic img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #c9b88a;
}
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: Georgia, "Iowan Old Style", serif;
}
.map-pin-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #8b0000;
  border: 1.5px solid #fdf3da;
  box-shadow: 0 0 0 1px #8b0000, 0 1px 2px rgba(0,0,0,0.4);
  margin: 0 auto;
}
.map-pin-anchor .map-pin-dot {
  width: 15px;
  height: 15px;
  background: radial-gradient(circle at 35% 30%, #c83232, #6e0707);
}
.map-pin-footnote .map-pin-dot {
  width: 9px;
  height: 9px;
  background: #5a4423;
}
.map-pin-name,
.map-pin-role {
  position: absolute;
  white-space: nowrap;
  background: rgba(253, 243, 218, 0.94);
  border: 1px solid rgba(139, 0, 0, 0.4);
  border-radius: 2px;
  padding: 0.1rem 0.45rem;
  pointer-events: auto;
}
.map-pin-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a1a0a;
  letter-spacing: 0.02em;
}
.map-pin-role {
  font-size: 0.65rem;
  color: #5a3a1a;
  font-style: italic;
  font-weight: 400;
  margin-top: 0.05rem;
}

/* Label offset variants */
.map-label-right .map-pin-name,
.map-label-right .map-pin-role {
  left: 14px;
  transform: translateY(-50%);
}
.map-label-right .map-pin-name { top: 50%; }
.map-label-right .map-pin-role { top: calc(50% + 0.95rem); }

.map-label-top-right .map-pin-name { left: 12px; bottom: 6px; }
.map-label-top-right .map-pin-role { left: 12px; bottom: -8px; }

.map-label-bottom-right .map-pin-name { left: 12px; top: 6px; }
.map-label-bottom-right .map-pin-role { left: 12px; top: calc(6px + 1rem); }

.map-label-bottom-left .map-pin-name  { right: 12px; top: 6px; }
.map-label-bottom-left .map-pin-role  { right: 12px; top: calc(6px + 1rem); }

.map-label-left .map-pin-name,
.map-label-left .map-pin-role {
  right: 14px;
  transform: translateY(-50%);
}
.map-label-left .map-pin-name { top: 50%; }
.map-label-left .map-pin-role { top: calc(50% + 0.95rem); }

.map-pin-anchor .map-pin-name { font-size: 0.95rem; }
.map-pin-footnote .map-pin-name { color: #5a4423; font-weight: 600; }
.map-pin-footnote .map-pin-role { color: #6a5433; }

@media (max-width: 720px) {
  .map-pin-name { font-size: 0.7rem; padding: 0.05rem 0.3rem; }
  .map-pin-role { display: none; }
}


/* ─── Composer page: book-chapter layout ──────────────────────── */

.composer-chapter {
  max-width: 1080px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.chapter-header {
  text-align: center;
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}
.chapter-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.chapter-header h1 {
  font-size: 2.4rem;
  margin: 0 0 0.4rem;
  font-weight: 400;
  font-variant: small-caps;
  letter-spacing: 0.02em;
}
.chapter-header .dates {
  color: var(--muted);
  font-style: italic;
  margin: 0;
  font-size: 1rem;
}

.chapter-body {
  font-size: 1.05rem;
  line-height: 1.7;
  hyphens: auto;
  text-align: justify;
}
.chapter-body p { margin: 0 0 1rem; }
.chapter-body h2 {
  text-align: center;
  font-weight: 400;
  font-variant: small-caps;
  letter-spacing: 0.15em;
  font-size: 1.1rem;
  color: var(--accent);
  border: none;
  margin: 2.5rem 0 1.2rem;
  position: relative;
}
.chapter-body h2::before,
.chapter-body h2::after {
  content: "";
  display: inline-block;
  width: 2.5rem;
  border-top: 1px solid var(--rule);
  vertical-align: middle;
  margin: 0 0.8rem;
}
.chapter-body hr {
  display: none;  /* markdown --- is decorative; we use h2 dividers instead */
}

.chapter-body .dropcap {
  font-size: 4.2rem;
  float: left;
  line-height: 0.9;
  padding: 0.25rem 0.7rem 0 0;
  color: var(--accent);
  font-family: Georgia, serif;
}

.chapter-body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  margin: 1.5rem 0;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-style: italic;
  color: #4a3a25;
}
.chapter-body blockquote p { margin: 0 0 0.6rem; }
.chapter-body blockquote p:last-child { margin-bottom: 0; }
.chapter-body blockquote em { font-style: normal; color: var(--muted); font-size: 0.9rem; }

.chapter-body figure {
  margin: 0.6rem 0 1.2rem;
  padding: 0;
}
.chapter-body figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: #fff;
}
.chapter-body figcaption {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0.45rem 0 0;
  font-style: italic;
  text-align: left;
}
.chapter-body figcaption em { font-style: italic; }

.chapter-body .fig-right {
  float: right;
  width: 38%;
  max-width: 360px;
  margin: 0.3rem 0 1rem 1.6rem;
}
.chapter-body .fig-left {
  float: left;
  width: 38%;
  max-width: 360px;
  margin: 0.3rem 1.6rem 1rem 0;
}
.chapter-body .fig-center {
  clear: both;
  margin: 1.5rem auto;
  max-width: 600px;
}
.chapter-body .fig-portrait { width: 32%; max-width: 300px; }
.chapter-body .fig-score img { background: #fafafa; }

/* Floats must not bleed past the section break */
.chapter-body h2 { clear: both; }

@media (max-width: 720px) {
  .chapter-body { text-align: left; hyphens: manual; }
  .chapter-body .fig-right,
  .chapter-body .fig-left,
  .chapter-body .fig-portrait {
    float: none;
    width: auto;
    max-width: 100%;
    margin: 1rem 0;
  }
  .chapter-body .dropcap { font-size: 3.2rem; }
  .chapter-header h1 { font-size: 1.8rem; }
}

.works-index {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 0 0;
  border-top: 1px solid var(--rule);
}
.works-index h2 {
  text-align: center;
  font-weight: 400;
  font-variant: small-caps;
  letter-spacing: 0.15em;
  border: none;
}

table.works {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.works th,
table.works td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}
table.works th { background: var(--bg-alt); font-weight: 600; }
table.works td.buxwv { font-family: var(--mono); color: var(--muted); white-space: nowrap; }
table.works td.instr { color: var(--muted); font-size: 0.85rem; }
table.works td.badges { text-align: right; white-space: nowrap; }
.badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  margin-left: 0.25rem;
  background: var(--bg-alt);
  color: var(--muted);
  font-family: var(--mono);
}
.badge.hints { background: #e7dfb8; color: #5a4a10; }
.badge.midi  { background: #cce0d6; color: #155033; }
.badge.ensemble-part { background: #dce8f4; color: #244d73; }

.collection-role-note {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid #315f87;
  background: #edf4fa;
  color: #253947;
  line-height: 1.5;
}

.crumbs { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }

.work-header .meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}
.work-header .meta .buxwv { font-family: var(--mono); }

.forscore-bar { margin: 0 0 0.8rem; }
.forscore-btn {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 3px;
  font-size: 0.85rem;
  text-decoration: none;
  font-family: var(--mono);
}
.forscore-btn:hover { background: #4a2308; }
.forscore-help { color: var(--muted); font-size: 0.8rem; margin-left: 0.6rem; }

.pdf-entry { position: relative; }
.score-play-btn {
  position: absolute; top: .4rem; left: .4rem; z-index: 3; display: inline-block;
  padding: .25rem .55rem; border-radius: 3px; color: #fff !important;
  background: rgba(39, 35, 29, .94); font-family: var(--mono); font-size: .72rem;
  letter-spacing: .03em; text-decoration: none !important;
}
.score-play-btn:hover { background: #111; }
.forscore-direct-btn {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  background: rgba(107, 52, 16, 0.92);
  color: #fff !important;
  font-family: var(--mono);
  font-size: 0.7rem;
  border-radius: 3px;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.forscore-direct-btn:hover { background: var(--accent); text-decoration: none; }

.forscore-direct-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: rgba(107, 52, 16, 0.95);
  color: #fff !important;
  border-radius: 3px;
  font-size: 0.72rem;
  text-decoration: none !important;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.forscore-direct-btn:hover { background: #4a2308; }
.pdf-entry { position: relative; }

.pdf-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.pdf-entry { border: 1px solid var(--rule); border-radius: 4px; background: #fff; overflow: hidden; }
.pdf-link { display: block; color: inherit; }
.pdf-link:hover { text-decoration: none; background: var(--bg-alt); }
.thumb { display: block; width: 100%; height: 240px; object-fit: contain; background: var(--bg-alt); border-bottom: 1px solid var(--rule); }
.thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); color: var(--muted); font-size: 1.4rem;
}
.pdf-meta { display: block; padding: 0.55rem 0.7rem; font-size: 0.85rem; }
.pdf-name { display: block; font-weight: 600; word-break: break-word; }
.pdf-role-label {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: #315f87;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pdf-role-note {
  display: block;
  margin-top: 0.3rem;
  color: #244d73;
  font-size: 0.78rem;
  line-height: 1.4;
}
.pdf-desc { display: block; color: var(--muted); margin-top: 0.2rem; font-size: 0.8rem; }
.pdf-ref { display: block; font-family: var(--mono); color: var(--muted); font-size: 0.75rem; margin-top: 0.2rem; }

.musicxml { margin-top: 1.2rem; }
.musicxml h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.musicxml-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.musicxml-entry { margin-bottom: 0.35rem; }
.musicxml-link { font-family: var(--mono); font-size: 0.8rem; color: var(--link); word-break: break-all; text-decoration: none; }
.musicxml-link:hover { text-decoration: underline; }

.midi-row { background: #fff; border: 1px solid var(--rule); border-radius: 4px; padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; }
.midi-name { margin: 0 0 0.4rem; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); word-break: break-all; }
midi-player { width: 100%; }
midi-visualizer { width: 100%; }

.hints-list { display: grid; grid-template-columns: max-content 1fr; column-gap: 1rem; row-gap: 0.4rem; }
.hints-list dt { font-weight: 600; color: var(--accent); }
.hints-list dd { margin: 0; }

.context p { margin: 0 0 0.9rem; }

.structure p,
.wikipedia p { margin: 0 0 0.5rem; }
.wikipedia p:first-of-type { font-style: italic; color: #3a3a3a; }
.src-link { font-size: 0.9rem; }

.src-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.src-list li { padding: 0.25rem 0; }
.src-list .ext-links { color: var(--muted); word-break: break-word; }

@media (max-width: 640px) {
  table.works { width: 100%; table-layout: fixed; }
  table.works th:nth-child(3),
  table.works td.instr { display: none; }
  table.works th:first-child,
  table.works td.cat { width: 3.6rem; }
  table.works th:last-child,
  table.works td.badges { width: 7rem; white-space: normal; }
  table.works td.badges .badge { margin-top: 0.15rem; margin-bottom: 0.15rem; }
  .pdf-list { grid-template-columns: 1fr 1fr; }
}

/* Randomized composer spotlight (homepage; picked client-side per page load) */
.spotlight { margin: 2rem 0 1.5rem; }
.spotlight h2 {
  font-variant: small-caps; letter-spacing: 0.06em; font-size: 0.95rem;
  color: var(--accent); margin-bottom: 0.6rem;
}
.spotlight-card {
  display: block; text-decoration: none;
  background: linear-gradient(180deg, #faf4e8, var(--bg-alt));
  border: 1px solid var(--rule); border-left: 4px solid var(--accent);
  border-radius: 5px; padding: 1.1rem 1.3rem;
}
.spotlight-card:hover { background: #ede8d8; }
.spotlight-name { display: block; font-size: 1.5rem; font-weight: 600; color: var(--accent); }
.spotlight-dates { display: block; color: var(--muted); font-style: italic; margin: 0.2rem 0; }
.spotlight-meta { display: block; color: var(--muted); font-size: 0.82rem; font-family: var(--mono); }
.spotlight-cta { display: inline-block; margin-top: 0.6rem; color: var(--link); font-size: 0.9rem; }

/* --- Tutorials hub (/tutors/, served at tutor.navarini.com) --- */
.tutors-hub { max-width: 960px; margin: 0 auto; }
.tutors-hub .hub-intro { color: var(--muted); margin-bottom: 1.6rem; }
.hub-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.hub-card a {
  display: flex; flex-direction: column; gap: 0.35rem;
  height: 100%; padding: 1.1rem 1.2rem;
  background: #f3eede; border: 1px solid #e0d8c2; border-radius: 8px;
  text-decoration: none; color: var(--fg);
  transition: background 0.15s ease;
}
.hub-card a:hover { background: #ede8d8; }
.hub-emoji { font-size: 1.8rem; }
.hub-name { font-size: 1.2rem; font-weight: 600; color: var(--accent); }
.hub-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }

/* Guided-path prev/next pager (tutor piece pages) */
.tutor-pager { display:flex; justify-content:space-between; gap:1rem; margin:2rem 0 0; padding-top:1rem; border-top:1px solid #e3e3e3; }
.tutor-pager a { text-decoration:none; font-weight:600; max-width:46%; }
.tutor-pager .pager-next { text-align:right; margin-left:auto; }
.badge-pedal-confirmed { background:#eef3fb; color:#2a4d80; }
.badge-trio-confirmed { background:#e7f5e7; color:#246b24; }
.badge-density-checked { background:#eef3fb; color:#2a4d80; }

/* Method-tutor reference cards (chord diagrams, layout tables) */
.chord-grid { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; }
.chord-grid .chord { width:70px; height:92px; }
.chord-name { font-size:11px; font-weight:700; fill:#222; }
.chord-mark { font-size:9px; fill:#555; }
.ref-table { border-collapse:collapse; margin:1rem 0; font-size:.92rem; }
.ref-table th, .ref-table td { border:1px solid #ddd; padding:.3rem .55rem; text-align:center; }
.ref-table th { background:#f5f5f5; }
.ref-table .stroke-sym { font-weight:700; font-family:monospace; }

/* Method-tutor embedded sheet-music (archive.org BookReader) */
.method-book { margin:1.5rem 0; }
.method-book h3 { margin:.3rem 0; font-size:1rem; }
.method-book iframe { border:1px solid #ccc; border-radius:4px; width:100%; }

/* Per-composer portrait. A documented-likeness study is used when available;
   otherwise the image is an explicitly symbolic period copperplate. */
.composer-portrait-wrap { float: right; width: 160px; margin: 0 0 1rem 1.5rem; text-align: center; }
.composer-portrait {
  display: block; width: 160px; height: auto; margin: 0;
  border-radius: 10px; border: 1px solid #d8cfb6; box-shadow: 0 2px 8px rgba(0,0,0,.12);
  background: #fffdf7; filter: saturate(1.15) contrast(1.05);
}
.composer-portrait.no-survivor { filter: sepia(.12) contrast(1.04) opacity(.96); }
.composer-portrait-caption {
  display: block; font-size: .72rem; color: #999; font-style: italic;
  margin-top: .35rem; line-height: 1.2;
}
@media (max-width: 600px){
  .composer-portrait-wrap { float: none; margin: 0 auto 1rem; }
  .composer-portrait{ float: none; margin: 0 auto; }
}

/* Musical Europe — the narrative front door. */
.museum-kicker { margin: 0 0 .45rem; color: #8a6526; font-size: .73rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; }
.museum-hero { max-width: 760px; margin: 3.5rem auto 2.5rem; text-align: center; }
.museum-hero h1 { margin: 0; font-size: clamp(2.8rem, 8vw, 5.8rem); line-height: .95; font-weight: 500; }
.museum-lede { max-width: 630px; margin: 1.3rem auto 0; color: #5a5347; font-size: 1.15rem; line-height: 1.7; }
.journey-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem;
  max-width: 1040px; margin: 0 auto; }
.journey-card { position: relative; display: grid; grid-template-columns: 168px 1fr;
  min-height: 154px; overflow: hidden; color: inherit; text-decoration: none; background: #f7f1e5;
  border: 1px solid #d9ceb8; border-radius: 4px; box-shadow: 0 8px 28px rgba(48,38,20,.07);
  transition: transform .18s ease, box-shadow .18s ease; }
.journey-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(48,38,20,.14); }
.journey-card-map { display: flex; align-items: center; padding: .55rem; background: #e7edef; border-right: 1px solid #d2c6b2; }
.journey-card-map img { display: block; width: 100%; height: auto; border: 1px solid rgba(83,72,54,.18); }
.journey-card-copy { display: flex; flex-direction: column; justify-content: center; padding: 1rem 1.15rem; }
.journey-card-kicker { color: #8a6526; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.journey-card strong { margin: .25rem 0; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.journey-card-copy > span:not(.journey-card-kicker) { color: #51493d; line-height: 1.45; }
.journey-card small { margin-top: .8rem; color: #817668; }
.catalogue-route { margin: 2.4rem auto; text-align: center; }

.home-museum { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4vw; align-items: center;
  max-width: 1080px; margin: 2.2rem auto 4rem; }
.home-museum-copy h1 { margin: .2rem 0 1.1rem; font-size: clamp(2.8rem, 5.3vw, 5.25rem); line-height: .94; font-weight: 500; }
.home-museum-copy > p:not(.museum-kicker) { max-width: 520px; color: #514b42; font-size: 1.12rem; line-height: 1.65; }
.home-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.6rem; }
.button-primary { display: inline-block; padding: .75rem 1.05rem; border-radius: 3px; background: #33291d; color: #fff !important; text-decoration: none; }
.home-map { margin: 0; }
.home-map img { display: block; width: 100%; height: auto; border: 1px solid #bcae96; border-radius: 5px;
  box-shadow: 0 10px 30px rgba(44,31,12,.11); }
.home-map figcaption, .journey-map-panel figcaption { margin-top: .55rem; color: #817668; font-size: .72rem;
  font-style: italic; text-align: center; }
.home-exhibitions { margin: 0 auto 5rem; }
.home-exhibitions > header { max-width: 1040px; margin: 0 auto 1.2rem; }
.home-exhibitions h2, .home-reference h2 { margin: 0; font-size: 2.2rem; font-weight: 500; }
.journey-grid.compact .journey-card { min-height: 148px; }
.home-reference { display: flex; justify-content: space-between; gap: 2rem; max-width: 1040px; margin: 4rem auto 2rem;
  padding: 2rem 0; border-top: 1px solid #d9ceb8; border-bottom: 1px solid #d9ceb8; }
.home-reference p { color: #615a50; }
.home-reference nav { display: flex; flex-direction: column; justify-content: center; gap: .6rem; min-width: 180px; }

/* Surprise me — a shuffled cabinet assembled from verified journey material. */
.surprise-room { max-width: 980px; margin: 2.5rem auto 5rem; }
.surprise-heading { max-width: 720px; margin-bottom: 2rem; }
.surprise-heading h1 { margin: .2rem 0 .7rem; font-size: clamp(2.8rem, 7vw, 5.3rem); line-height: .95; font-weight: 500; }
.surprise-heading > p:last-child { color: #5d5549; font-size: 1.08rem; line-height: 1.65; }
.surprise-card { display: grid; grid-template-columns: minmax(240px, .82fr) minmax(0, 1.18fr); overflow: hidden;
  border: 1px solid #cbbda5; border-radius: 5px; background: #f7f1e5; box-shadow: 0 16px 45px rgba(48,38,20,.12); }
.surprise-visual { position: relative; min-height: 480px; margin: 0; background: #29251f; }
.surprise-visual img { display: block; width: 100%; height: 100%; min-height: 480px; object-fit: cover; filter: sepia(.07) contrast(1.03); }
.surprise-visual figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: .7rem .85rem;
  color: #f5efe4; background: linear-gradient(transparent, rgba(24,19,13,.88)); font-size: .7rem; }
.surprise-copy { padding: clamp(1.5rem, 4vw, 3rem); }
.surprise-copy h2 { margin: .2rem 0 .25rem; font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 500; line-height: 1; }
.surprise-place { margin: 0 0 1.4rem; color: #8a6526; font-family: Georgia, serif; font-size: 1.05rem; }
.surprise-story { color: #4e473d; line-height: 1.72; }
.surprise-work { margin: 1.5rem 0; padding: 1rem 1.1rem; border-left: 3px solid #b18a46; background: #eee4d2; }
.surprise-work span, .surprise-work small { display: block; color: #756a5b; }
.surprise-work strong { display: block; margin: .2rem 0; font-family: Georgia, serif; font-size: 1.2rem; }
.surprise-actions { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; }
.surprise-actions a { font-weight: 600; }
.surprise-next { margin-top: 1.2rem; padding: .72rem 1rem; border: 1px solid #4b3d2b; border-radius: 3px;
  color: #fff; background: #33291d; font: inherit; cursor: pointer; }
.surprise-count { margin-left: .8rem; color: #817668; font-size: .76rem; }
@media (max-width: 720px) {
  .surprise-card { grid-template-columns: 1fr; }
  .surprise-visual, .surprise-visual img { min-height: 300px; max-height: 420px; }
}

.journey { max-width: 1060px; margin: 0 auto; }
.journey-hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 4vw; align-items: center; margin: 2.5rem 0 4rem; }
.journey-map-panel { margin: 0; }
.journey-map-panel img { display: block; width: 100%; height: auto; border: 1px solid #bcae96; border-radius: 5px;
  box-shadow: 0 10px 28px rgba(45,31,11,.1); }
.journey-hero h1 { margin: .2rem 0 .6rem; font-size: clamp(2.5rem, 4.4vw, 4.5rem); line-height: .98; font-weight: 500; }
.journey-subtitle { color: #8a6526; font-family: Georgia, serif; font-size: 1.28rem; }
.journey-hero-copy > p:not(.museum-kicker):not(.journey-subtitle):not(.journey-tally) { color: #514b42; line-height: 1.7; }
.journey-tally { margin-top: 1.1rem; color: #766c5e; font-size: .82rem; }
.journey-chapter { margin: 0 0 5.5rem; scroll-margin-top: 2rem; }
.journey-chapter-heading { display: flex; gap: 1.2rem; align-items: flex-start; padding-top: 1.25rem; border-top: 1px solid #bcae96; }
.chapter-roman { color: #b18a46; font-family: Georgia, serif; font-size: 3.7rem; line-height: .9; }
.journey-chapter-heading p { margin: 0; color: #817565; font-size: .7rem; letter-spacing: .11em; text-transform: uppercase; }
.journey-chapter-heading h2 { margin: .2rem 0; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 500; }
.journey-narrative { max-width: 760px; margin: 1.1rem 0 1.6rem 5rem; color: #4c463d; font-size: 1.08rem; line-height: 1.75; }
.chapter-listen { margin: -.55rem 0 1.55rem 5rem; padding: .55rem .8rem; color: #59391d; background: #f1e8d7;
  border: 1px solid #c6b38e; border-radius: 999px; font: 600 .72rem/1.2 system-ui, sans-serif; cursor: pointer; }
.chapter-listen:hover { background: #e8d8bc; }
.story-composers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-left: 5rem; }
.journey-finds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.8rem 0 1.8rem 5rem; }
.journey-find { margin: 0; overflow: hidden; border: 1px solid #c9bda8; background: #f4efe5; }
.journey-find > a { display: block; background: #28241f; }
.journey-find img { display: block; width: 100%; height: 260px; object-fit: cover; }
.journey-find figcaption { padding: 1rem 1.1rem 1.15rem; }
.journey-find figcaption > p { margin: 0 0 .3rem; color: #817565; font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; }
.journey-find h3 { margin: 0 0 .55rem; font-size: 1.25rem; font-weight: 600; }
.journey-find figcaption div { color: #514a40; font-size: .91rem; line-height: 1.58; }
.journey-find figcaption > a { display: inline-block; margin-top: .75rem; color: #6f432c; font-size: .74rem; line-height: 1.35; }
.play-room-link { display: flex; gap: .8rem; align-items: center; max-width: 520px; margin: 1rem 0 1.3rem 5rem;
  padding: .8rem 1rem; color: inherit; text-decoration: none; border: 1px solid #c7b99f; background: #eee4d2; }
.play-room-link > span:first-child { color: #8a6526; font-size: 1.7rem; }
.play-room-link span:last-child { display: flex; flex-direction: column; }
.play-room-link strong { font-family: Georgia, serif; font-size: 1.05rem; font-weight: 600; }
.play-room-link small { margin-top: .15rem; color: #766c5e; }
.play-room-link:hover { border-color: #8a6526; background: #e8dcc7; }
.story-composer { display: grid; grid-template-columns: 72px 1fr; min-height: 72px; overflow: hidden; color: inherit;
  text-decoration: none; background: #f8f3e9; border: 1px solid #ddd2be; }
.story-composer img { display: block; width: 72px; height: 72px; object-fit: cover; filter: sepia(.08) contrast(1.03); transition: transform .18s ease; }
.story-composer:hover img { transform: scale(1.025); }
.story-composer > span { display: flex; flex-direction: column; min-height: 72px; padding: .48rem .65rem; }
.story-composer strong { font-family: Georgia, serif; font-size: 1rem; font-weight: 500; line-height: 1.22; }
.story-composer small { margin-top: .22rem; color: #807467; font-size: .7rem; }
.story-composer small:last-child { margin-top: auto; padding-top: .45rem; color: #8a6526; }
.journey-footer { margin: 2rem 0 4rem; padding: 2rem; background: #eee4d2; }
.journey-footer > p { max-width: 700px; color: #5c5346; }
.journey-footer nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }

.instrument-room { margin: 2rem 0 5rem; padding: clamp(1.3rem, 4vw, 3.2rem); color: #2d2923;
  background: linear-gradient(145deg, #eee7d9, #f7f3eb 52%, #e8e1d3); border: 1px solid #bcae96; border-radius: 6px; }
.instrument-room-heading { max-width: 760px; }
.instrument-room-heading h2 { margin: .3rem 0 .7rem; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; }
.instrument-room-heading > p:last-child { color: #5b5347; font-size: 1.02rem; line-height: 1.65; }
.instrument-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 2rem 0; }
.instrument-feature { padding: 1.3rem; background: rgba(255,255,255,.55); border-top: 3px solid #8a6526;
  box-shadow: 0 5px 18px rgba(57,45,26,.07); }
.instrument-feature > p { margin: 0; color: #8a6526; font: 650 .66rem/1.3 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.instrument-feature h3 { margin: .35rem 0 .65rem; font-size: 1.35rem; font-weight: 500; }
.instrument-feature div { color: #514b42; line-height: 1.58; }
.instrument-feature a { display: inline-block; margin-top: 1rem; font: 600 .7rem/1.4 system-ui, sans-serif; }
.research-shelf { display: grid; grid-template-columns: minmax(190px,.6fr) 1.4fr; gap: 1.5rem; align-items: start;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #bcae96; }
.research-shelf h3 { margin: .25rem 0; font-size: 1.5rem; font-weight: 500; }
.research-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .65rem; }
.research-links a { display: flex; flex-direction: column; gap: .25rem; padding: .8rem; color: #3b3023; background: rgba(255,255,255,.5); border: 1px solid #d0c3ae; }
.research-links a:hover { border-color: #8a6526; }
.research-links strong { font-family: Georgia, serif; font-size: .98rem; font-weight: 500; }
.research-links span { color: #6f665a; font: .72rem/1.42 system-ui, sans-serif; }
.instrument-note { margin: 1.3rem 0 0; color: #7b7164; font: .68rem/1.5 system-ui, sans-serif; }

@media (max-width: 800px) {
  .journey-grid, .home-museum, .journey-hero { grid-template-columns: 1fr; }
  .story-composers { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 0; }
  .journey-finds { margin-left: 0; }
  .play-room-link { margin-left: 0; }
  .journey-narrative, .chapter-listen { margin-left: 0; }
  .research-shelf { grid-template-columns: 1fr; }
  .home-map, .journey-map-panel { max-width: 620px; margin: 0 auto; }
}
@media (max-width: 520px) {
  .journey-card { grid-template-columns: 104px 1fr; min-height: 138px; }
  .journey-card strong { font-size: 1.35rem; }
  .journey-card-map { padding: .35rem; }
  .home-actions, .home-reference { align-items: flex-start; flex-direction: column; }
  .journey-hero { margin-top: 1.2rem; }
  .story-composers { grid-template-columns: 1fr; }
  .journey-finds { grid-template-columns: 1fr; }
  .story-composer { grid-template-columns: 64px 1fr; }
  .story-composer img { width: 64px; height: 64px; }
  .journey-footer nav { flex-direction: column; }
}

/* Play the room — compact recital programmes generated from held scores. */
.room-program { max-width: 900px; margin: 2.5rem auto 5rem; }
.room-program-hero { max-width: 760px; margin-bottom: 2.3rem; }
.room-program-hero h1 { margin: .2rem 0 .6rem; font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: .98; font-weight: 500; }
.room-program-lede { color: #5b5348; font-size: 1.08rem; line-height: 1.7; }
.program-download { display: inline-block; margin-top: .8rem; padding: .65rem .85rem; border: 1px solid #8a6526;
  color: #664819; text-decoration: none; background: #f5eddd; }
.program-list { list-style: none; margin: 0; padding: 0; }
.program-piece { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 1.2rem; padding: 1.4rem 0;
  border-top: 1px solid #cbbda5; }
.program-position { color: #8a6526; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.program-piece h2 { margin: .15rem 0 .25rem; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; }
.program-composer { margin: 0 0 .65rem; color: #74695b; }
.program-meta { color: #766c5e; font-size: .8rem; }
.program-piece-actions { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin-top: .75rem; }
.program-piece-actions a:first-child { font-weight: 700; }
.program-note { margin-top: 2rem; padding: 1rem 1.1rem; color: #61584c; background: #eee4d2; }
@media (max-width: 560px) {
  .program-piece { grid-template-columns: 1fr; gap: .35rem; }
}

/* Chapter-style tutor pages (Chapter 0 · Exercises) — use the composer
   chapter-body figure rules for exercise figures inside .tutor-body. */
.tutor-chapter .tutor-body figure.exercise {
  margin: 1.2rem 0 1.6rem;
  padding: 0.8rem 0.9rem 0.6rem;
  border: 1px solid var(--rule);
  background: #fbfaf7;
  border-radius: 4px;
}
.tutor-chapter .tutor-body figure.exercise img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
}
.tutor-chapter .tutor-body figure.exercise figcaption {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0.55rem 0 0;
  font-style: normal;
  text-align: left;
}
.tutor-chapter .tutor-body h3 {
  margin-top: 1.8rem;
  font-size: 1.05rem;
  color: var(--ink);
}
.tutor-chapter .tutor-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* Method lesson Markdown begins with the same title as the semantic page H1. */
.tutor-method > .tutor-body > h2:first-child { display: none; }

/* Optional background recordings: never autoplay and never obscure content. */
.ambient-player { position: fixed; z-index: 30; right: 1rem; bottom: 1rem; width: min(340px, calc(100vw - 2rem));
  color: #f6f0e4; font-family: system-ui, sans-serif; font-size: .78rem; }
.ambient-player button { cursor: pointer; }
.ambient-open { float: right; padding: .55rem .75rem; color: #f6f0e4; background: #49331c;
  border: 1px solid #9c7a43; border-radius: 999px; box-shadow: 0 4px 18px rgba(30,20,8,.22); }
.ambient-panel { clear: both; margin-top: .45rem; padding: .8rem; background: rgba(45,31,18,.96);
  border: 1px solid #9c7a43; border-radius: 6px; box-shadow: 0 8px 28px rgba(30,20,8,.28); }
.ambient-now { display: flex; flex-direction: column; }
.ambient-now span { color: #cdbd9f; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.ambient-now strong { margin-top: .12rem; font-family: Georgia, serif; font-size: .95rem; font-weight: 500; }
.ambient-now small { color: #cdbd9f; }
.ambient-controls { display: flex; gap: .55rem; align-items: center; margin-top: .65rem; }
.ambient-controls button { min-width: 2.2rem; padding: .35rem .55rem; color: #3b2816; background: #eee1c8;
  border: 0; border-radius: 3px; }
.ambient-controls label { display: flex; gap: .35rem; align-items: center; color: #cdbd9f; font-size: .68rem; }
.ambient-volume { width: 82px; }
.ambient-credit { margin: .65rem 0 0; color: #bca98a; font-size: .64rem; }
.ambient-credit a { color: #ead7b2; }
@media (max-width: 520px) { .ambient-player { right: .6rem; bottom: .6rem; width: calc(100vw - 1.2rem); } }

/* Apple Music links: official, unmodified icon; existing link text is the accessible name. */
a[href^="https://music.apple.com/"] {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 32px;
  padding: .3em .65em .3em .4em;
  border: 1px solid #eed1d7;
  border-radius: 999px;
  background: #fff5f6;
  color: #a9183c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
}
a[href^="https://music.apple.com/"]::before {
  content: "";
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: url('/static/icons/apple-music.svg') center / contain no-repeat;
}
a[href^="https://music.apple.com/"]:hover {
  color: #8f1230;
  background-color: #ffe8ed;
  border-color: #df98a8;
  text-decoration: none;
}
a[href^="https://music.apple.com/"]:focus-visible {
  outline: 2px solid #a9183c;
  outline-offset: 3px;
}
a.badge[href^="https://music.apple.com/"] {
  font-size: .7rem;
  margin-block: .15rem;
}
@media (forced-colors: active) {
  a[href^="https://music.apple.com/"] { border-color: LinkText; }
}

/* Public edition: two visible, separate source actions. */
.work .scores .pdf-entry { padding: 1rem; }
.work .scores .pdf-entry p { margin: 0 0 1rem; overflow-wrap: anywhere; }
.work .scores .forscore-direct-btn { position: static; display: block; padding: .7rem .9rem; margin: .5rem 0 0; font-size: .85rem; text-align: center; }
.work .scores .forscore-direct-btn + .forscore-direct-btn { background: transparent; color: var(--accent) !important; border: 1px solid var(--rule); }
.work .scores .forscore-direct-btn:focus-visible { outline: 3px solid #315f87; outline-offset: 3px; }
.public-notice { border-bottom: 1px solid var(--rule); padding: .8rem 0; }
.public-source-actions { display: inline-flex; flex-wrap: wrap; gap: .4rem .8rem; margin: .3rem; }
.public-source-actions a { position: static; padding: .4rem .6rem; border: 1px solid var(--rule); border-radius: 4px; font-size: .85rem; }

/* public source layout v2 */
/* Public edition: two visible, separate source actions. */
.work .scores .pdf-list { grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); max-width: 44rem; }
.work .scores .pdf-entry { padding: 1rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.work .scores .pdf-entry p { margin: 0 0 .3rem; overflow-wrap: anywhere; flex-basis: 100%; }
.work .scores .forscore-direct-btn { position: static; display: block; padding: .7rem .9rem; margin: 0; font-size: .85rem; text-align: center; flex: 1 1 160px; }
.work .scores .forscore-direct-btn + .forscore-direct-btn { background: transparent; color: var(--accent) !important; border: 1px solid var(--rule); }
.work .scores .forscore-direct-btn:focus-visible { outline: 3px solid #315f87; outline-offset: 3px; }
.public-notice { border-bottom: 1px solid var(--rule); padding: .8rem 0; }
.public-source-actions { display: inline-flex; flex-wrap: wrap; gap: .4rem .8rem; margin: .3rem; }
.public-source-actions a { position: static; padding: .4rem .6rem; border: 1px solid var(--rule); border-radius: 4px; font-size: .85rem; }
