/* =====================================================================
   Fourth Period Play Lab  |  css/styles.css
   ---------------------------------------------------------------------
   One stylesheet for the whole site. Plain CSS, no build step. Sections
   are marked with "====" banners so you can jump around.

   DESIGN: "game studio on the outside, research lab underneath."
   - GAME sections (class="game") are dark, bold and immersive: the home
     page hero, the game library, each game's page, the header and footer.
   - INFORMATION sections are light, open and friendly: teachers,
     schools, parents, data, FAQ.

   COLORS come from the games' own booklet palette and live in the :root
   block. Change a color once there and it changes everywhere.
   The .game class swaps the same color names for their dark versions, so
   every button, card and link works in both kinds of section.

   CORNERS are small (4 to 8px) on purpose.

   MOTION is light: a hover lift on game tiles and buttons, and a soft
   fade as sections scroll into view. The reduced-motion block at the
   bottom switches all of it off for people who ask their device to.
   ===================================================================== */

/* ==== 1. Fonts and design tokens ===================================== */
/* The font files live in assets/fonts/ so the site never contacts an
   outside font service (school networks often block those). All are free
   to use under the SIL Open Font License. */
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/atkinson-hyperlegible-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/atkinson-hyperlegible-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/atkinson-hyperlegible-700.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-variable.woff2") format("woff2");
}
/* Used only for the Outbreak and Roll of the Dice title lettering, to match the games' own covers. */
@font-face {
  font-family: "Fira Sans Condensed"; font-style: italic; font-weight: 800; font-display: swap;
  src: url("../assets/fonts/fira-sans-condensed-800-italic.woff2") format("woff2");
}

:root {
  /* The booklet palette (same colors the games use) */
  --g-ink:        #0b1820;   /* game sections background */
  --g-panel:      #13272f;   /* raised surface on dark */
  --g-line:       #2a444d;
  --g-text:       #fffaf0;
  --g-soft:       #b9c9c6;
  --yellow:       #f9c846;
  --mint:         #6fcf9b;
  --pink:         #f0628a;
  --blue:         #4a9bd8;
  --booklet-teal: #1f6e6e;

  /* Information sections (light) */
  --paper:        #fffaf0;   /* cream */
  --paper-2:      #f3ecdc;   /* cards, panels, tinted bands */
  --paper-3:      #e6dcc6;   /* chart tracks */
  --rule:         #d9cfb8;   /* borders and dividers */

  --ink:          #0b1820;   /* main text */
  --ink-2:        #40525a;   /* softer text */
  --ink-3:        #55656b;   /* small labels (passes 4.5:1 on cream) */
  --on-accent:    #ffffff;   /* text on a primary button */

  --teal:         #1f6e6e;   /* primary buttons */
  --teal-deep:    #1f6e6e;   /* links and accents in text */
  --teal-tint:    #d5ebe2;
  --marigold:     #f9c846;
  --marigold-tint:#fdf0c4;
  --coral:        #f0628a;   /* pink accent */
  --coral-deep:   #a3214d;   /* pink dark enough for text */
  --coral-tint:   #fbdbe4;

  --focus:        #a3214d;
  --shadow:       0 10px 24px -14px rgba(11, 24, 32, .45);

  /* Type */
  --font-display: "Bricolage Grotesque", "Arial Black", "Segoe UI", system-ui, sans-serif;
  --font-text:    "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-title:   "Fira Sans Condensed", "Arial Narrow", "Segoe UI", sans-serif;

  /* Shape and rhythm */
  --radius:       8px;
  --radius-sm:    6px;
  --measure:      64ch;
  --wrap:         1140px;
  --gutter:       clamp(16px, 4vw, 40px);
  --space:        clamp(3rem, 7vw, 5.5rem);

  --ease:         cubic-bezier(.2, .75, .2, 1);

  color-scheme: light;
}

/* Dark mode: information sections go dark too. Game sections stay as they are. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #13232b;
    --paper-2:      #1a2e37;
    --paper-3:      #263c46;
    --rule:         #2f4852;
    --ink:          #fffaf0;
    --ink-2:        #b9c9c6;
    --ink-3:        #9fb2b0;
    --on-accent:    #0b1820;
    --teal:         #6fcf9b;
    --teal-deep:    #6fcf9b;
    --teal-tint:    #14333a;
    --marigold-tint:#3a3012;
    --coral-deep:   #f58aa6;
    --coral-tint:   #3d1a26;
    --focus:        #f9c846;
    color-scheme: dark;
  }
}

/* GAME MODE: put class="game" on a section to make it dark. It renames the
   colors, so everything inside (buttons, cards, links) follows along. */
