/* LINK — match.css
   The York Match quiz at /match. Tokens, fonts and the store buttons come
   from main.css; this file is only what the quiz adds. Phone first: the
   page is built for 390px inside the Instagram and Snapchat browsers, and
   everything a thumb hits is 48px or taller.

   Rule carried over from the app: lime, cyan and pink are fills or type on
   ink only. Type on lime is ink. */

.quiz {
  position:relative; z-index:2; min-height:100svh;
  display:flex; flex-direction:column;
  max-width:600px; margin:0 auto; padding:0 16px env(safe-area-inset-bottom);
}

/* ---------- top bar ---------- */
.quiz__bar {
  display:grid; grid-template-columns:48px 1fr auto; grid-template-rows:auto auto;
  align-items:center; column-gap:8px; row-gap:12px; padding:12px 0 18px;
}
.quiz__back {
  grid-row:1; grid-column:1; width:48px; height:48px; margin-left:-10px;
  display:inline-flex; align-items:center; justify-content:center;
  background:none; border:0; color:var(--paper); cursor:pointer;
}
.quiz__back[hidden] { display:none; }
.quiz__back svg { width:26px; height:26px; }
.quiz__back:hover { color:var(--cyan); }
.quiz__brand {
  grid-row:1; grid-column:2; display:inline-flex; align-items:center; gap:9px; min-height:48px;
  color:var(--paper); width:fit-content;
}
.quiz__brand svg { width:26px; height:26px; color:var(--lime); overflow:visible; }
.quiz__brand span {
  font-family:var(--mono); font-size:11px; font-weight:600; letter-spacing:0.22em; text-transform:uppercase;
}
.quiz__count { grid-row:1; grid-column:3; font-family:var(--mono); font-size:12px; letter-spacing:0.14em; color:var(--dim); }
.progress { grid-row:2; grid-column:1 / -1; display:flex; gap:5px; height:4px; }
.progress span { flex:1; background:var(--line); transition:background 0.25s ease; }
.progress span.is-done { background:var(--lime); }
.progress span.is-now { background:var(--cyan); }
.quiz[data-step="intro"] .progress, .quiz[data-step="done"] .progress { visibility:hidden; }

/* ---------- steps ---------- */
.quiz__main { flex:1; display:flex; flex-direction:column; }
.qstep { display:flex; flex-direction:column; gap:16px; padding-bottom:28px; animation:rise 0.32s cubic-bezier(0.16,1,0.3,1) both; }
.qstep[hidden] { display:none; }

.eyebrow-line { font-family:var(--mono); font-size:11px; letter-spacing:0.22em; text-transform:uppercase; color:var(--cyan); }
.eyebrow-line--lime { color:var(--lime); }
.qstep__h1, .qstep__title {
  width:fit-content; max-width:100%; font-family:var(--display); font-weight:400; text-transform:uppercase;
  letter-spacing:0.02em; line-height:0.92; transform:var(--skew); transform-origin:left;
  text-shadow:4px 0 0 var(--pink),-4px 0 0 var(--cyan);
  /* the skew leans the right edge past the gutter on a long line */
  padding-right:0.3em; text-wrap:balance;
}
.qstep__h1 { font-size:clamp(40px,11vw,74px); margin-top:clamp(12px,4vw,36px); }
.qstep__title { font-size:clamp(30px,8vw,52px); }
.qstep__title--lime { color:var(--lime); text-shadow:none; }
.qstep__lede { max-width:40ch; font-family:var(--mono); font-size:clamp(14px,3.6vw,16px); line-height:1.55; color:var(--muted); }
.qstep__hint { font-family:var(--mono); font-size:13px; letter-spacing:0.04em; color:var(--dim); }
.qstep__hint b, #genre-count { color:var(--lime); font-weight:600; }
.qstep__label { font-family:var(--mono); font-size:11px; letter-spacing:0.2em; text-transform:uppercase; color:var(--dim); margin-top:6px; }
.qstep__note { font-family:var(--mono); font-size:12px; line-height:1.6; color:var(--dim); }
.qstep__note a { color:var(--cyan); text-decoration:underline; text-underline-offset:3px; }
.qstep__confirm { font-family:var(--mono); font-size:14px; line-height:1.55; color:var(--paper); border-left:3px solid var(--lime); padding:4px 0 4px 14px; }
.qstep__confirm b { display:block; color:var(--lime); font-weight:600; overflow-wrap:anywhere; }
.qstep__actions { display:flex; flex-direction:column; align-items:flex-start; gap:14px; margin-top:8px; }

