/* GBG Education site styles. No framework, no outside requests.
   Fonts (all SIL Open Font License 1.1, licenses in /fonts):
     Fraunces: display headings. Silkscreen: small pixel labels. Atkinson Hyperlegible: body text. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../fonts/fraunces-latin-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/silkscreen-latin-400.woff2") format("woff2");
}

:root {
  /* Greens and blacks */
  --forest: #0D1F16;
  --forest-2: #13291E;
  --forest-3: #1C3828;
  --ink: #111814;
  --green: #1D6A45;
  --green-dark: #134B31;
  --green-soft: #E2EFE6;
  --green-light: #8FC5A3;
  --accent: #4BD883;
  --accent-hover: #6BE39A;
  /* Warm paper */
  --paper: #F6F1E6;
  --paper-2: #EDE6D6;
  --white: #FFFFFF;
  --chalk: #F4EFE3;
  --chalk-muted: #B9C8BE;
  --muted: #4A554F;
  --line: #D9D1BF;
  --line-soft: #E7E0D0;

  /* Subjects: swatch, text on tint, tint */
  --math: #2E64B8; --math-ink: #1F4C94; --math-soft: #E3ECF9;
  --science: #0E8A7C; --science-ink: #0A6157; --science-soft: #DAF1EC;
  --ela: #B0387A; --ela-ink: #8A2760; --ela-soft: #F7E3EE;
  --social: #C0582A; --social-ink: #93401C; --social-soft: #F8E6DB;
  --spanish: #D69A10; --spanish-ink: #7A5300; --spanish-soft: #FBEFD0;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13, 31, 22, 0.06), 0 10px 30px rgba(13, 31, 22, 0.08);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.12), 0 24px 60px rgba(0, 0, 0, 0.35);
  --wrap: 1160px;
  --gutter: 16px;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --pixel: "Silkscreen", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Faint classroom textures */
  --chalk-grid: linear-gradient(rgba(244, 239, 227, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 239, 227, 0.045) 1px, transparent 1px);
  --graph-paper: linear-gradient(rgba(29, 106, 69, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 106, 69, 0.07) 1px, transparent 1px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
@media (min-width: 768px) { body { font-size: 1.125rem; } }

img, svg, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
h1, h2, .display {
  font-family: var(--display);
  font-weight: 760;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.375rem, 1.5rem + 3.9vw, 4.25rem); line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem); line-height: 1.08; }
h3 { font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); line-height: 1.25; }
h4 { font-size: 1.0625rem; }
p, ul, ol, dl { margin: 0 0 1em; }
p { text-wrap: pretty; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 700; }
code, kbd, .code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  white-space: nowrap;
}
pre {
  margin: 0 0 1em;
  padding: 16px;
  background: var(--forest);
  color: var(--chalk);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 100%;
}
pre code { background: none; color: inherit; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: inherit; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 100;
  background: var(--accent);
  color: var(--forest);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--forest); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow { max-width: calc(780px + 2 * var(--gutter)); }

/* Pixel labels */
.eyebrow, .pixel {
  font-family: var(--pixel);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.875rem;
  line-height: 1.3;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  background: currentColor;
  box-shadow: 8px 0 0 var(--accent);
  margin-right: 8px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--forest);
  color: var(--chalk);
  border-bottom: 1px solid rgba(244, 239, 227, 0.08);
  position: relative;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--chalk);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--white); }
.brand-mark { display: block; flex: none; }
.site-header .brand-mark rect, .site-footer .brand-mark rect { fill: var(--accent); }
.site-header .brand-mark circle, .site-footer .brand-mark circle { fill: var(--chalk); }

.nav-desktop { display: none; }
.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-desktop li + li { margin-top: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--chalk);
  text-decoration: none;
  font-size: 1rem;
}
.nav-link:hover { background: var(--forest-3); color: var(--white); }
.nav-link[aria-current="page"] {
  color: var(--white);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--accent);
  border-radius: 0;
}
.nav-desktop .btn { margin-left: 12px; }
.site-header :focus-visible { outline-color: var(--accent); }

.nav-mobile { position: static; }
.nav-mobile summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(244, 239, 227, 0.25);
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  color: var(--chalk);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.menu-icon { display: inline-grid; gap: 4px; }
.menu-icon span { display: block; width: 18px; height: 2px; background: currentColor; }
.nav-mobile[open] summary { background: var(--forest-3); border-color: var(--accent); }
.nav-mobile-panel {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--forest-2);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.25);
  padding: 8px var(--gutter) 20px;
}
.nav-mobile-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile-panel li + li { margin-top: 0; border-top: 1px solid rgba(244, 239, 227, 0.1); }
.nav-mobile-panel .nav-link { display: flex; min-height: 52px; padding: 0 4px; font-size: 1.0625rem; border-radius: 0; }
.nav-mobile-panel .nav-link[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent); padding-left: 14px; }
.nav-mobile-panel .btn { width: 100%; margin-top: 14px; }

