:root {
  color-scheme: light;
  --ink: #171713;
  --muted: #69685f;
  --soft: #8c8879;
  --line: #ddd7c8;
  --paper: #f6f1e6;
  --paper-deep: #e9dfca;
  --panel: #fffdf7;
  --accent: #176f67;
  --accent-strong: #0d4f49;
  --rose: #b63d4b;
  --gold: #ba7d16;
  --blue: #355d9d;
  --shadow: 0 22px 54px rgba(57, 44, 24, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(23, 111, 103, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 111, 103, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 8% 12%, rgba(182, 61, 75, 0.14), transparent 24rem),
    radial-gradient(circle at 88% 0%, rgba(186, 125, 22, 0.13), transparent 28rem),
    var(--paper);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose) 0 45%, var(--gold) 45% 68%, var(--accent) 68%);
  box-shadow: inset 0 0 0 3px var(--paper);
}

.nav-stats {
  display: inline-flex;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.nav-stats span {
  padding: 5px 8px;
  background: rgba(255, 253, 247, 0.68);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 448px);
  gap: 42px;
  align-items: end;
  min-height: 520px;
  padding: 42px 0 36px;
}

.hero-copy {
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.6rem, 11vw, 9.8rem);
  line-height: 0.86;
  font-weight: 500;
  letter-spacing: 0;
}

.lede {
  max-width: 610px;
  margin: 26px 0 0;
  color: #4f4d44;
  font-size: 1.15rem;
  line-height: 1.56;
}

.bucket-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.bucket-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  background: rgba(255, 253, 247, 0.74);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #555145;
  font-size: 0.86rem;
  font-weight: 750;
}

.bucket-strip b {
  color: var(--ink);
}

.panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(91, 73, 43, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 4px;
}

.panel h2 {
  margin: 0;
  font-size: 1.06rem;
  letter-spacing: 0;
}

.panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.live-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(23, 111, 103, 0.14);
}

label {
  display: grid;
  gap: 7px;
  color: #34312a;
  font-size: 0.84rem;
  font-weight: 850;
}

textarea,
input,
select,
button {
  width: 100%;
  min-width: 0;
  font: inherit;
  border-radius: 6px;
}

textarea,
input,
select {
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(23, 111, 103, 0.72);
  box-shadow: 0 0 0 4px rgba(23, 111, 103, 0.12);
}

textarea {
  resize: vertical;
  min-height: 136px;
  line-height: 1.45;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

button {
  border: 0;
  min-height: 48px;
  padding: 13px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.progress {
  height: 6px;
  overflow: hidden;
  background: #e8dfcf;
  border-radius: 999px;
}

.progress span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--gold), var(--accent));
  border-radius: inherit;
  animation: crawl 1.2s ease-in-out infinite alternate;
}

@keyframes crawl {
  from {
    transform: translateX(-18%);
  }
  to {
    transform: translateX(150%);
  }
}

.status,
.skipped {
  margin: 10px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(186, 125, 22, 0.32);
  background: rgba(255, 248, 229, 0.9);
  color: #5f3d05;
}

.skipped p {
  margin: 0;
}

.skipped p + p {
  margin-top: 8px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0;
}

.summary > div {
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(91, 73, 43, 0.16);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 14px 30px rgba(57, 44, 24, 0.07);
}

.summary span {
  display: block;
  font-size: 1.78rem;
  font-weight: 900;
}

.summary small {
  color: var(--muted);
  font-weight: 800;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 132px;
  gap: 12px;
  margin-bottom: 16px;
}

.secondary-button {
  min-height: 44px;
  background: #34312a;
}

.secondary-button:hover {
  background: #171713;
}

.secondary-button:disabled {
  cursor: not-allowed;
}

.results {
  display: grid;
  gap: 10px;
}

.artist {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(190px, 1fr) 86px minmax(94px, 0.5fr);
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 15px 16px;
  overflow: hidden;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(91, 73, 43, 0.16);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(57, 44, 24, 0.06);
}

.artist::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.artist[data-bucket="10k"]::before {
  background: var(--rose);
}

.artist[data-bucket="100k"]::before {
  background: var(--gold);
}

.artist[data-bucket="1m"]::before {
  background: var(--blue);
}

.artist a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

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

.track {
  color: #4f4d44;
  font-size: 0.92rem;
  font-weight: 650;
}

.meta {
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.4;
}

.badge {
  justify-self: start;
  min-width: 56px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.badge[data-bucket="10k"] {
  background: var(--rose);
}

.badge[data-bucket="100k"] {
  background: var(--gold);
}

.badge[data-bucket="1m"] {
  background: var(--blue);
}

.empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.62);
}

@media (max-width: 880px) {
  .hero,
  .summary,
  .artist {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    align-items: start;
    gap: 26px;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  h1 {
    font-size: clamp(3.4rem, 18vw, 6.2rem);
  }

  .controls,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .artist {
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1160px);
    padding-top: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav-stats {
    display: none;
  }

  .hero {
    padding-top: 26px;
  }

  .panel {
    padding: 14px;
  }
}
