/* Sillon — visual language lifted from Last.fm's Listening Reports (NFR-010).
   Palette and type taken from their live CSS custom properties, not guessed:
   Barlow, --clr-black #000, --clr-obsidian #111, --clr-mineshaft #222.
   Private, authenticated, single-user tool: a borrowed design language, not a
   brand impersonation. */

/* Barlow, self-hosted: no CDN dependency (NFR-005/007), and the report's
   typography is half its character — a system fallback loses it. */
@font-face {
  font-family: Barlow; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: Barlow; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: Barlow; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/barlow-700.woff2") format("woff2");
}

:root {
  --black: #000;
  --obsidian: #111;
  --mineshaft: #222;
  --soot: #2c2c2c;
  --charcoal: #333;
  --graphite: #666;
  --cement: #999;
  --ash: #adadad;
  --white: #fff;

  /* Report accents, sampled from the live report */
  --pink: #f7d8f7;        /* hero block */
  --lavender: #c9a9ff;    /* artists */
  --mint: #5ce6b0;        /* albums */
  --sky: #5cb4ff;         /* tracks */
  --coral: #f0525a;       /* this-year bars */
  --coral-dim: #6b2226;   /* last-year bars */
  --red: #d92323;         /* --clr-postbox: negative deltas */
  --green: #00ad7a;       /* --clr-jade: positive deltas */

  --sans: Barlow, "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--black);
  color: #fafafa;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-weight: 700; letter-spacing: -.01em; }

a { color: #fafafa; }

/* ---------- chrome ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem; background: var(--soot);
  position: sticky; top: 0; z-index: 10;
}
.mark {
  font-weight: 700; font-size: 1.3rem; letter-spacing: -.03em;
  text-decoration: none;
}
.mark::first-letter { color: var(--coral); }
.topbar nav { display: flex; gap: 1.25rem; }
.topbar nav a { color: var(--ash); text-decoration: none; font-size: .9rem; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--white); }
.wrap { max-width: 68rem; margin: 0 auto; padding: 1.5rem 1.25rem 6rem; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

/* ---------- wrap nav ---------- */
.wrap-nav { margin-bottom: 1.5rem; }
.years, .months { display: flex; flex-wrap: wrap; gap: .4rem; }
.months { margin-top: .5rem; }
.years a, .months a {
  padding: .3rem .7rem; border-radius: 2px; text-decoration: none;
  font-size: .8rem; color: var(--ash); background: var(--obsidian);
  font-variant-numeric: tabular-nums;
}
.years a:hover, .months a:hover { background: var(--mineshaft); color: var(--white); }
.years a.on { background: var(--white); color: var(--black); font-weight: 700; }

/* ---------- hero ---------- */
.hero {
  background: var(--pink); color: var(--black);
  display: grid; grid-template-columns: minmax(14rem, 1fr) 2fr;
  gap: 2rem; align-items: center;
  padding: 2.5rem 2rem; margin: 0 0 1rem;
}
.hero-empty { display: block; }
.hero-delta { margin: 0 0 .25rem; font-weight: 700; font-size: .85rem; }
.hero-n {
  margin: 0; font-size: clamp(2.75rem, 7vw, 4.25rem); font-weight: 700;
  line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.hero-unit { margin: .1rem 0 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.hero-label { margin: .75rem 0 0; font-weight: 700; font-size: .9rem; opacity: .55; }
.hero-note { margin: .75rem 0 0; font-size: .9rem; max-width: 44rem; opacity: .7; }

.legend { display: flex; gap: 1rem; justify-content: flex-end; font-size: .7rem; font-weight: 600; }
.sw { display: inline-block; width: .6rem; height: .6rem; margin-right: .3rem; }
.sw-now { background: var(--black); }
.sw-prev { background: rgba(0,0,0,.3); }

.hero-chart .bars { display: flex; gap: .35rem; align-items: flex-end; height: 8.5rem; margin-top: .5rem; }
.bar-slot { flex: 1; display: flex; flex-direction: column; height: 100%; }
.pair { flex: 1; display: flex; gap: 2px; align-items: flex-end; }
.pair .b { flex: 1; min-height: 1px; }
.pair .b.now { background: var(--black); }
.pair .b.prev { background: rgba(0,0,0,.28); }
.bl { font-size: .58rem; text-align: center; margin-top: .3rem; opacity: .6; font-weight: 600; }

/* ---------- pills ---------- */
.pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.pill {
  padding: 1rem 1.25rem; color: var(--black);
  display: flex; flex-direction: column; gap: .1rem;
  /* notched corner, as on the real report */
  clip-path: polygon(0 0, 100% 0, 100% 72%, 94% 100%, 0 100%);
}
.pill-a { background: var(--lavender); }
.pill-b { background: var(--mint); }
.pill-c { background: var(--sky); }
.pill .pl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.pill .pn { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.delta { font-size: .72rem; font-weight: 700; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { opacity: .5; }
.pill .delta.up { color: #005c41; }
.pill .delta.down { color: #8c1414; }

/* ---------- top cards ---------- */
.tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.topcard { background: var(--obsidian); display: flex; flex-direction: column; }
.topcard-head { padding: 1.1rem 1.1rem 1rem; background: var(--mineshaft); }
.tag {
  display: inline-block; padding: .15rem .5rem; font-size: .68rem; font-weight: 700;
  color: var(--black); margin-bottom: .6rem;
}
.tag-a { background: var(--lavender); }
.tag-b { background: var(--mint); }
.tag-c { background: var(--sky); }
.t1 { margin: 0; font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.t1sub { margin: .1rem 0 0; color: var(--ash); font-size: .85rem; }
.t1n { margin: .35rem 0 0; color: var(--cement); font-size: .78rem; font-variant-numeric: tabular-nums; }
.topcard-list { list-style: none; margin: 0; padding: .35rem 0; }
.topcard-list li {
  display: grid; grid-template-columns: 2rem 1fr auto; gap: .5rem;
  padding: .4rem 1.1rem; font-size: .85rem; align-items: baseline;
}
.topcard-list .rk { color: var(--graphite); font-size: .75rem; font-variant-numeric: tabular-nums; }
.topcard-list .rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topcard-list .rp { color: var(--cement); font-variant-numeric: tabular-nums; font-size: .8rem; }

/* ---------- new / brief cards ---------- */
.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.newcard {
  background: var(--obsidian); padding: 1rem 1.15rem;
  display: flex; flex-direction: column; gap: .15rem;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 95% 100%, 0 100%);
}
.newcard .nl { font-size: .72rem; color: var(--ash); font-weight: 600; }
.newcard .nn { font-size: 1.9rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.newcard .nsub { font-size: .78rem; color: var(--cement); }
.newcard .nfirst { font-size: .75rem; color: var(--graphite); margin-top: .3rem; }

/* ---------- facts ---------- */
.facts h2, .charts h2, .brief h2, .returning h2 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .1em;
  border-bottom: 1px solid var(--charcoal); padding-bottom: .5rem; margin: 2.5rem 0 1.25rem;
}
.factgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.fact { background: var(--mineshaft); padding: 1rem 1.15rem; border-left: 3px solid var(--coral); }
.fact-returning { border-left-color: var(--mint); }
.fact-newcomer { border-left-color: var(--lavender); }
.fact-streak { border-left-color: var(--sky); }
.fact p { margin: 0; font-size: .9rem; }
.fact b { color: var(--white); }

/* ---------- charts ---------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 2rem; }
.chart-body { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.dow { display: flex; gap: .4rem; align-items: flex-end; height: 8rem; flex: 1; min-width: 12rem; }
.dow-slot { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.dow-slot .b { background: var(--coral); min-height: 2px; }
.chart-side { min-width: 9rem; }
.cs-l { margin: .5rem 0 0; font-size: .75rem; color: var(--ash); }
.cs-v { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.clock { width: 14.5rem; height: 14.5rem; overflow: visible; }
.clock-hub { fill: var(--obsidian); stroke: var(--mineshaft); }
.clock-bg { stroke: var(--obsidian); stroke-width: 8; }
.clock-seg { stroke: var(--charcoal); stroke-width: 8; transition: stroke .15s ease; }
.clock-seg:hover { stroke: var(--ash); }
.clock-seg.peak { stroke: var(--sky); }
.clock-t { fill: var(--graphite); font-size: 9px; text-anchor: middle; font-family: var(--sans); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th {
  text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ash); font-weight: 600; padding: 0 .75rem .5rem 0;
  border-bottom: 1px solid var(--charcoal);
}
td { padding: .55rem .75rem; border-bottom: 1px solid var(--obsidian); font-variant-numeric: tabular-nums; }
td:first-child, th:first-child { padding-left: 0; }

.briefgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.bc { background: var(--obsidian); padding: .9rem 1.1rem; display: flex; flex-direction: column; }
.bc .bl { font-size: .72rem; color: var(--ash); }
.bc .bv { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.disclaimer {
  margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--obsidian);
  font-size: .72rem; color: var(--graphite); max-width: 46rem;
}

/* ---------- dashboard ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.card { background: var(--obsidian); padding: 1.25rem; display: flex; flex-direction: column; gap: .2rem; }
.card .n { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.card .l { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ash); }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: min(22rem, 90vw); text-align: center; }
.login-mark { font-size: 2.75rem; margin: 0; letter-spacing: -.04em; font-weight: 700; }
.login-mark::first-letter { color: var(--coral); }
.login-sub { color: var(--ash); margin: .25rem 0 2rem; font-size: .9rem; }
.login-card form { display: flex; flex-direction: column; gap: .75rem; }
.login-card input, .login-card button {
  padding: .75rem 1rem; border: 1px solid var(--charcoal);
  background: var(--obsidian); color: #fafafa; font-size: 1rem; font-family: inherit;
}
.login-card button { background: var(--coral); border-color: var(--coral); color: var(--black); font-weight: 700; cursor: pointer; }
.login-error { color: var(--red); font-size: .85rem; margin-top: 1rem; }

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding: 1.75rem 1.25rem; }
  .hero-chart .bars { height: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- radar / discovery / scouting ---------- */
.sub-mark {
  font-size: .5em; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  background: var(--coral); color: var(--black); padding: .15rem .45rem;
  vertical-align: middle; margin-left: .4rem;
}
.intro { color: var(--ash); max-width: 46rem; margin: -.75rem 0 1.5rem; }
.intro b { color: var(--white); }

.filters {
  display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap;
  background: var(--obsidian); padding: 1rem 1.15rem; margin-bottom: 1.5rem;
}
.filters label { display: flex; flex-direction: column; gap: .25rem; font-size: .72rem; color: var(--ash); }
.filters input {
  background: var(--mineshaft); border: 1px solid var(--charcoal); color: #fafafa;
  padding: .4rem .6rem; font-family: inherit; font-size: .9rem; width: 8rem;
  font-variant-numeric: tabular-nums;
}
.filters button {
  background: var(--coral); border: 0; color: var(--black); font-weight: 700;
  padding: .45rem 1rem; cursor: pointer; font-family: inherit; font-size: .85rem;
}
.filters .counts { margin-left: auto; font-size: .75rem; color: var(--graphite); }

.empty-state {
  background: var(--obsidian); border-left: 3px solid var(--coral);
  padding: 1.25rem 1.4rem; color: var(--ash);
}
.empty-state p { margin: 0 0 .4rem; }
.empty-state p:last-child { margin: 0; font-size: .85rem; }

.scout { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; }
.scoutcard {
  background: var(--obsidian); padding: 1.15rem 1.25rem;
  display: flex; flex-direction: column; gap: .7rem;
  clip-path: polygon(0 0, 100% 0, 100% 96%, 97% 100%, 0 100%);
}
.scoutcard h2 { margin: 0; font-size: 1.2rem; border: 0; padding: 0; text-transform: none; letter-spacing: -.01em; }
.scoutcard .metrics { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .3rem; }
.scoutcard .m { font-size: .72rem; color: var(--ash); font-variant-numeric: tabular-nums; }
.scoutcard .m b { color: var(--white); }
.scoutcard .m.score b { color: var(--mint); }
.tags { margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.tg { font-size: .65rem; background: var(--mineshaft); color: var(--ash); padding: .1rem .4rem; }
.lastrel { margin: 0; font-size: .82rem; color: var(--ash); }
.lastrel b { color: var(--white); }
.why { background: var(--black); padding: .6rem .75rem; }
.why-l { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--graphite); }
.why ul { margin: .35rem 0 0; padding: 0 0 0 .9rem; }
.why li { font-size: .78rem; color: var(--ash); margin-bottom: .15rem; }
.why li b { color: var(--white); }
.why .mt { color: var(--mint); font-variant-numeric: tabular-nums; }
.why .pl { color: var(--graphite); font-size: .72rem; }
.scoutcard footer { display: flex; gap: .5rem; align-items: center; margin-top: auto; padding-top: .3rem; }
.scoutcard footer form { margin: 0; }
.btn {
  font-family: inherit; font-size: .75rem; font-weight: 700; padding: .35rem .75rem;
  border: 1px solid var(--charcoal); background: var(--mineshaft); color: #fafafa;
  cursor: pointer; text-decoration: none; display: inline-block;
}
.btn.dig { background: var(--mint); color: var(--black); border-color: var(--mint); }
.btn.rej:hover { border-color: var(--red); color: var(--red); }
.btn.ext { color: var(--ash); }
.badge { font-size: .68rem; color: var(--graphite); margin-left: auto; }

table.radar td.d, table.radar td.p, table.disc td.rk { font-variant-numeric: tabular-nums; }
table.radar td.t { color: var(--ash); font-size: .78rem; }
table.radar tr.future td.d { color: var(--mint); }
table.disc td.via { color: var(--graphite); font-size: .78rem; }
.tags-inline { font-size: .68rem; color: var(--graphite); margin-top: .1rem; }
.filters .field { display: flex; align-items: center; gap: .4rem; }
.filters .field i { font-style: normal; font-size: .72rem; color: var(--ash); }
.filters .field input { width: 5rem; }

/* ---------- photo-led top cards (the real report is carried by the image) ---------- */
.topcard-head {
  position: relative; display: block; text-decoration: none; color: inherit;
  min-height: 4.5rem; overflow: hidden;
}
.topcard-head.has-img { min-height: 13rem; display: flex; align-items: flex-end; }
.topcard-head .cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* the report's signature: desaturated photo under a hard gradient */
  filter: grayscale(1) contrast(1.06);
  transition: transform .5s ease, filter .5s ease;
}
.topcard-head.has-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.15) 100%);
}
.topcard-head:hover .cover, .topcard-head:focus-visible .cover {
  transform: scale(1.045); filter: grayscale(.35) contrast(1.06);
}
.topcard-body { position: relative; z-index: 1; padding: 1.1rem; width: 100%; }
.topcard-head:not(.has-img) { background: var(--mineshaft); }
.topcard-list .rn { text-decoration: none; }
.topcard-list .rn:hover { color: var(--coral); }
.topcard-list li { transition: background .15s ease; }
.topcard-list li:hover { background: var(--mineshaft); }

/* month bars are navigation */
a.bar-slot { text-decoration: none; cursor: pointer; }
a.bar-slot .pair .b { transition: opacity .15s ease; }
a.bar-slot:hover .pair .b.now { opacity: .62; }
a.bar-slot:hover .bl { opacity: 1; color: var(--black); }

/* ---------- artist page ---------- */
.ahero { position: relative; overflow: hidden; margin-bottom: 1.5rem; background: var(--mineshaft); }
.ahero.has-img { min-height: 18rem; display: flex; align-items: flex-end; }
.ahero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 28%; filter: grayscale(1) contrast(1.05);
}
.ahero.has-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.94) 10%, rgba(0,0,0,.5) 55%, rgba(0,0,0,.1) 100%);
}
.ahero-body { position: relative; z-index: 1; padding: 1.75rem; width: 100%; }
.ahero-body h1 { margin: .4rem 0 .5rem; font-size: clamp(1.8rem, 4.5vw, 2.9rem); letter-spacing: -.03em; }
.ahero-stats { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: .75rem; font-size: .82rem; color: var(--ash); }
.ahero-stats b { color: var(--white); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ahero-span { margin: .6rem 0 0; font-size: .78rem; color: var(--cement); }
.ahero-note { margin: .2rem 0 0; font-size: .74rem; color: var(--graphite); }
.ahero-note b { color: var(--ash); }

.why-full { background: var(--obsidian); padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-left: 3px solid var(--lavender); }

.ayears { display: flex; gap: .3rem; align-items: flex-end; height: 11rem; margin: 1rem 0; }
.ay {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; height: 100%; text-decoration: none; gap: .25rem;
}
.ay-b { width: 100%; background: var(--charcoal); min-height: 2px; transition: background .15s ease; }
.ay:hover .ay-b { background: var(--coral); }
.ay-n { font-size: .58rem; color: var(--graphite); font-variant-numeric: tabular-nums; }
.ay:hover .ay-n { color: var(--white); }
.ay-l { font-size: .58rem; color: var(--graphite); font-variant-numeric: tabular-nums; }

.acols { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 2rem; }
.alist { list-style: none; margin: 0; padding: 0; }
.alist li {
  display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .5rem; align-items: baseline;
  padding: .45rem 0; border-bottom: 1px solid var(--obsidian); font-size: .88rem;
}

.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem; }
.album img, .album-ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--mineshaft); }
.album .an { margin: .45rem 0 0; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.album .ap { margin: 0; font-size: .72rem; color: var(--graphite); font-variant-numeric: tabular-nums; }

/* The hero sits on pink: links inside it must not inherit the global light
   link colour, or the month labels vanish against the background. */
.hero a { color: var(--black); }
.hero a.bar-slot .bl { color: var(--black); }

/* ================= dashboard: a front door, not an admin console ========= */
.dhero {
  background: var(--pink); color: var(--black);
  display: grid; grid-template-columns: minmax(13rem, 1fr) 1.4fr;
  gap: 2rem; align-items: center; padding: 2.25rem 2rem; margin-bottom: .75rem;
}
.dhero-kicker { margin: 0 0 .3rem; font-size: .78rem; font-weight: 700; opacity: .55; }
.dhero-n {
  margin: 0; font-size: clamp(2.5rem, 6.5vw, 4rem); font-weight: 700;
  line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.dhero-unit { margin: .1rem 0 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.dhero-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem 1.5rem; }
.dstat { display: flex; flex-direction: column; }
.dstat .v { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dstat .k { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .55; }
.dstat.undated .v { opacity: .45; }

.statusbar {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: var(--obsidian); padding: .6rem 1rem; font-size: .78rem;
  color: var(--ash); margin-bottom: 2rem;
}
.sb-dot { width: .5rem; height: .5rem; border-radius: 50%; display: inline-block; }
.sb-dot.ok { background: var(--mint); }
.sb-dot.err { background: var(--coral); }
.statusbar.warn { border-left: 3px solid var(--coral); }
.sb-sep { color: var(--charcoal); }
.sb-more { margin-left: auto; color: var(--graphite); text-decoration: none; }
.sb-more:hover { color: var(--white); }

/* horizontal reel of what's playing lately */
.reel { display: flex; gap: .85rem; overflow-x: auto; padding-bottom: .75rem; scroll-snap-type: x proximity; }
.reel-item { flex: 0 0 8.5rem; text-decoration: none; scroll-snap-align: start; }
.reel-item img, .reel-ph {
  width: 8.5rem; height: 8.5rem; object-fit: cover; display: block;
  background: var(--mineshaft); transition: filter .25s ease;
}
.reel-item img { filter: grayscale(.55); }
.reel-item:hover img { filter: grayscale(0); }
.reel-item .rt { margin: .45rem 0 0; font-size: .78rem; font-weight: 600; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-item .ra { margin: 0; font-size: .72rem; color: var(--graphite);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* face grid: artists carried by their photo */
.facegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.face {
  position: relative; display: block; text-decoration: none; overflow: hidden;
  aspect-ratio: 1; background: var(--mineshaft);
}
.face.tall { aspect-ratio: 3 / 4; }
.face img, .face-ph {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05); transition: transform .5s ease, filter .5s ease;
}
.face::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.93) 8%, rgba(0,0,0,.4) 55%, rgba(0,0,0,0) 100%);
}
.face:hover img { transform: scale(1.05); filter: grayscale(.25) contrast(1.05); }
.face-body { position: absolute; z-index: 1; inset: auto 0 0 0; padding: .8rem; }
.face .fr {
  font-size: .62rem; font-weight: 700; color: var(--black); background: var(--mint);
  padding: .05rem .35rem; font-variant-numeric: tabular-nums;
}
.face .fn { margin: .3rem 0 0; font-weight: 700; font-size: .92rem; line-height: 1.2; }
.face .ft { margin: .1rem 0 0; font-size: .66rem; color: var(--ash); }
.face .fp { margin: .1rem 0 0; font-size: .72rem; color: var(--cement); font-variant-numeric: tabular-nums; }
.face .fvia { margin: .05rem 0 0; font-size: .66rem; color: var(--graphite); }
.facegrid.disc .face .fr { background: var(--lavender); }

/* year cards */
.yeargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; }
.yearcard {
  position: relative; overflow: hidden; text-decoration: none; display: block;
  background: var(--obsidian); min-height: 8.5rem;
}
.yearcard img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1); opacity: .3; transition: opacity .4s ease, filter .4s ease;
}
.yearcard:hover img { opacity: .5; filter: grayscale(.5); }
.yearcard::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.35));
}
.yearcard-body { position: relative; z-index: 1; padding: .85rem; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; }
.yc-y { margin: 0; font-size: .72rem; font-weight: 700; color: var(--ash); font-variant-numeric: tabular-nums; }
.yc-n { margin: 0; font-size: 1.45rem; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.yc-bar { height: 3px; background: var(--charcoal); margin: .4rem 0 .35rem; }
.yc-bar span { display: block; height: 100%; background: var(--coral); }
.yc-a { margin: 0; font-size: .68rem; color: var(--cement);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= radar: covers, not a spreadsheet ==================== */
.relgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.relcard { display: flex; flex-direction: column; background: var(--obsidian); }
.relcard-art {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  background: var(--mineshaft);
}
.relcard-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.relcard:hover .relcard-art img { transform: scale(1.05); }
.relcard-ph { width: 100%; height: 100%; display: grid; place-items: center; background: var(--mineshaft); }
.relcard-ph span { font-size: 2.5rem; font-weight: 700; color: var(--charcoal); }
.relcard-flag {
  position: absolute; top: .5rem; left: .5rem; background: var(--mint); color: var(--black);
  font-size: .62rem; font-weight: 700; padding: .1rem .45rem; text-transform: uppercase; letter-spacing: .05em;
}
.relcard-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: 0; flex: 1; }
.rc-date { margin: 0; font-size: .68rem; color: var(--coral); font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-title {
  display: block; margin: .2rem 0 0; font-size: .92rem; font-weight: 700;
  line-height: 1.25; text-decoration: none; color: #fafafa;
}
.rc-title:hover { color: var(--coral); }
.rc-artist { margin: .1rem 0 0; font-size: .8rem; color: var(--ash); }
.rc-meta { margin: .6rem 0 0; display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .5rem; }
.rc-type { font-size: .62rem; background: var(--mineshaft); color: var(--ash); padding: .1rem .4rem; }
.rc-plays { font-size: .68rem; color: var(--graphite); font-variant-numeric: tabular-nums; }

/* ================= scouting cards get a face ============================ */
.scout-art { position: relative; display: block; overflow: hidden; text-decoration: none;
  margin: -1.15rem -1.25rem 0; }
.scout-art.has-img { min-height: 11rem; display: flex; align-items: flex-end; }
.scout-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05); transition: transform .5s ease, filter .5s ease;
}
.scout-art.has-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.94) 5%, rgba(0,0,0,.5) 55%, rgba(0,0,0,.1) 100%);
}
.scout-art:hover img { transform: scale(1.045); filter: grayscale(.3) contrast(1.05); }
.scout-art-body { position: relative; z-index: 1; padding: 1.1rem 1.25rem; width: 100%; }

