/*
 * Radio Hits: site.css
 * Spec: docs/design/radio-hits-design.md (tokens, type, components, A-UX 6).
 * Mobile-first: base rules are the phone layout (works from 320px); every
 * @media is min-width (breakpoint 600px, plus 360px for the band hours line)
 * or prefers-reduced-motion. CSP style-src 'self': templates use these classes,
 * never style="". SVG geometry (mix bar, meter, needle) goes in SVG attributes.
 *
 * Class names for the templates (component -> classes):
 *
 * Page shell (base.html)
 *   body.page [.page-landing] [.has-action-bar]
 *   main.column [.narrow | .landing | .wide]     640px column; narrow = short
 *                                                pages (not-invited, deleted, 500);
 *                                                landing = 1040px; wide = /admin 1120px
 *   footer.site-footer.column > p, p.footer-links > a
 *   h1, h2, p.lead, .hint, .small, .muted, a.link, .visually-hidden, .stack
 *   img.logo / svg.logo                          the Daily Dhun mark (static/logo.svg)
 * Nav bar
 *   nav.nav > a.wordmark [> img.logo] , a.nav-link | span.nav-label ("Admin")
 * Buttons (<a> or <button>)
 *   .btn + .btn-primary (marigold) | .btn-ghost (white, 44px) | .btn-google
 *   (ink fill, svg.glyph) | .btn-danger (danger outline) | .btn-link (text
 *   button, e.g. Sign out); .btn-grow fills the row (action bar on /me)
 * Signboard (landing)
 *   header.signboard > svg.trim [.trim-flip] (pattern: path.trim-scallop,
 *   circle.trim-dot), div.board > [div.board-row > svg.board-motif
 *   (path.motif-leaf, circle.motif-dot)], h1.board-title, p.board-tagline[lang=hi]
 *   section.hero > h2, p.lead, a.btn.btn-google, p.hint
 *   ol.steps > li > span.step-number, span.step-title, span.hint
 * Notices
 *   .notice (role=status: saved, queued, yt_connected)
 *   .error-summary (role=alert) ; .field-error under a field ; [aria-invalid]
 * Forms (/prefs)
 *   form.prefs-form > section.form-section > h2, p.hint, ...
 *   fieldset.field-group > legend.lbl        reset fieldset with a visible legend
 *   .lbl (field label), span.native[lang] (native language name)
 *   Option inputs (radio/checkbox, all real inputs, work without JS):
 *     label.option > input.option-input + span.<face>   (input visually hidden)
 *   Segmented control (language amount, era mode, energy):
 *     div.lang-row > span.lbl, div.segmented.cols-5|cols-3|cols-4[role=group]
 *       > label.option > input.option-input + span.segmented-face
 *   Tuning band:
 *     div.tuning-band
 *       > svg.band-ticks[viewBox="0 0 240 18"][preserveAspectRatio=none]
 *           > line.band-tick ..., rect.band-needle[x][width=3][height=18]
 *           needle x = segment centre - 1.5: morning 23.5, work 73.5,
 *           evening 123.5, night 193.5; add class is-off for "All day"
 *       > div.band-grid (5fr 5fr 5fr 9fr)
 *           > label.option > input.option-input[name=daypart][data-needle-x]
 *             + span.band-face > span.band-name, span.band-hours
 *       > div.band-ruler[aria-hidden] > span x3, span.band-ruler-last > span x2
 *       > label.option > input.option-input[value=all] + span.chip ("All day")
 *   Chips: span.chip (face of a radio/checkbox) or button.chip
 *   Sliders (mood_slider, surprise_slider):
 *     div.slider-list > div.slider > div.slider-head > label.lbl, span.slider-value
 *       ; input[type=range] ; div.ticks[aria-hidden] > span x5
 *   Mix bar: div.mood-mix > svg.mix-bar[viewBox="0 0 100 12"]
 *       > rect.mix-a|.mix-b|.mix-c|.mix-none ; p.mix-legend[data-any="Any mood"]
 *   Era: ul.era-list > li.era-row > label.option > input + span.chip ; p.hint.era-examples
 *   Artists: datalist#artist-options ; div.artist-slots#fav-slots
 *       > input.txt.slot[list=artist-options] ... ,
 *       button.chip.add-artist[hidden][data-slots=fav-slots][data-cap=20]
 *   input.txt (text inputs, also the DELETE confirm)
 * Action bar (A-UX 6): div.action-bar > div.action-bar-inner
 *     > span.action-bar-text, .btn.btn-primary [.btn-grow], form.inline-form > .btn-ghost
 *     Place it right after </main> (or as main's last child). It is sticky, so it
 *     keeps its own space in the flow; html:has(.action-bar) also sets
 *     scroll-padding-bottom so focused fields never sit under it.
 * /me
 *   .me-head > h1, p.hint (summary)
 *   section.status-panel.status-none|.status-building|.status-ready|.status-revoked
 *     > h2, p.hint | p.status-meta ; .status-title (ready: playlist title)
 *   section.songs > h2, p.hint, ol.song-list > li.song-row
 *     > span.song-n, div.song-main > span.song-title, span.song-artists,
 *       span.song-why > span.tag-surprise, span ; form.inline-form > button.btn-ghost
 *   p.empty-state (songs_empty)
 *   ul.dislike-list > li.dislike-row > span.dislike-text > s.struck ; form > .btn-ghost
 *   section.danger-zone > h2, p.hint, label.lbl, div.confirm-row > input.txt,
 *     button.btn.btn-danger ; form.inline-form > button.btn-link
 * /admin
 *   main.column.wide ; div.panel-row > section.panel [.panel-grow]
 *   p.quota-figure > span.quota-unit ; svg.meter[viewBox="0 0 100 18"]
 *     [preserveAspectRatio=none][role=img][aria-label] > rect.meter-track,
 *     rect.meter-used[width=pct], rect.meter-stop[x=pct][width=0.6]
 *   div.playlist-links > a
 *   div.table-wrap > table.cards > thead > tr > th[scope=col][.num] ;
 *     tbody > tr > td[data-label][.num]  (stacked cards below 600px)
 *   span.yt-ok | span.yt-bad | span.yt-off ; ol.disliked-songs > li > span.muted
 * /privacy, /terms: div.prose > h1, p, section > h2, p, ul > li
 */

