/* site.css — The Serotonium. Hand-written, no framework.
   Sections: fonts · tokens · base · utilities · header · places · menu · footer · search · trail · intro · periods · row · load more · new shares · states. */

/* Fonts ------------------------------------------------------------------- */

/* FURIA holds only the wordmark's glyphs ("The Serotonium."); re-subset it if SITE_NAME changes. */
@font-face { font-family: "FURIA I"; src: url("../fonts/furia-i.b20723257913.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Maison Neue"; src: url("../fonts/maison-neue-book.b2c5449a82e9.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Maison Neue"; src: url("../fonts/maison-neue-medium.1823abb6c9f6.woff2") format("woff2"); font-weight: 500; font-display: swap; }
/* Playfair (full Latin): notes and headings. */
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-regular.27b2f94167bc.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-italic.1445697555f1.woff2") format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.4cc7b4398540.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-600.ed616eb04c5f.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Tokens ------------------------------------------------------------------ */

:root {
  --bg: #f4f2ee;
  --card: #fff;
  --sleeve: #faf8f4; /* the club card: the page warmed a step toward white, softer than a field's white */
  --fg: #151413;
  --title: #000; /* release titles: true black */
  --muted: #625e58;
  --line: #e3dfd8;
  --control: #8a847c;
  --accent: #7a2457;
  --link: #b3437a; /* the search-focus pink, deepened to 4.7:1 on the page; the pink itself is 3.4:1 */
  --focus: #1f5fd6;
  --search-focus: #d06a99; /* softest pink with ≥ 3:1 on page and field */
  --hover: var(--bg); /* a control's hover inside the search field; controls on the page hover to --card */
  --sheen: var(--fg); /* the glint across the lucky spin's pink words: darker than the pink here, brighter on the dark page */
  --hairline: 1px solid var(--line);
  --sheet-shadow: 0 -1rem 2.5rem -1rem color-mix(in srgb, #000 30%, transparent); /* a sheet along a phone's foot */
  --day-margin: 10rem; /* desktop: the days' dates beside their rows, and the club card's cover above them */
  --sans: "Maison Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* Type scale (12/13/14/16/24/28/32/40px). The close small steps match faces optically: 13px mono reads
     as 14px sans. Inputs stay ≥ 16px: iOS zooms on smaller ones. */
  --text-2xs: .75rem;
  --text-xs: .8125rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.5rem;
  --text-xl: 1.75rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --text-display: var(--text-2xl); /* a person's name; a step up on desktop */
  --leading-none: 1;
  --leading-tight: 1.15; /* display serif */
  --leading-snug: 1.3; /* labels and captions */
  --leading: 1.5; /* body and notes */
  --art: 7.5rem;
  --target: 44px;
  --target-sm: 36px; /* the listen targets on a phone, well above WCAG 2.2's 24px minimum */
  --glyph: 20px; /* the icons drawn inside the targets */
  --header: 4.5rem;
  --bar: 0px; /* the new-shares bar, pinned above the header while it shows */
  --fade: 3.5rem; /* the viewport's bottom-edge fade */
  --page-max: 64rem;
  --gutter: 1rem; /* the page's side padding; wider from 40rem */
  --wordmark: clamp(1.875rem, 1.5rem + 1.2vw, 2.25rem);
  /* The header's marks (the keys, and the faders across from them) and how far each drops below the
     baseline. About lines up on their middle. */
  --mark-size: calc(var(--wordmark) * .94);
  --mark-drop: calc(var(--wordmark) * .12);
  --mark-middle: calc(var(--mark-size) / 2 - var(--mark-drop));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0d0c;
    --card: #181716;
    --sleeve: var(--card);
    --fg: #f2efe9;
    --title: var(--fg);
    --muted: #a39d94;
    --line: #2b2927;
    --control: #6e6862;
    --accent: #e7a6cf;
    --link: var(--search-focus); /* 9.9:1 on the dark page */
    --focus: #8ab4ff;
    --search-focus: #e7a6cf;
    --hover: #22201e;
    --sheen: #fff;
  }
}

/* Strictly below 40rem: at exactly 40rem the wide body padding already applies. */
@media (width < 40rem) { :root { --header: 4rem; } }
/* Desktop: the small steps move up one (12/13/14px to 13/14/16px), the day numeral to 28px and a person's
   name to 40px, so the type keeps pace with the larger covers and spacing. Stepping the tokens, by the page's
   own width, grows the intro, search and rows together. */
main { container: page / inline-size; }
@container page (width >= 46rem) {
  main > * { --text-2xs: .8125rem; --text-xs: .875rem; --text-sm: 1rem; --text-lg: 1.75rem; --text-display: var(--text-3xl); }
}

/* Base -------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding: focus and anchors land below the sticky header and above the bottom fade (WCAG 2.4.11). */
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-synthesis: none;
  scroll-padding: calc(var(--bar) + var(--header) + 1rem) 0 calc(var(--fade) + env(safe-area-inset-bottom));
}

body {
  margin: 0 auto;
  max-width: var(--page-max);
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 2rem max(var(--gutter), env(safe-area-inset-left));
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--text-base)/var(--leading) var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  /* The main column takes any spare height, so a short page's footer still sits at the screen's foot. */
  display: flex; flex-direction: column; min-height: 100dvh;
}
main { flex: 1 0 auto; }
/* A soft fade along the viewport's bottom edge hints there's more below. The footer sits above it, so
   at the end of the page its links stay crisp. */
body::after {
  content: ""; position: fixed; inset: auto 0 0; z-index: 1; height: calc(var(--fade) + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
}
@media (width >= 40rem) { :root { --gutter: 1.5rem; } }

h1, h2, h3, p, ol, ul, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus, .release-title:focus:not(:focus-visible) { outline: none; }
svg { fill: currentColor; flex: none; }
/* The kinds' icons share a height and differ in width, as their symbols' viewBoxes do; sized by height,
   each keeps its own shape. */
svg:has(> use[href="#icon-track"]) { aspect-ratio: 1; }
svg:has(> use[href="#icon-album"]) { aspect-ratio: 23 / 15; }
svg:has(> use[href="#icon-video"]) { aspect-ratio: 21 / 15; }
/* The pixel arrow from A Human Future, on links and controls too, as there; the search field keeps its
   text cursor so typing still reads as typing. */
* { cursor: url("../img/cursor.26beb5277b94.svg") 0 0, auto; }
.search input { cursor: text; }

/* Utilities --------------------------------------------------------------- */

.visually-hidden:not(:focus):not(:active) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; z-index: 4; left: 1rem; top: -100%; padding: .75rem 1rem; background: var(--card); }
.skip-link:focus { top: 1rem; }

/* Small mono: counts, the search key and Load more. */
.intro-count, .results-summary, .lucky-summary, .search-key, .more a {
  font-family: var(--mono); font-size: var(--text-xs); letter-spacing: .01em;
}
/* Labels: the smallest mono, in capitals. */
.person-stat dt, .person-since, .diary-genre, .diary-kind, .diary-date, .period-meta, .release-meta, .release-sharer, .release-mark, .toast, .listen-elsewhere a, .release-youtube, .video-close, .not-found-code, .release-note::before,
.genre-add, .genre-change, .genre-dialog-heading, .genre-cancel, .genre-save, .genre-suggestion {
  font: 400 var(--text-2xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase;
}

/* Bordered buttons: Load more and the way home from a missing page. */
.more a, .not-found-home {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--target);
  border: 1px solid var(--control); color: var(--fg); text-decoration: none;
}
.more a:hover, .not-found-home:hover { background: var(--card); }

/* The FURIA keys, drawn in the element's background colour. */
.wordmark a::before, .not-found::before, .sign-in::before, .about-end::after { content: ""; mask: url("../img/keys.e7a18b431a56.png") center / contain no-repeat; }

/* Header ------------------------------------------------------------------ */

/* The sticky bars (header and new shares): the shadows paint each one's background and hairline
   full-bleed; clip-path trims them to the bar's height. */
.site-header, .fresh {
  position: sticky; z-index: 3;
  background: var(--paint); box-shadow: 0 0 0 100vmax var(--paint), 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax -1px);
}

/* Wordmark left; then, from tablet width, About; the menu button right. The row is centred, and within it
   everything lines up with the wordmark's baseline; browsers without last-baseline alignment keep plain centring. */
.site-header {
  --paint: var(--bg); top: var(--bar); display: grid; grid-template-columns: 1fr; grid-auto-flow: column; align-content: center;
  align-items: center; align-items: last baseline; gap: 1rem; min-height: var(--header); padding-top: calc(env(safe-area-inset-top) + .5rem); margin-bottom: 1rem;
}
.wordmark { font: 400 var(--wordmark)/var(--leading-none) "FURIA I", Georgia, serif; overflow-wrap: normal; }
.wordmark a { white-space: nowrap; color: var(--fg); text-decoration: none; }
/* Logomark: the keys, decorative, in the wordmark's colour. Inline so the link's baseline is the text's.
   The image pads the keys by a tenth of its height each side, so this box makes their ink as tall as the T;
   they drop a hair below the baseline, since sitting exactly on it they read as riding high. */
.wordmark a::before { display: inline-block; width: var(--mark-size); height: var(--mark-size); margin-right: .3em; vertical-align: calc(-1 * var(--mark-drop)); background: currentColor; }
.wordmark a::after { content: "." / ""; }

/* The menu button: an icon target pulled out so the glyph lines up with the content edge. The negative
   top margin lets the target rise into the header's padding, so the wordmark alone sets the row's height. */
.menu-button {
  --inset: max(0px, (var(--target) - var(--mark-size)) / 2);
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--target); padding: 0 var(--inset);
  margin: -1rem calc(-1 * var(--inset)) 0 0; border: 0; background: none; color: var(--fg);
}
/* The keys' box: as big, and dropped below the baseline as far, so the faders sit level with them. */
.menu-button svg { width: var(--mark-size); height: var(--mark-size); overflow: visible; translate: 0 var(--mark-drop); }

/* Faders: two hairline tracks, each with a hollow knob at its own level, as on a mixing desk. While the
   menu is open the knobs drop out and the tracks cross into the ×, beside the panel, that closes it. */
.fader-track { stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; transform-box: view-box; }
/* Each track turns about its own middle, as drawn in menu.html (x 12; y 9 and 15). */
.fader-track-top { transform-origin: 12px 9px; }
.fader-track-bottom { transform-origin: 12px 15px; }
.fader-knob { fill: var(--bg); stroke: currentColor; stroke-width: 1.1; transform-box: fill-box; transform-origin: center; }
/* A tap leaves a phone's button in :hover, which would keep the faders moved after closing. */
@media (hover: hover) {
  .menu-button:hover .fader-knob { stroke: var(--link); }
  .menu-button:hover .fader-knob-top { translate: 6px; }
  .menu-button:hover .fader-knob-bottom { translate: -6px; }
}
:root:has(.menu:popover-open) .fader-track-top { translate: 0 3px; rotate: 45deg; }
:root:has(.menu:popover-open) .fader-track-bottom { translate: 0 -3px; rotate: -45deg; }
:root:has(.menu:popover-open) .fader-knob { scale: 0; opacity: 0; }

/* Places ------------------------------------------------------------------ */

/* The List, Album Club and About, at the top of the menu; About also sits in the header from tablet width.
   The page you're on carries the pink dot that marks fresh shares, so it isn't told by colour alone: before
   About in the header, after the name in the menu, where the names line up on the left. */