.game, .site-header, .site-footer {
  --paper:        var(--g-ink);
  --paper-2:      var(--g-panel);
  --paper-3:      #263c46;
  --rule:         var(--g-line);
  --ink:          var(--g-text);
  --ink-2:        var(--g-soft);
  --ink-3:        #9fb2b0;
  --on-accent:    #0b1820;
  --teal:         var(--yellow);
  --teal-deep:    var(--yellow);
  --teal-tint:    #14333a;
  --marigold-tint:#3a3012;
  --coral-deep:   #f58aa6;
  --coral-tint:   #3d1a26;
  --focus:        var(--yellow);
  background: var(--paper);
  color: var(--ink);
}

/* ==== 2. Base ======================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden; /* belt-and-braces against horizontal scroll */
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.45rem); line-height: 1.15; letter-spacing: -0.01em; }
h4 { font-size: 1.1rem; font-family: var(--font-text); font-weight: 700; letter-spacing: 0; line-height: 1.3; }

p, ul, ol, dl { margin: 0 0 1.1em; }
/* Avoid a single word left hanging on the last line of a paragraph or list item. */
p, li, td, th, dd, figcaption, summary, blockquote { text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

strong { font-weight: 700; }
small { font-size: 0.875em; }

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

/* Visually hidden, but still read by screen readers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: 0; left: 0;
  padding: .75rem 1rem;
  background: var(--yellow);
  color: #0b1820;
  font-weight: 700;
  transform: translateY(-120%);
  transition: transform 200ms var(--ease);
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}
.measure { max-width: var(--measure); }

/* Old texture classes, kept so older pages do not break. They add nothing now. */
.graph, .ruled { background-image: none; }
.ruled { background: var(--paper-2); }

/* Tags: short labels on cards (topic, kind of game, status) */
.tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink);
  border-radius: 4px;
  padding: .15rem .55rem;
  line-height: 1.5;
  background: var(--paper-3);
}
.game .tag { background: rgba(255, 255, 255, .12); }
.tag.is-placeholder { background: var(--coral-tint); color: var(--coral-deep); }
/* "Coming soon" and status labels */
.tag.is-soon, .tag.is-status { background: var(--pink); color: #0b1820; }
/* "Try it now" on a tool that is live. */
.tag.is-live { background: #6fcf9b; color: #0b1820; }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; padding: 0; list-style: none; }

/* Small label above a heading. Use sparingly. */
.eyebrow {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--teal-deep);
  margin-bottom: .6rem;
}

/* A visible note for Mia: something to confirm or supply before launch. */
.confirm { background: #ffe66b; color: #0b1820; font-weight: 700; padding: 0 .3rem; border-radius: 3px; }

/* Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 700; text-decoration: none;
  min-height: 3rem; padding: .7rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1.05rem; line-height: 1.2;
  transition: transform 160ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary, .btn-coral { background: var(--teal); color: var(--on-accent); }
.btn-primary:hover, .btn-coral:hover { color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); }
.btn-big { min-height: 3.6rem; font-size: 1.25rem; width: 100%; }
/* A button-shaped label for something that is not available yet. Not a link. */
.btn-soon { background: transparent; color: var(--ink-2); border: 2px dashed var(--rule); cursor: default; }
.btn-soon:hover { transform: none; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* ==== 3. Header and navigation ====================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  min-width: 2rem; height: 2rem; padding: 0 .4rem; flex: none;
  display: grid; place-items: center;
  border-radius: 6px; background: var(--yellow); color: #0b1820;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1;
}
.brand-text { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1; letter-spacing: -0.01em; }
.brand-text .brand-sub { color: var(--yellow); }

.nav-toggle {
  display: none;
  align-items: center; gap: .5rem;
  background: none; border: 2px solid var(--ink); border-radius: var(--radius);
  padding: .45rem .9rem; color: var(--ink); font: inherit; font-weight: 700;
  cursor: pointer;
}
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.nav-toggle-bars span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform 200ms var(--ease), opacity 200ms; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.primary-nav { display: flex; align-items: center; gap: 1.25rem; }
.bell-schedule {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: .15rem;
}
.bell-schedule a {
  display: block;
  padding: .5rem .7rem;
  text-decoration: none; color: var(--ink);
  border-radius: var(--radius-sm);
  line-height: 1.15;
  font-weight: 700; font-size: .98rem;
  position: relative;
}
.bell-schedule a::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .15rem;
  height: 3px; background: var(--yellow); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease);
}
.bell-schedule a:hover::after, .bell-schedule a[aria-current="page"]::after { transform: scaleX(1); }
.bell-schedule a:hover { color: var(--yellow); }

