@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500&display=swap");

:root {
  --paper: #f7f0df;
  --cream: #fffaf0;
  --ink: #181b16;
  --muted: #5d6455;
  --leaf: #3c6b3c;
  --lime: #d6e66f;
  --tomato: #ea7656;
  --line: #181b16;
  --soft-line: #ddd3b8;
  --err: #a8322d;
  --ok: #2f6b20;
  --display: "Nunito", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 4px 4px 0 var(--ink);
  --wrap: min(1200px, calc(100% - 32px));
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 0.98; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
p { margin: 0 0 14px; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--cream); border: 1.5px solid var(--ink); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.wrap { width: var(--wrap); margin: 0 auto; }
.dim { color: var(--muted); }
.small { font-size: 15px; }
.label { font: 800 15px var(--display); margin: 16px 0 6px; }

/* Nav */
.nav { border-bottom: 2px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.nav-in { width: var(--wrap); margin: 0 auto; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 900 27px/1 var(--display); letter-spacing: -0.06em; text-decoration: none; }
.logo img { width: 40px; height: 40px; }
.nav nav { display: flex; align-items: center; gap: 24px; font: 800 14.5px var(--display); }
.nav nav a:not(.btn) { text-decoration: none; border-bottom: 2px solid transparent; padding: 4px 0; }
.nav nav a:not(.btn):hover, .nav nav a[aria-current="page"] { border-color: var(--tomato); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 900 15px/1 var(--display); padding: 13px 18px; background: var(--cream); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 0.12s, box-shadow 0.12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--tomato); }
.btn.lime { background: var(--lime); }
.btn.dark { background: var(--leaf); color: #fff; }
.link { font: 900 15px var(--display); text-decoration: none; border-bottom: 2px solid var(--ink); padding: 10px 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Hero */
.hero { width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 56px 0 52px; }
.hero h1 { font-size: clamp(42px, 5.4vw, 70px); }
.hero h1 span, .hero h1 em { white-space: nowrap; }
.hero h1 em, .page-title em { font-style: normal; color: var(--tomato); }
.hero .lede { font-size: 20px; line-height: 1.5; color: #41483e; max-width: 31em; margin: 24px 0 30px; }
.frame { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); background: var(--cream); overflow: hidden; }
.hero .frame svg { width: 100%; height: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chips a { font: 800 13.5px var(--display); text-decoration: none; padding: 6px 11px; border: 2px solid var(--ink); background: var(--c, var(--cream)); transition: transform 0.12s, box-shadow 0.12s; }
.chips a:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }

/* Apps */
.app-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.app { font: 900 22px var(--display); padding: 14px 22px; background: var(--cream); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); text-decoration: none; transition: transform 0.12s, box-shadow 0.12s; }
.app:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.app-row .btn { margin-left: 8px; }

/* Strip */
.strip { background: var(--ink); color: var(--paper); }
.strip-in { width: var(--wrap); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; font: 800 14px var(--display); letter-spacing: 0.02em; flex-wrap: wrap; }
.strip-in span::before { content: "✦"; color: var(--lime); margin-right: 10px; }

/* Sections */
.section { width: var(--wrap); margin: 0 auto; padding: 80px 0 24px; }
.section-head { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 32px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 26px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(42px, 5.4vw, 72px); }
.section-head p { margin: 0; color: var(--muted); }

/* Filter */
.filters { display: inline-flex; border: 2px solid var(--ink); margin-bottom: 28px; background: var(--cream); }
.filters button { font: 800 15px var(--display); background: transparent; color: var(--ink); border: 0; border-right: 2px solid var(--ink); padding: 10px 16px; cursor: pointer; }
.filters button:last-child { border-right: 0; }
.filters button[aria-pressed="true"] { background: var(--lime); }

/* Game cards: equal heights, art at a fixed ratio */
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
.game { display: flex; flex-direction: column; background: var(--cream); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.game:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.game .art { aspect-ratio: 340 / 212; border-bottom: 2px solid var(--ink); overflow: hidden; }
.game .art svg { width: 100%; height: 100%; }
.game .copy { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 18px; }
.game h3 { font-size: 30px; margin-bottom: 8px; }
.game p { color: #41483e; margin-bottom: 18px; }
.game .meta { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; border-top: 1.5px solid var(--soft-line); padding-top: 12px; font: 800 13.5px var(--display); }
.game .meta .code { color: var(--leaf); }
.games .more { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 28px; background: var(--lime); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.games .more h3 { font-size: 34px; }
@media (min-width: 1001px) { .games .more { grid-column: span 2; } }

/* How it plays */
.how { width: var(--wrap); margin: 72px auto 0; background: var(--leaf); color: #fff; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; padding: 56px 48px; }
.how h2 { font-size: clamp(40px, 4.8vw, 64px); color: var(--lime); }
.how .intro p { color: #e9f0e1; margin-top: 18px; max-width: 26em; }
.how ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.how li { counter-increment: s; display: grid; grid-template-columns: 54px 1fr; gap: 6px; padding: 20px 0; border-top: 1.5px solid rgba(255, 255, 255, 0.28); }
.how li:last-child { border-bottom: 1.5px solid rgba(255, 255, 255, 0.28); }
.how li::before { content: "0" counter(s); font: 900 22px var(--display); color: var(--lime); }
.how h3 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 6px; color: #fff; }
.how li p { margin: 0; color: #e2ebd9; font-size: 16.5px; }
.note { margin-top: 22px; background: rgba(0, 0, 0, 0.18); border-left: 4px solid var(--lime); padding: 12px 16px; font-size: 16px; color: #f1f5ea; }

/* Codes */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.codes a { display: flex; align-items: center; gap: 12px; background: var(--cream); border: 2px solid var(--ink); padding: 12px 14px; text-decoration: none; font: 800 15px var(--display); }
.codes b { font-family: var(--mono); background: var(--ink); color: var(--lime); padding: 3px 7px; font-size: 13px; }

/* Connect */
.connect { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.panel { background: var(--cream); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 26px; }
.tabs { display: flex; flex-wrap: wrap; border: 2px solid var(--ink); margin-bottom: 18px; width: fit-content; max-width: 100%; }
.tabs button, .tabs a { font: 800 14.5px var(--display); background: var(--cream); color: var(--ink); border: 0; border-right: 2px solid var(--ink); padding: 9px 14px; cursor: pointer; text-decoration: none; }
.tabs > :last-child { border-right: 0; }
.tabs [aria-selected="true"], .tabs .on { background: var(--lime); }
.steps-list { padding-left: 22px; margin: 0; }
.steps-list li { margin-bottom: 10px; }
.copyrow { display: flex; gap: 10px; align-items: stretch; margin: 10px 0 14px; }
.copyrow code { flex: 1; display: block; padding: 12px 14px; font-size: 14.5px; min-width: 0; border-radius: 0; border-width: 2px; }
.copyrow .btn { padding: 10px 16px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--cream); border: 2px solid var(--ink); padding: 0; }
.faq summary { cursor: pointer; font: 900 19px var(--display); padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 4px; color: #41483e; }

/* Final call */
.final { width: var(--wrap); margin: 80px auto 0; background: var(--tomato); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.final h2 { font-size: clamp(34px, 4.2vw, 54px); max-width: 15em; }
.final .btn { background: var(--cream); }

/* Game page */
.crumbs { width: var(--wrap); margin: 0 auto; padding-top: 28px; font: 800 14px var(--display); }
.crumbs a { text-decoration: none; border-bottom: 2px solid var(--tomato); }
.game-hero { width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 34px 0 44px; }
.page-title { font-size: clamp(48px, 6.6vw, 88px); }
.page-title em { display: block; font-size: 0.56em; letter-spacing: -0.02em; margin-top: 10px; line-height: 1.05; }
.game-hero .lede { font-size: 19.5px; color: #41483e; margin: 22px 0 26px; max-width: 32em; }
.say { background: var(--cream); border: 2px solid var(--ink); padding: 14px 16px; margin-top: 22px; font-size: 16px; }
.say b { font-family: var(--display); }
.detail { width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; padding-bottom: 20px; }
.detail h2 { font-size: 36px; margin: 46px 0 18px; }
.detail h2:first-child { margin-top: 0; }
.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; gap: 14px; }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; background: var(--cream); border: 2px solid var(--ink); padding: 16px 18px; }
.numbered li::before { content: counter(n); display: grid; place-items: center; width: 38px; height: 38px; background: var(--lime); border: 2px solid var(--ink); font: 900 18px var(--display); }
.numbered h3 { font-size: 20px; letter-spacing: -0.01em; margin: 6px 0 4px; }
.numbered p { margin: 0; color: #41483e; font-size: 16.5px; }
.rules { margin: 0; padding-left: 22px; }
.rules li { margin-bottom: 10px; }
.sample { background: var(--cream); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 18px; display: grid; gap: 12px; }
.bubble { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; padding-bottom: 12px; border-bottom: 1.5px dashed var(--soft-line); }
.bubble:last-child { border-bottom: 0; padding-bottom: 0; }
.bubble b { font: 900 14px var(--display); text-transform: uppercase; letter-spacing: 0.05em; color: var(--leaf); }
.glance { position: sticky; top: 100px; background: var(--lime); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 22px; }
.glance h2 { font-size: 26px; margin: 0 0 14px; }
.glance dl { margin: 0; display: grid; gap: 12px; }
.glance dt { font: 900 13px var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.glance dd { margin: 2px 0 0; font-size: 16.5px; }
.glance .btn { width: 100%; margin-top: 18px; }
.others { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.others a { display: flex; gap: 14px; align-items: center; background: var(--cream); border: 2px solid var(--ink); padding: 10px; text-decoration: none; }
.others a:hover { background: var(--lime); }
.others .thumb { width: 84px; flex: none; aspect-ratio: 340 / 212; border: 2px solid var(--ink); overflow: hidden; }
.others .thumb svg { width: 100%; height: 100%; }
.others b { font: 900 18px var(--display); display: block; }
.others span { font-size: 14px; color: var(--muted); }

/* Plain pages and account */
.page { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 56px; }
.page h1 { font-size: clamp(42px, 6vw, 68px); margin-bottom: 14px; }
.page h2 { font-size: 30px; margin: 34px 0 12px; }
.narrow { width: min(480px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 56px; }
.narrow h1 { font-size: 46px; margin-bottom: 12px; }
.card { background: var(--cream); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 22px; margin: 0 0 20px; }
.card h2 { font-size: 24px; margin: 0 0 10px; }
.form { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row input { flex: 1 1 200px; }
label { display: grid; gap: 6px; font: 800 14.5px var(--display); }
input { font: 16px var(--body); width: 100%; padding: 11px 13px; border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 0; }
input:focus { outline: 3px solid var(--lime); outline-offset: 0; }
.err { color: var(--err); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.warn { color: #9a5b00; }
.consent { display: grid; gap: 6px; }
.consent img { width: 56px; height: 56px; }
.consent h1 { font-size: 34px; }
.consent .row .btn { flex: 1; }
ul.plain { padding-left: 20px; }
.lede { font-size: 19px; color: #41483e; }

/* Footer */
.foot { margin-top: 90px; border-top: 2px solid var(--ink); }
.foot-in { width: var(--wrap); margin: 0 auto; padding: 26px 0 34px; display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: center; font: 800 14.5px var(--display); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot nav a { text-decoration: none; border-bottom: 2px solid var(--ink); }
.foot .logo { font-size: 24px; }

/* Responsive */
@media (max-width: 1000px) {
  .games, .others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; }
  .glance { position: static; }
}
@media (max-width: 820px) {
  .hero, .game-hero, .connect, .how { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; gap: 34px; }
  .section-head { grid-template-columns: 1fr; }
  .how { padding: 36px 24px; }
  .final { padding: 32px 24px; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .games, .others { grid-template-columns: 1fr; }
  .nav nav a:not(.btn):not(.keep) { display: none; }
  .nav-in { height: 66px; }
  .bubble { grid-template-columns: 1fr; gap: 2px; }
  .copyrow { flex-direction: column; }
  .strip-in { justify-content: flex-start; }
  body { font-size: 17px; }
}
