/* youwouldn't: one stylesheet for every page.
   Sections: fonts, tokens, base, layout, header/footer, buttons, cards,
   home, player, options, results, distribution chart, verdicts, prose, utilities. */

/* ---------------------------------------------------------------- Fonts */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin-wght.woff2') format('woff2-variations'), url('/fonts/bricolage-grotesque-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin-ext-wght.woff2') format('woff2-variations'), url('/fonts/bricolage-grotesque-latin-ext-wght.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- Tokens */

:root {
  color-scheme: light;

  --ink: #1d1838;
  --ink-2: #4b4568;
  --ink-3: #6e6890;
  --paper: #f3f0ff;
  --paper-dot: #ddd6ff;
  --card: #ffffff;

  --tomato: #ff6b4a;
  --lemon: #ffd84d;
  --grape: #a08cff;
  --mint: #5ed39a;
  --sky: #6cc4ff;
  --bubblegum: #ff9fd6;

  --tomato-soft: #ffe2da;
  --lemon-soft: #fff4c4;
  --grape-soft: #ebe6ff;
  --mint-soft: #d8f6e7;
  --sky-soft: #dbf0ff;
  --bubblegum-soft: #ffe2f3;

  --font: 'Bricolage Grotesque', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --line: 2.5px;
  --radius: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --lift: 0 5px 0 var(--ink);
  --lift-sm: 0 3px 0 var(--ink);
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* A quiz's colour. Set data-tone on any element to re-colour it and its children. */
[data-tone='tomato'] { --tone: var(--tomato); --tone-soft: var(--tomato-soft); }
[data-tone='lemon'] { --tone: var(--lemon); --tone-soft: var(--lemon-soft); }
[data-tone='grape'] { --tone: var(--grape); --tone-soft: var(--grape-soft); }
[data-tone='mint'] { --tone: var(--mint); --tone-soft: var(--mint-soft); }
[data-tone='sky'] { --tone: var(--sky); --tone-soft: var(--sky-soft); }
[data-tone='bubblegum'] { --tone: var(--bubblegum); --tone-soft: var(--bubblegum-soft); }

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 450;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--paper-dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
[tabindex='-1']:focus { outline: none; }

::selection { background: var(--lemon); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink); color: #fff;
  border-radius: 999px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- Layout */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { flex: 1; }

/* ---------------------------------------------------------------- Header and footer */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo { display: inline-flex; border-radius: 14px; }
.logo img { height: 42px; width: auto; }

.site-nav { display: flex; gap: 8px; align-items: center; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: var(--line) solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.nav-link:hover { background: var(--card); border-color: var(--ink); }
.nav-link[aria-current='page'] { background: var(--card); border-color: var(--ink); box-shadow: var(--lift-sm); }
.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px; height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--lemon);
  border: 2px solid var(--ink);
  font-size: 13px;
  line-height: 1;
}

.site-footer { margin-top: 72px; border-top: var(--line) solid var(--ink); background: var(--card); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 15px; }
.footer-brand img { width: 36px; height: 36px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 700; font-size: 15px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------- Buttons */

.btn {
  --btn-bg: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--btn-bg);
  box-shadow: var(--lift-sm);
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; box-shadow: var(--lift-sm); }
.btn-primary { --btn-bg: var(--tomato); }
.btn-tone { --btn-bg: var(--tone, var(--tomato)); }
.btn-dark { --btn-bg: var(--ink); color: #fff; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn .arrow { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- Cards and stickers */

.card {
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--lift);
}

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.sticker-tone { background: var(--tone, var(--lemon)); }

.art-plate {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--tone-soft, var(--grape-soft));
  border: var(--line) solid var(--ink);
}
.art-plate img { width: 70%; height: 70%; }

/* ---------------------------------------------------------------- Home */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding-top: clamp(20px, 5vw, 56px);
}

.hero-copy { display: grid; gap: 22px; justify-items: start; }

.hero-title {
  font-size: clamp(46px, 5.6vw, 76px);
  line-height: .98;
  letter-spacing: -0.035em;
}
.hero-title .line { display: block; }
.hero-title .swash {
  position: relative;
  display: inline-block;
  padding: 0 .12em .04em;
  margin-top: .08em;
  background: var(--lemon);
  border: var(--line) solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--lift);
  transform: rotate(-2deg);
  white-space: nowrap;
}
.hero-lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 30em; }