.nav-substack {
  font-size: .9rem; font-weight: 700; white-space: nowrap;
  padding: .45rem .9rem; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none;
  border: 2px solid var(--rule);
}
.nav-substack:hover { border-color: var(--yellow); color: var(--ink); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    padding: .5rem var(--gutter) 1.25rem;
    /* closed by default */
    transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 220ms var(--ease), opacity 220ms var(--ease), visibility 0s 220ms;
  }
  .primary-nav.is-open {
    transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    transition: transform 220ms var(--ease), opacity 220ms var(--ease);
  }
  .bell-schedule { flex-direction: column; gap: 0; }
  .bell-schedule a { padding: .8rem .5rem; border-bottom: 1px solid var(--rule); border-radius: 0; font-size: 1.1rem; }
  .bell-schedule a::after { display: none; }
  .nav-substack { align-self: flex-start; margin-top: 1rem; }
}

/* ==== 4. Page headers and the home page hero ======================== */
/* Every page opens with a .hero band. On information pages it is light. */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero h1 { margin-bottom: 1rem; }
.hero .lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--ink-2); max-width: 38rem; margin-bottom: 1.6rem; }

/* Home page hero (dark): headline on the left, three game covers on the right */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.hero-home h1 { font-size: clamp(2.1rem, 1rem + 3.3vw, 3.5rem); }
.hero-home h1 span { display: block; }
.hero-home h1 .turn { color: var(--yellow); }
.tagline {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem);
  color: var(--mint); margin: 0 0 .6rem;
}

/* Three covers, all the same size, so no game looks more important. */
.covers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; list-style: none; margin: 0; padding: 0; }
.cover {
  position: relative; display: block; aspect-ratio: 3 / 4;
  border-radius: var(--radius); overflow: hidden;
  border: 3px solid var(--g-text);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .6);
  transition: transform 180ms var(--ease);
}
.covers li:nth-child(1) .cover { transform: rotate(-3deg); }
.covers li:nth-child(2) .cover { transform: rotate(2deg) translateY(-6%); }
.covers li:nth-child(3) .cover { transform: rotate(-2deg); }
.covers li .cover:hover { transform: translateY(-6px); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(11, 24, 32, .85) 0%, rgba(11, 24, 32, .5) 30%, rgba(11, 24, 32, 0) 55%); }
.cover .t { position: absolute; z-index: 1; left: .6rem; right: .4rem; top: .6rem; font-size: clamp(.95rem, .5rem + 1.3vw, 1.4rem); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .covers { max-width: 30rem; }
}

