main {
  padding-top: 18px;
}

.dsp-page {
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.dsp-hero {
  display: block;
  margin-bottom: 24px;
}

.dsp-hero-copy,
.dsp-stat-grid,
.dsp-table-shell {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  backdrop-filter: blur(14px);
}

.dsp-hero-copy {
  padding: 30px;
  text-align: center;
}

.dsp-kicker {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}

.dsp-hero h1 {
  margin: 0 auto;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 18ch;
}

.dsp-subtitle {
  margin-top: 14px;
  max-width: 58ch;
  color: var(--text-muted);
}

.dsp-stat-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.dsp-stat-card {
  padding: 26px;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.dsp-stat-label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
}

.dsp-stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.dsp-stat-song { font-size: 1.08rem; line-height: 1.3; }

.dsp-stat-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.dsp-table-shell { overflow: hidden; }

.dsp-table-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border);
}

.dsp-table-header-stack {
  justify-content: space-between;
  flex-wrap: wrap;
}

.dsp-view-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
}

.dsp-view-button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dsp-view-button.is-active {
  background: var(--text);
  color: var(--surface-strong);
}

.dsp-search {
  display: grid;
  gap: 8px;
  width: min(360px, 100%);
}

.dsp-search-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dsp-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font: inherit;
}

.dsp-search input:focus {
  outline: none;
  border-color: rgba(152, 39, 29, 0.22);
  box-shadow: 0 0 0 3px rgba(152, 39, 29, 0.08);
}

.dsp-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.dsp-sort:hover,
.dsp-sort.is-active {
  color: var(--text);
}

.dsp-results-info {
  padding: 14px 28px 20px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.dsp-empty-row {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
}

.dsp-table-wrap { overflow-x: auto; }

.dsp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.dsp-table thead th {
  padding: 16px 28px;
  text-align: left;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
}

.dsp-table tbody td {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.dsp-table tbody tr:hover {
  background: rgba(152, 39, 29, 0.04);
}

.rank-cell {
  width: 72px;
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1.08rem;
}

.song-cell {
  min-width: 260px;
}

.track-entry {
  display: flex;
  align-items: center;
  gap: 14px;
}

.track-cover {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 0;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(92, 64, 39, 0.12);
  background: rgba(255, 255, 255, 0.8);
}

.track-cover-placeholder {
  background: rgba(152, 39, 29, 0.06);
}

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

.track-link {
  color: var(--text);
  font-weight: 700;
}

.track-link:hover { color: var(--accent-strong); }

.album-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.album-toggle::after {
  content: '▾';
  display: inline-block;
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: transform 160ms ease;
}

.album-toggle.is-open::after {
  transform: rotate(180deg);
}

.album-open-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-dim);
}

.album-open-link:hover {
  color: var(--accent-strong);
}

.album-tracklist {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  display: none;
}

.album-tracklist.is-open {
  display: block;
}

.album-tracklist-items {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.album-track-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.album-track-item:first-child {
  border-top: 0;
}

.album-track-copy {
  min-width: 0;
}

.album-track-link {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.album-track-link:hover {
  color: var(--accent-strong);
}

.album-track-artists {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.album-track-streams {
  color: var(--heading);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.album-track-breakdown {
  margin-top: 6px;
}

.album-track-breakdown summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.album-track-breakdown-items {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
}

.album-track-breakdown-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  border-top: 1px solid var(--border);
}

.album-track-breakdown-item:first-child {
  border-top: 0;
}

.track-artists {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.track-meta {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.streams-cell {
  color: var(--heading);
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dsp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
}

.dsp-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  background: var(--surface-muted);
}

.dsp-page-link:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

.dsp-page-link.is-disabled {
  opacity: 0.52;
  pointer-events: none;
}

.dsp-page-indicator,
.dsp-pagination-meta {
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 840px) {
  .dsp-page { padding: 20px; border-radius: 26px; }
  .dsp-hero-copy,
  .dsp-stat-card,
  .dsp-table-header,
  .dsp-table thead th,
  .dsp-table tbody td { padding-left: 18px; padding-right: 18px; }
  .dsp-table-header {
    justify-content: stretch;
  }
  .dsp-table-header-stack {
    align-items: stretch;
  }
  .dsp-view-switch {
    width: 100%;
    justify-content: space-between;
  }
  .dsp-view-button {
    flex: 1 1 0;
  }
  .dsp-search {
    width: 100%;
  }
  .dsp-pagination {
    flex-wrap: wrap;
  }

  .dsp-table {
    min-width: 760px;
  }
}

@media (max-width: 560px) {
  .dsp-page {
    padding: 14px;
    border-radius: 18px;
  }

  .dsp-hero-copy,
  .dsp-stat-card,
  .dsp-table-header,
  .dsp-table thead th,
  .dsp-table tbody td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .dsp-table {
    min-width: 700px;
  }
}

/* Flat black refresh */
.dsp-page,
.dsp-hero-copy,
.dsp-stat-grid,
.dsp-table-shell,
.dsp-stat-card {
  background: var(--surface-strong);
  box-shadow: none;
}

.dsp-page,
.dsp-hero-copy,
.dsp-stat-grid,
.dsp-table-shell {
  border-radius: 12px;
}

.dsp-hero h1,
.dsp-stat-value {
  font-family: var(--font-heading);
}

.dsp-search input {
  background: var(--surface-muted);
}

.dsp-search input:focus {
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.22);
}

.dsp-table tbody tr:hover {
  background: #131313;
}

.track-cover {
  border-radius: 0;
  box-shadow: none;
  background: #151515;
}

.track-cover-placeholder {
  background: #151515;
}
