@font-face {
  font-family: "Phantom Sans";
  src: url("https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Phantom Sans";
  src: url("https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --red: #d52a1a;
  --red-dark: #8f1c11;
  --yellow: #ffc42e;
  --yellow-dark: #d9a215;
  --blue: #2e5bff;
  --blue-dark: #1d3fcc;
  --blue-soft: #e4e9ff;
  --green: #22b35e;
  --ink: #111214;
  --muted: #5b6270;
  --surface: #f3f4f6;
  --surface-2: #e5e7eb;
  --line: #e5e7eb;
  --white: #fff;
  --editor-bg: #232427;
  --editor-chrome: #1a1b1e;
  --radius: 24px;
  --radius-sm: 14px;
  --font: "Phantom Sans", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
p { margin: 0; }
img { max-width: 100%; }

/* --- header --- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 44px; border-bottom: 1px solid var(--line); min-height: 110px;
}
.logo { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); }
.logo b { font-size: 46px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.logo span { color: var(--muted); font-weight: 700; font-size: 18px; }
.header-link { font-weight: 700; font-size: 22px; text-decoration: none; }
.header-right { display: flex; align-items: center; gap: 20px; }
.who { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-weight: 700; color: var(--muted); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who b { display: block; font-size: 19px; }
.who small { color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; }
.dot.off { background: #9ca3af; }

main.page { max-width: 1720px; margin: 0 auto; padding: 66px 139px 80px; }
main.narrow { max-width: 1556px; padding: 66px 222px 80px; }
.page-footer {
  max-width: 1720px; margin: 0 auto; padding: 40px 139px 60px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; font-size: 15px;
}

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font: inherit; font-weight: 700; font-size: 22px; text-decoration: none; cursor: pointer;
  border: 0; border-radius: var(--radius-sm); padding: 20px 28px;
  box-shadow: 0 6px 0 var(--btn-shadow, transparent); transition: transform .06s, box-shadow .06s;
  background: var(--btn-bg, var(--surface)); color: var(--btn-fg, var(--ink));
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--btn-shadow, transparent); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-blue { --btn-bg: var(--blue); --btn-fg: #fff; --btn-shadow: var(--blue-dark); }
.btn-red { --btn-bg: var(--red); --btn-fg: #fff; --btn-shadow: var(--red-dark); }
.btn-white { --btn-bg: #fff; --btn-fg: var(--ink); --btn-shadow: var(--red-dark); }
.btn-gray { --btn-bg: var(--surface); --btn-fg: var(--ink); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-shadow: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { font-size: 17px; padding: 12px 18px; }
.link-btn { background: none; border: 0; font: inherit; font-weight: 700; font-size: 22px; color: var(--blue); cursor: pointer; padding: 0; text-decoration: none; }

/* --- bits --- */
.eyebrow { color: var(--blue); font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.lede { color: var(--muted); font-size: 21px; margin-top: 14px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px;
  padding: 6px 14px; border-radius: 10px; background: var(--surface);
}
.tag-yellow { background: var(--yellow); color: var(--ink); }
.tag-green { background: var(--green); color: #fff; }
.tag-blue { background: var(--blue-soft); color: var(--blue-dark); }
.tag-dark { background: var(--ink); color: #fff; }
.tag-red { background: #fde2df; color: var(--red-dark); }
.card { background: #fff; border-radius: var(--radius); padding: 34px; }
.card-gray { background: var(--surface); border-radius: var(--radius); padding: 34px; }
.art {
  background: var(--surface); border-radius: var(--radius); display: grid; place-items: center;
  color: var(--muted); font-weight: 700; aspect-ratio: 1 / 1; overflow: hidden; text-align: center;
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art svg { width: 64px; height: 64px; }
.modal {
  border: 4px solid var(--line); border-radius: var(--radius); padding: 34px; background: #fff; color: var(--ink);
  width: calc(100% - 32px); max-width: 560px;
}
.modal[open] { display: flex; flex-direction: column; gap: 18px; }
.modal::backdrop { background: rgb(0 0 0 / 0.45); }
.modal label { font-weight: 700; font-size: 20px; }
.notice {
  background: var(--blue-soft); border-radius: var(--radius-sm); padding: 22px 28px;
  display: flex; align-items: center; gap: 18px; font-weight: 700; font-size: 20px;
}
.notice svg { flex: none; color: var(--blue); }
.notice-red { background: #fde2df; color: var(--red-dark); }
.notice-red svg { color: var(--red); }
.muted { color: var(--muted); }
.pledge { display: flex; align-items: flex-start; gap: 14px; font-weight: 700; font-size: 18px; cursor: pointer; }
.pledge-why { font-size: 18px; line-height: 1.5; margin: 0; }
.modal .pledge-why + .pledge-why, .pledge-page .pledge-why + .pledge-why { margin-top: 12px; }
.modal .actions { display: flex; align-items: center; gap: 18px; }
.pledge input { flex: none; width: 22px; height: 22px; margin-top: 3px; accent-color: var(--blue); }
.error-text { color: var(--red); font-weight: 700; }
.stack > * + * { margin-top: 18px; }

/* --- landing: reward track ---
   The red field fills the first viewport under a red header: offer and start
   form left, the legit card right, the first project's hour tiers along the
   bottom. Below it the page returns to white. */
.hero {
  background: var(--red); color: #fff; min-height: calc(100vh - 110px); min-height: calc(100svh - 110px);
  display: grid; grid-template-rows: 1fr auto; gap: clamp(24px, 4vh, 48px);
  padding: clamp(12px, 2.5vh, 36px) clamp(16px, 4.5vw, 64px) clamp(24px, 5vh, 56px);
}
.hero-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); gap: clamp(32px, 5vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(3.2rem, min(6.2vw, 10.5vh), 6rem); line-height: .92; letter-spacing: -0.035em; max-width: 9.5em; text-wrap: balance; }
.hero-lede { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.4; max-width: 46ch; margin-top: clamp(16px, 2.6vh, 28px); text-wrap: pretty; }
.hero-cta { display: flex; align-items: center; gap: 24px; margin-top: 40px; flex-wrap: wrap; }
.hero-cta small { font-weight: 700; font-size: 17px; }
.reward-card { background: #fff; color: var(--ink); border-radius: 28px; padding: 32px; box-shadow: 0 8px 0 var(--red-dark); }
.reward-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-weight: 700; color: var(--muted); }
.reward-card .row { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 18px; }
.reward-card .row b { font-size: 27px; }
.loot-coin-wrap { position: relative; width: 240px; height: 220px; display: grid; place-items: center; }
.loot-rays {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 196, 46, .22) 0deg 10deg, rgba(255, 196, 46, 0) 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%);
  animation: loot-spin 24s linear infinite;
}
.loot-coin {
  position: relative; width: 150px; height: 150px; border-radius: 50%; background: var(--yellow); overflow: hidden;
  box-shadow: inset 0 -10px 0 var(--yellow-dark), 0 0 0 8px var(--yellow-dark), 0 18px 40px rgba(255, 196, 46, .35);
  display: grid; place-items: center; animation: loot-bob 2.6s ease-in-out infinite;
}
.loot-coin span { font-weight: 700; font-size: 58px; color: var(--ink); letter-spacing: -0.04em; }
.loot-shine {
  position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; background: rgba(255, 255, 255, .45);
  transform: skewX(-20deg); animation: loot-shine 3.2s ease-in-out infinite;
}
.loot-amount { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; z-index: 1; }
.loot-amount b { font-size: clamp(3.2rem, 6vw, 5.5rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.loot-amount span { font-weight: 700; font-size: 19px; color: #c9ccd3; }
@keyframes loot-spin { to { transform: rotate(360deg); } }
@keyframes loot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes loot-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  .loot-rays, .loot-coin, .loot-shine { animation: none; }
}
.strike { text-decoration: line-through; color: var(--muted); font-weight: 700; font-size: 22px; }
.price-bar {
  background: var(--yellow); border-radius: var(--radius-sm); padding: 16px 22px;
  display: flex; justify-content: space-between; font-weight: 700; font-size: 23px;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 32px; }
.step h3 { font-size: 27px; margin: 22px 0 14px; }
.step p { color: var(--muted); font-size: 20px; }
.num {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 28px;
}

.legit-card {
  background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 8px 0 var(--red-dark);
  padding: 30px 32px 32px;
}
.legit-card h2 { font-size: clamp(26px, 2.2vw, 32px); }
.legit-card > p { color: var(--muted); font-size: 17px; margin: 6px 0 20px; }
.legit-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.legit-card li { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 20px; line-height: 1.25; }
.legit-card li svg { flex: none; box-sizing: content-box; padding: 5px; border-radius: 50%; background: var(--green); color: var(--ink); stroke-width: 3; }
.legit-card a { display: inline-block; margin-top: 22px; font-weight: 700; font-size: 20px; text-underline-offset: 4px; }
.legit-card a:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* Hour tiers: washes on the red field; the payout tier is a yellow plinth.
   On load each hour's wash sweeps in left to right, in turn, then the payout
   rises onto its gold rim. */
.tiers-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.tiers-head span { font-size: 18px; }
.tiers ol { list-style: none; margin: 0; padding: 0; display: grid; align-items: end; grid-template-columns: repeat(4, minmax(0, 1fr)) 1.6fr; gap: 8px; }
.tier {
  min-height: clamp(88px, 12vh, 124px); border-radius: 18px; padding: 18px 22px;
  background: linear-gradient(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.2)) no-repeat; background-size: 100% 100%;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; font-weight: 700;
  animation: tier-fill .45s calc(var(--i) * 140ms + 200ms) cubic-bezier(.16, 1, .3, 1) both;
}
.tier small { font-size: 16px; }
.tier b { font-size: clamp(26px, 2.4vw, 36px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tier.loot {
  background: var(--yellow); color: var(--ink); box-shadow: 0 8px 0 var(--yellow-dark);
  animation: tier-rise .7s calc(var(--i) * 140ms + 650ms) cubic-bezier(.16, 1, .3, 1) both;
}
.tier.loot b { font-size: clamp(36px, 3.6vw, 52px); }
.tier.loot span { font-size: 16px; }
@keyframes tier-fill { from { background-size: 0 100%; } }
@keyframes tier-rise { from { transform: translateY(28px); box-shadow: 0 0 0 var(--yellow-dark); } }
@media (prefers-reduced-motion: reduce) {
  .tier, .tier.loot { animation: none; }
}
/* Short laptop screens: keep the whole track inside the first viewport. */
@media (max-height: 780px) and (min-width: 1101px) {
  .site-header.level-header { min-height: 88px; padding-block: 12px; }
  .hero { min-height: calc(100vh - 88px); min-height: calc(100svh - 88px); }
  .tier { padding: 14px 20px; gap: 4px; }
  .tier.loot b { font-size: clamp(34px, 3.4vw, 44px); }
}
.level-header .header-link { color: #fff; text-underline-offset: 6px; }
.level-header .header-link:hover { text-decoration: underline; }
.level-header .header-link:focus-visible, .level-header .logo:focus-visible { outline: 4px solid #fff; outline-offset: 4px; border-radius: 6px; }
.level-header .header-legit {
  background: #fff; color: var(--red-dark); padding: 12px 20px; border-radius: var(--radius-sm);
  box-shadow: 0 6px 0 var(--red-dark); transition: transform .06s, box-shadow .06s;
}
.level-header .header-legit:hover { text-decoration: none; }
.level-header .header-legit:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-dark); }
.level-header .who b, .level-header .who small { color: #fff; }
.level-header .who .dot { box-shadow: 0 0 0 2px #fff; }

/* Start form: one field and a key-cap on the red hero. The Hack Club link is
   deliberately quieter: regular weight, body size, plain underline. */
.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; }
.hero-start { margin-top: clamp(20px, 3.4vh, 36px); max-width: 640px; }
.hero-start-row { display: flex; gap: 14px; align-items: stretch; }
.hero-email {
  flex: 1; min-width: 0; font: inherit; font-weight: 700; font-size: 20px; color: var(--ink); caret-color: var(--red);
  background: #fff; border: 0; border-radius: var(--radius-sm); padding: 0 22px; min-height: 68px;
  box-shadow: inset 0 3px 0 var(--surface-2);
}
.hero-email::placeholder { color: var(--muted); font-weight: 700; }
.hero-email[aria-invalid="true"] { box-shadow: inset 0 0 0 3px var(--yellow); }
.hero-start .btn { white-space: nowrap; }
.hero .btn:focus-visible, .hero-alt:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.hero-email:focus { outline: 4px solid var(--yellow); outline-offset: 3px; }
.hero .hero-error {
  display: inline-block; margin-top: 14px; font-size: 17px; font-weight: 700;
  background: #fde2df; color: var(--red-dark); border-radius: 10px; padding: 8px 14px;
}
.hero-alt { display: inline-block; margin-top: 18px; color: #fff; font-size: 17px; font-weight: 400; text-underline-offset: 4px; }
.hero-alt:hover { text-decoration-thickness: 2px; }
.hero ::selection { background: #fff; color: var(--red-dark); }
@media (max-width: 640px) {
  .hero-start-row { flex-direction: column; }
  .hero-start .btn { width: 100%; }
}

/* Hack Club handoff: a full-bleed blue moment between the start form and
   auth.hackclub.com. The segments fill one per second. */
.handoff { min-height: 100vh; min-height: 100dvh; background: var(--blue); color: #fff; display: grid; place-items: center; padding: 48px 16px; }
.handoff-inner { width: min(100%, 680px); }
.handoff h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 26px; text-wrap: balance; }
.handoff-body { font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; line-height: 1.4; margin: 0; max-width: 34ch; text-wrap: pretty; }
.handoff-sub { font-size: 19px; margin: 14px 0 0; }
.handoff-count { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin: 44px 0 14px; max-width: 480px; }
.handoff-seg { height: 16px; border-radius: 999px; background: var(--blue-dark); overflow: hidden; }
.handoff-seg i {
  display: block; height: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left;
  animation: handoff-fill 1s linear forwards; animation-delay: calc(var(--i) * 1s);
}
.handoff.stopped .handoff-seg i { animation-play-state: paused; }
@keyframes handoff-fill { to { transform: scaleX(1); } }
.handoff-status { font-weight: 700; font-size: 19px; margin: 0; font-variant-numeric: tabular-nums; }
.handoff-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.handoff .btn-white { --btn-shadow: var(--blue-dark); }
.handoff-back { color: #fff; font-weight: 700; font-size: 20px; text-underline-offset: 4px; }
.handoff a:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.handoff-legal { margin: 64px 0 0; font-size: 15px; }
.handoff ::selection { background: #fff; color: var(--blue-dark); }
@media (prefers-reduced-motion: reduce) {
  .handoff-seg i { animation: none; transform: none; background: transparent; }
  .handoff-seg.done i { background: var(--yellow); }
}
.trust { margin-top: 72px; }
.trust > p { color: var(--muted); font-size: 20px; max-width: 820px; margin-top: 16px; }
.trust > .tag { margin-bottom: 18px; }
.flow { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.flow-sources { display: grid; gap: 12px; flex: 1.2; }
.flow-box { background: var(--surface); border-radius: var(--radius-sm); padding: 20px 22px; flex: 1; }
.flow-box b { display: block; font-size: 21px; }
.flow-box span { color: var(--muted); font-size: 16px; }
.flow-box.blue { background: var(--blue-soft); }
.flow-box.yellow { background: var(--yellow); }
.flow-box.yellow span { color: var(--ink); }
.flow-arrow { font-size: 30px; font-weight: 700; color: var(--muted); flex: none; }
.faq { display: grid; gap: 12px; margin-top: 24px; max-width: 980px; }
.faq details { background: var(--surface); border-radius: var(--radius-sm); padding: 20px 24px; }
.faq summary { font-weight: 700; font-size: 21px; cursor: pointer; }
.faq details p { color: var(--muted); font-size: 18px; margin-top: 12px; }
.prose { max-width: 1000px; }
.prose h2 { font-size: 28px; margin: 44px 0 14px; }
.prose p, .prose li { font-size: 19px; }
.prose ul { padding-left: 24px; margin: 0; }
.prose li + li { margin-top: 10px; }
.num.yellow { background: var(--yellow); color: var(--ink); }
.num.gray { background: var(--surface-2); color: var(--ink); width: 50px; height: 50px; font-size: 22px; }
.num.sm { width: 50px; height: 50px; font-size: 22px; }

/* --- picker --- */
.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin: 50px 0 38px; }
.pick {
  border: 4px solid var(--line); border-radius: 30px; padding: 34px; background: #fff;
  box-shadow: 0 8px 0 var(--line); display: flex; flex-direction: column; gap: 18px;
}
.pick:hover, .pick:focus-within { border-color: var(--blue); box-shadow: 0 8px 0 var(--blue-dark); }
.pick:hover .btn, .pick:focus-within .btn { --btn-bg: var(--blue); --btn-fg: #fff; --btn-shadow: var(--blue-dark); }
.pick .art { aspect-ratio: 1.9 / 1; }
.pick .art.blue { background: var(--blue-soft); color: var(--blue-dark); }
.pick .art.yellow { background: var(--yellow); color: var(--ink); }
.pick .art svg { width: 96px; height: 96px; }
.pick-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pick-head h3 { font-size: 30px; }
.pick p { color: var(--muted); font-size: 21px; flex: 1; }
.pick-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; }

/* --- done & ship --- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.split-ship { grid-template-columns: 1.65fr 1fr; gap: 44px; }
.field { margin-top: 40px; }
.field label, .field .label { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 23px; margin-bottom: 14px; }
.input {
  display: flex; align-items: center; gap: 18px; background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 22px 24px; border: 4px solid transparent; font-size: 22px; font-weight: 700; color: var(--ink); width: 100%; font-family: inherit;
}
.input:focus-within, .input:focus { border-color: var(--blue); outline: none; }
.input.readonly { background: var(--surface); color: var(--muted); }
.input input { border: 0; background: transparent; font: inherit; width: 100%; outline: none; color: inherit; }
.input a { color: inherit; overflow-wrap: anywhere; }
textarea.input { min-height: 140px; resize: vertical; font-weight: 400; }
.hint { color: var(--muted); font-weight: 700; font-size: 17px; margin-top: 12px; }
.summary { background: var(--surface); border-radius: var(--radius); padding: 34px; }
.summary h3 { font-size: 29px; margin-bottom: 18px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 20px; margin: 0 0 26px; padding-bottom: 26px; border-bottom: 2px solid var(--surface-2); font-size: 22px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 700; }
.earned { background: var(--yellow); border-radius: var(--radius-sm); padding: 22px 26px; display: flex; gap: 18px; align-items: center; }
.earned small { display: block; font-weight: 700; font-size: 17px; }
.earned b { font-size: 25px; }
.actions { display: flex; align-items: center; gap: 28px; margin-top: 44px; flex-wrap: wrap; }

/* --- tables (admin & creator) --- */
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--surface); border-radius: var(--radius-sm); padding: 20px; }
.kpi small { color: var(--muted); font-weight: 700; }
.kpi b { display: block; font-size: 30px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.text-input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--surface-2); }
.text-input:focus { border-color: var(--blue); outline: none; }
.section { margin-top: 44px; }
.section h2 { font-size: 28px; margin-bottom: 16px; }
.admin-nav { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.key-box { background: var(--ink); color: #fff; padding: 16px; border-radius: 12px; font-family: var(--mono); overflow-wrap: anywhere; }
.timeline { display: grid; gap: 2px; }
.tl-row { display: grid; grid-template-columns: 150px 1fr 90px 90px 90px 1fr; gap: 10px; padding: 8px 10px; font-size: 14px; border-radius: 8px; background: var(--surface); }
.tl-row.flagged { background: #fde2df; }

/* --- reviewer heartbeat graph --- */
.activity { display: grid; gap: 10px; }
.legend { font-weight: 700; white-space: nowrap; margin: 0 4px; }
.legend::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--legend); }
.legend-total { --legend: #7c3aed; }
.legend-line { --legend: #e11d48; }
.legend-col { --legend: #22b8cf; }
.strip { position: relative; background: #0b0b0d; border-radius: var(--radius-sm); padding-bottom: 34px; color: #fff; }
.strip-canvas { display: block; width: 100%; cursor: crosshair; }
.strip-date, .strip-total { position: absolute; bottom: 10px; font-family: var(--mono); font-size: 15px; }
.strip-date { left: 14px; }
.strip-total { right: 14px; color: #9ca3af; }
.strip-empty { position: absolute; top: 46px; left: 0; right: 0; text-align: center; color: #9ca3af; font-weight: 700; font-size: 15px; pointer-events: none; }
.strip-tip { position: absolute; z-index: 1; background: #fff; color: var(--ink); font-family: var(--mono); font-size: 13px; padding: 6px 10px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); white-space: nowrap; pointer-events: none; }
.strip-detail { margin-top: 8px; display: grid; gap: 8px; }
.strip-detail-head { display: flex; align-items: center; gap: 10px; }
.strip-detail-head .btn { margin-left: auto; }
.strip-zoom { padding-bottom: 0; }
.tl-head { background: none; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .c { background: var(--green); }
.bar .p { background: var(--yellow); }
.bar .x { background: var(--red); }
.diff { font-family: var(--mono); font-size: 13px; white-space: pre-wrap; background: #fafafa; border-radius: 12px; padding: 14px; max-height: 560px; overflow: auto; }
.diff .add { background: #dcfce7; display: block; }
.diff .del { background: #fee2e2; display: block; }

@media (max-width: 1100px) {
  .site-header { padding: 16px; min-height: 0; }
  .logo b { font-size: 36px; }
  main.page, main.narrow, .page-footer { padding-left: 16px; padding-right: 16px; padding-top: 32px; }
  .hero { min-height: 0; }
  .hero-main { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: clamp(2.8rem, 12vw, 4.6rem); }
  .tiers ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier { min-height: 0; }
  .tier.loot { grid-column: 1 / -1; }
  .steps, .picker, .split, .split-ship, .grid-4 { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 1fr 1fr; }
  .page-footer { flex-direction: column; gap: 8px; }
  .header-right .tag { display: none; }
  .header-right { gap: 14px; }
  .header-link { font-size: 17px; white-space: nowrap; }
  .logo span { white-space: nowrap; }
  .flow { flex-direction: column; align-items: stretch; }
  .flow-arrow { transform: rotate(90deg); align-self: center; }
}

@media (max-width: 480px) {
  .header-link.hide-sm { display: none; }
}

/* --- IDE (mockup 3) --- */
body:has(.ide) { background: var(--surface); }
.ide { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.ide-header {
  display: flex; align-items: center; gap: 22px; padding: 16px 28px; background: #fff;
  border-bottom: 1px solid var(--line); flex: none;
}
.ide-header .logo b { font-size: 40px; }
.ide-project { font-size: 21px; padding: 10px 18px; border-radius: 12px; }
.tracking {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff;
  border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums;
}
.tracking.paused .dot { background: #9ca3af; }
.ide-actions { margin-left: auto; display: flex; gap: 16px; }
.ide-actions .btn { font-size: 22px; padding: 18px 28px; }
.ide-settings { position: relative; }
.settings-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: 320px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgb(0 0 0 / .12); padding: 8px; display: grid; gap: 2px;
}
.settings-menu[hidden] { display: none; }
.setting { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; cursor: pointer; }
.setting:hover { background: var(--surface); }
.setting[hidden] { display: none; }
.setting input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.setting b { display: block; font-size: 16px; }
.setting small { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }
.setting-btn { font: inherit; font-weight: 700; font-size: 16px; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px; cursor: pointer; color: var(--blue-dark); }
.setting-btn:hover { background: var(--surface); }
.ide-banners { padding: 12px 18px 0; display: grid; gap: 10px; }
.ide-banners .notice { font-size: 17px; padding: 14px 18px; }
.ide-body {
  flex: 1; min-height: 0; display: grid; gap: 16px; padding: 16px;
  grid-template-columns: 310px minmax(0, 1.2fr) minmax(0, 0.9fr) 415px;
}
.ide-body.no-reward { grid-template-columns: 310px minmax(0, 1.2fr) minmax(0, 0.9fr); }
.ide-body.no-reward .ide-reward { display: none; }
.ide-files { background: #fff; border-radius: var(--radius); padding: 26px 16px; overflow: auto; }
.ide-label { color: var(--muted); font-weight: 700; font-size: 18px; padding: 0 12px 14px; }
.ide-files ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ide-files li { display: flex; align-items: center; }
.file {
  flex: 1; text-align: left; font: inherit; font-weight: 700; font-size: 21px; background: none; border: 0;
  padding: 12px 16px; border-radius: 14px; cursor: pointer; color: var(--ink); overflow: hidden; text-overflow: ellipsis;
}
.file:hover { background: var(--surface); }
.file.active { background: var(--blue-soft); color: var(--blue-dark); }
.file-menu { display: none; gap: 2px; }
.ide-files li:hover .file-menu, .ide-files li:focus-within .file-menu { display: flex; }
.file-menu button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.file-menu button:hover { background: var(--surface); color: var(--ink); }
.new-file { margin-top: 24px; background: none; border: 0; font: inherit; font-size: 21px; color: var(--muted); cursor: pointer; padding: 8px 16px; }
.new-file:hover { color: var(--ink); }
.new-file-input { margin: 8px 12px 0; width: calc(100% - 24px); }
.ide-error { color: var(--red); font-weight: 700; font-size: 15px; padding: 8px 16px; margin: 0; }
.ide-code { background: var(--editor-bg); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.ide-tabs { display: flex; gap: 4px; background: var(--editor-chrome); padding: 14px 16px 0; overflow-x: auto; flex: none; }
.ide-tab {
  font: inherit; font-weight: 700; font-size: 17px; color: #a1a1aa; background: none; border: 0;
  padding: 12px 18px; border-radius: 12px 12px 0 0; cursor: pointer; white-space: nowrap;
}
.ide-tab.active { color: #fff; background: var(--editor-bg); }
.ide-editor { flex: 1; min-height: 0; overflow: hidden; }
.ide-editor .cm-editor { height: 100%; background: var(--editor-bg); font-size: 17px; }
.ide-editor .cm-scroller { font-family: var(--mono); line-height: 1.6; }
.ide-editor .cm-gutters { background: var(--editor-bg); border: 0; color: #6b7280; }
.ide-status {
  display: flex; gap: 6px; padding: 12px 22px; background: var(--editor-chrome); color: #d4d4d8; font-weight: 700; font-size: 16px; flex: none;
}
.ide-status #status-cursor { margin-left: auto; }
.ide-status .bad { color: #fca5a5; }
.ide-preview { background: #fff; border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.ide-preview-head {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line);
  color: var(--muted); font-weight: 700; font-size: 18px;
}
.ide-preview iframe { flex: 1; border: 0; width: 100%; background: #fff; }
.icon-btn { background: var(--surface); border: 0; border-radius: 12px; width: 60px; height: 60px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn.round { border-radius: 50%; width: 48px; height: 48px; }
.ide-reward { overflow: auto; }
.reward-panel { box-shadow: 0 8px 0 var(--surface-2); }
.ide-reward-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 700; font-size: 18px; margin-bottom: 20px; }
.reward-panel .art { aspect-ratio: 1.35 / 1; }
.reward-panel .art + .progress { margin-top: 16px; }
.ide-help { padding: 22px; display: grid; gap: 10px; }
.ide-help h3 { font-size: 18px; color: var(--muted); }
.ide-help ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ide-help a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 0 -14px;
  border-radius: var(--radius-sm); color: var(--ink); text-decoration: none;
}
.ide-help a:hover { background: var(--surface); }
.ide-help a:hover svg { color: var(--blue); }
.ide-help a:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; }
.ide-help b { display: block; font-size: 18px; }
.ide-help small { display: block; color: var(--muted); font-size: 15px; line-height: 1.35; }
.ide-help svg { flex: none; color: var(--muted); }
.reward-panel h3 { font-size: 29px; margin: 26px 0 22px; }
.progress { height: 26px; background: var(--surface); border-radius: 13px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--yellow); border-radius: 13px; transition: width .4s; }
.progress-labels { display: flex; justify-content: space-between; margin-top: 12px; font-size: 17px; }
.progress-labels span { color: var(--muted); font-weight: 700; }
.to-go { margin-top: 22px; font-size: 21px; }
.ide-footnote { color: var(--muted); font-weight: 700; font-size: 16px; padding: 18px 10px; }
.ide-mobile-tabs { display: none; }

.tw-info { display: grid; gap: 8px; padding: 4px; max-width: 360px; }
.tw-info pre { margin: 0; font-family: var(--mono); font-size: 13px; white-space: pre-wrap; }
.tw-swatch { width: 28px; height: 28px; border-radius: 6px; border: 1px solid rgb(255 255 255 / .3); }
.preview-paused { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--muted); }
.preview-paused b { color: var(--ink); font-size: 20px; }
.preview-paused[hidden] { display: none; }
.preview-paused:not([hidden]) + iframe { display: none; }

/* terminal, under the preview */
.ide-term-handle { flex: none; height: 8px; cursor: row-resize; background: var(--editor-chrome); border-top: 1px solid #000; }
.ide-term { flex: none; display: flex; flex-direction: column; background: var(--editor-bg); color: #e4e4e7; height: var(--term-h, 240px); min-height: 0; }
.ide-term.collapsed { height: auto; }
.ide-term.collapsed .ide-term-panel { display: none; }
.ide-term-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: var(--editor-chrome); flex: none; }
.ide-term-title, .ide-term-clear { font: inherit; font-weight: 700; font-size: 15px; background: none; border: 0; color: #d4d4d8; cursor: pointer; padding: 4px 6px; border-radius: 8px; display: inline-flex; align-items: center; gap: 8px; }
.ide-term-title:hover, .ide-term-clear:hover { color: #fff; background: #2f3034; }
.term-badge { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; display: inline-block; }
.term-badge[hidden] { display: none; }
.ide-term-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ide-term-log { flex: 1; min-height: 0; overflow: auto; font-family: var(--mono); font-size: 14px; line-height: 1.5; padding: 6px 0; }
.term-line { display: flex; gap: 8px; align-items: baseline; padding: 2px 14px; border-bottom: 1px solid #2c2d31; white-space: pre-wrap; word-break: break-word; }
.term-icon { flex: none; width: 1ch; color: #71717a; font-weight: 700; }
.term-body { flex: 1; min-width: 0; }
.term-at { flex: none; font: inherit; font-size: 13px; background: none; border: 0; color: #93c5fd; text-decoration: underline; cursor: pointer; padding: 0; }
.term-at:hover { color: #bfdbfe; }
.term-error { background: #3b1d1d; color: #fecaca; border-bottom-color: #5b2424; }
.term-error .term-icon { color: #f87171; }
.term-warn { background: #3a2f12; color: #fde68a; border-bottom-color: #574616; }
.term-warn .term-icon { color: #fbbf24; }
.term-marker { color: #71717a; font-style: italic; }
.term-input { color: #a5b4fc; }
.term-result .term-icon { color: #71717a; }
.term-str { color: inherit; }
.term-num, .term-bigint, .term-bool { color: #c4b5fd; }
.term-null, .term-undef { color: #a1a1aa; }
.term-fn, .term-el { color: #67e8f9; }
.term-tree { display: inline-block; vertical-align: top; }
.term-tree > summary { cursor: pointer; }
.term-entries { padding-left: 18px; }
.term-key { color: #93c5fd; }
.ide-term-prompt { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid #2c2d31; color: #a5b4fc; font-family: var(--mono); }
.ide-term-prompt input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: 14px; }
.ide-term-prompt input::placeholder { color: #71717a; }

@media (max-width: 900px) {
  .ide { height: auto; min-height: 100dvh; }
  .ide-header { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .ide-header .logo b { font-size: 30px; }
  .ide-project, .tracking { font-size: 16px; padding: 8px 12px; }
  .ide-actions { margin-left: 0; width: 100%; }
  .ide-actions .btn { flex: 1; font-size: 17px; padding: 12px; }
  .ide-mobile-tabs { display: flex; gap: 8px; padding: 12px 16px 0; }
  .ide-mobile-tabs button { flex: 1; font: inherit; font-weight: 700; padding: 10px; border: 0; border-radius: 12px; background: #fff; color: var(--muted); }
  .ide-mobile-tabs button.active { background: var(--ink); color: #fff; }
  .ide-body, .ide-body.no-reward { grid-template-columns: 1fr; padding: 12px 16px; }
  .ide-files { padding: 12px; }
  .ide-files ul { display: flex; overflow-x: auto; gap: 6px; }
  .ide-files .ide-label { display: none; }
  .file { font-size: 16px; padding: 8px 12px; white-space: nowrap; }
  .new-file { margin-top: 8px; font-size: 16px; }
  .ide-code, .ide-preview { height: 70dvh; }
  .ide-body[data-show="code"] .ide-preview, .ide-body[data-show="preview"] .ide-code, .ide-body[data-show="terminal"] .ide-code { display: none; }
  .ide-body[data-show="preview"] .ide-term, .ide-body[data-show="preview"] .ide-term-handle { display: none; }
  .ide-body[data-show="terminal"] .ide-preview > :not(.ide-term) { display: none; }
  .ide-body[data-show="terminal"] .ide-term { flex: 1; height: auto; }
  .ide-term-handle { display: none; }
}

/* --- IDE tour --- */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour-spot {
  position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgb(17 18 20 / .62);
  transition: left .25s cubic-bezier(.16, 1, .3, 1), top .25s cubic-bezier(.16, 1, .3, 1), width .25s cubic-bezier(.16, 1, .3, 1), height .25s cubic-bezier(.16, 1, .3, 1);
}
.tour-block { position: fixed; pointer-events: auto; }

/* The pointer: a blue ring on the exact thing to click or the spot to type, with a label. */
.tour-point { position: fixed; border: 3px solid var(--blue); border-radius: 10px; pointer-events: none; }
.tour-point[hidden] { display: none; }
.tour-point::after {
  content: ""; position: absolute; inset: -3px; border: 3px solid var(--blue); border-radius: 10px;
  animation: tour-ping 1.6s cubic-bezier(.16, 1, .3, 1) infinite;
}
.tour-point-label {
  position: absolute; left: -3px; bottom: calc(100% + 10px); background: var(--blue); color: #fff; font-weight: 700; font-size: 15px;
  line-height: 1; padding: 8px 12px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 0 var(--blue-dark);
}
.tour-point-label::after {
  content: ""; position: absolute; left: 16px; top: 100%; border: 7px solid transparent; border-top-color: var(--blue); border-bottom: 0;
}
.tour-point[data-label="below"] .tour-point-label { bottom: auto; top: calc(100% + 10px); box-shadow: none; }
.tour-point[data-label="below"] .tour-point-label::after { top: auto; bottom: 100%; border-top: 0; border-bottom: 7px solid var(--blue); }
.tour-point[data-align="end"] .tour-point-label { left: auto; right: -3px; }
.tour-point[data-align="end"] .tour-point-label::after { left: auto; right: 16px; }
@keyframes tour-ping { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.18, 1.5); } }

/* Code the tour is pointing at, inside the editor. */
.ide-editor .cm-tour-line { background: rgb(46 91 255 / .16); }
.ide-editor .cm-tour-mark { background: rgb(46 91 255 / .42); border-radius: 3px; }

.tour-card {
  position: fixed; pointer-events: auto; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; color: var(--ink); border-radius: 18px; padding: 22px 24px 0; box-shadow: 0 4px 14px rgb(0 0 0 / .25);
  display: grid; gap: 14px; overscroll-behavior: contain;
}
.tour-card.entering { animation: tour-in .22s cubic-bezier(.16, 1, .3, 1); }
@keyframes tour-in { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tour-card[data-at="sheet"] { left: 16px; right: 16px; bottom: 16px; width: auto; max-height: 46vh; padding: 18px 20px 0; gap: 12px; }
.tour-card[data-at="sheet"] .tour-title { font-size: 20px; }
.tour-card[data-at="sheet"] .tour-body { font-size: 16px; }

.tour-progress { display: grid; gap: 8px; }
.tour-count { color: var(--muted); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.tour-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.tour-track li { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); }
.tour-track li.done { background: var(--ink); }
.tour-track li.current { background: var(--blue); }

.tour-title { font-size: 23px; line-height: 1.15; text-wrap: balance; }
.tour-body { font-size: 17px; line-height: 1.45; }
.tour-snippet {
  margin: 0; background: var(--editor-bg); color: #e4e4e7; border-radius: 12px; padding: 12px 14px;
  font-family: var(--mono); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}

.tour-how > summary {
  cursor: pointer; font-weight: 700; font-size: 15px; color: var(--blue-dark); list-style: none; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 8px; padding: 2px 0;
}
.tour-how > summary::-webkit-details-marker { display: none; }
.tour-how > summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(-45deg); transition: transform .15s; }
.tour-how[open] > summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.tour-how > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tour-how[open] > summary { margin-bottom: 10px; }

/* How the code works: each piece, then what it means. */
.tour-parts { margin: 0; display: grid; gap: 4px; }
.tour-parts dt { margin: 6px 0 0; }
.tour-parts dt:first-child { margin-top: 0; }
.tour-parts dd { margin: 0; font-size: 15px; line-height: 1.4; color: var(--muted); }
.tour-parts code {
  display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 700; background: var(--blue-soft); color: var(--blue-dark);
  border-radius: 8px; padding: 3px 8px; overflow-wrap: anywhere;
}

.tour-success { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; background: var(--surface); border-radius: 14px; padding: 14px 16px; }
.tour-success[hidden] { display: none; }
.tour-success p { font-weight: 700; font-size: 16px; line-height: 1.4; }
.tour-success-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.tour-success-icon svg { width: 18px; height: 18px; }
.tour-card.passed .tour-success { animation: tour-in .3s cubic-bezier(.16, 1, .3, 1); }

/* Stays at the bottom of a long card, so Next is always in reach. */
.tour-actions {
  display: flex; align-items: center; gap: 10px; position: sticky; bottom: 0; background: #fff;
  padding: 12px 0 20px; margin-top: -2px; border-top: 1px solid var(--line);
}
.tour-skip, .tour-showme { font: inherit; font-weight: 700; font-size: 15px; background: none; border: 0; cursor: pointer; padding: 8px 4px; border-radius: 8px; }
.tour-skip { color: var(--muted); }
.tour-skip:hover { color: var(--ink); }
.tour-showme { color: var(--blue-dark); }
.tour-showme:hover { color: var(--blue); }
.tour-showme[hidden] { display: none; }
.tour-skip:focus-visible, .tour-showme:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tour-next { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  .tour-spot { transition: none; }
  .tour-point::after { animation: none; opacity: 0; }
  .tour-card.entering, .tour-card.passed .tour-success { animation: none; }
}

/* --- Robux --- */
.robux-art { background: var(--yellow); color: var(--ink); aspect-ratio: 16 / 9; }
.robux-art b { font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.03em; }

/* --- player shell (home, projects) --- */
.shell { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 110px); }
.shell-nav { border-right: 1px solid var(--line); padding: 32px 22px; display: flex; flex-direction: column; gap: 6px; }
.shell-nav a, .shell-nav .link-btn { font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none; padding: 14px 18px; border-radius: var(--radius-sm); text-align: left; }
.shell-nav a.active, .shell-nav a:hover { background: var(--surface); }
.shell-nav form { margin-top: auto; }
.shell-nav .link-btn { color: var(--muted); font-size: 18px; }
.shell-main { padding: 44px 56px 80px; min-width: 0; }
.shell-main h1 { margin-bottom: 24px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.narrow-form { max-width: 720px; }
.plain { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 19px; }

/* builders online + invite */
.builders { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 20px; align-items: flex-start; }
.builder { display: grid; justify-items: center; gap: 6px; width: 120px; text-align: center; }
.builder b { font-size: 18px; overflow-wrap: anywhere; }
.builder small { color: var(--muted); font-weight: 700; }
.builder-avatar {
  position: relative; width: 112px; height: 112px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-weight: 700; font-size: 32px; color: var(--muted);
}
.builder-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.builder-avatar.online::after {
  content: ""; position: absolute; right: 4px; bottom: 6px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--green); border: 4px solid #fff;
}
.builder-avatar.plus { font-size: 56px; color: var(--ink); font-weight: 400; }
.builder.invite { width: auto; justify-items: start; }
.builder.invite summary { list-style: none; cursor: pointer; display: grid; justify-items: center; gap: 6px; width: 120px; }
.builder.invite summary::-webkit-details-marker { display: none; }
.invite-box { margin-top: 12px; display: grid; gap: 12px; max-width: 520px; border: 1px solid var(--line); padding: 22px; }

/* track cards */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters a { font-weight: 700; text-decoration: none; color: var(--ink); background: var(--surface); padding: 8px 16px; border-radius: 999px; }
.filters a.active { background: var(--blue); color: #fff; }
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; margin-top: 22px; }
.track { display: grid; gap: 10px; align-content: start; text-decoration: none; color: var(--ink); }
.track-button { all: unset; display: grid; gap: 10px; cursor: pointer; }
.track-button:focus-visible, .track:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: var(--radius); }
.track-art {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--blue); color: #fff;
  display: grid; place-items: center; overflow: hidden;
}
.track-art img { width: 100%; height: 100%; object-fit: cover; }
.track-art .tag { position: absolute; left: 16px; top: 16px; }
.track.build-anything .track-art { background: var(--ink); color: var(--yellow); }
.track h3 { font-size: 26px; display: flex; align-items: center; gap: 8px; }
.track p { color: var(--muted); font-size: 19px; }

/* quest */
.quest-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.quest-pill { font-weight: 700; font-size: 18px; padding: 10px 18px; border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.quest-pill.done { color: var(--ink); }
.quest-pill.done svg { color: var(--green); }
.quest-pill.current { background: var(--blue); color: #fff; }
.step .btn, .step form, .step .tag { margin-top: 18px; }
.step .btn { font-size: 19px; padding: 16px 22px; }
.step .tag + .hint { margin-top: 10px; }
.quest-notices { display: grid; gap: 12px; margin-top: 24px; }
.quest-notices .notice, .notice.quest-notice { display: block; font-weight: 500; }
.notice.quest-notice { margin-top: 24px; }
/* quest pages: a readable column, perks as cards, steps as rows. */
main.quest { max-width: 1400px; }
main.quest .lede { max-width: 60ch; }
main.quest .actions { margin-top: 36px; }
.quest-next h2 { font-size: 28px; }
.quest-next p { margin-top: 6px; font-size: 18px; }

/* Icon discs: one flat brand colour each, ink glyph on yellow. */
.perk-icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none;
}
.perk-icon.blue { background: var(--blue); }
.perk-icon.red { background: var(--red); }
.perk-icon.yellow { background: var(--yellow); color: var(--ink); }
.perk-icon.ink { background: var(--ink); }

.perks { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.perk { background: var(--surface); border-radius: var(--radius); padding: 30px; }
.perk h3 { font-size: 24px; margin: 20px 0 8px; }
.perk p { color: var(--muted); font-size: 18px; margin: 0; }

/* Real people coding right now, from the builders-online list. */
.faces { display: flex; align-items: center; gap: 16px; margin-top: 28px; font-size: 19px; }
.faces b::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--green); margin-right: 10px; }
.faces-row { display: flex; }
.face {
  width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; margin-left: -12px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center; font-weight: 700;
}
.face:first-child { margin-left: 0; }
.face img { width: 100%; height: 100%; object-fit: cover; }

/* Quest 3: two ways to get the editor, side by side. */
.editor-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.editor-pick { background: var(--surface); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; align-items: flex-start; }
.editor-pick small { color: var(--muted); font-weight: 700; font-size: 17px; margin-top: 22px; }
.editor-pick h3 { font-size: 30px; margin: 4px 0 10px; }
.editor-pick p { color: var(--muted); font-size: 19px; margin: 0 0 24px; flex: 1; }
.editor-pick .btn { font-size: 19px; padding: 16px 22px; }

/* Quest 4: steps as rows. Current is a white card with the blue border,
   done gets the green disc, upcoming goes quiet. */
.checklist { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.checklist-row {
  background: var(--surface); border-radius: var(--radius); padding: 26px 30px; border: 4px solid transparent;
  display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 26px; align-items: center;
}
.checklist-body h3 { font-size: 26px; margin: 0 0 6px; }
.checklist-body p { color: var(--muted); font-size: 19px; margin: 0; max-width: 58ch; }
.checklist-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.checklist-actions .btn { font-size: 19px; padding: 16px 22px; white-space: nowrap; }
.checklist-actions .hint { margin: 0; }
.checklist-status { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-weight: 700; font-size: 16px; }
.checklist-row.is-current { background: #fff; border-color: var(--blue); }
.checklist-row.is-done .num { background: var(--green); }
.checklist-row.is-upcoming .num { background: var(--surface-2); color: var(--muted); }
.checklist-row.is-upcoming h3 { color: var(--muted); }

@media (max-width: 1100px) {
  .perks, .editor-picks { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .checklist-row { grid-template-columns: 50px minmax(0, 1fr); gap: 16px 18px; padding: 22px; align-items: start; }
  .checklist-row .num { width: 50px; height: 50px; font-size: 22px; }
  .checklist-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .checklist-status { align-items: flex-start; }
}
.quest-next { background: var(--yellow); border-radius: var(--radius); padding: 40px 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
/* quest: level 1 cleared */
.level {
  background: var(--red); color: #fff; min-height: calc(100vh - 110px); min-height: calc(100svh - 110px);
  display: grid; grid-template-rows: 1fr auto; padding-bottom: clamp(24px, 5vh, 56px);
}
.level ::selection, .level-header ::selection { background: #fff; color: var(--red-dark); }
.level-header { background: var(--red); border-bottom: 0; padding-inline: clamp(16px, 4.5vw, 64px); }
.level-header .logo, .level-header .logo span { color: #fff; }
.level-main {
  display: grid; grid-template-columns: 1fr minmax(240px, 360px); gap: 48px; align-items: end; align-content: center;
  padding: clamp(16px, 4vh, 48px) clamp(16px, 4.5vw, 64px) clamp(28px, 5vh, 56px);
}
.level h1 { font-size: clamp(4rem, min(10.5vw, 17vh), 9.4rem); line-height: .9; letter-spacing: -0.035em; }
.level-lede { font-size: clamp(19px, 1.8vw, 26px); max-width: 34ch; margin-top: 28px; }
.level-stats { margin: 0; display: grid; gap: 18px; }
.level-stats div { border-top: 3px solid rgb(255 255 255 / 0.4); padding-top: 12px; }
.level-stats dt { font-size: 18px; font-weight: 700; }
.level-stats dd { margin: 0; font-size: clamp(36px, 4vw, 56px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.level-track {
  list-style: none; margin: 0; padding: 0 clamp(16px, 4.5vw, 64px);
  display: grid; grid-template-columns: 1fr 1.6fr 1fr 1fr 1fr; gap: 8px;
}
.seg {
  min-height: 120px; border-radius: 18px; background: rgb(0 0 0 / 0.2);
  display: flex; flex-direction: column; justify-content: space-between; padding: 18px 22px;
}
.seg small { font-size: 16px; font-weight: 700; }
.seg b { font-size: 22px; line-height: 1.15; display: flex; align-items: center; gap: 8px; text-wrap: balance; }
.seg form { height: 100%; }
.seg > a, .seg button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; color: inherit; }
.seg.done { background: rgb(0 0 0 / 0.2) linear-gradient(var(--red-dark), var(--red-dark)) no-repeat; background-size: 100% 100%; animation: level-fill .7s cubic-bezier(.16, 1, .3, 1) both; }
.seg.next { padding: 0; background: #fff; color: var(--ink); box-shadow: 0 8px 0 var(--red-dark); animation: level-rise .6s .55s cubic-bezier(.16, 1, .3, 1) both; transition: transform .08s, box-shadow .08s; }
.seg.next > a, .seg.next button { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; }
.seg.next small { color: var(--red-dark); }
.seg.next b { font-size: clamp(24px, 2.3vw, 34px); margin-top: 4px; }
.seg.next svg { flex: none; color: var(--red); transition: transform .15s cubic-bezier(.16, 1, .3, 1); }
.seg.next:hover svg { transform: translateX(6px); }
.seg.next:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--red-dark); }
.seg:focus-within { outline: 4px solid #fff; outline-offset: 4px; }
.seg.done svg { color: var(--yellow); }
.level-showcase { padding: clamp(48px, 8vh, 88px) clamp(16px, 4.5vw, 64px) 80px; }
.level-showcase h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; }
.showcase { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.showcase > li > a, .showcase > li > div {
  display: flex; align-items: center; gap: 24px; padding: 22px 26px; border-radius: 18px;
  background: #fde2df; color: var(--ink); text-decoration: none;
}
.showcase > li > a:hover { background: #fbd0ca; }
.showcase > li > a:focus-visible { outline: 4px solid var(--red); outline-offset: 3px; }
.showcase > li svg { flex: none; color: var(--red-dark); }
.showcase-name { flex: 1; display: grid; gap: 4px; min-width: 0; }
.showcase-name b { font-size: clamp(22px, 2vw, 28px); line-height: 1.15; }
.showcase-name span { color: var(--red-dark); font-size: 18px; }
.showcase-meta { display: flex; align-items: baseline; gap: 14px; flex: none; color: var(--red-dark); font-weight: 700; font-size: 18px; }
.showcase-meta b { color: var(--ink); font-size: 22px; font-variant-numeric: tabular-nums; }
@keyframes level-fill { from { background-size: 0 100%; } }
@keyframes level-rise { from { transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .seg.done, .seg.next { animation: none; }
}
@media (max-width: 1100px) {
  .level-main { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .level-stats { grid-template-columns: 1fr 1fr; }
  .level-track { grid-template-columns: 1fr; }
  .seg { min-height: 0; }
  .seg:not(.next) { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 12px; padding: 14px 18px; }
  .seg:not(.next) > a { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 12px; }
  .seg.next { margin-bottom: 8px; }
  .level { min-height: calc(100svh - 72px); }
  .showcase > li > a, .showcase > li > div { flex-wrap: wrap; gap: 10px 16px; padding: 18px 20px; }
}
.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-shadow: #000; }
a.notice { color: var(--ink); text-decoration: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .shell-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .shell-nav form { margin: 0 0 0 auto; }
  .shell-main { padding: 28px 16px 60px; }
  .builder-avatar { width: 84px; height: 84px; }
  .builder, .builder.invite summary { width: 92px; }
}

/* ship: loot drop (/done) */
.loot-header { background: var(--ink); }
.loot-header .header-link { color: #fff; text-underline-offset: 6px; }
.loot-header .header-link:hover { text-decoration: underline; }
.loot-header .header-link:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 6px; }
.loot-level { background: var(--ink); overflow-x: clip; }
.loot-level ::selection, .loot-header ::selection { background: var(--yellow); color: var(--ink); }
.loot-level .level-main { grid-template-columns: 1fr minmax(300px, 480px); align-items: center; }
.loot-level .level-lede { color: #c9ccd3; max-width: 40ch; }
.loot-level .level-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; margin-top: 40px; gap: 24px; }
.loot-level .level-stats div { border-top-color: rgb(255 255 255 / 0.18); }
.loot-level .level-stats dt { color: #a7abb4; }
.loot-project { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loot-notice { margin-top: 32px; max-width: 720px; }
.loot-notice .notice { margin: 0 !important; color: var(--ink); }
.loot-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loot-level .loot-coin-wrap { width: 340px; height: 300px; animation: loot-drop .9s .15s cubic-bezier(.34, 1.4, .64, 1) both; }
.loot-level .loot-rays { width: 600px; height: 600px; animation: loot-rays-in 1.2s .35s cubic-bezier(.16, 1, .3, 1) both, loot-spin 24s linear infinite; }
.loot-level .loot-coin { width: 210px; height: 210px; box-shadow: inset 0 -14px 0 var(--yellow-dark), 0 0 0 10px var(--yellow-dark), 0 24px 60px rgba(255, 196, 46, .35); }
.loot-level .loot-coin span { font-size: 82px; }
.loot-item { position: relative; width: 210px; height: 210px; border-radius: 28px; background: #fff; display: grid; place-items: center; padding: 22px; animation: loot-bob 2.6s ease-in-out infinite; }
.loot-item img { max-width: 100%; max-height: 100%; }
.loot-level .loot-amount b { color: var(--yellow); }
.loot-level .loot-amount span { max-width: 30ch; }
.loot-level .seg { background: rgb(255 255 255 / 0.07); }
.loot-level .seg.done { background: rgb(255 255 255 / 0.07) linear-gradient(#2c2d33, #2c2d33) no-repeat; background-size: 100% 100%; }
.loot-level .seg.done small { color: #a7abb4; }
.loot-level .seg:not(.next):not(.done) { color: #a7abb4; }
.loot-level .seg.next { background: var(--yellow); box-shadow: 0 8px 0 var(--yellow-dark); }
.loot-level .seg.next small { color: var(--ink); opacity: .7; }
.loot-level .seg.next svg { color: var(--ink); }
.loot-level .seg.next:active { box-shadow: 0 3px 0 var(--yellow-dark); }
.loot-level .seg:focus-within { outline-color: var(--yellow); }
.loot-level .level-track { display: flex; }
.loot-level .level-track .seg { flex: 1 1 0; min-width: 0; }
.loot-level .level-track .seg.next { flex-grow: 1.6; }
@keyframes loot-drop { from { transform: translateY(-140px) scale(.55); } }
@keyframes loot-rays-in { from { opacity: 0; scale: .3; } }
@media (prefers-reduced-motion: reduce) {
  .loot-level .loot-coin-wrap, .loot-level .loot-rays, .loot-item { animation: none; }
}
@media (max-width: 1100px) {
  .loot-level .level-main { grid-template-columns: 1fr; }
  .loot-stage { order: -1; }
  .loot-level .loot-coin-wrap { width: 260px; height: 230px; }
  .loot-level .loot-coin, .loot-item { width: 160px; height: 160px; }
  .loot-level .loot-coin span { font-size: 62px; }
  .loot-level .loot-rays { width: 460px; height: 460px; }
  .loot-level .level-track { flex-direction: column; gap: 8px; }
  .loot-level .level-track .seg { flex: none; }
  .loot-level .level-main { align-content: start; }
}
