/* ==========================================================================
   Wheel Cue — design system
   One accent, one surface scale, a lot of empty space around the wheel.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  --bg:          #0a0b14;
  --bg-deep:     #06070e;
  --surface:     #12142270;
  --surface-2:   #171a2b;
  --surface-3:   #1e2236;
  --line:        #262a44;
  --line-soft:   #1c2036;

  --text:        #f3f4fb;
  --text-dim:    #a3a8c9;
  --text-faint:  #6f759a;

  --accent:      #7c5cff;
  --accent-2:    #a78bfa;
  --accent-ink:  #ffffff;
  --mint:        #22e0b4;
  --amber:       #ffc043;

  --radius:      14px;
  --radius-lg:   22px;
  --radius-pill: 999px;

  --shadow-sm:   0 1px 2px rgb(0 0 0 / .4);
  --shadow:      0 8px 30px rgb(0 0 0 / .45);
  --shadow-lg:   0 24px 70px rgb(0 0 0 / .55);
  --glow:        0 0 0 1px rgb(124 92 255 / .35), 0 12px 40px rgb(124 92 255 / .3);

  --wrap:        1180px;
  --read:        68ch;

  --font: "Inter var", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;

  --sticky-h: 0px;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg:          #f6f7fc;
  --bg-deep:     #eceef8;
  --surface:     #ffffffcc;
  --surface-2:   #ffffff;
  --surface-3:   #f2f3fa;
  --line:        #dfe2f0;
  --line-soft:   #e9ebf5;

  --text:        #13152b;
  --text-dim:    #545a7e;
  --text-faint:  #7d84a6;

  --accent:      #5b3fe8;
  --accent-2:    #7c5cff;
  --mint:        #0aa47f;
  --amber:       #b4790a;

  --shadow-sm:   0 1px 2px rgb(20 22 45 / .06);
  --shadow:      0 8px 30px rgb(20 22 45 / .09);
  --shadow-lg:   0 24px 70px rgb(20 22 45 / .14);
  --glow:        0 0 0 1px rgb(91 63 232 / .25), 0 12px 40px rgb(91 63 232 / .18);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* `clip` does not create a scroll container, so the sticky header keeps
     working. `hidden` is the fallback for older engines. */
  overflow-x: hidden;
  overflow-x: clip;
  padding-bottom: var(--sticky-h);
}

img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--radius-pill); font-weight: 600;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- ambient backdrop (the "hypnotic" bit, kept subtle) ---------- */
.aurora {
  position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 18% 12%, rgb(124 92 255 / .20), transparent 60%),
    radial-gradient(34vmax 34vmax at 84% 22%, rgb(34 224 180 / .13), transparent 62%),
    radial-gradient(40vmax 40vmax at 60% 96%, rgb(255 110 180 / .12), transparent 62%);
  filter: blur(10px);
  animation: drift 46s ease-in-out infinite alternate;
}
:root[data-theme="light"] .aurora {
  background:
    radial-gradient(38vmax 38vmax at 18% 12%, rgb(124 92 255 / .13), transparent 60%),
    radial-gradient(34vmax 34vmax at 84% 22%, rgb(34 200 170 / .10), transparent 62%),
    radial-gradient(40vmax 40vmax at 60% 96%, rgb(255 110 180 / .10), transparent 62%);
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) { .aurora { animation: none; } }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: 820px; }
.section { padding-block: clamp(40px, 6vw, 76px); }
.section-tight { padding-block: clamp(28px, 4vw, 48px); }
.stack > * + * { margin-top: 16px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.header-in {
  display: flex; align-items: center; gap: 18px;
  height: 62px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.06rem; letter-spacing: -.03em;
  text-decoration: none; white-space: nowrap;
}
.brand-mark {
  width: 28px; height: 28px; flex: none;
  animation: spin-slow 18s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .brand-mark { animation: none; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--text-dim); font-size: .92rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-pill); transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-3); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-pill);
  cursor: pointer; color: var(--text-dim); transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface-3); }

.nav-toggle { display: none; margin-left: auto; }

@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 62px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px; margin: 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 13px 12px; font-size: 1rem; }
  .nav-toggle { display: inline-grid; }
  .header-in > .theme-toggle { margin-left: 0; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: .94rem; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #b45cff);
  border-color: transparent; color: #fff; box-shadow: var(--glow);
}
.btn-primary:hover { filter: brightness(1.08); border-color: transparent; }

.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: .84rem; }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(26px, 5vw, 54px); padding-bottom: 6px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-2); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 5px 13px; border-radius: var(--radius-pill); margin-bottom: 16px;
}
h1, .h1 { font-size: clamp(2rem, 5.4vw, 3.15rem); letter-spacing: -.035em; }
.hero .lede {
  max-width: 58ch; margin: 16px auto 0; color: var(--text-dim);
  font-size: clamp(1.02rem, 1.9vw, 1.15rem);
}
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- the stage: wheel + panel (+ optional ad rail) ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
  padding-block: clamp(18px, 3vw, 30px);
}
@media (min-width: 980px) {
  .stage { grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); }
}
@media (min-width: 1400px) {
  .stage.has-rail { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .8fr) 300px; }
}