/* ==== 5. Game art, titles, tiles and game pages ===================== */
/* Title lettering that matches each game's own cover */
.title-outbreak, .title-dice, .title-score {
  font-family: var(--font-title); font-style: italic; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0; line-height: .95;
  color: #fffaf0; text-shadow: .06em .06em 0 var(--booklet-teal);
}
.title-womb {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: .95;
  color: #f7eaf1;
}
.title-womb b { color: #ffb48a; font-weight: 800; }

/* Game library: equal tiles, three across */
.library {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.tile {
  display: flex; flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 180ms var(--ease), border-color 180ms, opacity 260ms var(--ease);
}
.tile:hover { transform: translateY(-6px); border-color: var(--yellow); }
.tile.is-out { opacity: 0; transform: scale(.96); pointer-events: none; }
.tile-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; object-position: 74% 60%; }
/* A dark wash behind the title so the lettering is always readable over the art */
.tile-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(11, 24, 32, .82) 0%, rgba(11, 24, 32, .55) 38%, rgba(11, 24, 32, 0) 62%);
}
.tile-art .t {
  position: absolute; z-index: 1; left: 1rem; top: .9rem; right: 1rem; margin: 0;
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.3rem);
}
.tile-art .t.long { font-size: clamp(1.2rem, .9rem + 1vw, 1.7rem); }
.tile-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.tile-body h3 { margin: 0; }
.tile-body h3 a { color: inherit; text-decoration: none; }
.tile .t a { color: inherit; text-decoration: none; }
.tile { position: relative; }
.tile-body p { margin: 0; color: var(--ink); }
.tile-body .tag-row { margin: 0; }
.tile-body .mechanic { color: var(--ink-2); font-size: .97rem; }
.tile-body .btn { margin-top: auto; position: relative; z-index: 1; }
/* A tile with no picture: a block of color with the name on it (used for teacher tools) */
.tile-art.plain { aspect-ratio: auto; min-height: 8rem; display: flex; align-items: flex-end; padding: 1rem 1.2rem; background: var(--yellow); }
.tile-art.plain::after { display: none; }
.tile-art.plain .t { position: static; color: #0b1820; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); }
.tile-art.c-mint { background: var(--mint); }
.tile-art.c-pink { background: var(--pink); }
.tile-art.c-blue { background: var(--blue); }
.tile-art.c-orange { background: #f39a4c; }
@media (max-width: 760px) {
  /* On a phone the tiles stack, each one short, so all three are close together. */
  .library { grid-template-columns: 1fr; }
  .tile-art { aspect-ratio: 16 / 7; }
}


/* A slot for a video or screenshot that has not been added yet */
.media-slot {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius);
  display: grid; place-items: center; align-content: center; gap: .7rem; text-align: center; padding: 1rem;
}
.section .media-slot { max-width: 44rem; }
.media-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.media-slot > * { position: relative; }
.play-disc { width: 4rem; height: 4rem; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; }
.play-disc::before { content: ""; border-left: 1.2rem solid #0b1820; border-top: .75rem solid transparent; border-bottom: .75rem solid transparent; margin-left: .3rem; }
.slot-note { font-weight: 700; font-size: .9rem; background: #ffe66b; color: #0b1820; padding: .2rem .6rem; border-radius: 4px; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: .6rem 0 0; list-style: none; padding: 0; }
.shots li {
  aspect-ratio: 16 / 9; border: 2px dashed var(--rule); border-radius: var(--radius-sm);
  display: grid; place-items: center; text-align: center; font-size: .8rem; font-weight: 700; color: var(--ink-2); padding: .3rem;
}
@media (max-width: 560px) { .shots { grid-template-columns: repeat(2, 1fr); } }

/* Game page: wide banner, then media on the left and the play box on the right */
.banner { position: relative; }
.banner img { width: 100%; height: clamp(13rem, 30vw, 22rem); object-fit: cover; object-position: 70% 50%; }
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 24, 32, .85) 0%, rgba(11, 24, 32, .6) 35%, rgba(11, 24, 32, 0) 65%);
}
.banner .t {
  position: absolute; z-index: 1; margin: 0;
  left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); right: var(--gutter);
  top: 50%; transform: translateY(-50%);
  font-size: clamp(2.4rem, 1.2rem + 5.5vw, 5.5rem);
}
.banner .t.long { font-size: clamp(1.9rem, 1rem + 3.6vw, 3.8rem); max-width: 14em; }
.banner .t small { display: block; font-size: .36em; margin-top: .35em; text-transform: none; }
.store {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(17rem, 1fr);
  gap: 1.5rem; padding-block: 1.5rem clamp(3rem, 6vw, 4.5rem); align-items: start;
}
.buy { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.3rem; display: grid; gap: 1rem; }
.buy .pitch { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; margin: 0; }
.buy p { margin: 0; }
.buy .tag-row { margin: 0; }
.works { border-top: 1px solid var(--rule); padding-top: 1rem; }
.works h2 { font-size: 1rem; letter-spacing: 0; margin-bottom: .6rem; }
.works ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; font-size: .95rem; }
.works li::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--mint); margin-right: .5rem; }
@media (max-width: 860px) { .store { grid-template-columns: 1fr; } }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.6rem 2.4rem; }
.fields h3 { color: var(--teal-deep); margin-bottom: .4rem; }
.fields p { margin: 0; color: var(--ink-2); }

