﻿/* Low Stakes Stats design system
   Calm game-like learning environment for dense stats content. */
:root{
  --bg:#F4F0E8;
  --surface:#FFFDF8;
  --surface-2:#F8F3EA;
  --surface-3:#ECE5D9;
  --ink:#25221D;
  --ink-soft:#696154;
  --ink-faint:#928879;
  --line:#D8CFC1;
  --line-strong:#3B352C;
  --coral:#EE8F75;
  --mustard:#E8C35D;
  --mint:#87C9AE;
  --sky:#8FB9D9;
  --lilac:#B8A1D7;
  --pink:#E9A0B8;
  --rgreen:#9ED66B;
  --blue-ink:#2D4962;
  --radius:10px;
  --radius-sm:7px;
  --bd:1.5px solid var(--line-strong);
  --bd-thin:1px solid var(--line);
  --sh:0 14px 28px rgba(37,34,29,.10);
  --sh-sm:0 7px 16px rgba(37,34,29,.09);
  --lift:0 5px 0 rgba(37,34,29,.18);
  --focus:0 0 0 3px rgba(143,185,217,.35);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:
    radial-gradient(circle at 12% 8%, rgba(143,185,217,.15), transparent 28%),
    linear-gradient(180deg,#FAF7F0 0,var(--bg) 360px);
  color:var(--ink);
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-size:18px;
  font-weight:400;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{
  font-family:'Space Grotesk',sans-serif;
  font-weight:500;            /* Medium per spec */
  line-height:1.14;
  letter-spacing:0;
  margin:0 0 .4em;
}
h1{ font-size:clamp(2.4rem,6vw,3.75rem); }   /* 60px */
h2{ font-size:clamp(1.7rem,4vw,2.5rem); }    /* 40px */
h3{ font-size:clamp(1.4rem,3vw,1.875rem); }  /* 30px */
h4{ font-size:1.25rem; }                     /* 20px */
.sub,h5,.fredoka{ font-family:'Fredoka',sans-serif; font-weight:600; }
p{ margin:0 0 1rem; }
a{ color:var(--ink); text-underline-offset:3px; }
strong{ font-weight:650; }
.muted{ color:var(--ink-soft); }
.mono{ font-family:'Space Mono','Courier New',monospace; }
.center{ text-align:center; }

.wrap{ max-width:1140px; margin:0 auto; padding:0 22px; }
.wrap-narrow{ max-width:860px; margin:0 auto; padding:0 22px; }
section{ padding:58px 0; }

.material-symbols-rounded{
  font-variation-settings:'FILL' 1,'wght' 500,'GRAD' 0,'opsz' 40;
  vertical-align:middle;
  line-height:1;
}
.chip-icon{
  display:inline-grid;
  place-items:center;
  width:50px;
  height:50px;
  flex:0 0 auto;
  border:var(--bd);
  border-radius:var(--radius-sm);
  box-shadow:var(--sh-sm);
}
.chip-icon .material-symbols-rounded{ font-size:30px; }
.bg-coral{ background:var(--coral); }
.bg-mustard{ background:var(--mustard); }
.bg-mint{ background:var(--mint); }
.bg-sky{ background:var(--sky); }
.bg-lilac{ background:var(--lilac); }
.bg-pink{ background:var(--pink); }
.bg-green{ background:var(--rgreen); }

.nav{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,253,248,.92);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(14px);
}
.nav .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:64px;
  gap:18px;
}
.brand{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:1.3rem;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.brand .dot{
  width:16px;
  height:16px;
  background:var(--coral);
  border:1.5px solid var(--line-strong);
  border-radius:5px;
  display:inline-block;
  box-shadow:inset 4px 0 0 rgba(255,255,255,.38);
}
.nav-links{
  display:flex;
  gap:8px;
  align-items:center;
  overflow-x:auto;
  scrollbar-width:none;
}
.nav-links::-webkit-scrollbar{ display:none; }
.nav-link{
  font-family:'Fredoka',sans-serif;
  font-weight:500;
  text-decoration:none;
  font-size:.97rem;
  padding:7px 13px;
  border:1px solid transparent;
  border-radius:999px;
  white-space:nowrap;
}
.nav-link:hover{ border-color:var(--line); background:var(--surface-2); }
.nav-link.active{
  background:var(--mustard);
  border:1.5px solid var(--line-strong);
  box-shadow:0 4px 0 rgba(37,34,29,.16);
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  font-family:'Fredoka',sans-serif;
  font-weight:600;
  font-size:1rem;
  padding:11px 20px;
  color:var(--ink);
  text-decoration:none;
  background:var(--surface);
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--lift);
  transition:transform .08s,box-shadow .08s,background .12s;
}
.btn:hover{ transform:translateY(-1px); box-shadow:0 7px 0 rgba(37,34,29,.18); }
.btn:active{ transform:translateY(3px); box-shadow:0 2px 0 rgba(37,34,29,.18); }
.btn:focus-visible,
.nav-link:focus-visible,
.step-pill:focus-visible,
.choice:focus-visible,
.theme-toggle:focus-visible{
  outline:none;
  box-shadow:var(--focus);
}
.btn-primary{ background:var(--coral); }
.btn-accent{ background:var(--mustard); }
.btn-mint{ background:var(--mint); }
.btn-ghost{ background:var(--surface); }
.btn-lilac{ background:var(--lilac); }
.btn-lg{ font-size:1.08rem; padding:14px 25px; }
.btn-sm{ font-size:.9rem; padding:8px 14px; box-shadow:0 4px 0 rgba(37,34,29,.16); }

.card{
  background:var(--surface);
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh);
  padding:24px;
}
.card-2{ background:var(--surface-2); }
.card-soft{ background:var(--surface-2); border-color:var(--line); box-shadow:none; }
.stat-card{ background:var(--surface); border:1px solid var(--line); box-shadow:var(--sh-sm); }
.tag{
  display:inline-block;
  font-family:'Fredoka',sans-serif;
  font-weight:600;
  font-size:.78rem;
  padding:3px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface);
}
.tag-lilac{ background:var(--lilac); }

.hero{
  display:grid;
  grid-template-columns:1.08fr .92fr;
  gap:48px;
  align-items:center;
  padding-top:48px;
}
.hero .eyebrow,.eyebrow{
  font-family:'Fredoka',sans-serif;
  font-weight:600;
  color:var(--ink-soft);
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.85rem;
  margin-bottom:8px;
}
.hero-art{ display:grid; place-items:center; }
.hero-art img{
  width:100%;
  max-width:470px;
  filter:drop-shadow(0 18px 24px rgba(37,34,29,.12));
}

.concept{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:36px;
  align-items:center;
  padding:30px;
  margin-bottom:26px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
}
.concept:nth-child(even){ background:var(--surface-2); }
.concept:nth-child(even) .concept-art{ order:2; }
.concept-art{ display:grid; place-items:center; }
.concept-art img{
  width:100%;
  max-width:320px;
  filter:drop-shadow(0 10px 15px rgba(37,34,29,.08));
}
.concept-head{ display:flex; align-items:center; gap:14px; margin-bottom:10px; }
.concept-head h3{ margin:0; }
.var-pill{
  font-family:'Space Mono',monospace;
  font-weight:700;
  padding:2px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface);
}

.tbl-wrap{ overflow-x:auto; }
.tbl{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:.95rem;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--surface);
}
.tbl th,.tbl td{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  border-right:1px solid var(--line);
  text-align:right;
}
.tbl th:last-child,.tbl td:last-child{ border-right:none; }
.tbl tr:last-child td{ border-bottom:none; }
.tbl thead th{
  background:#D8E8F4;
  color:var(--blue-ink);
  font-family:'Fredoka',sans-serif;
  font-weight:600;
}
.tbl th:first-child,.tbl td:first-child{ text-align:left; }
.tbl td{ font-family:'Space Mono',monospace; }
.tbl td:first-child{ font-family:'Inter',sans-serif; }
.tbl .sum td{ background:#F3DF9F; font-weight:700; }

.eq{
  background:#FAF7F0;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:14px 16px;
  font-family:'Space Mono',monospace;
  font-size:.95rem;
  line-height:1.95;
  white-space:pre-wrap;
  overflow-x:auto;
  margin:.5rem 0;
}
.hl-coral,.hl-mint,.hl-sky,.hl-mustard,.hl-lilac,.hl-green{
  padding:1px 6px;
  border-radius:4px;
  font-weight:700;
  color:var(--ink);
}
.hl-coral{ background:var(--coral); }
.hl-mint{ background:var(--mint); }
.hl-sky{ background:var(--sky); }
.hl-mustard{ background:var(--mustard); }
.hl-lilac{ background:var(--lilac); }
.hl-green{ background:var(--rgreen); }

.callout{
  border:1px solid var(--line);
  border-left-width:6px;
  border-radius:var(--radius-sm);
  padding:13px 16px;
  margin:14px 0;
  background:var(--surface);
  font-size:.96rem;
}
.callout .sub{ display:block; margin-bottom:3px; }
.c-coral{ border-left-color:var(--coral); }
.c-mint{ border-left-color:var(--mint); }
.c-sky{ border-left-color:var(--sky); }
.c-mustard{ border-left-color:var(--mustard); }
.c-lilac{ border-left-color:var(--lilac); }
.c-green{ border-left-color:var(--rgreen); }

.metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:14px;
  margin:16px 0;
}
.metric{
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:12px 14px;
}
.metric .lbl{
  font-family:'Space Mono',monospace;
  font-size:.74rem;
  color:var(--ink-soft);
  display:block;
  margin-bottom:3px;
}
.metric .val{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:1.5rem;
}

