:root {
  --cobalt: #1d3fe0;
  --cobalt-deep: #1631b8;
  --ink: #0b1554;
  --chalk: #f4f6fc;
  --white: #fff;
  --yellow: #ffd21f;
  --red: #e5352b;
  --green: #0e9f5b;
  --line: #d6dcf0;
  --muted: #4d5884;
  --display: "Archivo", "Arial Black", "Helvetica Neue", sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 22px;
  --r-sm: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--chalk);
}
h1, h2, h3 { font-family: var(--display); font-stretch: 125%; font-weight: 900; line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: var(--cobalt); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- top bar and footer ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: var(--cobalt); color: var(--white); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand svg { fill: var(--yellow); flex: none; }
.top nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 26px); font-weight: 600; }
.top nav a { color: var(--white); text-decoration: none; white-space: nowrap; }
.top nav a:hover { text-decoration: underline; }
.top nav form { margin: 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.top .linkish { color: var(--white); text-decoration: none; white-space: nowrap; }
@media (max-width: 480px) { .top { padding: 12px 14px; gap: 10px; } .top nav { gap: 12px; font-size: 0.92rem; } .brand { font-size: 1.05rem; gap: 7px; } .brand svg { width: 26px; } .top .btn-sm { padding: 8px 12px; } }
.foot { background: var(--ink); color: #c9d0ee; padding: 36px clamp(16px, 4vw, 48px) 48px; display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; font-size: 0.95rem; }
.foot p { margin: 0; max-width: 46ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--white); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 800; font-stretch: 112%; padding: 14px 24px; border-radius: 999px; border: 2px solid var(--ink); cursor: pointer; text-decoration: none; line-height: 1.1; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.btn-yellow:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn-yellow:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--cobalt); border-color: var(--cobalt); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-sm { padding: 9px 16px; font-size: 0.92rem; box-shadow: none; }
.top .btn-sm { border-color: var(--ink); }

/* ---------- app shell ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 32px) 64px; display: grid; gap: 22px; }
body.narrow main { padding: clamp(24px, 6vw, 64px) 16px 72px; }
.card { background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px); }
.card h2 { font-size: 1.3rem; }
.card > :last-child { margin-bottom: 0; }
.form-card { max-width: 460px; margin: 0 auto; }
.form-card h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); }
.h-app { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 0.2em; }
.two { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.stack { display: grid; gap: 22px; }
.flash { max-width: 1016px; margin: 18px auto 0; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 700; border: 2px solid var(--ink); background: #d9f7e6; width: calc(100% - 32px); }
.flash-err { background: #ffe1de; }
.error { color: #a01b12; font-weight: 700; background: #ffe1de; padding: 10px 14px; border-radius: var(--r-sm); }
.banner { background: var(--yellow); border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 12px 18px; font-weight: 800; margin: 0; }
.empty { text-align: left; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 0.95rem; }
label small { font-weight: 400; color: var(--muted); }
input, select { font: inherit; color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 12px 14px; width: 100%; min-width: 0; }
input:disabled { background: var(--chalk); color: var(--muted); border-color: var(--line); }
input[type="checkbox"] { width: 22px; height: 22px; padding: 0; flex: none; accent-color: var(--cobalt); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.hp { position: absolute; left: -9999px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.row[hidden] { display: none; }
.inline { grid-template-columns: 1fr auto; align-items: end; }
.grow { min-width: 0; }
@media (max-width: 560px) { .inline { grid-template-columns: 1fr; } }
.logform-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logform-foot output { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.scoreline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; }
.scoreline > div, .prize { display: grid; gap: 2px; }
.big-num { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.cap { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.crewhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; align-items: end; }
.prize { text-align: right; }
@media (max-width: 560px) { .prize { text-align: left; } }
.prize .big-num { color: var(--cobalt); }

.crewlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.crewcard { display: grid; gap: 4px; text-decoration: none; color: var(--ink); box-shadow: 0 5px 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.crewcard:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.crewname { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 1.25rem; }
.crewrank { font-weight: 800; color: var(--cobalt); }

/* ---------- the board ---------- */
.rows { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.rowline { display: grid; grid-template-columns: 2ch minmax(0, 1.4fr) minmax(40px, 2fr) auto minmax(7ch, auto); gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--chalk); }
.rowline.me { background: #fff6c9; outline: 2px solid var(--ink); }
.rk { font-family: var(--display); font-weight: 900; font-stretch: 125%; }
.nm { font-weight: 700; overflow-wrap: anywhere; }
.pt { font-family: var(--display); font-stretch: 112%; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--cobalt); border-radius: 99px; min-width: 3px; }
.me .bar i { background: var(--ink); }
.gr { font-weight: 900; font-size: 0.8rem; min-width: 3.4ch; text-align: center; padding: 3px 7px; border-radius: 6px; border: 2px solid var(--ink); background: var(--white); }
.grade-s { background: var(--yellow); }
.grade-a { background: #bff0d6; }
.grade-b { background: #cfd9ff; }
.grade-c { background: var(--white); }
.grade-d { background: #ffd9b8; }
.grade-f { background: #ffc9c4; }
.big-num.grade-s, .big-num.grade-a, .big-num.grade-b, .big-num.grade-c, .big-num.grade-d, .big-num.grade-f { background: none; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.tag-in { background: var(--green); color: var(--white); }
@media (max-width: 560px) {
  .rowline { grid-template-columns: 2ch minmax(0, 1fr) auto auto; }
  .rowline .bar { display: none; }
}

.votes { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font: inherit; font-weight: 800; padding: 10px 16px; border-radius: 99px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer; }
.chip:hover { background: var(--chalk); }
.chip.on { background: var(--ink); color: var(--white); }
.chip b { display: inline-block; margin-left: 6px; background: var(--yellow); color: var(--ink); border-radius: 99px; padding: 0 7px; font-size: 0.8rem; }
.copyrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
@media (max-width: 420px) { .copyrow { grid-template-columns: 1fr; } }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed-r { display: inline-flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.feed-r form { display: inline; }
.feed-r .linkish { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.leave { justify-items: start; color: var(--muted); }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stats .card { display: grid; gap: 4px; }
.stats .big-num { font-size: 2rem; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td form { display: block; }
.prose { max-width: 70ch; }
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }

/* ---------- landing ---------- */
body.landing { background: var(--white); }
.sec { padding: clamp(56px, 9vw, 110px) clamp(16px, 4vw, 48px); }
.sec-in { max-width: 1120px; margin: 0 auto; }
.sec h2 { font-size: clamp(2rem, 5.4vw, 3.6rem); max-width: 18ch; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; }

.hero { background: var(--cobalt); color: var(--white); padding-top: clamp(28px, 5vw, 64px); overflow: hidden; }
.hero .sec-in { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; }
@media (max-width: 900px) { .hero .sec-in { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.7rem, 7.6vw, 5.6rem); line-height: 0.92; letter-spacing: -0.035em; margin-bottom: 0.35em; }
.hero h1 span { display: block; }
.hero .lede { color: #e4e9ff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 26px; }
.cta-note { margin: 16px 0 0; color: #cdd6ff; font-size: 0.95rem; }

.demo { background: var(--white); color: var(--ink); border: 3px solid var(--ink); border-radius: 26px; padding: clamp(16px, 2.6vw, 26px); box-shadow: 10px 10px 0 var(--ink); position: relative; }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.demo-head strong { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 1.15rem; }
.demo-head span { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.demo-rows { position: relative; height: 248px; margin: 0; padding: 0; list-style: none; }
.demo-row { position: absolute; left: 0; right: 0; top: 0; height: 54px; display: grid; grid-template-columns: 2ch minmax(0, 5.5rem) minmax(0, 1fr) 7ch; gap: 12px; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--chalk); transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1), background 0.3s; will-change: transform; }
.demo-row.you { background: #fff6c9; outline: 2px solid var(--ink); }
.demo-row .bar i { transition: width 0.6s cubic-bezier(0.2, 0.9, 0.2, 1); }
.demo-row.you .bar i { background: var(--ink); }
.demo-toast { min-height: 3.2em; margin: 6px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--white); font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.demo-toast::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); }
.demo-calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.demo-calc label { font-size: 0.8rem; }
.demo-calc input { padding: 10px; font-weight: 800; text-align: center; }
.demo-calc .btn { padding: 12px 18px; }
.demo-sum { margin: 10px 0 0; font-weight: 700; color: var(--muted); font-size: 0.95rem; }
.demo-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .demo-calc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-calc .btn { grid-column: 1 / -1; }
  .demo-row { grid-template-columns: 2ch minmax(0, 4.6rem) minmax(0, 1fr) 6.5ch; gap: 8px; padding: 0 10px; }
  .demo { box-shadow: 6px 6px 0 var(--ink); }
}

.steps { list-style: none; counter-reset: s; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.steps li { counter-increment: s; border-top: 4px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(s); font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 3.2rem; line-height: 1; color: var(--cobalt); display: block; margin-bottom: 10px; }
.steps h3 { font-size: 1.2rem; font-stretch: 112%; margin-bottom: 0.4em; }
.steps p { margin: 0; color: var(--muted); }

.points { background: var(--chalk); }
.points .sec-in { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 860px) { .points .sec-in { grid-template-columns: 1fr; } }
.barbell { width: 100%; height: auto; display: block; }
.ledger { list-style: none; margin: 24px 0 0; padding: 0; border-top: 3px solid var(--ink); }
.ledger li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.ledger b { font-family: var(--display); font-stretch: 112%; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ladder { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; }
.ladder li { display: grid; gap: 6px; text-align: left; }
.ladder .col { border: 2px solid var(--ink); border-radius: 12px 12px 4px 4px; display: flex; align-items: flex-start; padding: 10px; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(1rem, 2.4vw, 1.7rem); }
.ladder strong { font-size: 0.95rem; line-height: 1.2; }
.ladder span { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .ladder { grid-template-columns: 1fr; gap: 6px; }
  .ladder li { grid-template-columns: 4.5rem 1fr auto; align-items: center; gap: 12px; }
  .ladder .col { height: auto !important; border-radius: 10px; justify-content: center; padding: 8px; }
}

.money { background: var(--ink); color: var(--white); }
.money h2 { color: var(--white); }
.money .lede { color: #cfd6f5; }
.split { margin: clamp(28px, 4vw, 44px) 0 14px; display: grid; grid-template-columns: 4fr 1fr; border: 3px solid var(--white); border-radius: 18px; overflow: hidden; }
.split div { padding: clamp(16px, 3vw, 28px); display: grid; gap: 4px; align-content: center; min-width: 0; }
.split .win { background: var(--yellow); color: var(--ink); }
.split .cut { background: var(--cobalt); color: var(--white); }
.split b { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(1.8rem, 6vw, 3.6rem); line-height: 1; }
.split span { font-weight: 700; font-size: clamp(0.8rem, 1.6vw, 1rem); }
.sum-line { color: #cfd6f5; font-weight: 600; }
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.facts li { padding-left: 22px; position: relative; color: #e4e9ff; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--yellow); border-radius: 2px; }

.alerts .sec-in { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
@media (max-width: 860px) { .alerts .sec-in { grid-template-columns: 1fr; } }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.notes li { border: 2px solid var(--ink); border-radius: 18px; padding: 16px 18px; background: var(--white); box-shadow: 6px 6px 0 var(--cobalt); max-width: 30rem; }
.notes li:nth-child(2) { margin-left: clamp(0px, 5vw, 56px); box-shadow: 6px 6px 0 var(--red); }
.notes li:nth-child(3) { margin-left: clamp(0px, 2.5vw, 28px); box-shadow: 6px 6px 0 var(--yellow); }
.notes li:nth-child(4) { margin-left: clamp(0px, 6vw, 72px); box-shadow: 6px 6px 0 var(--green); }
.livebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; background: var(--chalk); border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 16px; font-weight: 700; }
.leave span { font-weight: 400; }
.notes strong { display: block; font-stretch: 112%; font-weight: 800; }
.notes span { color: var(--muted); }

.next { background: var(--yellow); }
.next .sec-in { display: grid; gap: 18px; }
.next h2 { max-width: 22ch; }

.faq h2 { margin-bottom: 0.7em; }
.faq details { border-top: 2px solid var(--ink); padding: 18px 0; max-width: 820px; }
.faq details:last-of-type { border-bottom: 2px solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 800; font-stretch: 112%; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-weight: 900; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 12px 0 0; max-width: 68ch; color: var(--muted); }

.closer { background: var(--cobalt); color: var(--white); text-align: left; }
.closer h2 { color: var(--white); max-width: 16ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
