/* ==========================================================================
   GorillaFlix — the archive (home)
   Index's layout and features in the Screening Room's dark look:
   a hero, highlights and accolades, then the complete index.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;
  /* Palette: the screening room. One neutral black, one warm "projector light" accent */
  --paper:   #0A0A0A;   /* the room */
  --paper-2: #141414;   /* row hover, the no-video band */
  --paper-3: #1C1C1C;   /* stills that are missing, title cards */
  --rule:    rgba(255, 255, 255, .1);   /* hairlines */
  --ink:     #F2F2F2;   /* 17.7:1 */
  --ink-2:   #ADADAD;   /*  8.8:1 */
  --ink-3:   #949494;   /*  6.5:1 */
  --accent:  #E9D8B4;   /* 14:1 */
  --on-ink:  #0A0A0A;

  /* Type: a condensed display face for titles and numerals, a quiet sans for everything else */
  --serif: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --sans:  "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --track: .16em;
  --r: 4px;
  --hdr-h: 56px;

  /* One display size per breakpoint, shared by the name, the year numerals and section heads */
  --disp: 32px; --disp-lh: 40px;

  /* Spacing: 4 / 8 based */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* Grid */
  --cols: 4;
  --margin: 16px;
  --gutter: 16px;
  --maxw: 1680px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ctl-h: 0px;   /* sticky control bar height, set by JS */
}
@media (min-width: 768px)  { :root { --hdr-h: 64px; --cols: 12; --margin: 32px; --gutter: 20px; --disp: 40px; --disp-lh: 48px; } }
@media (min-width: 1200px) { :root { --margin: 48px; --gutter: 24px; --disp: 56px; --disp-lh: 56px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, dl, dd, blockquote, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3 { font-weight: 400; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 0; text-align: inherit; }
img { display: block; max-width: 100%; }
kbd { font: inherit; }
::selection { background: var(--accent); color: var(--on-ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--margin); top: -100px; z-index: 50;
  background: var(--ink); color: var(--on-ink); padding: var(--s2) var(--s4);
}
.skip:focus { top: var(--s2); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--margin); }
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* Shared text styles */
.label {
  font: 500 12px/16px var(--sans);
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: var(--s3) var(--s4);
  background: var(--ink); color: var(--on-ink); border-radius: var(--r);
  font: 600 15px/20px var(--sans);
  transition: background-color .15s;
}
.btn:hover { background: var(--accent); }
.link {
  font: 500 15px/24px var(--sans);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: var(--ink-3);
  transition: color .15s, text-decoration-color .15s;
}
.link:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- Header: clear over the hero, solid once it scrolls away ---------- */
.kick { font: 600 12px/16px var(--sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-2); }
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 40; height: calc(var(--hdr-h) + env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: env(safe-area-inset-top) var(--margin) 0;
  transition: background-color .6s var(--ease);
}
.hdr::before { content: ""; position: absolute; inset: 0 0 calc(var(--s5) * -1); z-index: -1; background: linear-gradient(rgba(0, 0, 0, .6), transparent); transition: opacity .6s; pointer-events: none; }
body.solid .hdr { background: rgba(10, 10, 10, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--rule); }
body.solid .hdr::before { opacity: 0; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font: 600 18px/1 var(--serif); letter-spacing: var(--track); text-transform: uppercase; }
.hdr-nav { display: flex; align-items: center; gap: var(--s1); margin-right: calc(var(--s3) * -1); }
.nav-b { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 var(--s3); font: 500 14px/1 var(--sans); color: var(--ink-2); transition: color .2s; }
.nav-b:hover { color: var(--ink); }
.nav-install { color: var(--accent); }
@media (max-width: 559px) { .hdr-nav a.nav-b { display: none; } }

/* ---------- Hero: the reel's still behind the name ---------- */
.hero { position: relative; isolation: isolate; min-height: 72vh; min-height: 72svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
@media (min-width: 768px) { .hero { min-height: min(82vh, 980px); min-height: min(82svh, 980px); } }
.hero-media { position: absolute; inset: 0; z-index: -1; background: var(--paper-2); }
.hero-media .th { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.hero-media .th img { object-position: 72% 30%; animation: hero-in 1.2s var(--ease) both; }
@keyframes hero-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--paper) 0%, rgba(10, 10, 10, .88) 30%, rgba(10, 10, 10, .45) 58%, rgba(10, 10, 10, .2) 80%, rgba(10, 10, 10, .5) 100%),
    linear-gradient(to right, rgba(10, 10, 10, .72), transparent 64%);
}
@media (max-width: 767px) {
  .hero-media .th img { object-position: 70% 20%; }
  .hero-media::after { background: linear-gradient(to top, var(--paper) 0%, rgba(10, 10, 10, .9) 42%, rgba(10, 10, 10, .6) 60%, rgba(10, 10, 10, .15) 82%, rgba(10, 10, 10, .5) 100%); }
}
.hero-copy { padding-bottom: var(--s7); }
@media (min-width: 1024px) { .hero-copy { padding-bottom: var(--s8); } }
.eyebrow { font: 600 12px/16px var(--sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink); text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
.hero-h { margin-top: var(--s3); font: 600 clamp(48px, 8.4vw, 136px)/.88 var(--serif); text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; }
.hero-h span { display: block; font-weight: 400; font-size: .5em; line-height: 1.1; color: var(--ink-2); }
.hero-lead { margin-top: var(--s4); max-width: 60ch; font: 400 16px/1.6 var(--sans); color: var(--ink-2); text-wrap: pretty; }
@media (min-width: 768px) { .hero-lead { font-size: 18px; } }
.hero-act { margin-top: var(--s5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.play {
  display: inline-flex; align-items: center; gap: var(--s3);
  min-height: 48px; padding: 0 var(--s5) 0 var(--s4); border-radius: var(--r);
  background: var(--ink); color: var(--on-ink); font: 600 16px/1 var(--sans);
  transition: background-color .2s;
}
.play:hover, .play:focus-visible { background: var(--accent); }
.play:focus-visible { outline-offset: 4px; }
.play-d { font-weight: 500; color: #3D3D3D; font-variant-numeric: tabular-nums; }
.play-d:empty { display: none; }
.ghost { display: inline-flex; align-items: center; min-height: 48px; font: 500 15px/1 var(--sans); color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: rgba(255, 255, 255, .3); }
.ghost:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- The record: numbers from the archive itself ---------- */
.acc { padding-block: var(--s7) var(--s6); display: grid; row-gap: var(--s6); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--gutter); margin-top: calc(var(--s3) * -1); }
/* the label sits under the number, the note under the label */
.stat { display: grid; grid-template-areas: "n" "k" "s"; align-content: start; padding-top: var(--s4); border-top: 1px solid var(--rule); min-width: 0; }
.stat dd { display: contents; }
.stat-n { grid-area: n; font: 600 clamp(48px, 6vw, 88px)/.9 var(--serif); color: var(--accent); font-variant-numeric: lining-nums; }
.stat dt { grid-area: k; margin-top: var(--s2); font: 600 12px/16px var(--sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink); }
.stat-s { grid-area: s; margin-top: var(--s1); font: 400 13px/18px var(--sans); color: var(--ink-3); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.with { display: grid; row-gap: var(--s3); }
.names { display: flex; flex-wrap: wrap; gap: var(--s2); }
.nm {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4);
  border: 1px solid var(--rule); border-radius: 999px;
  font: 500 15px/1 var(--sans); color: var(--ink); transition: border-color .2s, color .2s, background-color .2s;
}
.nm:hover { border-color: var(--accent); color: var(--accent); }
.nm-c { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nm-more { color: var(--ink-2); border-style: dashed; }
@media (max-width: 767px) { .names li:nth-child(n+11):not(:last-child) { display: none; } }

.press ul { margin-top: var(--s3); display: grid; gap: 0; }
.press li > * { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s4); padding-block: var(--s3); border-top: 1px solid var(--rule); }
.pr-t { font: 600 22px/1.15 var(--serif); text-transform: uppercase; letter-spacing: .01em; }
.pr-d { grid-row: 2; font: 400 14px/20px var(--sans); color: var(--ink-2); }
.pr-y { grid-column: 2; grid-row: 1; font: 500 14px/24px var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.press a:hover .pr-t { color: var(--accent); }

.acc-quote { max-width: 48ch; padding-left: var(--s5); border-left: 2px solid var(--accent); }
.acc-quote p { font: 500 clamp(26px, 3vw, 36px)/1.1 var(--serif); text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; }
.acc-quote figcaption { margin-top: var(--s3); font: 600 14px/20px var(--sans); color: var(--ink); }
.acc-quote figcaption span { display: block; font-weight: 400; color: var(--ink-2); }
.acc-quote .link { font-size: 14px; }
@media (min-width: 1024px) {
  .acc { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--s8) var(--s7); }
  .acc > .kick, .stats, .press { grid-column: 1 / -1; }
  .with { grid-column: 1 / 8; }
  .acc-quote { grid-column: 9 / -1; align-self: start; }
  .acc-quote[hidden] + * { grid-column: 1 / -1; }
}

/* ---------- Shelves: rows of picks that scroll sideways ---------- */
.shelves { padding-bottom: var(--s6); }
.shelf { margin-top: var(--s7); }
.shelf-h { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); }
.shelf-h h2 { font: 600 clamp(28px, 3.2vw, 44px)/1 var(--serif); text-transform: uppercase; letter-spacing: .005em; }
.shelf-sub { margin-top: var(--s1); font: 400 14px/20px var(--sans); color: var(--ink-2); }
.shelf-tools { flex: none; display: flex; align-items: center; gap: var(--s2); }
.shelf-go { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; margin-right: var(--s2); }
.sh-arr { display: none; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 50%; color: var(--ink); align-items: center; justify-content: center; transition: border-color .2s, color .2s, opacity .2s; }
.sh-arr:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.sh-arr:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (min-width: 768px) { .sh-arr { display: inline-flex; } }
@media (max-width: 559px) { .shelf-go { display: none; } }
.shelf-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%;
  gap: var(--gutter); margin-top: var(--s4);
  padding: var(--s1) var(--margin) var(--s3); scroll-padding-inline: var(--margin);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > li { scroll-snap-align: start; min-width: 0; }
@media (min-width: 560px) { .shelf-row { grid-auto-columns: 44%; } }
@media (min-width: 900px) { .shelf-row { grid-auto-columns: calc((100% - 2 * var(--margin) - 2 * var(--gutter)) / 3.2); } }
@media (min-width: 1400px) { .shelf-row { grid-auto-columns: calc((100% - 2 * var(--margin) - 3 * var(--gutter)) / 4.2); } }
@media (min-width: 1680px) { .shelf-row { padding-inline: calc((100% - var(--maxw)) / 2 + var(--margin)); scroll-padding-inline: calc((100% - var(--maxw)) / 2 + var(--margin)); } }
.card { display: block; width: 100%; text-align: left; border-radius: var(--r); -webkit-tap-highlight-color: transparent; }
.card:focus-visible { outline-offset: 4px; }
.card .th img { filter: brightness(.9); transition: transform .9s var(--ease), filter .6s var(--ease); }
@media (hover: hover) { .card:hover .th img { transform: scale(1.03); filter: brightness(1); } }
.cap-t { display: block; margin-top: var(--s3); font: 500 20px/24px var(--serif); color: var(--ink); overflow-wrap: break-word; }
.cap-a { display: block; margin-top: var(--s1); font: 500 14px/20px var(--sans); color: var(--ink-2); overflow-wrap: break-word; }
.card:hover .cap-t, .card:focus-visible .cap-t { color: var(--accent); }
.era-card .th { position: relative; }
.ec-y { display: block; margin-top: var(--s3); font: 600 12px/16px var(--sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--accent); }
.era-card .cap-t { margin-top: var(--s1); font-size: 24px; line-height: 28px; text-transform: uppercase; font-weight: 600; }

/* ---------- The complete index ---------- */
.index, .artists, .about { scroll-margin-top: var(--hdr-h); }
.idx-h { padding-top: var(--s8); padding-bottom: var(--s4); }
.idx-h h2 { margin-top: var(--s2); font: 600 clamp(40px, 5vw, 72px)/.95 var(--serif); text-transform: uppercase; letter-spacing: .005em; }
.idx-h .sec-sub { max-width: 60ch; font-size: 15px; line-height: 24px; }

/* ---------- Index controls ---------- */
.index { padding-bottom: var(--s9); }
.ctl-sentinel { height: 1px; }
.ctl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "q f" "s s" "n v";
  column-gap: var(--s4); row-gap: var(--s2);
  align-items: center;
  padding-top: var(--s2); padding-bottom: var(--s4);
  background: var(--paper);
  z-index: 10;
}
.ctl-n { grid-area: n; font: 400 14px/20px var(--sans); color: var(--ink-2); }
.ctl-n .link { margin-left: var(--s2); font-size: 14px; line-height: 20px; }

.search { grid-area: q; position: relative; }
.search input {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 44px;
  padding: 0;
  font: 400 16px/24px var(--sans); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink-3); border-radius: 0;
  transition: border-color .15s;
}
.search.has-q input { padding-right: 56px; }
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search input:hover, .search input:focus { border-bottom-color: var(--ink); }
.search input:focus-visible { outline: none; border-bottom: 2px solid var(--accent); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.q-clear {
  position: absolute; right: 0; top: 0; height: 44px;
  font: 500 14px/20px var(--sans); color: var(--ink-2);
}
.q-clear:hover { color: var(--accent); }

.f-toggle, .view button {
  min-height: 44px; font: 500 15px/20px var(--sans); color: var(--ink-2);
  transition: color .15s;
}
.f-toggle { grid-area: f; display: inline-flex; align-items: center; gap: var(--s1); color: var(--ink); }
.f-toggle::after {
  content: ""; width: 10px; height: 6px; margin-left: var(--s1);
  background: no-repeat center / 10px 6px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23F2F2F2' stroke-width='1.3'/%3E%3C/svg%3E");
  transition: transform .15s;
}
.f-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.f-n { color: var(--accent); }
.f-toggle:hover, .view button:hover { color: var(--accent); }

.sentence { grid-area: s; display: none; font: 500 22px/44px var(--serif); color: var(--ink-2); }
.ctl.f-open .sentence { display: block; }
.sentence > span { white-space: nowrap; }
.sentence .punct { margin-left: -.18em; margin-right: .1em; }
.sentence select {
  -webkit-appearance: none; appearance: none;
  max-width: 100%; height: 44px;
  font: inherit; line-height: normal; color: var(--ink);
  background: transparent no-repeat right 1px center / 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23F2F2F2' stroke-width='1.3'/%3E%3C/svg%3E");
  border: 0; border-bottom: 1px solid var(--ink-3); border-radius: 0;
  padding: 0 18px 0 0; margin: 0 .12em;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: color .15s, border-color .15s;
}
.sentence select:hover { border-bottom-color: var(--ink); }
.sentence select.is-set {
  color: var(--accent); border-bottom-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23E9D8B4' stroke-width='1.3'/%3E%3C/svg%3E");
}
.sentence select option, .sentence select optgroup { font: 400 15px/1.4 var(--sans); color: var(--ink); background: var(--paper-2); }

.view { grid-area: v; display: flex; gap: var(--s4); justify-self: end; }
.view button { color: var(--ink-3); }
.view button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

.colhead { grid-area: c; display: none; }

@media (min-width: 1024px) {
  .ctl {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "s s s s s s s s q q q v"
      "n n n n n n n n n n n n"
      "c c c c c c c c c c c c";
    column-gap: var(--gutter); row-gap: var(--s1);
    padding-top: var(--s2); padding-bottom: var(--s5);
  }
  .f-toggle { display: none; }
  .sentence, .ctl.f-open .sentence { display: block; font-size: 22px; line-height: 32px; }
  .sentence select { height: auto; line-height: inherit; }
  .ctl-n { padding-bottom: var(--s3); }
  .ctl-n .link { font-size: 14px; }
}
@media (min-width: 1200px) {
  .ctl {
    position: sticky; top: var(--hdr-h);
    grid-template-areas:
      "n n s s s s s s s q q v"
      ". . c c c c c c c c c c";
    row-gap: 0;
    padding-top: var(--s3);
  }
  .sentence { font-size: 22px; line-height: 32px; }
  .ctl-n { padding-bottom: 0; }
  .ctl-n .link { display: inline; }
  .ctl.is-stuck { box-shadow: 0 1px 0 var(--rule); }
  body:not(.v-grid) .ctl.is-stuck { box-shadow: none; }
}

@media (min-width: 1440px) { .sentence { font-size: 24px; line-height: 36px; } }

/* Column labels (desktop list only) */
@media (min-width: 1024px) and (hover: hover) {
  body:not(.v-grid) .ctl { padding-bottom: 0; }
  body:not(.v-grid) .colhead {
    display: grid; grid-template-columns: subgrid;
    padding-block: var(--s4) var(--s2);
  }
  .colhead span { grid-row: 1; margin: 0; font: 500 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
}

/* ---------- Results: year groups ---------- */
.results { min-height: 50vh; }
.yr { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.yr + .yr { margin-top: var(--s6); }
.yr-h {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "n e c";
  align-items: baseline; column-gap: var(--s3);
  padding-bottom: var(--s2);
}
.yr-n { grid-area: n; font: 500 var(--disp)/var(--disp-lh) var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.yr-era { grid-area: e; min-width: 0; font: 500 14px/20px var(--sans); color: var(--ink-2); }
.yr-era span { display: none; }
.yr-c { grid-area: c; font: 400 14px/20px var(--sans); color: var(--ink-3); }
@media (min-width: 768px) {
  .yr-era span { display: inline; font-weight: 400; }
  .yr-era span::before { content: "·"; margin: 0 var(--s2); }
}
.yr-rows { grid-column: 1 / -1; }

/* ---------- Index rows ---------- */
.row {
  position: relative;
  display: grid;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  transition: background-color .12s;
}
.row:focus-visible { outline-offset: -2px; }
.c-title { font-weight: 500; }
.c-artist, .c-type, .c-date, .c-no { color: var(--ink-2); }
.c-title, .c-artist { overflow-wrap: break-word; hyphens: manual; }

/* Compact rows with stills: phones, tablets and touch screens */
.row {
  grid-template-columns: var(--th-w, 112px) var(--s4) max-content max-content minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "th . t t t" "th . a a a" "th . ty dt ." "th . . . .";
  column-gap: 0;
  padding-block: var(--s3);
}
.row .th { grid-area: th; width: var(--th-w, 112px); align-self: start; }
.c-title { grid-area: t; font-size: 16px; line-height: 22px; }
.c-artist { grid-area: a; font-size: 14px; line-height: 20px; margin-top: 2px; }
.c-artist:empty { display: none; }
.c-type { grid-area: ty; margin-top: var(--s1); font-size: 13px; line-height: 20px; color: var(--ink-3); }
.c-date { grid-area: dt; margin-top: var(--s1); font-size: 13px; line-height: 20px; color: var(--ink-3); }
.c-date:not(:empty)::before { content: "·"; margin-inline: var(--s2); }
.c-no { display: none; }
.row:hover { background: var(--paper-2); }
@media (min-width: 560px) { .row { --th-w: 144px; } }
@media (min-width: 768px) {
  .row { --th-w: 160px; padding-block: var(--s4); }
  .c-title { font-size: 18px; line-height: 24px; }
  .c-artist { font-size: 15px; line-height: 24px; }
}

/* Single-line index rows: desktop with a mouse */
@media (min-width: 1024px) and (hover: hover) {
  .yr-rows { display: grid; grid-template-columns: subgrid; align-content: start; }
  .yr-rows > li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
  .row {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    grid-template-areas: none;
    grid-template-rows: auto;
    column-gap: var(--gutter);
    align-items: start;
    padding-block: var(--s3);
    min-height: 49px; /* 12 + 24 + 12 + 1px rule: every row the same */
  }
  .row .th { display: none; }
  .row > span { grid-row: 1; margin: 0; min-width: 0; font-size: 15px; line-height: 24px; }
  .c-artist:empty { display: block; }
  .c-title, .c-artist, .c-type {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
  /* The catalogue number takes a narrow 48px track at the start of the title cell */
  .c-no { display: block; justify-self: start; width: 56px; padding-left: var(--s2); font-size: 13px; color: var(--ink-3); }
  .row .c-title { padding-left: 56px; font-size: 17px; }
  .c-type, .c-date { color: var(--ink-2); }
  .c-date { text-align: right; padding-right: var(--s2); }
  .c-date:not(:empty)::before { content: none; }
  .row:hover .c-title, .row:focus-visible .c-title { color: var(--accent); }
  .colhead .c-no { width: auto; padding-left: var(--s2); }
  .colhead .c-title { padding-left: 56px; }
  .colhead .c-date { text-align: right; padding-right: var(--s2); }

  /* 1024–1199: twelve columns, the year on its own line */
  .c-no, .c-title { grid-column: 1 / 6; }
  .c-artist { grid-column: 6 / 10; }
  .c-type { grid-column: 10 / 12; }
  .row .c-type { font-size: 14px; }
  .c-date { grid-column: 12 / 13; }
}
/* ≥1200: the year sits in the margin, the index runs in columns 3–12 */
@media (min-width: 1200px) and (hover: hover) {
  body:not(.v-grid) .yr-h {
    grid-column: 1 / 3; grid-row: 1;
    position: sticky; top: calc(var(--hdr-h) + var(--ctl-h) + var(--s3));
    display: block;
    padding: var(--s2) 0 0;
  }
  body:not(.v-grid) .yr-era { margin-top: var(--s2); font-size: 13px; line-height: 20px; }
  body:not(.v-grid) .yr-era span { display: block; font-weight: 400; }
  body:not(.v-grid) .yr-era span::before { content: none; }
  body:not(.v-grid) .yr-c { margin-top: var(--s1); font-size: 13px; }
  body:not(.v-grid) .yr-rows { grid-column: 3 / -1; grid-row: 1; align-self: start; }
  body:not(.v-grid) .yr + .yr { margin-top: var(--s7); }
  .colhead { grid-column: 3 / -1; }
  .c-no, .c-title { grid-column: 1 / 5; }
  .c-artist { grid-column: 5 / 8; }
  .c-type { grid-column: 8 / 10; }
  .row .c-type { font-size: 15px; }
  .c-date { grid-column: 10 / 11; }
}

/* ---------- Grid view ---------- */
.tiles {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter); row-gap: var(--s6);
  padding-top: var(--s2);
}
.tiles > li { grid-column: span 4; min-width: 0; }
.tile { display: block; }
.tile .th { transition: opacity .15s; }
.tile:hover .th { opacity: .88; }
.t-title { display: block; margin-top: var(--s3); font: 500 16px/22px var(--sans); overflow-wrap: break-word; }
.t-meta { display: block; margin-top: 2px; font: 400 14px/20px var(--sans); color: var(--ink-2); overflow-wrap: break-word; }
.tile:hover .t-title, .tile:focus-visible .t-title { color: var(--accent); }
.tile:focus-visible { outline-offset: 4px; }
@media (min-width: 560px) and (max-width: 767px) { .tiles > li { grid-column: span 2; } }
@media (min-width: 768px) { .tiles > li { grid-column: span 6; } }
@media (min-width: 1024px) { .tiles > li { grid-column: span 4; } }
@media (min-width: 1200px) { .tiles > li { grid-column: span 3; } }

/* ---------- Stills & missing stills ---------- */
.th {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--paper-3);
  container-type: inline-size;
}
.th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Vertical 9:16 work in a 16:9 slot: a centre crop of the frame, a little above the middle */
.th.v img { inset: auto; left: 0; top: 0; width: 100%; height: auto; aspect-ratio: 9 / 16; transform: translateY(-20.5%); }
/* No still: a quiet plate that says why, never a second copy of the title */
.tcard {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6cqi;
  background: var(--paper-3);
}
.tc-l {
  font: 600 clamp(11px, 4.4cqi, 14px)/1.2 var(--sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-2);
  text-align: center;
}

/* ---------- Hover peek (desktop) ---------- */
.peek {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: 320px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-9999px, 0, 0);
  transition: opacity .14s;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
}
.peek.on { opacity: 1; }
.peek .th { width: 100%; }
.peek.v { width: 180px; }
.peek.v .th { aspect-ratio: 9 / 16; }
.peek.v .th.v img { inset: 0; width: 100%; height: 100%; aspect-ratio: auto; transform: none; }
@media (max-width: 1279px) { .peek { width: 272px; } .peek.v { width: 153px; } }

/* ---------- Empty state ---------- */
.empty { padding-block: var(--s8); }
.empty p { font: 600 40px/1.05 var(--serif); text-transform: uppercase; margin-bottom: var(--s5); }

/* ---------- Section heads (Artists, About): same size as the year numerals ---------- */
.artists, .about { padding-block: var(--s9) 0; row-gap: var(--s5); }
.sec-h { grid-column: 1 / -1; }
.sec-h h2 { font: 600 var(--disp)/var(--disp-lh) var(--serif); text-transform: uppercase; letter-spacing: .005em; }
.sec-sub, .era-t, .cr-desc { text-wrap: pretty; }
.sec-sub { margin-top: var(--s2); font: 400 15px/24px var(--sans); color: var(--ink-2); max-width: 44ch; }
@media (min-width: 1200px) {
  .sec-h { grid-column: 1 / 3; }
  .sec-sub { margin-top: var(--s3); font-size: 13px; line-height: 20px; }
}

/* ---------- Artists: an index of names under letter heads ---------- */
.roster { grid-column: 1 / -1; columns: 2; column-gap: var(--gutter); }
.lg { break-inside: avoid; padding-bottom: var(--s4); }
.lg-h { font: 600 22px/32px var(--serif); color: var(--accent); }
.ar {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2);
  width: 100%; min-height: 32px; padding-block: var(--s1);
  font: 400 15px/24px var(--sans); color: var(--ink-2);
  transition: color .12s;
}
.ar-n { min-width: 0; overflow-wrap: break-word; }
.lg li.hl .ar { color: var(--ink); font-weight: 500; }
.ar-c { flex: none; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 400; }
.ar:hover, .ar:hover .ar-c, .lg li.hl .ar:hover { color: var(--accent); }
.roster-more { grid-column: 1 / -1; justify-self: start; min-height: 44px; }
@media (max-width: 767px) {
  .ar { min-height: 44px; padding-block: 10px; }
  .artists.is-collapsed .lg-h,
  .artists.is-collapsed .lg li:not(.hl),
  .artists.is-collapsed .lg:not(.has-hl) { display: none; }
  .artists.is-collapsed .lg { padding-bottom: 0; }
}
@media (min-width: 768px) {
  .roster { columns: 3; }
  .roster-more { display: none; }
}
@media (min-width: 1024px) { .roster { columns: 4; } }
@media (min-width: 1200px) { .roster { grid-column: 3 / -1; columns: 5; } }

/* ---------- About & eras ---------- */
.about-body { grid-column: 1 / -1; display: grid; gap: var(--s5); }
.about-body p { font: 400 17px/28px var(--sans); color: var(--ink-2); max-width: 64ch; }
.about-body p:first-child { font: 500 26px/1.15 var(--serif); color: var(--ink); max-width: 40ch; }
@media (min-width: 768px) {
  .about-body { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s5); }
  .about-body p { grid-column: span 6; }
  .about-body p:first-child { grid-column: 1 / -1; font-size: 32px; line-height: 40px; }
}
@media (min-width: 1200px) {
  .about-body { grid-column: 3 / -1; grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .about-body p { grid-column: span 5; }
}

.eras { grid-column: 1 / -1; margin-top: var(--s7); }
.era {
  display: grid; grid-template-columns: minmax(0, 1fr);
  row-gap: var(--s2);
  padding-block: var(--s5);
  border-top: 1px solid var(--rule);
}
.era-y { font: 500 32px/40px var(--serif); font-variant-numeric: lining-nums; }
.era-h h3 { font: 600 22px/28px var(--serif); text-transform: uppercase; letter-spacing: .02em; }
.era-h p { font: 400 14px/20px var(--sans); color: var(--ink-2); }
.era-t { font: 400 15px/24px var(--sans); color: var(--ink-2); max-width: 60ch; }
.era-go {
  justify-self: start; min-height: 44px;
  font: 500 15px/24px var(--sans); color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--ink-3);
  transition: color .15s, text-decoration-color .15s;
}
.era-go:hover { color: var(--accent); text-decoration-color: currentColor; }
@media (min-width: 768px) {
  .era { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: baseline; }
  .era-y { grid-column: 1 / 4; }
  .era-h { grid-column: 4 / 7; }
  .era-t { grid-column: 7 / -1; }
  .era-go { grid-column: 7 / -1; }
}
@media (min-width: 1200px) {
  .era-y { grid-column: 1 / 3; font-size: 40px; line-height: 48px; }
  .era-h { grid-column: 3 / 6; }
  .era-t { grid-column: 6 / 11; }
  .era-go { grid-column: 11 / -1; grid-row: 1; justify-self: end; text-align: right; }
}