/* ================= state page =========================================== */
.tasks { display: grid; gap: .6rem; margin-bottom: 2.5rem; }
.task { background: var(--obsidian); padding: .85rem 1.1rem; }
.task.err { border-left: 3px solid var(--coral); }
.task-head { display: flex; align-items: center; gap: .5rem; }
.task-dot { width: .45rem; height: .45rem; border-radius: 50%; }
.task-dot.ok { background: var(--mint); }
.task-dot.err { background: var(--coral); }
.task-desc { font-size: .74rem; color: var(--graphite); }
.task-meta { display: flex; gap: 1rem; margin-top: .2rem; font-size: .74rem; color: var(--ash); padding-left: .95rem; }
.task-meta b { color: var(--white); font-variant-numeric: tabular-nums; }
.task-meta .running { color: var(--sky); }
.task-err { margin: .4rem 0 0; font-size: .74rem; color: var(--coral); font-family: var(--mono); padding-left: .95rem; }

/* ================= overall wrap ========================================= */
.years a.all { background: var(--mineshaft); color: var(--white); font-weight: 600; }
.years a.all.on { background: var(--white); color: var(--black); }
.overall-note {
  background: var(--obsidian); border-left: 3px solid var(--lavender);
  padding: .9rem 1.15rem; font-size: .85rem; color: var(--ash); margin-bottom: 1.5rem;
}
.overall-note b { color: var(--white); }