@media (min-width: 1040px) {
  .nav-desktop { display: block; }
  .nav-mobile { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
/* The bright accent button carries a small pixel-style drop edge. */
.btn-primary {
  background: var(--accent);
  color: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 4px 0 var(--forest);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--forest); transform: translateY(-1px); box-shadow: 0 5px 0 var(--forest); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--forest); }
.btn-secondary { background: var(--white); color: var(--green-dark); border-color: var(--green); }
.btn-secondary:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-ink { background: var(--forest); color: var(--white); }
.btn-ink:hover { background: var(--forest-3); color: var(--white); }
.btn-ghost { background: transparent; color: var(--chalk); border-color: rgba(244, 239, 227, 0.45); }
.btn-ghost:hover { background: rgba(244, 239, 227, 0.08); border-color: var(--chalk); color: var(--white); }
.btn-small { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; }
.btn-small.btn-primary { box-shadow: 0 3px 0 var(--forest); }
.btn-big { min-height: 56px; padding: 12px 26px; font-size: 1.0625rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn .btn-icon { width: 24px; height: 24px; flex: none; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
}
.text-link::after { content: ""; width: 8px; height: 8px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(45deg); }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.section-white { background: var(--white); }
.section-soft { background: var(--green-soft); }
.section-paper2 { background: var(--paper-2); }
.section-graph { background-color: var(--paper); background-image: var(--graph-paper); background-size: 24px 24px; }
.section-dark {
  background-color: var(--forest);
  background-image: var(--grain), var(--chalk-grid);
  background-size: 160px 160px, 32px 32px;
  color: var(--chalk);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .lede, .section-dark .muted { color: var(--chalk-muted); }
.section-dark .eyebrow { color: var(--accent); }
.section-dark .eyebrow::before { box-shadow: 8px 0 0 var(--chalk); }
.section-dark a { color: var(--accent); }
.section-dark a:hover { color: var(--white); }
.section-dark :focus-visible { outline-color: var(--accent); }
.section-tight { padding-top: 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lede { margin-bottom: 0; }
.lede { font-size: clamp(1.125rem, 1.05rem + 0.45vw, 1.3125rem); color: var(--muted); line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }
.fine { font-size: 0.875rem; color: var(--muted); }

/* Inner page hero: the same forest band as the home page, shorter. */
.page-hero {
  background-color: var(--forest);
  background-image: var(--grain), var(--chalk-grid);
  background-size: 160px 160px, 32px 32px;
  color: var(--chalk);
  padding: 52px 0 56px;
  position: relative;
}
@media (min-width: 768px) { .page-hero { padding: 80px 0 84px; } }
.page-hero h1 { max-width: 880px; color: var(--white); font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); }
.page-hero .lede { max-width: 720px; margin-bottom: 0; color: var(--chalk-muted); }
.page-hero .lede a { color: var(--accent); }
.page-hero .eyebrow { color: var(--accent); }
.page-hero .eyebrow::before { box-shadow: 8px 0 0 var(--chalk); }
.page-hero .btn-row { margin-top: 28px; }
.page-hero :focus-visible { outline-color: var(--accent); }

/* ---------- Home hero ---------- */
.hero {
  background-color: var(--forest);
  background-image: radial-gradient(ellipse 60% 70% at 80% 40%, rgba(75, 216, 131, 0.13), transparent 70%), var(--grain), var(--chalk-grid);
  background-size: auto, 160px 160px, 32px 32px;
  color: var(--chalk);
  padding: 40px 0 64px;
  overflow: hidden;
}
@media (min-width: 960px) { .hero { padding: 72px 0 96px; } }
.hero :focus-visible { outline-color: var(--accent); }
.hero-grid {
  display: grid;
  gap: 32px;
  grid-template-areas: "copy" "demo" "actions";
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    grid-template-areas: "copy demo" "actions demo";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    row-gap: 28px;
    align-items: start;
  }
}
.hero-copy { grid-area: copy; }
@media (min-width: 960px) { .hero-copy { padding-top: 36px; } }
.hero-demo { grid-area: demo; min-width: 0; }
.hero-actions { grid-area: actions; }
.hero .eyebrow { color: var(--accent); }
.hero .eyebrow::before { box-shadow: 8px 0 0 var(--chalk); }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero h1 .accent {
  color: var(--accent);
  font-style: normal;
  position: relative;
  white-space: nowrap;
}
/* A chalk underline under "your" */
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: -2%; right: -4%; bottom: -0.12em;
  height: 0.2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 40 3, 90 4, 130 6 S 185 9, 197 4' fill='none' stroke='%23F4EFE3' stroke-width='4' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hero .lede { color: var(--chalk-muted); max-width: 540px; margin-bottom: 0; }
.hero-note { margin: 18px 0 0; font-size: 0.9375rem; color: var(--chalk-muted); max-width: 520px; }
.hero-note a { color: var(--accent); }
.hero-note a:hover { color: var(--white); }

/* The live personalization demo */
.demo { margin: 0; }
.device {
  position: relative;
  background: #1A1F1C;
  border-radius: 18px 18px 8px 8px;
  padding: 12px 12px 14px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.device::before {
  content: "";
  position: absolute;
  top: 5px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #3A423D;
}
.device-base {
  height: 14px;
  margin: 0 -4%;
  background: linear-gradient(#3B433E, #262C29);
  border-radius: 0 0 14px 14px;
  position: relative;
}
.device-base::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: 16%; height: 5px;
  margin-left: -8%;
  background: #1A1F1C;
  border-radius: 0 0 6px 6px;
}
.device-tag {
  position: absolute;
  top: -14px; right: 18px;
  z-index: 2;
  background: var(--accent);
  color: var(--forest);
  font-family: var(--pixel);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 5px 10px 4px;
  border: 2px solid var(--forest);
  box-shadow: 3px 3px 0 var(--forest);
}

/* The real sample game, shown small inside the device frame (demo.js scales it). */
.device-screen {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #0F2A1C;
  aspect-ratio: 1000 / 850;
}
.device-screen iframe {
  position: absolute; top: 0; left: 0;
  width: 1000px; height: 850px;
  border: 0;
  max-width: none;
  transform-origin: 0 0;
  transform: scale(0.5);
  pointer-events: none;
}
.demo-panel {
  position: relative;
  margin: 26px 0 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: 0 4px 0 var(--accent);
}
.demo-panel[hidden] { display: none; }
.demo-panel .pixel-cursor { position: absolute; top: -18px; left: 20px; width: 24px; height: 24px; }
.demo-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  font-family: var(--pixel);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.demo-fields { display: grid; gap: 12px; }
@media (min-width: 520px) { .demo-fields { grid-template-columns: 1fr 1fr; } }
.demo-fields label { font-size: 0.9375rem; margin-bottom: 4px; }
.demo-panel input[type="text"] { min-height: 48px; border-color: #A79F8C; background: var(--white); }
.demo-switch { margin: 14px 0 0; padding: 0; border: 0; }
.demo-switch legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-size: 0.875rem; color: var(--muted); font-weight: 700; }
.demo-switch legend + * { clear: both; }
.subject-picks { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.subject-picks li { margin: 0; }
.subject-pick {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 4px 12px 4px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}
.subject-pick img { width: 24px; height: 24px; image-rendering: pixelated; }
.subject-pick:hover { border-color: var(--subj, var(--green)); }
.subject-pick[aria-pressed="true"] { border-color: var(--subj, var(--green)); background: var(--subj-soft, var(--green-soft)); color: var(--subj-ink, var(--green-dark)); }
.demo-note { margin: 12px 0 0; font-size: 0.875rem; color: var(--muted); }
.demo-caption { margin: 14px 0 0; font-size: 0.9375rem; color: var(--chalk-muted); text-align: center; }
.demo-caption a { color: var(--accent); }

/* Subject color sets. Put one of these on any element to color its tags and accents. */
.subj-math { --subj: var(--math); --subj-ink: var(--math-ink); --subj-soft: var(--math-soft); }
.subj-science { --subj: var(--science); --subj-ink: var(--science-ink); --subj-soft: var(--science-soft); }
.subj-ela { --subj: var(--ela); --subj-ink: var(--ela-ink); --subj-soft: var(--ela-soft); }
.subj-social { --subj: var(--social); --subj-ink: var(--social-ink); --subj-soft: var(--social-soft); }
.subj-spanish { --subj: var(--spanish); --subj-ink: var(--spanish-ink); --subj-soft: var(--spanish-soft); }

.subject-tag {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px;
  padding: 3px 12px 3px 6px;
  border-radius: 999px;
  background: var(--subj-soft, var(--green-soft));
  color: var(--subj-ink, var(--green-dark));
  font-family: var(--pixel);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}
.subject-tag img { width: 24px; height: 24px; image-rendering: pixelated; }
.grade-tag {
  display: inline-flex; align-items: center;
  min-height: 32px;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.tag-row li { margin: 0; }

/* Fact strip under the hero */
.facts-strip { background: var(--accent); color: var(--forest); border-bottom: 3px solid var(--forest); }
.facts-strip ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 28px;
  list-style: none;
  margin: 0;
  padding: 14px 0;
  font-weight: 700;
  font-size: 0.9375rem;
}
.facts-strip li { margin: 0; display: inline-flex; align-items: center; gap: 10px; }
.facts-strip li::before { content: ""; width: 8px; height: 8px; background: var(--forest); }

/* ---------- Brand motif (the games' square, circle, triangle) ---------- */
.motif { display: inline-flex; align-items: center; gap: 8px; }
.motif i { display: block; width: 20px; height: 20px; }
.motif .m-sq { background: var(--green); border-radius: 5px; }
.motif .m-ci { background: var(--ink); border-radius: 50%; }
.motif .m-tr { background: var(--green-light); clip-path: polygon(50% 4%, 100% 96%, 0 96%); border-radius: 3px; }
.motif-lg i { width: 30px; height: 30px; }
.motif-lg .m-sq { border-radius: 8px; }

/* ---------- How it works strip ---------- */
.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  counter-reset: how;
}
@media (min-width: 720px) { .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .how-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; } }
.how-steps > li {
  counter-increment: how;
  position: relative;
  margin: 0;
  padding: 24px 22px;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--forest);
}
@media (min-width: 1040px) {
  .how-steps > li { margin-right: 22px; }
  .how-steps > li:last-child { margin-right: 0; }
  .how-steps > li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -24px; top: 50px;
    width: 22px; height: 8px;
    background: repeating-linear-gradient(90deg, var(--forest) 0 4px, transparent 4px 8px);
  }
}
.how-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.how-top img { width: 48px; height: 48px; image-rendering: pixelated; }
.how-top::after {
  content: "0" counter(how);
  font-family: var(--pixel);
  font-size: 1.5rem;
  color: var(--green);
}
.how-steps h3 { margin-bottom: 6px; }
.how-steps p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
@media (min-width: 768px) { .card { padding: 28px; } }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 0.4em; }
.card-soft { background: var(--green-soft); border-color: transparent; }