/* ==== 6. Sections and layouts ======================================= */
.section { padding-block: var(--space); position: relative; }
.section + .section { border-top: 1px solid var(--rule); }
.section.game + .section.game { border-top: 0; padding-top: 0; }
.section-tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section.tint { background: var(--paper-2); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-head p { font-size: 1.1rem; color: var(--ink-2); }

/* A column of running text (was the "notebook" block) */
.notebook { position: relative; }

/* Two-column layout */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
/* About page photo: sits under the paragraphs of its section. */
.about-photo { margin: 1.5rem 0 0; max-width: 26rem; }
.about-photo img { display: block; width: 100%; height: auto; border-radius: 8px; }
.about-photo figcaption { font-size: .92rem; color: var(--ink-2); margin-top: .6rem; }
.spread.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.spread.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.spread > .sticky { position: sticky; top: 5.5rem; }
@media (max-width: 820px) {
  .spread, .spread.flip, .spread.even { grid-template-columns: 1fr; }
  .spread > .sticky { position: static; }
}

.mission-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}
.mission-strip > div { background: var(--paper-2); padding: 1.4rem; border-radius: var(--radius); }
.mission-strip .big {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.05; margin-bottom: .5rem;
}
.mission-strip p { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 700px) { .mission-strip { grid-template-columns: 1fr; } }

/* ==== 7. Audience doors ("Who are you here as?") ==================== */
.pathways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.pathway {
  position: relative;
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.3rem 1.3rem 1.4rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  transition: transform 180ms var(--ease);
}
.pathway:hover, .pathway:focus-visible { transform: translateY(-4px); color: var(--ink); }
.pathway .icon { width: 2.4rem; height: 2.4rem; color: var(--teal-deep); }
.pathway .who { font-size: .85rem; font-weight: 700; color: var(--ink-3); }
.pathway h3 { margin: 0; }
.pathway p { color: var(--ink-2); font-size: .97rem; margin: 0; }
.pathway .go { margin-top: auto; padding-top: .6rem; font-weight: 700; color: var(--teal-deep); display: inline-flex; align-items: center; gap: .35rem; }
.pathway .go svg { display: none; }

/* ==== 8. Cards (tools, stories) ===================================== */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.2rem;
}
.catalog.library { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .catalog.library { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.4rem;
  position: relative;
  transition: opacity 260ms var(--ease);
}
.card.is-out { opacity: 0; pointer-events: none; }
.card .card-art { height: 5rem; margin: 0 0 .9rem; display: flex; align-items: center; color: var(--teal-deep); }
.card .card-art svg { height: 100%; width: auto; }
.card h3 { margin: 0 0 .45rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card p { color: var(--ink-2); font-size: .97rem; }
.card .card-foot { margin-top: auto; padding-top: 1rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card .card-foot a { font-weight: 700; }
.card .std { font-size: .85rem; color: var(--ink-3); }

/* Placeholder photo block */
.photo-placeholder {
  display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 3;
  border: 2px dashed var(--ink-3);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink-2);
  font-weight: 700; font-size: .9rem;
  padding: 1rem;
}
.photo-placeholder.wide { aspect-ratio: 16 / 9; }
.photo-placeholder.portrait { aspect-ratio: 4 / 5; max-width: 20rem; }

/* ==== 9. Filters (games page) ======================================= */
.filters {
  display: grid;
  gap: 1rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.4rem;
}
.filter-group legend, .filter-group .legend {
  font-size: .9rem; font-weight: 700;
  color: var(--ink-2); margin-bottom: .5rem; padding: 0;
}
.filter-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font: inherit; font-size: .9rem; font-weight: 700;
  background: transparent; color: var(--ink);
  border: 2px solid var(--rule); border-radius: var(--radius-sm);
  padding: .3rem .8rem; cursor: pointer;
  transition: border-color 160ms;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--teal); color: var(--on-accent); border-color: var(--teal); }
/* The selected chip also gets a check mark, so it differs by more than color. */
.chip[aria-pressed="true"]::before { content: "\2713"; margin-right: .4em; }
/* A row of five chips: one line on a laptop; on a phone "All" spans the row and the other four sit two by two. */
.chips.five { flex-wrap: nowrap; }
.chips.five .chip { white-space: nowrap; }
.chip-legend { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; font-size: .9rem; color: var(--ink-2); }
.catalog [data-category][hidden], .catalog [data-grade][hidden] { display: none !important; }
@media (max-width: 600px) {
  .chips.five { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .chips.five .chip:first-child { grid-column: 1 / -1; }
  .chips.five .chip { padding: .55rem .4rem; }
  .chip-legend { flex-direction: column; }
}
.filter-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.results-count { font-size: .9rem; font-weight: 700; color: var(--ink-2); margin: 0; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--teal-deep); text-decoration: underline; cursor: pointer; }
.btn-link:hover { color: var(--ink); }
.empty-state { display: none; padding: 2rem; text-align: center; border: 2px dashed var(--rule); border-radius: var(--radius); color: var(--ink-2); }
.empty-state.is-visible { display: block; }