/* ---------- Footer ---------- */
.foot { margin-top: var(--s10); padding-block: var(--s6) var(--s7); row-gap: var(--s3); align-items: baseline; border-top: 1px solid var(--rule); }
.foot-name { grid-column: 1 / -1; font: 600 20px/32px var(--serif); letter-spacing: var(--track); text-transform: uppercase; }
.foot-name span { font: 400 14px/20px var(--sans); color: var(--ink-2); margin-left: var(--s2); }
.foot-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; column-gap: var(--s4); margin-left: calc(-1 * var(--s2)); }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s2); font: 500 15px/24px var(--sans); color: var(--ink-2); }
.foot-links a:hover { color: var(--accent); }
.foot-note { grid-column: 1 / -1; font: 400 14px/20px var(--sans); color: var(--ink-3); }
.foot-app { grid-column: 1 / -1; font: 400 14px/20px var(--sans); color: var(--ink-2); }
.foot-app .link { font-size: 14px; color: var(--accent); }
.foot { padding-bottom: calc(var(--s7) + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
  .foot-name { grid-column: 1 / 5; }
  .foot-links { grid-column: 5 / 10; }
  .foot-note { grid-column: 10 / -1; text-align: right; }
}
@media (min-width: 1200px) {
  .foot-name { grid-column: 1 / 3; }
  .foot-name span { display: block; margin: 0; }
  .foot-links { grid-column: 3 / 10; }
}

/* ==========================================================================
   Player sheet
   ========================================================================== */
.sheet {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
  --stage-room: 192px; /* bar + breathing room + title peeking below the stage */
  --col-w: min(100%, calc((100svh - var(--stage-room)) * 16 / 9));
}
.sheet::backdrop { background: #000; }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in .28s var(--ease); }
  @keyframes sheet-in { from { transform: translateY(16px); } to { transform: none; } }
}

.sheet-bar {
  position: sticky; top: 0; z-index: 3;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 56px; padding-inline: var(--margin);
  background: var(--paper);
}
.s-close, .s-nav button {
  min-height: 44px; min-width: 44px;
  font: 500 15px/24px var(--sans); color: var(--ink);
  transition: color .15s;
}
.s-close { justify-self: start; display: inline-flex; align-items: center; gap: var(--s2); }
.s-close > span { font-size: 13px; }
.s-esc {
  margin-left: var(--s1); padding: 0 var(--s1);
  font: 500 12px/18px var(--sans); color: var(--ink-3);
  border: 1px solid var(--rule); border-radius: 3px;
}
@media (hover: none), (max-width: 767px) { .s-esc { display: none; } }
.s-close:hover, .s-nav button:hover:not(:disabled) { color: var(--accent); }
.s-pos { font: 400 14px/20px var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.s-nav { justify-self: end; display: flex; gap: var(--s5); }
.s-nav button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); }
.s-nav button:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
@media (max-width: 559px) { .s-nav-l { display: none; } .s-nav { gap: var(--s2); } .s-nav button { font-size: 18px; } }