.ex-head{ padding:34px 0 10px; }
.stepbar{
  position:sticky;
  top:64px;
  z-index:40;
  background:rgba(255,253,248,.94);
  border-bottom:1px solid var(--line);
  padding:12px 0;
  backdrop-filter:blur(14px);
}
.progress{ display:flex; gap:5px; margin-bottom:12px; }
.progress .seg{
  height:8px;
  flex:1;
  min-width:34px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:999px;
}
.progress .seg.done{ background:var(--mint); }
.progress .seg.cur{ background:var(--coral); }
.steps{ display:flex; gap:7px; flex-wrap:wrap; }
.step-pill{
  font-family:'Fredoka',sans-serif;
  font-weight:500;
  font-size:.85rem;
  cursor:pointer;
  padding:6px 13px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--ink);
  white-space:nowrap;
  transition:transform .07s;
}
.step-pill:hover{ transform:translateY(-1px); background:var(--surface-2); }
.step-pill.active{
  background:var(--mustard);
  border-color:var(--line-strong);
  box-shadow:0 4px 0 rgba(37,34,29,.15);
}
.panel{ display:none; padding:34px 0 60px; }
.panel.active{ display:block; animation:fade .25s ease; }
@keyframes fade{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
.panel .counter{ font-family:'Space Mono',monospace; font-size:.8rem; color:var(--ink-soft); }
.panel h2{ margin:.1em 0 .15em; }
.panel .lede{ font-size:1.05rem; color:var(--ink-soft); max-width:60ch; margin-bottom:8px; }
.ex-grid{ display:grid; grid-template-columns:300px 1fr; gap:34px; align-items:start; margin-top:22px; }
.ex-art{
  position:sticky;
  top:150px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
  padding:18px;
}
.ex-art img{ width:100%; }
.ex-art .cap{
  font-family:'Fredoka',sans-serif;
  font-weight:500;
  font-size:.9rem;
  text-align:center;
  margin-top:8px;
  color:var(--ink-soft);
}
.ex-nav{ display:flex; justify-content:space-between; gap:12px; margin-top:30px; }

.scorebar{
  position:sticky;
  top:64px;
  z-index:40;
  background:rgba(255,253,248,.94);
  border-bottom:1px solid var(--line);
  padding:12px 0;
  backdrop-filter:blur(14px);
}
.scorebar .wrap-narrow{ display:flex; align-items:center; gap:16px; }
.scorebar .progress{ flex:1; margin:0; }
.score-label{ font-family:'Fredoka',sans-serif; font-weight:600; white-space:nowrap; }
.q{ display:grid; grid-template-columns:120px 1fr; gap:22px; align-items:start; padding:22px; margin-bottom:20px; }
.q-art{ background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px; }
.q-art img{
  width:100%;
  display:block;
  aspect-ratio:1/1;
  object-fit:contain;
}
.test-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(120px,150px);
  gap:24px;
  align-items:center;
}
.test-hero-img,
.test-scenario-img{
  display:block;
  width:100%;
  max-width:100%;
  aspect-ratio:3/2;
  object-fit:contain;
}
.test-scenario-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(128px,170px);
  gap:20px;
  align-items:center;
}
.q-top{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:4px; }
.qnum{
  font-family:'Fredoka',sans-serif;
  font-weight:700;
  width:32px;
  height:32px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  background:var(--coral);
  border:1.5px solid var(--line-strong);
  border-radius:999px;
}
.q-prompt{ font-weight:500; }
.q-hint{ font-size:.86rem; color:var(--ink-soft); margin:.3rem 0 .8rem; }
.check-row{ display:flex; gap:14px; flex-wrap:wrap; align-items:flex-end; margin-bottom:.4rem; }
.ans-field{ display:flex; flex-direction:column; gap:3px; }
.ans-field .l{ font-family:'Space Mono',monospace; font-size:.72rem; color:var(--ink-soft); }
.ans-in{
  font-family:'Space Mono',monospace;
  font-size:1rem;
  padding:8px 10px;
  width:120px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--ink);
  caret-color:var(--ink);
}
.ans-in:focus{ outline:none; box-shadow:var(--focus); border-color:var(--sky); }
.ans-in.ok{ background:var(--mint); }
.ans-in.no{ background:#F6CFC3; }
.fb{ font-family:'Fredoka',sans-serif; font-weight:600; font-size:.9rem; min-height:1.2em; }
.fb.ok{ color:#1C7A4D; }
.fb.no{ color:#B4543A; }
.q-actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.sol{ display:none; margin-top:.9rem; border-top:1px solid var(--line); padding-top:.9rem; }
.sol.show{ display:block; animation:fade .25s ease; }
.sol .tbl{ font-size:.86rem; }
.celebrate{ display:none; text-align:center; }
.celebrate.show{ display:block; animation:fade .3s ease; }

.code{
  background:#F7FAF0;
  border:1px solid var(--line);
  border-left:6px solid var(--rgreen);
  border-radius:var(--radius-sm);
  padding:14px 16px;
  margin:.5rem 0;
  font-family:'Space Mono',monospace;
  font-size:.9rem;
  line-height:1.95;
  white-space:pre;
  overflow-x:auto;
}
.code .cm{ color:var(--ink-soft); }
.code .pr{ color:#3A8A2A; font-weight:700; }
.code-tag{
  display:inline-block;
  font-family:'Fredoka',sans-serif;
  font-weight:700;
  font-size:.72rem;
  padding:2px 10px;
  background:var(--rgreen);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  margin-bottom:6px;
}
.cheat li{ margin-bottom:.5rem; }
.cheat code{
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:4px;
  padding:1px 7px;
  font-family:'Space Mono',monospace;
  font-size:.9rem;
}

.choices{ display:flex; flex-direction:column; gap:10px; margin:.5rem 0 .2rem; }
.choice{
  text-align:left;
  width:100%;
  cursor:pointer;
  font-family:'Inter',sans-serif;
  font-size:.97rem;
  color:var(--ink);
  padding:12px 14px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  display:flex;
  gap:11px;
  align-items:flex-start;
  transition:transform .07s,background .12s;
}
.choice:hover{ background:var(--surface-2); transform:translateX(2px); }
.choice .mk{ font-family:'Fredoka',sans-serif; font-weight:700; flex:0 0 auto; }
.choice.ok{ background:var(--mint); }
.choice.no{ background:#F6CFC3; }
.choice.lock{ pointer-events:none; }
.choice.lock:not(.ok){ opacity:.5; }
.q-label{ font-family:'Fredoka',sans-serif; font-weight:600; margin:.2rem 0 .2rem; }

.case-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:18px; }
.case-card{ display:flex; flex-direction:column; gap:10px; text-decoration:none; }
.case-card.locked{ opacity:.6; }
.case-card:hover{ transform:translateY(-2px); }
.badge{
  font-family:'Fredoka',sans-serif;
  font-size:.72rem;
  font-weight:600;
  padding:3px 11px;
  border:1px solid var(--line);
  border-radius:999px;
  display:inline-block;
  align-self:flex-start;
}
.badge.live{ background:var(--lilac); }
.badge.soon{ background:var(--surface-2); color:var(--ink-soft); }
.badge.badge-done{ background:var(--mint); }
.case-type{
  font-family:'Space Mono',monospace;
  font-size:.74rem;
  color:var(--ink-soft);
  text-transform:uppercase;
  letter-spacing:.05em;
}
.case-card.done{ box-shadow:0 16px 28px rgba(37,34,29,.14); }

.foot{
  border-top:1px solid var(--line);
  padding:26px 0;
  font-family:'Fredoka',sans-serif;
  font-size:.9rem;
  color:var(--ink-soft);
  background:rgba(255,253,248,.65);
}
.foot .wrap{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  font-family:'Fredoka',sans-serif;
  font-weight:600;
  font-size:.85rem;
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:7px 13px;
  box-shadow:var(--sh-sm);
  transition:transform .08s;
}
.theme-toggle:hover{ transform:translateY(-1px); }
.theme-toggle .material-symbols-rounded{ font-size:20px; }

.code-input{
  width:100%;
  min-height:140px;
  resize:vertical;
  box-sizing:border-box;
  font-family:'Space Mono',monospace;
  font-size:.9rem;
  line-height:1.6;
  color:var(--ink);
  background:var(--surface-2);
  border:1px solid var(--line);
  border-left:6px solid var(--rgreen);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  caret-color:var(--ink);
}
.code-input:focus{ outline:none; box-shadow:var(--focus); }
.lb{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  font-size:.95rem;
  background:var(--surface);
}
.lb th,.lb td{ padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.lb tr:last-child td{ border-bottom:none; }
.lb thead th{ background:var(--mustard); font-family:'Fredoka',sans-serif; font-weight:600; }
.lb .rank{ font-family:'Space Grotesk',sans-serif; font-weight:700; width:2.5rem; }
.lb td.num{ font-family:'Space Mono',monospace; text-align:right; }
.lb tr.you td{ background:rgba(232,195,93,.18); }
.lb tr.rank-1 td{ background:rgba(185,255,102,.34); }
.lb tr.rank-2 td{ background:rgba(191,199,207,.34); }
.lb tr.rank-3 td{ background:rgba(205,127,50,.24); }
.lb tr.rank-1 .lb-avatar{ border-color:#C9A227; box-shadow:0 0 0 3px rgba(201,162,39,.28); }
.lb tr.rank-2 .lb-avatar{ border-color:#AEB7C0; box-shadow:0 0 0 3px rgba(174,183,192,.34); }
.lb tr.rank-3 .lb-avatar{ border-color:#B87333; box-shadow:0 0 0 3px rgba(184,115,51,.30); }
.mini-chip{
  display:inline-block;
  font-family:'Fredoka',sans-serif;
  font-weight:600;
  font-size:.72rem;
  padding:2px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  margin:1px 2px;
  background:var(--surface);
}
.gate{ text-align:center; }

html[data-theme="dark"]{
  --bg:#171B20;
  --surface:#20262D;
  --surface-2:#28313A;
  --surface-3:#303944;
  --ink:#F1EADD;
  --ink-soft:#C4BAAA;
  --ink-faint:#918878;
  --line:#4C5560;
  --line-strong:#8B938F;
  --coral:#E07B5A;
  --mustard:#C79A3A;
  --mint:#5AA888;
  --sky:#6E9BC4;
  --lilac:#A98ECB;
  --pink:#D982A0;
  --rgreen:#7CAE3C;
  --sh:0 14px 28px rgba(0,0,0,.26);
  --sh-sm:0 7px 16px rgba(0,0,0,.22);
  --lift:0 5px 0 rgba(0,0,0,.34);
}
html[data-theme="dark"] body{ background:linear-gradient(180deg,#151A20 0,var(--bg) 360px); }
html[data-theme="dark"] .nav,
html[data-theme="dark"] .stepbar,
html[data-theme="dark"] .scorebar{ background:rgba(32,38,45,.92); }
html[data-theme="dark"] .foot{ background:rgba(32,38,45,.65); }
html[data-theme="dark"] .tbl thead th{ background:#385A72; color:var(--ink); }
html[data-theme="dark"] .tbl .sum td{ background:#685A31; }
html[data-theme="dark"] .eq{ background:#252D35; }
html[data-theme="dark"] .code{ background:#223021; }
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-accent,
html[data-theme="dark"] .btn-mint,
html[data-theme="dark"] .btn-lilac,
html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .step-pill.active,
html[data-theme="dark"] .choice.ok,
html[data-theme="dark"] .ans-in.ok,
html[data-theme="dark"] .tag-lilac,
html[data-theme="dark"] .badge.live,
html[data-theme="dark"] .badge.badge-done,
html[data-theme="dark"] .code-tag,
html[data-theme="dark"] .chip-icon,
html[data-theme="dark"] .hl-coral,
html[data-theme="dark"] .hl-mint,
html[data-theme="dark"] .hl-sky,
html[data-theme="dark"] .hl-mustard,
html[data-theme="dark"] .hl-lilac,
html[data-theme="dark"] .hl-green{ color:#23201B; }
html[data-theme="dark"] .choice.no,
html[data-theme="dark"] .ans-in.no{ background:#7E342A; color:var(--ink); }
html[data-theme="dark"] .fb.ok{ color:#7BD3A4; }
html[data-theme="dark"] .fb.no{ color:#E59A82; }
html[data-theme="dark"] .code .pr{ color:#8FD24F; }

@media(max-width:880px){
  .ex-grid{ grid-template-columns:1fr; }
  .ex-art{ position:static; max-width:340px; }
}
@media(max-width:820px){
  .hero{ grid-template-columns:1fr; }
  .hero-art{ order:-1; }
}
@media(max-width:780px){
  .nav .wrap{ padding-right:0; gap:14px; }
  .nav-links{ flex:1; padding-right:22px; }
}
@media(max-width:760px){
  .concept{ grid-template-columns:1fr; }
  .concept:nth-child(even) .concept-art{ order:0; }
}
@media(max-width:720px){
  .stepbar .wrap{ padding-right:0; }
  .progress,.steps{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-right:22px;
    scrollbar-width:none;
  }
  .progress::-webkit-scrollbar,.steps::-webkit-scrollbar{ display:none; }
}
@media(max-width:680px){
  .q{ grid-template-columns:1fr; }
  .q-art{ max-width:150px; }
  .test-hero-grid,
  .test-scenario-grid{ grid-template-columns:1fr; }
  .test-hero-img,
  .test-scenario-img{
    max-width:180px;
    justify-self:start;
  }
  .scorebar .wrap-narrow{ align-items:flex-start; flex-direction:column; gap:8px; }
}
@media(max-width:520px){
  body{ font-size:16px; }
  .wrap,.wrap-narrow{ padding:0 22px; }
  .card,.concept{ padding:20px; }
  .hero{ gap:26px; padding-top:34px; }
  .hero-art img{ max-width:330px; }
  .ex-nav{ flex-direction:column; }
  .ex-nav .btn{ justify-content:center; }
}

/* ========================================================================
   Brand revamp — Low Stakes Stats (Positivus-style patterns)
======================================================================== */
:root{ --brand:#3B4DA8; }
html[data-theme="dark"]{ --brand:#8C9BE8; }

.brand{ gap:10px; }
.brand-logo{ height:34px; width:auto; display:block; }
.brand-name{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:1.22rem; letter-spacing:-.01em; }

/* highlighted heading text */
.hl-head{ background:var(--mustard); color:#23201B; padding:.02em .26em; border-radius:8px;
  box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.hl-head.coral{ background:var(--coral);} .hl-head.mint{ background:var(--mint);}
.hl-head.sky{ background:var(--sky);} .hl-head.lilac{ background:var(--lilac);} .hl-head.brand{ background:var(--brand); color:#fff;}

/* two-part section header */
.sec-head{ display:flex; align-items:center; gap:26px; flex-wrap:wrap; margin-bottom:32px; }
.sec-tag{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:clamp(1.4rem,3vw,1.9rem);
  background:var(--mustard); color:#23201B; padding:.08em .42em; border-radius:10px; white-space:nowrap; }
.sec-desc{ color:var(--ink-soft); max-width:48ch; margin:0; }

/* big feature cards */
.features{ display:flex; flex-direction:column; gap:28px; }
.feature{ display:grid; grid-template-columns:1.05fr .95fr; gap:28px; align-items:center;
  border:var(--bd); border-radius:var(--radius); box-shadow:var(--sh); padding:36px; background:var(--surface); }
.feature:nth-child(even){ background:var(--surface-2); }
.feature .f-art{ display:grid; place-items:center; }
.feature .f-art img{ width:100%; max-width:300px; }
.feature h3{ font-size:clamp(1.3rem,2.6vw,1.7rem); margin:0 0 10px; line-height:1.15; }
.feature p{ color:var(--ink-soft); }
.feature .learn{ display:inline-flex; align-items:center; gap:12px; font-family:'Fredoka',sans-serif;
  font-weight:600; text-decoration:none; color:var(--ink); margin-top:6px; }
.feature .learn .arrow{ width:42px; height:42px; border-radius:999px; background:var(--brand); color:#fff;
  display:grid; place-items:center; border:var(--bd-thin); box-shadow:var(--sh-sm); transition:transform .1s; }
.feature .learn:hover .arrow{ transform:translate(-1px,-1px) rotate(-8deg); }
.feature.flip .f-art{ order:2; }

.btn-brand{ background:var(--brand); color:#fff; }
.btn-brand:hover{ background:var(--brand); color:#fff; }

/* hamburger mobile nav */
.nav-toggle{ display:none; background:var(--surface); border:var(--bd-thin); border-radius:var(--radius-sm);
  width:44px; height:40px; cursor:pointer; align-items:center; justify-content:center; color:var(--ink); }
.nav-toggle .material-symbols-rounded{ font-size:26px; }
@media(max-width:860px){
  .nav .wrap{ position:relative; }
  .nav-toggle{ display:inline-flex; }
  .nav-links{ position:absolute; top:64px; left:0; right:0; background:var(--surface);
    border-bottom:var(--bd); flex-direction:column; align-items:stretch; gap:4px;
    padding:10px 18px 16px; display:none; z-index:60; }
  .nav-links.open{ display:flex; }
  .nav-link{ padding:11px 12px; font-size:1.05rem; }
}
@media(max-width:680px){
  section{ padding:38px 0; }
  .feature{ padding:22px; border-radius:var(--radius); box-shadow:var(--sh-sm); }
  .card{ padding:18px; }
  .hero{ gap:24px; padding-top:30px; }
  .ex-grid{ gap:20px; }
  body{ font-size:16px; }
}

/* ---- H2H matchup (Yahoo-fantasy style) ---- */
.matchup{ display:grid; grid-template-columns:1fr auto 1fr; gap:18px; align-items:center; padding:6px 0; }
.matchup .team{ display:flex; flex-direction:column; align-items:center; gap:9px; text-align:center; }
.team-logo{ width:96px; height:96px; border-radius:50%; border:var(--bd); box-shadow:var(--sh-sm);
  display:grid; place-items:center; background:var(--surface-2); overflow:hidden; }
.team-logo img{ width:78%; height:78%; object-fit:contain; }
.team-logo .abbr{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:1.7rem; color:var(--brand); }
.team-name{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:1.12rem; line-height:1.1; }
.team-side{ font-family:'Fredoka',sans-serif; font-size:.7rem; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.07em; }
.vs{ text-align:center; }
.vs-badge{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:1.3rem; background:var(--brand); color:#fff;
  border:var(--bd-thin); border-radius:999px; width:62px; height:62px; display:grid; place-items:center; margin:0 auto; box-shadow:var(--sh-sm); }
.vs .venue{ font-size:.82rem; color:var(--ink-soft); margin-top:10px; max-width:170px; margin-left:auto; margin-right:auto; }
@media(max-width:560px){ .team-logo{ width:70px; height:70px; } .team-name{ font-size:1rem; } .vs-badge{ width:46px; height:46px; font-size:1rem; } }

/* ========================================================================
   Positivus-inspired refinement: tighter palette, sharper edges, clearer rhythm
======================================================================== */
:root{
  --bg:#F6F5EF;
  --surface:#FFFFFF;
  --surface-2:#F0F0EA;
  --surface-3:#E4E3DC;
  --ink:#171816;
  --ink-soft:#5F6258;
  --ink-faint:#8C8E84;
  --line:#171816;
  --line-strong:#171816;
  --signal:#B9FF66;
  --brand:#4057B3;
  --solid:#171816;
  --solid-text:#FFFFFF;
  --coral:#DCEB7C;
  --mustard:var(--signal);
  --mint:#D7E8D5;
  --sky:#E3E7EF;
  --lilac:#ECEBE5;
  --pink:#ECEBE5;
  --rgreen:var(--signal);
  --blue-ink:#27336F;
  --radius:8px;
  --radius-sm:5px;
  --bd:1px solid var(--line-strong);
  --bd-thin:1px solid rgba(23,24,22,.28);
  --sh:7px 7px 0 rgba(23,24,22,.92);
  --sh-sm:4px 4px 0 rgba(23,24,22,.88);
  --lift:4px 4px 0 rgba(23,24,22,.92);
  --focus:0 0 0 3px rgba(185,255,102,.42);
}

html[data-theme="dark"]{
  --bg:#121412;
  --surface:#1D201D;
  --surface-2:#252922;
  --surface-3:#30352C;
  --ink:#F4F3EA;
  --ink-soft:#C5C7B9;
  --ink-faint:#96998C;
  --line:#F4F3EA;
  --line-strong:#F4F3EA;
  --signal:#A6EA55;
  --brand:#8EA0FF;
  --coral:#CDE36C;
  --mint:#BFD9BE;
  --sky:#CDD3E0;
  --lilac:#33362F;
  --pink:#33362F;
  --sh:7px 7px 0 rgba(0,0,0,.85);
  --sh-sm:4px 4px 0 rgba(0,0,0,.8);
  --lift:4px 4px 0 rgba(0,0,0,.85);
}

body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Inter',system-ui,sans-serif;
}

html[data-theme="dark"] body{ background:var(--bg); }

h1,h2,h3,.brand-name,.sec-tag{
  letter-spacing:0;
}

section{ padding:64px 0; }
.wrap{ max-width:1180px; }

.nav{
  background:rgba(246,245,239,.94);
  border-bottom:var(--bd);
  backdrop-filter:blur(10px);
}

html[data-theme="dark"] .nav,
html[data-theme="dark"] .stepbar,
html[data-theme="dark"] .scorebar{
  background:rgba(29,32,29,.94);
}

.nav .wrap{ height:68px; }
.brand-logo{ height:38px; }
.brand-name{ font-size:1.18rem; }

.nav-link{
  border-radius:var(--radius-sm);
  padding:7px 12px;
  font-family:'Inter',system-ui,sans-serif;
  font-weight:600;
  font-size:.91rem;
}

.nav-link:hover{ border-color:var(--line); background:var(--surface-2); }

.nav-link.active{
  background:var(--signal);
  border:var(--bd);
  box-shadow:var(--sh-sm);
  color:#171816;
}

.btn{
  border:var(--bd);
  border-radius:var(--radius-sm);
  box-shadow:var(--lift);
  font-family:'Space Grotesk',sans-serif;
  transition:transform .08s,box-shadow .08s,background .12s,color .12s;
}

.btn:hover{ transform:translate(-1px,-1px); box-shadow:6px 6px 0 rgba(23,24,22,.92); }
.btn:active{ transform:translate(2px,2px); box-shadow:2px 2px 0 rgba(23,24,22,.92); }
.btn-brand{ background:var(--solid); color:var(--signal); }
.btn-brand:hover{ background:var(--solid); color:var(--signal); }
.btn-ghost{ background:var(--surface); color:var(--ink); }
.btn-accent{ background:var(--signal); color:#171816; }

.card,
.concept,
.ex-art,
.q,
.lb,
.tbl{
  border:var(--bd);
  border-radius:var(--radius);
}

.card,
.concept,
.ex-art{
  box-shadow:var(--sh-sm);
}

.card-2,.card-soft,.stat-card{ background:var(--surface-2); }

.chip-icon{
  width:46px;
  height:46px;
  border:var(--bd);
  border-radius:var(--radius-sm);
  box-shadow:none;
}

.chip-icon .material-symbols-rounded{ font-size:27px; }

.tag,.badge,.mini-chip,.var-pill{
  border-radius:var(--radius-sm);
  border:var(--bd-thin);
}

.hl-head{
  background:var(--signal);
  border-radius:var(--radius-sm);
  color:#171816;
}

.hl-head.brand{ background:var(--brand); color:#fff; }

.sec-head{
  align-items:flex-start;
  margin-bottom:30px;
  gap:22px;
}

.sec-tag{
  background:var(--signal);
  color:#171816;
  border-radius:var(--radius-sm);
  border:var(--bd);
  box-shadow:var(--sh-sm);
  padding:.08em .42em;
}

.sec-desc{
  max-width:54ch;
  padding-top:7px;
}

.hero-section{ padding-top:58px; padding-bottom:44px; }
.hero{
  grid-template-columns:minmax(0,1.02fr) minmax(320px,.78fr);
  gap:56px;
  align-items:center;
  padding-top:0;
}

.hero-copy h1{
  max-width:10.5ch;
  font-size:clamp(2.65rem,6vw,5.35rem);
  line-height:.98;
}

.hero-lede{
  font-size:1.12rem;
  max-width:52ch;
  margin-top:20px;
}

.hero-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:22px;
}

.hero-panel{
  position:relative;
  display:grid;
  place-items:center;
}

.hero-panel img{
  width:min(100%,440px);
  display:block;
  filter:none;
}

.score-slip{
  position:absolute;
  left:22px;
  bottom:22px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  background:var(--surface);
  border:var(--bd);
  border-radius:var(--radius-sm);
  box-shadow:var(--sh-sm);
}

.score-slip .mono{
  background:var(--solid);
  color:var(--signal);
  padding:2px 7px;
  border-radius:var(--radius-sm);
  font-size:.72rem;
}

.chapter-section{ padding-top:42px; }

.service-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px;
}

.service-card{
  min-height:310px;
  display:grid;
  grid-template-columns:1.1fr .72fr;
  align-items:end;
  gap:20px;
  padding:30px;
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh);
  color:var(--ink);
  text-decoration:none;
  overflow:hidden;
  transition:transform .1s,box-shadow .1s;
}

.service-card:hover{
  transform:translate(-2px,-2px);
  box-shadow:10px 10px 0 rgba(23,24,22,.92);
}

.service-card h3{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0 0 16px;
  font-size:clamp(1.55rem,3.2vw,2.25rem);
}

.service-card h3 span{
  width:max-content;
  max-width:100%;
  background:var(--surface);
  border-radius:var(--radius-sm);
  padding:.02em .24em;
}

.service-card p{
  max-width:35ch;
}

.service-card img{
  width:100%;
  max-width:220px;
  justify-self:end;
  align-self:center;
}

.service-kicker{
  font-family:'Space Mono',monospace;
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin:0 0 12px;
  color:var(--ink-soft);
}

.service-light{ background:var(--surface-2); }
.service-signal{ background:var(--signal); }
.service-signal,
.service-signal h3,
.service-signal p,
.service-signal .service-kicker,
.service-signal .learn{ color:#171816; }
.service-dark{
  grid-column:1 / -1;
  background:var(--solid);
  color:var(--solid-text);
}

.service-dark .service-kicker,
.service-dark p{ color:rgba(255,255,255,.76); }

.service-dark h3 span{
  background:var(--signal);
  color:#171816;
}

.learn{
  display:inline-flex;
  align-items:center;
  gap:12px;
  margin-top:8px;
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
}

.learn .arrow{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--solid);
  color:var(--signal);
  border:1px solid currentColor;
}

.service-dark .learn .arrow{
  background:var(--surface);
  color:var(--ink);
}

.process-section{ padding-top:26px; }

.process-list{
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh);
  background:var(--surface);
  overflow:hidden;
}

.process-item{
  display:grid;
  grid-template-columns:86px minmax(180px,.42fr) 1fr;
  gap:22px;
  align-items:center;
  padding:24px 28px;
  border-bottom:var(--bd);
}

.process-item:last-child{ border-bottom:0; }
.process-item:nth-child(even){ background:var(--surface-2); }

.process-num{
  font-family:'Space Grotesk',sans-serif;
  font-size:2rem;
  font-weight:700;
}

.process-item h3{ margin:0; }
.process-item p{ margin:0; color:var(--ink-soft); }

.closing-section{ padding-top:28px; }

.cta-band{
  background:var(--signal);
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh);
  padding:34px 30px;
}

.cta-band p{
  max-width:58ch;
  margin:0 auto 18px;
  color:#34372F;
}

.matchup{ padding:4px 0; }
.team-logo{
  border-radius:var(--radius);
  border:var(--bd);
  box-shadow:var(--sh-sm);
}

.vs-badge{
  border-radius:var(--radius-sm);
  background:var(--solid);
  color:var(--signal);
}

.code,
.code-input,
.callout{
  border-left-width:4px;
  border-radius:var(--radius-sm);
}

.step-pill,
.progress .seg,
.qnum,
.nav-toggle,
.theme-toggle,
.ans-in,
.choice{
  border-radius:var(--radius-sm);
}

.foot{
  background:var(--surface);
  border-top:var(--bd);
}

@media(max-width:900px){
  .hero{
    grid-template-columns:1fr;
    gap:30px;
  }
  .hero-copy h1{ max-width:12ch; }
  .hero-panel{
    max-width:520px;
    margin:0 auto;
  }
  .service-grid{ grid-template-columns:1fr; }
  .service-dark{ grid-column:auto; }
}

@media(max-width:720px){
  section{ padding:44px 0; }
  .hero-section{ padding-top:38px; }
  .hero-copy h1{ font-size:clamp(2.35rem,13vw,3.8rem); }
  .hero-panel img{ max-width:315px; }
  .service-card{
    grid-template-columns:1fr;
    min-height:auto;
    padding:24px;
  }
  .service-card img{
    max-width:165px;
    justify-self:start;
  }
  .process-item{
    grid-template-columns:1fr;
    gap:6px;
    padding:21px 22px;
  }
  .process-num{ font-size:1.5rem; }
  .sec-head{ gap:14px; }
}

/* Feeling lucky + info (re-added) */
:root{ --lucky:#2FA84F; }
html[data-theme="dark"]{ --lucky:#5FD08A; }
.lucky-toggle{ display:flex; align-items:center; gap:11px; padding:12px 14px; cursor:pointer;
  border:var(--bd-thin); border-left:6px solid var(--lucky); border-radius:var(--radius-sm);
  background:var(--surface-2); font-family:'Space Grotesk',sans-serif; font-weight:500; margin:4px 0 16px; }
.lucky-toggle input{ width:18px; height:18px; accent-color:var(--lucky); flex:0 0 auto; }
.lucky-badge{ display:inline-flex; align-items:center; gap:3px; font-family:'Space Grotesk',sans-serif;
  font-weight:600; font-size:.72rem; padding:2px 9px; border:1px solid var(--lucky); color:var(--lucky);
  border-radius:999px; background:rgba(47,168,79,.12); }
.lucky-mark{
  display:inline-flex;
  align-items:center;
  line-height:1;
  font-size:1rem;
  margin-left:-4px;
}
.info-link{ color:var(--ink-soft); text-decoration:none; display:inline-flex; align-items:center; vertical-align:middle; }
.info-link:hover{ color:var(--brand); }
.code-dim{ opacity:.45; }
.foot-links a{ color:var(--ink-soft); text-decoration:none; }
.foot-links a:hover{ color:var(--brand); }
.foot .wrap{ flex-wrap:wrap; gap:12px; }

/* Profiles */
.profile-head{ padding-bottom:18px; }
.profile-lede{ max-width:48ch; }
.profile-create-wrap{ padding-bottom:58px; }
.profile-create-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.82fr);
  gap:26px;
  align-items:start;
}
.profile-picker-card{ min-height:100%; }
.username-stage{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 48px;
  gap:12px;
  align-items:center;
  margin:18px 0;
}
.picker-arrow{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  cursor:pointer;
  color:var(--ink);
  background:var(--surface);
  border:var(--bd);
  border-radius:var(--radius-sm);
  box-shadow:var(--sh-sm);
}
.picker-arrow:hover{ transform:translate(-1px,-1px); }
.username-card{
  min-height:116px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  padding:20px;
  background:var(--signal);
  color:#171816;
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
  overflow:hidden;
}
.username-card strong{
  display:block;
  font-family:'Space Grotesk',sans-serif;
  font-size:clamp(1.55rem,4vw,2.55rem);
  line-height:1.05;
  overflow-wrap:anywhere;
}
.name-strip{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  max-height:160px;
  overflow:auto;
  padding:2px;
}
.name-chip{
  cursor:pointer;
  font-family:'Space Mono',monospace;
  font-size:.72rem;
  color:var(--ink);
  background:var(--surface);
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  padding:5px 8px;
}
.name-chip.active{
  background:var(--solid);
  color:var(--signal);
  border-color:var(--line);
}
.avatar-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(92px,1fr));
  gap:12px;
  margin:14px 0 18px;
}
.avatar-grid-create{ grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); }
.avatar-choice{
  display:grid;
  place-items:center;
  aspect-ratio:1;
  cursor:pointer;
  background:var(--surface-2);
  border:var(--bd-thin);
  border-radius:var(--radius);
  padding:8px;
  transition:transform .08s,box-shadow .08s,background .12s;
}
.avatar-choice:hover{ transform:translate(-1px,-1px); box-shadow:var(--sh-sm); }
.avatar-choice.active{
  background:var(--signal);
  border:var(--bd);
  box-shadow:var(--sh-sm);
}
.avatar-choice input{ position:absolute; opacity:0; pointer-events:none; }
.avatar-choice img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.profile-submit{ margin-top:4px; }
.profile-entry{ text-align:left; }
.entry-profile{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  margin:0 0 16px;
  background:var(--surface-2);
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
}
.entry-avatar,
.lb-avatar{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:var(--surface);
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  overflow:hidden;
}
.entry-avatar img,
.lb-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 20%;
  transform:scale(1.55);
}
.lb-player{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.lb-name{ text-decoration:none; }
.lb-name:hover{ color:var(--brand); }
.profile-hero-section{ padding:46px 0 26px; }
.profile-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.76fr);
  gap:28px;
  align-items:stretch;
}
.profile-card-main{
  display:flex;
  align-items:center;
  gap:24px;
  padding:26px;
  background:var(--surface);
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh);
}
.profile-avatar-xl{
  width:180px;
  height:180px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:var(--signal);
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
  overflow:hidden;
}
.profile-avatar-xl img{
  width:100%;
  height:100%;
  object-fit:contain;
  transform:none;
}
.profile-title h1{
  margin:.05em 0 .1em;
  overflow-wrap:anywhere;
  font-size:clamp(1.8rem,4vw,3rem);
  line-height:1.08;
}
.profile-title h1 span{
  display:inline;
  background:rgba(185,255,102,.48);
  color:var(--ink);
  border-radius:var(--radius-sm);
  padding:.02em .24em;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
.profile-stats-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.profile-stat{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:18px 20px;
  background:var(--signal);
  color:#171816;
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
}
.profile-stat:nth-child(2){
  background:var(--signal);
  color:#171816;
}
.profile-stat:nth-child(3){
  background:var(--signal);
  color:#171816;
}
.profile-stat .case-type{ color:inherit; opacity:.78; }
.profile-stat strong{
  font-family:'Space Grotesk',sans-serif;
  font-size:2rem;
  line-height:1;
}
.profile-detail-section{ padding-top:26px; }
.profile-detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:26px;
  align-items:start;
}
.profile-chip-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.character-details summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  cursor:pointer;
  list-style:none;
}
.character-details summary::-webkit-details-marker{ display:none; }
.character-details .concept-head{ margin:0; }
.character-chevron{ transition:transform .12s; }
.character-details[open] .character-chevron{ transform:rotate(180deg); }
.character-details form{
  margin-top:18px;
  padding-top:18px;
  border-top:var(--bd-thin);
}
.signin-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}
.signin-card{ padding:0; overflow:hidden; }
.signin-button{
  width:100%;
  min-height:120px;
  display:flex;
  align-items:center;
  gap:16px;
  cursor:pointer;
  text-align:left;
  color:var(--ink);
  background:var(--surface);
  border:0;
  padding:18px;
  font:inherit;
}
.signin-button:hover{ background:var(--surface-2); }
.signin-avatar{
  width:72px;
  height:72px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  overflow:hidden;
  background:var(--signal);
  border:var(--bd);
  border-radius:var(--radius-sm);
}
.signin-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 20%;
  transform:scale(1.45);
}
.signin-name{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:1.2rem;
  overflow-wrap:anywhere;
}

/* Admin dashboard */
.admin-wrap{ padding-top:30px; }
.admin-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:8px;
}
.admin-topbar h1{ margin:0; }
.admin-top-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.admin-panel{
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
  padding:22px;
  margin-bottom:18px;
}
.admin-panel h3{ margin:0 0 12px; }
.admin-main{ background:#B9FF66; color:#171816; }
.admin-blue{ background:#668BFF; color:#fff; }
.admin-coral{ background:#FF8666; color:#171816; }
.admin-olive{ background:#96AA7D; color:#171816; }
.admin-panel .muted,
.admin-panel .ans-field .l{ color:inherit; opacity:.78; }
.admin-panel .ans-in,
.admin-panel .code-input{
  background:rgba(255,255,255,.88);
  color:#171816;
  border-color:rgba(23,24,22,.55);
}
.admin-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.admin-status,
.admin-status-box{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:6px 12px;
  font-family:'Space Mono',monospace;
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
  background:var(--solid);
  color:var(--signal);
  border:var(--bd);
  border-radius:var(--radius-sm);
}
.admin-actions-row{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  font-size:.92rem;
}
.admin-actions-row span{ max-width:62ch; }
.admin-history{ padding:44px 0 0; }
.admin-history-item{
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
  background:var(--surface);
  margin-bottom:16px;
  overflow:hidden;
}
.admin-history-item summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  cursor:pointer;
  list-style:none;
  padding:18px 20px;
  background:#B9FF66;
  color:#171816;
}
.admin-history-item:nth-child(4n+2) summary{ background:#FF8666; }
.admin-history-item:nth-child(4n+3) summary{ background:#668BFF; color:#fff; }
.admin-history-item:nth-child(4n+4) summary{ background:#96AA7D; }
.admin-history-item summary::-webkit-details-marker{ display:none; }
.admin-history-item summary div{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.admin-history-item summary strong{
  font-family:'Space Grotesk',sans-serif;
  font-size:1.3rem;
}
.admin-history-body{ padding:20px; }
.admin-meta-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin-bottom:18px;
}
.admin-meta-grid div{
  background:var(--surface-2);
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  padding:10px 12px;
}
.admin-meta-grid span{
  display:block;
  font-family:'Space Mono',monospace;
  font-size:.7rem;
  color:var(--ink-soft);
  text-transform:uppercase;
  margin-bottom:3px;
}
.admin-meta-grid strong{ overflow-wrap:anywhere; }
.admin-history-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-bottom:18px;
}
.admin-history-columns h4{ margin:0 0 8px; }
.admin-chip-row{ display:flex; gap:8px; flex-wrap:wrap; }
.admin-lb{ margin-top:8px; }
.accuracy-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:14px;
  margin:18px 0;
}
.accuracy-card{
  background:var(--surface-2);
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  padding:14px;
}
.accuracy-card h4{ margin:0 0 4px; font-size:1.05rem; }
.accuracy-row{
  display:grid;
  grid-template-columns:70px 1fr 52px;
  gap:8px;
  align-items:center;
  margin-top:9px;
  font-size:.82rem;
}
.accuracy-track,
.record-track{
  height:12px;
  background:rgba(23,24,22,.12);
  border:var(--bd-thin);
  border-radius:999px;
  overflow:hidden;
}
.accuracy-track i,
.record-track i{
  display:block;
  height:100%;
  background:#668BFF;
}
.public-accuracy{ margin:0 0 18px; }
.podium-wrap{
  position:relative;
  max-width:720px;
  margin:2px auto 24px;
}
.podium-img{
  width:100%;
  display:block;
}
.podium-player{
  position:absolute;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  color:var(--ink);
  text-decoration:none;
}
.podium-player strong{
  max-width:140px;
  padding:3px 8px;
  background:rgba(185,255,102,.82);
  color:#171816;
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  font-size:.82rem;
  text-align:center;
  overflow-wrap:anywhere;
}
.podium-player img{
  width:74px;
  height:74px;
  object-fit:cover;
  object-position:center 20%;
  transform:scale(1.28);
  background:var(--surface);
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
}
.podium-first{ left:50%; top:19%; transform:translateX(-50%); }
.podium-second{ left:23%; top:31%; transform:translateX(-50%); }
.podium-third{ left:77%; top:35%; transform:translateX(-50%); }
.records-wrap{ padding-bottom:58px; }
.records-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-bottom:24px;
}
.record-card h3{ margin:0 0 14px; }
.record-row{
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(90px,.65fr) 56px;
  gap:10px;
  align-items:center;
  padding:10px 0;
  border-bottom:var(--bd-thin);
}
.record-row:last-child{ border-bottom:0; }
.record-row span{
  display:block;
  color:var(--ink-soft);
  font-size:.82rem;
}
.record-track i{ background:#B9FF66; }
.records-list{ margin-top:18px; }
.record-hero{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.record-hero strong{
  font-size:1.25rem;
  overflow-wrap:anywhere;
}
.record-hero span{ color:var(--ink-soft); }
.record-hero b{
  align-self:flex-start;
  margin-top:6px;
  padding:4px 11px;
  background:var(--signal);
  color:#171816;
  border:var(--bd);
  border-radius:var(--radius-sm);
}
.stats-guide-head{ padding-bottom:20px; }
.stats-guide-wrap{
  display:grid;
  gap:18px;
  padding-bottom:42px;
}
.sport-guide{
  border:var(--bd);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--sh-sm);
  overflow:hidden;
}
.sport-guide summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  cursor:pointer;
  list-style:none;
  padding:18px 20px;
  background:var(--signal);
  color:#171816;
}
.sport-guide:nth-child(2) summary{ background:#FF8666; }
.sport-guide summary::-webkit-details-marker{ display:none; }
.sport-guide summary div{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.sport-guide summary strong{
  font-family:'Fredoka',sans-serif;
  font-size:1.45rem;
}
.sport-guide summary span{ color:#171816; }
.sport-guide summary .sec-tag{
  align-self:flex-start;
  background:#171816;
  color:#B9FF66;
}
.sport-guide-body{
  display:grid;
  gap:20px;
  padding:20px;
}
.field-guide{
  align-self:start;
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  overflow:hidden;
  background:var(--surface-2);
}
.field-guide img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
}
.field-note{
  position:absolute;
  transform:translate(-50%,-50%);
  z-index:2;
  max-width:128px;
  padding:5px 8px;
  border:2px solid #171816;
  border-radius:999px;
  background:#B9FF66;
  color:#171816;
  font-family:'Space Mono',monospace;
  font-size:.7rem;
  font-weight:700;
  text-align:center;
  line-height:1.1;
  box-shadow:2px 2px 0 rgba(23,24,22,.92);
}
.stat-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.stat-guide-card{
  display:grid;
  grid-template-columns:46px 1fr;
  gap:11px;
  align-items:start;
  min-width:0;
  padding:13px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
}
.stat-guide-card .chip-icon{
  width:42px;
  height:42px;
  color:#171816;
}
.stat-abbr{
  display:inline-block;
  margin-bottom:4px;
  padding:2px 7px;
  border-radius:999px;
  background:rgba(185,255,102,.72);
  color:#171816;
  font-family:'Space Mono',monospace;
  font-size:.68rem;
  font-weight:700;
}
.stat-guide-card h3{
  margin:0 0 4px;
  font-size:1rem;
}
.stat-guide-card p{
  margin:0;
  color:var(--ink-soft);
  line-height:1.45;
  font-size:.92rem;
}
.rules-head{ padding-bottom:22px; }
.rules-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
  padding-bottom:58px;
}
.rules-card{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:16px;
  padding:18px;
  border:var(--bd);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--sh-sm);
  color:var(--ink);
  text-decoration:none;
}
.rules-card:hover{ transform:translate(-1px,-1px); box-shadow:var(--sh); }
.rules-card img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
}
.rules-card h2{ margin:10px 0 6px; }
.rules-card p{ margin:0 0 14px; color:var(--ink-soft); line-height:1.5; }
.rules-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}
.rules-detail{
  display:grid;
  gap:22px;
  padding-bottom:58px;
}
.rules-diagram{
  border:var(--bd);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--sh-sm);
  padding:14px;
}
.rules-diagram img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
}
.rules-panel{
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  background:var(--surface);
  padding:18px;
}
.sec-head.compact{ margin-bottom:14px; }
.rule-timeline-grid{
  display:grid;
  gap:12px;
}
.rule-timeline-grid{ grid-template-columns:1fr; }
.rule-basics-picker{
  display:grid;
  grid-template-columns:minmax(170px,.58fr) minmax(0,1.42fr);
  grid-template-rows:auto auto;
  gap:16px;
  align-items:stretch;
}
.rule-basic-tabs{
  display:grid;
  align-content:start;
  gap:8px;
}
.rule-basic-tab{
  width:100%;
  cursor:pointer;
  text-align:left;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
  color:var(--ink);
  font-family:'Fredoka',sans-serif;
  font-weight:600;
  font-size:1rem;
  transition:transform .08s, background .08s, box-shadow .08s;
}
.rule-basic-tab:hover{ transform:translateY(-1px); }
.rule-basic-tab.active{
  background:#B9FF66;
  color:#171816;
  border-color:#171816;
  box-shadow:0 4px 0 rgba(23,24,22,.18);
}
.rule-basic-stage{
  min-width:0;
  display:grid;
}
.rule-basic-panel{
  display:none;
  grid-template-rows:minmax(280px,auto) auto;
  gap:14px;
}
.rule-basic-panel.active{ display:grid; animation:fade .2s ease; }
.rule-basic-panel img{
  display:block;
  width:100%;
  aspect-ratio:16/10;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:#fff;
}
.rule-basic-copy{
  padding:16px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
}
.rule-basic-copy h3,
.rule-stat-copy h3{ margin:0 0 6px; font-size:1.25rem; }
.rule-basic-copy p,
.rule-stat-copy p{
  margin:0;
  color:var(--ink-soft);
  line-height:1.55;
}
.rule-basics-picker.rules-afl{
  grid-template-columns:1fr;
}
.rule-basics-picker.rules-afl .rule-basic-tabs{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.rule-basics-picker.rules-afl .rule-basic-tab{
  text-align:center;
}
.rule-basics-picker.rules-afl .rule-basic-panel{
  grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);
  grid-template-rows:auto;
  align-items:stretch;
}
.rule-basics-picker.rules-afl .rule-basic-panel img{
  order:2;
  aspect-ratio:16/9;
}
.rule-basics-picker.rules-afl .rule-basic-copy{
  order:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.rule-basics-picker.rules-baseball{
  grid-template-columns:minmax(170px,.52fr) minmax(0,1.48fr);
}
.rule-basics-picker.rules-baseball .rule-basic-panel{
  grid-template-rows:minmax(220px,auto) auto;
}
.rule-basics-picker.rules-baseball .rule-basic-panel img{
  max-width:100%;
  justify-self:stretch;
  aspect-ratio:8/4;
  background:#fff;
}
.rule-basics-picker.rules-baseball .rule-basic-copy{
  padding:14px 16px;
}
.rule-carousel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.rule-carousel-controls{
  display:flex;
  align-items:center;
  gap:10px;
}
.rule-carousel-btn{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  cursor:pointer;
  border:2px solid #171816;
  border-radius:999px;
  background:#B9FF66;
  color:#171816;
}
.rule-carousel-btn:hover{ transform:translateY(-1px); }
.rule-carousel-btn .material-symbols-rounded{ font-size:1.8rem; }
.rule-carousel-count{
  font-family:'Space Mono',monospace;
  font-size:.86rem;
  font-weight:700;
  color:var(--ink);
}
.rule-flow-carousel{
  display:grid;
}
.rule-flow-slide{
  display:none;
  grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);
  gap:22px;
  align-items:center;
  padding:16px;
  border:2px solid #171816;
  border-radius:var(--radius-sm);
  background:#B9FF66;
  color:#171816;
}
.rule-flow-slide.active{ display:grid; animation:fade .2s ease; }
.rule-flow-slide img{
  display:block;
  width:100%;
  aspect-ratio:16/10;
  object-fit:contain;
  border:2px solid #171816;
  border-radius:var(--radius-sm);
  background:#fff;
}
.rule-flow-copy h3{
  margin:0 0 8px;
  color:#171816;
  font-size:1.6rem;
}
.rule-flow-copy p{
  margin:0;
  color:#171816;
  line-height:1.55;
  font-size:1.05rem;
}
.rule-visual-card{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:12px;
  align-items:start;
  padding:12px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
}
.rule-visual-card.flow{
  background:#B9FF66;
  color:#171816;
}
.rule-visual-card.flow p{ color:#171816; }
.rule-visual-card.flow img{
  background:rgba(255,253,248,.52);
  border-color:#171816;
}
.rule-visual-card.compact{
  grid-template-columns:92px 1fr;
  grid-template-rows:auto;
}
.rule-visual-card img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface-2);
}
.rule-visual-card.compact img{ aspect-ratio:1/1; }
.rule-visual-card h3{ margin:0 0 5px; font-size:1rem; }
.rule-visual-card p{
  margin:0;
  color:var(--ink-soft);
  line-height:1.45;
}
.rule-step{
  display:block;
  width:auto;
  height:auto;
  margin-bottom:8px;
  background:transparent;
  font-family:'Space Mono',monospace;
  font-size:2.15rem;
  line-height:1;
  font-weight:700;
  color:#171816;
}
.rules-stat-list{
  display:grid;
  gap:12px;
}
.rule-stat-details{
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
  overflow:hidden;
}
.rule-stat-details summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:62px;
  padding:14px 18px;
  cursor:pointer;
  font-family:'Fredoka',sans-serif;
  font-size:1.14rem;
  font-weight:700;
  color:var(--ink);
}
.rule-stat-details summary::-webkit-details-marker{ display:none; }
.rule-stat-details summary:hover{ background:var(--surface); }
.rule-stat-open{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:999px;
  background:#B9FF66;
  color:#171816;
}
.rule-stat-open .material-symbols-rounded{
  font-size:1.55rem;
  transition:transform .16s ease;
}
.rule-stat-details[open] .rule-stat-open .material-symbols-rounded{
  transform:rotate(180deg);
}
.rule-stat-details:not([open]) .rule-stat-row{ display:none; }
.rule-stat-row{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:24px;
  align-items:center;
  padding:0 18px 18px;
  border:0;
  border-radius:0;
  background:transparent;
}
.rule-stat-row.flip{
  grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);
}
.rule-stat-row.flip .rule-stat-art{ order:2; }
.rule-stat-row.flip .rule-stat-copy{ order:1; }
.rule-stat-art img{
  display:block;
  width:100%;
  aspect-ratio:16/10;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface);
}
.rule-stat-copy{
  min-width:0;
  padding:8px;
}
.rule-timeline-card{
  display:grid;
  grid-template-columns:64px 1fr;
  gap:16px;
  align-items:center;
  padding:16px 18px;
  border:2px solid #171816;
  border-radius:var(--radius-sm);
  background:#171816;
  color:#FFFDF8;
}
.rule-timeline-card .material-symbols-rounded{
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:999px;
  background:#B9FF66;
  color:#171816;
  font-size:2rem;
}
.rule-timeline-card h3{
  margin:0 0 4px;
  color:#FFFDF8;
  font-size:1.05rem;
}
.rule-timeline-card p{
  margin:0;
  color:rgba(255,253,248,.78);
  line-height:1.45;
}
.challenge-wrap{
  max-width:1080px;
}
.leaderboard-card{
  overflow:hidden;
}
.boxplot-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:14px;
  margin:18px 0;
}
.boxplot-card{
  background:var(--surface-2);
  border:var(--bd-thin);
  border-radius:var(--radius-sm);
  padding:14px;
}
.boxplot-card h4{ margin:0 0 4px; font-size:1.05rem; }
.boxplot-stats{
  list-style:none;
  margin:10px 0 12px;
  padding:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(112px,1fr));
  gap:6px;
}
.boxplot-stats li{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--surface);
  min-width:0;
}
.boxplot-stats span{
  font-family:'Space Mono',monospace;
  font-size:.68rem;
  color:var(--ink-soft);
  white-space:normal;
  line-height:1.12;
}
.boxplot-stats strong{
  font-family:'Space Mono',monospace;
  font-size:.76rem;
  color:var(--ink);
  white-space:nowrap;
  flex:0 0 auto;
}
.boxplot-track{
  position:relative;
  height:34px;
  margin:14px 6px 4px;
}
.boxplot-track::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:16px;
  height:2px;
  background:var(--line);
}
.boxplot-line,
.boxplot-box,
.boxplot-median{
  position:absolute;
  display:block;
}
.boxplot-line{
  top:13px;
  height:8px;
  border-left:2px solid var(--line);
  border-right:2px solid var(--line);
}
.boxplot-box{
  top:8px;
  height:18px;
  min-width:6px;
  background:#668BFF;
  border:var(--bd-thin);
  border-radius:4px;
}
.boxplot-median{
  top:5px;
  width:2px;
  height:24px;
  background:#FF8666;
}
.boxplot-outlier{
  position:absolute;
  top:11px;
  width:12px;
  height:12px;
  margin-left:-6px;
  border-radius:50%;
  background:#B9FF66;
  border:var(--bd-thin);
  z-index:3;
}
.boxplot-labels{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-family:'Space Mono',monospace;
  font-size:.72rem;
  color:var(--ink-soft);
}
.past-wrap{ padding-bottom:58px; }
.past-challenge{
  margin-bottom:18px;
  border:var(--bd);
  border-radius:var(--radius);
  box-shadow:var(--sh-sm);
  background:var(--surface);
  overflow:hidden;
}
.past-challenge summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  cursor:pointer;
  list-style:none;
  padding:18px 20px;
  background:var(--signal);
  color:#171816;
}
.past-challenge summary::-webkit-details-marker{ display:none; }
.past-challenge summary div{ display:flex; flex-direction:column; gap:3px; }
.past-challenge summary strong{ font-size:1.2rem; }
.past-board{
  border:0;
  border-top:var(--bd);
  border-radius:0;
  box-shadow:none;
}
.image-manager-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:18px;
  padding-bottom:58px;
}
.image-manager-section{ margin-bottom:28px; }
.image-choice-card{
  background:var(--surface);
  border:var(--bd);
  border-radius:var(--radius-sm);
  box-shadow:var(--sh-sm);
  padding:14px;
}
.image-choice-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:12px;
}
.image-choice-head h3{ margin:0 0 3px; font-size:1.15rem; }
.image-choice-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.image-choice-options.two{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.image-choice-option{
  display:grid;
  gap:7px;
  cursor:pointer;
}
.image-choice-option input{ accent-color:var(--brand); }
.image-choice-option span{
  font-family:'Space Mono',monospace;
  font-size:.72rem;
  color:var(--ink-soft);
}
.image-choice-option img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:8px;
  padding:6px;
}
.image-choice-prompt{
  margin-top:10px;
  color:var(--ink-soft);
  font-size:.86rem;
}
.image-choice-prompt summary{
  cursor:pointer;
  font-family:'Space Mono',monospace;
  font-size:.72rem;
  color:var(--ink);
}
.image-choice-prompt p{ margin:7px 0 0; line-height:1.45; }
html[data-theme="dark"] .admin-main{ background:#B9FF66; color:#171816; }
html[data-theme="dark"] .admin-blue{ background:#668BFF; color:#fff; }
html[data-theme="dark"] .admin-coral{ background:#FF8666; color:#171816; }
html[data-theme="dark"] .admin-olive{ background:#96AA7D; color:#171816; }
html[data-theme="dark"] .admin-panel .ans-in,
html[data-theme="dark"] .admin-panel .code-input{
  background:rgba(255,255,255,.9);
  color:#171816;
}
html[data-theme="dark"] .profile-title h1 span{
  background:rgba(166,234,85,.34);
  color:#171816;
}
html[data-theme="dark"] .profile-stat{
  background:#D8904B;
  color:#171816;
}
html[data-theme="dark"] .profile-stat:nth-child(2){
  background:#D8904B;
  color:#171816;
}
html[data-theme="dark"] .profile-stat:nth-child(3){
  background:#D8904B;
  color:#171816;
}
@media(max-width:880px){
  .profile-create-grid,
  .profile-hero,
  .profile-detail-grid{ grid-template-columns:1fr; }
  .profile-card-main{ align-items:flex-start; }
  .admin-history-columns{ grid-template-columns:1fr; }
  .records-grid{ grid-template-columns:1fr; }
  .stat-list{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rules-grid{ grid-template-columns:1fr; }
  .rule-basics-picker{ grid-template-columns:minmax(150px,.65fr) minmax(0,1.35fr); }
  .rule-basics-picker.rules-afl{ grid-template-columns:1fr; }
  .rule-basics-picker.rules-afl .rule-basic-panel{ grid-template-columns:1fr 1fr; }
  .rule-basics-picker.rules-baseball{ grid-template-columns:minmax(150px,.52fr) minmax(0,1.48fr); }
  .rule-flow-slide{ grid-template-columns:1fr; }
  .rule-stat-row,
  .rule-stat-row.flip{ grid-template-columns:1fr 1fr; }
  .rule-timeline-grid{ grid-template-columns:1fr; }
}
@media(max-width:560px){
  .username-stage{ grid-template-columns:40px minmax(0,1fr) 40px; gap:8px; }
  .picker-arrow{ width:40px; height:44px; }
  .profile-card-main{ flex-direction:column; }
  .profile-avatar-xl{ width:150px; height:150px; }
  .profile-stat{ align-items:flex-start; flex-direction:column; }
  .podium-player img{ width:54px; height:54px; }
  .podium-player strong{ font-size:.68rem; max-width:96px; }
  .record-row{ grid-template-columns:1fr; }
  .sport-guide summary{ padding:16px; }
  .sport-guide-body{ padding:14px; }
  .stat-list{ grid-template-columns:1fr; }
  .field-note{ font-size:.55rem; max-width:82px; padding:3px 5px; }
  .rules-panel{ padding:14px; }
  .rule-basics-picker,
  .rule-basics-picker.rules-baseball{ grid-template-columns:1fr; }
  .rule-basic-tabs{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rule-basics-picker.rules-afl .rule-basic-tabs{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rule-basic-tab{ text-align:center; padding:10px 8px; }
  .rule-basic-panel,
  .rule-basics-picker.rules-afl .rule-basic-panel{ grid-template-columns:1fr; grid-template-rows:auto auto; }
  .rule-basics-picker.rules-afl .rule-basic-panel img,
  .rule-basics-picker.rules-afl .rule-basic-copy{ order:initial; }
  .rule-basics-picker.rules-baseball .rule-basic-panel img{ max-width:100%; }
  .rule-basic-panel img,
  .rule-flow-slide img,
  .rule-stat-art img{ aspect-ratio:4/3; }
  .rule-carousel-head{ flex-direction:column; }
  .rule-carousel-controls{ width:100%; justify-content:space-between; }
  .rule-flow-slide{ grid-template-columns:1fr; padding:12px; }
  .rule-stat-row,
  .rule-stat-row.flip{ grid-template-columns:1fr; }
  .rule-stat-row.flip .rule-stat-art,
  .rule-stat-row.flip .rule-stat-copy{ order:initial; }
  .rule-stat-details summary{ min-height:54px; padding:12px 14px; }
  .rule-timeline-card{ grid-template-columns:48px 1fr; gap:12px; padding:14px; }
  .rule-timeline-card .material-symbols-rounded{ width:42px; height:42px; font-size:1.65rem; }
  .image-choice-options,
  .image-choice-options.two{ grid-template-columns:1fr; }
}