.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
  margin-bottom: 16px;
}
.feature-icon svg { width: 24px; height: 24px; }

/* Feature list with pixel icons */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
@media (min-width: 640px) { .feature-list { grid-template-columns: 1fr 1fr; gap: 26px 28px; } }
.feature-list li { margin: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: start; }
.feature-list img { width: 48px; height: 48px; image-rendering: pixelated; background: var(--accent); border-radius: 10px; padding: 6px; border: 2px solid var(--forest); }
.feature-list h3 { font-size: 1.125rem; margin: 2px 0 4px; }
.feature-list p { margin: 0; color: var(--muted); font-size: 1rem; }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 32px; }
.check-list li + li { margin-top: 10px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 20px; height: 20px;
  border-radius: 5px;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%231D6A45' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}
.section-dark .check-list li::before { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230D1F16' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.section-dark .check-list strong { color: var(--white); }
.dash-list { list-style: none; padding: 0; margin: 0 0 1em; }
.dash-list li { position: relative; padding-left: 22px; }
.dash-list li::before {
  content: "";
  position: absolute; left: 2px; top: 0.62em;
  width: 8px; height: 8px;
  background: var(--green);
}

/* Comparison (custom vs generic) */
.compare { display: grid; gap: 24px; align-items: start; }
@media (min-width: 820px) { .compare { grid-template-columns: 1fr 1fr; gap: 32px; } }
.compare .card h3 { display: flex; align-items: center; gap: 10px; }
.compare-generic { background: rgba(255, 255, 255, 0.55); border: 2px dashed #B9B09C; color: var(--muted); }
@media (min-width: 820px) { .compare-generic { transform: rotate(-1deg); margin-top: 18px; } }
.compare-generic h3 { color: var(--muted); }
.compare-generic li::before { background: #EEE9DD url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10h8' fill='none' stroke='%234A554F' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat; }
.compare-custom { border: 2px solid var(--forest); box-shadow: 6px 6px 0 var(--accent); }

/* ---------- Steps (will it work page) ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1000px) { .steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps > li {
  counter-increment: step;
  margin: 0;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--forest);
  padding: 22px 22px 24px;
}
.steps > li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  font-family: var(--pixel);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--green);
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }

/* Detailed timeline (how it works page) */
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: tl; }
.timeline > li {
  counter-increment: tl;
  position: relative;
  margin: 0;
  padding: 0 0 44px 68px;
}
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: "0" counter(tl);
  position: absolute; left: 0; top: 0;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--forest);
  border-radius: 10px;
  background: var(--accent); color: var(--forest);
  box-shadow: 3px 3px 0 var(--forest);
  font-family: var(--pixel);
  font-size: 1.0625rem;
}
.timeline > li::after {
  content: "";
  position: absolute; left: 23px; top: 60px; bottom: 10px;
  width: 3px;
  background: repeating-linear-gradient(var(--forest) 0 6px, transparent 6px 12px);
  opacity: 0.4;
}
.timeline > li:last-child::after { display: none; }
.timeline h2, .timeline h3 { margin-top: 10px; }
.timeline > li > :last-child { margin-bottom: 0; }

/* ---------- Code explainer ---------- */
.code-demo {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch;
  font-family: var(--mono);
  margin: 4px 0 20px;
}
.code-part {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  min-width: 64px;
}
.code-part b {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 10px;
  font-size: 1.125rem;
  color: var(--ink);
}
.code-part span { font-family: var(--font); font-size: 0.8125rem; color: var(--muted); text-align: center; line-height: 1.3; max-width: 110px; }
.code-part.lvl b { background: var(--forest); color: var(--white); }
.code-part.score b { background: var(--accent); }
.code-part.chk b { border-style: dashed; }
.code-sep { align-self: flex-start; padding-top: 12px; font-size: 1.125rem; color: var(--muted); }

/* ---------- Callouts ---------- */
.callout {
  background: var(--green-soft);
  border-left: 5px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin: 0 0 1.5em;
}
.callout > :last-child { margin-bottom: 0; }
.callout h2, .callout h3 { margin-bottom: 0.4em; }
.callout h2.h3 { font-family: var(--font); font-variation-settings: normal; letter-spacing: 0; }
.callout-ink { background: var(--forest); color: var(--chalk); border-left-color: var(--accent); }
.callout-ink h2, .callout-ink h3 { color: var(--white); }
.callout-ink a { color: var(--accent); }
.callout-ink a:hover { color: var(--white); }
.callout-plain { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--forest); }

