:root {
  --bg: #f7f4ef;
  --ink: #191714;
  --muted: #6d675f;
  --line: #d8d0c4;
  --panel: #fffdf8;
  --accent: #d84f2a;
  --blue: #2364aa;
  --green: #2f7d56;
  --gold: #b57912;
  --era-pre: #b3b3b3;
  --era-growth: #1db954;
  --era-native: #212121;
  --shadow: 0 18px 45px rgba(42, 35, 27, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px 24px;
  max-width: 1180px;
  margin: 0 auto 56px;
  padding: 24px 24px 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

nav a {
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover,
nav a.nav-active {
  color: white;
}

.hero {
  min-height: 760px;
  color: white;
  background:
    linear-gradient(115deg, rgba(18, 15, 12, 0.92), rgba(18, 15, 12, 0.46)),
    radial-gradient(circle at 78% 28%, rgba(29, 185, 84, 0.72), transparent 28%),
    linear-gradient(140deg, #191714 0%, #1e3d2f 47%, #1a252a 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: end;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.hero-grid > *,
.section > *,
.chart-card,
.section-copy {
  min-width: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 28px;
  font-size: clamp(3.4rem, 8.2vw, 7.7rem);
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.35;
}

.stat-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.stat-panel div {
  display: grid;
  gap: 2px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.stat-panel div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.stat-panel strong {
  font-size: 1.65rem;
  line-height: 1;
}

.stat-panel span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.hero-compact {
  min-height: auto;
}

.hero-grid-compact {
  padding-top: 32px;
  padding-bottom: 48px;
}

.hero-index.hero-compact {
  min-height: clamp(480px, 58vh, 620px);
}

.hero-index .hero-grid-compact {
  padding-top: 48px;
  padding-bottom: 80px;
  min-height: inherit;
  align-items: end;
}

.eyebrow {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-line {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  font-weight: 700;
}

.hero-compact h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  margin-bottom: 28px;
}

.hero-compact .lede {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.hero-project-link {
  margin: 40px 0 0;
}

.hero-project-link a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.hero-project-link a:hover {
  color: white;
  text-decoration: underline;
}

.explore-section {
  max-width: 1180px;
  margin: -32px auto 0;
  padding: 0 24px 64px;
  position: relative;
  z-index: 2;
}

/* ── Scrollytelling layout ── */

.scrolly {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(480px, 1.38fr);
  gap: 40px;
  max-width: 1360px;
  margin: -24px auto 0;
  padding: 0 24px 80px;
  position: relative;
  z-index: 2;
}

.scrolly-graphic {
  position: relative;
}

.sticky-inner {
  position: sticky;
  top: 24px;
}

.scrolly-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12vh 0 40vh;
}

.step {
  min-height: 72vh;
  padding: 32px 0 48px;
  opacity: 0.38;
  transition: opacity 0.35s ease;
}

.step.is-active {
  opacity: 1;
}

.step h2 {
  margin-bottom: 16px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.step p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.step p + p {
  margin-top: 1.15em;
}

.step p strong {
  color: var(--ink);
}

.native-profile {
  margin-top: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.ideal-song {
  margin-top: 0;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  height: 100%;
}

#native-profile {
  grid-column: 2;
  grid-row: 1;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  align-self: stretch;
  height: 100%;
}

.ideal-song .ideal-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.ideal-subtitle,
.ideal-note {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.35;
}

.profile-section .ideal-subtitle,
.profile-section .ideal-note,
.profile-section .native-profile-viz .native-profile-caption {
  font-size: 1.05rem;
}

.ideal-note {
  margin-top: 10px;
  margin-bottom: 20px;
}


.native-songline strong {
  color: var(--ink);
}

.native-profile-meta {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.native-profile-viz {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 240px;
}

.profile-feature-pills {
  margin-bottom: 0;
}

.era-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.era-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.era-pill-label {
  font-size: 0.8rem;
  line-height: 1.2;
}

.era-pill-years {
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0.82;
}

.era-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.era-pill.active[data-era="Pre-streaming"] {
  background: var(--era-pre);
  border-color: var(--era-pre);
  color: var(--ink);
}

.era-pill.active[data-era="Streaming growth"] {
  background: var(--era-growth);
  border-color: var(--era-growth);
  color: white;
}

.era-pill.active[data-era="Streaming native"] {
  background: var(--era-native);
  border-color: var(--era-native);
  color: white;
}

.native-hist-chart--main {
  flex: 1 1 0;
  min-height: 200px;
  width: 100%;
  display: flex;
  align-items: stretch;
}

.native-hist-chart--main .native-hist-svg {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.native-hist-chart--main .mini-hist-y-title,
.native-hist-chart--main .mini-hist-y-label,
.native-hist-chart--main .mini-hist-bucket-label,
.native-hist-chart--main .mini-hist-break-zero {
  font-size: 9px;
}

.native-hist-chart--main .mini-hist-mean-label {
  font-size: 9px;
}

.native-hist-chart--main .mini-hist-bucket-label,
.native-hist-chart--main .mini-hist-x-title {
  font-size: 9px;
}

.mini-hist-x-title {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.native-story-card {
  flex: 0 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #faf7f0;
  min-width: 0;
}

.native-profile-viz .native-profile-caption {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.native-bar-chart,
.native-hist-chart {
  margin-top: 2px;
}

.native-scale-label {
  fill: var(--muted);
  font-size: 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.native-bar-svg,
.native-hist-svg {
  display: block;
  width: 100%;
  height: auto;
}

.mini-hist-bar {
  pointer-events: all;
  cursor: pointer;
}

.mini-hist-mean {
  stroke: #1db954;
  stroke-width: 2;
}

.mini-hist-mean-label {
  fill: #1db954;
  font-size: 7px;
  font-weight: 800;
}

.mini-hist-y-axis,
.mini-hist-y-tick {
  stroke: #c8c0b6;
  stroke-width: 1;
}

.mini-hist-y-grid {
  stroke: #e8e2d8;
  stroke-width: 1;
  pointer-events: none;
}

.mini-hist-x-axis {
  stroke: #c8c0b6;
  stroke-width: 1;
}

.mini-hist-x-tick {
  stroke: #c8c0b6;
  stroke-width: 1;
}

.mini-hist-axis-break {
  stroke: #6d675f;
  stroke-width: 1.4;
  stroke-linecap: round;
  pointer-events: none;
}

.mini-hist-x-axis-stub {
  stroke: #c8c0b6;
}

.mini-hist-break-zero {
  font-size: 7px;
}

.mini-hist-y-label {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mini-hist-y-title {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.mini-hist-bucket-label {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mini-bar-label {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.mini-bar-track {
  fill: #ece6dc;
}

.mini-bar-fill {
  pointer-events: all;
}

.ideal-song-chart {
  margin-top: 4px;
  width: 100%;
  min-width: 0;
  overflow: visible;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ideal-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  flex: 1;
  grid-template-rows: repeat(6, 1fr);
  min-height: 0;
}

.ideal-feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #faf7f0;
}

.ideal-feature-label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.ideal-feature-mean {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.native-story {
  margin: 10px 0 10px;
}

.native-songline {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.25;
}

.native-metricline {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.native-metric {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.native-delta {
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.native-play,
.listen-link {
  display: inline-block;
  flex-shrink: 0;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--era-growth);
  border-radius: 999px;
  background: var(--era-growth);
  color: white;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.native-play:hover,
.listen-link:hover {
  border-color: #1aa34a;
  background: #1aa34a;
  color: white;
  text-decoration: none;
}

.step-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.step-link:hover {
  text-decoration: underline;
}

.section.profile-section {
  /* Override the default 2-col .section layout: center everything */
  display: flex !important;
  flex-direction: column;
  gap: 20px;
  max-width: 1360px;
  padding-top: 76px;
  padding-bottom: 76px;
}

.profile-section .section-copy {
  max-width: 1360px;
  margin: 0 auto;
}

.profile-panel {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: stretch;
}

.profile-panel .step-link {
  margin-top: 8px;
}


.era-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.era-controls button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.era-controls button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.era-controls button[aria-pressed="true"][data-era="All"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.era-controls button[aria-pressed="true"][data-era="Pre-streaming"] {
  border-color: var(--era-pre);
  background: var(--era-pre);
  color: var(--ink);
}

.era-controls button[aria-pressed="true"][data-era="Streaming growth"] {
  border-color: var(--era-growth);
  background: var(--era-growth);
  color: white;
}

.era-controls button[aria-pressed="true"][data-era="Streaming native"] {
  border-color: var(--era-native);
  background: var(--era-native);
  color: white;
}

.song-compare-block {
  width: 100%;
  max-width: 1440px;
  margin: 88px auto 0;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.song-compare-header {
  margin-bottom: 22px;
}

.song-compare-layout {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(280px, 560px);
  gap: 20px 18px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.song-compare-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow);
}

.song-compare-subtitle {
  display: grid;
  gap: 10px;
}

.song-compare-subtitle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.song-compare-form {
  display: grid;
  gap: 14px;
  align-self: start;
}

.song-compare-instruction {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.song-compare-legend-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.song-compare-fields {
  display: grid;
  gap: 12px;
}

.song-compare-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.label-optional {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.combo-field {
  position: relative;
}

.song-compare-field input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font: inherit;
}

.combo-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.combo-suggestions li {
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.3;
  cursor: pointer;
}

.combo-suggestions li:hover,
.combo-suggestions li[aria-selected="true"] {
  background: rgba(35, 100, 170, 0.1);
}

.song-compare-submit {
  justify-self: start;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.song-compare-submit:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.song-radar-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  max-width: 560px;
  width: 100%;
  justify-self: start;
  padding: 14px;
  overflow: visible;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.radar-legend-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

.radar-toggle-era {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: inherit;
}

.radar-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.radar-toggle.active:not(.radar-toggle-era) {
  border-color: var(--toggle-color, var(--ink));
  background: color-mix(in srgb, var(--toggle-color, var(--ink)) 12%, white);
  color: var(--ink);
}

.radar-toggle-era.active[data-era="Pre-streaming"] {
  background: var(--era-pre);
  border-color: var(--era-pre);
  color: var(--ink);
}

.radar-toggle-era.active[data-era="Streaming growth"] {
  background: var(--era-growth);
  border-color: var(--era-growth);
  color: white;
}

.radar-toggle-era.active[data-era="Streaming native"] {
  background: var(--era-native);
  border-color: var(--era-native);
  color: white;
}

.radar-toggle:not(.active) {
  opacity: 0.55;
}

.radar-toggle-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--toggle-color, var(--muted));
  flex-shrink: 0;
}

.radar-toggle-label {
  line-height: 1.2;
  white-space: nowrap;
}

.radar-toggle-era .radar-toggle-label {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.radar-toggle-years {
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0.82;
}

.radar-toggle-era.active .radar-toggle-years {
  opacity: 0.92;
}

.radar-chart-host {
  flex: 0 1 auto;
  min-height: 0;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  overflow: visible;
}

.radar-chart-host svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.radar-grid circle {
  stroke: var(--line);
}

.radar-axes line {
  stroke: var(--line);
}

.radar-point {
  stroke: var(--panel);
}

.radar-empty {
  margin: 0;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.radar-axis-label,
.radar-legend-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.radar-ticks {
  pointer-events: none;
}

.radar-tick-bg {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1;
}

.radar-tick {
  fill: var(--ink);
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.song-compare-result {
  padding-top: 4px;
}

.song-compare-result:empty {
  display: none;
}

.compare-empty {
  margin: 0;
  color: var(--muted);
}

.compare-result-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.compare-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compare-result-head h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1;
}

.compare-result-head p {
  margin: 0;
  color: var(--muted);
}

.compare-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.compare-note:last-child {
  margin-bottom: 0;
}

.compare-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.compare-metric {
  padding: 12px;
  border: 1px solid var(--line);
  background: white;
}

.compare-metric-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.compare-metric-head strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.compare-metric-head span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.compare-bars {
  display: grid;
  gap: 6px;
}

.compare-bars div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.compare-bars span {
  color: var(--muted);
  font-size: 0.68rem;
}

.compare-bars i {
  display: block;
  height: 8px;
  background: var(--accent);
}

.compare-bars i.year-bar {
  background: var(--blue);
}

.viz-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, 200px);
  gap: 14px;
  align-items: start;
}

.viz-charts-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 4px 4px 4px 8px;
}

.viz-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.song-carousel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 16px;
  align-items: stretch;
  width: 100%;
  max-width: none;
}

.carousel-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.carousel-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.song-card {
  min-height: 360px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.song-card-kicker {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.song-card-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.song-card h3 {
  margin-bottom: 5px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.song-artist {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.song-card-main .native-play,
.song-card-main .listen-link {
  margin-top: 0;
  font-size: 0.86rem;
}

.song-why {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 1.08rem;
}

.song-feature-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(72px, 0.5fr);
  gap: 8px;
  margin: 0;
}

.song-bar-card {
  padding: 12px;
  border: 1px solid var(--line);
  background: #faf7f0;
  min-width: 0;
}

.song-bar-card h4 {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.song-bar-card .native-bar-chart {
  margin-top: 0;
}

.song-bar-card .native-bar-svg {
  width: 100%;
}

.song-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.song-metrics div {
  padding: 12px;
  border: 1px solid var(--line);
  background: #faf7f0;
  container-type: inline-size;
}

.song-metrics dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.song-metrics dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.song-metric-peak {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: #faf7f0;
  container-type: inline-size;
}

.song-metric-peak dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.song-metric-peak dd {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 0;
  font-size: clamp(1.85rem, 38cqi, 3.75rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.song-metric-vs {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
}

.song-dots {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin-top: 16px;
  padding-left: 58px;
}

.song-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.song-dots button[aria-current="true"] {
  border-color: var(--era-growth);
  background: var(--era-growth);
}

.takeaway-proposal-link {
  margin: 36px 0 0;
}

.takeaway-section h2 {
  color: var(--ink);
}

.prototype-writeup-section {
  display: block;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.prototype-writeup-section .section-copy {
  max-width: none;
}

.prototype-writeup-section .writeup-details {
  max-width: none;
  margin: 0;
  width: 100%;
}

.writeup-details {
  max-width: 860px;
  margin: 0 auto;
}

.writeup-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
  text-align: left;
}

.writeup-details .section-copy {
  margin-top: 24px;
}

.proposal-section {
  display: block;
  padding-top: 48px;
  padding-bottom: 48px;
}

.proposal-section .section-copy {
  max-width: 760px;
}

.proposal-section h3 {
  margin-top: 28px;
}

.explore-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 0.66fr);
  gap: 28px;
  align-items: start;
}

.explore-hints {
  padding: 28px 0 0;
}

.explore-hints h2 {
  margin-bottom: 18px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.explore-hints ul {
  margin: 0 0 28px;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.explore-hints li {
  margin-bottom: 12px;
}

.explore-hints li strong {
  color: var(--ink);
}

.era-legend {
  display: grid;
  gap: 14px;
}

.era-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.era-legend-item strong {
  display: block;
  font-size: 0.88rem;
}

.era-legend-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.era-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.era-dot.pre {
  background: var(--era-pre);
}

.era-dot.growth {
  background: var(--era-growth);
}

.era-dot.native {
  background: var(--era-native);
}

.hero-viz-card {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-viz-card .chart-heading {
  margin-bottom: 10px;
}

.hero-viz-card .chart-heading h3 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.hero-viz-card .chart-heading p {
  margin: 0;
  text-align: left;
  max-width: none;
  font-size: 0.82rem;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.feature-pill,
.profile-feature-pill,
.era-filter {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.feature-pill:hover,
.profile-feature-pill:hover,
.era-filter:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.feature-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.profile-feature-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.era-filter.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.chart-hero {
  width: 100%;
  height: 168px;
  min-height: 168px;
  overflow: hidden;
}

.chart-sparkline {
  width: 100%;
  height: 200px;
  min-height: 200px;
}

.chart-hero svg,
.chart-sparkline svg {
  display: block;
  overflow: visible;
}

.axis-label-y {
  font-size: 10px;
  fill: var(--muted);
}

.viz-caption {
  margin: 0;
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.era-legend-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.era-legend-compact .era-legend-item {
  gap: 8px;
}

.era-legend-compact .era-legend-item span {
  font-size: 0.68rem;
  line-height: 1.3;
  white-space: normal;
}

.section-intro {
  max-width: 680px;
  margin-bottom: 32px;
}

.section-intro p {
  color: var(--muted);
  font-size: 1.05rem;
}

.era-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 8px;
}

.era-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.era-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--ink);
}

.static-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.static-chart {
  margin: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.static-chart.wide {
  grid-column: 1 / -1;
}

.static-chart img {
  display: block;
  width: 100%;
  height: auto;
}

.static-chart figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.static-chart figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.95rem;
}

.site-footer {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--blue);
}

.section {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(240px, 0.24fr);
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 24px;
}

.visual-section {
  display: block;
}

.section.song-carousel-section {
  display: block !important;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 48px 24px 76px;
}

.section.song-carousel-section .section-intro {
  max-width: none;
  margin-bottom: 32px;
}

.section.takeaway-section {
  display: block !important;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid #b5a99a;
  border-bottom: 1px solid #b5a99a;
  background: #fffdf8;
}

.section.takeaway-section .section-copy,
.section.takeaway-section .takeaway-proposal-link,
.section.takeaway-section h2 {
  max-width: none;
}

.section-copy {
  max-width: 820px;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 7px;
  font-size: 1.02rem;
  line-height: 1.2;
}

.section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.question-box {
  align-self: start;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.question-box p {
  margin-bottom: 0;
  color: var(--ink);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.chart-card {
  min-width: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.chart-card.wide {
  grid-column: 1 / -1;
}

.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.chart-heading p {
  max-width: 310px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.chart {
  width: 100%;
  min-height: 320px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.axis text {
  fill: var(--muted);
  font-size: 11px;
}

.axis path,
.axis line {
  stroke: #c9c0b4;
}

.grid line {
  stroke: #eee7dd;
}

.annotation {
  fill: var(--muted);
  font-size: 12px;
}

.outlier-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.outlier {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #faf7f0;
}

.outlier strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
  line-height: 1.25;
}

.outlier span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.outlier dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin: 14px 0 0;
  font-size: 0.78rem;
}

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

.outlier dd {
  margin: 0;
  text-align: right;
}

#tooltip {
  position: fixed;
  z-index: 20;
  max-width: 260px;
  padding: 10px 12px;
  pointer-events: none;
  opacity: 0;
  color: white;
  background: rgba(25, 23, 20, 0.94);
  font-size: 0.84rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

@media (max-width: 860px) {
  nav {
    justify-content: flex-start;
    margin-bottom: 52px;
  }

  .hero-grid,
  .section,
  .chart-grid,
  .explore-layout,
  .static-chart-grid,
  .scrolly {
    grid-template-columns: 1fr;
  }

  .profile-section {
    display: block;
  }

  .profile-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  #native-profile {
    grid-column: 1;
    grid-row: 2;
    height: auto;
  }

  .ideal-song {
    grid-column: 1;
    grid-row: 1;
    height: auto;
  }

  .ideal-song-chart,
  .ideal-feature-list {
    flex: none;
    grid-template-rows: none;
  }

  .song-compare-layout {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .song-radar-wrap {
    max-width: none;
    justify-self: stretch;
  }

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

  .viz-body {
    grid-template-columns: 1fr;
  }

  .viz-aside {
    padding-left: 0;
    border-left: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .chart-hero {
    height: 180px;
    min-height: 180px;
  }

  .chart-sparkline {
    height: 220px;
    min-height: 220px;
  }

  .era-legend-compact {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 0;
    border-top: 0;
  }

  .scrolly {
    margin-top: 0;
    padding-top: 32px;
  }

  .sticky-inner {
    position: relative;
    top: auto;
  }

  .scrolly-steps {
    padding: 0 0 24vh;
  }

  .step {
    min-height: auto;
    padding: 28px 0;
  }

  .explore-section {
    margin-top: 0;
    padding-top: 32px;
  }

  .explore-hints {
    padding-top: 0;
  }

  .static-chart.wide {
    grid-column: auto;
  }

  .hero-grid {
    padding-bottom: 52px;
  }

  .chart-card.wide {
    grid-column: auto;
  }

  .chart-heading {
    display: block;
  }

  .chart-heading p {
    text-align: left;
  }

  .song-carousel {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
  }

  .song-card {
    padding: 20px;
  }

  .song-card-main {
    display: block;
  }

  .song-feature-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .song-metric-peak {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .song-metric-peak dd {
    margin: 0;
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .native-play,
  .listen-link {
    display: inline-block;
    margin-top: 14px;
  }

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

  .compare-result-head {
    display: block;
  }

  .compare-result-head .listen-link {
    display: inline-block;
    margin-top: 14px;
  }

  .song-dots {
    padding-left: 44px;
  }
}

@media (max-width: 520px) {
  nav {
    gap: 18px;
    padding-inline: 20px;
    font-size: 0.86rem;
  }

  .hero:not(.hero-compact) {
    min-height: 760px;
  }

  .hero-grid,
  .section {
    padding-inline: 20px;
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.1rem);
    line-height: 0.96;
    max-width: calc(100vw - 40px);
  }

  .lede {
    font-size: 1.14rem;
  }

  .stat-panel,
  .question-box,
  .chart-card {
    width: 100%;
    max-width: calc(100vw - 40px);
  }

  .section {
    gap: 28px;
    padding-block: 58px;
  }

  .section p {
    font-size: 1rem;
  }

  .chart {
    min-height: 280px;
  }
}