.wheel-col { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }

.wheel-wrap {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1;
  display: grid; place-items: center;
  touch-action: manipulation;
}
.wheel-wrap::after { /* soft halo */
  content: ""; position: absolute; inset: 4%; border-radius: 50%;
  box-shadow: 0 30px 90px rgb(124 92 255 / .28);
  z-index: -1;
}
.wheel-canvas {
  width: 100%; height: 100%; border-radius: 50%;
  cursor: pointer; display: block;
  filter: drop-shadow(0 10px 24px rgb(0 0 0 / .35));
}
:root[data-theme="light"] .wheel-canvas { filter: drop-shadow(0 10px 26px rgb(20 22 45 / .18)); }

.wheel-pointer {
  position: absolute; top: -1.5%; left: 50%; transform: translateX(-50%);
  width: clamp(28px, 8%, 44px); height: auto; z-index: 3; pointer-events: none;
  filter: drop-shadow(0 4px 8px rgb(0 0 0 / .5));
  transform-origin: 50% 22%;
}
.wheel-pointer.knock { animation: knock .09s ease-out; }
@keyframes knock { 50% { transform: translateX(-50%) rotate(9deg); } }

.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 22%; height: 22%; border-radius: 50%;
  display: grid; place-items: center; gap: 0;
  background: linear-gradient(150deg, var(--surface-2), var(--surface-3));
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 10px 30px rgb(0 0 0 / .45), inset 0 1px 0 rgb(255 255 255 / .12);
  color: var(--text); font-weight: 800; letter-spacing: .04em;
  font-size: clamp(.72rem, 2.1vw, .95rem); text-transform: uppercase;
  cursor: pointer; z-index: 2; -webkit-tap-highlight-color: transparent;
  transition: transform .14s ease, box-shadow .2s ease;
}
.wheel-hub:hover { transform: translate(-50%, -50%) scale(1.05); }
.wheel-hub:disabled { cursor: default; opacity: .8; }
.wheel-hub::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  animation: pulse 2.8s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);    opacity: .8; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .wheel-hub::before { animation: none; } }
.wheel-wrap[data-spinning="true"] .wheel-hub::before { animation: none; }

/* fairness strip under the wheel */
.odds-strip {
  display: flex; align-items: center; justify-content: center; gap: 8px 14px;
  flex-wrap: wrap; font-size: .84rem; color: var(--text-dim);
  border: 1px solid var(--line-soft); border-radius: var(--radius-pill);
  background: var(--surface); padding: 8px 16px; text-align: center;
}
.odds-strip b { color: var(--text); font-weight: 700; }
.odds-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); flex: none; }

.wheel-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- panel ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm); min-width: 0;
}
.panel + .panel { margin-top: 16px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.panel-title { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.panel-hint { font-size: .8rem; color: var(--text-faint); }

.tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: var(--radius-pill); }
.tabs button {
  flex: 1; padding: 7px 12px; border: 0; background: transparent; border-radius: var(--radius-pill);
  font-size: .84rem; font-weight: 600; color: var(--text-dim); cursor: pointer; transition: .15s;
}
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }

textarea.entries-input {
  width: 100%; min-height: 190px; resize: vertical;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-size: .94rem; line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
textarea.entries-input:focus { border-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--text-dim); }
.field input, .field select {
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: .92rem; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 0;
  border-top: 1px solid var(--line-soft); cursor: pointer;
}
.switch-row:first-of-type { border-top: 0; }
.switch-row input { margin: 3px 0 0; accent-color: var(--accent); width: 16px; height: 16px; flex: none; cursor: pointer; }
.switch-row > span { display: block; min-width: 0; }
.switch-row .sw-label { display: block; font-size: .89rem; font-weight: 600; }
.switch-row .sw-desc { display: block; font-size: .78rem; color: var(--text-faint); margin-top: 2px; line-height: 1.45; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--surface-3); font-size: .82rem; font-weight: 600; cursor: pointer;
  color: var(--text-dim); text-decoration: none; transition: .15s;
}
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* history list */
.history { list-style: none; margin: 0; padding: 0; max-height: 230px; overflow-y: auto; }
.history li {
  display: flex; align-items: center; gap: 10px; padding: 8px 2px;
  border-top: 1px solid var(--line-soft); font-size: .89rem;
}
.history li:first-child { border-top: 0; }
.history .h-idx { color: var(--text-faint); font-variant-numeric: tabular-nums; font-size: .78rem; min-width: 22px; }
.history .h-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .h-time { margin-left: auto; color: var(--text-faint); font-size: .76rem; white-space: nowrap; }
.empty-note { color: var(--text-faint); font-size: .85rem; padding: 10px 0; }