/* ---------- buttons ---------- */
.btn--big {
  border:0; cursor:pointer; min-height:56px; padding:16px 30px;
  font-size:clamp(20px,5vw,24px); -webkit-tap-highlight-color:transparent;
}
.btn:disabled, .btn.is-busy { background:var(--line-mid); color:var(--paper); cursor:default; }
.link-btn {
  background:none; border:0; cursor:pointer; min-height:48px; padding:0 4px;
  font-family:var(--mono); font-size:12px; letter-spacing:0.16em; text-transform:uppercase; color:var(--dim);
  text-decoration:underline; text-underline-offset:4px;
}
.link-btn:hover { color:var(--cyan); }

/* ---------- chips ---------- */
.chips { display:grid; gap:10px; grid-template-columns:1fr; }
.chips--two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.chips--row { grid-template-columns:repeat(auto-fit,minmax(88px,1fr)); }
.chip {
  min-height:52px; padding:12px 14px; cursor:pointer; -webkit-tap-highlight-color:transparent;
  display:inline-flex; align-items:center; justify-content:center; text-align:center;
  background:var(--panel); border:2px solid var(--line); color:var(--paper);
  font-family:var(--mono); font-size:14px; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; line-height:1.2;
  transition:border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.chip:hover { border-color:var(--line-mid); }
.chip[aria-pressed="true"] { background:var(--lime); border-color:var(--lime); color:var(--ink); }
.chip:active { transform:scale(0.97); }
.chip.is-off { opacity:0.38; }
.chip--other { border-style:dashed; }
/* "Show 25 more": the full row, dashed like Other, so it reads as a control
   rather than a 13th interest. */
.chip--more { grid-column:1 / -1; border-style:dashed; color:var(--cyan); }
.chip--more:hover { border-color:var(--cyan); }

/* ---------- course search ---------- */
.search input {
  width:100%; min-height:56px; padding:14px 16px; background:var(--panel); border:2px solid var(--line-mid);
  color:var(--paper); font-family:var(--mono); font-size:16px; outline:none; -webkit-appearance:none; appearance:none; border-radius:0;
}
.search input:focus { border-color:var(--cyan); }
.search input::-webkit-search-cancel-button { -webkit-appearance:none; }
.list { display:flex; flex-direction:column; border-top:1px solid var(--line-soft); }
.list__item {
  min-height:52px; padding:12px 6px; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:none; border:0; border-bottom:1px solid var(--line-soft); color:var(--paper);
  font-family:var(--body); font-size:16px; line-height:1.3;
}
.list__item:hover { color:var(--cyan); }
.list__item::after {
  content:''; width:8px; height:8px; flex:none; border-right:2px solid var(--dim); border-top:2px solid var(--dim); transform:rotate(45deg);
}
.list__label { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.list__name { line-height:1.3; }
.list__group { font-family:var(--mono); font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:var(--dim); }
.list__item[aria-selected="true"] .list__name { color:var(--lime); }
.list__item mark { background:none; color:var(--lime); }

/* ---------- reward ---------- */
.step--reward { padding-top:clamp(12px,6vw,48px); }
.reward__n {
  font-family:var(--display); font-size:clamp(96px,30vw,180px); line-height:0.85; letter-spacing:0.02em;
  transform:var(--skew); transform-origin:left; color:var(--lime); width:fit-content; padding-right:0.2em;
}

/* ---------- claim form ---------- */
.claim { display:flex; flex-direction:column; gap:18px; }
.field { display:flex; flex-direction:column; gap:7px; }
.field__label { font-family:var(--mono); font-size:11px; letter-spacing:0.2em; text-transform:uppercase; color:var(--dim); }
.field input {
  width:100%; min-height:56px; padding:14px 16px; background:var(--panel); border:2px solid var(--line-mid);
  color:var(--paper); font-family:var(--mono); font-size:16px; outline:none; -webkit-appearance:none; appearance:none; border-radius:0;
}
.field input:focus { border-color:var(--cyan); }
.field input.is-bad { border-color:var(--pink); }
.field input.is-warn { border-color:var(--cyan); }
.field input.is-good { border-color:var(--lime); }
.field__msg { font-family:var(--mono); font-size:12px; letter-spacing:0.04em; line-height:1.4; min-height:0; }
.field__msg:empty { display:none; }
.field__msg.is-bad { color:var(--pink); }
.field__msg.is-warn { color:var(--cyan); }
.field__msg.is-good { color:var(--lime); }

.tick { display:flex; align-items:center; gap:14px; min-height:48px; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.tick input { position:absolute; opacity:0; width:1px; height:1px; }
.tick__box { width:30px; height:30px; flex:none; border:2px solid var(--line-mid); background:var(--panel); position:relative; transition:background 0.15s ease, border-color 0.15s ease; }
.tick input:checked + .tick__box { background:var(--lime); border-color:var(--lime); }
.tick input:checked + .tick__box::after {
  content:''; position:absolute; left:9px; top:3px; width:8px; height:15px;
  border-right:3px solid var(--ink); border-bottom:3px solid var(--ink); transform:rotate(45deg);
}
.tick input:focus-visible + .tick__box { outline:3px solid var(--cyan); outline-offset:3px; }
.tick__text { font-family:var(--mono); font-size:15px; color:var(--paper); }
.tick.is-bad .tick__box { border-color:var(--pink); }

.form-status { font-family:var(--mono); font-size:12px; letter-spacing:0.04em; color:var(--pink); }
.form-status:empty { display:none; }

/* Honeypot: off-canvas, never display:none (some bots check for that). */
.trap { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ---------- done: the official store badges ---------- */
/* Apple's and Google's own artwork, untouched (partials/store-badges.html).
   Apple asks for a 40px minimum height and clear space of a quarter of that;
   Google's PNG carries its own margin. The anchor pads to a 48px tap target
   without touching the badge. App Store first, everywhere. */
.app-badges { display:flex; flex-wrap:wrap; align-items:center; gap:12px 14px; margin-top:8px; }
.app-badge { display:inline-flex; align-items:center; min-height:48px; -webkit-tap-highlight-color:transparent; }
.app-badge img { display:block; height:auto; }
.app-badge--apple img { width:135px; }
.app-badge--google img { width:170px; margin:-10px; }

/* ---------- footer ---------- */
.quiz__foot { padding:18px 0 26px; border-top:1px solid var(--line-soft); font-family:var(--mono); font-size:11px; line-height:1.7; letter-spacing:0.06em; color:var(--dim); }
.quiz__foot a { color:var(--dim); text-decoration:underline; text-underline-offset:3px; min-height:44px; display:inline-flex; align-items:center; }
.quiz__foot a:hover { color:var(--cyan); }

@media (min-width:600px) {
  .chips--two { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .qstep { animation:none; }
}

/* ==========================================================================
   v2.1 components, lifted from James's Taste Drop page (/music) and rebuilt
   here on the same Neon Clash 2a tokens (§1b). His look, our code, our copy.
   ========================================================================== */

/* ---------- artist tile grid ---------- */
/* Square Apple artwork with the name under it. Tap adds, tap again removes.
   A picked tile gets a lime ring and a tick (numbers belong to the genre-rank
   step only: artists are a set, not an order); at five, the rest step back. Three across at phone width, four from 560px. */
.art-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 12px; }
@media (min-width:560px) { .art-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
.art-tile {
  position:relative; display:flex; flex-direction:column; gap:8px; padding:0; min-height:48px;
  background:none; border:0; color:var(--paper); cursor:pointer; text-align:left;
  -webkit-tap-highlight-color:transparent;
}
.art-grid.is-fresh .art-tile { animation:art-in .35s cubic-bezier(.16,.84,.3,1) both; }
.art-grid.is-fresh .art-tile:nth-child(2) { animation-delay:.03s; }
.art-grid.is-fresh .art-tile:nth-child(3) { animation-delay:.06s; }
.art-grid.is-fresh .art-tile:nth-child(4) { animation-delay:.09s; }
.art-grid.is-fresh .art-tile:nth-child(5) { animation-delay:.12s; }
.art-grid.is-fresh .art-tile:nth-child(n+6) { animation-delay:.15s; }
@keyframes art-in { from { opacity:0; transform:translateY(8px); } }
.art-tile__art {
  display:grid; place-items:center; width:100%; height:auto; aspect-ratio:1; border-radius:14px; object-fit:cover;
  background:var(--panel-2); font:400 40px var(--display); color:var(--lime);
  outline:3px solid transparent; outline-offset:3px;
  transition:transform .18s ease, outline-color .18s ease, opacity .18s ease;
}
.art-tile:active .art-tile__art { transform:scale(.96); }
.art-tile[aria-pressed="true"] .art-tile__art { outline-color:var(--lime); }
.art-tile:focus-visible { outline:none; }
.art-tile:focus-visible .art-tile__art { outline-color:var(--cyan); }
.art-grid.is-full .art-tile[aria-pressed="false"] .art-tile__art { opacity:.38; }
.art-tile[aria-pressed="true"]::after {
  content:'\2713'; position:absolute; top:-6px; right:-6px;
  width:28px; height:28px; border-radius:50%; display:grid; place-items:center;
  background:var(--lime); color:var(--ink); font:700 16px/1 var(--body);
  box-shadow:0 0 0 3px var(--ink); animation:art-pop .25s cubic-bezier(.3,1.6,.5,1) both;
}
@keyframes art-pop { from { transform:scale(.3); } }
.art-tile__name { font:400 13px/1.3 var(--body); color:var(--muted); overflow-wrap:anywhere; }
.art-tile[aria-pressed="true"] .art-tile__name { color:var(--paper); }
/* No artwork from Apple: the artist's initial, in the display face, on the tile. */
.art-tile__art--blank { font-size:44px; }

/* ---------- the pick counter ---------- */
/* Three solid pips for the picks that are needed, two dashed for the optional
   ones. "2 OF 3" → "3 PICKED" → "5 OF 5". */
.pick-meter { display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap; min-height:40px; }
.pick-meter__pips { display:flex; gap:4px; }
.pick-meter__pips i {
  width:10px; height:10px; border-radius:3px; background:var(--line-mid);
  border:1.5px solid transparent; transition:background .2s ease, border-color .2s ease;
}
.pick-meter__pips i.is-extra { background:transparent; border:1.5px dashed var(--dim); }
.pick-meter__pips i.is-on { background:var(--lime); border-color:var(--lime); }
.pick-meter__count { font:400 13px var(--mono); letter-spacing:.12em; color:var(--muted); white-space:nowrap; }
.pick-meter.is-ready .pick-meter__count { color:var(--paper); }
.pick-meter__hint { font:400 12px/1.3 var(--mono); letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-left:auto; text-align:right; }
.pick-meter.is-ready .pick-meter__hint { color:var(--lime); }

/* ---------- pill chips (York colleges) ---------- */
/* One optional tap; a picked one fills lime, and tapping it again clears it.
   They wrap onto rows: no sideways scrolling (Seth, 17 Oct). */
.pill-row { display:flex; flex-wrap:wrap; gap:8px; }
.pill {
  flex:none; white-space:nowrap; min-height:48px;
  font:400 14px var(--body); color:var(--paper); background:none; cursor:pointer;
  border:1px solid var(--line-mid); border-radius:999px; padding:8px 16px;
  -webkit-tap-highlight-color:transparent; transition:background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.pill:hover { border-color:var(--lime); }
.pill:active { transform:scale(.97); }
.pill[aria-pressed="true"] { background:var(--lime); border-color:var(--lime); color:var(--ink); font-weight:600; }

/* ---------- the big call to action ---------- */
/* The house skewed lime button at full size, with James's "ready" pulse: a ring
   that breathes out while it waits to be pressed, a press that gives, and a
   grey, inert state until the step is done. */
.cta-big {
  display:inline-flex; align-items:center; justify-content:center; min-height:60px;
  padding:17px 28px; border:0; cursor:pointer; -webkit-tap-highlight-color:transparent;
  font-family:var(--display); font-size:clamp(19px,5.2vw,26px); letter-spacing:.04em; line-height:1.05;
  text-transform:uppercase; text-wrap:balance; text-align:center;
  background:var(--lime); color:var(--ink); transform:var(--skew);
  transition:transform .12s ease, background .15s ease;
}
/* The dark lime block round James's button is his pulse ring caught mid-breath
   (his CSS has no offset shadow). Here it is held as a constant halo, and the
   pulse breathes out from it. */
.cta-big:not([disabled]) { box-shadow:0 0 0 7px rgba(182,255,0,.24), 0 0 0 7px rgba(182,255,0,.5); animation:cta-ready 1.8s ease-out infinite; }
@keyframes cta-ready { 70% { box-shadow:0 0 0 7px rgba(182,255,0,.24), 0 0 0 17px rgba(182,255,0,0); } 100% { box-shadow:0 0 0 7px rgba(182,255,0,.24), 0 0 0 7px rgba(182,255,0,0); } }
.cta-big:hover { background:var(--pink); }
.cta-big:active { transform:var(--skew) scale(.97); }
.cta-big[disabled] { background:var(--line-mid); color:var(--dim); cursor:default; animation:none; }
.cta-big[aria-busy="true"] { animation:none; opacity:.7; }
.cta-big--block { width:100%; }
@media (prefers-reduced-motion: reduce) {
  .art-grid.is-fresh .art-tile, .art-tile[aria-pressed="true"]::after, .cta-big:not([disabled]) { animation:none; }
  .cta-big:not([disabled]) { box-shadow:0 0 0 7px rgba(182,255,0,.24); }
}

/* ==========================================================================
   v2.1 quiz steps (§5)
   ========================================================================== */

/* ---------- 1. rank your top 3: the chip wears its number ---------- */
.chip--rank { position:relative; }
.chip--rank[data-rank]::after {
  content:attr(data-rank); position:absolute; top:-9px; right:-9px;
  width:28px; height:28px; border-radius:50%; display:grid; place-items:center;
  background:var(--ink); color:var(--lime); border:2px solid var(--lime);
  font:400 16px/1 var(--display); animation:art-pop .25s cubic-bezier(.3,1.6,.5,1) both;
}

/* ---------- 2. artists ---------- */
.art-grid__more { min-height:52px; }
.pick-meter.is-nudged { animation:meter-nudge .35s ease; }
@keyframes meter-nudge { 25% { transform:translateX(-6px); } 75% { transform:translateX(6px); } }
.search-panel { display:flex; flex-direction:column; gap:14px; }
.search-panel[hidden] { display:none; }
/* Apple refused or timed out: said plainly, in the warning colour, and the
   grid above keeps working. */
.search-busy { font:400 13px/1.5 var(--mono); color:var(--cyan); border-left:3px solid var(--cyan); padding:2px 0 2px 12px; }
.search-busy[hidden] { display:none; }

/* ---------- 3. song on repeat ---------- */
.song-list { display:flex; flex-direction:column; border-top:1px solid var(--line-soft); }
.song-row {
  display:flex; align-items:center; gap:12px; min-height:64px; padding:8px 4px; text-align:left;
  background:none; border:0; border-bottom:1px solid var(--line-soft); color:var(--paper); cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.song-row:hover .song-row__name { color:var(--cyan); }
.song-row__art { width:48px; height:48px; border-radius:8px; object-fit:cover; flex:none; background:var(--panel-2); }
.song-row__text, .song-picked__text { display:flex; flex-direction:column; gap:3px; min-width:0; }
.song-row__name, .song-picked__name { font:400 16px/1.3 var(--body); overflow-wrap:anywhere; }
.song-row__by, .song-picked__by { font:400 11px var(--mono); letter-spacing:.08em; text-transform:uppercase; color:var(--dim); }
.song-picked { display:flex; align-items:center; gap:14px; padding:10px; border:2px solid var(--lime); border-radius:14px; background:var(--panel); }
.song-picked[hidden] { display:none; }
.song-picked__art { width:64px; height:64px; border-radius:10px; object-fit:cover; flex:none; }
.song-picked__art[hidden] { display:none; }
.song-picked__text { flex:1; }
.song-picked__clear { width:48px; height:48px; flex:none; background:none; border:0; color:var(--muted); font-size:28px; cursor:pointer; }

/* ---------- 4. night in or night out: three big taps ---------- */
.nights { display:grid; gap:12px; }
.night {
  min-height:76px; padding:18px 22px; cursor:pointer; -webkit-tap-highlight-color:transparent;
  background:var(--panel); border:2px solid var(--line); color:var(--paper); text-align:left;
  font-family:var(--display); font-size:clamp(26px,7vw,34px); letter-spacing:.02em; text-transform:uppercase;
  transition:background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.night:hover { border-color:var(--line-mid); }
.night:active { transform:scale(.98); }
.night[aria-pressed="true"] { background:var(--lime); border-color:var(--lime); color:var(--ink); }

.btn--big:disabled { background:var(--line-mid); color:var(--dim); cursor:default; }
