:root {
  --paper: #fafafa;
  --ink: #0a0a0a;
  --rule: #111111;
  --muted: #9a9a9a;
  --black: #000000;
  --cover-bg: #e4e5e2;
  --font-sans: 'Arimo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-mono: 'Roboto Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { margin: 0; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: transparent; border: none; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

.column { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 30px; }
.mono { font-family: var(--font-mono); font-weight: 400; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Opening ─────────────────────────────── */
.opening { padding-top: 100px; }
.bio-lead { margin: 0; max-width: 820px; font-size: 30px; line-height: 35px; font-weight: 500; }
.bio-lead em { font-family: var(--font-serif); font-weight: 400; font-size: 0.92em; }
.tally { margin-top: 14px; font-size: 12px; line-height: 14px; color: var(--muted); }
.index-nav { margin-top: 30px; display: flex; flex-direction: column; align-items: flex-start; }
.index-link { display: inline-flex; align-items: center; font-size: 24px; line-height: 28px; }
.index-link .bullet { width: 5px; height: 5px; background: var(--ink); margin-right: 10px; flex-shrink: 0; }
.link-text { position: relative; }
.link-text::after {
  content: ''; position: absolute; left: -2px; right: -4px; bottom: -4px; height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 7' preserveAspectRatio='none'%3E%3Cpath d='M1 4.2 C 14 2.1, 27 5.6, 41 3.6 S 70 2.2, 86 4.4 S 108 3.1, 119 2.4' fill='none' stroke='%230a0a0a' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0); transition: clip-path 260ms ease-out;
}
.index-link:hover .link-text::after, .index-link:focus-visible .link-text::after { clip-path: inset(0 0 0 0); }

/* ── Hand-drawn bands ────────────────────── */
.ink-band { width: 100%; position: relative; color: var(--ink); }
.ink-band svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ink-band--opening { margin-top: 26px; height: 190px; }
.ink-band--mid { margin-top: 90px; height: 110px; }
.ink-stroke { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.ink-label { font-family: var(--font-mono); font-size: 10px; fill: currentColor; }
.draw-in { transition: stroke-dashoffset 1800ms cubic-bezier(0.45, 0, 0.2, 1); }
.rough { filter: url(#rough); }

/* ── Section labels ──────────────────────── */
.section { margin-top: 100px; scroll-margin-top: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.section-label { margin: 0; font-size: 24px; line-height: 28px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.section-note { font-size: 12px; line-height: 14px; color: var(--muted); }
.arrow-down-icon { width: 0.8em; height: 0.95em; overflow: visible; }

/* ── Selected releases (ledger) ──────────── */
.ledger { margin-top: 30px; position: relative; border-right: 1px solid var(--rule); }
.ledger-head, .ledger-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 2.3fr) minmax(0, 1.3fr) 64px minmax(0, 1.3fr) 104px;
  font-size: 14px; line-height: 17px; position: relative;
}
.ledger-head { height: 30px; border-bottom: 1px solid var(--rule); }
.ledger-row { padding: 8px 0 9px; border-bottom: 1px solid var(--rule); }
.ledger-row > div { padding-right: 12px; }
.ledger-head > div { padding-right: 12px; }
.ledger-row.reveal { opacity: 0; transition: opacity 250ms ease-out; }
.ledger-row.reveal.is-visible { opacity: 1; }

.cell-release { display: flex; gap: 15px; align-items: flex-start; }
.cover-wrap { width: 101px; height: 101px; flex-shrink: 0; background: var(--cover-bg); overflow: hidden; }
.cover-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease-out; }
.cover-wrap:hover img { transform: scale(1.03); }
.cover-ph {
  width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between;
  padding: 7px; font-family: var(--font-mono); font-size: 9px; line-height: 11px; color: #555;
  background: transparent; position: relative;
}
.cover-wrap.is-ph { background: transparent; overflow: visible; }
.cover-ph svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: #8a8a8a; }
.cover-ph span { position: relative; background: var(--paper); align-self: flex-start; padding: 0 2px; }
.release-title { display: block; }
.release-sub { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; line-height: 13px; color: var(--muted); }
.cell-credit { font-family: var(--font-mono); font-size: 12px; line-height: 15px; }
.yr-sup { font-size: 10px; vertical-align: super; margin-left: 3px; }
.cell-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.action-open { display: inline-flex; align-items: center; }
.arrow-ne { display: inline-block; margin-left: 3px; transition: transform 150ms ease-out; }
.action-open:hover .arrow-ne, .action-open:focus-visible .arrow-ne { transform: translate(2px, -2px); }
.action-open .link-text::after { bottom: -5px; }
.action-open:hover .link-text::after, .action-open:focus-visible .link-text::after { clip-path: inset(0 0 0 0); }

/* ── Live videos ─────────────────────────── */
.video-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.video-frame {
  position: relative; width: 100%; height: 0; padding-top: 56.25%; background: var(--black); overflow: hidden;
}
.video-frame img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.05); transition: filter 220ms ease-out; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: flex-start; padding: 10px; }
.video-play:hover img, .video-play:focus-visible img { filter: none; }
.btn-deck {
  position: relative; z-index: 1; display: inline-flex; align-items: center; height: 22px; padding: 1px 6px;
  font-size: 14px; line-height: 17px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  transition: background-color 120ms linear, color 120ms linear;
}
.video-play:hover .btn-deck, .video-play:focus-visible .btn-deck { background: var(--ink); color: var(--paper); border-color: var(--paper); }
.video-play img { position: absolute; inset: 0; }
.video-caption { margin-top: 10px; padding-top: 6px; font-size: 14px; line-height: 17px; }
.video-caption .release-sub { margin-top: 3px; }

/* ── Discography toolbar (sticky) ────────── */
.toolbar {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  margin-top: 24px; padding-top: 14px; border-bottom: 1px solid var(--rule);
}
.search-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.search-row label { font-size: 24px; line-height: 28px; flex-shrink: 0; }
.search-input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0;
  font-size: 24px; line-height: 28px; font-weight: 500; outline: none;
}
.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button { display: none; }
.kbd { font-family: var(--font-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--muted); padding: 0 4px; }
.clear-btn { font-size: 14px; }
.clear-btn[hidden] { display: none; }

.filter-row { display: flex; align-items: center; gap: 18px; padding: 10px 0; flex-wrap: wrap; }
.tabs, .pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; height: 24px; padding: 1px 8px; font-size: 14px; line-height: 17px;
  border: 1px solid var(--ink); transition: background-color 120ms linear, color 120ms linear;
}
.tab sup { font-family: var(--font-mono); font-size: 9px; margin-left: 4px; }
.tab[aria-pressed="true"], .tab:hover { background: var(--ink); color: var(--paper); }
.filter-label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font-family: var(--font-mono);
  font-size: 11px; border: 1px solid var(--muted); color: #444; transition: all 120ms linear;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.role-select { display: none; }
.sort-wrap { margin-left: auto; display: flex; align-items: center; gap: 6px; }
select.mono-select {
  font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--ink); background: var(--paper);
  height: 22px; padding: 0 4px; border-radius: 0;
}
.status-row { display: flex; justify-content: space-between; padding: 0 0 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ── Discography list ────────────────────── */
.disc-head, .disc-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.25fr) minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  font-family: var(--font-mono); font-size: 12px; line-height: 15px;
}
.disc-head { padding: 8px 0 6px; color: var(--muted); font-size: 11px; }
.disc-head > div, .disc-row > div { padding-right: 12px; }
.year-group { border-top: 1px solid var(--rule); padding-top: 3px; }
.year-label { font-family: var(--font-sans); font-size: 12px; line-height: 14px; margin: 0 0 10px; }
.disc-rows { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; }
.disc-row { color: var(--ink); transition: color 200ms ease; }
.disc-rows:hover .disc-row:not(:hover) { color: var(--muted); }
.disc-row .d-title { font-family: var(--font-sans); font-size: 14px; line-height: 17px; }
.disc-row .d-artist { font-family: var(--font-sans); font-size: 14px; line-height: 17px; }
.d-meta { display: block; margin-top: 3px; color: var(--muted); }
.link-list { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.link-list a { border-bottom: 1px solid transparent; }
.link-list a:hover, .link-list a:focus-visible { border-bottom-color: currentColor; }
.none { color: var(--muted); }
.d-label-m { display: none; }
mark { background: var(--ink); color: var(--paper); padding: 0 1px; }
.empty { padding: 40px 0; font-size: 14px; }
.empty button { border-bottom: 1px solid var(--ink); }

/* ── Bio ─────────────────────────────────── */
.bio-body { width: 55%; margin-top: 14px; font-size: 13px; line-height: 17px; }
.bio-body p { margin: 0 0 12px; }
.bio-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* ── Footer ──────────────────────────────── */
.site-footer { margin-top: 100px; background: var(--black); color: var(--paper); padding: 11px 0 14px; }
.footer-mark-row { display: flex; align-items: center; justify-content: space-between; height: 41px; }
.footer-mark { font-size: 25px; line-height: 29px; }
.footer-rule { height: 1px; background: #333; }
.footer-links-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 6px 0; font-family: var(--font-mono); font-size: 11px; line-height: 17px; }
.footer-links-row a:hover, .footer-mark-row a:hover { text-decoration: underline; }
.footer-copy { margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 900px) {
  .column { padding: 0 20px; }
  .opening { padding-top: 60px; }
  .bio-lead { font-size: 24px; line-height: 29px; }
  .index-link { font-size: 20px; line-height: 24px; }
  .ink-band--opening { height: 150px; }
  .ink-band--mid { height: 80px; margin-top: 70px; }

  .ledger-head { display: none; }
  .ledger-row { grid-template-columns: 34px 1fr; row-gap: 6px; }
  .ledger-row .cell-num { grid-row: 1 / span 3; }
  .ledger-row .cell-artist, .ledger-row .cell-year { display: none; }
  .ledger-row .cell-credit { grid-column: 2; padding-left: 77px; }
  .ledger-row .cell-actions { grid-column: 2; padding-left: 77px; flex-direction: row; gap: 14px; }
  .cover-wrap { width: 65px; height: 65px; }
  .cell-release { gap: 12px; }

  .video-grid { grid-template-columns: 1fr; gap: 24px; }

  .search-row label, .search-input { font-size: 20px; line-height: 24px; }
  .kbd { display: none; }
  .pills { display: none; }
  .role-select { display: inline-block; }
  .filter-row { gap: 10px; }
  .sort-wrap { margin-left: 0; }

  .disc-head { display: none; }
  .disc-row { grid-template-columns: 1fr; gap: 4px; }
  .disc-row > div { padding-right: 0; }
  .disc-row .d-year { display: none; }
  .disc-row .d-credit::before { content: 'Credit — '; color: var(--muted); }
  .link-list { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .disc-row .d-press:not(:empty)::before { content: 'Press — '; color: var(--muted); margin-right: 4px; }
  .disc-row .d-press { display: flex; flex-wrap: wrap; }
  .disc-rows:hover .disc-row:not(:hover) { color: var(--ink); }
  .bio-body { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .ledger-row.reveal { opacity: 1 !important; }
}

/* ── Load error (credits.json missing) ───── */
.load-error { padding: 40px 0; font-size: 14px; line-height: 17px; }
.load-error p { margin: 0 0 8px; }
.load-error-hint { font-size: 12px; line-height: 15px; color: #555; }
.load-error code { font-family: var(--font-mono); background: var(--ink); color: var(--paper); padding: 0 3px; }