.week-strip { display: grid; gap: 10px; }
.week-strip-label { font-weight: 700; font-size: 15px; color: var(--ink-2); }
.week-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.week-dot {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 2px dashed var(--ink-3);
  background: rgb(255 255 255 / .6);
}
.week-dot.done { border: 2px solid var(--ink); background: var(--tone-soft, var(--lemon-soft)); box-shadow: 0 2px 0 var(--ink); }
.week-dot img { width: 28px; height: 28px; }

.today-card { position: relative; overflow: hidden; }
.today-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 170px 18px 22px;
  background: var(--tone);
  border-bottom: var(--line) solid var(--ink);
}
.today-body { display: grid; gap: 16px; padding: 24px 24px 26px; }
.today-art {
  width: 132px; height: 132px;
  margin: -84px 0 0 auto;
  background: var(--card);
  position: relative;
}
.today-title { font-size: clamp(30px, 3.4vw, 40px); margin-top: -8px; }
.today-blurb { color: var(--ink-2); }
.today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.today-meta { color: var(--ink-3); font-weight: 600; font-size: 15px; }

.next-up {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 2px dashed var(--ink);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / .55);
  font-size: 15px;
  color: var(--ink-2);
}
.next-up strong { color: var(--ink); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink); white-space: nowrap; }
.next-up .clock { width: 34px; height: 34px; flex: none; }

.section { margin-top: clamp(56px, 8vw, 96px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title { font-size: clamp(28px, 3.6vw, 40px); }
.section-sub { color: var(--ink-2); margin-top: 6px; }

.steps, .archive, .verdict-list { list-style: none; margin: 0; padding: 0; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { display: grid; gap: 12px; align-content: start; padding: 22px; }
.step .art-plate { width: 72px; height: 72px; }
.step h3 { font-size: 22px; }
.step p { color: var(--ink-2); font-size: 16px; }

.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.archive-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.archive-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink); }
.archive-card .art-plate { width: 60px; height: 60px; }
.archive-card h3 { font-size: 18px; line-height: 1.15; }
.archive-day { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.archive-result { margin-top: 6px; font-size: 13px; font-weight: 700; }
.archive-result span { background: var(--lemon-soft); border: 1.5px solid var(--ink); border-radius: 999px; padding: 1px 8px; }

/* ---------------------------------------------------------------- Player */

.player-wrap { max-width: 900px; padding-top: clamp(8px, 2vw, 24px); }

.player { overflow: hidden; }

.player-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--tone, var(--lemon));
  border-bottom: var(--line) solid var(--ink);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px 0 10px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--lift-sm);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.back-btn svg { width: 18px; height: 18px; }
.back-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.back-btn:active { transform: translateY(3px); box-shadow: none; }
.back-btn[hidden] { display: none; }

.progress { flex: 1; display: flex; align-items: center; gap: 26px; min-width: 0; }
.progress-track {
  position: relative;
  flex: 1;
  margin-left: 17px;
  height: 16px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--card);
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--progress, 0) * 100%);
  border-radius: 999px;
  background: var(--ink);
  transition: width .35s var(--ease);
}
.progress-marker {
  position: absolute;
  top: 50%;
  left: calc(var(--progress, 0) * 100%);
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  transition: left .35s var(--ease);
}
.progress-count { font-weight: 800; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.player-body { padding: clamp(22px, 4vw, 40px); }

.screen { animation: screen-in .32s var(--ease) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Intro */
.intro { display: grid; gap: 20px; justify-items: center; text-align: center; padding: 8px 0 6px; }
.intro .art-plate { width: 132px; height: 132px; }
.intro h1 { font-size: clamp(34px, 5vw, 54px); max-width: 15em; }
.intro p { color: var(--ink-2); font-size: 19px; max-width: 30em; }
.intro-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }

/* Question */
.question-text {
  font-size: clamp(26px, 3.6vw, 38px);
  margin-bottom: clamp(20px, 3vw, 30px);
}

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.option {
  --c: var(--tomato);
  --c-soft: var(--tomato-soft);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 14px 18px 14px 14px;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--lift-sm);
  text-align: left;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  cursor: pointer;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .15s;
}
.option[data-option='b'] { --c: var(--lemon); --c-soft: var(--lemon-soft); }
.option[data-option='c'] { --c: var(--grape); --c-soft: var(--grape-soft); }
.option[data-option='d'] { --c: var(--mint); --c-soft: var(--mint-soft); }
.option .art-plate { width: 76px; height: 76px; background: var(--c-soft); transition: transform .2s var(--ease), background .15s; }
.option .art-plate img { width: 74%; height: 74%; }
.option-key {
  position: absolute;
  top: 8px; right: 10px;
  min-width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 1.5px solid var(--ink-3);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}
