/* ═══════════════════════════════════════════════════════
   Global Charts — stylesheet
   ═══════════════════════════════════════════════════════ */

main {
  padding-top: 18px;
}

.gc-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;
}

/* ── Hero ── */
.gc-hero {
  margin-bottom: 24px;
}

.gc-hero-copy {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  padding: 30px;
  text-align: center;
}

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

.gc-hero h1 {
  margin: 8px auto 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.gc-subtitle {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 58ch;
  margin-inline: auto;
}

/* ── Sections ── */
.gc-section {
  margin-bottom: 28px;
}

.gc-section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.gc-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  color: var(--heading);
}

.gc-section-count {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ── Table shell ── */
.gc-table-shell {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  overflow: hidden;
}

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

/* ── Search ── */
.gc-search {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
}

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

.gc-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;
}

.gc-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);
}

/* ── Sort buttons ── */
.gc-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  white-space: nowrap;
}

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

.gc-sort-arrow {
  font-size: 0.65rem;
  opacity: 0.5;
}

.gc-sort.is-active .gc-sort-arrow {
  opacity: 1;
}

/* ── Table ── */
.gc-table-wrap {
  overflow-x: auto;
}

.gc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.gc-table thead th {
  padding: 14px 20px;
  text-align: left;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.gc-table thead th:first-child { padding-left: 28px; }
.gc-table thead th:last-child  { padding-right: 28px; }

.gc-table tbody td {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.gc-table tbody td:first-child { padding-left: 28px; }
.gc-table tbody td:last-child  { padding-right: 28px; }

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

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

.gc-song-cell {
  min-width: 200px;
}

.gc-song-title {
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1.3;
}

.gc-song-artist {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-top: 3px;
}

.gc-num-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.gc-date-cell {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.gc-na {
  color: var(--text-dim);
  opacity: 0.5;
}

.gc-results-info {
  padding: 12px 28px 18px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

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

/* ── IFPI feature card ── */
.gc-ifpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  background: var(--border);
}

.gc-ifpi-stat {
  background: rgba(255, 255, 255, 0.96);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.gc-ifpi-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  color: var(--heading);
  line-height: 1.1;
}

.gc-ifpi-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.gc-note {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.82rem;
  padding: 0 4px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .gc-page { padding: 16px; }

  .gc-hero-copy { padding: 24px 18px; }

  .gc-section {
    margin-bottom: 20px;
  }

  .gc-section-heading {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .gc-table-header { padding: 18px 18px 14px; }

  .gc-search {
    width: 100%;
  }

  .gc-table {
    min-width: 680px;
  }

  .gc-table thead th,
  .gc-table tbody td {
    padding-left: 14px;
    padding-right: 14px;
  }

  .gc-table thead th:first-child,
  .gc-table tbody td:first-child { padding-left: 18px; }

  .gc-table thead th:last-child,
  .gc-table tbody td:last-child  { padding-right: 18px; }

  .gc-results-info { padding-left: 18px; }
}

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

.gc-page {
  border-radius: 12px;
}

.gc-hero-copy,
.gc-table-shell {
  border-radius: 10px;
}

.gc-hero h1,
.gc-section-title {
  font-family: var(--font-heading);
}

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

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

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

.gc-ifpi-grid {
  border-radius: 10px;
  background: var(--border);
}

.gc-ifpi-stat {
  background: var(--surface-strong);
}
