:root {
  --bg: #f4efe6;
  --card: #fffaf1;
  --ink: #1d1b18;
  --muted: #6f675c;
  --line: #dcd3c3;
  --drum: #e2542b;      /* drum hoop: marks a drummer */
  --label: #f2b632;     /* record label: marks an artist */
  --vinyl-a: #141414;
  --vinyl-b: #2b2b2b;
  --shadow: 0 10px 30px rgba(40, 30, 10, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --card: #1f1d1a;
    --ink: #f1ebe0;
    --muted: #a69d8f;
    --line: #38342e;
    --vinyl-a: #060606;
    --vinyl-b: #242424;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.45 "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--drum); outline-offset: 2px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 21px; letter-spacing: -.02em; text-decoration: none;
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--card); border: 4px solid var(--drum); box-shadow: 0 0 0 2px var(--ink);
}
.search { position: relative; flex: 1; max-width: 420px; }
input[type="search"] {
  width: 100%; padding: 10px 14px;
  font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
}
input[type="search"]:focus { outline: none; border-color: var(--drum); }
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.results li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.results li.on, .results li:hover { background: color-mix(in srgb, var(--drum) 14%, transparent); }
.results small { margin-left: auto; color: var(--muted); }
.actions { margin-left: auto; display: flex; gap: 8px; }
.actions button, .ghost {
  padding: 9px 14px; cursor: pointer;
  background: none; border: 1.5px solid var(--ink); border-radius: 999px; font-weight: 600; font-size: 14px;
}
.actions button:hover, .ghost:hover { background: var(--ink); color: var(--bg); }

.dot { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; }
.dot.drummer { background: var(--card); border: 3px solid var(--drum); box-shadow: 0 0 0 1.5px var(--ink); }
.dot.artist { background: radial-gradient(circle, var(--label) 0 32%, var(--vinyl-a) 34%); }

/* ---------- layout ---------- */
main {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px;
  max-width: 1240px; margin: 0 auto; padding: 14px 20px 30px;
}
.stage-wrap { min-width: 0; }
.trail { min-height: 26px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 14px; color: var(--muted); }
.trail a { text-decoration: none; }
.trail a:hover { text-decoration: underline; }
.trail a.here { color: var(--ink); font-weight: 700; }

.stage {
  position: relative;
  width: 100%; max-width: min(720px, calc(100vh - 190px)); min-width: 280px;
  aspect-ratio: 1; margin: 0 auto;
}
.stage.chain { aspect-ratio: 2 / 1; max-width: 760px; margin-top: 30px; }
.stage .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 0 12%; }

#lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#lines line {
  stroke: var(--ink); stroke-linecap: round; vector-effect: non-scaling-stroke;
  opacity: 0; transition: opacity .2s;
}
#lines.on line { opacity: .2; transition: opacity .5s .3s; }
#lines.on line.quiet { opacity: .12; stroke-dasharray: 2 6; }
#lines.on line.hot { opacity: .85; stroke: var(--drum); transition: opacity .12s; }

/* ---------- nodes: a drummer is a drum seen from above, an artist is a record ---------- */
.node {
  position: absolute; width: var(--size, 12%); aspect-ratio: 1;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -50%);
  container-type: inline-size;      /* lets the face size its rim and letters from the node's width */
  transition: left .55s cubic-bezier(.2, .8, .2, 1), top .55s cubic-bezier(.2, .8, .2, 1), opacity .35s;
}
.node:focus-visible { outline: none; }
.node:focus-visible .face { outline: 3px solid var(--drum); outline-offset: 5px; }
.face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  transition: transform .18s;
}
.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.initials { font-weight: 800; letter-spacing: -.03em; }
.node:hover .face { transform: scale(1.08); }
.node.center { cursor: default; z-index: 2; }
.node.center:hover .face { transform: none; }
.node.center .face { animation: hit .45s .5s both; }

.node.drummer .face {
  background: var(--card); color: var(--muted);
  border: max(3px, 4cqw) solid var(--drum);
  box-shadow: 0 0 0 2px var(--ink), var(--shadow);
}
.node.drummer .initials { font-size: 34cqw; }
.node.drummer::before {     /* the lugs around the hoop */
  content: ""; position: absolute; inset: -9%; border-radius: 50%;
  background: repeating-conic-gradient(from -4deg, var(--ink) 0 8deg, transparent 8deg 45deg);
  -webkit-mask: radial-gradient(closest-side, transparent 87%, #000 88%);
          mask: radial-gradient(closest-side, transparent 87%, #000 88%);
  transition: transform .18s;
}
.node.drummer:not(.center):hover::before { transform: scale(1.08) rotate(22.5deg); }

.node.artist .face {
  color: #1d1b18;
  background:
    conic-gradient(from 25deg, transparent 0 18%, rgba(255, 255, 255, .16) 24%, transparent 30% 68%, rgba(255, 255, 255, .16) 74%, transparent 80%),
    radial-gradient(circle, var(--label) 0 28%, transparent 28.6%),
    repeating-radial-gradient(circle, var(--vinyl-a) 0 1.5px, var(--vinyl-b) 1.5px 3px);
  box-shadow: 0 0 0 1px var(--vinyl-b), var(--shadow);
}
.node.artist .initials { font-size: 15cqw; }
.node.artist:not(.center):hover .face { animation: spin 2.2s linear infinite; }
.node.quiet { filter: saturate(.4); }
.node.quiet .face { opacity: .72; }

.label {
  position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 190%;
  text-align: center; line-height: 1.15; pointer-events: none;
  padding: 2px 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);    /* keeps lines from running through the words */
}
.label b { display: block; font-size: 13px; font-weight: 700; }
.label small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted); }
.node.center .label {
  top: calc(100% + 10px); max-width: 160%; padding: 3px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.node.center .label b { font-size: clamp(17px, 2.4vw, 24px); font-weight: 800; letter-spacing: -.02em; }
.node.center .label small { font-size: 13px; }

.badge {
  position: absolute; right: -6%; top: -6%; z-index: 1;
  min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--drum); color: #fff; font-size: 11.5px; font-weight: 800;
  box-shadow: 0 0 0 2px var(--bg);
}