/* ---------- result modal ---------- */
.result-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: rgb(4 5 12 / .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.result-card {
  width: min(100%, 440px); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 26px 24px 20px; text-align: center;
  animation: pop .26s cubic-bezier(.2,.9,.3,1.3);
  max-height: calc(100dvh - 40px); overflow-y: auto;
}
@keyframes pop { from { transform: scale(.9) translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .result-card, .result-backdrop { animation: none; }
}
.result-kicker {
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mint);
}
.result-name {
  font-size: clamp(1.7rem, 6vw, 2.5rem); font-weight: 800; letter-spacing: -.03em;
  margin: 8px 0 4px; overflow-wrap: anywhere;
}
.result-swatch { width: 60px; height: 60px; border-radius: 14px; margin: 4px auto 8px; border: 1px solid var(--line); }
.result-meta {
  display: flex; justify-content: center; gap: 6px 16px; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-faint); margin-bottom: 16px;
}
.result-meta span { white-space: nowrap; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-actions .btn-block { grid-column: 1 / -1; }
.verify-toggle {
  margin-top: 14px; font-size: .78rem; color: var(--text-faint);
  background: none; border: 0; cursor: pointer; text-decoration: underline dotted;
}
.verify-box {
  margin-top: 10px; text-align: left; background: var(--surface-3);
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .74rem; color: var(--text-dim); line-height: 1.7; overflow-wrap: anywhere;
}
.verify-box b { color: var(--text); }

/* ---------- ad slots ---------- */
.ad-slot { display: none; } /* collapsed until enabled by ads.js — zero layout cost */
.ad-slot[data-filled="true"] { display: block; }
.ad-slot > .ad-inner { margin-inline: auto; overflow: hidden; }
.ad-label {
  display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); text-align: center; margin-bottom: 5px;
}
.ad-leaderboard[data-filled="true"],
.ad-inarticle[data-filled="true"] { margin-block: clamp(20px, 3vw, 32px); }
.ad-result[data-filled="true"] {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.ad-rail { position: sticky; top: 84px; }
@media (max-width: 1399px) { .ad-rail { display: none !important; } }

.ad-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 44px 6px 12px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  transition: transform .22s ease, opacity .22s ease;
}
.ad-sticky[data-filled="true"] { display: block; }
/* Slid out of the way while the wheel is on screen — see ads.js. */
.ad-sticky[data-hidden="true"] {
  transform: translateY(115%);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .ad-sticky { transition: none; } }
.ad-sticky .ad-inner { display: grid; place-items: center; }
.ad-sticky-close {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2);
  color: var(--text-dim); cursor: pointer; font-size: 15px; line-height: 1;
}
.ad-sticky-close:hover { color: var(--text); border-color: var(--accent); }