/* Will it work band (home) */
.test-band { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .test-band { grid-template-columns: auto minmax(0, 1fr) auto; gap: 40px; } }
.test-band img { width: 96px; height: 96px; image-rendering: pixelated; }
.test-band h2 { margin-bottom: 10px; }
.test-band p { margin: 0; max-width: 640px; }

/* ---------- CTA band ---------- */
.cta-band {
  background-color: var(--forest);
  background-image: var(--grain), var(--chalk-grid);
  background-size: 160px 160px, 32px 32px;
  color: var(--chalk);
  border-radius: 24px;
  padding: 40px 24px;
  display: grid;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--accent);
}
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; padding: 56px; } }
.cta-band h2 { color: var(--white); margin-bottom: 10px; }
.cta-band p { margin: 0; color: var(--chalk-muted); max-width: 620px; }
.cta-band .btn-secondary { background: transparent; color: var(--white); border-color: rgba(244, 239, 227, 0.5); }
.cta-band .btn-secondary:hover { background: var(--forest-3); color: var(--white); }
.cta-band :focus-visible { outline-color: var(--accent); }
.cta-band .btn-row { position: relative; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; gap: 24px; align-items: stretch; }
@media (min-width: 960px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; } }
.price-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px 26px;
}
.price-card h3 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; font-weight: 700; font-size: 1.5rem; margin-bottom: 6px; }
.price-card .for { color: var(--muted); margin-bottom: 18px; font-size: 1rem; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; }
.price .amount { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144; font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price .per { color: var(--muted); font-size: 0.9375rem; }
.price-note { font-size: 0.9375rem; color: var(--green-dark); margin: 6px 0 18px; min-height: 1.5em; }
.price-card ul { flex: 1; margin-bottom: 24px; }
.price-card .btn { width: 100%; }
.price-card.featured {
  background: var(--forest);
  color: var(--chalk);
  border: 2px solid var(--forest);
  box-shadow: 8px 8px 0 var(--accent);
  padding-top: 40px; padding-bottom: 34px;
}
@media (min-width: 960px) { .price-card.featured { transform: scale(1.04); z-index: 1; } }
.price-card.featured h3, .price-card.featured .amount { color: var(--white); }
.price-card.featured .for, .price-card.featured .per { color: var(--chalk-muted); }
.price-card.featured .check-list li::before { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230D1F16' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.price-card.featured :focus-visible { outline-color: var(--accent); }
.price-card.featured a:not(.btn) { color: var(--accent); }
.badge {
  display: inline-flex; align-items: center;
  min-height: 28px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-ink { background: var(--forest); color: var(--white); }
.ribbon {
  position: absolute; top: -16px; left: 24px;
  display: inline-flex; align-items: center;
  min-height: 32px;
  padding: 4px 12px 3px;
  background: var(--accent);
  color: var(--forest);
  border: 2px solid var(--forest);
  font-family: var(--pixel);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price-card .badge { position: absolute; top: -14px; left: 24px; }

.founding {
  display: grid; gap: 16px; align-items: center;
  background: var(--spanish-soft);
  border: 2px dashed var(--spanish);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 36px;
}
@media (min-width: 760px) { .founding { grid-template-columns: auto 1fr; gap: 24px; } }
.founding p { margin: 0; }
.founding .motif i { width: 16px; height: 16px; }
.founding .badge-ink { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 0; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--paper); font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 700; }

/* ---------- Sample cards (home) ---------- */
.sample-cards { display: grid; gap: 24px; }
@media (min-width: 720px) { .sample-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
  .sample-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px; }
  .sample-card { grid-column: span 2; }
  .sample-card:nth-child(1), .sample-card:nth-child(2) { grid-column: span 3; }
}
@media (min-width: 720px) and (max-width: 1039px) { .sample-card:last-child { grid-column: 1 / -1; } }
.sample-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--subj, var(--forest));
  overflow: hidden;
  min-width: 0;
}
.shot {
  position: relative;
  display: block;
  margin: 0;
  background: var(--forest);
  border-bottom: 2px solid var(--forest);
}
.shot-bar { display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; background: var(--subj, var(--forest)); }
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); }
.shot img { display: block; width: 100%; aspect-ratio: 5 / 3.4; object-fit: cover; object-position: top center; background: #F3F6F1; }
.sample-card .shot img { aspect-ratio: 5 / 3.2; }
.sample-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.sample-card h3 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; font-weight: 700; font-size: 1.5rem; margin: 0 0 6px; }
.sample-card h3 a { color: var(--ink); text-decoration: none; }
.sample-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--subj, var(--green)); }
.sample-card p { color: var(--muted); font-size: 1rem; margin: 0 0 18px; }
.sample-card .btn-row { margin-top: auto; }
.sample-card .btn-primary { box-shadow: 0 3px 0 var(--forest); }
.sample-card.is-soon .btn { opacity: 0.6; pointer-events: none; }