@keyframes spin { to { transform: scale(1.08) rotate(360deg); } }
@keyframes hit { 0% { transform: scale(1); } 35% { transform: scale(1.07); } 100% { transform: scale(1); } }

.pager { min-height: 34px; display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.pager button {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); font-size: 18px; line-height: 1;
}
.pager button:hover:not(:disabled) { border-color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: default; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.legend .dot { margin-left: 8px; }
.legend-tip { margin-left: 10px; }

/* ---------- side panel ---------- */
.panel {
  position: sticky; top: 76px; align-self: start;
  max-height: calc(100vh - 96px); overflow: auto;
  padding: 22px 22px 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
}
.kicker { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--drum); }
.panel h1 { margin: 2px 0 4px; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; }
.panel h2 { margin: 24px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.meta { margin: 0 0 10px; color: var(--muted); }
.bio { margin: 0 0 4px; }
.bio.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.textlink { padding: 0; background: none; border: 0; cursor: pointer; color: var(--drum); font-weight: 600; font-size: 14px; }
.stats { display: flex; gap: 18px; margin: 14px 0; }
.stats span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); }
.stats b { font-size: 24px; line-height: 1.1; color: var(--ink); letter-spacing: -.02em; }
.links { margin: 0 0 14px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.note { color: var(--muted); font-size: 14px; }

.rows { margin: 0; padding: 0; list-style: none; }
.rows a { display: flex; align-items: center; gap: 11px; padding: 8px 8px; margin: 0 -8px; border-radius: 10px; text-decoration: none; }
.rows a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rows .txt { min-width: 0; flex: 1; }
.rows b { display: block; font-weight: 650; }
.rows small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows em { flex: none; font-style: normal; font-size: 12px; font-weight: 800; color: var(--drum); }
.panel .ghost { margin-top: 10px; }

.records { margin: 0; padding: 0; list-style: none; }
.records li { border-top: 1px solid var(--line); }
.records summary { padding: 9px 0; cursor: pointer; list-style: none; }
.records summary::-webkit-details-marker { display: none; }
.records .yr { color: var(--muted); margin-left: 6px; }
.tag { margin-left: 6px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tag.same { border-color: var(--drum); color: var(--drum); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chip { padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; background: color-mix(in srgb, var(--drum) 13%, transparent); }
.chip:hover { background: var(--drum); color: #fff; }
.tracks { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.tracks b { color: var(--ink); }

.pick { display: grid; gap: 10px; margin: 14px 0 6px; }
.field-name { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pick .search { max-width: none; margin-top: 4px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 12px 0 12px 34px; border-top: 1px solid var(--line); counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 13px;
  width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800;
}
.steps p { margin: 0 0 4px; }
.steps .sub { font-size: 13.5px; color: var(--muted); }

footer { max-width: 1240px; margin: 0 auto; padding: 8px 20px 40px; font-size: 13px; color: var(--muted); }
footer p { margin: 0 0 6px; max-width: 80ch; }

@media (max-width: 920px) {
  main { grid-template-columns: 1fr; gap: 18px; }
  .panel { position: static; max-height: none; }
  .stage { max-width: 620px; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .actions button { padding: 7px 11px; font-size: 13px; }
  main { padding: 10px 14px 24px; }
  .label b { font-size: 11.5px; }
  .label small { font-size: 10.5px; }
  .legend-tip { flex-basis: 100%; text-align: center; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}

/* ---------- "page not found" (404.html) ---------- */
.lost-main { display: block; max-width: 520px; margin: 0 auto; padding: 16vh 20px 40px; text-align: center; }
.lost-main h1 { margin: 22px 0 8px; font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -.03em; }
.lost-main p { margin: 0 0 22px; color: var(--muted); }
.lost-main .ghost { display: inline-block; text-decoration: none; }
.lost-drum {
  display: inline-block; width: 96px; height: 96px; border-radius: 50%;
  background: var(--card); border: 8px solid var(--drum); box-shadow: 0 0 0 3px var(--ink), var(--shadow);
}
