* {
  box-sizing: border-box;
}

:root {
  --bg: #02060b;
  --panel: rgba(4, 15, 25, 0.82);
  --panel-strong: rgba(6, 20, 34, 0.92);
  --line: rgba(73, 164, 219, 0.24);
  --line-soft: rgba(255, 255, 255, 0.11);
  --text: #f5f8fb;
  --muted: #95a7b7;
  --cyan: #3bc7ff;
  --blue: #168de2;
  --orange: #ff6418;
  --orange-soft: rgba(255, 100, 24, 0.22);
  --page-surface: linear-gradient(180deg, rgba(6, 20, 34, 0.82), rgba(2, 6, 11, 0.74));
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(2, 6, 11, 0.96), rgba(2, 6, 11, 0.98)),
    #02060b;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.topbar,
.portal-shell,
.portal-footer,
.playlist-shell,
.site-footer {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 24px 0 12px;
}

.wordmark {
  display: grid;
  gap: 2px;
  text-decoration: none;
  min-width: 170px;
}

.wordmark-main {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.wordmark-sub {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.topbar-gm {
  width: 84px;
  height: 44px;
  object-fit: cover;
  border-left: 1px solid var(--line-soft);
  padding-left: 18px;
  opacity: 0.95;
}

.topnav {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  align-items: center;
  min-width: 0;
}

.topnav a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
  white-space: nowrap;
}

.topnav a.active,
.topnav a:hover {
  color: var(--orange);
}

.topnav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  background: var(--orange);
}

.library-button,
.primary-action,
.secondary-action,
.small-button,
.archive-link {
  text-decoration: none;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.library-button {
  padding: 0 20px;
  border: 1px solid var(--orange);
  background: var(--orange-soft);
  color: #fff3ec;
  font-weight: 700;
  font-size: 0.88rem;
}

.portal-shell {
  padding: 0 0 28px;
}

.hero-panel {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(59, 199, 255, 0.12);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 11, 1) 0%, rgba(2, 6, 11, 0.92) 28%, rgba(2, 6, 11, 0.2) 70%, rgba(2, 6, 11, 0.88) 100%),
    linear-gradient(180deg, rgba(2, 6, 11, 0) 72%, rgba(2, 6, 11, 1) 100%);
  pointer-events: none;
}

.hero-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: 76%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.92;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 42px 0;
}

.hero-copy h1 {
  margin: 0;
  display: grid;
  gap: 2px;
  font-size: 4.35rem;
  line-height: 0.95;
  font-weight: 900;
}

.hero-copy h1 span:nth-child(1),
.hero-copy h1 span:nth-child(3) {
  color: #8addff;
}

.hero-copy h1 span:nth-child(2) {
  color: var(--orange);
}