/* ---------- Samples page ---------- */
.sample-list { display: grid; gap: 40px; }
@media (min-width: 900px) { .sample-list { gap: 56px; } }
.sample {
  scroll-margin-top: 16px;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--subj, var(--forest));
  overflow: hidden;
}
.sample-row { display: grid; }
@media (min-width: 960px) {
  .sample-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .sample:nth-child(even) .sample-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .sample:nth-child(even) .sample-media { order: 2; }
}
.sample-media {
  position: relative;
  background-color: var(--subj-soft, var(--green-soft));
  background-image: var(--graph-paper);
  background-size: 22px 22px;
  padding: 22px;
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
}
@media (min-width: 960px) { .sample-media { padding: 36px; } }
.sample-media .player-stage { position: relative; }
.sample-media .shot { border: 2px solid var(--forest); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 28px rgba(13, 31, 22, 0.18); }
.sample-media .shot img { aspect-ratio: 5 / 3.6; }
.play-over {
  position: absolute;
  left: 50%; top: 55%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.play-over:hover { transform: translate(-50%, calc(-50% - 1px)); }
.play-over:active { transform: translate(-50%, calc(-50% + 3px)); }
.play-over .btn-icon { width: 20px; height: 20px; }
.sample-media .btn-row { margin-top: 18px; justify-content: center; }
.sample-text { padding: 26px 24px 28px; min-width: 0; }
@media (min-width: 960px) { .sample-text { padding: 40px 40px 36px; } }
.sample h2 { margin-bottom: 8px; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem); }
.sample .subtitle { color: var(--muted); margin-bottom: 12px; }
.sample .who { font-weight: 700; margin-bottom: 18px; }
.sample .who span { font-weight: 400; color: var(--muted); }
.levels { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.levels li { margin: 0; }
.level-badge {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px;
  padding: 3px 12px 3px 4px;
  border: 2px solid var(--forest);
  border-radius: 8px;
  background: var(--white);
  font-size: 0.9375rem;
  font-weight: 700;
}
.level-badge b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 4px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 0.875rem;
  background: var(--forest); color: var(--accent);
}
.level-badge .q-count { font-weight: 400; color: var(--muted); font-size: 0.875rem; }
.facts {
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-content: start;
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.9875rem;
}
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.facts dd { margin: 0; font-weight: 700; min-width: 0; }
.facts code { white-space: normal; }
.facts .q-count { font-weight: 400; color: var(--muted); }
.kit-cta { display: grid; gap: 6px; justify-items: start; margin: 0 0 14px; }
.kit-cta .btn { width: 100%; justify-content: center; }
@media (min-width: 520px) { .kit-cta .btn { width: auto; } }
.kit-cta .fine { margin: 0; }
.includes { border-top: 1px solid var(--line-soft); margin-top: 6px; }
.includes summary {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px;
  cursor: pointer;
  font-weight: 700;
  color: var(--green-dark);
  list-style: none;
}
.includes summary::-webkit-details-marker { display: none; }
.includes summary::before {
  content: "";
  width: 9px; height: 9px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.includes[open] summary::before { transform: rotate(45deg); }
.includes .dl-list { margin-top: 4px; padding-bottom: 6px; }
.player-help { margin: 14px 0 0; font-size: 0.9375rem; color: var(--muted); }

/* Playing in the page: the media column takes the full width */
.sample.is-playing .sample-row { grid-template-columns: 1fr; }
.sample.is-playing .sample-media { order: 0; padding: 16px; }
.player-stage.is-playing { border: 2px solid var(--forest); border-radius: 12px; overflow: hidden; background: #F3F6F1; }
.player-stage iframe {
  display: block;
  width: 100%;
  height: min(80vh, 780px);
  min-height: 560px;
  border: 0;
}

/* Generic player (compatibility test) */
.player {
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
  padding: 20px 24px 24px;
}
@media (min-width: 900px) { .player { padding: 24px 32px 28px; } }
.player > .player-stage:not(.is-playing) {
  position: relative;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
  min-height: 132px;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  text-align: center;
}
.player-stage .btn-row { justify-content: center; }
.player-stage .btn { min-width: 200px; }
.sample-head {
  display: grid;
  gap: 20px;
  padding: 24px;
}
@media (min-width: 900px) { .sample-head { grid-template-columns: 1.3fr 1fr; padding: 32px; gap: 32px; } }
.sample-head .facts { margin: 0; }
.sample-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.sample-tags li { margin: 0; }

.downloads { padding: 22px 24px 26px; border-top: 1px solid var(--line-soft); }
@media (min-width: 900px) { .downloads { padding: 26px 32px 30px; } }
.downloads h3 { font-size: 1.125rem; margin-bottom: 12px; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .dl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.downloads .dl-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dl-list li { margin: 0; }
.dl {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
a.dl:hover { border-color: var(--green); background: var(--green-soft); color: var(--ink); }
.dl .ext {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 34px;
  border-radius: 6px;
  background: var(--forest);
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}
.dl .dl-text { display: flex; flex-direction: column; min-width: 0; }
.dl .dl-name { font-weight: 700; font-size: 0.9875rem; }
.dl .dl-meta { font-size: 0.8125rem; color: var(--muted); }
.dl.is-missing { border-style: dashed; background: transparent; color: var(--muted); }
.dl.is-missing .ext { background: #EEE9DD; color: var(--muted); }

.coming-soon {
  display: inline-flex; align-items: center;
  min-height: 28px; padding: 2px 12px;
  border-radius: 999px;
  border: 1px dashed var(--muted);
  color: var(--muted);
  font-size: 0.8125rem; font-weight: 700;
}

/* Jump links */
.jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 28px 0 0; padding: 0; }
.jump li { margin: 0; }
.jump a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(244, 239, 227, 0.3);
  border-radius: 999px;
  background: rgba(244, 239, 227, 0.06);
  color: var(--chalk);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
}
.jump a:hover { border-color: var(--accent); background: rgba(75, 216, 131, 0.12); color: var(--white); }
.jump a img { width: 24px; height: 24px; image-rendering: pixelated; background: var(--chalk); border-radius: 4px; }

/* ---------- Built by a teacher ---------- */
.founder { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .founder { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; } }
.founder-card {
  position: relative;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 6px;
  padding: 30px 28px 26px;
  box-shadow: 6px 6px 0 var(--forest);
  background-image: linear-gradient(transparent 31px, rgba(46, 100, 184, 0.16) 31px, rgba(46, 100, 184, 0.16) 32px, transparent 32px);
  background-size: 100% 32px;
}
@media (min-width: 900px) { .founder-card { transform: rotate(-1.5deg); } }
.founder-card::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 42px;
  width: 2px; background: rgba(192, 88, 42, 0.35);
}
.founder-card img { position: relative; width: 72px; height: 72px; image-rendering: pixelated; margin: 0 0 6px 30px; }
.founder-card p { position: relative; margin: 0 0 0 30px; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 36; font-size: 1.375rem; line-height: 1.45; font-weight: 600; }
.founder-text .bio { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.65; }
/* Room for real testimonials later: add .quotes below the founder note. */
.quotes { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose ol > li, .prose ul > li { padding-left: 4px; }
.prose ol > li + li { margin-top: 0.6em; }

.option-block { scroll-margin-top: 16px; }
.option-block + .option-block { margin-top: 20px; }
.option-block .card { padding-top: 26px; }
.option-label { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.option-label h2, .option-label h3 { margin: 0; }
.option-label .badge { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; background: var(--forest); color: var(--accent); border-radius: 4px; }
.h2 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; font-weight: 760; font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.125rem); line-height: 1.1; }
.h3 { font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); line-height: 1.25; }
h2.h3 { font-family: var(--font); font-variation-settings: normal; font-weight: 700; letter-spacing: 0; }

/* ---------- FAQ ---------- */
.faq-group { scroll-margin-top: 16px; }
.faq-group + .faq-group { margin-top: 52px; }
.faq-group > h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
.faq {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.faq + .faq { margin-top: 10px; }
.faq[open] { border-color: var(--forest); box-shadow: 3px 3px 0 var(--accent); }
.faq summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 24px; height: 24px;
  border-radius: 4px;
  background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Cpath d='M7 11h10v2H7zM11 7h2v10h-2z' fill='%234BD883'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.faq[open] summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Cpath d='M7 11h10v2H7z' fill='%234BD883'/%3E%3C/svg%3E"); }
.faq summary:hover { background: var(--paper); }
.faq-body { padding: 0 20px 18px; }
.faq-body > :last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.form-layout { display: grid; gap: 32px; }
@media (min-width: 1000px) { .form-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; } }
.form-card {
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--accent);
  padding: 24px 18px;
}
@media (min-width: 640px) { .form-card { padding: 36px; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section + .form-section { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line-soft); }
.form-section > legend { padding: 0; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; font-size: 1.5rem; font-weight: 700; margin-bottom: 18px; }
.form-section > legend, .group > legend { float: left; width: 100%; }
.form-section > legend + *, .group > legend + * { clear: both; }
.group { margin-bottom: 24px; }
.group > legend { padding: 0; font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; gap: 0 20px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-row > .field, .field-row > .field:last-child { margin-bottom: 20px; }
label, .label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 1rem; }
.req { color: var(--green-dark); font-weight: 700; }
.opt { color: var(--muted); font-weight: 400; font-size: 0.9375rem; }
.hint { display: block; color: var(--muted); font-size: 0.9375rem; margin: -2px 0 8px; font-weight: 400; }
input[type="text"], input[type="email"], input[type="date"], select, textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #958D7B;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}
textarea { min-height: 120px; resize: vertical; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23111814' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}
input[type="date"] { max-width: 280px; }
.choices { display: grid; gap: 10px; margin: 0; padding: 0; }
@media (min-width: 640px) { .choices-2 { grid-template-columns: 1fr 1fr; } }
.choice {
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}
.choice:hover { border-color: var(--green-light); background: var(--paper); }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.choice input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); }
.choice strong { display: block; }
.choice .hint { margin: 2px 0 0; }
.confirm .choice { align-items: flex-start; }
.form-actions { margin-top: 28px; display: grid; gap: 14px; }
.form-actions .btn { width: 100%; }
@media (min-width: 640px) { .form-actions .btn { width: auto; justify-self: start; min-width: 240px; } }
.hidden-field { display: none; }
.aside-stack { display: grid; gap: 16px; }
@media (min-width: 1000px) { .aside-stack { position: sticky; top: 24px; } }

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--forest);
  background-image: var(--grain);
  background-size: 160px 160px;
  color: var(--chalk-muted);
  padding: 60px 0 28px;
  font-size: 0.9875rem;
  border-top: 4px solid var(--accent);
}
.site-footer a { color: var(--chalk); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--accent); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand .brand { color: var(--white); }
.footer-brand p { margin: 14px 0 0; max-width: 320px; }
.footer-col h2 {
  font-family: var(--pixel);
  font-weight: 400;
  font-variation-settings: normal;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(244, 239, 227, 0.12);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: 0.875rem;
  color: #9DAEA3;
}
.footer-bottom p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 88px 0 96px; }
.notfound .motif { justify-content: center; margin-bottom: 24px; }
.notfound .btn-row { justify-content: center; margin-top: 24px; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-l { margin-top: 36px; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.two-col { display: grid; gap: 32px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.split-media { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .split-media { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.framed { margin: 0; }
.framed .shot { border: 2px solid var(--forest); border-radius: 14px; overflow: hidden; box-shadow: 10px 10px 0 var(--accent); }
.framed .shot img { aspect-ratio: auto; }
.framed figcaption { margin-top: 18px; font-size: 0.9375rem; color: var(--muted); }

@media (max-width: 559px) {
  .card { padding: 20px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd + dt { margin-top: 10px; }
  .player { padding: 16px 12px 20px; }
  .sample.is-playing .sample-media { padding: 8px; }
}

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

@media print {
  .site-header, .site-footer, .skip-link, .player, .cta-band, .demo-panel { display: none !important; }
  body { background: #fff; }
}

/* ---------- "Try your school colors" demo (samples page) ---------- */
.theme-demo {
  margin-top: 18px;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 4px 4px 0 var(--forest);
}
.theme-demo-title { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-family: var(--pixel); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--green-dark); }
.theme-demo-title img { image-rendering: pixelated; }
.theme-demo .fine { margin: 0 0 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.swatches li { margin: 0; }
.swatch {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 12px 4px 8px;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font: inherit; font-size: 0.875rem; font-weight: 700; cursor: pointer;
}
.swatch:hover { border-color: var(--green); }
.swatch[aria-pressed="true"] { border-color: var(--forest); background: var(--green-soft); }
.swatch-dots { display: inline-flex; }
.swatch-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--forest); margin-left: -4px; }
.swatch-dots i:first-child { margin-left: 0; }
.color-fields { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.color-fields label { margin: 0; font-size: 0.875rem; display: grid; gap: 4px; }
.color-fields input[type="color"] { width: 100%; min-height: 44px; padding: 2px; border: 1.5px solid #958D7B; border-radius: var(--radius-sm); background: var(--white); cursor: pointer; }
.color-fields .mascot-field { grid-column: 1 / -1; }
.theme-notes { margin: 10px 0 0; font-size: 0.875rem; color: var(--muted); min-height: 1.3em; }