/* ==== 10. Stats, counters, charts =================================== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}
.stat { background: var(--paper-2); padding: 1.3rem 1.3rem 1.1rem; border-radius: var(--radius); }
.stat .num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 2rem + 1.6vw, 3.4rem); line-height: 1;
  color: var(--ink); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat .num .unit { font-size: .55em; font-weight: 700; color: var(--teal-deep); margin-left: .05em; }
.stat .label { color: var(--ink-2); font-size: .95rem; margin-top: .4rem; }
.stat .src { font-size: .85rem; color: var(--ink-3); margin-top: .6rem; }
.stat .src a { color: inherit; }
.stat.is-placeholder { border: 2px dashed var(--coral-deep); }
.stat.is-placeholder .num { color: var(--coral-deep); }

.chart {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin: 0;
}
.chart figcaption { font-size: .92rem; color: var(--ink-2); margin-top: .9rem; }
.chart figcaption a { color: inherit; }
.chart svg { width: 100%; height: auto; font-family: var(--font-text); }
.chart .bar-track { fill: var(--paper-3); }
.chart .bar { fill: var(--booklet-teal); }
.chart .bar-label { fill: var(--ink); font-size: 14px; font-weight: 700; }
.chart .bar-value { fill: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .axis-note { fill: var(--ink-3); font-size: 12px; }
.chart .ring-track { stroke: var(--paper-3); }
.chart .ring { stroke: var(--booklet-teal); }
.chart .ring-num { fill: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 44px; }
.chart .ring-sub { fill: var(--ink-2); font-size: 13px; }
.chart details { margin-top: .8rem; }
.chart summary { cursor: pointer; font-weight: 700; color: var(--teal-deep); }
.chart table { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .92rem; }
.chart th, .chart td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--rule); }
.chart th { font-size: .85rem; color: var(--ink-3); }
@media (prefers-color-scheme: dark) { .chart .bar { fill: var(--mint); } .chart .ring { stroke: var(--mint); } }

.source-list { font-size: .9rem; color: var(--ink-2); padding-left: 1.2rem; }
.source-list li { margin-bottom: .5rem; }

/* ==== 11. Accordion (FAQ) =========================================== */
.accordion { border-top: 2px solid var(--rule); }
.accordion details { border-bottom: 2px solid var(--rule); }
.accordion summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem .25rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.25;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none;
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%; border: 2px solid var(--teal-deep);
  background:
    linear-gradient(var(--teal-deep), var(--teal-deep)) center / 55% 2px no-repeat,
    linear-gradient(var(--teal-deep), var(--teal-deep)) center / 2px 55% no-repeat;
  transition: transform 260ms var(--ease);
}
.accordion details[open] summary::after { transform: rotate(135deg); }
.accordion summary:hover { color: var(--teal-deep); }
.accordion .answer { padding: 0 .25rem 1.4rem; color: var(--ink-2); max-width: var(--measure); }
.accordion .answer p:last-child { margin-bottom: 0; }

/* ==== 12. Forms ===================================================== */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; }
.field .hint { font-size: .88rem; color: var(--ink-3); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink-3);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
  width: 100%;
  transition: border-color 160ms;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-deep); box-shadow: 0 0 0 3px var(--teal-tint);
}
.field [aria-invalid="true"] { border-color: var(--coral-deep); }
.field .error { color: var(--coral-deep); font-weight: 700; font-size: .9rem; min-height: 1.2em; margin: 0; }
.field textarea { min-height: 9rem; resize: vertical; }
.form-status { padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 700; display: none; }
.form-status.is-visible { display: block; }
.form-status.ok { background: var(--teal-tint); color: var(--ink); }
.form-status.bad { background: var(--coral-tint); color: var(--coral-deep); }
.form-status a { color: inherit; }
/* Honeypot: hidden from people, visible to bots */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ==== 13. Callouts, quotes, lists =================================== */
.callout {
  position: relative;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  background: var(--marigold-tint);
  border-radius: var(--radius);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center;
}
.callout.teal { background: var(--teal-tint); }
.callout h2, .callout h3 { margin-bottom: .4rem; }
.callout p { color: var(--ink-2); }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; } }
/* Use "callout stack" when a callout sits inside a half-width column:
   the second item goes under the text instead of squeezing it. */
.callout.stack { grid-template-columns: 1fr; }
.callout.stack > .stat { justify-self: start; }