@media (max-width: 640px) {
  .dhero { grid-template-columns: 1fr; padding: 1.75rem 1.25rem; }
}
.section-note { margin: -.6rem 0 1rem; font-size: .74rem; color: var(--graphite); max-width: 42rem; }

/* ---------- listening controls ---------- */
.listen { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.bc {
  font-size: .68rem; color: var(--graphite); text-decoration: none;
  padding: .3rem .4rem; border: 1px solid transparent;
}
.bc:hover { color: var(--white); border-color: var(--charcoal); }

/* discovery: the card stays a link, the controls sit under it */
.face-cell { display: flex; flex-direction: column; gap: .5rem; }
.face-listen .listen { flex-wrap: wrap; }
.facegrid.disc { align-items: start; }

/* ---------- Music Assistant ---------- */
/* The only way to listen, so it reads as the primary action on a card. */
.ma {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--mineshaft); border: 1px solid var(--lavender); color: #fafafa;
  font-family: inherit; font-size: .75rem; font-weight: 600;
  padding: .35rem .8rem; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ma:hover { background: var(--lavender); color: var(--black); }
.ma:hover .ma-icon { border-color: var(--black); }
.ma:hover .ma-icon::after { background: var(--black); }
.ma.open { border-color: var(--lavender); background: var(--charcoal); }
.ma-icon {
  width: 9px; height: 9px; border: 1.5px solid var(--lavender); border-radius: 50%;
  position: relative;
}
.ma-icon::after {
  content: ""; position: absolute; inset: 2px; background: var(--lavender); border-radius: 50%;
}
/* Overlaid, never in flow: as a flex item it pushed every row below it down
   on open and yanked them back on close. */
.listen { position: relative; }
.ma-menu {
  position: absolute; z-index: 30; top: calc(100% + .35rem); left: 0;
  min-width: 13rem; max-width: 20rem;
  display: flex; flex-wrap: wrap; gap: .3rem; align-items: center;
  background: var(--black); border: 1px solid var(--graphite);
  padding: .45rem .5rem; box-shadow: 0 10px 30px rgba(0,0,0,.75);
}
.ma-menu-l { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); margin-right: .2rem; }
.ma-menu-l.err { color: var(--coral); text-transform: none; letter-spacing: 0; }
.ma-player {
  font-family: inherit; font-size: .7rem; padding: .25rem .5rem; cursor: pointer;
  background: var(--mineshaft); border: 1px solid var(--charcoal); color: #fafafa;
}
.ma-player:hover { background: var(--lavender); color: var(--black); border-color: var(--lavender); }

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--mineshaft); border-left: 3px solid var(--mint); color: #fafafa;
  padding: .7rem 1.1rem; font-size: .82rem; z-index: 50; max-width: 90vw;
  box-shadow: 0 8px 28px rgba(0,0,0,.6);
}
.toast.err { border-left-color: var(--coral); }

