/* soram - the site's original design, now one skin among others.
   The skin-agnostic layer it sits on is landing/style.css. */

/* Self-hosted, so the page makes no third-party request. Victor Mono is the body
   face (variable weight; the unicode-range split lets a browser fetch only the
   scripts a page uses). Handjet is the wordmark only, and only the latin subset
   at weight 600, which is all `soram` needs. Both are SIL OFL 1.1 - the licence
   texts sit next to the files in /assets/fonts/. */
@font-face {
  font-family: "Victor Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/victor-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Victor Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/victor-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Victor Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/victor-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Handjet";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/handjet-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* The reading column this skin lays itself out on. A skin's own property, not
     the site's: winamp is narrower, and an XP-style shell would be far wider. */
  --shell-width: 28rem;
  /* Body and tab/grid-chart face. Monospace on purpose: the chord grid and the tab
     rely on every character being one width. The tail is the system stack the
     skin used before Victor Mono, kept as the fallback. */
  --font-mono:
    "Victor Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  /* Wordmark only. Not monospace and not for running text. */
  --font-wordmark: "Handjet", var(--font-mono);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  /* Victor Mono ships programming ligatures; a tab's runs of - and | must stay
     separate characters. */
  font-variant-ligatures: none;
  color: #ebe6ef;
  line-height: 1.45;
  background-color: #0c0a10;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"),
    linear-gradient(
      168deg,
      rgba(12, 10, 16, 0.84) 0%,
      rgba(12, 10, 16, 0.68) 42%,
      rgba(12, 10, 16, 0.82) 100%
    ),
    url("/assets/page-bg.png");
  background-size:
    128px 128px,
    100% 100%,
    cover;
  background-position:
    0 0,
    0 0,
    center 28%;
  background-repeat:
    repeat,
    no-repeat,
    no-repeat;
  background-attachment: scroll;
}

.skip-link:focus {
  background: #1a1520;
  color: #ebe6ef;
  text-decoration: underline;
  border-radius: 4px;
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

/* Page chrome - one top bar on every page. The `soram` wordmark is plain text
   on /links (it is already home) and a home link everywhere else; the language
   switch lives here rather than orphaned at the foot of the document. Being the
   first thing in the body, it also carries the top safe-area inset the hero
   used to. */
.topbar {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  background-color: rgba(12, 10, 16, 0.92);
  border-bottom: 1px solid #201a29;
}

/* The bar's surface follows the shell - full-bleed below tablet width, a 28rem
   card above it - while its contents stay on the 28rem reading column either
   way, so the wordmark keeps landing on the same text edge as the sections
   underneath instead of drifting out to the viewport edge. */
.topbar__inner {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: max(0.75rem, env(safe-area-inset-right));
  padding-left: max(0.75rem, env(safe-area-inset-left));
}

/* 0.75rem of bar padding plus 0.25rem here lands the wordmark on the 1rem text
   edge the sections below use. */
.topbar__wordmark {
  padding: 0.5rem 0.25rem;
  font-family: var(--font-wordmark);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #f5f0ff;
  text-decoration: none;
}

a.topbar__wordmark:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 2px;
}

.topbar__inner .lang-switch {
  display: flex;
  align-items: center;
  padding: 0;
}

/* `width: 100%` is load-bearing on every section of the shell, not decoration:
   `main` is a flex column, and a flex item with auto cross-axis margins is not
   stretched, so without a definite width each section would shrink to its own
   content. Safe against the padding because `box-sizing: border-box` is global. */
.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 1rem max(1rem, env(safe-area-inset-right)) 0
    max(1rem, env(safe-area-inset-left));
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
}

.hero__photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(34vh, 260px);
  object-fit: cover;
  border-radius: 6px;
  background: #1a1520;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.125rem;
}

.hero__name {
  margin: 0;
  font-family: var(--font-wordmark);
  font-size: clamp(3rem, 12vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #f5f0ff;
}

.hero__tagline {
  margin: 0;
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  font-weight: 400;
  color: #a99cba;
  max-width: 36ch;
  text-wrap: pretty;
}

@media (min-width: 380px) {
  .hero__photo {
    max-height: min(36vh, 280px);
  }
}

/* Story 3.2 - featured release + streaming CTAs */

.featured {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 1.5rem max(1rem, env(safe-area-inset-right)) 0
    max(1rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.featured__heading {
  margin: 0;
  padding: 0 0.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #c4b8d4;
}

.featured__panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: 8px;
  background: #141018;
  border: 1px solid #2a2433;
}

.featured__thumb {
  display: block;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  background: #1a1520;
}

.featured__actions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
}

.featured__release-name {
  margin: 0;
  font-size: 0.82rem;
  color: #c8bfd4;
  line-height: 1.25;
}

.featured__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
}

.featured__cta:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