/* ---------- prose (SEO content) ---------- */
.prose { max-width: var(--read); }
.prose.prose-wide { max-width: 78ch; }
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 2.2em; margin-bottom: .5em;
  scroll-margin-top: 80px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: clamp(1.06rem, 2vw, 1.2rem); margin-top: 1.7em; margin-bottom: .4em;
  scroll-margin-top: 80px;
}
.prose p, .prose ul, .prose ol { margin-block: .85em; color: var(--text-dim); }
.prose li { margin-block: .35em; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--accent-2); text-decoration-color: color-mix(in srgb, var(--accent-2) 45%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose code {
  background: var(--surface-3); border: 1px solid var(--line-soft); border-radius: 6px;
  padding: 1px 6px; font-size: .87em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose pre {
  background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; overflow-x: auto; font-size: .84rem; line-height: 1.7;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose figure { margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.prose th { color: var(--text); font-weight: 650; }
.prose td { color: var(--text-dim); }
.table-scroll { overflow-x: auto; margin-block: 1.2em; }

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; margin-block: 1.4em;
}
.callout p { margin: .4em 0; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* preset list rendered as crawlable HTML */
.preset-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.preset-list li {
  background: var(--surface-3); border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill); padding: 5px 13px; font-size: .84rem;
  color: var(--text-dim); margin: 0;
}

/* ---------- section headings + cards ---------- */
.section-head { max-width: 62ch; margin-bottom: clamp(20px, 3vw, 30px); }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.section-head p { color: var(--text-dim); margin-top: 10px; }
.section-head.center { margin-inline: auto; text-align: center; }

.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-decoration: none; position: relative;
  transition: border-color .16s, transform .16s, background .16s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-emoji { font-size: 1.4rem; line-height: 1; }
.card-title { font-weight: 700; font-size: 1rem; letter-spacing: -.015em; }
.card-desc { font-size: .865rem; color: var(--text-dim); line-height: 1.55; }
.card-tag {
  position: absolute; top: 14px; right: 14px; font-size: .64rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mint);
}

.step-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { border-top: 2px solid var(--accent); padding-top: 14px; }
.step-n {
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; color: var(--accent-2);
  text-transform: uppercase;
}
.step h3 { margin: 6px 0; font-size: 1.06rem; }
.step p { color: var(--text-dim); font-size: .9rem; }

.feature-grid { display: grid; gap: 20px 26px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature h3 { font-size: 1rem; margin-bottom: 5px; }
.feature p { color: var(--text-dim); font-size: .89rem; }

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .8rem; color: var(--text-faint); padding-top: 16px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs a { color: var(--text-faint); text-decoration: none; }
.crumbs a:hover { color: var(--accent-2); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; padding: 15px 34px 15px 0; font-weight: 600; font-size: .98rem;
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.25rem; font-weight: 400; color: var(--text-faint); transition: transform .18s;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 0 16px; color: var(--text-dim); font-size: .93rem; max-width: var(--read); }
.faq .faq-a p { margin-bottom: .7em; }
.faq .faq-a p:last-child { margin-bottom: 0; }
.faq .faq-a a { color: var(--accent-2); }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 130% at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    var(--surface);
  padding: clamp(28px, 5vw, 46px) 24px; text-align: center;
}
.cta-band h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.cta-band p { color: var(--text-dim); margin: 10px auto 20px; max-width: 46ch; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft); margin-top: clamp(48px, 7vw, 90px);
  padding-block: 44px 30px; font-size: .875rem;
}
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.footer-brand { grid-column: span 2; max-width: 34ch; }
@media (max-width: 640px) { .footer-brand { grid-column: span 1; } }
.footer-brand p { color: var(--text-faint); margin-top: 10px; font-size: .85rem; }
.footer-col h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--text-dim); text-decoration: none; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center;
  color: var(--text-faint); font-size: .8rem;
}
.footer-bottom nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.footer-bottom a { color: var(--text-faint); text-decoration: none; }
.footer-bottom a:hover { color: var(--text-dim); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--sticky-h)); transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 10px 20px; font-size: .875rem; font-weight: 600; box-shadow: var(--shadow);
  z-index: 150; animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- fullscreen presentation mode ---------- */
.wheel-col:fullscreen {
  background: var(--bg); width: 100%; height: 100%;
  justify-content: center; padding: 2vh 2vw;
}
.wheel-col:fullscreen .wheel-wrap { width: min(92vw, 82vh); }
.wheel-col:fullscreen .odds-strip { font-size: 1rem; }

/* ---------- teams / numbers output ---------- */
.team-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.team-card {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; animation: pop-in .3s ease backwards;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(10px); } }
.team-card h3 { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 8px; }
.team-card ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: .92rem; }
.team-card li::marker { color: var(--text-faint); font-size: .8em; }

.draw-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.draw-chip {
  min-width: 52px; padding: 10px 14px; border-radius: 12px; text-align: center;
  background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--line); font-weight: 800; font-size: 1.1rem;
  font-variant-numeric: tabular-nums; animation: pop-in .28s ease backwards;
}

/* ---------- fairness simulator ---------- */
.sim { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.sim-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; }
.sim-controls .field { flex: 1 1 130px; }
.sim-bars { display: grid; gap: 7px; }
.sim-bar { display: grid; grid-template-columns: 90px 1fr 92px; align-items: center; gap: 10px; font-size: .84rem; }
.sim-bar .lbl { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-bar .track { height: 20px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.sim-bar .fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 6px; transition: width .5s cubic-bezier(.2,.8,.3,1);
}
.sim-bar .val { color: var(--text-faint); font-variant-numeric: tabular-nums; text-align: right; font-size: .78rem; }
.sim-summary { margin-top: 16px; font-size: .86rem; color: var(--text-dim); }

/* ---------- confetti ---------- */
.confetti-canvas { position: fixed; inset: 0; z-index: 130; pointer-events: none; }

/* ---------- misc ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 28px 44px; justify-content: center; }
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -.03em; }
.stat span { font-size: .8rem; color: var(--text-faint); }

.changelog-entry { border-left: 2px solid var(--line); padding: 0 0 26px 22px; position: relative; }
.changelog-entry::before {
  content: ""; position: absolute; left: -5px; top: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
}
.changelog-entry h3 { font-size: 1.05rem; }
.changelog-entry time { font-size: .78rem; color: var(--text-faint); display: block; margin-bottom: 8px; }
.changelog-entry ul { margin: 0; padding-left: 1.1em; color: var(--text-dim); font-size: .92rem; }
.changelog-entry li { margin-block: .3em; }

@media print {
  .site-header, .site-footer, .ad-slot, .panel, .wheel-actions { display: none !important; }
}