/* A sleeveless release falls back to the artist's photo, desaturated so it
   never passes for real cover art. */
.relcard-art img.fallback { filter: grayscale(1) contrast(1.05) brightness(.62); }
.relcard:hover .relcard-art img.fallback { filter: grayscale(.6) contrast(1.05) brightness(.75); }
.relcard .listen { margin-top: .5rem; }
.ahero-pv { margin-top: .85rem; }
.scoutcard .listen { align-self: flex-start; }

/* ================= persistent remote bar ================= */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--soot); border-top: 1px solid var(--charcoal);
  font-size: .8rem;
}
/* the bar overlays the page; give the content room to end above it */
body:has(.bar:not([hidden])) .wrap { padding-bottom: 8rem; }

.bar-main {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 1rem; padding: .6rem 1rem;
  max-width: 90rem; margin: 0 auto;
}
.bar-now { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.bar-art { width: 2.75rem; height: 2.75rem; object-fit: cover; flex: 0 0 auto; background: var(--mineshaft); }
.bar-txt { min-width: 0; }
.bar-t { margin: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-a { margin: 0; color: var(--ash); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bar-ctl { display: flex; align-items: center; gap: .4rem; }
.bc-btn {
  background: transparent; border: 0; color: #fafafa; cursor: pointer;
  width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0;
}
.bc-btn svg { width: 1.05rem; height: 1.05rem; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.bc-btn:hover { color: var(--coral); }
.bc-play {
  background: var(--white); color: var(--black); border-radius: 50%;
  width: 2.3rem; height: 2.3rem;
}
.bc-play svg { stroke: none; }
.bc-play:hover { background: var(--coral); color: var(--black); }
.bar-time { font-size: .68rem; color: var(--graphite); font-variant-numeric: tabular-nums; margin-left: .4rem; white-space: nowrap; }

.bar-right { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; min-width: 0; }
.bar-q, .bar-dev {
  background: var(--mineshaft); border: 1px solid var(--charcoal); color: var(--ash);
  font-family: inherit; font-size: .68rem; padding: .25rem .55rem; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11rem;
}
.bar-q:hover, .bar-dev:hover { color: var(--white); border-color: var(--graphite); }
.bar-dev { color: var(--lavender); }

.bar-vol { display: flex; align-items: center; gap: .35rem; }
.bar-vol-i {
  width: 0; height: 0; border-style: solid; border-width: 5px 8px 5px 0;
  border-color: transparent var(--ash) transparent transparent;
}
.bar-vol input[type=range] { width: 5.5rem; accent-color: var(--coral); background: transparent; }

.bar-seek { height: 2px; background: var(--charcoal); }
.bar-seek span { display: block; height: 100%; width: 0; background: var(--coral); transition: width .5s linear; }

.bar-queue {
  max-height: 15rem; overflow-y: auto; border-bottom: 1px solid var(--charcoal);
  background: var(--obsidian); padding: .5rem 1rem;
  max-width: 90rem; margin: 0 auto;
}
.bq-l { margin: .2rem 0 .4rem; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--graphite); }
.bq-item {
  display: flex; justify-content: space-between; gap: 1rem; width: 100%;
  background: transparent; border: 0; color: #fafafa; font-family: inherit;
  font-size: .78rem; padding: .35rem .4rem; cursor: pointer; text-align: left;
}
.bq-item:hover { background: var(--mineshaft); }
.bq-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bq-d { color: var(--graphite); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.bar-menu { position: absolute; right: 1rem; bottom: 100%; margin-bottom: .4rem; background: var(--black); }

@media (max-width: 720px) {
  .bar-main { grid-template-columns: 1fr auto; gap: .5rem; }
  .bar-right { grid-column: 1 / -1; justify-content: space-between; }
  .bar-vol input[type=range] { width: 4rem; }
}

/* "this page is a speaker" — a global toggle, so it lives in the top bar
   rather than in the remote (which only appears once a player is chosen). */
.here {
  background: transparent; border: 1px solid var(--charcoal); color: var(--ash);
  font-family: inherit; font-size: .72rem; padding: .25rem .6rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .35rem;
}
.here::before {
  content: ""; width: .45rem; height: .45rem; border-radius: 50%;
  background: var(--graphite); flex: 0 0 auto;
}
.here:hover { color: var(--white); border-color: var(--graphite); }
.here.on { color: var(--mint); border-color: var(--mint); }
.here.on::before { background: var(--mint); box-shadow: 0 0 6px var(--mint); }