.quote {
  position: relative; margin: 0;
  padding: 1.4rem;
  background: var(--paper-2);
  border-radius: var(--radius);
  border-left: 6px solid var(--mint);
}
.quote blockquote { margin: 0 0 .9rem; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.35; font-weight: 700; }
.quote figcaption { font-size: .92rem; color: var(--ink-2); }
.quote figcaption strong { color: var(--ink); }
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.2rem;
}

/* Checkmarked points */
.checklist { list-style: none; padding: 0; display: grid; gap: .8rem; }
.checklist li { position: relative; padding-left: 2.4rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .05em;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--teal);
}
.checklist li::after {
  content: ""; position: absolute; left: .55rem; top: .35rem;
  width: .45rem; height: .8rem;
  border-right: 3px solid var(--on-accent); border-bottom: 3px solid var(--on-accent);
  transform: rotate(40deg);
}

/* Numbered steps (only for things that really are a sequence) */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1.4rem; }
.steps li { position: relative; padding-top: 1rem; border-top: 4px solid var(--ink); counter-increment: step; }
.steps li::before {
  content: counter(step); display: block;
  font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1;
  color: var(--teal-deep); margin-bottom: .4rem;
}
.steps h3, .steps h4 { margin-bottom: .25rem; }
.steps p { color: var(--ink-2); }
.steps.across { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.6rem; }
.promise { margin-top: 2rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); }

.feature-list { display: grid; gap: 1.1rem; padding: 0; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem; align-items: start; }
.feature-list svg { width: 2.4rem; height: 2.4rem; color: var(--teal-deep); }
.feature-list h4 { margin: 0 0 .2rem; }
.feature-list p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* Small label at the top of a section */
.period-label {
  display: block;
  font-size: .95rem; font-weight: 700;
  color: var(--teal-deep); margin-bottom: .8rem;
}
.period-label .dot { display: none; }

.creds { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }

/* ==== 14. Footer ==================================================== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2rem;
}
.footer-grid h2 { font-family: var(--font-text); font-size: .95rem; letter-spacing: 0; color: var(--ink-3); margin-bottom: .8rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--yellow); text-decoration: underline; }
.footer-grid p { color: var(--ink-2); font-size: .95rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
  font-size: .88rem; color: var(--ink-3);
}
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==== 15. Scroll reveals ============================================ */
/* Only hide-then-reveal when JavaScript is running (html.js). Without JS,
   everything is simply visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==== 16. Utilities ================================================= */
