
:root {
  --paper: #f4f0e8;
  --ink: #161616;
  --muted: #676158;
  --line: #d5ccbf;
  --accent: #b53427;
  --accent-dark: #70221c;
  --panel: #fffaf0;
  --surface: #fffdf7;
  --track-accent: #2c7770;
  --ui-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #151515 url("../files/viz/backtop6.jpg") top center fixed;
  font: 16px/1.55 var(--ui-font);
}

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

.primary-nav a,
.music-stat,
.music-search input,
.music-filter,
.track-load,
.music-artist-select select,
.mixtape-track,
.mixtape-empty,
.audio-panel {
  background: var(--surface);
  border: 1px solid var(--line);
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  background: rgba(244, 240, 232, 0.96);
  border-bottom: 1px solid var(--line);
  font-family: var(--ui-font);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 6px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 220px;
  height: auto;
}

.brand em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  font-style: normal;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: block;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a[aria-current="page"] {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

main.wrap {
  margin-top: 20px;
  margin-bottom: 28px;
  padding: 24px;
  background: rgba(244, 240, 232, 0.96);
  border: 1px solid var(--line);
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 16px;
}

h1 { font-size: 36px; }
h2 { font-size: 24px; }

.meta, .lede, .missing-media, .media-note, .related {
  color: var(--muted);
}

.content {
  max-width: 78ch;
}

.content img {
  max-width: 100%;
  height: auto;
}

.listing {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.list-section + .list-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cards.compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.music-page.has-player {
  padding-bottom: 82px;
}

.music-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.music-hero p {
  margin: 0;
}

.music-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.music-stat {
  min-width: 78px;
  padding: 6px 8px;
  color: var(--muted);
  text-align: center;
  line-height: 1.15;
}

.music-stat strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.music-tools {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(170px, 220px);
  gap: 10px;
  align-items: center;
  margin: 0 -24px 18px;
  padding: 10px 24px;
  background: rgba(244, 240, 232, 0.98);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.music-search input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ink);
  font: inherit;
}

.music-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.music-filter,
.track-load {
  min-height: 32px;
  color: var(--accent-dark);
  font: inherit;
  cursor: pointer;
}

.music-filter {
  padding: 5px 9px;
}

.music-filter[aria-pressed="true"] {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.music-artist-select select {
  width: 100%;
  min-height: 36px;
  padding: 7px 30px 7px 10px;
  color: var(--accent-dark);
  font: inherit;
}

.music-results {
  display: grid;
  gap: 7px;
}

.music-results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--muted);
}

.music-results-head h2 {
  margin: 0;
}

.mixtape-track {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border-left: 4px solid var(--track-accent);
}

.mixtape-track:hover {
  border-color: #9c9a6b;
}

.mixtape-track.is-active {
  background: #f9f3df;
  border-color: var(--accent-dark);
  border-left-color: var(--accent-dark);
}

.mixtape-track.is-missing {
  opacity: 0.68;
  border-left-color: var(--muted);
}

.track-load {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--track-accent);
  border-color: var(--track-accent);
  font-weight: 700;
}

.track-load:disabled,
.track-missing-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.track-main {
  min-width: 0;
}

.track-title {
  display: -webkit-box;
  max-width: 100%;
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.track-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.track-side {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}

.track-status {
  color: var(--track-accent);
  font-size: 11px;
  text-transform: uppercase;
}

.track-detail {
  font-size: 12px;
}

.mixtape-track.is-missing .track-status {
  color: var(--muted);
}

.mixtape-empty {
  padding: 22px;
  color: var(--muted);
}

.impulse-page {
  display: grid;
  gap: 22px;
}

.impulse-intro {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.impulse-intro p {
  margin: 0;
}

.impulse-player-mount {
  width: 100%;
  min-height: 720px;
  background: #000;
  border: 1px solid var(--line);
}

.bottom-player {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  padding: 8px 16px;
  background: rgba(22, 22, 22, 0.96);
  border-top: 2px solid var(--track-accent);
  color: #f4f0e8;
}

.bottom-player-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 520px) auto;
  gap: 14px;
  align-items: center;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.bottom-player-title {
  display: block;
  font-size: 16px;
  line-height: 1.15;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bottom-player-meta {
  display: block;
  color: #d5ccbf;
  margin-top: 2px;
  font-size: 14px;
}

.bottom-player audio {
  width: 100%;
}

.bottom-player a {
  color: #f4f0e8;
}

.card {
  min-width: 0;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.card h2 {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.card p {
  margin-bottom: 0;
}

.audio-panel {
  max-width: 760px;
  margin: 0 0 24px;
  padding: 16px;
}

.audio-panel audio {
  width: 100%;
}

.audio-panel dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 12px 0 0;
}

.audio-panel dt {
  color: var(--muted);
}

.audio-panel dd {
  margin: 0;
}

.button {
  display: inline-block;
  padding: 8px 12px;
  color: #fff;
  background: var(--accent-dark);
  text-decoration: none;
}

.site-footer {
  padding: 18px 0 28px;
  color: #f4f0e8;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0;
  }

  .brand img {
    width: 170px;
  }

  .primary-nav ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .primary-nav a {
    padding: 4px 8px;
  }

  main.wrap {
    margin-top: 14px;
    padding: 16px;
  }

  .music-page.has-player {
    padding-bottom: 112px;
  }

  .music-hero,
  .impulse-intro {
    grid-template-columns: 1fr;
  }

  .impulse-intro {
    display: grid;
    align-items: start;
  }

  .impulse-player-mount {
    min-height: 640px;
  }

  .music-stats,
  .music-results-head {
    justify-content: flex-start;
  }

  .music-tools {
    position: static;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-right: -16px;
    margin-bottom: 16px;
    margin-left: -16px;
    padding: 8px 16px;
  }

  .music-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .music-filter {
    flex: 0 0 auto;
  }

  .music-search input,
  .music-artist-select select {
    min-height: 36px;
  }

  .mixtape-track {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .track-side {
    grid-column: 2;
    display: flex;
    gap: 10px;
    align-items: baseline;
    justify-items: start;
    white-space: normal;
  }

  .bottom-player {
    padding: 7px 12px;
  }

  .bottom-player-inner {
    grid-template-columns: minmax(70px, 1fr) minmax(130px, 150px) auto;
    gap: 8px;
  }

  .bottom-player audio {
    height: 30px;
  }

  .bottom-player-title {
    font-size: 15px;
    -webkit-line-clamp: 1;
  }

  .bottom-player-meta {
    font-size: 13px;
  }

  h1 {
    font-size: 30px;
  }
}