.option:hover .option-key,
.option[aria-pressed='true'] .option-key { color: var(--ink); border-color: var(--ink); }
.option:hover { transform: translateY(-3px); box-shadow: 0 6px 0 var(--ink); background: var(--c-soft); }
.option:hover .art-plate { transform: rotate(-6deg) scale(1.05); background: var(--card); }
.option:active { transform: translateY(3px); box-shadow: none; }
.option[aria-pressed='true'] { background: var(--c); transform: translateY(3px); box-shadow: none; }
.option[aria-pressed='true'] .art-plate { background: var(--card); }
.options.is-locked .option { pointer-events: none; }
.options.is-locked .option:not([aria-pressed='true']) { opacity: .55; }

/* Result */
.result { display: grid; gap: 26px; }
.result-head { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.result-head .art-plate { width: 150px; height: 150px; background: var(--tone-soft); }
.result-kicker { font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.result-name { font-size: clamp(40px, 6vw, 68px); line-height: .95; }
.result-text { font-size: 19px; color: var(--ink-2); max-width: 36em; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.share-status { font-weight: 700; font-size: 15px; color: var(--ink-2); }

.map {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px 12px;
  max-width: 420px;
}
.map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  aspect-ratio: 1.6;
}
.map-cell {
  display: grid;
  place-items: center;
  padding: 4px;
  border: 2px solid var(--ink-3);
  border-radius: 10px;
  background: rgb(255 255 255 / .7);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: var(--ink-3);
}
.map-cell.is-you { border-color: var(--ink); background: var(--tone); color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.map-y, .map-x { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.map-y { flex-direction: column; align-items: center; }
.map-y span { writing-mode: vertical-rl; transform: rotate(180deg); }
.map-x { grid-column: 2; }

.next-quiz img { width: 40px; height: 40px; flex: none; }
.next-quiz { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--ink-2); padding-top: 22px; border-top: 2px dashed var(--ink-3); }

.message { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 20px 0; }
.message .art-plate { width: 110px; height: 110px; }
.message h1 { font-size: clamp(30px, 4vw, 44px); }
.message p { color: var(--ink-2); max-width: 30em; }

/* ---------------------------------------------------------------- Distribution chart
   Shown under the card after you answer: how everyone answered the question you just did.
   Your answer grows to the left of the centre line with its label; everyone else's
   answers grow to the right, unlabelled. Both sides share one length scale, --max-len,
   in container units so it always fits the narrower (right-hand) column. */

.dist-slot { min-height: 168px; margin-top: 60px; display: flex; justify-content: center; }

.dist {
  --max-len: 44cqi;
  container-type: inline-size;
  margin: 0;
  width: min(100%, 760px);
  padding-left: 40px;
  display: grid;
  gap: 9px;
}

.dist-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-height: 34px; }
.dist-left { display: flex; justify-content: flex-end; min-width: 0; }
.dist-right { display: flex; justify-content: flex-start; min-width: 0; }

.dist-bar,
.dist-pick {
  --len: calc(var(--w, 0) * var(--max-len));
  position: relative;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  animation: dist-grow .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 80ms);
}

/* Everyone else: plain pills coloured by rank, not by which answer they are. */
.dist-bar {
  --c: var(--tomato);
  height: 30px;
  width: max(26px, var(--len));
  background: var(--c);
  box-shadow: inset 0 -4px 0 rgb(29 24 56 / .14);
  transform-origin: left center;
}
.dist-bar[data-colour='grape'] { --c: var(--grape); }
.dist-bar[data-colour='mint'] { --c: var(--mint); }
.dist-bar::after {
  content: '';
  position: absolute;
  top: 5px; right: 10px;
  width: min(22px, 35%); height: 5px;
  border-radius: 999px;
  background: rgb(255 255 255 / .8);
}
/* Nobody picked it: an empty dashed stub. */
.dist-bar.is-empty { width: 22px; background: transparent; border-style: dashed; box-shadow: none; }
.dist-bar.is-empty::after { display: none; }

/* Yours: a pill with the label. The solid part is your answer's length on the shared
   scale; if the label needs more room the rest of the pill is a pale tint. */
.dist-pick {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
  width: max-content;
  min-width: max(26px, var(--len));
  max-width: 100%;
  padding: 5px 16px 5px 34px;
  background: var(--lemon-soft);
  transform-origin: right center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-align: right;
}
.dist-track { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.dist-fill {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(100%, var(--len));
  background: var(--lemon);
  box-shadow: inset 0 -4px 0 rgb(29 24 56 / .14);
}
.dist-label { position: relative; }

.dist-badge {
  position: absolute;
  left: -34px;
  top: 50%;
  width: 54px; height: 54px;
  transform: translateY(-50%) rotate(-14deg);
  animation: dist-pop .55s var(--ease) both;
  animation-delay: .45s;
  pointer-events: none;
}
.dist-badge img { width: 54px; height: 54px; }
.dist-sparkles {
  position: absolute;
  left: -64px;
  top: 50%;
  width: 92px; height: 86px;
  transform: translateY(-50%);
  animation: dist-twinkle .7s var(--ease) both;
  animation-delay: .6s;
  pointer-events: none;
}

@keyframes dist-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dist-pop { from { opacity: 0; transform: translateY(-50%) rotate(-40deg) scale(.4); } to { opacity: 1; } }
@keyframes dist-twinkle { from { opacity: 0; transform: translateY(-50%) scale(.6); } to { opacity: 1; } }

/* ---------------------------------------------------------------- Verdicts page */

.page-head { display: grid; gap: 12px; padding-top: clamp(16px, 4vw, 40px); margin-bottom: 30px; }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); }
.page-head p { color: var(--ink-2); font-size: 19px; max-width: 34em; }