.hero-copy p {
  width: min(410px, 100%);
  margin: 22px 0 0;
  color: #d7e1e8;
  font-size: 1.08rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.primary-action,
.secondary-action {
  padding: 0 20px;
  font-weight: 750;
  font-size: 0.94rem;
}

.primary-action {
  background: linear-gradient(180deg, #ff7b23, #d93d0a);
  border: 1px solid #ff8c3a;
  box-shadow: 0 0 22px rgba(255, 100, 24, 0.34);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.portal-section {
  border-top: 1px solid var(--line);
  padding: 18px 28px 26px;
  background: var(--page-surface);
}

.section-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  color: #dce8f1;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.section-title span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange));
}

.section-title span:last-child {
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.album-card {
  display: grid;
  grid-template-rows: auto minmax(118px, auto);
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  border-radius: 8px;
}

.album-card:hover,
.album-card:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.album-card-captain-white:hover,
.album-card-captain-white:focus-visible {
  border-color: var(--blue);
}

.album-card-ai-psychosis:hover,
.album-card-ai-psychosis:focus-visible {
  border-color: #f53919;
}

.album-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--page-surface);
}

.album-card-captain-white .album-cover {
  object-fit: contain;
}

.album-meta {
  display: grid;
  gap: 8px;
  padding: 16px;
  align-content: start;
}

.album-title {
  color: #7cdcff;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.2;
}

.album-counts {
  color: #d7e1e8;
  font-size: 0.88rem;
  line-height: 1.4;
}

.album-status {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 560;
  line-height: 1.35;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.section-kicker {
  margin: 0;
  color: #f2f7fb;
  text-transform: uppercase;
  font-size: 0.88rem;
  font-weight: 800;
}

.section-subtitle,
.archive-copy,
.library-note {
  margin: 2px 0 0;
  color: var(--cyan);
  font-size: 0.92rem;
  line-height: 1.35;
}

.library-count {
  color: var(--cyan);
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
}

.small-button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.library-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  border: 1px solid rgba(59, 199, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(2, 9, 16, 0.72);
}

.library-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 34px 32px minmax(150px, 1fr) 94px 58px 138px 56px 56px;
  gap: 12px;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.library-row:last-child {
  border-bottom: 0;
}

.library-index,
.library-duration {
  color: #a8b7c4;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.library-play {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(59, 199, 255, 0.2);
  color: #bdefff;
  font-size: 0.58rem;
}

.library-title {
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-origin {
  justify-self: start;
  color: var(--cyan);
  border: 1px solid rgba(59, 199, 255, 0.3);
  background: rgba(59, 199, 255, 0.08);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.library-wave {
  height: 18px;
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(216, 229, 238, 0.7) 6px 8px, transparent 8px 12px);
  opacity: 0.65;
}

.library-icon {
  color: #c5d1da;
  text-decoration: none;
  font-size: 0.76rem;
}

.library-note {
  color: #8796a2;
  margin: 12px 0 0;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.archive-card {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 9, 16, 0.72);
  text-decoration: none;
}

.archive-card:hover,
.archive-card:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.archive-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cyan);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
}

.archive-term .archive-icon,
.archive-json .archive-icon {
  border-color: var(--orange);
  color: var(--orange);
}

.archive-title {
  font-size: 1rem;
  font-weight: 800;
}

.archive-desc {
  color: #b9c8d2;
  font-size: 0.86rem;
  line-height: 1.35;
}

.archive-link {
  justify-content: flex-start;
  min-height: 0;
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 800;
}

.archive-term .archive-link,
.archive-json .archive-link {
  color: var(--orange);
}

.about-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(3, 20, 34, 0.86), rgba(2, 6, 11, 0.78)),
    radial-gradient(circle at left center, rgba(59, 199, 255, 0.14), transparent 260px);
}

.about-mark {
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 100, 24, 0.35);
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 4rem;
  font-weight: 900;
  background:
    radial-gradient(circle, rgba(255, 100, 24, 0.22), rgba(255, 100, 24, 0.02) 58%, transparent 60%),
    rgba(0, 0, 0, 0.38);
}

.about-copy p {
  margin: 8px 0 0;
  color: #d4e0e8;
  line-height: 1.55;
}

.about-principles {
  display: grid;
  gap: 16px;
}

.about-principles p {
  margin: 0;
  display: grid;
  gap: 2px;
  color: var(--cyan);
  font-weight: 800;
}

.about-principles span {
  color: #b8c7d1;
  font-weight: 450;
}

.portal-footer {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0 34px;
  color: #a9b7c2;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-gm {
  width: 96px;
  height: 48px;
  object-fit: cover;
}

.footer-owned,
.footer-social,
.portal-footer p {
  font-size: 0.82rem;
}

.portal-footer p {
  justify-self: end;
  margin: 0;
}

.landing-shell,
.brand-header {
  display: none;
}

/* Playlist pages */
.playlist-shell {
  padding: 24px 0 64px;
}

.playlist-header {
  display: grid;
  gap: 24px;
  padding: 0 0 22px;
}

.logo-link {
  display: inline-block;
  justify-self: center;
  text-decoration: none;
}

.site-logo {
  display: block;
  width: 440px;
  max-width: 82vw;
  height: auto;
}

.site-logo.small {
  width: 300px;
  max-width: 70vw;
  margin: 0 auto;
}

.playlist-identity {
  display: grid;
  grid-template-columns: minmax(176px, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: end;
}

.playlist-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--page-surface);
}

.album-captain-white .playlist-cover {
  object-fit: contain;
}