.featured__cta--spotify {
  background: #1ed760;
  color: #0c0a10;
  border-color: #12bc4d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

/* Tier 2 - the streaming pool, now a section of its own with its own heading
   rather than a tail on the featured release.

   A real two-column grid: the space between columns is `column-gap` and every
   cell carries identical padding, never a per-cell left inset, so the columns
   stay aligned however the list order or the item count shifts. No horizontal
   rules - the rhythm is the alignment. */
.platforms {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 1.25rem max(1rem, env(safe-area-inset-right)) 0
    max(1rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.platforms__heading {
  margin: 0 0 0.25rem;
  padding: 0 0.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #c4b8d4;
}

.platforms__pool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 0.125rem;
  column-gap: 0.875rem;
}

/* Brighter than social (tier 3) and plainer than the spotify button (tier 1):
   underlined text, no logos, no chips. The 3rem cell is the touch target; the
   0.125rem inline padding is the only horizontal inset, matched by every other
   cell. */
.platforms__link {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.5rem 0.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4daf0;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.platforms__link:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

/* Absent services - belarusian page only, native disclosure, no script. */

/* Lives inside .platforms__pool, so it is one of the streaming options rather
   than a block underneath them. Collapsed it is simply another cell of the
   grid, sitting beside its neighbours; opening it claims the whole row so the
   explanation gets the width to read, which drops soundcloud and bandcamp onto
   the line directly below it. Collapsing returns it to a single cell. The
   control therefore moves as it opens - deliberate, so that it sits among the
   options rather than apart from them whenever it is shut. */
.availability {
  font-size: 0.82rem;
  color: #c8bfd4;
}

.availability[open] {
  grid-column: 1 / -1;
}

/* Presented as one more streaming option: same type treatment and the exact
   cell padding of .platforms__link, so the label lands on its column's text
   edge like every other one. No marker of any kind - the native leading
   ::marker is dropped (it hangs in the gutter and knocks the label out of that
   alignment) and no glyph replaces it. What keeps this honest is that
   activating it never navigates: the answer appears in place, and `<summary>`
   still announces as an expandable button with its state, so assistive tech is
   told exactly what this is. */
.availability__summary {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.5rem 0.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4daf0;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 4px;
  cursor: pointer;
  list-style: none;
}

.availability__summary::-webkit-details-marker {
  display: none;
}

.availability__summary:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

/* Borrows the featured release's panel treatment - the one card vocabulary this
   page already has - so the explanation arrives as a distinct object rather
   than as loose text, and takes the eye first when it opens. Its 0.8125rem
   inline padding is the same the highlighted chips below get, so panel text and
   chip labels line up on one edge. */
.availability__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.8125rem;
  border-radius: 8px;
  background: #2b2338;
  border: 1px solid #8d76b3;
}

.availability__text {
  margin: 0;
  line-height: 1.45;
  color: #ebe6ef;
  text-wrap: pretty;
}

/* Gives the panel's painted edge a little air above the painted chips below it.
   Even so the three sit far tighter than two plain options do: those are 3rem
   cells holding a single line, so roughly 1.75rem of whitespace separates their
   labels. Panel and chips therefore read as one object. */
.availability[open] {
  padding-bottom: 0.375rem;
}

/* While the explanation is open, point at the two places that do work. Tied to
   the open state rather than a toggle event: the note is usually left open, so
   a close-triggered effect would rarely fire.

   Chips on the panel's own surface and edge, so the two options read as part of
   it, and no second ring around the first. Each fills its own grid column
   rather than shrinking to its label: drawn to the label, the pair came out at
   two different widths with the 1fr column gutter stranded between them, which
   read as a hole in the group. Filling the columns makes them one pair of equal
   boxes whose outer edges line up with the panel's and whose separation is the
   pool's own column gap. Only the inline padding changes, so no other cell in
   the pool moves, and the 1px border is absorbed by the cell's 3rem min-height
   rather than adding to it. */
.platforms__pool:has(.availability[open])
  .platforms__link[data-out-path$="/soundcloud"],
.platforms__pool:has(.availability[open])
  .platforms__link[data-out-path$="/bandcamp"],
.platforms__pool:has(.availability[open])
  .platforms__link[data-platform="soundcloud"],
.platforms__pool:has(.availability[open])
  .platforms__link[data-platform="bandcamp"] {
  padding-inline: 0.8125rem;
  color: #f6f1fb;
  background: #2b2338;
  border: 1px solid #8d76b3;
  border-radius: 6px;
}

/* Root URL helper - canonical content lives at /links */
.root-fallback {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.root-fallback__text {
  margin: 0;
  font-size: 1.1rem;
}

.root-fallback a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.25rem 0.35rem;
  color: #e4daf0;
}

.root-fallback a:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Story 3.3 - social (new tab), privacy footer, touch targets, contrast (NFR17-NFR19). */

/* A column, not a block: it lets the last section of a page claim the leftover
   height with `margin-top: auto` (social on /links, `back to links` on the doc
   pages) instead of leaving a gap under short content. */
main {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--shell-width);
  margin-inline: auto;
  flex: 1 1 auto;
  background-color: rgba(12, 10, 16, 0.88);
}

/* Tier 3 - smaller and dimmer than the streaming pool, and pushed to the foot of
   the shell so the three tiers read top to bottom with the leftover height
   between the pool and here rather than under everything. */
.social {
  width: 100%;
  max-width: var(--shell-width);
  /* `auto` takes the shell's leftover height; the padding is the floor, so a
     tall page still keeps the pool clear of this section. */
  margin-top: auto;
  margin-inline: auto;
  padding: 1.5rem max(1rem, env(safe-area-inset-right)) 0
    max(1rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.social__heading {
  margin: 0;
  padding: 0 0.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #8d80a3;
}

/* Two columns, on the same mechanism and the same gaps as .platforms__pool, so the
   row's line count follows from how many entries it holds - ceil(n / 2) - instead of
   from how long their labels are. A wrapping flex row broke at a different entry
   count in every skin and every locale, with nothing testing it. Matching the pool's
   gaps also lines tier 3's two columns up with tier 2's down the page. See
   openspec/changes/add-bandsintown-social/design.md - D2. */
.social__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 0.125rem;
  column-gap: 0.875rem;
}

.social__item {
  margin: 0;
}

/* `flex`, not `inline-flex`: the grid item is the <li>, so the link has to fill it or
   the 44px target would be only as wide as the label. The underline still tracks the
   text, so this widens the tap area without changing what is drawn. Same reason the
   pool's links are `flex`. */
.social__link {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.375rem 0.125rem;
  /* 0.75rem against the pool's 0.875rem. Was 0.82rem, five hundredths of a rem below
     the pool - a delta doing no work, which was survivable only while the two tiers
     were also told apart by their layouts (row against grid). Now that both are
     grids, the size difference has to carry its share alongside the colour. 0.75rem
     is what nero and winamp already use for this tier. See design.md - D3. */
  font-size: 0.75rem;
  font-weight: 500;
  color: #a99cba;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.social__link:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

/* Chrome, not a fourth tier. It carries privacy / thanks and nothing else - the
   language switch moved up to the top bar. Separation from social is 1.375rem of
   space rather than a rule; the type is smaller and dimmer than tier 3, which is
   what stops the two reading as one list. */
.site-footer {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding-top: 1.375rem;
  padding-bottom: max(1.625rem, env(safe-area-inset-bottom));
  background-color: rgba(12, 10, 16, 0.88);
}

.site-footer__heading {
  margin: 0 0 0.5rem;
  padding: 1rem 0.125rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #c4b8d4;
}

/* Carries the horizontal inset itself rather than taking it from .site-footer,
   so that - like .topbar__inner - the footer's surface can span the shell while
   its text stays on the sections' own edge. */
.site-footer__notice {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding-inline: calc(max(1rem, env(safe-area-inset-left)) + 0.125rem)
    calc(max(1rem, env(safe-area-inset-right)) + 0.125rem);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #6f6480;
}

.site-footer__sep {
  padding: 0 0.25rem;
  color: #6f6480;
}

.site-footer__notice strong {
  font-weight: 700;
  color: #f2ebfa;
}

.site-footer__kbd {
  font-weight: 700;
  color: #f2ebfa;
}

.site-footer__more {
  display: inline-block;
  font-size: inherit;
  color: #8d80a3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__more:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Language switch (en / бел). The active language is baked into each document
   rather than read from the cookie, so this works with JavaScript disabled. On
   every real page it sits in the top bar; the root URL helper is the one place
   it still stands on its own. */
.lang-switch {
  margin: 0;
  padding: 0 0.125rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.lang-switch__current,
.lang-switch__link {
  display: inline-block;
  padding: 0.7rem 0.35rem;
}

.lang-switch__current {
  font-weight: 700;
  color: #f2ebfa;
}

.lang-switch__sep {
  color: #9a8fb0;
}

.lang-switch__link {
  font-weight: 600;
  color: #d4c4e8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switch__link:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Below “tablet” width: shell spans full viewport so the photo does not sit in
   side gutters (Surface Duo ~540px, tall phones). Inner sections stay max 28rem. */
@media (max-width: 47.99rem) {
  .topbar,
  main,
  .site-footer {
    max-width: none;
  }
}

/* Landscape phones (not squashed desktop windows): short viewports, modest width. */
@media (orientation: landscape) and (max-height: 33rem) and (max-width: 60rem) {
  .topbar,
  main,
  .site-footer {
    max-width: none;
  }
}

@media (min-width: 768px) {
  body {
    align-items: center;
    justify-content: safe center;
    padding-inline: max(1rem, env(safe-area-inset-left))
      max(1rem, env(safe-area-inset-right));
    padding-block: max(1.5rem, env(safe-area-inset-top))
      max(1.5rem, env(safe-area-inset-bottom));
  }

  /* Let main+footer size to content so vertical centering matches pre-flex layout. */
  main {
    flex: 0 1 auto;
  }
}

/* links/privacy, links/thanks - detail pages.

   Same chrome as /links: the top bar above carries the wordmark and the language
   switch, so all a doc page adds is an eyebrow naming where you are, a title,
   and one quiet way back at the foot. Any future page (discography, bio, shows)
   drops into this same shell unchanged. */

.doc-page {
  padding: 1.25rem max(1rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

/* Bottom of the page, not the top: the top bar already answers "where am i",
   so leaving is an afterthought you reach once you have finished reading. */
.doc-page__nav {
  margin-top: auto;
  padding-top: 1.25rem;
}

.doc-page__back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.375rem 0.125rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: #8d80a3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-page__back:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 4px;
}

.doc-page__header {
  padding: 0 0.125rem 0.875rem;
  border-bottom: 1px solid #201a29;
}

.doc-page__eyebrow {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #8d80a3;
}

.doc-page__title {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f5f0ff;
}

/* Song pages only: the title shares its row with the chord-visibility
   control (song.html.j2), rather than sitting alone like every other
   doc-page__header. Scoped to this wrapper so record/songs/doc/shows
   headers, which reuse .doc-page__title bare, are untouched. */
.doc-page__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.375rem 0.875rem;
}

.doc-page__title-row .doc-page__title {
  flex: 1 1 auto;
  min-width: 0;
}

.doc-page__lede {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #ddd5e8;
}

.doc-page__subtitle {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 400;
  color: #ddd5e8;
}

.doc-page__lede a,
.doc-page__subtitle a {
  color: #d4c4e8;
  font-weight: 600;
}

.doc-page__article {
  padding: 1rem 0.125rem 0;
  max-width: 62ch;
}

.doc-section {
  margin-bottom: 1.35rem;
}

.doc-section:last-child {
  margin-bottom: 0;
}

.doc-section__heading {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #c4b8d4;
}

.doc-section__p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #ddd5e8;
  text-wrap: pretty;
}

/* Closes the opening paragraph before the headed sections start. */
.doc-section__p--intro-close {
  margin-bottom: 1.25rem;
}

.doc-section__list {
  margin: 0 0 1.125rem;
  padding-left: 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #ddd5e8;
}

.doc-section__list li {
  margin-bottom: 0.375rem;
}

.doc-section__list li:last-child {
  margin-bottom: 0;
}

.doc-section__p a,
.doc-section__list a {
  color: #d4c4e8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-section__p a:focus-visible,
.doc-section__list a:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* thanks - a list of people, so the rows are the structure. Each entry gets its
   own line and a hairline under it; the last one (the reader) is the only bright
   row, and closes the list without a rule. */
.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.doc-list__item {
  padding: 0.625rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #ddd5e8;
  border-bottom: 1px solid #201a29;
  text-wrap: pretty;
}

.doc-list__item:last-child {
  color: #f2ebfa;
  border-bottom: none;
}

.doc-list__item a {
  color: #d4c4e8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-list__item a:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 2px;
}

.doc-section__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0 0 0.375rem;
}

.doc-section__credit {
  margin: 0 0 1.125rem;
  font-size: 0.75rem;
  color: #6f6480;
}

.doc-section__meta {
  margin: 0.25rem 0 0;
  padding-top: 0.875rem;
  border-top: 1px solid #201a29;
  font-size: 0.75rem;
  color: #6f6480;
}

/* / - the site's real front door now: two destinations, nothing else. See
   openspec/changes/add-records-catalogue. */

.menu-page {
  justify-content: center;
  padding: 1.25rem max(1rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

/* The root page's one photo (landing-site-menu spec): scenery, not a control.
   Any framing is done in the asset itself, so it is drawn whole at its own
   ratio - no object-position to keep in sync with the file. */
.menu-page__photo {
  display: block;
  flex: none;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 6px;
  background: #1a1520;
}

.menu-page__list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.menu-page__entry {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-height: 3.5rem;
  padding: 0.5rem 0.125rem;
  color: #e4daf0;
  text-decoration: none;
  border-radius: 4px;
}

.menu-page__entry:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

.menu-page__label {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.menu-page__description {
  font-size: 0.82rem;
  color: #a99cba;
}

/* /records - the catalogue index. Reuses the doc-page chrome (eyebrow, title,
   back link, footer); only the row list between them is new.

   An entry used to be one whole-row link (title + year, `<a>` all the way
   round). It can't be anymore: revealing a release's songs nests song links
   inside the entry, and a link cannot contain a link. The row splits instead
   - .records-list__row holds the title link and the year exactly as before,
   and .records-list__title is now the link on its own rather than the whole
   row, so the same part of the entry stays clickable whether the songs are
   showing or not. See merge-songs-into-records design.md - D6. */

.records-list {
  display: flex;
  flex-direction: column;
  padding-top: 0.625rem;
}

.records-list__entry {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #201a29;
}

.records-list__entry:last-child {
  border-bottom: none;
}

.records-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.625rem 0.125rem;
}

.records-list__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9375rem;
  color: #e4daf0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.records-list__title:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 4px;
}

.records-list__year {
  flex: none;
  font-size: 0.75rem;
  color: #8d80a3;
  white-space: nowrap;
}

/* A release's songs, nested under it - see landing-records, "The catalogue
   nests each release's songs, hidden by default". Hidden until
   #records-songs is checked, the same `:has()` mechanism song.html.j2 already
   uses for its chords toggle. Indented 18px, one size down from the release
   title (14px against its 15px) - a song that has no page (none exist today,
   but a release published ahead of its lyrics will have one) is plain text,
   not a link, matching the release page's own tracklist rule. */
.records-page:not(:has(#records-songs:checked)) .records-list__songs {
  display: none;
}

.records-list__songs {
  list-style: none;
  margin: 0;
  padding: 0 0.125rem 0.625rem 1.125rem;
  display: flex;
  flex-direction: column;
}

.records-list__songs li {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  font-size: 0.875rem;
  color: #e4daf0;
}

.records-list__songs a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.records-list__songs a:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* The reveal-songs control, on the heading row next to the title. Same
   stacked-grid toggle as .song__chords-toggle, renamed for this page - see
   that rule's own comment for why the grid trick keeps the control from
   resizing when its label swaps. */
.records__songs-toggle {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  min-height: 2.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  background: #2b2338;
  border: 1px solid #8d76b3;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #f6f1fb;
  cursor: pointer;
}

.records__songs-toggle-hide,
.records__songs-toggle-show {
  grid-area: 1 / 1;
  white-space: nowrap;
}

.records__songs-toggle-show {
  visibility: hidden;
}

.records-page:not(:has(#records-songs:checked)) .records__songs-toggle-show {
  visibility: visible;
}

.records-page:not(:has(#records-songs:checked)) .records__songs-toggle-hide {
  visibility: hidden;
}

.records-page:has(#records-songs:focus-visible) .records__songs-toggle {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

/* /records/{slug} - one release. Same doc-page chrome as the catalogue; the
   panel and the streaming pool below it are new. The pool itself reuses
   .platforms__pool / .platforms__link (and the availability control) exactly
   as /links does, per landing-records - "presented alike, no primary CTA". */

.record__panel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem;
  margin-top: 0.875rem;
  border-radius: 8px;
  background: #141018;
  border: 1px solid #2a2433;
}

.record__thumb {
  display: block;
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  background: #1a1520;
}

/* Deliberately legible as empty rather than as a failed image: a diagonal
   hatch on the same surface the real thumb would sit on, not a broken-image icon. */
.record__thumb--placeholder {
  background-color: #1a1520;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(196, 184, 212, 0.14) 0 3px,
    transparent 3px 8px
  );
}

/* The artwork control. Closed, it is exactly the thumb that stood here before.
   Open, the summary itself becomes a fixed dimmed layer with the artwork
   centred on it - the summary and not a child, because nothing inside a
   <details> body can close it without scripting. Stacking stays below
   .skip-link:focus (z-index 10) so a focused skip link is never buried.
   See openspec/changes/add-release-artwork-overlay/design.md - D2, D6.

   .show-entry__art is the same control reused on the shows page (a poster
   rather than a cover) - see add-show-details design.md - D1. The open state
   below is genuinely identical between the two, so its selectors are shared
   here rather than repeated; only the closed footprint is authored per
   control, since a release's cover and a show's poster are not the same
   shape in every skin (D2). */

.record__art {
  /* Holds the thumb's footprint even when both children leave the flow on
     open, so the panel's row never reflows behind the overlay. */
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
}

/* No marker, for the same reason .availability__summary drops it: it hangs in
   the gutter and pushes the thumb off the panel's edge. */
.record__art__toggle,
.show-entry__art__toggle {
  display: block;
  width: 100%;
  height: 100%;
  list-style: none;
  cursor: pointer;
}

.record__art__toggle::-webkit-details-marker,
.show-entry__art__toggle::-webkit-details-marker {
  display: none;
}

.record__art[open] .record__art__toggle,
.show-entry__art[open] .show-entry__art__toggle {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: auto;
  height: auto;
  background: rgba(10, 7, 13, 0.88);
}

/* The thumb has no job once the artwork is shown at size. */
.record__art[open] .record__thumb,
.show-entry__art[open] .show-entry__thumb {
  display: none;
}

/* Drawn on the summary rather than as its own element - a close control in the
   body would be inert without scripting. */
.record__art[open] .record__art__toggle::after,
.show-entry__art[open] .show-entry__art__toggle::after {
  content: "\00d7";
  position: absolute;
  top: 0.5rem;
  right: 0.85rem;
  font-size: 1.75rem;
  line-height: 1;
  color: #c4b8d4;
}

.record__art__full,
.show-entry__art__full {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  /* Clicks fall through to the summary beneath, so tapping the artwork itself
     dismisses it too: the whole layer is one target. */
  pointer-events: none;
}

/* Sized from its own proportions rather than cropped square like the thumb, so
   art that is not square arrives whole. Capped at the source's own width so it
   is never upscaled, and inside the viewport so a margin of backdrop always
   shows - that margin is what makes the backdrop legible as a way out. */
.record__art__image,
.show-entry__art__image {
  width: auto;
  height: auto;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
}

@media print {
  .record__art[open] .record__art__toggle,
  .record__art__full,
  .show-entry__art[open] .show-entry__art__toggle,
  .show-entry__art__full {
    display: none;
  }
}

.record__subtitle {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #a99cba;
}

.record__section {
  padding-top: 1.25rem;
}

.record__heading {
  margin: 0 0 0.5rem;
  padding: 0 0.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #c4b8d4;
}

.record__tracklist {
  list-style: none;
  margin: 0;
  padding: 0.625rem 0.75rem;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: #141018;
  border: 1px solid #2a2433;
}

.record__tracklist li {
  display: flex;
  gap: 0.75rem;
  padding: 0.4375rem 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #ddd5e8;
}

.record__track-num {
  color: #6f6480;
  font-variant-numeric: tabular-nums;
}

/* A track with a song page - same link treatment as everywhere else on the
   site: underlined text, no badge, no icon. */
.record__track-link {
  color: #d4c4e8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.record__track-link:focus-visible {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* /links/shows - two sections (upcoming, past), delimited from one another per
   landing-shows. Reuses .doc-page chrome and .record__thumb(--placeholder) for
   a show's photo - same missing-artwork treatment, not a new one. */

.show-section {
  padding-top: 1.25rem;
}

.show-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.125rem;
}

.show-section__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #c4b8d4;
}

.show-section__label--muted {
  color: #8d80a3;
}

.show-section__count {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #6f6480;
}

.show-empty {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding: 0.875rem 0.8125rem;
  border-radius: 8px;
  background: #141018;
  border: 1px solid #2a2433;
}

.show-empty__line {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #ddd5e8;
  text-wrap: pretty;
}

.show-empty__line:last-child {
  font-size: 0.75rem;
  color: #8d80a3;
}

.show-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}

.show-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.125rem;
}

/* The one class this section adds beyond what /records already gave it: an
   upcoming show is the page's live information and reads as a card; a past
   show is a quieter plain row - same distinction the mockup draws. */
.show-entry--upcoming {
  padding: 0.75rem;
  border-radius: 8px;
  background: #141018;
  border: 1px solid #2a2433;
}

.show-entry__thumb {
  flex: none;
}

/* Closed footprint for the poster control - see the shared open-state rules
   above. 4.5rem square, matching this skin's show thumb (design.md D2). */
.show-entry__art {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
}

/* A shows page carries many poster controls at once, unlike a release page's
   one. While any is open, every other stays out of the tab order, or Tab+Enter
   opens a second overlay stacked invisibly behind the first (design.md D4). */
.doc-page:has(.show-entry__art[open]) .show-entry__art:not([open]) {
  visibility: hidden;
}

.show-entry__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.show-entry__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  color: #e4daf0;
}

.show-entry__date {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: #a99cba;
  font-variant-numeric: tabular-nums;
}

.show-entry--upcoming .show-entry__date {
  color: #c4b8d4;
}

.show-entry__venue {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.2;
  color: #e4daf0;
}

.show-entry__city {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #8d80a3;
}

.show-entry__link {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #a99cba;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* /links/songs/{slug} - one song's lyric, translation, and chords. Reuses
   .doc-page chrome (eyebrow, title, back link, footer) exactly like a release
   page. See openspec/changes/add-song-pages.

   The original/translation toggle and the chord-visibility control are both
   driven by hidden radios/a checkbox and `:has()` on `.song-page`, the same
   family of no-scripting-required control as the record page's artwork
   overlay - `:has()` itself already proven in this file by
   `.platforms__pool:has(.availability[open])`. `:has()` rather than a plain
   sibling combinator because the checkbox and the tab inputs sit inside
   `.song__meta` / `.song__tabs` for their own visual grouping, one level away
   from the panels and chords they control - a sibling combinator cannot cross
   that boundary, `:has()` does not care about it. */

.song__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.125rem;
  margin-top: 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  background: #141018;
  border: 1px solid #2a2433;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: #a99cba;
}

.song__meta-value {
  color: #ebe6ef;
}

/* Stacked-grid toggle: both label spans occupy the same cell, so the track
   auto-sizes to the wider of the two and the control never resizes when its
   own text swaps. `visibility` rather than `display` keeps the hidden span
   in that sizing calculation while still dropping it from the a11y tree,
   same as `display: none` would. */
.song__chords-toggle {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  min-height: 2.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  background: #2b2338;
  border: 1px solid #8d76b3;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #f6f1fb;
  cursor: pointer;
}

.song__chords-toggle-hide,
.song__chords-toggle-show {
  grid-area: 1 / 1;
  white-space: nowrap;
}

.song__chords-toggle-show {
  visibility: hidden;
}

.song-page:not(:has(#song-chords:checked)) .song__chords-toggle-show {
  visibility: visible;
}

.song-page:not(:has(#song-chords:checked)) .song__chords-toggle-hide {
  visibility: hidden;
}

.song-page:has(#song-chords:focus-visible) .song__chords-toggle {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

/* A song that says its tab replaces its lyric: the tab carries the same words,
   in position, so showing both would print them twice. The lyric is the page's
   content whenever the tab is not, so this hides it only while the section is
   revealed - see the change's design.md. Keyed on the same checkbox as the rest
   of the section, so it needs no scripting and keeps no state across a reload. */
.song-page:has(#song-chords:checked) .song__panel--replaced-by-tab {
  display: none;
}

/* Tuning and capo describe how to play the chord grid, so they only mean
   anything while it's on screen - not while collapsed, and not while the
   translation panel (which never carries chords) is showing. The second
   selector matches nothing on a `be` page, which has no lang radios at all;
   the original lyric is always what's showing there, so the first selector
   alone already covers it. Hides the whole `.song__meta` box, not just its
   items - the control that used to live in this box now sits on the title
   row instead, so there's nothing left to keep the box around for. */
.song-page:not(:has(#song-chords:checked)) .song__meta,
.song-page:not(:has(#song-chords:checked)) .song__chord-chart,
.song-page:not(:has(#song-chords:checked)) .song__tablature,
.song-page:has(#song-lang-translation:checked) .song__meta,
.song-page:has(#song-lang-translation:checked) .song__chord-chart,
.song-page:has(#song-lang-translation:checked) .song__tablature {
  display: none;
}

/* Chord chart: one fretboard diagram per chord the song uses, shown above the
   lyric on the same terms as the tuning/capo it sits beside - see
   openspec/changes/song-chord-diagrams/design.md, "Skins style the chart
   through `currentColor`, not through their own geometry". Every stroke and
   fill below is `currentColor`, so this is the only place that names a color
   for the whole chart. */
.song__chord-chart {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 0.875rem;
}

.song__chord-diagram {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 3.75rem;
  margin: 0;
  color: #b49ad9;
}

.song__chord-diagram svg {
  width: 100%;
  height: auto;
}

.song__chord-diagram__string,
.song__chord-diagram__fret {
  stroke: currentColor;
  stroke-width: 1;
  fill: none;
  opacity: 0.55;
}

.song__chord-diagram__nut {
  stroke-width: 3;
  opacity: 1;
}

.song__chord-diagram__dot {
  fill: currentColor;
}

.song__chord-diagram__barre {
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
}

.song__chord-diagram__open {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
}

.song__chord-diagram__mute {
  fill: currentColor;
  font-size: 7px;
}

/* Shortened to a bare fret number - see openspec/changes/song-chord-diagrams -
   "fr" left too little room to size this legibly. The full "N fret" reading
   is an instant CSS hover/focus tooltip instead - see
   `.song__chord-diagram__fret-hint` below - since a native `<title>`'s
   appearance delay is a browser setting no CSS can shorten. */
.song__chord-diagram__fret-label {
  fill: currentColor;
  font-size: 11px;
  pointer-events: none;
}

/* An invisible HTML hotspot layered over the SVG, positioned from the same
   geometry the diagram itself uses (`--hint-x`/`--hint-y`, set inline per
   chord). Lives in HTML rather than SVG so the hover/focus tooltip below it
   is standard CSS, not dependent on generated-content support for SVG
   shapes. `tabindex="0"` plus `:focus-visible` keeps it keyboard-reachable. */
.song__chord-diagram__fret-hint {
  position: absolute;
  left: var(--hint-x);
  top: var(--hint-y);
  width: 0.75rem;
  height: 1.125rem;
  transform: translate(-50%, -50%);
  cursor: help;
}

.song__chord-diagram__fret-tip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.25rem;
  padding: 0.125rem 0.4375rem;
  border-radius: 4px;
  background: #141018;
  border: 1px solid #2a2433;
  font-size: 0.625rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #ebe6ef;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.song__chord-diagram__fret-hint:hover .song__chord-diagram__fret-tip,
.song__chord-diagram__fret-hint:focus-visible .song__chord-diagram__fret-tip {
  opacity: 1;
  visibility: visible;
}

.song__chord-diagram__name {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: #ddd5e8;
}

/* The song's tab, below the chart and revealed with it. A tab's meaning is in
   its columns, so the body neither wraps nor shrinks: it scrolls on its own
   axis instead, which keeps the page itself from scrolling sideways. The
   monospace stack is named here rather than inherited, since a proportional
   face would misalign every fret number in it. */
.song__tablature {
  margin: 0.875rem 0 0;
}

.song__tablature__label {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: #6f6480;
}

.song__tablature__body {
  margin: 0;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  background: #141018;
  border: 1px solid #2a2433;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: #ddd5e8;
}

.song__tabs {
  display: flex;
  margin-top: 1.125rem;
  border-bottom: 1px solid #2a2433;
}

.song__tab {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.875rem 0 0.125rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  color: #8d80a3;
  cursor: pointer;
}

.song-page:has(#song-lang-original:checked) label[for="song-lang-original"],
.song-page:has(#song-lang-translation:checked) label[for="song-lang-translation"] {
  border-bottom-color: #8d76b3;
  font-weight: 700;
  color: #f5f0ff;
}

.song-page:has(#song-lang-original:focus-visible) label[for="song-lang-original"],
.song-page:has(#song-lang-translation:focus-visible) label[for="song-lang-translation"] {
  outline: 2px solid #c4a8d8;
  outline-offset: 2px;
}

.song__panel {
  padding-top: 1.125rem;
}

.song-page:has(#song-lang-translation:checked) .song__panel--original,
.song-page:has(#song-lang-original:checked) .song__panel--translation {
  display: none;
}

.song__section {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.song__section:last-child {
  margin-bottom: 0;
}

.song__section-label {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: #6f6480;
}

.song__lines {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Each group wraps as one unit - the mechanism that keeps a mid-word chord
   change (a word authored as more than one segment) from splitting across a
   line break on a narrow viewport. */
.song__line {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--song-line-gap);
  row-gap: 0.5rem;
  align-items: flex-end;
}

.song__group {
  display: flex;
}

.song__seg {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

/* The trailing padding is what keeps two chord changes inside one word from
   reading as a single name: a segment is as wide as the wider of its chord and
   its word, so where the chord is the wider one the next chord would otherwise
   begin at the exact pixel this one ends. */
.song__chord {
  min-height: 1rem;
  padding-right: 0.6em;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: #b49ad9;
}

.song__word {
  font-size: 0.9375rem;
  color: #ddd5e8;
}

/* Collapsed: the chord row disappears entirely (not just hidden) so the lyric
   closes up to plain text, rather than leaving its line-height reserved. */
.song-page:not(:has(#song-chords:checked)) .song__chord {
  display: none;
}

.song-page:not(:has(#song-chords:checked)) .song__line {
  align-items: baseline;
}

/* A group carrying a chord and no word - a turnaround, or a chord that lands
   ahead of the first word. The line bottom-aligns its groups so the words share
   a baseline, which would drop a wordless group's chord to word height and let
   it read as a word; aligning this one to the top puts its chord back on the
   chord row. */
.song__group--chord-only {
  align-self: flex-start;
}

/* Wide enough for the longest chord name the songs use, so a leading chord sits
   in the gutter rather than out in the page margin. */
.song-page {
  --song-chord-gutter: 2.75rem;
  --song-line-gap: 0.5625rem;
}

/* A chord landing before a line's first word hangs in a gutter rather than
   pushing the word right: the words keep one straight left edge whatever sits
   ahead of them, exactly as the authored chart's own indent does. Reserved only
   while the chords show. The translation panel never carries chords. */
.song-page:has(#song-chords:checked) .song__lines:not(.song__lines--plain):not(.song__lines--grid) {
  padding-left: var(--song-chord-gutter);
}

/* The gutter is the group's whole width, so whatever follows still begins on
   the line's own left edge; the chord is flush to its right end. */
.song__line:has(.song__word) > .song__group--chord-only:first-child {
  flex: 0 0 var(--song-chord-gutter);
  /* Left, not right: every chord landing ahead of a line starts on the same
     x, so the gutter reads as one column. Flush-right instead would ragged
     their left edges, since the names differ in width. */
  justify-content: flex-start;
  margin-left: calc(var(--song-chord-gutter) * -1);
  /* The line's own column-gap would otherwise land between the gutter and the
     first word, pushing it a gap's width further right than a line with no
     leading chord - the ragged edge this rule exists to remove. */
  margin-right: calc(var(--song-line-gap) * -1);
}

/* A song laid out on its chart's grid keeps the chart's columns rather than
   anchoring each chord to a letter. A cell is a chord over the chart's own text up
   to the next chord's column, spaces kept, so in one monospace size a cell is
   exactly as wide as that column distance and the chords stack in columns. The
   grid carries no gutter: the chart's column 0 is the line's own left edge, and
   the lyric keeps the chart's indent. */
.song__line--grid {
  column-gap: 0;
  align-items: flex-start;
}

/* Cells sit flush, so a word running across a column reads as one word; a group
   is the cells such a word joins, and the line wraps only between groups. */
.song__line--grid .song__group {
  flex-wrap: nowrap;
}

.song__cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.song__cell-text {
  white-space: pre;
  font-size: 0.9375rem;
  color: #ddd5e8;
}

/* The last stretch of a line has no next column to hold, so it may shrink and
   wrap between its words rather than force the row past the viewport. */
.song__cell--last {
  flex: 0 1 auto;
  min-width: 0;
}

/* A wrapping row moves an item to the next row as soon as its full width misses,
   before shrinking it, which would push the whole tail below and lose its column.
   Sized from nothing up, the last group stays on its column whenever its longest
   word fits, and only then wraps inside itself. */
.song__line--grid > .song__group:last-child {
  flex: 1 1 0;
  min-width: min-content;
}

.song__cell--last .song__cell-text {
  white-space: pre-wrap;
}

/* A grid song with a wide chord area (`chord_area: wide`) is a chart wider than
   this reading column. While its chords show, the shell widens to the song's
   widest line at the grid's usual size: `--song-grid-columns` characters, the
   build's measure, of 0.61em each - one monospace advance with a little headroom
   - plus main's own padding. It widens --shell-width itself, on body where the
   song page sets the measure, so the top bar and footer keep main's edges; 28rem
   is the :root shell width, restated because a property cannot read its own
   inherited value. `width: 100%` still holds every part inside the viewport, and
   the narrow-viewport `max-width: none` rules still win where they apply. */
body:has(.song-page--wide #song-chords:checked) {
  --shell-width: max(
    28rem,
    calc(var(--song-grid-columns) * 0.61 * 0.9375rem + 2rem)
  );
}

/* Where even the viewport is too narrow, the lines still do not wrap: the grid
   type scales down until the widest line fits, chord names with it, so the
   columns stay columns. Wherever the line fits at the usual size, min() keeps it. */
.song-page--wide .song__lines--grid {
  container-type: inline-size;
}

.song-page--wide .song__line--grid {
  flex-wrap: nowrap;
  font-size: min(0.9375rem, calc(100cqi / (var(--song-grid-columns) * 0.61)));
}

.song-page--wide .song__line--grid .song__cell-text {
  font-size: 1em;
}

.song-page--wide .song__line--grid .song__chord {
  font-size: calc(1em * 0.6875 / 0.9375);
}

.song-page--wide .song__line--grid > .song__group:last-child,
.song-page--wide .song__cell--last {
  flex: none;
  min-width: auto;
}

.song-page--wide .song__cell--last .song__cell-text {
  white-space: pre;
}

/* Two authored renderings of the same song, one shown at a time - each its own
   run of sections, label included. The chorded tree carries chords over exact
   letters, which makes every word its own box, so selecting it copies one word to
   a line. While the chords are hidden the page is only a lyric, so it shows the
   plain tree instead and copies as the lyric does. Hiding each tree whole is also
   what retires an instrumental section with the chords: it has no entry in the
   plain lyric, so it leaves with the tree it belongs to, name and all. */
.song-page:has(#song-chords:checked) .song__section--plain {
  display: none;
}

.song-page:not(:has(#song-chords:checked)) .song__section--chorded {
  display: none;
}

.song__lines--plain {
  gap: 0.375rem;
}

.song__plain-line {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #ddd5e8;
  text-wrap: pretty;
}