.weekly { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding: clamp(22px, 4vw, 36px); }
.weekly .art-plate { width: 140px; height: 140px; background: var(--lemon-soft); }
.weekly h2 { font-size: clamp(32px, 4.4vw, 48px); margin: 6px 0 12px; }
.weekly p { color: var(--ink-2); font-size: 18px; }
.weekly-evidence { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.weekly-locked { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.weekly-meter { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.verdict-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px; }
.verdict .art-plate { width: 66px; height: 66px; background: var(--tone-soft); }
.verdict h3 { font-size: 21px; }
.verdict-meta { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.verdict-quiz { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.verdict a { font-weight: 700; font-size: 14px; }

.empty { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 36px 20px; }
.empty .art-plate { width: 100px; height: 100px; }

/* ---------------------------------------------------------------- Accounts (Sign in with Google) */

.btn-google { --btn-bg: var(--card); gap: 12px; }
.btn-google img { width: 20px; height: 20px; flex: none; }
.btn-quiet { --btn-bg: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn-quiet:hover { box-shadow: none; transform: none; border-color: var(--ink); text-decoration: none; }

.nav-signin { background: var(--card); border-color: var(--ink); box-shadow: var(--lift-sm); }
.nav-signin img { width: 18px; height: 18px; }
.nav-user { max-width: 220px; }
.nav-user span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--tomato);
  font-size: 14px;
  line-height: 1;
}

.account-slot { margin-bottom: 18px; }
.account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
  padding: clamp(20px, 3.5vw, 30px);
}
.account-card > div { min-width: 0; }
.account-card h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 8px; overflow-wrap: anywhere; }
.account-card p { color: var(--ink-2); }
.account-kicker { font-weight: 700; font-size: 14px; color: var(--ink-3); margin-bottom: 4px; }
.account-email { margin-bottom: 14px; word-break: break-all; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.small-link { font-weight: 700; font-size: 15px; text-underline-offset: 3px; }
.notice { margin-top: 12px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--lemon-soft); font-weight: 600; color: var(--ink) !important; }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 16px; line-height: 1.35; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); cursor: pointer; }