.playlist-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 3.8rem;
  line-height: 1;
  letter-spacing: 0;
}

.playlist-subtitle {
  margin: 12px 0 0;
  color: #d7e1e8;
  font-size: 1.12rem;
  line-height: 1.35;
}

.status-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tracklist {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}

.track {
  background: rgba(247, 243, 235, 0.05);
  border: 1px solid rgba(247, 243, 235, 0.1);
  border-radius: 8px;
  padding: 12px;
}

.track-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.track-num {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: right;
  padding-top: 2px;
}

.track-title {
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.track-origin,
.track-provenance {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 450;
  line-height: 1.35;
}

.track-origin {
  text-transform: uppercase;
}

.track-provenance summary {
  cursor: pointer;
  display: inline-flex;
  width: fit-content;
  color: var(--cyan);
}

.track-provenance p {
  margin: 5px 0 0;
  max-width: 68ch;
}

.lyric-toggle {
  min-width: 40px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(247, 243, 235, 0.07);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.lyric-toggle:hover:not(:disabled),
.lyric-toggle[aria-expanded="true"] {
  background: rgba(59, 199, 255, 0.14);
  border-color: var(--cyan);
}

.lyric-toggle:disabled {
  opacity: 0.3;
  cursor: default;
}

audio {
  width: 100%;
  display: block;
  margin-top: 10px;
}

.missing-audio {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.lyrics {
  display: none;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 54vh;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.34);
  color: #eee6da;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
}

.lyrics.open {
  display: block;
}

.held-section {
  margin-top: 34px;
}

.held-section h2 {
  margin: 0;
  color: #d7e1e8;
  font-size: 1.1rem;
}

.site-footer {
  padding: 24px 0 48px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.82rem;
}

.gm-logo {
  display: block;
  width: 170px;
  height: auto;
  margin-bottom: 10px;
  opacity: 0.72;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: auto auto;
  }

  .topnav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .library-button {
    justify-self: end;
  }

  .hero-copy h1 {
    font-size: 3.55rem;
  }

  .library-row {
    grid-template-columns: 34px 32px minmax(150px, 1fr) 84px 52px;
  }

  .library-wave,
  .library-icon {
    display: none;
  }

  .archive-grid,
  .about-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-mark {
    display: none;
  }

  .portal-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-footer p {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .topbar,
  .portal-shell,
  .portal-footer,
  .playlist-shell,
  .site-footer {
    width: min(100% - 24px, 1240px);
  }

  .topbar {
    gap: 14px;
    padding-top: 18px;
  }

  .topbar-gm {
    display: none;
  }

  .topnav {
    gap: 14px;
  }

  .library-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hero-panel {
    min-height: auto;
    padding-top: 24px;
  }

  .hero-art {
    width: 100%;
    opacity: 0.56;
  }

  .hero-panel::after {
    background:
      linear-gradient(90deg, rgba(2, 6, 11, 0.96), rgba(2, 6, 11, 0.44)),
      linear-gradient(180deg, rgba(2, 6, 11, 0) 70%, rgba(2, 6, 11, 1) 100%);
  }

  .hero-copy {
    padding: 32px 0 42px;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .album-grid,
  .archive-grid,
  .about-panel {
    grid-template-columns: 1fr;
  }

  .portal-section,
  .about-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-header {
    grid-template-columns: 1fr;
  }

  .library-row {
    grid-template-columns: 34px 28px minmax(0, 1fr);
    min-height: auto;
    padding: 10px 12px;
  }

  .library-origin,
  .library-duration {
    grid-column: 3;
  }

  .playlist-identity {
    grid-template-columns: 1fr;
  }

  .playlist-cover {
    max-width: 320px;
  }

  h1 {
    font-size: 2.8rem;
  }

  .track-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .lyric-toggle {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .wordmark-main {
    font-size: 1.55rem;
  }

  .wordmark-sub {
    font-size: 0.64rem;
  }

  .topnav a {
    font-size: 0.84rem;
  }

  .hero-copy h1 {
    font-size: 2.35rem;
  }

  .hero-copy p,
  .playlist-subtitle {
    font-size: 1rem;
  }

  .portal-footer {
    grid-template-columns: 1fr;
  }
}
