:root {
  color-scheme: light dark;
  --yellow: #ffc400;
  --yellow-soft: #fff4c2;
  --ink: #171717;
  --paper: #fffdf7;
  --muted: #606269;
  --line: #dedbd1;
  --panel: #ffffff;
  --shadow: 0 18px 55px rgba(23, 23, 23, 0.1);
  --radius: 24px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 196, 0, .16), transparent 25rem),
    radial-gradient(circle at 90% 35%, rgba(23, 23, 23, .05), transparent 22rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 100;
  padding: .75rem 1rem; background: var(--ink); color: #fff; border-radius: 12px;
}
.skip-link:focus { top: 1rem; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(16px);
}
.nav {
  width: min(calc(100% - 2rem), var(--max)); min-height: 74px; margin: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 900; letter-spacing: .04em; }
.brand-mark {
  width: 42px; aspect-ratio: 1; display: grid; place-items: center;
  background: var(--yellow); color: #111; border: 2px solid #111; border-radius: 11px;
  box-shadow: 4px 4px 0 #111;
}
.nav-links { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { padding: .58rem .72rem; border-radius: 10px; text-decoration: none; font-size: .9rem; font-weight: 700; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--yellow); color: #111; }
.menu-button {
  display: none; min-width: 44px; min-height: 44px; border: 2px solid currentColor;
  border-radius: 12px; background: transparent; color: inherit; font: inherit; font-weight: 800;
}
main { overflow: clip; }
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.hero {
  min-height: 620px; padding: clamp(3rem, 8vw, 7rem) 0;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(2rem, 6vw, 5rem);
}
.eyebrow { color: #8b6600; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
h1 { margin: .25rem 0 1rem; font-size: clamp(3.7rem, 10vw, 7.4rem); }
h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.lead { max-width: 690px; font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.button {
  min-height: 48px; padding: .75rem 1.1rem; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink); border-radius: 14px; text-decoration: none; font-weight: 850;
}
.button.primary { background: var(--yellow); color: #111; box-shadow: 5px 5px 0 var(--ink); }
.button.secondary { background: var(--panel); }
.store-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 2rem; }
.store-label { padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 750; }
.hero-art {
  position: relative; padding: 1.5rem;
  background: linear-gradient(145deg, var(--yellow), #ffd94b);
  border: 3px solid var(--ink); border-radius: 34px; box-shadow: 14px 14px 0 var(--ink);
}
.hero-art::before, .hero-art::after {
  content: ""; position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--paper);
}
.hero-art::before { left: -24px; top: 35%; border-right: 3px solid var(--ink); }
.hero-art::after { right: 25%; bottom: -24px; border-top: 3px solid var(--ink); }
.hero-art img { width: 100%; aspect-ratio: 1.08; object-fit: contain; }
.section { padding: clamp(3.75rem, 8vw, 7rem) 0; }
.section.alt { background: color-mix(in srgb, var(--yellow-soft) 45%, var(--paper)); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  padding: 1.4rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-accent { border-top: 6px solid var(--yellow); }
.card p { margin-bottom: 0; color: var(--muted); }
.puzzle-icon {
  width: 46px; height: 46px; margin-bottom: 1rem; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--yellow); color: #111; font-weight: 950;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.feature-list { padding: 0; margin: 0; list-style: none; display: grid; gap: .75rem; }
.feature-list li { display: flex; gap: .7rem; align-items: flex-start; }
.feature-list li::before { content: ""; flex: 0 0 12px; height: 12px; margin-top: .45rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 3px; }
.legal-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; }
.legal-links a { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-decoration: none; font-weight: 800; text-align: center; }
.page-hero { padding: clamp(3.5rem, 7vw, 6rem) 0 2.5rem; }
.page-hero h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
.meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .94rem; }
.prose-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2rem; align-items: start; padding-bottom: 6rem; }
.toc { position: sticky; top: 94px; padding: 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.toc strong { display: block; margin-bottom: .7rem; }
.toc ol { padding-left: 1.2rem; margin: 0; max-height: 68vh; overflow: auto; }
.toc a { font-size: .88rem; }
.prose { min-width: 0; }
.legal-document { padding-block: clamp(2rem, 5vw, 4rem); }
.legal-document > h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.legal-document > h2 { margin-top: 2rem; font-size: clamp(1.45rem, 3vw, 2.05rem); }
.legal-document p { overflow-wrap: anywhere; }
.legal-document .list-item { padding-left: 1.25rem; }
.table-wrap { max-width: 100%; overflow-x: auto; margin-block: 1rem; }
.table-wrap table { width: 100%; border-collapse: collapse; background: var(--panel); }
.table-wrap td { min-width: 9rem; padding: .7rem; border: 1px solid var(--line); vertical-align: top; }
.source-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.prose section { padding: 1.2rem 0 1.6rem; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.prose section:first-child { padding-top: 0; }
.prose h2 { font-size: clamp(1.45rem, 3vw, 2.05rem); }
.notice { padding: 1rem 1.1rem; border-left: 5px solid var(--yellow); border-radius: 10px; background: var(--yellow-soft); color: #352900; }
.faq { display: grid; gap: .8rem; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; }
summary { cursor: pointer; font-weight: 850; }
.site-footer { padding: 3rem 0; background: #151515; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .75rem 1.2rem; justify-content: flex-end; }
.footer-note { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #3b3b3b; color: #bbb; font-size: .9rem; }

@media (max-width: 860px) {
  .menu-button { display: inline-flex; align-items: center; justify-content: center; }
  .nav { flex-wrap: wrap; padding-block: .7rem; }
  .nav-links { width: 100%; display: none; padding-bottom: .5rem; align-items: stretch; }
  .nav-links.open { display: grid; grid-template-columns: 1fr 1fr; }
  .nav-links a { border: 1px solid var(--line); background: var(--panel); }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-art { width: min(100%, 560px); margin-inline: auto; order: -1; }
  .grid { grid-template-columns: 1fr 1fr; }
  .legal-links { grid-template-columns: 1fr 1fr; }
  .prose-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 560px) {
  .container, .nav { width: min(calc(100% - 1.25rem), var(--max)); }
  .nav-links.open { grid-template-columns: 1fr; }
  .hero-art { border-radius: 24px; box-shadow: 7px 7px 0 var(--ink); }
  .grid, .split, .footer-grid, .legal-links { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f7f7f4; --paper: #0f1013; --muted: #b5b6bc; --line: #383a40;
    --panel: #181a1f; --yellow-soft: #302a12; --shadow: 0 18px 55px rgba(0, 0, 0, .34);
  }
  .brand-mark, .button.primary, .puzzle-icon { color: #111; border-color: #f1f1ed; }
  .hero-art { border-color: #f1f1ed; box-shadow: 12px 12px 0 #303136; }
  .hero-art::before, .hero-art::after { border-color: #f1f1ed; }
  .notice { color: #fff4c2; }
}