.save-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding: 16px 18px;
  border: 2px dashed var(--ink);
  border-radius: var(--radius-md);
  background: var(--tone-soft, var(--lemon-soft));
  font-weight: 700;
}

.welcome { display: grid; gap: 22px; margin: 0 auto; }
.welcome h1 { margin-bottom: 0; }
.field { display: grid; gap: 8px; }
.field-label { font-weight: 800; }
.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--card);
  font: inherit;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}
.field-hint { font-size: 14px; color: var(--ink-3); }
.field-error { font-size: 15px; font-weight: 700; color: #b3261e; min-height: 1em; }
.field-error:empty { display: none; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.small { font-size: 15px !important; }

/* ---------------------------------------------------------------- Prose pages */

.prose { max-width: 720px; padding: clamp(24px, 5vw, 44px); }
.prose h1 { font-size: clamp(38px, 5.4vw, 56px); margin-bottom: 18px; }
.prose h2 { font-size: 26px; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 18px; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; margin: 10px 0 0; display: grid; gap: 6px; }
.prose .updated { font-weight: 700; color: var(--ink-3); font-size: 15px; margin-bottom: 18px; }
.prose a { font-weight: 700; text-underline-offset: 3px; }

.scale-demo { display: grid; gap: 10px; margin-top: 16px; }
.scale-demo div { display: flex; justify-content: space-between; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, var(--sky-soft), var(--tomato-soft)); font-weight: 700; font-size: 15px; }

/* ---------------------------------------------------------------- 404 */

.lost { display: grid; gap: 18px; justify-items: center; text-align: center; padding: clamp(40px, 8vw, 90px) 20px; }
.lost img { width: 150px; height: 150px; }
.lost h1 { font-size: clamp(40px, 6vw, 64px); }
.lost p { color: var(--ink-2); font-size: 19px; }

/* ---------------------------------------------------------------- Loading */

.loading { display: grid; place-items: center; min-height: 260px; }
.loading img { width: 64px; height: 64px; animation: wobble 1s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

/* ---------------------------------------------------------------- Phones and tablets */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .site-nav [data-account] { display: none; }
  .account-card { grid-template-columns: minmax(0, 1fr); }
  .account-actions { justify-content: flex-start; }
  .steps { grid-template-columns: 1fr; }
  .step { grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; }
  .step .art-plate { grid-row: span 2; width: 64px; height: 64px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .logo img { height: 34px; }
  .nav-link { padding: 0 12px; font-size: 14px; min-height: 38px; }
  .nav-hide-sm { display: none; }
  .options { grid-template-columns: 1fr; gap: 10px; }
  .option { min-height: 84px; font-size: 17px; gap: 14px; padding: 10px 14px 10px 10px; }
  .option .art-plate { width: 62px; height: 62px; }
  .option-key { display: none; }
  .player-bar { padding: 12px 14px; gap: 10px; }
  .result-head { grid-template-columns: 1fr; justify-items: start; }
  .result-head .art-plate { width: 116px; height: 116px; }
  .weekly { grid-template-columns: 1fr; }
  .weekly .art-plate { width: 110px; height: 110px; }
  .today-art { width: 108px; height: 108px; margin-top: -70px; }
  .dist { --max-len: 40cqi; padding-left: 34px; }
  .dist-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .dist-pick { font-size: 13.5px; padding-left: 30px; }
  .dist-badge, .dist-badge img { width: 46px; height: 46px; }
  .dist-badge { left: -28px; }
  .dist-sparkles { left: -54px; width: 80px; height: 76px; }
  .weekly-meter { gap: 6px; flex-wrap: nowrap; }
  .weekly-meter .week-dot { width: 36px; height: 36px; }
  .today-top { padding-right: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
