:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1b18;
  --muted: #6b665e;
  --line: #e4e0d8;
  --link: #1f5fa8;
  --sbd: #c0392b;
  --sbd-bg: #fdf0ee;
  --sbd-text: #ffffff;
  --partial: #8a5a00;
  --partial-bg: #fff4dc;
  --portion: #375a7f;
  --portion-bg: #e9f0f8;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --surface: #1d1c19;
    --text: #ece8e1;
    --muted: #a39d93;
    --line: #34312c;
    --link: #8cb8ee;
    --sbd: #e5675a;
    --sbd-bg: #2c1a17;
    --sbd-text: #1a0f0d;
    --partial: #f0c36a;
    --partial-bg: #2e2412;
    --portion: #a9c6e8;
    --portion-bg: #1b2533;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* The side gutters grow from 16px on phones to 48px on desktops, and the
   content fills the space between them up to 1800px. */
.site-header, main, .site-footer {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.site-title { color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 18px; font-size: 15px; }

.page-head { padding: 28px 0 8px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
h1 { margin: 2px 0 4px; font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; }
.meta { margin: 0; color: var(--muted); }
h1 .meta { font-size: 16px; font-weight: 400; letter-spacing: normal; }
.day-nav { display: flex; justify-content: space-between; margin-top: 14px; font-size: 15px; }

.show { padding: 22px 0 6px; border-top: 1px solid var(--line); margin-top: 18px; }
.show h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.show h2 .anchor { color: var(--text); }
.where { margin: 2px 0 12px; color: var(--muted); }
.sep { margin: 0 6px; }

.recordings { list-style: none; margin: 0; padding: 0; }
.rec { margin: 0 0 6px; }
.rec > a {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.rec > a:hover { text-decoration: none; border-color: var(--muted); }
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.time { font-variant-numeric: tabular-nums; font-size: 14px; }
.flag { font-size: 13px; padding: 1px 6px; border-radius: 4px; }
.partial { color: var(--partial); background: var(--partial-bg); }
.portion { color: var(--portion); background: var(--portion-bg); text-transform: capitalize; }
/* The identifier sits at the right end of the row when the row has room
   and wraps to its own line otherwise. */
.ident {
  margin-left: auto;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Soundboards alone get the filled badge and colored edge, so a reader
   scanning a page can spot them without reading. */
.rec-sbd > a { border-left-color: var(--sbd); background: var(--sbd-bg); }
.rec-sbd .badge { background: var(--sbd); border-color: var(--sbd); color: var(--sbd-text); }

.empty { color: var(--muted); padding: 24px 0; }

.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 28px; }
.month h2 { font-size: 17px; margin: 18px 0 8px; }
.day-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
.day-grid a:hover { text-decoration: none; border-color: var(--muted); }
.day-grid a.today { border-color: var(--sbd); }
.day-grid .num { font-size: 14px; font-weight: 600; }
.day-grid .count { font-size: 11px; color: var(--muted); }

.letters { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; font-weight: 600; }
.venue-group h2 { font-size: 18px; margin: 24px 0 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.venue-list { list-style: none; margin: 0; padding: 0; columns: 360px 3; column-gap: 32px; }
.venue-list li { padding: 3px 0; break-inside: avoid; }
.venue-meta { color: var(--muted); font-size: 14px; }

.site-footer { margin-top: 40px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.version code { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 720px) {
  .ident { flex-basis: 100%; margin-left: 0; }
}

@media (max-width: 520px) {
  h1 { font-size: 28px; }
  .show h2 { font-size: 18px; }
}

/* God Bless the Tapers: band breadcrumb in the header, one-line shows on
   the combined pages, and the bands list. */
.site-title a { color: var(--text); }
.crumb { margin: 0 8px; color: var(--muted); font-weight: 400; }

.show-lines { list-style: none; margin: 12px 0 0; padding: 0; }
.show-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 0 0 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}
.when { font-weight: 700; font-variant-numeric: tabular-nums; }
.show-line .band { font-weight: 600; color: var(--text); }
.line-where { color: var(--muted); }
.play { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--text); }
.play:hover { text-decoration: none; }
.play:hover .badge { border-color: var(--text); }
.more { margin-left: auto; font-size: 14px; white-space: nowrap; }

/* The play link stretches over the whole line, so a tap anywhere on the
   line that misses another link plays the top recording on archive.org.
   The band, venue, and more links sit above the stretched area. */
.show-line .play::after { content: ""; position: absolute; inset: 0; }
.show-line .band, .show-line .line-where a, .show-line .more { position: relative; z-index: 1; }

/* A show whose top recording is a soundboard gets the same edge and
   filled badge as a soundboard row on a band's own pages. */
.show-line-sbd { border-left-color: var(--sbd); background: var(--sbd-bg); }
.show-line-sbd .badge { background: var(--sbd); border-color: var(--sbd); color: var(--sbd-text); }

.band-list { list-style: none; margin: 16px 0 0; padding: 0; }
.band-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.band-name { font-size: 20px; font-weight: 600; }
.band-meta { display: block; color: var(--muted); font-size: 14px; }

/* Combined day pages: one heading per year above that year's shows. */
.year-group { margin-top: 22px; }
.year-heading { margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 22px; font-variant-numeric: tabular-nums; }
.year-heading .meta { font-size: 15px; font-weight: 400; }
.year-group .show-lines { margin-top: 0; }