.site-nav a[aria-current="page"]::before, .menu .places a[aria-current="page"]::after {
  content: ""; flex: none; width: .375rem; height: .375rem; border-radius: 50%; background: var(--search-focus);
}
.site-nav { display: none; }
.site-nav .places { margin-right: .5rem; }
.site-nav a {
  display: inline-flex; align-items: center; gap: .5rem; min-height: var(--target); color: var(--muted); text-decoration: none;
  font: 400 var(--text-xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase;
  /* The row lines up on the wordmark's baseline, which would sit the capitals low beside the keys and faders;
     this lifts their middle (half Plex Mono's cap height) to the marks' middle. */
  translate: 0 calc(.349em - var(--mark-middle));
}
.site-nav a[aria-current="page"] { color: var(--fg); }
@media (hover: hover) { .site-nav a:hover { color: var(--fg); } }
@media (width >= 48rem) { .site-nav { display: block; } }

/* Menu -------------------------------------------------------------------- */

/* The panel: a black faceplate in both colour schemes, with a hairline for the dark page. The page
   slides aside as it arrives, by the panel's width. Light dismiss and Escape come with popover, but the
   tap that dismisses also lands on what's beneath it, so the page takes no pointer while the panel is open. */
:root { --menu-width: min(31.5vw, 19.6rem); }
@media (width < 40rem) { :root { --menu-width: min(59.5vw, 15.4rem); } }
html { overflow-x: clip; }
:root:has(.menu:popover-open) body { translate: calc(-1 * var(--menu-width)); pointer-events: none; }
.menu, .menu-button { pointer-events: auto; }
.menu {
  --plate: #0e0d0c; --plate-fg: #f2efe9; --plate-muted: #a39d94; --plate-line: #2b2927; --plate-hover: #e7a6cf;
  display: none; position: fixed; inset: 0 0 0 auto; width: var(--menu-width); height: 100dvh; max-height: none; margin: 0;
  padding: calc(env(safe-area-inset-top) + 1.25rem) max(1.5rem, env(safe-area-inset-right)) 2rem 1.5rem;
  border: 0; border-left: 1px solid var(--plate-line); background: var(--plate); color: var(--plate-fg); overflow-y: auto;
}
/* A column, so the account can sink to the panel's foot, under the places and the ways to follow. */
.menu:popover-open { display: flex; flex-direction: column; }
.menu::backdrop { background: none; }
.menu:focus { outline: none; }
.menu :focus-visible { outline-color: var(--plate-fg); }
.menu-close, .menu-heading { color: var(--plate-muted); font: 400 var(--text-xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase; }
.menu-close { align-self: flex-end; min-height: var(--target); margin-right: -.5rem; padding: 0 .5rem; border: 0; background: none; }

/* The places in the large italic; each group under them in the smaller, below a hairline and a mono heading. */
.menu :is(.places, .menu-links) :is(a, button) {
  display: flex; align-items: center; width: 100%; min-height: var(--target); padding: 0; border: 0; background: none; color: inherit; text-align: left; text-decoration: none;
  font: italic 400 clamp(var(--text-base), .9rem + .6vw, var(--text-lg))/var(--leading-tight) var(--serif);
}
.menu :is(.places, .menu-links) :is(a, button):hover { color: var(--plate-hover); }
.menu .places { margin-top: 1rem; }
.menu .places a { padding: .25rem 0; font-size: clamp(var(--text-lg), 1.2rem + 1vw, var(--text-2xl)); }
/* The dot follows the name, clear of the italic's overhang. */
.menu .places a[aria-current="page"]::after { margin-left: .625rem; background: var(--plate-hover); }
.menu-group { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--plate-line); }
.menu-heading { margin-bottom: .25rem; }
.menu-account { margin-top: auto; }
/* Each account link keeps its 44 px target, but they sit as close as the places do: a target reaches past
   its line into the next, as a row's genre link does, and the lower link takes a tap where they meet. */
.menu:popover-open .menu-account li + li { margin-top: -.625rem; }
.menu-group:has(+ .menu-account) { margin-bottom: 2.5rem; } /* the least the account sinks by, on a short screen */
.menu-external { width: .7em; height: .7em; margin-left: .4em; color: var(--plate-muted); }
.menu-feeds-heading { display: block; padding-top: .25rem; font: italic 400 clamp(var(--text-base), .9rem + .6vw, var(--text-lg))/var(--leading-tight) var(--serif); }
/* A min-width gives even "All" a 44 px tap target, and setting its text at the end of that tabs the feeds in
   under their heading while keeping the gaps around each slash even;
   the padding stays small so all three fit on one line in a phone's narrow panel. */
.menu-feeds ul { display: flex; flex-wrap: wrap; align-items: center; }
.menu-feeds li { display: flex; align-items: center; }
/* The slash trails its link, so a line that does wrap starts with a feed rather than a stray slash.
   The plain value is for browsers that can't read the second, which hides the slash from screen readers. */
.menu-feeds li:not(:last-child)::after { content: "/"; content: "/" / ""; color: var(--plate-muted); font: var(--text-xs) var(--mono); }
.menu .menu-feeds a { justify-content: flex-end; width: auto; min-width: var(--target); padding-inline: .3125rem; font: 400 var(--text-xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase; }
/* Without popover the panel could never open, so its links show in a row under the header, the places first. */
@supports not selector(:popover-open) {
  .menu-button, .menu-close, .menu-heading, .site-nav { display: none; }
  .site-header { grid-auto-flow: row; gap: 0; }
  .menu, .menu .places, .menu-group, .menu-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
  .menu {
    --plate-fg: var(--fg); --plate-muted: var(--muted);
    position: static; width: auto; height: auto; padding: 0; border: 0; background: none; color: var(--fg); overflow: visible;
  }
  .menu-group { margin: 0; padding: 0; border: 0; }
  .menu .places { margin: 0; }
  .menu :is(.places, .menu-links) :is(a, button) { display: inline-flex; width: auto; font: var(--text-sm)/var(--leading-snug) var(--mono); text-decoration: underline; }
  .menu-feeds { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
  .menu-feeds ul, .menu-feeds li { gap: 0 .5rem; }
  .menu-feeds ul { margin-left: 0; }
  .menu-feeds-heading { padding: 0; font: var(--text-sm)/var(--leading-snug) var(--mono); }
}

/* Footer ------------------------------------------------------------------ */

/* At the end of every page, past a hairline: the places and feeds again, quiet as the rows' labels. */
.site-footer { position: relative; z-index: 2; margin-top: 2rem; }
.site-footer ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5rem; }
.site-footer a {
  display: inline-flex; align-items: center; min-height: var(--target); color: var(--muted); text-decoration: none;
  font: 400 var(--text-2xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase;
}
.site-footer a:hover { color: var(--fg); text-decoration: underline; }

/* Search ------------------------------------------------------------------ */

/* The header's own bottom margin suits a trail; under it, the search sits a touch closer. */
.search { margin-top: -.375rem; }
.search-row { display: flex; align-items: center; gap: .5rem; padding: .375rem; border: var(--hairline); background: var(--card); }
.search-row:focus-within { outline: 3px solid var(--search-focus); outline-offset: 2px; }
.search-row:has(.lucky:focus) { outline: none; } /* the lucky spin draws its own ring */
.search input {
  flex: 1; min-width: 0; min-height: var(--target); padding: 0 .75rem;
  border: 0; background: none; color: var(--fg); font: inherit;
}
.search input::placeholder { color: var(--muted); opacity: 1; font-size: var(--text-xs); } /* the field stays 16px */
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search input:focus { outline: none; }
.search button { min-height: var(--target); min-width: var(--target); border: 0; background: none; color: var(--fg); }
/* The × is a glyph, so it takes the icons' size. */
.search-clear { display: none; font-size: var(--glyph); line-height: var(--leading-none); }
.search-clear:hover { background: var(--hover); }
/* × works only through site.js, which unhides it. A class on <html> would do the same but restyle every row. */
.search-row:has(input:not(:placeholder-shown)) .search-clear:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
.search-key { margin-right: .5rem; padding: .0625rem .375rem; border: var(--hairline); color: var(--muted); }
.search-row:has(input:not(:placeholder-shown)) .search-key, .search-row:focus-within .search-key { display: none; }
@media (hover: none) { .search-key { display: none; } }

/* The results' first line, for a search or a spin: the summary on the left, a spin's name on the right. */
.results-bar { display: flex; align-items: baseline; gap: 1rem; margin-top: 1rem; }
.results-bar .results-summary { flex: 1; min-width: 0; }
.results-bar .lucky-summary { flex: none; text-align: right; }

/* The lucky spin ends the field, past a hairline: the other way in, in the site's pink italic serif with
   a magic record. With nothing to spin it goes, and the field takes the line. On a phone the
   field's padding narrows and the lucky spin keeps only its words, so the placeholder fits. */
.lucky {
  display: inline-flex; flex: none; align-items: center; gap: .375rem; align-self: stretch; padding: 0 .5rem 0 .875rem;
  border-left: var(--hairline); color: var(--link); text-decoration: none; white-space: nowrap;
  font: italic 400 var(--text-sm)/var(--leading-snug) var(--serif);
}
/* A tap leaves a phone's link in :hover, which would keep it underlined. */
@media (hover: hover) { .lucky:hover .lucky-label { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; } }
.lucky-label { padding-right: .15em; } /* room for the italic's overhang */
/* A record with two grooves and a label, catching the light in two short arcs, with sparkles off its edge.
   It turns on the record's own centre; each sparkle twinkles on its own. */
.vinyl { flex: none; width: 1.15em; height: 1.15em; overflow: visible; fill: currentColor; }
/* The record's centre, as drawn in release_list.html's vinyl partial. */
.vinyl-turn, .vinyl-disc { transform-box: view-box; transform-origin: 7px 9px; }
.vinyl-shine { fill: none; stroke: var(--card); stroke-width: .7; stroke-linecap: round; }
.vinyl-sparkle { transform-box: fill-box; transform-origin: center; }
main:has(> .results[data-count="0"]) .lucky { display: none; }
/* Its noun is the kind chosen under the field ("lucky album"), or "spin" for every kind. */
.lucky-noun { display: none; }
.search:has(.kinds [value=""]:checked) .lucky-noun[data-kind=""],
.search:has(.kinds [value="track"]:checked) .lucky-noun[data-kind="track"],
.search:has(.kinds [value="album"]:checked) .lucky-noun[data-kind="album"],
.search:has(.kinds [value="video"]:checked) .lucky-noun[data-kind="video"] { display: inline; }
@media (width < 40rem) {
  .search input { padding-inline: .375rem; text-overflow: ellipsis; }
  .lucky { padding-left: .625rem; padding-right: .25rem; }
  .lucky-lead, .vinyl { display: none; }
}

/* The kinds, docked under the field as its lower band: four equal cells between hairlines, each name
   with its count a little raised in the lucky spin's italic serif. A pink disc and a pink count mark
   the chosen kind; every cell keeps the disc's room, so choosing never shifts a name. A person's Shared and
   Saved tabs share the type, disc and count, marking the list shown the same way. */
.kinds {
  display: grid; grid-template-columns: repeat(4, 1fr); min-inline-size: 0; margin: 0; padding: 0;
  border: var(--hairline); border-top: 0; background: var(--card);
}
:is(.kind, .person-tab) {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: var(--target);
  padding: .75rem .25rem .7rem; color: var(--muted); white-space: nowrap; cursor: pointer;
  font-family: var(--mono); font-size: calc(var(--text-2xs) * .9); letter-spacing: .08em; text-transform: uppercase;
}
.kind + .kind { border-left: var(--hairline); }
:is(.kind, .person-tab)::before { content: ""; flex: none; width: .375rem; height: .375rem; margin-right: .55em; border-radius: 50%; }
/* The radio covers its cell, unseen, so the whole cell takes the tap and the keyboard works as usual. */
.kind input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
/* Playfair's hairlines need a size above the mono's to hold. */
:is(.kind-count, .person-tab-count) { position: relative; top: -.25em; margin-left: .45em; font: italic 400 .8125rem/1 var(--serif); letter-spacing: 0; text-transform: none; opacity: .8; }
/* The chosen kind, or the list a person's page shows, which its tab's link marks as the current page. */
:is(.kind:has(:checked), .person-tab[aria-current="page"]) { color: var(--fg); }
:is(.kind:has(:checked), .person-tab[aria-current="page"])::before { background: var(--link); }
:is(.kind:has(:checked) .kind-count, .person-tab[aria-current="page"] .person-tab-count) { color: var(--link); opacity: 1; }
:is(.kind:has(:focus-visible), .person-tab:focus-visible) { outline: 3px solid var(--search-focus); outline-offset: -3px; }
@media (hover: hover) { .kind:hover { color: var(--fg); background: var(--hover); } }
/* A phone's cells are narrow: tighter capitals, and the disc and count closer in. */
@media (width < 40rem) {
  .kind { padding-inline: 0; letter-spacing: .02em; }
  :is(.kind, .person-tab)::before { width: .3125rem; height: .3125rem; margin-right: .35em; }
  :is(.kind-count, .person-tab-count) { margin-left: .35em; }
}
/* The smallest screens have no room for the names, so each kind's icon stands in for it, a size up on a
   row's so its grooves hold. "All" has no icon and keeps its word; assistive tech still reads every
   name. The widths follow each icon's drawing. */
.kind-icon { display: none; height: 1rem; }
@media (width < 24rem) {
  .kind-icon { display: block; }
  .kind-icon + .kind-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.kinds-submit { margin-top: .5rem; padding: .5rem 1rem; border: var(--hairline); background: var(--card); color: var(--fg); font: inherit; }

.results-summary, .lucky-summary { color: var(--muted); text-wrap: pretty; }
/* Its way back sits on a line of its own, so a narrow screen never splits it from the words. */
.results-summary a { display: block; width: fit-content; }

/* Trail ------------------------------------------------------------------- */

/* Every page off the list opens the same way: "← The List" in small mono capitals, then a slash and the
   page's section, muted. The negative top margin keeps the 44px target from pushing the page down past
   the text's own height. */
.trail ol {
  display: flex; flex-wrap: wrap; align-items: center; margin-top: -.75rem; color: var(--muted);
  font: 400 var(--text-2xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase;
}
.trail li { display: flex; align-items: center; min-height: var(--target); }
.trail li + li::before { content: "/" / ""; padding-inline: .625rem; }
.trail-back { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--target); color: var(--fg); text-decoration: none; }
.trail-label { text-decoration: underline 1px; text-underline-offset: .2em; }
@media (hover: hover) { .trail-back:hover .trail-label { text-decoration-thickness: 2px; } }

/* Intro (a page's heading under the trail) --------------------------------- */

.intro { margin-bottom: 1.5rem; }
.intro h1 { font: italic 400 var(--text-xl)/var(--leading-tight) var(--serif); text-wrap: balance; }
.intro-count { margin-top: 1rem; color: var(--muted); }

/* A person's page: a header that reads like a profile (their name, slug and three figures), then their two lists under section tabs. From 56rem the header becomes a column of its own
   beside the lists, held in view while they scroll, its figures a row each; the lists beside it keep one line a row,
   so titles keep their length. */
.person-intro { margin-bottom: 0; }
/* The name, slug and start date, a step apart. */
.person-who { display: grid; gap: .5rem; margin-top: .5rem; }
.person-who h1 { margin-bottom: .375rem; } /* the slug sits a little further from the name than the date from the slug */
.person-intro h1 { font-size: var(--text-display); line-height: 1.05; letter-spacing: -.015em; }
/* The slug in a small boxed label on one line. Each step of slug length sizes it so its longest slug fills the column,
   as a mono character is .6em wide; shorter slugs stop at the label size. The column is its container, so the size
   follows the column's width. */
.person-handle { container-type: inline-size; }
.person-slug {
  --fit: 30; --inset: .625rem;
  --chrome: calc(2 * var(--inset) + 2px); /* the label's side padding and border */
  display: inline-block; max-width: 100%; padding: .35rem var(--inset) .3rem; overflow: hidden;
  border: var(--hairline); border-radius: 3px; background: var(--card); color: var(--link); white-space: nowrap; text-overflow: ellipsis;
  text-decoration: none;
  font: 400 min(var(--text-xs), calc((100cqi - var(--chrome)) / (var(--fit) * .6)))/var(--leading-snug) var(--mono);
}
/* A click copies its link, so it says so to a pointer, and its border takes the pink when pointed at. */
.person-slug[data-copy-url] { cursor: copy; }
@media (hover: hover) { .person-slug:hover { border-color: currentColor; } }
.person-slug--fit-33 { --fit: 33; }
.person-slug--fit-36 { --fit: 36; }
.person-slug--fit-39 { --fit: 39; }
.person-slug--fit-42 { --fit: 42; }
.person-slug--fit-46 { --fit: 46; }
.person-slug--fit-81 { --fit: 81; } /* the admin's longest slug and its slash */
/* Three figures in cells between hairlines, each over its label; the last takes its label's width, so
   "Saved by others" keeps to one line, and the others share the rest. A phone has no room to spare for them: the
   tabs' counts say the same. */
.person-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; margin: 1.5rem 0 0; border-block: var(--hairline); }
.person-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .375rem; padding-block: .875rem; }
.person-stat + .person-stat { padding-left: 1rem; border-left: var(--hairline); }
.person-stat dt { white-space: nowrap; }
.person-stat dd {
  margin: 0; font: 500 var(--text-lg)/var(--leading-none) var(--sans); font-variant-numeric: tabular-nums lining-nums;
}
.person-stat dt, .person-since { color: var(--muted); }
@media (width < 40rem) { .person-stats { display: none; } }
/* Shared and Saved: section tabs on a hairline, the list shown ruled in ink as well as marked with the pink
   disc and count. */
.person-tabs { display: flex; gap: 1.75rem; margin-top: 1.75rem; border-bottom: var(--hairline); }
.person-tab {
  justify-content: flex-start; padding-inline: 0; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none;
}
.person-tab[aria-current="page"] { border-bottom-color: var(--fg); }
@media (hover: hover) { .person-tab:hover { color: var(--fg); } }

@container page (width >= 56rem) {
  .person-page { display: grid; grid-template-columns: 18rem minmax(0, 1fr); column-gap: 3.5rem; align-items: start; }
  .person-stats { grid-template-columns: minmax(0, 1fr); }
  .person-stat { flex-direction: row; align-items: baseline; justify-content: space-between; padding-block: .75rem; }
  .person-stat + .person-stat { padding-left: 0; border-left: 0; border-top: var(--hairline); }
  .person-stat dd { font-size: var(--text-base); }
  /* The tabs' 44px row centres on the trail's beside it, which reaches up the same way. */
  .person-tabs { margin-top: -.75rem; }
  /* Held beside the lists only while it fits the screen; a short one leaves it in the flow. */
  @media (height > 44rem) { .person-intro { position: sticky; top: calc(var(--bar) + var(--header) + 1rem); } }
}

/* Periods ----------------------------------------------------------------- */

/* Each day sets the rows' rhythm, and --breath, three quarters again, for each row's top and bottom space. */
.period { --rhythm: 1rem; --breath: calc(var(--rhythm) * 1.75); }
/* A continued day sits straight under the last page's rows, so only a headed day leaves a gap above it.
   The first leaves less, under the search. */
.period:has(h2) { margin-top: 3rem; }
.period:first-of-type { margin-top: 2.25rem; }
@media (width < 40rem) { .period:has(h2), .period:first-of-type { margin-top: 2rem; } }
/* On a phone the first day sits closer under the tabs' bar, so the bar reads as its list's own. */
@media (width < 40rem) { .person-tabs ~ .results .period:first-of-type { margin-top: 1.25rem; } }
/* A person's months follow the last line's own padding, so a shorter step keeps each month with its lines. */
.results--diary .period:has(h2):not(:first-of-type) { margin-top: 1.25rem; }
/* A masthead for each day: its date left, with its year, the count right, on a grey
   rule. The big numeral sits on the count's baseline, since its taller line box would float it
   above. Drawn parts are hidden from assistive tech, which reads the full date instead. */
.period h2, .period-continued {
  display: flex; align-items: last baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: .5rem; border-bottom: var(--hairline);
}
.period-name { font: 500 var(--text-lg)/var(--leading) var(--sans); white-space: nowrap; }
/* A person's page heads short lines, so on a phone its day steps down beside the feed's. */
@media (width < 40rem) { .results--diary .period-name { font-size: 1.25rem; } }
.period-meta { color: var(--muted); text-align: right; }
.period-meta > span { display: block; }
/* A day continued from the last page: a hairline above its rows, as between any two rows. Its redrawn
   date shows only in the wide layout's column. */
.period:not(:has(h2)) .releases { border-top: var(--hairline); }
.period-continued { display: none; }
.results { container: feed / inline-size; }
/* A person's diary keeps its day pinned above its short lines at every width, so it never takes the feed's
   desktop margin column: naming its container apart keeps the feed's queries off it. */
.results--diary { container-name: diary; }
/* Phone, tablet and the diary: the date pins under the header while its rows scroll past. A continued day
   draws its date too, so the pinned date never goes blank after Load more. Short viewports leave it in the
   flow, as they do the header. The feed's desktop layout below takes its place there. */
@media (height > 30rem) {
  /* The pinned date's line, padding and rule. Sharing the numeral's baseline lifts the two-line count
     a few pixels above the numeral's line, so the height is fixed and the top padding gives the year
     room on the bar's own background; without it the header covers the year's capitals. */
  .period { --pinned-date: calc(var(--text-lg) * var(--leading) + .75rem + 1px); }
  .period h2, .period-continued {
    position: sticky; top: calc(var(--bar) + var(--header)); z-index: 1; background: var(--bg);
    height: var(--pinned-date); padding-top: .25rem;
  }
  .period-continued { display: flex; }
  .period:not(:has(h2)) .releases { border-top: 0; }
  /* Focus and anchors land below the pinned date as well as the header. */
  .releases :is(a, summary, input, [tabindex]) { scroll-margin-top: var(--pinned-date); }
  /* The feed's desktop margin column below resets each of these, so a property added here needs its reset there. */
}

/* Row: an index entry, one release per line between hairlines. The label line runs across the top; under
   it, beside the cover, the caption (title, artist, note), the listen links resting on the cover's bottom
   edge, and under them, across the row, the footer (byline and marks). Lays out by the list's own width (container query): from tablet width
   the cover and targets grow. Its gaps follow the day's rhythm. */

.releases { container: releases / inline-size; }
.releases > li:not(:last-child) { border-bottom: var(--hairline); } /* the next day's rule closes the last */

.release {
  --hit: var(--target-sm);
  --inset: calc((var(--hit) - var(--glyph)) / 2);
  --step: calc(var(--rhythm) * .75); /* between the caption and the listen links */
  display: grid; grid-template: auto auto 1fr auto / var(--art) minmax(0, 1fr); column-gap: var(--rhythm);
  padding-block: var(--breath);
}

.release-art-link { grid-area: 2 / 1 / 4; align-self: start; color: inherit; text-decoration: none; }
.release-art {
  display: block; width: var(--art); height: var(--art); object-fit: cover; background: var(--card);
  outline: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); outline-offset: -1px;
}
.release-art--empty { display: grid; place-items: center; color: var(--muted); font: 400 var(--text-2xl)/var(--leading-none) var(--serif); }

.release-meta, .release-sharer { color: var(--muted); }
/* The label line, across the row: kind on the left, genre on the right, trimmed to their caps. */
.release-meta { grid-area: 1 / 1 / auto / -1; display: flex; justify-content: space-between; gap: .75rem; margin-bottom: calc(var(--rhythm) * 1.5); }
/* Phones have no hover, so a faint dotted underline is what says this is a link. */
.release-genre { font-weight: 600; text-align: right; text-decoration: underline dotted 1px color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: .3em; }
/* The label line's links: the kind on the left, to the list of that kind, and on the right the genre,
   or a video's "To YouTube" in its place. Each ::after stretches the tap target to 44px without
   making the line any taller. The kind has no underline: it reads as a label first. */
.release-kind, .release-genre, .release-youtube { position: relative; color: var(--muted); text-box: trim-both cap alphabetic; }
.release-kind { text-decoration: none; }
:is(.release-kind, .release-genre, .release-youtube):is(:hover, :active) { color: var(--link); }
:is(.release-kind, .release-genre, .release-youtube)::after { content: ""; position: absolute; inset: calc((1cap - var(--target)) / 2) -.75rem; }
/* The symbols' viewBoxes end at the record's outer edge, so a cap-tall icon on the baseline spans the capitals exactly. */
.release-kind svg, .diary-kind svg { height: 1cap; margin-right: .5em; vertical-align: baseline; }

.release-text { grid-area: 2 / 2; }

/* The negative top margin lifts the title's capitals level with the cover's top edge. Trimming the text box
   would also do it, but the clamp's overflow: hidden then clips the tops of round letters and accents. */
.release-title {
  margin: -.2em 0 .25rem; font: 500 var(--text-sm)/var(--leading-snug) var(--sans); letter-spacing: .04em; text-transform: uppercase;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.release-title a { color: var(--title); text-decoration: none; }
.release-title a:hover { text-decoration: underline 1px; }
/* The clamp clips the title link's own outline, so focus outlines the whole row it names. */
.release-title a:focus-visible { outline: none; }
.release:has(.release-title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; }
/* Sentence case, so the title is the one line of sans capitals. */
.release-artist { color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-snug); }

/* The note: the sharer talking, in small italic serif so it reads as an aside under the release. With
   site.js it shows up to two lines ending in "…", and a tap opens it whole; the clamp is only drawn, so
   assistive tech always reads all of it. Without the script there's nothing to open it, so it shows whole. */
.release-note { margin-top: .375rem; color: var(--muted); font: italic 400 var(--text-xs)/var(--leading) var(--serif); }
.release-note-text { max-width: 40em; text-wrap: pretty; }
.release-note-text::before { content: "“" / ""; }
.release-note-text::after { content: "”" / ""; }
@media (scripting: enabled) {
  .release-note { cursor: pointer; }
  .release-note:not(.is-open) .release-note-text {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
}

/* The footer, across the row under the listen links: the byline under the cover, the marks under "All". */
.release-footer {
  grid-area: 4 / 1 / auto / -1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1rem;
  margin-top: calc(var(--rhythm) + 5px);
}
.release-sharer a { color: var(--link); }
.release-tag { display: inline-block; padding: .125rem .375rem; border: 1px solid var(--control); }

/* The marks, "Saved" then "Seen": an icon and its word at the footer's end, in the byline's type, wrapping under
   it together when it's long. Each ::after stretches its tap target to 44px without making the row any taller, and
   the gap between them keeps the two targets apart. The words set the baseline, so they share a line with the
   byline. The checkbox stays for its keyboard and screen reader behaviour, drawn as nothing over the whole mark. */
.release-marks { display: flex; align-items: baseline; column-gap: 1.5rem; margin-left: auto; }
.release-mark { position: relative; display: flex; align-items: baseline; color: var(--muted); cursor: pointer; }
/* Until the script reveals it the mark keeps its space, so rows don't grow when it appears. */
.release-mark[hidden] { visibility: hidden; }
.release-mark::after { content: ""; position: absolute; inset: calc((1lh - var(--target)) / 2) -.75rem; }
.release-mark input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
/* The flourishes spill past the icon's box. */
.release-mark svg { flex: none; align-self: center; width: 1rem; height: 1rem; margin-right: .4rem; overflow: visible; }
.release-mark:has(:checked) { color: var(--fg); }
@media (hover: hover) { .release-mark:hover { color: var(--fg); } }
.release-mark:has(:focus-visible) { outline: 3px solid var(--search-focus); outline-offset: 2px; }

/* The marks' icons at rest. They're drawn from the sprite, out of reach of selectors here, so their filled and moving
   parts follow properties the mark sets, which reach into them by inheritance. Off, an icon is outlined; on, its pupil,
   or its shutter and label, fill in ink. Registered, the properties can be animated; a browser that can't register
   them shows the marks still. */
@property --eye-open { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --flourish { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --disk-shutter { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --disk-drop { syntax: "<number>"; inherits: true; initial-value: 0; }
.mark-fill { fill: var(--mark-fill, none); }
.release-mark:has(:checked) { --mark-fill: currentColor; }
/* The eye is always open; its lids only close for a blink or a squint. */
.eye-lids { transform: scaleY(var(--eye-open, 1)); transform-origin: 8px 8px; }
.disk-shutter { transform: translateX(calc(var(--disk-shutter, 0) * 1px)); }
.release-save svg { translate: 0 calc(var(--disk-drop, 0) * 1px); }
/* Each mark's flourish, in the link's pink and unseen at rest: five lines fanned over the eye, a comic "pop", and four
   notes round the disk, a quaver and a beamed pair turn about. As --flourish runs from 0 to 1 they grow and fly out in
   their own direction, the notes tilting as they go, at full strength for most of the way and fading only at the end. */
:is(.mark-pop, .mark-note) {
  transform-box: fill-box; transform-origin: center;
  opacity: min(1, var(--flourish, 0) * (1 - var(--flourish, 0)) * 7);
  translate: calc(var(--flourish, 0) * var(--drift-x) * 1px) calc(var(--flourish, 0) * var(--drift-y) * 1px);
}
.mark-pop { stroke: var(--link); stroke-width: 1.1; scale: calc(.5 + var(--flourish, 0) * .7); }
.mark-note {
  fill: var(--link); scale: calc(.7 + var(--flourish, 0) * .4); rotate: calc(var(--flourish, 0) * var(--tilt) * 1deg);
}
.pop-w { --drift-x: -1.75; --drift-y: -1; }
.pop-nw { --drift-x: -.85; --drift-y: -1.8; }
.pop-n { --drift-x: 0; --drift-y: -2; }
.pop-ne { --drift-x: .85; --drift-y: -1.8; }
.pop-e { --drift-x: 1.75; --drift-y: -1; }
.note-nw { --drift-x: -3; --drift-y: -4; --tilt: -15; }
.note-ne { --drift-x: 3; --drift-y: -4; --tilt: 15; }
.note-e { --drift-x: 4; --drift-y: -2; --tilt: 12; }
.note-sw { --drift-x: -4; --drift-y: -1; --tilt: -12; }

/* The marks' motion. Only a change the visitor makes moves, once (site.js adds is-changing): marked, the eye blinks
   or the disk dips into its drive as its shutter slides, and then the flourish flies; unmarked, the eye squints or
   the disk lifts out. Marks drawn on load, from another tab or by Load more appear still. */
@media (prefers-reduced-motion: no-preference) {
  .release-seen.is-changing:has(:checked) { animation: eye-blink 1100ms ease-out; }
  .release-seen.is-changing:not(:has(:checked)) { animation: eye-squint 200ms ease-in-out; }
  .release-save.is-changing:has(:checked) { animation: disk-insert 1100ms ease-out; }
  .release-save.is-changing:not(:has(:checked)) { animation: disk-eject 200ms ease-out; }
}
/* The blink, or the dip and slide, are over by 40%; the flourish rises from 30% and runs to the end. */
@keyframes eye-blink {
  0% { --eye-open: 1; --flourish: 0; }
  20% { --eye-open: .1; }
  30% { --flourish: 0; }
  40% { --eye-open: 1; }
  100% { --eye-open: 1; --flourish: 1; }
}
@keyframes disk-insert {
  0% { --disk-drop: 0; --disk-shutter: 0; --flourish: 0; }
  20% { --disk-drop: 2; }
  30% { --disk-shutter: 2; --flourish: 0; }
  40% { --disk-drop: 0; --disk-shutter: 0; }
  100% { --disk-drop: 0; --disk-shutter: 0; --flourish: 1; }
}
@keyframes eye-squint { 0%, 100% { --eye-open: 1; } 50% { --eye-open: .55; } }
@keyframes disk-eject { 0% { --disk-drop: 0; } 40% { --disk-drop: -2; } 100% { --disk-drop: 0; } }

/* A seen row folds down to its kind, title and artist: the title stays in its own column, so folded rows still line up
   with open ones, and the footer moves to the line's end. "Saved" goes, as a seen row is set aside; the byline
   stays only where there's room for it. */
.release:has(.release-seen :checked) {
  grid-template: auto / var(--art) minmax(0, 1fr) auto; align-items: baseline; padding-block: var(--rhythm);
}
.release:has(.release-seen :checked) :is(.release-genre, .release-youtube, .release-art-link, .video-poster, .video-player, .release-note, .listen, .listen-toggle, .release-save) { display: none; }
.release:has(.release-seen :checked) .release-meta { grid-area: 1 / 1; margin: 0; } /* the kind, in the cover's column */
.release:has(.release-seen :checked) .release-text { grid-area: 1 / 2; }
.release:has(.release-seen :checked) .release-title { margin: 0; -webkit-line-clamp: 1; }
.release:has(.release-seen :checked) .release-title a { color: var(--muted); }
.release:has(.release-seen :checked) .release-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.release:has(.release-seen :checked) .release-footer { grid-area: 1 / 3; margin: 0; }
@container releases (width < 34rem) {
  .release:has(.release-seen :checked) .release-sharer { display: none; }
}

/* Listen: every service as its own target under the caption, the first glyph on the text edge and the
   last on the cover's bottom edge, "All" (song.link) last. The negative margins hand the targets' spare
   space back, and the top margin keeps a clear step under however long a note runs. On a phone the
   targets are 36px so five services and "All" fit beside a 375px-wide screen's cover. */
.listen {
  grid-area: 3 / 2; align-self: end; display: flex; flex-wrap: wrap; align-items: center;
  margin: calc(var(--step) - var(--inset)) calc(-1 * var(--inset)) calc(-1 * var(--inset));
}
.listen a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--hit); min-height: var(--hit); color: var(--fg); text-decoration: none;
}
.listen svg { width: var(--glyph); height: var(--glyph); }
/* A row's listen sheet opens only on a phone; elsewhere it draws nothing of its own, so its links sit in the row
   as any others do, and its Close and head stay unseen. */
.listen-sheet { display: contents; }
.listen-sheet-head, .listen-sheet .listen-sheet-close { display: none; }
/* Hover shows each service's own colour; Bandcamp and "All" keep the link pink. :active gives a tap the same. */
.listen a:hover, .listen a:active { color: var(--brand, var(--link)); }
.listen-spotify { --brand: #1ed760; }
.listen-apple_music { --brand: #fa243c; }
.listen-youtube_music { --brand: #ff0033; }
/* Tidal's brand is only black and white, so its icon is a filled tile like Apple Music's that inverts on hover. */
.listen-tidal svg { padding: 3px; border-radius: 23%; background: var(--fg); color: var(--bg); }
.listen-tidal a:hover svg, .listen-tidal a:active svg { background: none; box-shadow: inset 0 0 0 1.5px var(--fg); color: var(--fg); }
.listen-elsewhere { margin-left: auto; } /* "All" ends the line, on the text edge */
.listen-elsewhere a { gap: .375rem; padding-inline: var(--inset); color: var(--muted); }
.listen-elsewhere a::before { content: "All" / ""; }
/* On a phone without popover, five services in the row leave room for the word alone, so "All" drops its arrow. */
@container releases (width < 34rem) {
  @supports not selector(:popover-open) {
    .listen:has(> :nth-child(6)) .listen-elsewhere svg { display: none; }
  }
}

/* Video: the poster is as wide as a cover at 16:9, with a round play button over it once site.js shows
   it. Playing, the player spans the row under the label line, and the caption and footer move under it. */
.video-poster { position: relative; grid-area: 2 / 1 / 4; align-self: start; }
.release--video .release-art { height: auto; aspect-ratio: 16 / 9; }
.video-play { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; }
/* A play glyph, shared with the phone's listen badge: a disc with a triangle, both centred in the button. */
:is(.video-play, .listen-toggle)::before {
  content: ""; position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; border-radius: 50%;
}
:is(.video-play, .listen-toggle)::after {
  content: ""; position: absolute; inset: 50% auto auto 50%; translate: -35% -50%;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.video-play::before { width: var(--target); height: var(--target); background: rgb(0 0 0 / .7); }
.video-play::after { width: .875rem; height: 1rem; background: #fff; }
.video-play:hover::before { background: #ff0033; }
.video-play:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* The title's hint says what a click does: it plays here once site.js shows the play button, unless the row is folded. */
.video-hint-play { display: none; }
.release--video:has(.video-play:not([hidden])):not(:has(.release-seen :checked)) .video-hint-play { display: inline; }
.release--video:has(.video-play:not([hidden])):not(:has(.release-seen :checked)) .video-hint-youtube { display: none; }
/* "To YouTube", with "All"'s arrow. While the video plays, "Close video" stands there instead. */
.release-youtube { white-space: nowrap; text-decoration: none; }
/* The negative margins keep the arrow, taller than the capitals, from setting the line's height. */
.release-youtube svg { width: 1.25em; height: 1.25em; margin: -1em 0 0 .375rem; vertical-align: -.2em; }
.release.is-playing :is(.release-youtube, .release-genre) { display: none; }
.release.is-playing .video-poster { display: none; }
/* The player's own box steps aside: "Close video" joins the label line on the right, and the iframe spans the row under it. */
.video-player { display: contents; }
.video-player iframe {
  grid-area: 2 / 1 / auto / -1; display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: var(--step);
  border: 0; background: #000;
}
/* A text link in the label line's type; its ::after stretches the tap target to 44px without moving the line. */
.video-close {
  grid-area: 1 / 1 / auto / -1; place-self: start end; position: relative; padding: 0; border: 0; background: none;
  color: var(--link); cursor: pointer; text-box: trim-both cap alphabetic;
}
.video-close:hover { text-decoration: underline 1px; }
.video-close::after { content: ""; position: absolute; inset: calc((1cap - var(--target)) / 2) -.75rem; }
.release.is-playing :is(.release-text, .release-footer) { grid-column: 1 / -1; }
.release.is-playing .release-text { grid-row: 3; }
.release.is-playing .release-footer { grid-row: 4; }

/* Phone: a quieter row in five slots. The cover (with a play badge) on the left; beside it the label line across to
   the row's edge, then the title and artist, and the byline, with the marks as icons side by side at its far end; and
   under it all the note. The badge opens the listen links in a sheet from the bottom; without popover there's no
   badge, and the links stay in the row under the byline. A folded row and a playing video keep their own layouts. */
.listen-toggle { display: none; }
@container releases (width < 34rem) {
  /* The cover is as tall as the caption beside it with a one-line title, from the label line's capitals to the
     byline's foot, so the two balance. */
  .release { --art: 5.5rem; padding-block: calc(var(--rhythm) * 1.25); }
  /* An open row (neither folded nor playing). Its rules are written out flat, as phones on iOS before 16.5 can't
     read nested CSS and would lose the whole layout. */
  .release:not(:has(.release-seen :checked), .is-playing) {
    /* The caption's lines take their content's height, so the cover's spare height all goes to the byline's line;
       as auto rows, the clamped title would count as empty while it's shared out. The tray holds the listen links
       only without popover; with it the row is empty and takes no room. */
    grid-template: "art meta meta" max-content "art title title" max-content "art artist artist" max-content
                   "art by marks" 1fr ". tray tray" auto "note note note" auto / var(--art) minmax(0, 1fr) auto;
    column-gap: 1rem;
  }
  .release:not(:has(.release-seen :checked), .is-playing) :is(.release-art-link, .video-poster) { grid-area: art; }
  .release:not(:has(.release-seen :checked), .is-playing) .release-meta { grid-area: meta; margin-bottom: .75rem; }
  .release:not(:has(.release-seen :checked), .is-playing) :is(.release-text, .release-footer) { display: contents; }
  .release:not(:has(.release-seen :checked), .is-playing) .release-title { grid-area: title; margin: 0 0 .25rem; }
  .release:not(:has(.release-seen :checked), .is-playing) .release-artist { grid-area: artist; }
  /* The note: an aside across the row's foot, so the cover keeps to its caption. A dashed rule sets it apart, and a
     "Notes" label in the cover's column marks it, its words beside it in quotation marks in the caption's column. */
  .release:not(:has(.release-seen :checked), .is-playing) .release-note {
    grid-area: note; display: grid; grid-template-columns: subgrid; align-items: baseline;
    margin-top: 1.25rem; padding-top: .75rem; border-top: 1px dashed var(--line);
  }
  .release:not(:has(.release-seen :checked), .is-playing) .release-note::before { content: "Notes" / ""; color: var(--muted); }
  .release:not(:has(.release-seen :checked), .is-playing) .release-note-text { grid-column: 2 / -1; }
  /* The byline and the marks share the row's last line, level with the cover's bottom edge. The marks' targets
     reach past the line without making it taller, the last icon on the row's right edge. */
  .release:not(:has(.release-seen :checked), .is-playing) .release-sharer { grid-area: by; align-self: end; margin-top: .375rem; }
  .release:not(:has(.release-seen :checked), .is-playing) .release-marks {
    grid-area: marks; align-self: end; align-items: center; gap: 0;
    margin: calc((1.125rem - var(--target)) / 2); margin-left: 0;
  }
  /* Side by side, the two icons sit a step closer than their targets; each still has 34px of its own. */
  .release:not(:has(.release-seen :checked), .is-playing) .release-mark + .release-mark { margin-left: -.625rem; }
  /* Without popover the links stay in the caption's column under the byline, the first icon in line with it and
     "All" ending on the row's edge, the targets' spare space handed back. */
  @supports not selector(:popover-open) {
    .release:not(:has(.release-seen :checked), .is-playing) .listen { grid-area: tray; margin: .75rem calc(-1 * var(--inset)) 0; }
  }

  /* The marks drop their words for their icons, each a full target; the words stay for screen readers. */
  .release-marks { font-size: 1rem; }
  .release-mark { width: var(--target); height: var(--target); justify-content: center; align-items: center; font-size: 0; }
  .release-mark::after { inset: 0; }
  .release-mark svg { width: 1.125rem; height: 1.125rem; margin: 0; }

  /* The badge's glyph: a small grey disc inside a full-size target. A video's play button shrinks to the same size,
     its poster being a cover's width. */
  :is(.video-play, .listen-toggle)::before { width: 1.75rem; height: 1.75rem; }
  :is(.video-play, .listen-toggle)::after { width: .5rem; height: .625rem; }
  .listen-toggle::before { background: var(--line); }
  .listen-toggle::after { background: currentColor; }
  .listen-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: -4px; border-radius: 50%; }

  /* The listen sheet: along the bottom over a dimmed page, as the genre dialog is on a phone. The song's title in
     the serif italic, a card's voice, with the artist under it; the services' icons in their own colours, larger,
     in one centred row; and under them, centred in the italic and the link's pink, "or, listen elsewhere" with its
     off-site arrow after it. Close, Escape or a tap outside closes it. It's drawn as a sheet open or shut, so it
     keeps its look while it slides away; shut, it waits below the screen's foot. Its clear top edge shows in forced
     colours, and its z-index keeps it over the header where a browser can't hold it in the top layer while it
     slides. */
  /* Nesting is safe from here on: every browser that has popover reads it. */
  @supports selector(:popover-open) {
    /* The badge, on the cover's corner, opens the sheet. */
    .listen-toggle {
      grid-area: art; align-self: start; justify-self: end; display: block; position: relative;
      width: var(--target); height: var(--target); margin: calc(var(--art) - var(--target) + .625rem) -.625rem -.625rem 0;
      padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer;
    }
    .listen-sheet {
      display: none; position: fixed; inset: auto 0 0; z-index: 4;
      width: 100%; height: auto; max-height: 85dvh; margin: 0;
      padding: 1.5rem max(var(--gutter), env(safe-area-inset-right)) max(.5rem, env(safe-area-inset-bottom))
               max(var(--gutter), env(safe-area-inset-left));
      overflow: auto; border: 0; border-top: 1px solid transparent; background: var(--card); color: var(--fg);
      box-shadow: var(--sheet-shadow); translate: 0 100%;
      /* Close: the club card's light ×, centred on the title's capitals with its stroke ending on the right edge.
         The title keeps clear of it. */
      & .listen-sheet-close {
        display: inline-flex; position: absolute; top: 1rem; right: 0; justify-content: end;
        padding-right: calc(max(var(--gutter), env(safe-area-inset-right)) - 1px);
      }
      /* The head: the row's cover, small, with the title and artist centred beside it. */
      & .listen-sheet-head {
        --art: 3.5rem; display: grid; grid-template-columns: var(--art) minmax(0, 1fr); column-gap: 1rem;
        margin-bottom: 1rem; padding-right: 4rem;
      }
      /* The sheet's own card colour would hide a cover's missing-art tile, so it takes the page's. */
      & .release-art { grid-row: 1 / 3; align-self: center; background: var(--bg); }
      & .release-art--empty { font-size: var(--text-xl); }
      & .listen-sheet-title {
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; align-self: end;
        margin-bottom: .25rem; color: var(--title); font: italic 400 1.1875rem/var(--leading-snug) var(--serif);
      }
      & .listen-sheet-artist { align-self: start; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-snug); }
      /* The services: one centred row of icons in 48px targets, the gap narrowing so five fit the narrowest phone.
         "or, listen elsewhere" takes a line of its own under them. */
      & .listen {
        display: flex; flex-wrap: wrap; justify-content: center; margin: .5rem 0 0;
        column-gap: min(1.5rem, calc((100% - 5 * 3rem) / 4));
      }
      & a { min-width: 3rem; min-height: 3rem; }
      /* Each in its service's own colour; Tidal keeps its ink tile, and Bandcamp the link's pink. */
      & svg { width: 1.75rem; height: 1.75rem; color: var(--brand, var(--link)); }
      & .listen-tidal svg { color: var(--card); }
      /* A tapped icon dips, as its colour is already its hover colour; Tidal's tile stays as it is. */
      & a:active svg { scale: .88; }
      & .listen-tidal a:is(:hover, :active) svg { background: var(--fg); box-shadow: none; color: var(--card); }
      & .listen-elsewhere { flex-basis: 100%; margin: 0; }
      & .listen-elsewhere a {
        justify-content: center; gap: .375rem; width: 100%; min-height: 3.25rem; margin-top: .5rem; padding: 0;
        /* The serif's small x-height reads a size down, so it's set a little larger. */
        font: italic 400 .9375rem/1 var(--serif); letter-spacing: normal; text-transform: none; color: var(--link);
        &::before { content: "or, listen elsewhere" / ""; }
      }
      & .listen-elsewhere svg { order: 1; width: .875rem; height: .875rem; color: inherit; }
    }
    .listen-sheet:popover-open { display: block; translate: 0; }
    .listen-sheet:not(:popover-open)::backdrop { background-color: transparent; }
  }

  /* A folded row is one line, centred on its eye's target, with the same space above and below. */
  .release:has(.release-seen :checked) { align-items: center; column-gap: .75rem; padding-block: calc(var(--rhythm) / 2); }
  .release:has(.release-seen :checked) .release-footer { align-self: center; margin-right: calc((1.125rem - var(--target)) / 2); }
}

/* Diary (a person's page): one short line per release or video, since a visitor scans their taste rather than
   reading each row. */
.diary-line {
  --thumb: 3.5rem;
  display: grid; grid-template-columns: [art] var(--thumb) [text] minmax(0, 1fr) [end]; align-items: start;
  column-gap: 1rem; padding-block: 1.25rem;
}
.diary-art-link { grid-column: art; color: inherit; text-decoration: none; }
.diary-text { grid-column: text; }
.diary-art {
  display: block; width: var(--thumb); height: var(--thumb); object-fit: cover; background: var(--card);
  outline: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); outline-offset: -1px;
}
.diary-art--empty { display: grid; place-items: center; color: var(--muted); font: 400 var(--text-lg)/var(--leading-none) var(--serif); }
.diary-line .release-title { margin-bottom: .125rem; -webkit-line-clamp: 1; }
.diary-kind { margin-top: .25rem; color: var(--muted); }
.diary-kind a { color: var(--link); }
/* A saved list's line: the listen links get a row of their own under the text, from its edge to "All" at the
   line's end, so they line up with the title and five services fit at every width; the negative margins hand the
   targets' spare space back. On a member's own saved list, a small bin ends the text's first line in a column of its
   own, muted until pointed at, its ::after stretching the tap target to 44px. "Nothing saved yet." shows once
   the last line is discarded. */
.diary-line > .listen {
  --glyph: 16px; --hit: 32px; --inset: calc((var(--hit) - var(--glyph)) / 2);
  grid-row: 2; grid-column: text / end; align-self: start;
  margin: calc(.75rem - var(--inset)) calc(-1 * var(--inset)) calc(-1 * var(--inset));
}
.diary-line:has(> .diary-discard) { grid-template-columns: [art] var(--thumb) [text] minmax(0, 1fr) [discard] auto [end]; }
/* A rec's own day, under its month's heading, ends the text's first line in a column of its own. */
.diary-line:has(> .diary-date) { grid-template-columns: [art] var(--thumb) [text] minmax(0, 1fr) [date] auto [end]; }
.diary-date { grid-row: 1; grid-column: date; padding-top: .2em; color: var(--muted); white-space: nowrap; }
.diary-discard {
  --size: 1rem;
  grid-row: 1; grid-column: discard; position: relative; display: grid; width: var(--size); height: var(--size); padding: 0; border: 0;
  background: none; color: var(--muted); cursor: pointer;
}
.diary-discard svg { width: var(--size); height: var(--size); }
.diary-discard:hover { color: var(--fg); }
.diary-discard::after { content: ""; position: absolute; inset: calc((var(--size) - var(--target)) / 2); }
.diary-discard[hidden] { visibility: hidden; }
.results--diary:has(.releases > li) .results-empty { display: none; }
/* A person's empty list has dashes in the tabs' hairline grey, so it reads as a quiet gap in the page. */
.results--diary .results-empty { border-color: var(--line); }
/* A saved list's first line keeps a clear step under the tabs' bar. First of its type, as the list's hidden heading
   comes before it. */
.results--diary > .releases:first-of-type { margin-top: 1.75rem; }
/* Load more adds a saved list's next page as a list of its own, so a rule opens it as between any two lines. */
.results--diary > .releases + .releases { border-top: var(--hairline); }
.diary-line:has(.release-title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; }
/* Desktop: two lines side by side, each pair between hairlines, as the lines are short. */
@container diary (width >= 46rem) {
  .results--diary .releases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
  .results--diary .releases > li { border-bottom: 0; }
  .results--diary .releases > li:nth-child(n + 3) { border-top: var(--hairline); }
}

/* Tablet and up: the cover grows and the targets reach full size. */
@container releases (width >= 34rem) {
  .release { --art: 9rem; --hit: var(--target); column-gap: 1.5rem; }
  .diary-line { --thumb: 4.5rem; column-gap: 1.25rem; }
}

/* Desktop: the date moves into a margin of its own beside its rows and stays in view while they scroll
   past; the rows grow a step. Only a headed day has a rule across both columns. */
@container feed (width >= 46rem) {
  .period { --rhythm: 1.25rem; display: grid; grid-template-columns: var(--day-margin) minmax(0, 1fr); column-gap: 1.5rem; }
  .period:has(h2), .period:first-of-type { margin-top: 2.5rem; }
  .period:has(h2) { border-top: var(--hairline); }
  .period h2, .period-continued {
    display: flex; position: sticky; top: calc(var(--bar) + var(--header) + 1rem); align-self: start;
    flex-direction: column; align-items: flex-start; gap: .75rem; height: auto; padding: var(--breath) 0 0; border: 0;
  }
  .period:not(:has(h2)) .releases { border-top: var(--hairline); }
  .releases :is(a, summary, input, [tabindex]) { scroll-margin-top: 0; }
  .period-meta { text-align: left; }
  .releases { grid-column: 2; }
  .release { --art: 10rem; }
}

/* Club -------------------------------------------------------------------- */

/* Shared by the card and the club page: covers, the pink "new" dot, the dot between a label's parts,
   and the progress line. */
.club-art {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--card);
  outline: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); outline-offset: -1px;
}
.club-art--empty { display: grid; place-items: center; color: var(--muted); font: 400 var(--text-2xl)/var(--leading-none) var(--serif); }
.club-new::before {
  content: ""; display: inline-block; width: .375rem; height: .375rem; margin-right: .5rem; vertical-align: .1em;
  border-radius: 50%; background: var(--search-focus);
}
/* Drawn for the eye only: the markup has a space there, so screen readers hear the parts apart. */
.club-kicker-dates::before, .club-card-left::before, .club-card-genre::before, .club-hero-genre::before, .club-due-left::before { content: "· " / ""; }
/* A real <progress>, drawn flat: a 1px line through its middle in the dividers' grey, with now a 2px pink tick
   along it. The fill draws only the tick, so the line stays as quiet as a divider. */
.club-due-line {
  display: block; width: 100%; height: .5625rem; margin-top: .625rem; appearance: none; border: 0; color: var(--fg);
  background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}
.club-due-line::-webkit-progress-bar { background: none; }
.club-due-line::-webkit-progress-value {
  background: linear-gradient(var(--search-focus), var(--search-focus)) right / 2px 100% no-repeat;
}
.club-due-line::-moz-progress-bar {
  background: linear-gradient(var(--search-focus), var(--search-focus)) right / 2px 100% no-repeat;
}

/* The card (home list): under the search, before the first day. A sleeve a step lighter than the
   page, so it reads as an invitation rather than another row. The title's link covers the
   card, so it's one target and one tab stop. On a phone the cover sits beside the label, title and
   artist, and the closing line runs under both. */
.club-card {
  --art: 5.25rem; --pad: 1rem;
  position: relative; display: grid; grid-template-columns: var(--art) minmax(0, 1fr); column-gap: 1rem;
  grid-template-areas: "art head" "due due";
  margin-top: 1rem; padding: var(--pad); border: var(--hairline); background: var(--sleeve);
}
.club-card-art { grid-area: art; }
.club-card-head { grid-area: head; display: flex; flex-direction: column; min-width: 0; }
/* The round on the left, its dates at the right beside the ×, clear of it. */
.club-card-kicker { display: flex; justify-content: space-between; gap: 1rem; padding-right: 2rem; color: var(--muted); }
.club-card-dates { display: none; } /* a phone keeps the label to one line */
/* At most two lines, so the head stays about the cover's height on a phone. */
.club-card-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  margin-top: .375rem; font: italic 400 1.125rem/var(--leading-tight) var(--serif); text-wrap: balance;
  /* The tight leading leaves Playfair's descenders a little deeper than the last line's box, which the clamp would
     cut; room for them below, taken back from the margin, keeps the layout as it was. */
  padding-bottom: .1em; margin-bottom: -.1em;
}
.club-card-title a { color: var(--title); text-decoration: none; }
.club-card-title a::after { content: ""; position: absolute; inset: 0; } /* the whole card */
/* Title, then artist, then genre: the artist in the page's ink, the genre a muted label after it. */
.club-card-by { margin-top: .375rem; color: var(--fg); font-size: var(--text-sm); line-height: var(--leading-snug); }
.club-card-genre { color: var(--muted); }
.club-card-due { grid-area: due; margin-top: 1rem; }
.club-card-when { display: flex; align-items: last baseline; justify-content: space-between; gap: 1rem; }
.club-card-when p {
  min-width: 0; overflow: hidden; font-size: var(--text-xs); line-height: var(--leading-snug);
  white-space: nowrap; text-overflow: ellipsis;
}
.club-card-left { display: none; color: var(--muted); } /* the reveal week's count, from tablet width */
.club-card-go { flex: none; color: var(--fg); }
.club-card .club-due-line { margin-top: .5rem; }
/* Hover: the border darkens a touch and the way in turns pink. Folded, the hairlines darken alone.
   A tap leaves a phone's card in :hover, so only a pointer gets it. */
@media (hover: hover) {
  .club-card:has(:is(.club-card-title a, .club-card-mini-link):hover) { border-color: color-mix(in srgb, var(--line), var(--fg) 15%); }
  .club-card:has(.club-card-title a:hover) .club-card-go { color: var(--link); }
}
.club-card:has(a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.club-card a:focus-visible { outline: none; }

/* × and +: quiet glyphs with full targets. The × sits in the corner above the card's link, so it takes
   its own clicks, centred on the label's line with its glyph's edge on the padding's. */
.club-card-fold, .club-card-unfold, .listen-sheet-close {
  display: inline-flex; align-items: center; justify-content: center; width: var(--target); height: var(--target);
  padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 300 1.125rem/var(--leading-none) var(--sans);
}
.club-card-fold { position: absolute; z-index: 1; top: calc(var(--pad) - 14px); right: calc(var(--pad) - 16px); }
.club-card-fold:hover, .club-card-unfold:hover, .listen-sheet-close:hover { color: var(--link); }
.club-card-fold[hidden], .club-card-unfold[hidden] { display: none; }

/* The first day sits a little closer under the card than days do under each other. */
.club-card + .period { margin-top: 1.5rem; }
@media (width >= 40rem) { .club-card + .period { margin-top: 1.75rem; } }

/* Folded: one slim row on the page's own background, between hairlines as the rows are:
   a thumbnail, the round, the title and artist, and when, with + to bring the card back. */
.club-card-mini { display: none; }
.club-card.is-folded { display: block; padding: 0; border: 0; border-block: var(--hairline); background: none; }
.club-card.is-folded > :not(.club-card-mini) { display: none; }
.club-card.is-folded .club-card-mini { display: flex; align-items: center; gap: .5rem; }
.club-card-mini-link {
  display: flex; flex: 1; align-items: center; gap: .75rem; min-width: 0; min-height: var(--target);
  padding-block: .375rem; color: var(--muted); text-decoration: none;
}
.club-card-mini-art { flex: none; width: 2rem; font-size: var(--text-sm); }
/* The words share a baseline across their three faces, and centre on the row as one line. */
/* The wide gap sets the title apart from the round's label, so the two read as two things. */
.club-card-mini-text { display: flex; flex: 1; align-items: baseline; gap: 1.5rem; min-width: 0; }
.club-card-mini-label { flex: none; }
.club-card-mini-title {
  min-width: 0; overflow: hidden; color: var(--fg); white-space: nowrap; text-overflow: ellipsis;
  font: italic 400 var(--text-sm)/var(--leading-snug) var(--serif);
}
/* The artist after the title, quieter, sharing its ellipsis. */
.club-card-mini-artist { margin-left: .25rem; color: var(--muted); font: 400 var(--text-xs)/var(--leading-snug) var(--sans); }
.club-card-mini-when { display: none; flex: none; margin-left: auto; } /* from tablet width; the card has it */

/* Wider: the cover runs down the left, the title at its top and the closing line at its foot. The
   cover ends where the rows' 9rem covers do, inside the card's padding and border, so the card's words
   start on the rows' column. */
@container feed (width >= 34rem) {
  .club-card {
    --art: calc(9rem - var(--pad) - 1px); --pad: 1.25rem; column-gap: 1.5rem;
    grid-template-areas: "art head" "art due"; grid-template-rows: auto 1fr;
  }
  .club-card-dates, .club-card-left, .club-card-mini-when { display: inline; }
  .club-card-dates { white-space: nowrap; }
  .club-card-title { margin-top: .5rem; font-size: calc(var(--text-lg) * .85); -webkit-line-clamp: 1; line-clamp: 1; }
  .club-card-by { margin-top: .375rem; }
  .club-card-due { align-self: end; margin-top: .5rem; }
  .club-card .club-due-line { margin-bottom: -.25rem; } /* past the line's own padding, so its rule meets the cover's foot */
}
/* Trimmed to the capitals, so the label's top meets the cover's as the closing line meets its foot; the
   × and the title follow the label. A browser that can't trim keeps the spacing above. */
@supports (text-box: trim-both cap alphabetic) {
  @container feed (width >= 34rem) {
    .club-card-kicker > span { text-box: trim-both cap alphabetic; }
    .club-card-fold { top: calc(var(--pad) - 17.5px); }
    .club-card-title { margin-top: .75rem; }
  }
}
/* Desktop: the cover fills the days' margin above them. */
@container feed (width >= 46rem) {
  .club-card { --art: calc(var(--day-margin) - var(--pad) - 1px); }
}

/* Club page ---------------------------------------------------------------- */

/* The trail and the round's label share the page's first line once there's room; on a phone the label
   sits under the trail. */
.club-intro { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 2.25rem; }
.club-kicker { color: var(--muted); }

/* The pick, as a sleeve: the cover beside its title, artist, the picker's reason, the ways to listen
   and the time left. On a phone, a compact header: a small cover with the title and artist centred
   beside it, then the reason, the ways to listen and the time left at full width. */
.club-hero {
  --hit: var(--target); --inset: calc((var(--hit) - var(--glyph)) / 2);
  display: grid; grid-template: auto auto / 6rem minmax(0, 1fr); column-gap: 1rem;
}
.club-hero > a { grid-area: 1 / 1 / 3; }
.club-hero-text { display: contents; }
.club-hero-title { grid-area: 1 / 2; align-self: end; font: italic 400 1.25rem/var(--leading-tight) var(--serif); text-wrap: balance; }
/* As on the card: the artist in the page's ink, the genre a muted label after it. */
.club-hero-artist { grid-area: 2 / 2; align-self: start; margin-top: .375rem; color: var(--fg); font-size: var(--text-xs); }
.club-hero-genre { color: var(--muted); }
.club-why, .club-due { grid-column: 1 / -1; }
.club-hero .listen { grid-area: auto / 1 / auto / -1; align-self: auto; margin: .75rem calc(-1 * var(--inset)) 0; }

/* The picker's reason: a quotation credited underneath, in the rows' quoted italic. Members' notes are
   credited above and set upright, as they can run to several paragraphs, which italic makes hard work. */
.club-why { margin: 1.25rem 0 0; }
.club-why p { max-width: 32em; font: italic 400 var(--text-sm)/var(--leading) var(--serif); text-wrap: pretty; }
.club-note { margin: 0; }
.club-note blockquote { max-width: 34em; font: 400 var(--text-sm)/var(--leading) var(--serif); text-wrap: pretty; }
.club-note blockquote p + p { margin-top: .75lh; }
.club-why blockquote p::before, .club-note blockquote p:first-child::before { content: "“" / ""; }
.club-why blockquote p::after, .club-note blockquote p:last-child::after { content: "”" / ""; }
.club-why figcaption { margin-bottom: .375rem; color: var(--muted); }
.club-note-by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; margin-bottom: .5rem; color: var(--muted); }
/* Tags read as words after the name, a dot drawn between for the eye. */
.club-note-tag::before { content: "· " / ""; }
:is(.club-why, .club-note-by, .club-about) a { color: var(--link); }

/* Time left: pushed to the text's foot, so on desktop the progress rule meets the cover's bottom edge. */
.club-due { margin-top: auto; padding-top: .75rem; }
.club-due-text { font-size: var(--text-xs); }
.club-due-left { display: block; margin-top: .125rem; color: var(--muted); }
.club-due-left::before { display: none; } /* on its own line on a phone */

@container page (width >= 46rem) {
  .club-intro { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 3rem; }
  .club-intro .trail ol { margin-top: 0; }
  .club-hero { grid-template: none / 22rem minmax(0, 1fr); gap: 2.5rem; }
  .club-hero > a { grid-area: auto; }
  .club-hero-text { display: flex; flex-direction: column; min-width: 0; }
  .club-hero-title, .club-hero-artist { align-self: auto; }
  .club-hero-title { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem); }
  .club-hero-artist { margin-top: .75rem; font-size: var(--text-sm); }
  .club-hero .listen { margin-top: 1.25rem; }
  .club-why { margin-top: 1.5rem; }
  .club-why p { font-size: var(--text-base); }
  .club-why figcaption { margin-bottom: .5rem; }
  .club-due { padding-top: 1.25rem; }
  .club-due-text { font-size: var(--text-sm); }
  .club-due-left { display: inline; margin: 0; }
  .club-due-left::before { display: inline; }
  .club-hero .club-due-line { margin-bottom: -.28125rem; } /* past the line's own padding, so its rule meets the cover's foot */
}

/* Sections (notes, the shelf): a masthead like a day's. On desktop the shelf keeps its heading in the
   cover's column with the covers beside it, as the feed keeps its dates; the thoughts take the whole width,
   their heading above, as on a phone. */
.club-section { margin-top: 3.5rem; }
.club-section-head {
  display: flex; align-items: last baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: .5rem; border-bottom: var(--hairline);
}
/* On a phone the album's title is 1.375rem, so a section's heading stays below it. */
.club-section-head h2 { font: 500 1.25rem/var(--leading) var(--sans); }
.club-section-meta { color: var(--muted); text-align: right; }
.club-section-body { padding-top: 1.75rem; }
@container page (width >= 46rem) {
  .club-section { border-top: var(--hairline); }
  .club-section-head { padding-top: 1.75rem; border: 0; }
  .club-section-head h2 { font-size: var(--text-lg); }
  .club-section:not(.club-thoughts) { display: grid; grid-template-columns: 22rem minmax(0, 1fr); column-gap: 2.5rem; }
  .club-section:not(.club-thoughts) .club-section-head {
    position: sticky; top: calc(var(--bar) + var(--header) + 1rem); align-self: start;
    flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: .75rem;
  }
  .club-section:not(.club-thoughts) .club-section-meta { text-align: left; }
}

/* What follows the notes, the composer or the closed line, is spaced from them; while they're sealed, what
   the viewer can do comes first, and who has shared follows it. */
:is(.club-notes, .club-empty) + .club-form { margin-top: 2.5rem; }
:is(.club-notes, .club-empty) + :is(.club-about, .club-closed) { margin-top: 1.25rem; }
.club-section-body > * + .club-sealed { margin-top: 2rem; }

/* Sealed: who has written, never what, beside the keys. */
.club-sealed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem 1rem; text-wrap: pretty; }
.club-sealed::before {
  content: ""; grid-row: 1 / 3; width: var(--text-lg); height: var(--text-lg); margin-top: .125rem; background: var(--control);
  mask: url("../img/keys.e7a18b431a56.png") center / contain no-repeat;
}
.club-sealed-who { font-size: var(--text-sm); }
.club-sealed-when { color: var(--muted); font-size: var(--text-xs); }
.club-empty { color: var(--muted); font-size: var(--text-sm); }

/* Your note: no box, one rule to write on, in the upright serif it's read in. The field grows with what's
   typed; saving is a quiet outline button like Load more, since the note matters more than the form. */
.club-form-count { margin-top: .5rem; color: var(--muted); text-align: right; }
.club-form-count.is-out { color: var(--accent); }
.club-form textarea {
  display: block; width: 100%; min-height: calc(3lh + .75rem); field-sizing: content; margin-top: .75rem; padding: 0 0 .75rem;
  resize: none; border: 0; border-bottom: 1px solid var(--control); background: none; color: var(--fg); cursor: text;
  font: 400 var(--text-base)/var(--leading) var(--serif);
}
.club-form textarea::placeholder { color: var(--muted); opacity: 1; }
.club-form textarea:focus { outline: none; border-bottom: 2px solid var(--search-focus); padding-bottom: calc(.75rem - 1px); }
.club-form-end { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .75rem; }
.club-form-status { color: var(--muted); font-size: var(--text-xs); }
.club-form-status strong { color: var(--fg); font-weight: 400; }
.club-form-error { color: var(--accent); }
.club-form-buttons { display: flex; flex: none; align-items: center; gap: .25rem; }
.club-form button {
  flex: none; min-height: var(--target); padding: 0 1.25rem; border: 1px solid var(--control); background: none; color: var(--fg);
}
.club-form button:hover { background: var(--card); }
/* Removing is the lesser action: plain text beside Save. */
.club-form .club-form-remove { padding: 0 .75rem; border-color: transparent; color: var(--muted); }
.club-form .club-form-remove:hover { background: none; color: var(--link); }

/* Remove's form holds only its token; its button sits in the note's form. No box, so no grid cell. */
#note-remove { display: contents; }

/* Once the late window has closed: after the notes it takes their divider, so it reads as the list's
   last entry. */
.club-closed { color: var(--muted); font-size: var(--text-sm); }
:is(.club-notes, .club-empty) + .club-closed { padding-top: 1.25rem; border-top: var(--hairline); }

/* What is Album Club?: where a member would write, for anyone who can't, in the home card's sleeve.
   Its steps are a small timeline drawn like the round's progress line: line icons on a grey rule, and the
   reveal in the line's pink. Each step is a label in the labels' mono beside its sentence, and
   signed out, the way in follows. */
.club-about { padding: 1rem 1.25rem; border: var(--hairline); background: var(--sleeve); }
.club-about h3 { font: italic 400 1.25rem/var(--leading-tight) var(--serif); text-wrap: balance; }
.club-about-steps { margin-top: .875rem; }
.club-about-steps li {
  position: relative; display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); align-items: baseline; padding: 0 0 .625rem 1.75rem;
  font-size: var(--text-xs); line-height: var(--leading); /* the icons below are placed in ems of it, on its first line's middle */
}
.club-about-steps li:last-child { padding-bottom: 0; }
/* Each step's icon sits on the rule, on its first line's middle, backed by the sleeve so the rule stops at it. */
.club-about-icon {
  position: absolute; z-index: 1; top: calc(.75em - 8px); left: 0; width: 16px; height: 16px;
  background: var(--sleeve); color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.25;
  stroke-linecap: round; stroke-linejoin: round;
}
.club-about-steps li:last-child .club-about-icon { color: var(--search-focus); }
/* The rule runs from each icon's middle to the next one's. */
.club-about-steps li:not(:last-child)::after {
  content: ""; position: absolute; top: .75em; bottom: -.75em; left: 7.5px; width: 1px; background: var(--line);
}
.club-about-steps strong { display: block; color: var(--fg); font: 400 var(--text-2xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase; }
.club-about-steps span { text-wrap: pretty; }
.club-about-end { margin-top: 1rem; color: var(--muted); font-size: var(--text-sm); }

/* Notes, opened: the picker's first, yours marked, late ones last. */
.club-notes > li { padding-block: 0 1.25rem; }
.club-notes > li + li { padding-top: 1.25rem; border-top: var(--hairline); }

/* From desktop, notes get room: larger quotes and wider gaps. */
@container page (width >= 46rem) {
  .club-note blockquote { font-size: clamp(.9375rem, .875rem + .2vw, 1.0625rem); } /* upright reads larger than italic */
  :is(.club-notes, .club-empty) + :is(.club-about, .club-closed) { margin-top: 2rem; }
  :is(.club-notes, .club-empty) + .club-closed { padding-top: 2rem; }
  .club-about { padding: 1.25rem 1.5rem; }
  /* Two across, read left to right, each row's notes sharing its rule. A grid, so opening a long note grows
     only its own row and the notes after it stay where they are. */
  .club-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
  .club-notes > li, .club-notes > li + li { padding-block: 2rem; border-top: var(--hairline); }
  .club-notes > li:nth-child(-n + 2) { padding-top: 0; border-top: 0; }
  /* What follows the notes, the composer included, keeps a reading width: the left column's. */
  .club-thoughts :is(.club-notes, .club-empty) ~ * { max-width: calc((100% - 2.5rem) / 2); }
  /* While the notes are sealed, the composer (or the callout) takes the wider left three fifths and who has
     shared the right two; a notice spans both. */
  .club-thoughts .club-section-body:has(> .club-sealed) {
    display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 2.5rem; align-items: start;
  }
  .club-thoughts .club-section-body:has(> .club-sealed) > .notice { grid-column: 1 / -1; }
  .club-thoughts .club-section-body:has(> .club-sealed) > .club-sealed { grid-column: 2; margin-top: 0; }
}

/* A long note, folded by site.js to its first eight lines, fading out, with Read all under it. Without the
   script, every note shows in full. */
.club-note blockquote.is-folded {
  max-height: 8lh; overflow: hidden; mask-image: linear-gradient(to bottom, #000 calc(100% - 3lh), transparent);
}
.club-note-more {
  display: inline-flex; align-items: center; min-height: var(--target); margin: -.5rem 0 -.75rem; padding: 0; border: 0;
  background: none; color: var(--fg); cursor: pointer; font-size: var(--text-xs); text-decoration: underline 1px; text-underline-offset: .2em;
}
.club-note-more:hover { color: var(--link); }
.club-note-more + .club-remove { margin-top: .75rem; }
/* Reactions start below Read all's target, so the two never share a tap. */
.club-note-more + .club-reactions { margin-top: .75rem; }

/* Your note's removal asks once, in a <details>, so it confirms without script. Its 44px target
   overhangs the note's padding, so the note keeps the same rhythm as the rest. */
.club-remove { margin: .125rem 0 -.75rem; color: var(--muted); font-size: var(--text-xs); }
.club-remove summary { display: inline-flex; align-items: center; min-height: var(--target); cursor: pointer; list-style: none; }
.club-remove summary::-webkit-details-marker { display: none; }
.club-remove[open] summary { color: var(--fg); }
.club-remove button {
  min-height: var(--target); padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer;
  font: inherit; text-decoration: underline 1px; text-underline-offset: .2em;
}
.club-remove summary:hover, .club-remove button:hover { color: var(--link); }

/* Reactions, under a revealed note: each emoji given as a small pill with its count in the italic serif,
   the member's own ringed in pink, then React, whose emoji open in a tray above the row. Each pill sits in
   a 44px target that overhangs the row, so the note keeps its rhythm. */
.club-reactions { position: relative; margin: .25rem 0 0 -.25rem; }
.club-reactions:last-child { margin-bottom: -.5rem; }
.club-reactions, .club-reactions form { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .25rem; }
.club-reaction, .club-react summary {
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 .25rem; border: 0; background: none;
  color: var(--muted); cursor: pointer; font: inherit; list-style: none;
}
span.club-reaction { cursor: default; }
.club-react summary::-webkit-details-marker { display: none; }
.club-reaction-pill {
  display: inline-flex; align-items: center; gap: .375rem; height: 1.75rem; padding: 0 .625rem;
  border: var(--hairline); border-radius: 999px; background: var(--card);
}
.club-reaction-emoji { font-size: .9375rem; line-height: 1; }
.club-reaction-count { font: italic 400 .875rem/1 var(--serif); }
.club-react .club-reaction-pill { padding: 0 .5rem; }
.club-react svg { width: 1rem; height: 1rem; }
:is(button.club-reaction, .club-react summary):hover .club-reaction-pill { border-color: var(--control); color: var(--fg); }
.club-reaction[aria-pressed="true"] .club-reaction-pill {
  border-color: var(--search-focus); background: color-mix(in srgb, var(--search-focus) 10%, var(--card)); color: var(--link);
}
.club-react[open] summary .club-reaction-pill { border-color: var(--control); color: var(--fg); }
/* The tray keeps to its note's width: on a narrow note (a phone, or two across on a tablet) the choices
   narrow evenly, staying 44px tall. */
.club-react-choices {
  position: absolute; z-index: 2; bottom: calc(100% - .25rem); left: 0; display: flex; max-width: 100%; padding: .25rem;
  border: var(--hairline); border-radius: 999px; background: var(--card);
  box-shadow: 0 1rem 2rem -1rem color-mix(in srgb, #000 30%, transparent);
}
.club-react-choices button {
  display: grid; place-items: center; width: var(--target); min-width: 0; height: var(--target); padding: 0; border: 0; border-radius: 999px;
  background: none; cursor: pointer; font-size: 1.375rem; line-height: 1;
}
.club-react-choices button:hover { background: var(--bg); }
.club-react-choices [aria-pressed="true"] { background: color-mix(in srgb, var(--search-focus) 16%, var(--card)); }
@media (prefers-reduced-motion: no-preference) {
  .club-react[open] .club-react-choices { animation: club-react-in 140ms ease-out; }
  .club-react-choices button { transition: scale 120ms ease-out; }
  .club-react-choices button:hover { scale: 1.15; }
}
@keyframes club-react-in { from { opacity: 0; translate: 0 .25rem; scale: .96; } }

/* The shelf: on a phone, earlier rounds as slim rows between hairlines, a small cover beside the
   round, title and artist; from desktop, as sleeves four across. */
.club-shelf > li + li { border-top: var(--hairline); }
.club-shelf a {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: 1rem; align-content: center;
  padding-block: .75rem; color: inherit; text-decoration: none;
}
.club-shelf-art { grid-row: 1 / span 3; align-self: center; }
.club-shelf-when { display: block; color: var(--muted); }
.club-shelf-title { display: block; margin-top: .25rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 var(--text-xs)/var(--leading-snug) var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.club-shelf-by {
  display: block; margin-top: .125rem; overflow: hidden; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-snug);
  white-space: nowrap; text-overflow: ellipsis;
}
.club-shelf a:hover .club-shelf-title { text-decoration: underline 1px; }
@container page (width >= 46rem) {
  .club-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.25rem; }
  .club-shelf > li + li { border-top: 0; }
  .club-shelf a { display: block; padding: 0; }
  .club-shelf-when { margin-top: .75rem; }
  .club-shelf-title { margin-top: .375rem; white-space: normal; }
}

/* Labels: the smallest mono, in capitals, as site.css's own. */
.club-card-kicker, .club-card-genre, .club-hero-genre, .club-card-go, .club-card-mini-label, .club-card-mini-when,
.club-kicker, .club-why figcaption, .club-section-meta, .club-form label, .club-form-count, .club-note-by, .club-shelf-when {
  font: 400 var(--text-2xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
  .club-card, .club-card-title a, .club-card-go, .club-form button { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
  .club-remove summary, .club-remove button { transition: color .15s ease; }
  /* The reveal: in the week the notes open, they arrive one after another; any past eight come with the eighth. */
  .club-notes.is-revealing > li { animation: club-arrive .6s ease-out both; }
  .club-notes.is-revealing > li:nth-child(2) { animation-delay: 140ms; }
  .club-notes.is-revealing > li:nth-child(3) { animation-delay: 280ms; }
  .club-notes.is-revealing > li:nth-child(4) { animation-delay: 420ms; }
  .club-notes.is-revealing > li:nth-child(5) { animation-delay: 560ms; }
  .club-notes.is-revealing > li:nth-child(6) { animation-delay: 700ms; }
  .club-notes.is-revealing > li:nth-child(7) { animation-delay: 840ms; }
  .club-notes.is-revealing > li:nth-child(n + 8) { animation-delay: 980ms; }
  @keyframes club-arrive { from { opacity: 0; translate: 0 .5rem; } }
}

@media (forced-colors: active) {
  .club-form textarea, .club-form button { border-color: CanvasText; }
  .club-sealed::before, .club-new::before { background: CanvasText; }
  .club-due-line { appearance: auto; height: auto; background: none; }
}

/* Load more --------------------------------------------------------------- */

.more { margin-top: 2rem; }
.more a { display: flex; min-height: calc(var(--target) + .5rem); }
.more a[aria-disabled] { color: var(--muted); cursor: progress; }

/* New shares -------------------------------------------------------------- */

/* A thin bar above the header, painted full-bleed like it; a pink dot is its only colour. */
.fresh {
  --paint: var(--card); top: 0; display: flex; align-items: center; justify-content: center; gap: .5rem; padding-top: env(safe-area-inset-top);
  color: var(--muted); font-size: var(--text-xs);
}
.fresh[hidden] { display: none; } /* the hidden placeholder that polls for new shares */
/* The child combinators keep the browser from re-checking this whenever anything deeper in the page changes. */
:root:has(> body > .fresh:not([hidden])) { --bar: calc(2rem + env(safe-area-inset-top)); }
:root:has(> body > .fresh:not([hidden])) .site-header { padding-top: .5rem; } /* the bar covers the notch */
.fresh::before { content: ""; width: .375rem; height: .375rem; border-radius: 50%; background: var(--search-focus); }
.fresh a { display: inline-flex; align-items: center; min-height: 2rem; color: var(--link); }

/* Back to top ------------------------------------------------------------- */

/* A record seen from above: its grooves are circles, so turning shows only as light sliding across
   them. Scrolling moves that light. It sits at the content's left edge, above the bottom fade. */
.to-top {
  position: fixed; z-index: 2;
  /* A fixed box's 100% is the viewport less any scrollbar, which keeps it level with the content. */
  left: max(var(--gutter), env(safe-area-inset-left), calc((100% - var(--page-max)) / 2 + var(--gutter)));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: grid; place-items: center; width: var(--target); height: var(--target); border-radius: 50%;
  background: var(--bg); color: var(--control); transition: color .25s;
}
.to-top > *, .to-top-disc > * { grid-area: 1 / 1; }
.to-top-disc { display: grid; width: 100%; height: 100%; }
.to-top:hover, .to-top:focus-visible { color: var(--link); }
.to-top-grooves { width: 100%; height: 100%; fill: none; stroke: currentColor; }
.to-top-rim { stroke-width: 1; }
.to-top-groove { stroke-width: .4; opacity: .6; }
.to-top-label-edge { stroke-width: .6; }
.to-top-sheen {
  width: 100%; height: 100%; border-radius: 50%; opacity: .16;
  background: conic-gradient(transparent 0 18deg, var(--sheen) 40deg, transparent 62deg 198deg, var(--sheen) 220deg, transparent 242deg);
  /* The ring between the label's edge and the rim, in proportion so it scales with the grooves. */
  mask: radial-gradient(closest-side, transparent 57%, #000 59% 98%, transparent);
}
.to-top-arrow { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
/* Pointing at it gives the disc two turns. site.js sets the class, so the turns finish even if the
   pointer leaves at once. */
@media (prefers-reduced-motion: no-preference) {
  .to-top-disc.is-spinning { animation: to-top-spin 1.2s cubic-bezier(.4, 0, .2, 1); }
  @keyframes to-top-spin { to { rotate: 2turn; } }
}
@media (forced-colors: active) { .to-top-sheen { display: none; } }
/* Hidden over the first screen, where there's no top to go back to. A page too short to scroll has no
   scroll timeline, so its animation doesn't apply: hidden is the resting state, and the timeline reveals it. */
@supports (animation-timeline: scroll()) {
  .to-top {
    opacity: 0; visibility: hidden;
    animation: to-top-reveal linear both; animation-timeline: scroll(root); animation-range: 0 100vh;
  }
  @keyframes to-top-reveal { 0%, 60% { opacity: 0; visibility: hidden; } 100% { opacity: 1; visibility: visible; } }
  @media (prefers-reduced-motion: no-preference) {
    .to-top-sheen { animation: to-top-turn linear both; animation-timeline: scroll(root); animation-iteration-count: 3; }
    @keyframes to-top-turn { to { rotate: 1turn; } }
  }
}

/* States ------------------------------------------------------------------ */

/* About: one column of reading, left with the wordmark, and a large italic line to open it. The column
   widens on desktop, still short of a tiring line. */
.about { display: grid; gap: 1rem; max-width: 34rem; margin: 1rem 0 4rem; text-wrap: pretty; }
@media (width >= 48rem) { .about { max-width: 40rem; } }
.about h1 { margin-bottom: 1rem; font: italic 400 clamp(var(--text-xl), 1.4rem + 1.6vw, var(--text-3xl))/var(--leading-tight) var(--serif); text-wrap: balance; }
/* The way back, with the keys as an end mark. */
.about-end { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; font: 400 var(--text-xs)/var(--leading-snug) var(--mono); }
.about-end a { display: inline-flex; align-items: center; min-height: var(--target); color: var(--link); }
.about-end a::after { content: " →" / ""; white-space: pre; }
.about-end::after { width: var(--text-lg); height: var(--text-lg); background: var(--control); }

/* Not found: the keys, faint, above a quiet message centred in the space under the header. */
.not-found { display: grid; justify-items: center; gap: 1rem; max-width: 30rem; margin: clamp(3rem, 12vh, 7rem) auto 0; text-align: center; }
.not-found::before { width: 2.75rem; height: 2.75rem; margin-bottom: .5rem; background: var(--control); }
.not-found-code { color: var(--muted); letter-spacing: .14em; }
.not-found h1 { font: italic 400 clamp(var(--text-xl), 1.4rem + 1.6vw, var(--text-3xl))/var(--leading-tight) var(--serif); text-wrap: balance; }
.not-found-text { color: var(--muted); text-wrap: pretty; }
.not-found-home { margin-top: 1rem; padding: 0 1.5rem; font-size: var(--text-sm); }

/* Sign-in: a card with one main action. Main is as far from the viewport's bottom as it is from its top,
   so centring the card in main centres it on screen; on a short screen it just starts below the header. */
main:has(> .sign-in) { display: grid; align-content: center; min-height: calc(100dvh - 2 * (var(--header) + 1rem)); }
.sign-in {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem .75rem; width: 100%; max-width: 24rem; margin: 1rem auto; padding: clamp(1.5rem, 6vw, 2rem);
  border: var(--hairline); background: var(--card); background: color-mix(in srgb, var(--card) 25%, var(--bg));
}
/* The keys and the heading share the first row; everything else takes the full width. */
.sign-in > :not(h1) { grid-column: 1 / -1; }
.sign-in::before { width: var(--text-lg); height: var(--text-lg); background: var(--control); }
.sign-in h1 { font: italic 400 var(--text-lg)/var(--leading-tight) var(--serif); text-wrap: balance; }
.sign-in p { color: var(--muted); text-wrap: pretty; }
.sign-in-note { font-size: var(--text-xs); }
.sign-in form { display: grid; gap: .75rem; margin-top: .5rem; }
/* The placeholder shows the label; screen readers still get the real one. */
.sign-in label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sign-in input:not([type="hidden"]) {
  width: 100%; min-height: 3rem; padding: 0 .875rem; border: var(--hairline); background: none; color: var(--fg);
  font: 400 var(--text-base)/var(--leading-snug) var(--mono); cursor: text;
}
.sign-in input::placeholder { color: var(--muted); opacity: 1; font-size: var(--text-xs); } /* the field stays 16px */
.sign-in input:focus { outline: 1px solid var(--search-focus); outline-offset: -1px; }
.sign-in .errorlist { margin-bottom: .5rem; color: var(--accent); font-size: var(--text-xs); }
/* Solid and full width, whether it's a button or a link. */
.sign-in button, .sign-in-again {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 3rem; padding: .625rem .875rem;
  border: 1px solid var(--fg); background: var(--fg); color: var(--bg);
  font: 400 var(--text-xs)/var(--leading-snug) var(--mono); letter-spacing: .02em; text-align: left; text-decoration: none; text-transform: uppercase;
}
.sign-in-again { margin-top: .5rem; }
.sign-in button::after, .sign-in-again::after { content: "→" / ""; flex: none; }
.sign-in button:hover, .sign-in-again:hover { border-color: var(--link); background: var(--link); color: var(--bg); }
/* The keys and the heading centre as a pair above the button, and so does its label. */
.sign-in:has(> .sign-in-confirm) { grid-template-columns: 1fr auto auto 1fr; }
.sign-in:has(> .sign-in-confirm)::before { grid-column: 2; }
.sign-in:has(> .sign-in-confirm) h1 { grid-column: 3; }
.sign-in-confirm button { justify-content: center; text-align: center; }

.results-empty { margin-top: 2rem; padding: 3rem 1rem; border: 1px dashed var(--control); color: var(--muted); text-align: center; }

/* One line saying what just happened, on the page after signing in or out. */
.notice { margin-bottom: 1rem; color: var(--muted); font: 400 var(--text-xs)/var(--leading-snug) var(--mono); }
/* site.js shows the status line only for an error; otherwise it's announced but hidden. */
.status.is-error { margin-top: 1rem; padding: 1rem; border: 1px solid var(--accent); background: var(--card); }
/* Toasts: a small card in the label type, centred near the top of the screen and dropping in from above it, over
   everything for the few seconds it shows. Hidden, it's out of sight and out of reach, so its last words aren't read
   again or tabbed to. */
.toast {
  --top: calc(env(safe-area-inset-top) + .5rem);
  position: fixed; top: var(--top); left: 50%; z-index: 5; width: max-content;
  max-width: calc(100vw - 2rem); padding: .875rem 1.25rem; border: var(--hairline); background: var(--card); color: var(--fg);
  box-shadow: 0 1rem 2rem -1rem color-mix(in srgb, #000 30%, transparent);
  transform: translate(-50%, calc(-100% - var(--top))); visibility: hidden;
}
.toast.is-shown { transform: translate(-50%, 0); visibility: visible; }
.toast.is-error { border-color: var(--accent); }
.toast a { color: var(--link); }
@media (prefers-reduced-motion: no-preference) {
  .toast { transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s; }
  .toast.is-shown { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
}

/* Short viewports (400% zoom, landscape phones): the header scrolls away instead of eating the screen. */
@media (height <= 30rem) {
  .site-header, .fresh { position: static; }
  :root:has(> body > .fresh:not([hidden])) { --bar: 0px; }
  html { scroll-padding-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Rows that htmx adds (Load more, search) fade in; the first page load stays instant. */
  .is-arriving { transition: opacity .3s ease-out, translate .3s ease-out; }
  .results.is-arriving .is-arriving { transition: none; }
  @starting-style {
    .results.is-arriving, .fresh.is-arriving { opacity: 0; }
    .period.is-arriving { opacity: 0; translate: 0 .25rem; }
  }
  /* Three pulses, so it settles within 5 s (WCAG 2.2.2). */
  .fresh::before { animation: pulse 1.5s ease-out 3; }
  @keyframes pulse {
    from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--search-focus) 70%, transparent); }
    to { box-shadow: 0 0 0 .4rem transparent; }
  }
  .more a, .not-found-home, .search button { transition: background-color .15s ease, border-color .15s ease; }
  .menu :is(.places, .menu-links) :is(a, button), .site-nav a, .site-footer a, .listen a { transition: color .15s ease; }
  .sign-in button, .sign-in-again { transition: background-color .15s ease, border-color .15s ease; }
  .fader-knob { transition: translate .35s ease, scale .25s ease, opacity .25s ease, stroke .15s ease; }
  .fader-track { transition: translate .35s ease, rotate .35s ease; }
  body { transition: translate .35s ease; }
  /* Only a real panel slides: the header's fallback links would start off screen. */
  @supports selector(:popover-open) { .menu { translate: 100%; transition: translate .35s ease, overlay .35s allow-discrete, display .35s allow-discrete; } }
  .menu:popover-open { translate: 0; }
  @starting-style { .menu:popover-open { translate: 100%; } }
  .listen-tidal svg { transition: color .15s ease, background-color .15s ease; }
}

/* A glint crosses the lucky spin's pink words twice after the page loads, while its record spins a
   turn each time and the sparkles twinkle, so they read as something to try. It settles within 5 s (WCAG 2.2.2). The words stay plain
   where a clipped background can't draw them, and in forced colours, which would hide it. */
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  /* Shared, so the record keeps time with the words. The link stays put while results swap, so it
     plays only as the page loads. */
  .lucky { --glint: 2s ease-in-out .8s 2; }
  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .lucky-label {
      background: linear-gradient(100deg, currentColor 30%, var(--sheen) 45% 55%, currentColor 70%) 100% 0 / 300% 100%;
      -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
      animation: glint var(--glint);
    }
  }
  .vinyl-turn { animation: spin var(--glint); }
  .vinyl-sparkle { animation: twinkle var(--glint); }
  .vinyl-sparkle:nth-child(3) { animation-delay: 1.1s; } /* the record's group is the first child */
  .vinyl-sparkle:nth-child(4) { animation-delay: 1.4s; }
  /* Pointing at it puts the record back on the turntable for as long as the pointer stays. Pausing lets it
     stop where it is and pick up from there. */
  .vinyl-disc { animation: spin 1.8s linear infinite paused; }
  @media (hover: hover) { .lucky:hover .vinyl-disc { animation-play-state: running; } }
  @keyframes glint { to { background-position: 0 0; } }
  @keyframes spin { to { rotate: 1turn; } }
  @keyframes twinkle { 50% { scale: .4; opacity: .5; } }
}

@media (forced-colors: active) {
  body::after { display: none; }
  .search-row, .lucky, .results-empty, .more a, .not-found-home, .sign-in, .sign-in button, .sign-in-again, .sign-in input:not([type="hidden"]), .menu, .release-tag, .status.is-error, .kinds, .person-tabs, .toast { border-color: CanvasText; }
  .wordmark a::before, .fresh::before, .site-nav a[aria-current="page"]::before, .kind:has(:checked)::before, .person-tab[aria-current="page"]::before, .menu .places a[aria-current="page"]::after, .not-found::before, .sign-in::before, .about-end::after { background: CanvasText; }
  .fader-knob { fill: Canvas; stroke: CanvasText; }
  .site-header { border-bottom: 1px solid CanvasText; }
  .search button { border: 1px solid ButtonText; }
  .listen svg { fill: LinkText; }
  .listen-tidal svg { padding: 0; background: none; box-shadow: none; }
  /* The marks' state is in their icons' fill, which the system colours would flatten: kept, and drawn in them. */
  .release-mark svg { forced-color-adjust: none; color: CanvasText; }
  .release-mark:has(:checked) { --mark-fill: CanvasText; }
  .mark-note { fill: Highlight; }
  .mark-pop { stroke: Highlight; }
  :is(.video-play, .listen-toggle)::before { background: ButtonFace; border: 1px solid ButtonText; }
  :is(.video-play, .listen-toggle)::after { background: ButtonText; }
}

/* "+ Genre": where a line's genre would be, in its type, muted with a dotted underline until it's given. */
.genre-add, .genre-change {
  position: relative; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer;
  text-decoration: underline dotted 1px color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: .3em;
}
/* The mono space after the plus is wide, so pull the word up to it. */
.genre-add { word-spacing: -.3em; }
/* A genre a member gave reads as one, with the dotted underline saying it can be changed. */
.genre-change { color: inherit; }
.genre-add:hover, .genre-add:focus-visible, .genre-change:hover, .genre-change:focus-visible { color: var(--link); }
.genre-add::after, .genre-change::after { content: ""; position: absolute; inset: calc((1cap - var(--target)) / 2) -.5rem; }
/* The genre dialog: a small card in the middle of the screen over a dimmed page; a sheet along the bottom
   on a phone, nearer the thumb and the keyboard. A small mono label, then the song as a feed row draws its
   title and the artist under it, then the field, and under that one line: a refusal's reason on the left,
   the actions on the right in the club card's link type. */
.genre-dialog {
  position: fixed; inset: 0; width: min(24rem, calc(100vw - 2rem)); height: fit-content; margin: auto; padding: 1.75rem 1.75rem 1.25rem;
  border: var(--hairline); background: var(--card); color: var(--fg);
  box-shadow: 0 1.5rem 3rem -1rem color-mix(in srgb, #000 30%, transparent);
}
/* A dark wash in either theme, so the page dims behind a dialog. */
:is(.genre-dialog, .listen-sheet)::backdrop { background: color-mix(in srgb, #000 30%, transparent); }
.genre-dialog-heading { color: var(--muted); }
.genre-dialog .release-title { margin: .75rem 0 0; -webkit-line-clamp: 2; color: var(--title); overflow-wrap: anywhere; }
.genre-dialog-artist { margin-top: .125rem; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-snug); overflow-wrap: anywhere; }
.genre-field { display: block; margin-top: 1.25rem; }
/* The focus line is a shadow under the border, so it thickens without moving anything. */
.genre-field input {
  width: 100%; min-height: var(--target); padding: 0; border: 0; border-bottom: 1px solid var(--control); border-radius: 0;
  background: none; color: var(--fg); font: 400 var(--text-base)/1 var(--sans); cursor: text;
}
.genre-field input::placeholder { color: var(--muted); opacity: 1; }
.genre-field input:focus { outline: none; border-bottom-color: var(--search-focus); box-shadow: 0 1px 0 var(--search-focus); }
/* Suggestions: genres matching what's typed, as small boxed labels that wrap under the field. */
.genre-suggestions { display: flex; flex-wrap: wrap; gap: .375rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.genre-suggestions:empty { display: none; }
.genre-suggestion {
  min-height: 2rem; padding: 0 .625rem; border: var(--hairline); background: none; color: var(--fg); cursor: pointer;
}
.genre-suggestion:hover, .genre-suggestion:focus-visible { border-color: var(--link); color: var(--link); }
.genre-dialog-end { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .5rem; }
.genre-note, .genre-error { flex: 1; min-width: 0; font-size: var(--text-xs); line-height: var(--leading-snug); }
.genre-error { color: var(--accent); }
/* The buttons' padding gives them 44px targets; the negative margin keeps "Save →" flush with the field's end. */
.genre-dialog-buttons { display: flex; flex: none; margin-right: -.5rem; }
.genre-cancel, .genre-save {
  min-height: var(--target); padding: 0 .5rem; border: 0; background: none; cursor: pointer;
}
.genre-cancel { color: var(--muted); }
.genre-save { color: var(--fg); }
.genre-cancel:hover, .genre-save:hover, .genre-cancel:focus-visible, .genre-save:focus-visible { color: var(--link); }
@media (width < 40rem) {
  .genre-dialog {
    inset: auto 0 var(--keyboard-height, 0px); width: 100%; margin: 0; padding-bottom: calc(1.25rem + max(0px, env(safe-area-inset-bottom) - var(--keyboard-height, 0px)));
    border-width: 1px 0 0; box-shadow: var(--sheet-shadow);
  }
}
@supports not selector(:popover-open) {
  .genre-add, .genre-dialog { display: none; }
  .genre-change { text-decoration: none; cursor: auto; pointer-events: none; }
}
@media (prefers-reduced-motion: no-preference) {
  :is(.genre-dialog, .listen-sheet) { transition: opacity .18s ease, translate .18s ease, overlay .18s allow-discrete, display .18s allow-discrete; }
  :is(.genre-dialog, .listen-sheet)::backdrop { transition: background-color .18s ease, overlay .18s allow-discrete, display .18s allow-discrete; }
  .genre-field input { transition: border-color .15s ease, box-shadow .15s ease; }
  .genre-suggestion { transition: border-color .15s ease, color .15s ease; }
  @starting-style {
    .genre-dialog:popover-open { opacity: 0; translate: 0 .5rem; }
    :is(.genre-dialog, .listen-sheet):popover-open::backdrop { background-color: transparent; }
    .listen-sheet:popover-open { translate: 0 100%; }
  }
  @media (width < 40rem) {
    @starting-style { .genre-dialog:popover-open { opacity: 1; translate: 0 100%; } }
  }
}
@media (forced-colors: active) {
  .genre-field input { border-color: CanvasText; }
  :is(.genre-dialog, .listen-sheet) { border-color: CanvasText; }
}