.sheet-in { padding-bottom: var(--s9); }

/* Stage: sized so the whole frame fits the viewport, credits start right below */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  background: #000;
  overflow: hidden;
}
.stage:focus, .stage:focus-visible { outline: none; }
.stage.v { aspect-ratio: 9 / 16; width: min(100%, calc((100svh - var(--stage-room)) * 9 / 16)); }
@media (min-width: 768px) {
  .stage { width: var(--col-w); }
  .stage.v { width: min(100%, calc((100svh - var(--stage-room)) * 9 / 16)); }
  .sheet-in { padding-inline: var(--margin); }
}
.stage-yt, .stage-x { position: absolute; inset: 0; }
.stage-yt iframe, .stage-x iframe, .stage-x video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.stage[data-mode="youtube"] .stage-x { display: none; }
.stage:not([data-mode="youtube"]) .stage-yt { visibility: hidden; }

/* Fallback states with a still: the still, with a small paper panel on it */
.fb { position: absolute; inset: 0; }
.fb > .th { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.stage.v .fb > .th.v img { inset: 0; width: 100%; height: 100%; aspect-ratio: auto; transform: none; }
.fb-panel {
  position: absolute; left: var(--s4); bottom: var(--s4); right: var(--s4);
  max-width: 400px;
  padding: var(--s4) var(--s5) var(--s5);
  background: rgba(10, 10, 10, .9); color: var(--ink); border-radius: var(--r);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.fb-panel h3 { font: 600 28px/32px var(--serif); text-transform: uppercase; }
.fb-panel p { margin-top: var(--s1); font: 400 15px/22px var(--sans); color: var(--ink-2); }
.fb-panel .btn { margin-top: var(--s4); }
@media (min-width: 560px) { .s-note.fbp { display: none; } }
@media (max-width: 559px) {
  .fb-panel { left: var(--s3); right: auto; bottom: var(--s3); padding: var(--s3) var(--s4) var(--s4); }
  .fb-panel h3 { font-size: 22px; line-height: 28px; }
  .fb-panel p { display: none; }
  .fb-panel .btn { margin-top: var(--s3); }
  .stage.v .fb-panel { bottom: var(--s3); }
}
/* No still and no video (Instagram, offline): a compact band, not an empty 16:9 plate */
.stage.band, .stage.v.band { aspect-ratio: auto; background: var(--paper-2); }
@media (min-width: 768px) { .stage.v.band { width: var(--col-w); } }
.stage.band .stage-x { position: static; }
.stage.band .fb { position: static; display: flex; align-items: center; min-height: 200px; padding: var(--s6) var(--margin); }
.stage.band .fb-panel { position: static; max-width: 48ch; padding: 0; background: none; }
.stage.band .fb-panel h3 { font-size: 32px; line-height: 40px; }
.stage.band .fb-panel p { display: block; font-size: 16px; line-height: 24px; }
.stage.band ~ .s-note.fbp { display: none; }
@media (min-width: 768px) { .stage.band .fb { min-height: 240px; padding: var(--s7); } }

.stage-spin {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 1.5px solid rgba(255, 255, 255, .25); border-top-color: var(--on-ink); border-radius: 50%;
  pointer-events: none;
}
.stage-spin[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .stage-spin { animation: spin .9s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }

.s-note {
  width: var(--col-w); max-width: 100%; margin: var(--s3) auto 0;
  font: 400 14px/20px var(--sans); color: var(--ink-2);
  padding-inline: var(--margin);
}
.s-note button, .s-note a { font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.s-note button:hover, .s-note a:hover { color: var(--accent); }
@media (min-width: 768px) { .s-note { padding-inline: 0; } }

/* Credits: aligned to the stage's 16:9 column */
.cr {
  width: var(--col-w); max-width: 100%; margin: var(--s6) auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--s6);
  padding-inline: var(--margin);
}
@media (min-width: 768px) { .cr { padding-inline: 0; margin-top: var(--s7); } }
.cr-title {
  font: 600 clamp(40px, 5.6vw, 72px)/.95 var(--serif); text-transform: uppercase;
  letter-spacing: .005em; overflow-wrap: break-word; text-wrap: balance;
}
.cr-artists { margin-top: var(--s3); font: 400 20px/28px var(--sans); color: var(--ink); }
.cr-artists button {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--ink-3);
  transition: color .15s, text-decoration-color .15s;
}
.cr-artists button:hover { color: var(--accent); text-decoration-color: currentColor; }
.cr-artists .sep { color: var(--ink-3); }
.cr-artists .muted { color: var(--ink-2); }
.cr-desc { margin-top: var(--s5); font: 400 17px/28px var(--sans); color: var(--ink-2); max-width: 60ch; overflow-wrap: break-word; }
.cr-links { margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.cr-links .link { min-height: 44px; display: inline-flex; align-items: center; }
.stage[data-mode="fallback"] ~ .cr .cr-watch { display: none; }
.cr-quote { margin-top: var(--s6); max-width: 48ch; }
.cr-quote p { font: 400 20px/30px var(--sans); color: var(--ink); }
.cr-quote footer { margin-top: var(--s2); font: 400 14px/20px var(--sans); color: var(--ink-2); }
.cr-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s4); align-content: start; }
.cr-dl div { min-width: 0; }
.cr-dl dt { font: 500 12px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cr-dl dd { margin-top: var(--s1); font: 400 15px/24px var(--sans); color: var(--ink); overflow-wrap: break-word; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) {
  .cr { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .cr-main { grid-column: 1 / 8; }
  .cr-dl { grid-column: 9 / -1; padding-top: var(--s3); }
}

.s-adj {
  width: var(--col-w); max-width: 100%; margin: var(--s8) auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter);
  padding-inline: var(--margin);
}
@media (min-width: 768px) { .s-adj { padding-inline: 0; } }
.s-adj button {
  display: block; align-self: start; min-width: 0; text-align: left;
  padding-top: var(--s4); border-top: 1px solid var(--rule);
}
.s-adj button.next { grid-column: 2; text-align: right; }
.s-adj .label { display: block; }
.s-adj .t { display: block; margin-top: var(--s1); font: 500 24px/28px var(--serif); overflow-wrap: break-word; transition: color .15s; }
.s-adj .a { display: block; font: 400 14px/20px var(--sans); color: var(--ink-2); }
.s-adj button:hover .t { color: var(--accent); }
@media (min-width: 768px) { .s-adj .t { font-size: 32px; line-height: 40px; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