@font-face {
  font-family: "Mukta";
  src: url("fonts/mukta-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mukta";
  src: url("fonts/mukta-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mukta";
  src: url("fonts/mukta-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mukta";
  src: url("fonts/mukta-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yatra One";
  src: url("fonts/yatra-one-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #F6F7FB;
  --surface: #FFFFFF;
  --ink: #1E2233;
  --ink-2: #3A4056;
  --muted: #5A6075;
  --line: #D6D9E4;
  --marigold: #F4A300;
  --peacock: #0F6E6E;
  --danger: #B3261E;
  --rani: #D6246E;
  color-scheme: light;
}

/* ---- Base ---------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(.action-bar) {
  scroll-padding-bottom: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: "Mukta", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

a {
  color: var(--peacock);
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: color-mix(in srgb, var(--peacock) 72%, black);
}

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

img,
svg {
  max-width: 100%;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The hidden attribute must win over component display rules (e.g. button.chip
   "Add another artist", which enhance.js reveals). */
[hidden] {
  display: none !important;
}

/* ---- Page shell ------------------------------------------------------------ */

.column {
  width: 100%;
  max-width: 672px; /* 640px of content plus the 16px gutters */
  margin-inline: auto;
  padding-inline: 16px;
}

main.column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 24px 40px;
}

main.column.narrow {
  gap: 16px;
  padding-top: 40px;
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
}

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

.hint {
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-weight: 500;
}

.link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  font-size: 15px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logo {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
}

/* Nav bar */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: "Yatra One", "Mukta", serif;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover,
.wordmark:focus-visible {
  color: var(--ink);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
}

.nav-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

/* Footer */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 32px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.site-footer > :first-child {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
}

/* ---- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--marigold);
  color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: color-mix(in srgb, var(--marigold) 85%, var(--ink));
  color: var(--ink);
}

.btn-ghost {
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--ground);
  color: var(--ink);
}

.btn-google {
  min-height: 52px;
  padding: 0 22px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
  font-size: 18px;
  font-weight: 700;
}

.btn-google:hover,
.btn-google:focus-visible {
  background: var(--ink-2);
  color: var(--surface);
}

.btn-google .glyph {
  flex: none;
}

.btn-danger {
  min-height: 44px;
  padding: 0 16px;
  border-color: var(--danger);
  background: var(--surface);
  color: var(--danger);
  font-size: 15px;
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
}

.btn-link {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--peacock);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.btn-link:hover,
.btn-link:focus-visible {
  color: color-mix(in srgb, var(--peacock) 72%, black);
}

.btn-grow {
  flex: 1 1 auto;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

/* ---- Signboard + landing --------------------------------------------------- */

.signboard {
  display: flex;
  flex-direction: column;
}

.trim {
  display: block;
  width: 100%;
  height: 20px;
}

.trim-flip {
  transform: scaleY(-1);
}

.trim-scallop {
  fill: var(--rani);
}

.trim-dot {
  fill: var(--ground);
}

.board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 14px 22px;
  border: 5px solid var(--ink);
  border-radius: 6px;
  background: var(--marigold);
  color: var(--ink);
  text-align: center;
}

.board-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.board-motif {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
}

.motif-leaf {
  fill: var(--ink);
}

.motif-dot {
  fill: var(--peacock);
}

.board-title {
  font-family: "Yatra One", "Mukta", serif;
  font-weight: 400;
  font-size: clamp(40px, 14vw, 54px);
  line-height: 1;
  color: var(--ink);
}

.board-tagline {
  font-family: "Yatra One", "Mukta", serif;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
}

main.column.landing {
  gap: 32px;
  padding-top: 24px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  max-width: 34em;
}

.hero h2 {
  font-size: 26px;
  line-height: 1.2;
}

.hero .lead {
  font-size: 17px;
}

.steps {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 3px solid var(--ink);
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 18px 16px;
}

.steps li:last-child {
  padding-bottom: 2px;
}

.step-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--peacock);
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

/* ---- Notices and errors ---------------------------------------------------- */

.notice {
  padding: 12px 14px;
  border: 2px solid var(--peacock);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.error-summary {
  padding: 12px 14px;
  border: 2px solid var(--danger);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: color-mix(in srgb, var(--danger) 65%, black);
  font-size: 16px;
  font-weight: 600;
}

.error-summary ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

.field-error {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: color-mix(in srgb, var(--danger) 65%, black);
}

/* ---- Forms (/prefs) -------------------------------------------------------- */

.me-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prefs-form {
  display: flex;
  flex-direction: column;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.form-section h2 {
  font-size: 21px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lbl {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.native {
  font-weight: 500;
  color: var(--muted);
}

.lang-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

/* Real radio/checkbox inputs, visually hidden but focusable; the face follows. */
.option {
  position: relative;
  display: flex;
  min-width: 0;
  cursor: pointer;
}

.option-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.option-input:focus-visible + * {
  outline: 3px solid var(--peacock);
  outline-offset: -3px;
}

/* Segmented control */
.segmented {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.segmented.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented .option + .option {
  border-left: 1px solid var(--line);
}

.segmented-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 2px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.option-input:hover + .segmented-face,
.option-input:focus-visible + .segmented-face {
  background: var(--ground);
}

.option-input:checked + .segmented-face {
  background: var(--marigold);
  font-weight: 800;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.option:has(> .chip) {
  align-self: flex-start;
}

button.chip {
  align-self: flex-start;
}

button.chip:hover,
button.chip:focus-visible,
.option-input:hover + .chip,
.option-input:focus-visible + .chip {
  background: var(--ground);
}

.option-input:checked + .chip {
  background: var(--marigold);
  font-weight: 800;
}

.option-input:focus-visible + .chip {
  outline-offset: 2px;
}

/* Tuning band */
.tuning-band {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}

.band-ticks {
  display: block;
  width: 100%;
  height: 18px;
}

.band-tick {
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.band-needle {
  fill: var(--danger);
}

.band-needle.is-off,
.tuning-band:has(.option-input[value="all"]:checked) .band-needle {
  display: none;
}

.band-grid {
  display: grid;
  grid-template-columns: 5fr 5fr 5fr 9fr;
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.band-grid .option + .option {
  border-left: 1px solid var(--line);
}

.band-face {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  padding: 8px 4px; /* 6px from 360px; "Morning" must fit 59px at 320 */
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.option-input:hover + .band-face,
.option-input:focus-visible + .band-face {
  background: var(--ground);
}

.option-input:checked + .band-face {
  background: var(--marigold);
}

.band-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: normal;
}

.band-hours {
  display: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.band-ruler {
  display: grid;
  grid-template-columns: 5fr 5fr 5fr 9fr;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

.band-ruler-last {
  display: flex;
  justify-content: space-between;
}

.tuning-band > .option {
  margin-top: 12px;
}

/* Sliders (mood mix, surprise me) */
.slider-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.slider {
  display: flex;
  flex-direction: column;
}

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.slider-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
  text-align: right;
}

.slider input[type="range"] {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.ticks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
}

.ticks span {
  text-align: center;
}

.ticks span:first-child {
  text-align: left;
}

.ticks span:last-child {
  text-align: right;
}

/* Mix bar */
.mood-mix {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mix-bar {
  display: block;
  width: 100%;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
}

.mix-a {
  fill: var(--marigold);
}

.mix-b {
  fill: var(--peacock);
}

.mix-c {
  fill: var(--ink);
}

.mix-none {
  fill: var(--line);
}

.mix-legend {
  font-size: 15px;
  font-weight: 700;
}

/* Era */
.era-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.era-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.era-examples {
  font-size: 14px;
}

/* Artists */
.artist-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.artist-slots + .artist-slots {
  margin-top: 10px;
}

.txt {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}

.txt[aria-invalid="true"] {
  border-color: var(--danger);
}

/* ---- Action bar (A-UX 6) --------------------------------------------------- */

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: 10px 16px;
  background: var(--surface);
  border-top: 2px solid var(--ink);
}

.action-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 640px;
  margin-inline: auto;
}

.action-bar-text {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

.action-bar .btn {
  flex: none;
  padding-inline: 16px;
}

.action-bar .btn-grow {
  flex: 1 1 auto;
}

.action-bar .btn-ghost {
  min-height: 48px;
}

/* ---- /me ------------------------------------------------------------------- */

.status-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
}

.status-panel h2 {
  font-size: 20px;
}

.status-building {
  gap: 6px;
  border-color: var(--peacock);
}

.status-building h2 {
  color: var(--peacock);
}

.status-ready {
  gap: 2px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.status-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.status-meta {
  font-size: 15px;
  color: color-mix(in srgb, var(--surface) 82%, var(--ink));
}

.status-ready a {
  color: var(--surface);
}

.status-ready :focus-visible {
  outline-color: var(--marigold);
}

.status-revoked {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: color-mix(in srgb, var(--danger) 65%, black);
}

.status-revoked .hint {
  color: color-mix(in srgb, var(--danger) 65%, black);
}

.songs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.songs h2 {
  font-size: 22px;
}

.song-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.song-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.song-row + .song-row {
  border-top: 1px solid var(--line);
}

.song-n {
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.song-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.song-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.song-artists {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-why {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.tag-surprise {
  padding: 0 8px;
  border-radius: 999px;
  background: var(--marigold);
  color: var(--ink);
  font-weight: 800;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--muted);
  border-radius: 12px;
  font-size: 16px;
  color: var(--ink-2);
}

.dislike-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dislike-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px dashed var(--muted);
  border-radius: 10px;
}

.dislike-text {
  min-width: 0;
  font-size: 16px;
  color: var(--ink-2);
}

.struck {
  text-decoration: line-through;
}

.danger-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.danger-zone h2 {
  font-size: 18px;
}

.danger-zone .lbl {
  font-size: 15px;
}

.confirm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.confirm-row .txt {
  flex: 1 1 160px;
  width: auto;
}

/* ---- /admin ---------------------------------------------------------------- */

.panel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.panel-row > .panel {
  flex: 1 1 280px;
}

.panel-row > .panel-grow {
  flex: 2 1 420px;
}

.panel h2 {
  font-size: 18px;
}

.quota-figure {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.quota-unit {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.meter {
  display: block;
  width: 100%;
  height: 18px;
  overflow: visible;
}

.meter-track {
  fill: var(--line);
}

.meter-used {
  fill: var(--ink);
}

.meter-stop {
  fill: var(--marigold);
}

.playlist-links {
  display: flex;
  flex-direction: column;
}

.playlist-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
}

.yt-ok {
  color: var(--peacock);
  font-weight: 700;
}

.yt-bad {
  color: color-mix(in srgb, var(--danger) 65%, black);
  font-weight: 700;
}

.yt-off {
  color: var(--muted);
  font-weight: 700;
}

.num {
  font-variant-numeric: tabular-nums;
}

.disliked-songs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
  font-size: 16px;
}

/* Users table: stacked cards below 600px, a normal table from 600px up. */
table.cards,
table.cards tbody,
table.cards tr,
table.cards td {
  display: block;
}

table.cards {
  width: 100%;
  border-collapse: collapse;
}

table.cards thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

table.cards tr {
  margin-bottom: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

table.cards td {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 12px;
  padding: 2px 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

table.cards td::before {
  content: attr(data-label);
  color: var(--muted);
  font-weight: 700;
}

/* ---- /privacy, /terms ------------------------------------------------------ */

.prose {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prose section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prose p,
.prose li {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

.prose ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding-left: 22px;
}

/* ---- Small phones and up --------------------------------------------------- */

@media (min-width: 360px) {
  .band-hours {
    display: block;
  }

  .band-face {
    padding-inline: 6px;
  }

  .ticks {
    font-size: 12px;
  }

  .nav .wordmark {
    font-size: 26px;
  }
}

/* ---- 600px and up ---------------------------------------------------------- */

@media (min-width: 600px) {
  h1 {
    font-size: 32px;
    line-height: 1.1;
  }

  .nav {
    padding-inline: 24px;
  }

  .band-name {
    font-size: 15px;
  }

  .action-bar {
    padding: 12px 16px;
  }

  .action-bar-text {
    font-size: 14px;
    line-height: 1.35;
  }

  .action-bar .btn {
    padding-inline: 20px;
    font-size: 18px;
  }

  .action-bar .btn-ghost {
    font-size: 15px;
  }

  /* Landing: signboard on top, value + 3 steps side by side when they fit. */
  .page-landing .column {
    max-width: 1088px; /* 1040px of content */
    padding-inline: 24px;
  }

  main.column.landing {
    flex-flow: row wrap;
    align-items: flex-start;
    gap: 56px 48px;
    padding-block: 48px 64px;
  }

  main.column.landing > * {
    flex: 1 1 100%;
  }

  main.column.landing > .hero {
    flex: 999 1 420px;
    min-width: 0;
    gap: 20px;
  }

  main.column.landing > .steps {
    flex: 1 1 300px;
    min-width: 0;
  }

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

  .hero h2 {
    font-size: 34px;
    line-height: 1.15;
  }

  .hero .lead {
    font-size: 19px;
  }

  .steps li {
    padding: 4px 0 22px 20px;
  }

  .steps li:last-child {
    padding-bottom: 4px;
  }

  .step-title {
    font-size: 19px;
  }

  .steps .hint {
    font-size: 16px;
  }

  .page-landing .site-footer > :first-child {
    max-width: 46em;
  }

  .trim {
    height: 28px;
  }

  .board {
    gap: 10px;
    padding: 40px 32px 36px;
    border-width: 6px;
  }

  .board-motif {
    display: block;
  }

  .board-title {
    font-size: clamp(56px, 11vw, 120px);
    letter-spacing: 0.01em;
  }

  .board-tagline {
    font-size: clamp(20px, 3.2vw, 30px);
  }

  /* Admin */
  main.column.wide {
    max-width: 1168px; /* 1120px of content */
    padding-inline: 24px;
    gap: 28px;
  }

  .panel {
    padding: 18px;
  }

  .quota-figure {
    font-size: 28px;
  }

  .playlist-links a {
    min-height: 36px;
  }

  .table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  table.cards {
    display: table;
  }

  table.cards thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
  }

  table.cards tbody {
    display: table-row-group;
  }

  table.cards tr {
    display: table-row;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
  }

  table.cards th,
  table.cards td {
    display: table-cell;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    text-align: left;
    white-space: nowrap;
  }

  table.cards th {
    border-top: 0;
    background: var(--ground);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 800;
  }

  table.cards td::before {
    content: none;
  }

  table.cards .num {
    text-align: right;
  }
}

/* ---- Motion: state changes only, and none when reduced motion is asked. ---- */

@media (prefers-reduced-motion: no-preference) {
  .segmented-face,
  .band-face,
  .chip,
  .btn {
    transition: background-color 120ms ease-out;
  }
}