.muted { color: var(--ink-2); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.center { text-align: center; }
.placeholder-note {
  font-weight: 700; font-size: .9rem; color: var(--coral-deep);
  border-left: 4px solid var(--coral-deep); padding: .3rem .8rem; background: var(--coral-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 1rem; display: inline-block;
}
.icon-inline { width: 1em; height: 1em; vertical-align: -.12em; }

/* 404 page */
.lost { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: var(--space); }
.lost h1 { font-size: clamp(3rem, 10vw, 6rem); }

/* ==== 17. Reduced motion ============================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .tile:hover, .pathway:hover, .covers li .cover:hover { transform: none; }
}

/* ==== 18. Print ===================================================== */
@media print {
  .site-header, .site-footer, .nav-toggle, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}

/* ==== 19. Why Games Work page ======================================= */
/* Comparison table (home page and Why Games Work). A plain table with ruled rows.
   The right-hand column is "our games": it is shaded as one column AND set in bold,
   so it is not told apart by color alone. Screen readers get real row and column headings. */
.compare { width: 100%; border-collapse: collapse; font-size: 1.08rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule); }
.compare thead th, .compare thead td { border-bottom: 2px solid var(--ink); padding-block: .8rem; }
.compare thead th { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.compare tbody th { font-family: var(--font-display); font-weight: 700; width: 24%; padding-left: 0; }
.compare td:nth-child(2) { color: var(--ink-2); width: 38%; }
.compare th:last-child, .compare td:last-child { background: var(--teal-tint); color: var(--ink); }
.compare tbody td:last-child { font-weight: 700; }
.compare tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 760px) {
  /* On a phone each row becomes a short block: the question, then the two answers, each with its label. */
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tbody tr { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th { padding: 0 0 .6rem; border: 0; font-size: 1.15rem; width: auto; }
  .compare tbody td, .compare td:nth-child(2) { width: auto; padding: .2rem 0 .2rem .9rem; margin-bottom: .6rem; border: 0; border-left: 4px solid var(--rule); background: none; }
  .compare tbody td:last-child { border-left-color: var(--teal-deep); margin-bottom: 0; }
  .compare tbody td::before { content: attr(data-label); display: block; font-size: .85rem; font-weight: 700; color: var(--ink-3); }
}

/* Theory cards and research paper cards */
.theories, .papers { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.theory, .paper { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem; }
.section.tint .paper { background: var(--paper); }
.theory h3, .paper h3 { margin-bottom: .3rem; }
.theory .cite, .paper .cite, .paper .authors { font-size: .88rem; color: var(--ink-3); margin-bottom: .9rem; }
.paper .authors { margin-bottom: .2rem; }
.paper .authors strong { color: var(--ink); }
.theory h4 { margin: 0 0 .2rem; color: var(--teal-deep); }
.theory p, .paper p { color: var(--ink-2); }
.theory p + h4 { margin-top: 1rem; }
.paper .doi { font-size: .92rem; overflow-wrap: anywhere; }

/* Collapsible reference list */
.refs summary { cursor: pointer; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; padding: .6rem 0; }
.refs ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .8rem; font-size: .92rem; color: var(--ink-2); max-width: 60rem; }
.refs li { padding-left: 1.5rem; text-indent: -1.5rem; overflow-wrap: anywhere; }

/* ==== 20. Game page without video or screenshots ==================== */
/* The play box fills the row: pitch and button on the left, "Works on" on the right. */
.store.solo { grid-template-columns: 1fr; }
.store.solo .buy { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 2rem; align-items: start; }
.store.solo .buy > * { grid-column: 1; }
.store.solo .buy .btn-big { max-width: 22rem; }
.store.solo .buy .works { grid-column: 2; grid-row: 1 / span 6; border-top: 0; padding-top: 0; border-left: 1px solid var(--rule); padding-left: 2rem; }
@media (max-width: 760px) {
  .store.solo .buy { grid-template-columns: 1fr; }
  .store.solo .buy .works { grid-column: 1; grid-row: auto; border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1rem; }
}
/* A feature list that uses the full width, in columns */
.feature-list.cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.4rem 2.4rem; }

/* ==== Sign-up form on the Teacher Tools page ("Be the first to know") ==== */
.updates { margin-top: clamp(2rem, 5vw, 3rem); max-width: 60rem; scroll-margin-top: 5.5rem; }
.updates:focus { outline: none; }
.updates-intro { color: var(--ink-2); margin-bottom: 1.4rem; max-width: 46rem; }
.updates-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; max-width: 46rem; }
.optional { font-weight: 400; color: var(--ink-2); }
.pick { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .9rem; }
.pick > legend { font-weight: 700; padding: 0; margin-bottom: .2rem; }
.pick .error { color: var(--coral-deep); font-weight: 700; font-size: .95rem; margin: 0; }
.pick .error:empty { display: none; }
.pick-group { border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .8rem 1rem 1rem; margin: 0; min-width: 0; position: relative; }
.pick.has-error .pick-group { border-color: var(--coral-deep); }
.pick-group > legend { font-family: var(--font-display); font-weight: 700; padding: 0 .4rem; }
.pick-group > .btn-link { font-size: .92rem; min-height: 44px; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.2rem; }
/* Each checkbox row is at least 44px tall so it is easy to tap. */
.checkline { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .3rem 0; cursor: pointer; line-height: 1.3; }
.checkline input { flex: none; width: 1.3rem; height: 1.3rem; margin: 0; accent-color: var(--teal); cursor: pointer; }
.fineprint { font-size: .9rem; color: var(--ink-2); margin: 0; max-width: 46rem; }
.updates-thanks { padding: 1.4rem 1.6rem; border-radius: var(--radius); background: var(--teal-tint); max-width: 46rem; }
.updates-thanks h3 { margin: 0 0 .4rem; }
.updates-thanks p { margin: 0; }
.tile-body .btn-ghost { align-self: flex-start; min-height: 2.6rem; padding: .45rem 1.1rem; font-size: .98rem; }
.section-head .btn { margin-top: .4rem; }
@media (max-width: 900px) { .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .checks, .updates-top { grid-template-columns: 1fr; }
  .tile-body .btn-ghost { align-self: stretch; }
  .updates .btn-primary, .section-head .btn { width: 100%; }
}
.updates-top { align-items: start; }
.updates-top .field { align-content: start; }
.updates-top .field input, .updates-top .field select { min-height: 3.2rem; box-sizing: border-box; }
.checkline span { text-wrap: balance; }
.nowrap { white-space: nowrap; }
