/* Stepsies brand: electric purple, coral, teal. Poppins. */
:root {
  --p-50: #f5f3ff;
  --p-100: #ede9fe;
  --p-200: #ddd6fe;
  --p-300: #c4b5fd;
  --p-400: #a78bfa;
  --p-500: #8b5cf6;
  --p-600: #7c3aed;
  --p-700: #6d28d9;
  --p-900: #4c1d95;
  --s-100: #ffedd5;
  --s-500: #f97316;
  --s-600: #ea580c;
  --a-50: #f0fdfa;
  --a-100: #ccfbf1;
  --a-300: #5eead4;
  --a-500: #14b8a6;
  --a-600: #0d9488;
  --a-700: #0f766e;
  --ink: #1f1637;
  --body: #4b4563;
  --muted: #6b6580;
  --line: #e9e5f5;
  --bg: #fcfbff;
  --card: #fff;
  --ok: #4d7c0f;
  --ok-bg: #ecfccb;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(76 29 149 / 0.06), 0 8px 24px -12px rgb(76 29 149 / 0.18);
  --tone: var(--p-600);
  --tone-bg: var(--p-100);
}

.tone-purple { --tone: #7c3aed; --tone-bg: #ede9fe; --tone-ink: #7c3aed; }
.tone-orange { --tone: #ea580c; --tone-bg: #ffedd5; --tone-ink: #c2410c; }
.tone-teal { --tone: #0d9488; --tone-bg: #ccfbf1; --tone-ink: #0f766e; }
.tone-pink { --tone: #db2777; --tone-bg: #fce7f3; --tone-ink: #be185d; }
.tone-amber { --tone: #b45309; --tone-bg: #fef3c7; --tone-ink: #b45309; }
.tone-lime { --tone: #4d7c0f; --tone-bg: #ecfccb; --tone-ink: #4d7c0f; }
.tone-blue { --tone: #2563eb; --tone-bg: #dbeafe; --tone-ink: #2563eb; }

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

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

body {
  margin: 0;
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--p-600); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }
button { cursor: pointer; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--p-600); cursor: pointer; }
[hidden] { display: none !important; }

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

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: #fff;
  padding: 8px 12px;
}

.icon { flex: none; vertical-align: -0.2em; }
.mascot { flex: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
}
.site-nav > a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav > a:hover { color: var(--p-600); }
/* The account button keeps the button's white text: the link colours above would put dark text on purple. */
.site-nav > a.btn,
.site-nav > a.btn:hover { color: #fff; }
.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 40px;
  width: min(300px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}
.nav-search:focus-within { border-color: var(--p-400); }
.nav-search input,
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--ink);
}

/* Buttons and chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--p-600);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--p-700); }
.btn:active { transform: scale(0.98); }
.btn-soft { background: var(--p-100); color: var(--p-700); }
.btn-soft:hover { background: var(--p-200); }
.text-link { font-weight: 600; font-size: 0.95rem; }

.pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--s-100);
  color: #9a3412;
  font-size: 0.82rem;
  font-weight: 600;
}
a.pill { text-decoration: none; }
a.pill:hover { background: #fed7aa; }
/* The home page line: square corners. */
.home-pill .pill { border-radius: 0; }
/* The header button: both labels in the page, one shown (html[data-me], set in the head and by account.js). */
.account-in { display: none; }
html[data-me='in'] .account-in { display: inline-block; }
html[data-me='in'] .account-out { display: none; }
/* The My Dashboard menu: a details element, so it opens without JavaScript; account.js closes it on a click outside. */
.account-menu { position: relative; }
.account-menu summary { display: inline-flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; color: #fff; white-space: nowrap; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary .icon { transition: transform 0.15s; }
.account-menu[open] summary .icon { transform: rotate(180deg); }
.account-menu-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; min-width: 210px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.account-menu-list a, .account-menu-list button { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 0.92rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.account-menu-list a:hover, .account-menu-list button:hover { background: var(--p-50); color: var(--p-700); }
.account-menu-list form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.account-menu-list button:disabled { color: var(--muted); cursor: default; background: none; }
/* A label that changes after the page appears fades in, rather than jumping. */
@keyframes swap-in { from { opacity: 0; } }
.swap-in { animation: swap-in 0.2s ease-out; }

.chip {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--body);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--p-300); }
.chip[aria-pressed='true'],
.chip[aria-current] {
  background: var(--p-600);
  border-color: var(--p-600);
  color: #fff;
}
.filters {
  display: flex;
  gap: 8px;
  margin: 24px -20px;
  padding: 2px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

/* Pages with a browse column: the main column first in the HTML, the column beside it (home and grade pages) */
.side-layout {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  padding-top: 28px;
  padding-bottom: 72px;
}
.side-main { flex: 999 1 560px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.side-main > section > .section-head { margin-bottom: 20px; }
/* The column's gap spaces its sections; their own top margins would double it. */
.side-layout > .side-main > * { margin-top: 0; }
.side-main .page-hero { margin-bottom: 0; }
/* The home page for the two products (pages/home.html.erb, home.js): the hero with the headline, the search and the
   grades next to a picture of the Classroom Screen; then one lesson in three moments. Purple is the worksheets, teal
   is the screen. [data-returning] (a board in this browser) hides .home-first and shows the "Welcome back" bar. */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 28px 32px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(700px 320px at 0% 0%, #ede9fe 0%, transparent 70%), #fff;
}
.home-hero-main { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.home-hero h1 { font-size: clamp(1.8rem, 3.2vw, 2.3rem); margin: 0; text-wrap: balance; }
.home-hero h1 em { font-style: normal; color: var(--a-600); }
.home-hero .lead,
.home-total { margin: 0; }
.home-total { color: var(--muted); font-size: 0.9rem; }
.home-hero .hero-search { width: 100%; margin-top: 4px; }
.home-teach { display: grid; gap: 8px; width: 100%; }
.home-teach h2 { margin: 0; color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.home-teach div { display: flex; flex-wrap: wrap; gap: 6px; }
.home-teach a { min-width: 40px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--body); font-size: 0.88rem; font-weight: 600; text-align: center; text-decoration: none; }
.home-teach a:hover { border-color: var(--p-300); background: var(--p-50); color: var(--p-700); }
.home-free { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; color: var(--a-700); font-size: 0.85rem; font-weight: 500; }
.home-free li::before { content: '✓ '; font-weight: 700; }
.home-back { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; width: 100%; }
.home-back[hidden],
.home-pane[hidden] { display: none; }
.home-back p { margin: 0; color: var(--ink); font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
[data-returning] .home-first { display: none; }
[data-returning] .home-hero { grid-template-columns: minmax(0, 1fr); }
[data-returning] .home-flow { order: 1; }
[data-returning] .home-why,
[data-returning] .home-cta { order: 2; }
.btn-board { background: var(--a-600); color: #fff; }
.btn-board:hover { background: var(--a-700); color: #fff; }
.home-scene,
.home-flow-box { border: 1px solid var(--a-300); border-radius: var(--radius); background: radial-gradient(circle, #b6ece3 1px, transparent 1.4px) 0 0 / 18px 18px, var(--a-50); }
.home-scene { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
.home-scene .btn { white-space: normal; text-align: center; }
.home-scene-sheet { flex: none; width: 52px; transform: rotate(-4deg); }
.home-scene-sheet img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid #e3def3; box-shadow: 0 10px 26px -8px rgb(31 22 55 / 0.35); }
.home-scene-phone { display: none; margin: 0; font-size: 0.92rem; }
.home-eyebrow { margin: 0; color: var(--a-700); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.home-on-screen { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px dashed var(--a-300); border-radius: 12px; background: #fff; font-size: 0.88rem; }
.home-on-screen p { margin: 0; }
.home-on-screen strong { color: var(--ink); }
.home-tool { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.home-tool-name { margin: 0; color: var(--a-700); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.home-tool-row { display: flex; flex-wrap: wrap; gap: 6px; }
.home-tool button { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--body); font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.home-tool button:hover { border-color: var(--a-300); background: var(--a-50); }
.home-tool button.home-go { border-color: var(--a-600); background: var(--a-600); color: #fff; }
.home-tool button.home-go:hover { border-color: var(--a-700); background: var(--a-700); }
.home-clock { margin: 0; color: var(--ink); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.home-bar { height: 8px; border-radius: 999px; background: var(--a-100); overflow: hidden; }
.home-bar i { display: block; width: 100%; height: 100%; border-radius: 999px; background: var(--a-600); transition: width 0.2s linear; }
.home-flow-box { display: grid; gap: 16px; padding: 16px; }
.home-flow-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.home-flow-tabs button { flex: 1 1 auto; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--body); font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.home-flow-tabs button[aria-pressed='true'] { background: var(--a-600); color: #fff; }
.home-pane { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px 28px; align-items: start; }
.home-pane-text { display: grid; gap: 8px; padding: 4px; }
.home-pane-text h3 { margin: 0; font-size: 1.15rem; }
.home-pane-text p { margin: 0; }
.home-pane-text .home-pane-links { padding-top: 10px; border-top: 1px dashed var(--a-300); font-size: 0.9rem; font-weight: 500; }
.home-pane-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: start; min-width: 0; }
.home-routine { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: home-step; }
.home-routine li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-weight: 500; counter-increment: home-step; }
.home-routine li::before { content: counter(home-step); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--p-100); color: var(--p-700); font-size: 0.8rem; font-weight: 700; }
.home-routine li.done { color: var(--muted); text-decoration: line-through; }
.home-routine li.done::before { content: '✓'; background: var(--a-100); color: var(--a-700); }
.home-routine li.now { border-color: var(--a-600); background: var(--a-50); color: var(--ink); font-weight: 600; }
.home-pane-pair { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); }
.home-voice-now { margin: 0; min-height: 2.6em; color: #9a3412; font-weight: 600; }
.home-voices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.home-tool .home-voices button { display: grid; gap: 2px; padding: 8px 2px; border-radius: 10px; font-size: 0.7rem; line-height: 1.2; text-align: center; }
.home-voices button b { color: var(--ink); font-size: 1.15rem; }
.home-tool .home-voices button[aria-pressed='true'] { border-color: var(--s-500); background: var(--s-100); color: #9a3412; }
.home-picked { margin: 0; color: var(--p-600); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.home-names { margin: 0; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 1080px) { .home-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .home-hero { padding: 22px; }
  .home-pane { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) { .home-pane-pair { grid-template-columns: minmax(0, 1fr); } }
/* On a phone the teacher wants a worksheet: the screen is one short card, and the tools come after the worksheets. */
@media (max-width: 700px) {
  .home-scene { padding: 16px; }
  .home-scene .home-tool,
  .home-scene .home-on-screen { display: none; }
  .home-scene-phone { display: block; }
  .home-flow { order: 1; }
  .home-why,
  .home-cta { order: 2; }
}
.home-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.home-skill { display: grid; gap: 2px; padding: 14px 16px; text-decoration: none; }
.home-skill strong { color: var(--ink); font-weight: 600; }
.home-skill:hover { border-color: var(--p-300); }
.home-skill .meta { color: var(--muted); font-size: 0.82rem; }
.home-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.home-why h3 { margin: 0 0 6px; font-size: 1rem; }
.home-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 28px 32px; border-radius: var(--radius); background: linear-gradient(135deg, #ede9fe, #ffedd5); }
.home-cta > div { flex: 1 1 360px; }
.home-cta h2 { font-size: 1.4rem; margin: 0 0 4px; }
.home-cta p { margin: 0; font-size: 0.95rem; }

.side-col {
  flex: 1 1 260px;
  max-width: 100%;
  display: grid;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 0.92rem;
}
.side-section { display: grid; gap: 2px; }
.side-section h2 { margin: 0 0 6px; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.side-link,
.side-group summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; color: var(--body); text-decoration: none; }
.side-link:hover,
.side-group summary:hover { background: var(--p-50); color: var(--p-700); }
.side-group-link,
.side-group summary { font-weight: 600; }
.side-group summary { cursor: pointer; list-style: none; }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary > span:first-child::before { content: '›'; display: inline-block; width: 14px; color: var(--muted); transition: transform 0.15s; }
.side-group[open] summary > span:first-child::before { transform: rotate(90deg); }
.side-group-link > span:first-child { padding-left: 14px; }
.side-count { flex: none; color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.skill-link-grades { color: var(--muted); font-size: 0.78rem; font-weight: 400; white-space: nowrap; }
.side-group ul { margin: 0; padding: 2px 0 8px 34px; list-style: none; display: grid; gap: 2px; }
.side-group li a { display: block; padding: 3px 0; color: var(--body); text-decoration: none; }
.side-group li a:hover { color: var(--p-700); }
a.side-all { color: var(--p-700); font-weight: 500; }
.side-current { background: var(--p-100); color: var(--p-700); font-weight: 600; }
/* The home page's side column: grades in a grid, one subject open at a time (details name="side-subject"), curricula as chips by country. */
.home-side { gap: 0; }
.home-side .side-section + .side-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.home-side .side-section h2 { margin-bottom: 10px; color: var(--ink); font-size: 0.78rem; font-weight: 700; }
.side-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.side-grades a { padding: 7px 0; border: 1px solid var(--line); border-radius: 8px; color: var(--body); font-weight: 600; text-align: center; text-decoration: none; }
.side-grades a:first-child { grid-column: 1 / -1; }
.side-grades a:hover { border-color: var(--p-300); background: var(--p-50); color: var(--p-700); }
.side-subject + .side-subject { margin-top: 6px; }
.side-subject > summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-weight: 700; cursor: pointer; list-style: none; }
.side-subject > summary::-webkit-details-marker { display: none; }
.side-subject > summary::after { content: '›'; color: var(--muted); font-size: 1.1rem; line-height: 1; transition: transform 0.15s; }
.side-subject > summary:hover { background: var(--p-50); }
.side-subject[open] > summary { background: var(--p-50); color: var(--p-700); }
.side-subject[open] > summary::after { transform: rotate(90deg); }
.side-subject[open] > summary + * { margin-top: 4px; }
.home-side .side-group summary, .home-side .side-group-link { font-weight: 500; }
.side-place + .side-place { margin-top: 12px; }
.side-place h3 { margin: 0 0 6px; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.side-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.side-chips .chip { padding: 4px 10px; font-size: 0.8rem; }
.home-side .side-section > a.side-all { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; text-decoration: none; }

/* Skill hub page (src/views/hubs.tsx, HubPage) */
.grade-head .page-title { margin-top: 6px; }
.hub-grades { align-items: center; margin-top: 16px; color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.hub-h2 { font-size: 1.4rem; margin: 0 0 16px; }
.hub-h2 a { color: inherit; text-decoration: none; }
.hub-h2 a:hover { color: var(--p-600); }
.hub-sheets { display: grid; gap: 40px; scroll-margin-top: 16px; }
.hub-about > p { max-width: 75ch; }
.hub-about .hub-notes { margin-top: 20px; }
.hub-about h3 { font-size: 1.1rem; margin: 0 0 10px; }
.holiday-words { max-width: 75ch; padding: 14px 18px; border-radius: 12px; background: var(--p-50); line-height: 1.8; }
.hub-source { font-size: 0.9rem; color: var(--muted, #555); }
#levels, #tips, #curriculum, #about { scroll-margin-top: 16px; }

/* Grades page (src/views/navigation.tsx, GradesPage) */
.grades-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.grade-card { display: grid; gap: 14px; padding: 18px 20px; }
.grade-card-head { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.grade-card-head h2 { margin: 0; font-size: 1.1rem; color: var(--ink); }
.grade-card-head:hover h2 { color: var(--p-700); }
.grade-card-head .meta { color: var(--muted); font-size: 0.85rem; }
.grade-badge { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--p-100); color: var(--p-600); font-size: 1.6rem; font-weight: 700; }
.grade-card .chips .chip { font-size: 0.82rem; padding: 5px 12px; }
.grade-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.grade-card li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.grade-card li a { padding: 3px 0; color: var(--body); text-decoration: none; font-size: 0.93rem; }
.grade-card li a:hover { color: var(--p-700); }
.grade-card > .text-link { text-decoration: none; font-size: 0.9rem; }

/* Grade page (src/views/hubs.tsx, GradeLandingPage) */
.grade-head h1 { margin: 6px 0 10px; }
.grade-head .chips { margin: 16px 0 0; }
.grade-subject { font-size: 1.5rem; margin: 0 0 16px; display: flex; align-items: baseline; gap: 12px; }
.grade-subject span { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
/* Columns, not a grid: the groups differ a lot in length, and a grid row is as tall as its longest card. */
.grade-groups { columns: 3 240px; column-gap: 16px; }
.grade-group { padding: 16px 18px; margin-bottom: 16px; break-inside: avoid; scroll-margin-top: 16px; }
.grade-group h3 { margin: 0 0 8px; font-size: 1.02rem; }
.grade-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.grade-group li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.grade-group li a { padding: 3px 0; color: var(--body); text-decoration: none; font-size: 0.93rem; }
.grade-group li a:hover { color: var(--p-700); }

.lead {
  font-size: 1.08rem;
  color: var(--body);
  max-width: 60ch;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 6px 6px 6px 18px;
  max-width: 560px;
  border: 2px solid var(--p-200);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.hero-search:focus-within { border-color: var(--p-500); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 20px;
}

.path-card {
  position: relative;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -28px rgb(76 29 149 / 0.45);
}
.path-mascot {
  position: absolute;
  top: -58px;
  right: 14px;
}
.path-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-right: 96px;
}
.path-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--p-50);
  color: var(--p-700);
  font-size: 0.8rem;
  font-weight: 600;
}
.path-steps li:last-child { background: var(--p-600); color: #fff; }
.path-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.93rem;
  text-decoration: none;
}
.path-list a span:nth-child(2) { flex: 1; }
.path-list a > .icon { color: var(--p-300); }
.path-list a:hover { background: var(--p-50); }
.path-list li + li { border-top: 1px solid var(--line); }

.type-icon,
.subject-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--tone-bg);
  color: var(--tone);
}
.subject-icon { width: 48px; height: 48px; border-radius: 14px; }
.path-list .type-icon,
.side .type-icon { width: 32px; height: 32px; border-radius: 10px; }

/* Sections */
.section { padding: 64px 0; }
.section-tint { background: #f7f5fe; }
.section-head { margin-bottom: 28px; }
.section-head p { margin-top: 6px; color: var(--muted); }

.page { padding-top: 22px; padding-bottom: 72px; }
/* The pages are wider than a comfortable line of text: running text keeps its own measure. */
.page p, .page li { max-width: 80ch; }
.page > h1 + .lead { margin: 8px 0 28px; }

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
a.card:hover {
  transform: translateY(-2px);
  border-color: var(--tone);
  box-shadow: var(--shadow);
}
.card p { font-size: 0.92rem; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.grade-tile {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--tone-bg);
  color: var(--tone);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.grade-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.grade-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; }
.grade-more span { font-weight: 600; margin-right: 4px; }
.grade-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.grade-num { font-size: 3rem; font-weight: 700; line-height: 1; }
.grade-sub { font-size: 0.82rem; font-weight: 500; opacity: 0.85; margin-top: 6px; }

.subject-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 40px;
}
.type-chip,
.planned-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.type-chip:hover { border-color: var(--p-400); }
.type-chip strong,
.planned-list strong,
.side strong { display: block; font-size: 0.93rem; font-weight: 600; color: var(--ink); }
.type-chip small,
.planned-list small,
.side small { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* Browse pages */
.crumbs { margin-bottom: 18px; font-size: 0.85rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: '›'; margin: 0 8px; color: var(--p-300); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--p-600); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

.page-title {
  display: flex;
  /* The icon sits beside the title, not halfway down a long introduction. */
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.page-title .lead { margin-top: 4px; }
.strand {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  /* Small text: the tones too light for 4.5:1 on the page set a darker --tone-ink. */
  color: var(--tone-ink, var(--tone));
}
.topic-card { border-left: 5px solid var(--tone); }
.status {
  align-self: flex-start;
  margin-top: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f1eff8;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}
.status-ready { background: var(--ok-bg); color: var(--ok); }

.resource-card .type-tag,
.resource-head .type-tag {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--p-600);
}

.grade-block { margin-top: 44px; }
.grade-block > h2 { font-size: 1.3rem; margin-bottom: 16px; }
.grade-block > h2 a { color: inherit; text-decoration: none; }
.grade-block > h2 a:hover { color: var(--p-600); }


.planned-note {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--p-50);
}
.planned-note h2 { font-size: 1.25rem; margin-bottom: 6px; }
.planned-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.planned-list li { opacity: 0.8; border-style: dashed; }

.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding: 48px 0;
}

/* Resource page */
.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}
.resource-head { margin-bottom: 22px; }
.resource-head h1 { margin: 4px 0 8px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 18px;
}
.toolbar .meta { margin: 0; padding: 0; }

.side {
  position: sticky;
  top: 84px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.side h2 { font-size: 1rem; margin-bottom: 8px; }
.side li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 10px;
  text-decoration: none;
}
.side li a:hover { background: var(--p-50); }
.side .text-link { display: inline-block; margin-top: 12px; font-size: 0.88rem; }

.sheet {
  padding: clamp(20px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  color: #2b2640;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 3px solid var(--p-500);
}
.sheet-head strong { display: block; font-size: 1.3rem; color: var(--ink); line-height: 1.25; }
.sheet-context { font-size: 0.78rem; font-weight: 600; color: var(--p-600); }
.name-date { display: grid; gap: 10px; flex: none; font-size: 0.85rem; }
.name-date span {
  display: block;
  width: 190px;
  border-bottom: 1px solid #9ca3af;
  padding-bottom: 2px;
}
.sheet-foot {
  margin-top: 36px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.sheet h2 { font-size: 1.2rem; margin: 30px 0 10px; }
.sheet > h2:first-of-type,
.sheet > .qblock:first-of-type > h2 { margin-top: 0; }
.sheet p { margin: 0 0 12px; }
.sheet > ul { margin: 0 0 14px; padding-left: 22px; list-style: disc; }
.sheet > ul li { margin-bottom: 6px; }
.sheet > ul li::marker { color: var(--p-500); }

.table-scroll { overflow-x: auto; margin: 0 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--p-50); color: var(--ink); font-weight: 600; }
tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }

.callout {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-left: 5px solid var(--s-500);
  border-radius: 0 12px 12px 0;
  background: #fff7ed;
}
.callout strong { color: #9a3412; }
.callout p { margin: 2px 0 0; }

.checklist li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.box { flex: none; width: 18px; height: 18px; margin-top: 4px; border: 2px solid var(--p-400); border-radius: 5px; }

.figure { margin: 8px 0 22px; text-align: center; }
.cell-diagram { width: 100%; max-width: 380px; height: auto; font-family: inherit; }
.figure figcaption { font-size: 0.85rem; color: var(--muted); }

.instructions { font-style: italic; color: var(--body); }
.bank {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px dashed var(--p-300);
  border-radius: 12px;
}
.bank strong { margin-right: 4px; color: var(--ink); font-size: 0.85rem; }
.bank span { padding: 1px 10px; border-radius: 999px; background: var(--p-50); font-size: 0.9rem; }

.questions { list-style: decimal; padding-left: 26px; }
.questions > li { margin-bottom: 18px; padding-left: 4px; break-inside: avoid; }
.questions > li::marker { font-weight: 600; color: var(--ink); }
.questions.compact { columns: 2; column-gap: 32px; }
.questions.compact > li { margin-bottom: 10px; }
.qtext { margin-bottom: 8px !important; color: var(--ink); }
.marks { margin-left: 8px; font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.lines span { display: block; height: 30px; border-bottom: 1px solid #b6b3c4; }
.blank {
  display: inline-block;
  min-width: 46px;
  margin-right: 10px;
  border-bottom: 1px solid #6b7280;
  text-align: center;
}
.answer { color: var(--p-700); font-weight: 600; }
p.answer { padding: 8px 12px; border-radius: 10px; background: var(--p-50); font-weight: 500; }
.blank.answer { border-color: var(--p-500); }

.match { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px 32px; }
.match ol { padding-left: 26px; }
.match-terms { list-style: decimal; }
.match-defs { list-style: upper-alpha; }
.match li { margin-bottom: 10px; }
.match li::marker { font-weight: 600; color: var(--ink); }

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.letter {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1.5px solid #9ca3af;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}
[data-quiz] .option:hover { border-color: var(--p-300); }
.option:has(input:checked) { border-color: var(--p-500); background: var(--p-50); }
.option:has(input:checked) .letter { background: var(--p-600); border-color: var(--p-600); color: #fff; }
.option:has(input:focus-visible) { outline: 3px solid var(--p-400); outline-offset: 2px; }
.option:has(input:disabled) { cursor: default; }
.options .option.correct { border-color: #65a30d; background: var(--ok-bg); }
.options .option.correct .letter { background: #65a30d; border-color: #65a30d; color: #fff; }
.options .option.wrong { border-color: #ef4444; background: var(--bad-bg); }
.options .option.wrong .letter { background: #ef4444; border-color: #ef4444; color: #fff; }
.why { margin: 8px 0 0 !important; font-size: 0.9rem; color: var(--body); }

.quiz-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.quiz-score { margin: 0 !important; font-weight: 600; color: var(--ink); }

.key-group + .key-group { margin-top: 36px; padding-top: 28px; border-top: 2px dashed var(--line); }
.sheet .key-title { font-size: 1.35rem; margin: 0 0 18px; }
.key-title a { color: var(--p-700); text-decoration: none; }
.key-group .qblock h2 { font-size: 1.05rem; margin-top: 22px; }

/* Footer */
.site-footer {
  padding: 48px 0 28px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-grid p { margin-top: 10px; max-width: 32ch; color: var(--muted); }
.site-footer h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.site-footer li { margin-bottom: 6px; }
.site-footer li a { color: var(--body); text-decoration: none; }
.site-footer li a:hover { color: var(--p-600); }
.footer-grades { columns: 2; }
.footer-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.footer-note nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-note a { color: var(--muted); }
.footer-note a:hover { color: var(--p-600); }

/* About, Contact, Privacy, Terms */
.prose > * { max-width: 68ch; }
.prose h2 { margin: 32px 0 10px; font-size: 1.25rem; }
.prose p, .prose li { line-height: 1.65; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 1.2em; display: grid; gap: 8px; list-style: disc; }
.prose .updated { color: var(--muted); font-size: 0.9rem; }
.prose .contact-email { font-size: 1.2rem; font-weight: 600; }
.prose .operator-line { margin-top: 40px; color: var(--muted); font-size: 0.85rem; }
.operator { display: inline-block; height: 1.4em; width: auto; vertical-align: -0.38em; }

/* Tablet and phone */
@media (max-width: 900px) {
  .resource-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .section { padding: 48px 0; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 10px 0; font-size: 1rem; }
  .site-nav > a.btn { margin-top: 8px; padding: 12px 20px; }
  .account-menu { margin-top: 8px; }
  .account-menu summary { padding: 12px 20px; }
  .account-menu-list { position: static; margin-top: 8px; box-shadow: none; }
  .nav-search { margin: 8px 0 0; width: 100%; height: 46px; }
}

@media (max-width: 640px) {
  .grade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-num { font-size: 2.4rem; }
  .hero-search .btn { padding: 10px 16px; }
  .options, .match { grid-template-columns: minmax(0, 1fr); }
  .questions.compact { columns: 1; }
  .sheet-head { flex-direction: column; align-items: stretch; }
  .name-date { grid-template-columns: 1fr 1fr; }
  .name-date span { width: auto; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .planned-note { flex-direction: column; text-align: center; }
  .page-title { align-items: flex-start; }
  tbody th { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Worksheet catalogue */
.btn-small { padding: 8px 16px; font-size: 0.88rem; }
.btn-big { padding: 14px 26px; font-size: 1.05rem; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.ws-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: inherit; text-decoration: none; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.ws-card:hover { transform: translateY(-2px); border-color: var(--p-400); box-shadow: var(--shadow); }
.ws-thumb { display: grid; place-items: center; aspect-ratio: 1 / 1.08; padding: 14px; background: var(--p-50); }
.ws-thumb img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; border: 1px solid #e3def3; box-shadow: 0 3px 10px -4px rgb(31 22 55 / 0.35); }
.ws-card-body { display: grid; gap: 4px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.ws-card-body strong { color: var(--ink); font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.ws-card-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.ws-stars { color: var(--s-500); letter-spacing: 1px; }
.ws-count { color: var(--p-700); font-weight: 600; }
.ws-stack { position: relative; display: block; aspect-ratio: 1 / 1.08; background: var(--p-100); overflow: hidden; }
.ws-stack .ws-thumb { position: absolute; inset: 0; aspect-ratio: auto; padding: 28px; background: none; }
.ws-stack .ws-thumb:nth-child(1) { z-index: 3; }
.ws-stack .ws-thumb:nth-child(2) { z-index: 2; transform: rotate(5deg) translate(9px, -2px); }
.ws-stack .ws-thumb:nth-child(3) { z-index: 1; transform: rotate(-5deg) translate(-9px, -2px); }

.shelf-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 20px; margin-bottom: 16px; }
.shelf-head h2 { font-size: 1.3rem; }
.section-head.shelf-head h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.shelf-head .text-link { text-decoration: none; white-space: nowrap; }

/* Every select draws its own chevron: the native arrow sits hard against the right edge. */
select {
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236d28d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 18px center;
}
.activity-head { margin: 40px 0 14px; }
.activity-head h2 { font-size: 1.2rem; }
.activity-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-group + .skill-group { margin-top: 24px; }
.skill-group h3 { margin: 0 0 12px; font-size: 1.1rem; }
.facet-count { color: var(--muted); font-size: 0.8rem; font-weight: 500; }

.browse-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 24px; }
.browse-head .lead { margin-top: 6px; }
.browse-search { margin-top: 0; flex: 1 1 320px; max-width: 440px; }
.browse { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.browse-single { grid-template-columns: minmax(0, 1fr); }
.facets { position: sticky; top: 84px; }
.facets summary { display: none; }
.facet + .facet { margin-top: 22px; }
.facet h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 6px; }
.facet a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; margin: 0 -10px; border-radius: 8px; color: var(--ink); font-size: 0.92rem; text-decoration: none; }
.facet a:hover { background: var(--p-50); }
.facet a[aria-current] { background: var(--p-100); color: var(--p-700); font-weight: 600; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-bottom: 14px; font-size: 0.92rem; }
.results-bar strong { color: var(--ink); }
.sorts { display: flex; gap: 4px; align-items: center; color: var(--muted); }
.sorts span { margin-right: 4px; }
.sorts a { padding: 3px 10px; border-radius: 999px; color: var(--body); text-decoration: none; }
.sorts a[aria-current] { background: var(--p-100); color: var(--p-700); font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 32px; }
.pager a { min-width: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 500; text-align: center; text-decoration: none; }
.pager a:hover { border-color: var(--p-400); }
.pager a[aria-current] { background: var(--p-600); border-color: var(--p-600); color: #fff; }

.ws-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: start; }
.ws-preview { display: grid; gap: 20px; padding: 24px; border-radius: var(--radius); background: var(--p-50); }
.ws-preview figure { margin: 0 auto; width: 100%; max-width: 520px; }
.ws-preview figure.landscape { max-width: none; }
.ws-preview svg, .ws-preview img { display: block; width: 100%; height: auto; border: 1px solid #e3def3; box-shadow: 0 10px 30px -14px rgb(31 22 55 / 0.4); }
.ws-preview figcaption { margin-top: 8px; text-align: center; color: var(--muted); font-size: 0.82rem; }
.ws-info { position: sticky; top: 84px; display: grid; gap: 14px; }
.ws-quick { display: none; }
.ws-download { display: grid; gap: 8px; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ws-download p { font-size: 0.85rem; color: var(--muted); text-align: center; }
.ws-versions h2, .ws-facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
.ws-versions p { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ws-facts { display: grid; gap: 0; margin: 0; }
.ws-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ws-facts dd { margin: 0; color: var(--ink); font-size: 0.93rem; }
/* Teaching handouts (src/views/handouts.tsx), and the link to them on a worksheet's page */
.ws-teach { display: grid; gap: 8px; }
.ws-teach h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
.ws-teach-link { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid #99e6dc; border-radius: var(--radius); background: #f0fdfa; color: inherit; text-decoration: none; }
.ws-teach-link:hover { border-color: #0d9488; }
.ws-teach-link strong { color: #0f766e; }
.ws-teach-link span { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.handout-shelf-note { margin: -6px 0 16px; color: var(--muted); }
.handout-group + .handout-group { margin-top: 32px; }
.handout-group h2 { font-size: 1.2rem; margin: 0 0 14px; }

.series-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; }
.series-nav a { min-width: 34px; padding: 6px 0; border-radius: 8px; background: var(--p-50); color: var(--p-700); font-weight: 600; text-align: center; text-decoration: none; }
.series-nav a[aria-current] { background: var(--p-600); color: #fff; }

.auth { display: grid; justify-items: center; gap: 12px; max-width: 460px; text-align: center; }
.auth-options { display: grid; gap: 10px; width: 100%; margin: 8px 0; }
.auth-options form { display: grid; }
.auth-email { gap: 10px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
.auth-email:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.auth-options label { display: grid; gap: 4px; font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.auth-options input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.auth-options input[aria-invalid] { border-color: var(--bad); }
.auth-error { margin: 0; color: var(--bad); font-size: 0.88rem; }
.auth-small { color: var(--muted); font-size: 0.88rem; }
.auth-why { margin: 0; padding: 10px 16px; border-radius: 12px; background: var(--p-50); color: var(--p-900); font-weight: 500; }
.auth h2 { margin-top: 28px; font-size: 1.1rem; }
.auth-code input[name=code] { font-size: 1.4rem; font-weight: 600; letter-spacing: 0.35em; text-align: center; }
.auth-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.auth-inline { display: inline; }
.auth-inline .text-link, .welcome-skip { padding: 4px 0; border: 0; background: none; color: var(--p-700); font: inherit; font-weight: 600; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }
.auth-wide { max-width: 560px; }
/* The onboarding questions (onboardings/_form): check boxes and radio buttons drawn as chips. */
.welcome { display: grid; gap: 16px; width: 100%; text-align: left; }
.welcome-q { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.welcome-q legend { padding: 0; margin-bottom: 8px; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.welcome-q small { font-weight: 400; color: var(--muted); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chip { position: relative; display: inline-flex; cursor: pointer; }
.ob-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ob-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 0.9rem; }
.ob-grades { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.ob-chip-grade, .ob-chip-grade span { width: 100%; }
.ob-chip-grade span { justify-content: center; padding: 6px 0; }
@media (max-width: 480px) { .ob-grades { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ob-chip input:checked + span { border-color: var(--p-600); background: var(--p-100); color: var(--p-700); font-weight: 500; }
.ob-chip input:checked + span::before { content: "✓"; font-size: 0.75rem; }
.ob-chip-one input:checked + span::before { content: "●"; font-size: 0.55rem; }
.ob-chip input:focus-visible + span { outline: 2px solid var(--p-500); outline-offset: 2px; }
.welcome-other { display: grid; gap: 4px; font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.welcome-other input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.welcome-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--ink); line-height: 1.4; }
.welcome-consent input { margin-top: 3px; flex: none; }
.welcome-skip { order: -1; }
.welcome-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* The note on an unverified account's pages: confirm the email to keep printing (SignUp). */
.verify-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 10px 14px; border-radius: 12px; background: #fef3c7; color: var(--ink); font-size: 0.9rem; }
.verify-note a { color: var(--p-700); font-weight: 600; }
@media print { .verify-note { display: none !important; } }
/* The sign-in dialog on worksheet and handout pages (shared/_sign_in_dialog.html.erb). It sits near the top and scrolls
   inside itself, so on a phone the email field stays above the keyboard. */
.sign-in-dialog { position: fixed; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: 16px auto auto; padding: 0; overflow-y: auto; border: 0; border-radius: var(--radius); background: var(--card); color: var(--body); box-shadow: var(--shadow); }
.sign-in-dialog::backdrop { background: rgb(31 22 55 / 0.5); }
.sign-in-dialog .auth { max-width: none; padding: 28px 22px 20px; }
.sign-in-dialog .auth h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; color: var(--ink); }
.sign-in-dialog .auth h2:focus { outline: none; }
.sign-in-dialog .auth p { margin: 0; }
.sign-in-dialog .lead { font-size: 1rem; }
.sign-in-dialog .auth-options input { font-size: 1rem; }
.sign-in-for { padding: 6px 14px; border-radius: 12px; background: var(--p-50); color: var(--p-900); font-weight: 600; font-size: 0.93rem; }
.sign-in-gains { display: grid; gap: 8px; width: 100%; margin: 4px 0; padding: 0; list-style: none; text-align: left; }
.sign-in-gains li { display: flex; gap: 10px; align-items: baseline; font-weight: 500; color: var(--ink); }
.sign-in-gains li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--p-100); color: var(--p-700); font-weight: 700; font-size: 0.8rem; line-height: 22px; text-align: center; }
.auth-code-notice { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--p-50); color: var(--p-900); font-size: 0.88rem; font-weight: 500; }
.sign-in-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.sign-in-close:hover { background: var(--p-50); color: var(--ink); }
@media (min-height: 760px) and (min-width: 600px) { .sign-in-dialog { margin-top: 8vh; } }
.btn-danger { background: #fff; color: var(--bad); border: 1px solid var(--bad); }
.btn-danger:hover { background: #fef2f2; }

@media (max-width: 900px) {
  .browse { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .facets { position: static; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
  .facets summary { display: block; font-weight: 600; color: var(--ink); cursor: pointer; }
  .facets details[open] summary { margin-bottom: 12px; }
  .ws-detail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ws-info { position: static; }
  .ws-quick { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: -8px; }
  .ws-quick p { margin: 0; font-weight: 700; color: var(--ink); line-height: 1.25; }
  .ws-quick .btn { flex: none; }
}
@media (max-width: 640px) {
  .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ws-preview { padding: 12px; }
}

/* What students learn, in our words (no codes: src/data/related.ts) */
.section-title { font-size: 1.3rem; margin: 40px 0 16px; }
.section-note { color: var(--muted); margin: -8px 0 16px; }
.soon-note { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 14px 18px; border-radius: 14px; background: var(--p-50); color: var(--p-700); font-weight: 500; }
.expectations { display: grid; gap: 18px; }
.overall { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; scroll-margin-top: 84px; }
.overall h2 { font-size: 1.15rem; }
.overall-text { margin-top: 8px; color: var(--ink); }
.specific { margin-top: 14px; }
.specific { padding-left: 1.2em; }
.specific li { padding: 6px 0; }
.overall-summary { display: grid; gap: 22px; }
.overall-summary h3 a { color: var(--ink); text-decoration: none; }
.overall-summary h3 a:hover { color: var(--p-600); }
.overall-summary li { margin-top: 8px; padding-left: 0; }
.official-link { font-size: 0.9rem; }
.muted { color: var(--muted); }
.curriculum-source { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; max-width: 80ch; }
.ws-related { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 4px; }
.ws-skill { margin-top: 8px; font-size: 0.9rem; }
.ws-related-note { margin-top: 8px; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

/* Worksheet engine lab */
.lab { padding-block: 32px 64px; }
.lab-lede { max-width: 60ch; color: var(--body); }
.lab-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lab-card { display: grid; gap: 6px; padding: 18px; text-decoration: none; color: var(--body); }
.lab-card strong { color: var(--ink); font-size: 1.05rem; }
.lab-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.lab-bar h1 { margin: 0; font-size: 1.5rem; flex: 1 1 240px; }
.lab-actions { display: flex; gap: 10px; }
.lab-letters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.lab-letters a { min-width: 34px; padding: 6px 8px; text-align: center; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--p-700); background: var(--p-50); }
.lab-letters a[aria-current] { background: var(--p-600); color: #fff; }
.lab-errors { padding: 16px 20px; border-radius: var(--radius); background: var(--bad-bg); color: var(--bad); margin-bottom: 20px; }
.lab-errors ul { margin: 8px 0 0; padding-left: 20px; }
.ws-page { max-width: 760px; margin: 0 auto 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ws-page.landscape { max-width: 980px; }
.ws-page svg { display: block; width: 100%; height: auto; }
.lab-spec { max-width: 980px; margin: 0 auto; }
.lab-spec summary { cursor: pointer; font-weight: 600; color: var(--p-700); }
.lab-spec pre { overflow-x: auto; padding: 16px; border-radius: 12px; background: var(--p-50); font-size: 0.8rem; }

.review { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: #fff; }
.review th, .review td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.review th { background: var(--p-50); }
.review td:first-child { white-space: nowrap; }
.review .bad { margin-top: 6px; color: var(--bad); font-weight: 600; }

/* Admin (src/admin): internal pages in their own frame with a sidebar. Growth pages first: numbers in cards with their
   change, a funnel, bar charts and the sentences of "What to look at". */
.admin-body { background: #f6f5fa; color: var(--body); }
.admin-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: var(--ink); color: #d9d4ea; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #fff; font-weight: 700; text-decoration: none; }
.admin-brand small { margin-left: 4px; padding: 2px 8px; border-radius: 6px; background: rgb(255 255 255 / 0.12); color: var(--p-200); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #d9d4ea; font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.admin-nav a:hover { background: rgb(255 255 255 / 0.07); color: #fff; }
.admin-nav a[aria-current] { background: var(--p-600); color: #fff; font-weight: 600; }
.admin-nav .icon { flex: none; opacity: 0.85; }
.admin-side-foot { margin-top: auto; display: grid; gap: 6px; padding: 14px 8px 0; border-top: 1px solid rgb(255 255 255 / 0.1); font-size: 0.8rem; }
.admin-mcp { display: flex; align-items: center; gap: 8px; color: #a59fbd; }
.admin-mcp i { width: 7px; height: 7px; border-radius: 50%; background: #6b6580; }
.admin-mcp.is-on { color: var(--p-200); }
.admin-mcp.is-on i { background: #4ade80; }
.admin-me { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a59fbd; }
.admin-side-foot a { color: var(--p-200); text-decoration: none; }
.admin-side-foot a:hover { color: #fff; }
.admin-main { min-width: 0; padding: 0 36px 72px; }
.admin-top { position: sticky; top: 0; z-index: 2; margin: 0 -36px 24px; padding: 18px 36px; background: rgb(246 245 250 / 0.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.admin-top h1 { margin: 0; font-size: 1.4rem; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.admin { max-width: 1240px; }
.admin h2 { margin: 36px 0 12px; font-size: 1.05rem; letter-spacing: -0.005em; }
.admin h2 + .admin-muted { margin-top: -6px; }
.admin-main .lab { padding-block: 24px 0; }
.admin-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-bottom: 20px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-tabs a { padding: 6px 14px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: 0.86rem; color: var(--muted); }
.admin-tabs a:hover { color: var(--p-700); }
.admin-tabs a[aria-current] { background: var(--p-600); color: #fff; }
@media (max-width: 860px) {
  .admin-app { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; }
  .admin-nav { flex-direction: row; flex-wrap: nowrap; order: 3; width: 100%; overflow-x: auto; }
  .admin-nav a { flex: none; padding: 7px 10px; }
  .admin-side-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .admin-me { display: none; }
  .admin-main { padding: 0 16px 48px; }
  .admin-top { position: static; margin: 0 -16px 20px; padding: 14px 16px; }
}
.admin-stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.admin-stat { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgb(31 22 55 / 0.04); }
.admin-stat span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.admin-stat strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--ink); font-size: 1.7rem; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.admin-stat small { color: var(--muted); font-size: 0.78rem; }
.admin-delta { padding: 2px 7px; border-radius: 999px; background: #efedf5; color: var(--muted); font-size: 0.72rem; font-style: normal; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.admin-delta.is-up { background: var(--ok-bg); color: var(--ok); }
.admin-delta.is-down { background: var(--bad-bg); color: var(--bad); }
.admin-cols { display: grid; gap: 0 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); align-items: start; }
.admin-card { margin-top: 24px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgb(31 22 55 / 0.04); }
.admin-card h2 { margin: 0 0 10px; }
.admin-card .review { border: 0; border-radius: 0; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.admin-head .admin-tabs { margin-bottom: 0; }
.admin-head-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.admin-card > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.admin-card > header h2, .admin-card > header .admin-muted { margin: 0; }
.admin-hero { margin-top: 0; padding: 24px 26px; }
.admin-hero > p { margin: 16px 0 0; }
.admin-funnel { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0; padding: 0; list-style: none; }
.admin-funnel a { display: grid; gap: 4px; align-content: start; height: 100%; box-sizing: border-box; padding: 16px 18px; border-radius: 12px; background: var(--p-50); color: var(--ink); text-decoration: none; }
.admin-funnel a:hover { background: var(--p-100); }
.admin-funnel span { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.admin-funnel strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.admin-funnel small { color: var(--muted); font-size: 0.8rem; }
.admin-funnel .is-loss a { background: var(--ink); color: #fff; }
.admin-funnel .is-loss a:hover { background: #2c2149; }
.admin-funnel .is-loss span, .admin-funnel .is-loss small { color: var(--p-200); }
.admin-switch { display: flex; gap: 4px; }
.admin-switch a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 0.86rem; font-weight: 600; text-decoration: none; }
.admin-switch a:hover { color: var(--p-700); }
.admin-switch a[aria-current] { background: var(--p-100); color: var(--p-900); }
.admin-insights { margin: 0; padding: 0; list-style: none; }
.admin-insights li { border-top: 1px solid var(--line); }
.admin-insights li:first-child { border-top: 0; }
.admin-insights li > a, .admin-insights li > div { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 2px 10px; padding: 12px 0; color: var(--body); font-size: 0.88rem; text-decoration: none; }
.admin-insights li > a::before, .admin-insights li > div::before { content: ""; grid-row: 1 / 3; align-self: start; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--p-400); }
.admin-insights li.is-good > ::before { background: #65a30d; border-radius: 2px; }
.admin-insights li.is-bad > ::before { background: var(--bad); }
.admin-insights strong { color: var(--ink); font-size: 0.95rem; }
.admin-insights a:hover strong { color: var(--p-700); }
.admin-insights span { grid-column: 2; }
.admin-more { border-top: 1px solid var(--line); }
.admin-more summary { padding: 12px 0 0; color: var(--p-700); font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.admin-more[open] summary { padding-bottom: 4px; }
.admin-chart { margin: 0; }
.admin-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.admin-line svg { display: block; width: 100%; height: 200px; overflow: visible; }
.admin-line-grid { stroke: #f1eef9; stroke-width: 1; vector-effect: non-scaling-stroke; }
.admin-line-area { fill: var(--p-50); }
.admin-line-now { fill: none; stroke: var(--p-600); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.admin-line-before { fill: none; stroke: #a39dbb; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.admin-line-hit { fill: transparent; }
.admin-line-hit:hover { fill: rgb(124 58 237 / 0.06); }
.admin-line-axis { display: flex; flex-direction: column; justify-content: space-between; height: 200px; color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; text-align: right; }
.admin-chart figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding-right: 28px; color: var(--muted); font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.admin-chart-legend { display: flex; gap: 16px; margin: 10px 0 0; color: var(--muted); font-size: 0.76rem; }
.admin-chart-legend span::before { content: ""; display: inline-block; width: 16px; height: 0; margin-right: 6px; border-top: 3px solid var(--p-600); border-radius: 2px; vertical-align: 3px; }
.admin-chart-legend .is-before::before { border-top: 2px dashed #a39dbb; }
.admin-board { margin-top: 0; padding: 0; overflow: hidden; }
.admin-board-chart { padding: 18px 22px 16px; }
.admin-board .admin-board-title { margin: 0 0 12px; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.admin-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-bottom: 1px solid var(--line); }
.admin-tile { display: grid; gap: 2px; align-content: start; padding: 16px 18px 14px; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.admin-tile:hover { background: #faf9fe; }
.admin-tile[aria-current] { background: var(--p-50); box-shadow: inset 0 -3px 0 var(--p-600); }
.admin-tile span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.admin-tile strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.admin-tile small { color: var(--muted); font-size: 0.76rem; }
.admin-funnel-bar { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--p-100); }
.admin-funnel-bar b { display: block; height: 6px; min-width: 2px; border-radius: 3px; background: var(--p-500); }
.admin-funnel .is-loss .admin-funnel-bar { background: #3b2f5c; }
.admin-funnel .is-loss .admin-funnel-bar b { background: var(--p-300); }
.admin-funnel small.admin-funnel-all { font-size: 0.74rem; }
.admin-bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.admin-bars li > a, .admin-bars li > div { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 8px; background: linear-gradient(90deg, var(--p-100) var(--bar), #faf9fe var(--bar)); color: var(--ink); font-size: 0.88rem; text-decoration: none; }
.admin-bars li > a:hover { box-shadow: inset 0 0 0 1px var(--p-200); }
.admin-bars-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-bars small { color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.admin-bars strong { font-variant-numeric: tabular-nums; }
.admin-card > header .text-link { font-size: 0.86rem; font-weight: 600; }
.admin .review { border: 1px solid var(--line); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.admin .review th, .admin .review td { border: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
.admin .review tr:last-child > td, .admin .review tbody tr:last-child > th { border-bottom: 0; }
.admin .review thead th { background: #faf9fd; color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.admin .review tbody tr:hover > td { background: #fbfaff; }
.admin .review td:first-child { white-space: normal; overflow-wrap: anywhere; }
.admin .review td small { color: var(--muted); }
.admin .review a { color: var(--p-700); font-weight: 600; text-decoration: none; }
.admin .review a:hover { text-decoration: underline; }
.admin-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-bar-cell { width: 34%; vertical-align: middle !important; }
.admin-bar { display: block; height: 8px; min-width: 2px; max-width: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--p-600), var(--p-400)); }
.admin-heat { background: color-mix(in srgb, var(--p-400) calc(var(--heat, 0) * 55%), #fff) !important; }
.admin-scroll { overflow-x: auto; }
.admin-matrix td.admin-gap { background: var(--p-50); }
.admin-muted { color: var(--muted); font-size: 0.88rem; }
.admin-search { display: flex; gap: 8px; max-width: 480px; margin-bottom: 8px; }
.admin-search input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
/* The users list: filters beside the search, a pill for a verified address, a dot for how recent the last activity is. */
.admin-users-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; }
.admin-users-bar .admin-search, .admin-users-bar .admin-tabs { margin-bottom: 0; }
.admin-users-bar .admin-search { flex: 1 1 260px; }
.admin-users-bar + .admin-muted { margin-top: 14px; }
.admin-users th a { color: inherit !important; text-decoration: underline dotted !important; }
.admin-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.admin-pill.is-good { background: #dcfce7; color: #15803d; }
.admin-pill.is-warn { background: #fef3c7; color: #b45309; }
.admin-activity { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.admin-activity b { color: var(--ink); font-weight: 600; }
.admin-activity em { margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: #f1eff6; color: var(--muted); font-size: 0.7rem; font-style: normal; font-weight: 600; }
.admin-activity small { display: block; }
.admin-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #9a94ad; }
.admin-dot.is-day { background: #15803d; box-shadow: 0 0 0 3px #dcfce7; }
.admin-dot.is-week { background: var(--p-600); }
.admin-dot.is-month { background: #b45309; }
.admin-plan { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.admin-plan label { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); }
.admin-plan input { min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.admin-plan input:hover { border-color: var(--p-300); }
.admin-plan input:focus-visible { outline: 3px solid var(--p-400); outline-offset: 1px; border-color: var(--p-500); }
.admin-table th[scope="row"] { width: 260px; background: #faf9fd; color: var(--muted); font-weight: 500; text-align: left; }
.admin-pager { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.admin-danger { color: var(--bad); }
.btn.admin-danger:not(.btn-soft) { background: var(--bad); color: #fff; }
.admin-notice { padding: 10px 14px; border-radius: 10px; background: var(--p-50); color: var(--p-700); font-weight: 600; }
.admin-notice.is-warn { background: var(--s-100); color: #9a3412; font-weight: 500; font-size: 0.9rem; }
.admin-list { margin: 8px 0 0; padding-left: 18px; max-height: 320px; overflow-y: auto; }

/* Print: only the sheet, on letter paper */
/* Dashboard (/account) */
/* /account: a sticky menu of the sections on the left, the sections on the right; on a phone the menu is a row of chips. */
.dash-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.dash-side { position: sticky; top: 88px; display: grid; gap: 14px; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.dash-side-who { margin: 0 10px; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.dash-menu { display: grid; gap: 2px; }
.dash-menu a, .dash-menu button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 0.92rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.dash-menu a:hover, .dash-menu button:hover { background: var(--p-50); color: var(--p-700); }
.dash-menu a[aria-current] { background: var(--p-50); color: var(--p-700); font-weight: 600; }
.dash-menu-end { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dash-menu form { margin: 0; }
.dash-main { min-width: 0; }
.dash-main [id] { scroll-margin-top: 90px; }
@media (max-width: 900px) {
  .dash-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .dash-side { position: static; padding: 0; border: 0; background: none; }
  .dash-side-who { display: none; }
  .dash-menu { display: flex; gap: 8px; margin: 0 -20px; padding: 0 20px 4px; overflow-x: auto; scrollbar-width: none; }
  .dash-menu-end { display: contents; }
  .dash-menu a, .dash-menu button { width: auto; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; white-space: nowrap; }
}
.dash { display: grid; gap: 28px; max-width: 980px; }
.dash-head h1 { margin: 0 0 4px; }
.dash-section { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.dash-section h2 { margin: 0; font-size: 1.2rem; }
.dash-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dash-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.dash-title { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.3; }
.dash-title:hover { color: var(--p-700); }
.dash-thumb { display: grid; place-items: center; width: 108px; aspect-ratio: 1 / 1.1; padding: 8px; border-radius: 12px; background: var(--p-50); }
.dash-thumb.landscape { width: 140px; aspect-ratio: 1.3 / 1; }
.dash-thumb img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; border: 1px solid #e3def3; box-shadow: 0 3px 10px -4px rgb(31 22 55 / 0.35); }
.dash-last { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.dash-last .dash-thumb { width: 140px; }
.dash-last-body { display: grid; gap: 6px; }
.dash-last-body .dash-title { font-size: 1.15rem; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.dash-empty { justify-items: center; text-align: center; }
.dash-empty p { margin: 0; max-width: 460px; color: var(--muted); }
.dash-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.dash-filters label { display: grid; gap: 4px; font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.dash-filters select { min-width: 160px; padding: 8px 44px 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.dash-list { display: grid; margin: 0; padding: 0; list-style: none; }
.dash-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.dash-row:first-child { border-top: 0; }
.dash-row .dash-thumb { width: 64px; padding: 5px; border-radius: 8px; }
.dash-row .dash-thumb.landscape { width: 84px; }
.dash-row-body { display: grid; gap: 3px; }
.dash-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dash-tag { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--p-50); color: var(--p-700); font-size: 0.78rem; font-weight: 600; }
.dash-pager { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 0.92rem; color: var(--muted); }
.dash-pager a { font-weight: 600; }
.dash-paper fieldset { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.dash-paper legend { margin-bottom: 4px; font-weight: 600; color: var(--ink); }
.dash-radio { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.dash-radio input { width: 18px; height: 18px; margin: 0; flex: none; }
.dash-grades { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.dash-account { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.dash-sign-ins { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.dash-sign-ins li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
@media (max-width: 640px) {
  .dash-section { padding: 16px; }
  .dash-last { grid-template-columns: 1fr; justify-items: start; }
  .dash-row { grid-template-columns: auto minmax(0, 1fr); }
  .dash-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .dash-filters select { min-width: 0; width: 100%; }
  .dash-filters label { flex: 1 1 140px; }
}

.print-gate { display: none; }

@media print {
  @page { size: letter; margin: 0.6in; }
  /* Pages that are open to read but not to print (src/auth/access.ts): the content gives way to a note. */
  .print-locked .sheet,
  .print-locked .ws-preview {
    display: none !important;
  }
  .print-locked .print-gate { display: block; margin: 2in 0; font-size: 16pt; text-align: center; }
  body { background: #fff; font-size: 11.5pt; }
  .site-header, .site-footer, .crumbs, .no-print, .skip { display: none !important; }
  .wrap, .page { max-width: none; padding: 0; }
  .resource-layout { display: block; }
  .sheet { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .sheet-head, thead th, .option.correct, p.answer, .bank span, .callout {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option { border: 0; padding: 2px 0; }
  .lines span { height: 26px; }
  .qblock h2, .sheet h2 { break-after: avoid; }
  .figure, table tr, .callout { break-inside: avoid; }
  .key-title a { color: inherit; }
  .lab, .admin-main { padding: 0; }
  .admin-app { display: block; }
  .admin-side, .admin-top { display: none !important; }
  .lab-bar, .lab-letters, .lab-spec, .lab-errors { display: none !important; }
  .ws-page { max-width: none; margin: 0; border: 0; box-shadow: none; break-after: page; }
}

/* Skill hubs */
.page-title .lead + .lead { margin-top: 10px; }
.hub-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.hub-notes h2 { font-size: 1.3rem; margin: 0 0 12px; }
.hub-levels, .hub-tips { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.55; }
.hub-path p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.hub-path span { font-weight: 600; margin-right: 4px; }
@media (max-width: 720px) { .hub-notes { grid-template-columns: 1fr; gap: 24px; } }
.ws-sheet-text { margin-top: 40px; max-width: 80ch; }
.ws-sheet-text h2 { font-size: 1.3rem; margin: 0 0 12px; }
.ws-sheet-part + .ws-sheet-part { margin-top: 20px; }
.ws-sheet-part h3 { font-size: 1.05rem; margin: 0 0 8px; }
.ws-sheet-part p { margin: 0 0 10px; }
.ws-sheet-part blockquote { margin: 0 0 12px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.hub-card { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.hub-card h3 { margin: 0; }
.hub-card p { margin: 0; color: var(--muted); line-height: 1.5; }

/* Texas pages */
.topic-skills { margin: 0 0 16px; padding: 0; list-style: none; display: grid; max-width: 80ch; }
.topic-skills li { padding: 12px 0; border-top: 1px solid var(--line); }
.topic-skills li:first-child { border-top: 0; padding-top: 0; }
.topic-skills .skill-name { display: block; font-size: 1.02rem; color: var(--ink); }
.topic-skills .skill-name a { color: inherit; text-decoration: none; }
.topic-skills .skill-name a:hover { color: var(--p-700); }
.topic-skills .skill-plain { display: block; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
/* A topic's standard codes under its heading: "TEKS 3.4A 3.4E", "3.OA.1", "AC9M3N01". */
.code-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 0.8rem; }
.code-chips-label { font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.code-chip { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.code-chips-more[open] { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.code-chips-more > summary { cursor: pointer; color: var(--p-600); font-weight: 600; list-style: none; }
.code-chips-more > summary::-webkit-details-marker { display: none; }
.code-chips-more[open] > summary { display: none; }

/* Statistics pages (src/views/statistics.tsx): a hero with tiles, a dot chart, a table shaded by grade, and cards. */
.statistics.prose > .stat-hero, .statistics.prose > .stat-cards, .statistics.prose > .table-scroll { max-width: none; }
.stat-hero { margin: 4px 0 28px; padding: 32px; border-radius: var(--radius); background: linear-gradient(135deg, var(--p-50), #fff7ed); border: 1px solid var(--line); }
.stat-hero h1 { max-width: 24ch; }
.stat-hero .lead { margin: 12px 0 0; max-width: 70ch; }
.stat-kicker { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--p-600); color: #fff; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }
.prose ul.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.stat-tiles li { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); line-height: 1.35; }
.stat-tiles strong { color: var(--p-700); font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat-tiles span { color: var(--muted); font-size: 0.9rem; }
.stat-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.stat-glance-scroll, .stat-heat-scroll { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stat-glance, .stat-heat { margin: 0; }
.stat-glance caption, .stat-heat caption { padding: 12px 16px; caption-side: top; text-align: left; color: var(--muted); font-size: 0.88rem; }
.stat-glance th, .stat-glance td { border-width: 1px 0 0; }
.stat-glance thead th { text-align: center; }
.stat-glance thead th:first-child, .stat-glance tbody th { text-align: left; }
.stat-glance tbody th a { color: var(--ink); text-decoration: none; }
.stat-glance tbody th a:hover { color: var(--p-700); }
.stat-glance td { width: 9%; min-width: 48px; height: 52px; padding: 4px; text-align: center; vertical-align: middle; }
.stat-glance .dot { display: inline-grid; place-items: center; width: calc(18px + var(--n) * 1.6px); height: calc(18px + var(--n) * 1.6px); border-radius: 50%; background: var(--p-200); color: var(--p-900); font-size: 0.78rem; font-weight: 700; }
.stat-glance .dot.top { background: var(--p-600); color: #fff; }
.stat-heat th, .stat-heat td { border-color: #fff; border-width: 2px; }
.stat-heat thead th { background: #fff; font-size: 0.82rem; vertical-align: bottom; }
.stat-heat tbody th { background: #fff; position: sticky; left: 0; z-index: 1; }
.stat-heat td { text-align: center; font-weight: 600; white-space: nowrap; color: var(--ink); }
.stat-heat td.none { background: #fafafa; color: #a8a3b8; font-weight: 400; }
.g0 { background: #f5f3ff; } .g1 { background: #ede9fe; } .g2 { background: #ddd6fe; } .g3 { background: #c4b5fd; } .g4 { background: #a78bfa; }
.g5 { background: #7c3aed; color: #fff !important; } .g6 { background: #6d28d9; color: #fff !important; } .g7 { background: #5b21b6; color: #fff !important; } .g8 { background: #4c1d95; color: #fff !important; }
.stat-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 10px; color: var(--muted); font-size: 0.82rem; }
.stat-key span[class] { display: inline-grid; place-items: center; width: 26px; height: 22px; border-radius: 5px; color: var(--ink); font-weight: 600; }
.stat-key span:first-child { margin-right: 4px; } .stat-key span:last-child { margin-left: 4px; }
.stat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 8px 0 12px; }
.stat-card { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); scroll-margin-top: 90px; }
.prose .stat-card h3 { margin: 0 0 8px; scroll-margin-top: 90px; }
.stat-card p, .stat-card li { max-width: none; }
.stat-card-grade { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: var(--s-100); color: #9a3412; font-size: 0.78rem; font-weight: 600; }
.prose ul.stat-by-grade { margin: 12px 0 0; padding: 0; list-style: none; gap: 6px; }
.stat-by-grade li { display: flex; gap: 10px; align-items: baseline; font-size: 0.92rem; }
.stat-grade { flex: none; display: inline-grid; place-items: center; min-width: 28px; height: 24px; border-radius: 6px; color: var(--ink); font-size: 0.8rem; font-weight: 700; }
.stat-card-link { margin-top: 12px; font-weight: 600; }
.prose ul.stat-facts { gap: 6px; font-size: 0.92rem; }
.stat-facts li::marker { color: var(--p-500); }
.stat-facts li.none { color: var(--muted); }
.stat-facts li.none::marker { color: #c9c4d6; }
.prose ul.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.stat-chips .chip { display: inline-block; white-space: normal; }
@media (max-width: 900px) {
  .stat-hero { padding: 22px 18px; }
  .prose ul.stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Curriculum changes (statistics/curriculum_changes): a finder in the hero, a timeline of school years, change cards
   with a subject colour and a grade bar, and a card per region. Subject colours pass 4.5:1 on white as text. */
.changes-page .s-math { --sc: #2563eb; --sc-bg: #dbeafe; }
.changes-page .s-ela { --sc: #be185d; --sc-bg: #fce7f3; }
.changes-page .s-science { --sc: #0f766e; --sc-bg: #ccfbf1; }
.changes-page .s-social-studies { --sc: #b45309; --sc-bg: #fef3c7; }
.changes-page .s-all { --sc: #6d28d9; --sc-bg: #ede9fe; }
.changes-page h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.changes-page .cc-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; margin: 4px 0 24px; padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(circle at 0 0, var(--p-100), transparent 55%), linear-gradient(135deg, var(--p-50), #fff7ed); }
.changes-page .cc-hero h1 { max-width: 18ch; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.changes-page .cc-hero .lead { margin: 14px 0 0; max-width: 46ch; font-size: 1.02rem; }
.changes-page ul.stat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; }
.changes-page .stat-tiles li { padding: 12px 14px; }
.changes-page .stat-tiles strong { font-size: 1.5rem; }
.changes-page .stat-tiles span { font-size: 0.82rem; }
.changes-page .cc-finder { display: grid; gap: 16px; padding: 24px; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgb(76 29 149 / 0.06), 0 18px 40px -18px rgb(76 29 149 / 0.35); }
.changes-page .cc-finder h2 { font-size: 1.25rem; }
.changes-page .cc-selects { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
.changes-page .cc-field { display: grid; gap: 6px; min-width: 0; }
.changes-page .cc-field label, .changes-page .cc-chips legend { color: var(--ink); font-size: 0.82rem; font-weight: 600; }
.changes-page .cc-field select, .changes-page .cc-field input { width: 100%; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background-color: #fff; color: var(--ink); font: inherit; }
.changes-page .cc-field select { padding-right: 40px; background-position: right 14px center; }
.changes-page .cc-field select:hover, .changes-page .cc-field input:hover { border-color: var(--p-300); }
.changes-page .cc-field select:focus-visible, .changes-page .cc-field input:focus-visible { outline: 3px solid var(--p-400); outline-offset: 1px; border-color: var(--p-500); }
.changes-page .cc-where { margin: -6px 0 0; color: var(--muted); font-size: 0.85rem; }
.changes-page .cc-where button { padding: 0; border: 0; background: none; color: var(--p-600); font: inherit; font-weight: 600; text-decoration: underline; }
.changes-page .cc-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.changes-page .cc-chips legend { margin-bottom: 8px; padding: 0; }
.changes-page .cc-chip { position: relative; display: inline-flex; }
.changes-page .cc-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.changes-page .cc-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--body); font-size: 0.86rem; font-weight: 500; line-height: 1.3; }
.changes-page .cc-chip[class*='s-'] span::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--sc); }
.changes-page .cc-chip:hover span { border-color: var(--p-300); }
.changes-page .cc-chip input:checked + span { border-color: var(--sc, var(--p-600)); background: var(--sc, var(--p-600)); color: #fff; }
.changes-page .cc-chip input:checked + span::before { background: #fff; }
.changes-page .cc-chip input:focus-visible + span { outline: 3px solid var(--p-400); outline-offset: 2px; }
.changes-page .cc-finder-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.changes-page .cc-count { color: var(--ink); font-weight: 600; }
.changes-page .cc-clear { font-size: 0.9rem; font-weight: 600; }
.changes-page.js .cc-submit { display: none; }
.changes-page .callout { max-width: none; }
.changes-page .cc-summary-slot:empty { display: none; }
.changes-page .cc-summary-slot { margin: 0 0 24px; }
.changes-page .cc-summary-slot .cc-region-card { border: 2px solid var(--p-300); background: var(--p-50); }
.changes-page .cc-summary-slot .cc-region-card h3 { font-size: 1.3rem; }
.changes-page .cc-summary-slot .cc-region-only { display: none; }
.changes-page .cc-time { margin: 0 0 36px; padding: 22px 24px 18px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.changes-page .cc-time-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.changes-page .cc-key { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 0.8rem; }
.changes-page .cc-key li { display: inline-flex; align-items: center; gap: 6px; }
.changes-page .cc-key li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--sc); }
.changes-page .cc-timeline { position: relative; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 12px; }
.changes-page .cc-timeline > ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); min-width: min-content; }
.changes-page .cc-year { display: flex; flex-direction: column; gap: 10px; padding: 0 8px 4px; border-left: 1px dashed var(--line); }
.changes-page .cc-year:first-child { border-left: 0; }
.changes-page .cc-year-label { padding: 6px 0 8px; border-bottom: 3px solid var(--line); color: var(--muted); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.changes-page .cc-year-label em { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--s-500); color: #fff; font-size: 0.7rem; font-style: normal; }
.changes-page .cc-year.is-now { border-radius: 12px; background: var(--p-50); border-left-color: transparent; }
.changes-page .cc-year.is-now + .cc-year { border-left-color: transparent; }
.changes-page .cc-year.is-now .cc-year-label { border-bottom-color: var(--s-500); color: var(--ink); }
.changes-page .cc-year ul { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.changes-page .cc-dot { position: relative; display: block; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 1px var(--sc); transition: transform 0.15s, opacity 0.15s; }
.changes-page .cc-dot:hover, .changes-page .cc-dot:focus-visible { transform: scale(1.3); }
.changes-page .cc-dot.is-dim { opacity: 0.18; }
.changes-page .cc-undated { margin-top: 12px; color: var(--muted); font-size: 0.85rem; }
.changes-page .cc-section { margin: 0 0 36px; scroll-margin-top: 90px; }
.changes-page .cc-section > h2 { margin: 0 0 16px; }
.changes-page .cc-empty { color: var(--muted); }
.changes-page .cc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.changes-page .cc-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 20px 18px 26px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); scroll-margin-top: 90px; overflow: hidden; }
.changes-page .cc-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--sc); }
.changes-page .cc-card:target { outline: 3px solid var(--sc); outline-offset: 2px; }
.changes-page .cc-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.changes-page .cc-subject { color: var(--sc); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.changes-page .cc-badge { padding: 3px 10px; border-radius: 999px; background: var(--p-100); color: var(--p-700); font-size: 0.75rem; font-weight: 600; }
.changes-page .cc-badge.is-now { background: var(--ok-bg); color: #3f6212; }
.changes-page .cc-badge.is-draft { background: #fef3c7; color: #92400e; }
.changes-page .cc-badge.is-withdrawn { background: var(--bad-bg); color: var(--bad); }
.changes-page .cc-badge.is-none { background: #f1f0f5; color: var(--muted); }
.changes-page .cc-card p { max-width: none; }
.changes-page .cc-when { color: var(--ink); font-size: 1.7rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.changes-page .cc-region { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 1.05rem; }
.changes-page .cc-country { color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.changes-page .cc-grades { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; }
.changes-page .cc-grades li { display: grid; place-items: center; height: 24px; border-radius: 5px; background: #f3f1f8; color: #8a849c; font-size: 0.68rem; font-weight: 600; }
.changes-page .cc-grades li.on { background: var(--sc); color: #fff; }
.changes-page .cc-grades-label { margin-top: 4px; color: var(--muted); font-size: 0.8rem; }
.changes-page .cc-summary { color: var(--ink); font-size: 0.95rem; line-height: 1.55; }
.changes-page .cc-more summary { width: max-content; color: var(--p-600); font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.changes-page .cc-more p { margin-top: 6px; font-size: 0.9rem; }
.changes-page .cc-source { margin-top: auto; color: var(--muted); font-size: 0.8rem; }
.changes-page .cc-source a { font-weight: 600; }
.changes-page .cc-ws a { display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--sc-bg); color: var(--ink); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.changes-page .cc-ws a:hover { text-decoration: underline; }
.changes-page .cc-none { margin: 0 0 36px; padding: 18px 20px; border-radius: 14px; background: var(--p-50); color: var(--ink); }
.changes-page .cc-regions { margin: 8px 0 36px; }
.changes-page .cc-regions > h2 { margin: 0 0 16px; }
.changes-page .cc-region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.changes-page .cc-region-card { display: grid; gap: 8px; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.changes-page .cc-region-card p { max-width: none; }
.changes-page .cc-region-counts { color: var(--body); font-size: 0.88rem; }
.changes-page .cc-region-counts strong { color: var(--p-700); font-size: 1.05rem; }
.changes-page .cc-region-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.88rem; font-weight: 600; }
.changes-page .cc-region-ws summary { color: var(--muted); font-size: 0.85rem; cursor: pointer; }
.changes-page .cc-region-ws ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.changes-page .cc-region-ws .chip { display: inline-block; white-space: normal; font-size: 0.8rem; padding: 5px 11px; }
.changes-page .cc-method { margin-top: 12px; }
.changes-page .cc-method h2 { font-size: 1.25rem; }
@media (max-width: 900px) {
  .changes-page .cc-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 24px 20px; }
  /* The finder before the tiles on a narrow screen. */
  .changes-page .cc-hero-text { display: contents; }
  .changes-page .cc-hero .stat-kicker { justify-self: start; margin: 0; }
  .changes-page .cc-hero h1, .changes-page .cc-hero .lead { margin: 0; }
  .changes-page ul.stat-tiles { order: 2; margin: 0; }
}
@media (max-width: 600px) {
  .changes-page.wrap { padding: 0 16px; }
  .changes-page .cc-hero { margin: 0 0 20px; padding: 20px 16px; border-radius: 20px; }
  .changes-page .cc-finder { padding: 18px 16px; }
  .changes-page .cc-selects { grid-template-columns: minmax(0, 1fr); }
  .changes-page .cc-time { padding: 18px 16px 14px; }
  .changes-page .cc-card { padding: 18px 16px 16px 22px; }
  .changes-page .cc-when { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .changes-page .cc-dot:hover, .changes-page .cc-dot:focus-visible { transform: none; }
}

/* Homeschooling guides (src/views/homeschool.tsx). */
.prose h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.prose ol.steps { padding-left: 1.4em; display: grid; gap: 10px; list-style: decimal; }
.prose ol.steps li { line-height: 1.65; padding-left: 4px; }
.prose ol.steps li::marker { color: var(--p-500); font-weight: 700; }
.homeschool .table-scroll { max-width: 68ch; }
.homeschool tbody th { white-space: normal; width: 34%; }
.homeschool-grades { display: flex !important; flex-wrap: wrap; gap: 8px 18px !important; list-style: none !important; padding-left: 0 !important; }
.homeschool-states { list-style: none !important; padding-left: 0 !important; gap: 16px !important; margin: 0 0 24px; }
.homeschool-states li { display: grid; gap: 4px; }
.homeschool-states span { color: var(--muted); }

/* Pricing (src/views/pricing.tsx) and the dashboard's plan (src/views/plan.tsx). */
.pricing-special { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; background: var(--p-100); color: var(--p-900); }
.plan-alt s { font-weight: 400; opacity: 0.7; }
.pricing-limit { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; background: var(--s-100); color: #7c2d12; }
.ticks { flex: 1; margin: 4px 0 8px; padding: 0; list-style: none; }
.ticks li { position: relative; margin: 0 0 9px; padding-left: 28px; color: var(--body); }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--p-100); color: var(--p-700); font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; }
.plan-buttons { display: grid; gap: 8px; }
.plan-note { margin: 0; color: var(--muted); font-size: 0.85rem; }
.org-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.org-form label { display: grid; gap: 6px; font-weight: 500; color: var(--ink); }
.org-form input, .org-form textarea, .dash-pages input:not([type='checkbox']) { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.org-form .org-wide, .org-form .auth-error { grid-column: 1 / -1; }
.org-form button { justify-self: start; }
.org-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pricing-sent { margin: 0; color: var(--ok); font-weight: 600; }
.dash-plan p { margin: 0; }
.dash-plan .btn { justify-self: start; }
.dash-pages { display: grid; gap: 12px; max-width: 520px; margin-top: 8px; }
.dash-pages h3 { margin: 0; font-size: 1rem; }
.dash-pages label:not(.dash-radio) { display: grid; gap: 6px; }
.dash-pages button { justify-self: start; }
.ws-sheet-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--p-50); color: var(--p-900); font-size: 0.92rem; }

/* Home page: one card for each skill group, with its biggest skills. */
.group-card { display: grid; align-content: start; gap: 6px; }
.group-card h3 { margin: 0; font-size: 1.05rem; }
.group-card h3 a { color: var(--ink); text-decoration: none; }
.group-card h3 a:hover { color: var(--p-600); }
.group-card .meta { color: var(--muted); font-size: 0.85rem; }
.group-card ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.group-card li a { color: var(--body); text-decoration: none; font-size: 0.95rem; }
.group-card li a:hover { color: var(--p-600); }

/* Skills page: the groups to jump to. */
.grade-block[id] { scroll-margin-top: 90px; }

/* Browse sidebar: the smaller values of a long facet, behind "Show more". */
.facets .facet-more summary { display: block; margin-top: 4px; padding: 6px 0; color: var(--p-600); font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.facet-more[open] summary { margin-bottom: 4px; }

/* Curriculum skill maps (src/views/curriculum-map.tsx) */
.child-learns p { max-width: 80ch; line-height: 1.65; margin: 0; }
.skill-sheets { display: block; margin-top: 4px; color: var(--muted); font-size: 0.88rem; }
.topic-skills li { scroll-margin-top: 90px; }
.topic-skills li:target { background: var(--p-50); border-radius: 6px; outline: 6px solid var(--p-50); }
.grade-map-note { margin: 0 0 16px; color: var(--muted); max-width: 80ch; }
.grade-map-topics { margin: 0; columns: 3 240px; column-gap: 16px; }
.grade-map-topic { padding: 16px 18px; margin-bottom: 16px; break-inside: avoid; }
.grade-map-topic dt { font-weight: 600; margin-bottom: 8px; }
.grade-map-topic dt a { color: var(--ink); text-decoration: none; }
.grade-map-topic dt a:hover { color: var(--p-700); }
.grade-map-topic dd { margin: 0; }
.grade-map-skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.grade-map-skills li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 0.93rem; }
.grade-map-skills a { padding: 3px 0; color: var(--body); text-decoration: none; }
.grade-map-skills a:hover { color: var(--p-700); }

/* Reviewers (src/views/editorial.tsx) */
.reviewed-by { margin: 12px 0 0; font-size: 0.88rem; color: var(--muted); }

/* /become-a-reviewer: checkbox groups in the application form, drawn as chips (.chip) that fill when checked. */
.org-form fieldset { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.org-form legend { width: 100%; padding: 0; margin-bottom: 6px; font-weight: 500; color: var(--ink); }
.org-form label.check { position: relative; display: inline-flex; padding: 7px 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--body); font-size: 0.88rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.org-form label.check:hover { border-color: var(--p-300); }
.org-form label.check input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.org-form label.check:has(input:checked) { background: var(--p-600); border-color: var(--p-600); color: #fff; }
.org-form label.check:has(input:focus-visible) { outline: 3px solid var(--p-400); outline-offset: 2px; }
.form-note { margin-top: 28px; }
/* /careers: the open roles. */
.prose ul.roles { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 14px; }
.prose ul.roles li { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.prose .roles h2 { margin: 0 0 6px; font-size: 1.15rem; }
.prose .roles p { margin: 0; }

/* /classroom-timer: a red disk that gets smaller as the time runs out (--part, from 1 to 0), and big digits. Full screen fills the board. */
.timer { display: grid; justify-items: center; gap: 18px; margin: 8px 0 40px; padding: 28px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.timer-dial { width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--ink); background: conic-gradient(#e11d48 calc(var(--part, 1) * 360deg), #fff 0); }
.timer-digits { font-size: clamp(3rem, 12vw, 5.5rem); font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.timer.is-done .timer-digits { color: #e11d48; animation: timer-flash 1s steps(2) 3; }
@keyframes timer-flash { 50% { opacity: 0.2; } }
.timer-main { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.timer-start { min-width: 140px; font-size: 1.1rem; }
.timer-options { display: grid; justify-items: center; gap: 12px; }
.timer-options .chips { justify-content: center; }
.timer-options .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.timer-custom { display: flex; align-items: center; gap: 6px; }
.timer-custom input { width: 74px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: center; }
.timer[data-current-mode='stopwatch'] .timer-dial { background: conic-gradient(var(--p-500) calc(var(--part, 0) * 360deg), #fff 0); }
.timer:fullscreen { align-content: center; border: 0; border-radius: 0; box-shadow: none; }
.timer:fullscreen .timer-dial { width: min(62vh, 70vw); }
.timer:fullscreen .timer-digits { font-size: min(18vh, 16vw); }
.timer:fullscreen .timer-options { display: none; }
.timer-notes { margin-top: 8px; }
.timer-notes ul + p { margin-top: 12px; }
.timer-alerts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; font-size: 0.88rem; }
.timer-alerts > label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.timer-alerts select { padding: 6px 30px 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background-color: #fff; }
.timer-repeat input { width: 18px; height: 18px; accent-color: var(--p-600); }
.timer-warn-note { margin: -6px 0 0; padding: 4px 14px; border-radius: 999px; background: #fef3c7; color: #92400e; font-weight: 700; }
.timer-warn-note[hidden] { display: none; }
.timer.is-warn .timer-digits, .timer.is-warn .timer-dial, .timer.is-warn .vt-face { animation: timer-pulse 0.9s ease-in-out 1; }
@keyframes timer-pulse { 50% { transform: scale(1.06); } }
.timer.is-ringing .timer-digits { animation: timer-flash 1s steps(2) infinite; }
.timer:fullscreen .timer-warn-note { font-size: min(4vh, 4vw); }
@media (prefers-reduced-motion: reduce) {
  .timer.is-warn .timer-digits, .timer.is-warn .timer-dial, .timer.is-warn .vt-face { animation: none; }
}

/* /classroom-tools: every tool, with its other pages under its summary. */
.prose .roles h3 { margin: 0 0 6px; font-size: 1.15rem; }
.prose .tool-pages { margin-top: 8px; font-size: 0.92rem; }

/* src/tools/random-group-generator.tsx: /random-group-generator and /random-team-generator. Setup (names and options), a bar of buttons, and a grid of group cards big enough for the board. Full screen shows only the bar and the cards. */
.group-tool { --group-tone-0: #7c3aed; --group-tone-1: #ea580c; --group-tone-2: #0d9488; --group-tone-3: #db2777; --group-tone-4: #2563eb; --group-tone-5: #b45309; --group-tone-6: #4d7c0f; --group-tone-7: #6d28d9; display: grid; gap: 18px; margin: 8px 0 40px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.group-setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.group-field { display: block; margin-bottom: 6px; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.group-tool textarea, .group-tool select, .group-count input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.group-names textarea { min-height: 220px; resize: vertical; line-height: 1.45; }
.group-options { display: grid; align-content: start; justify-items: start; gap: 14px; }
.group-options .chip, .group-count .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.group-count { display: flex; align-items: center; gap: 8px; }
.group-count label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.group-count input { width: 76px; text-align: center; }
.group-count .chip { min-width: 40px; font-size: 1.1rem; line-height: 1; }
.group-theme { width: min(220px, 100%); }
.group-apart { width: 100%; }
.group-apart summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.group-apart label { display: block; margin-top: 8px; }
.group-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.group-shuffle { min-width: 130px; font-size: 1.05rem; }
.group-status { margin: 0 0 0 auto; color: var(--muted); font-size: 0.92rem; }
.group-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.group-card { padding: 14px 18px 16px; border: 2px solid var(--group-tone, var(--p-600)); border-top-width: 10px; border-radius: 14px; background: #fff; }
.group-card h2 { margin: 0 0 8px; font-size: 1.3rem; color: var(--group-tone, var(--p-600)); }
.group-card ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 16px; }
.group-card li { font-size: 1.15rem; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.group-cards.is-shuffling .group-card { animation: group-shake 0.3s ease-in-out infinite alternate; opacity: 0.55; }
.group-cards.is-revealing .group-card { animation: group-deal 0.35s ease-out both; animation-delay: calc(min(var(--i, 0), 12) * 60ms); }
@keyframes group-shake { from { transform: translateX(-3px) rotate(-1deg); } to { transform: translateX(3px) rotate(1deg); } }
@keyframes group-deal { from { opacity: 0; transform: translateY(14px) scale(0.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .group-cards.is-revealing .group-card { animation: none; }
  .group-cards.is-shuffling .group-card { animation: none; }
}
.group-tool:fullscreen { align-content: start; overflow: auto; padding: 24px 32px; border: 0; border-radius: 0; box-shadow: none; }
.group-tool:fullscreen .group-setup { display: none; }
.group-tool:fullscreen .group-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.group-tool:fullscreen .group-card h2 { font-size: 2rem; }
.group-tool:fullscreen .group-card li { font-size: 1.7rem; }
.group-notes { margin-top: 8px; }
.group-notes ul + p { margin-top: 12px; }
@media (max-width: 720px) {
  .group-setup { grid-template-columns: minmax(0, 1fr); }
  .group-names textarea { min-height: 160px; }
  .group-status { margin-left: 0; width: 100%; }
}

/* src/tools/visual-timer.tsx, bomb-timer.tsx, count-up-timer.tsx: the timers that share the classroom timer's panel (.timer). */
.vtimer { --vt-color: #e11d48; }
.vt-face { position: relative; width: min(460px, 84vw); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--ink); background: #fff; }
.vt-disk { position: absolute; inset: 14%; border-radius: 50%; background: conic-gradient(var(--vt-color) calc(var(--part, 1) * 360deg), transparent 0); }
.vt-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.vt-tick { stroke: var(--ink); stroke-width: 1; stroke-linecap: round; }
.vt-tick-5 { stroke-width: 2.4; }
.vt-num { font: 700 11px Poppins, system-ui, sans-serif; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.vtimer[data-face='fit'] .vt-num, .vtimer[data-face='fit'] .vt-tick:not(.vt-tick-5) { display: none; }
.vt-knob { fill: var(--ink); }
.vt-swatch::before { content: ''; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 6px; border-radius: 50%; background: var(--swatch); vertical-align: -0.05em; }
.vtimer:fullscreen .vt-face { width: min(72vh, 86vw); }
.vtimer:fullscreen .vt-digits { font-size: min(12vh, 12vw); }

.bt-stage { width: min(400px, 76vw); aspect-ratio: 1; }
.bt-stage svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bt-bomb[hidden], .bt-boom[hidden] { display: none; }
.bt-body { fill: #2b2340; }
.bt-shine { fill: #fff; opacity: 0.3; }
.bt-cap { fill: #6b6580; stroke: #2b2340; stroke-width: 4; }
.bt-eye { fill: #fff; }
.bt-pupil { fill: #2b2340; }
.bt-smile { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; }
.bt-fuse, .bt-fuse-burnt { fill: none; stroke-width: 7; stroke-linecap: round; }
.bt-fuse { stroke: #b45309; }
.bt-fuse-burnt { stroke: var(--line); stroke-dasharray: 2 10; }
.bt-spark { fill: #facc15; stroke: #f97316; stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.bt-spark-core { fill: #fff7ed; }
.btimer.is-running .bt-spark { animation: bt-flicker 0.25s ease-in-out infinite alternate; }
@keyframes bt-flicker { from { transform: scale(0.75) rotate(0deg); } to { transform: scale(1.15) rotate(20deg); } }
.btimer.is-running .bt-bomb svg { animation: bt-wobble 0.6s ease-in-out infinite alternate; transform-origin: 45% 60%; }
@keyframes bt-wobble { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
.bt-burst-out { fill: #f97316; }
.bt-burst-in { fill: #facc15; }
.bt-boom-text { font: 800 60px Poppins, system-ui, sans-serif; fill: #db2777; stroke: #fff; stroke-width: 3; paint-order: stroke; text-anchor: middle; }
.bt-boom svg { animation: bt-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes bt-pop { from { transform: scale(0.2) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0deg); opacity: 1; } }
.btimer.is-done .timer-digits { animation: none; }
.btimer:fullscreen .bt-stage { width: min(62vh, 80vw); }
.btimer:fullscreen .timer-digits { font-size: min(14vh, 14vw); }
@media (prefers-reduced-motion: reduce) {
  .btimer.is-running .bt-spark, .btimer.is-running .bt-bomb svg, .bt-boom svg { animation: none; }
}

.cu-digits { font-size: clamp(3.4rem, 17vw, 8rem); }
.cutimer [data-lap]:disabled { opacity: 0.5; cursor: default; }
.cu-laps { display: none; width: min(520px, 100%); max-height: 320px; overflow-y: auto; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cutimer.has-laps .cu-laps { display: block; }
.cu-laps li { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; color: var(--ink); }
.cu-laps .cu-lap { font-weight: 700; text-align: center; }
.cu-laps .cu-total { color: var(--muted); text-align: right; }
.cu-laps li.is-best .cu-lap { color: var(--ok); }
.cu-laps li.is-worst .cu-lap { color: var(--s-600); }
.cutimer:fullscreen .cu-digits { font-size: min(26vh, 18vw); }
.cutimer:fullscreen .cu-laps { max-height: 34vh; font-size: 1.4rem; }
.cu-board { position: relative; display: grid; place-items: center; }
.cu-count { position: absolute; inset: -12px -24px; display: grid; place-items: center; border-radius: var(--radius); background: var(--card); color: var(--p-600); font-size: clamp(3.4rem, 17vw, 8rem); font-weight: 800; line-height: 1; }
.cu-count[hidden] { display: none; }
.cu-count.is-pop { animation: cu-pop 0.35s ease-out both; }
@keyframes cu-pop { from { transform: scale(0.6); opacity: 0.3; } to { transform: scale(1); opacity: 1; } }
.cu-digits.is-pulse { animation: timer-pulse 0.9s ease-in-out 1; }
.cu-options { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; font-size: 0.88rem; }
.cu-countin { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.cu-countin input { width: 18px; height: 18px; accent-color: var(--p-600); }
.cutimer:fullscreen .cu-count { font-size: min(26vh, 18vw); }
.cutimer:fullscreen .cu-options { display: none; }
@media (prefers-reduced-motion: reduce) {
  .cu-count.is-pop, .cu-digits.is-pulse { animation: none; }
}

/* /hundreds-chart, /120-chart, /blank-hundreds-chart (src/tools/hundreds-chart.tsx): a grid of ten columns to color. Print shows the sheet alone, sized to fit US Letter and A4. */
.hc-chart { display: grid; gap: 18px; margin: 8px 0 40px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.hc-controls { display: grid; gap: 10px; }
.hc-controls .chips { align-items: center; }
.hc-controls .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.hc-label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.hc-custom { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; }
.hc-custom input { width: 70px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: center; }
.hc-print { margin-left: auto; }
.hc-swatch::before { content: ''; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 6px; border-radius: 50%; background: var(--hc-paint); vertical-align: -0.05em; }
.hc-chart { --hc-yellow: #fde047; --hc-blue: #93c5fd; --hc-pink: #f9a8d4; --hc-green: #86efac; }
.hc-yellow { --hc-paint: var(--hc-yellow); }
.hc-blue { --hc-paint: var(--hc-blue); }
.hc-pink { --hc-paint: var(--hc-pink); }
.hc-green { --hc-paint: var(--hc-green); }
.hc-sheet { width: 100%; max-width: 640px; margin: 0 auto; }
.hc-print-head { display: none; }
.hc-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.hc-cell { aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-size: clamp(0.72rem, 3.4vw, 1.35rem); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.hc-cell:nth-child(10n) { border-right-width: 2px; }
.hc-grid .hc-cell:nth-last-child(-n + 10) { border-bottom-width: 2px; }
.hc-cell:hover { outline: 3px solid var(--p-300); outline-offset: -3px; }
.hc-cell:focus-visible { outline: 3px solid var(--p-600); outline-offset: -3px; }
.hc-cell.is-hidden span { visibility: hidden; }
.hc-cell[data-paint='yellow'] { background: var(--hc-yellow); }
.hc-cell[data-paint='blue'] { background: var(--hc-blue); }
.hc-cell[data-paint='pink'] { background: var(--hc-pink); }
.hc-cell[data-paint='green'] { background: var(--hc-green); }
.hc-notes { margin-top: 8px; }
.hc-read-aloud { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.88rem; }
.hc-read-aloud input { accent-color: var(--p-600); }
.hc-cell.is-said { outline: 4px solid var(--p-600); outline-offset: -4px; transform: scale(1.06); transition: transform 0.15s; position: relative; z-index: 1; }
@page hc-sheet { size: auto; margin: 12mm; }
@media print {
  .hc-page > :not(.hc-chart), .hc-controls { display: none !important; }
  .hc-chart { display: block; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .hc-sheet { page: hc-sheet; max-width: none; width: 180mm; margin: 0 auto; break-inside: avoid; }
  .hc-print-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6mm; font-size: 14pt; font-weight: 700; color: #000; }
  .hc-print-head span + span { font-size: 11pt; font-weight: 400; }
  .hc-grid { grid-template-columns: repeat(10, 18mm); border-color: #000; }
  .hc-cell { width: 18mm; height: 18mm; aspect-ratio: auto; border-color: #000; color: #000; font-size: 15pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hc-cell:hover { outline: 0; }
}

/* /bingo-card-generator, /sight-word-bingo, /math-bingo: settings, then a preview of the printed pages. Sizes inside a sheet are in cqw, so the
   preview and the print match. Print shows only the sheets, one page each (the script sets @page to Letter or A4). */
.bingo-tool { display: grid; gap: 14px; margin: 8px 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.bingo-tool[hidden], .bingo-row[hidden], .bingo-message[hidden] { display: none; }
.bingo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.bingo-label { font-weight: 600; color: var(--ink); min-width: 90px; }
.bingo-row select, .bingo-fields input, .bingo-fields select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; }
.bingo-row textarea { font: inherit; flex: 1 1 260px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.bingo-check { display: inline-flex; align-items: center; gap: 6px; }
.bingo-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bingo-fields label { display: grid; gap: 4px; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.bingo-fields input, .bingo-fields select { width: 100%; font-weight: 400; }
.bingo-seed { display: flex; gap: 6px; }
.bingo-seed input { flex: 1 1 auto; width: 0; }
.bingo-note { margin: -4px 0 0; font-size: 0.88rem; color: var(--muted); }
.bingo-message { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.bingo-tool [data-print] { margin-left: auto; }
.bingo-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; margin-bottom: 40px; }
.bingo-sheet { container-type: inline-size; aspect-ratio: 7.5 / 10; padding: 6.5%; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: space-around; overflow: hidden; color: #111; }
.bingo-out[data-paper='a4'] .bingo-sheet { aspect-ratio: 186 / 273; }
.bingo-card { width: 92cqw; display: grid; gap: 1.6cqw; }
.bingo-out[data-per-page='2'] .bingo-card { width: 46cqw; gap: 1cqw; }
.bingo-card-title { text-align: center; font-weight: 700; font-size: 6.5cqw; line-height: 1.1; overflow-wrap: anywhere; }
.bingo-out[data-per-page='2'] .bingo-card-title { font-size: 4.2cqw; }
.bingo-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); border: 0.5cqw solid #111; container-type: inline-size; }
.bingo-head { display: grid; place-items: center; padding: 1.5cqw 0; background: var(--p-600); color: #fff; font-weight: 700; font-size: 11cqw; line-height: 1; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bingo-cell { aspect-ratio: 1; display: grid; place-items: center; padding: 1cqw; border: 0.3cqw solid #111; text-align: center; line-height: 1.05; font-weight: 600; font-size: calc(var(--fs) * 1cqw); overflow: hidden; overflow-wrap: break-word; hyphens: none; }
.bingo-cell.is-free { font-size: calc(var(--free) * 1cqw); font-weight: 700; color: var(--p-700); background: var(--p-100); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bingo-card-foot { text-align: right; font-size: 2.4cqw; color: #555; }
.bingo-out[data-per-page='2'] .bingo-card-foot { font-size: 1.8cqw; }
.bingo-caller { aspect-ratio: auto; justify-content: flex-start; align-items: stretch; grid-column: 1 / -1; font-size: 2.6cqw; }
.bingo-caller h2 { margin: 0 0 1cqw; font-size: 4.5cqw; }
.bingo-caller p { margin: 0 0 3cqw; }
.bingo-board { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 0.8cqw; }
.bingo-board .bingo-head { font-size: 4cqw; padding: 1cqw 0; }
.bingo-tick { padding: 0.4cqw 0 0.4cqw 4.5cqw; border: 1px solid #bbb; font-size: 2.6cqw; font-variant-numeric: tabular-nums; position: relative; }
.bingo-tick::before, .bingo-calls li::before { content: ''; position: absolute; left: 1cqw; top: 50%; width: 1.8cqw; height: 1.8cqw; margin-top: -0.9cqw; border: 1px solid #555; }
.bingo-calls { columns: 3; column-gap: 4cqw; margin: 0; padding: 0; list-style: none; counter-reset: call; }
.bingo-calls li { position: relative; padding: 0.5cqw 0 0.5cqw 4cqw; break-inside: avoid; }
.bingo-notes { margin-top: 8px; }
@media print {
  .bingo-page > :not(.bingo-out) { display: none !important; }
  .bingo-out { display: block; margin: 0; }
  .bingo-out .bingo-sheet, .bingo-out[data-paper] .bingo-sheet { aspect-ratio: auto; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; justify-content: flex-start; gap: 6cqw; break-after: page; overflow: visible; }
  .bingo-out[data-per-page='2'] .bingo-sheet { gap: 5cqw; }
  .bingo-out .bingo-caller { gap: 1.5cqw; }
  .bingo-sheet:last-child { break-after: auto; }
}

/* src/tools/random-name-picker.tsx: the stage (a big name, or the wheel) beside the class list. Full screen shows the stage only. */
.np { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: start; gap: 20px; margin: 8px 0 40px; padding: 24px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.np-stage { display: grid; justify-items: center; align-content: start; gap: 16px; min-width: 0; }
.np .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.np .chips { justify-content: center; }
.np-reveal { display: grid; place-items: center; width: 100%; min-height: 260px; padding: 16px; border-radius: 14px; background: var(--p-50); overflow: hidden; }
.np-name { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2em 0.7em; margin: 0; font-weight: 700; line-height: 1.1; color: var(--muted); text-align: center; font-size: clamp(2.6rem, 11vw, 6rem); overflow-wrap: anywhere; }
.np-name[data-many='2'] { font-size: clamp(2.2rem, 8vw, 4.5rem); }
.np-name[data-many='3'], .np-name[data-many='4'], .np-name[data-many='5'] { font-size: clamp(1.8rem, 6vw, 3.4rem); }
.np-name.is-final { color: var(--p-600); animation: np-pop 0.35s ease-out; }
@keyframes np-pop { 0% { transform: scale(0.85); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
.np-wheel { display: grid; justify-items: center; gap: 10px; width: 100%; }
.np-wheel svg { width: min(440px, 100%); height: auto; font-family: inherit; font-weight: 600; }
.np-result { min-height: 1.4em; margin: 0; font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 700; color: var(--p-600); text-align: center; overflow-wrap: anywhere; }
.np[data-view='name'] .np-wheel, .np[data-view='wheel'] .np-reveal { display: none; }
.np-main { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.np-pick { min-width: 150px; font-size: 1.15rem; }
.np.is-busy .np-pick { opacity: 0.6; }
.np-side { display: grid; align-content: start; gap: 12px; min-width: 0; }
.np-list { display: grid; gap: 6px; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.np-list textarea { width: 100%; min-height: 220px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-weight: 400; line-height: 1.4; resize: vertical; }
.np-total { margin: 0; color: var(--muted); font-size: 0.88rem; }
.np-check { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); cursor: pointer; }
.np-check input { width: 18px; height: 18px; accent-color: var(--p-600); }
.np-side .chips { justify-content: flex-start; }
.np-picked { display: none; gap: 8px; }
.np.has-picked .np-picked { display: grid; }
.np-picked h2 { margin: 4px 0 0; font-size: 1rem; }
.np-picked ol { margin: 0; padding-left: 1.6em; max-height: 220px; overflow-y: auto; }
.np-picked li { padding: 2px 0; }
.np-picked li span { margin-right: 8px; overflow-wrap: anywhere; }
.np-back { padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--p-700); font: inherit; font-size: 0.78rem; cursor: pointer; }
.np:fullscreen { grid-template-columns: 1fr; align-content: center; border: 0; border-radius: 0; box-shadow: none; }
.np:fullscreen .np-side, .np:fullscreen .np-count { display: none; }
.np:fullscreen .np-reveal { min-height: 60vh; }
.np:fullscreen .np-name { font-size: min(16vh, 12vw); }
.np:fullscreen .np-wheel svg { width: min(72vh, 90vw); }
.np-notes { margin-top: 8px; }
.np-notes ul + p { margin-top: 12px; }
@media (max-width: 760px) {
  .np { grid-template-columns: 1fr; padding: 18px 12px; }
  .np-reveal { min-height: 180px; }
}

/* /classroom-noise-meter: a level bar (--level, 0 to 1) with a line at the limit (--limit), or bouncing balls on a canvas. The panel's data-zone colours it; .is-loud shows the calm alert. */
.noise { position: relative; display: grid; justify-items: center; gap: 16px; margin: 8px 0 40px; padding: 24px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); --zone: #22c55e; }
.noise[data-zone='yellow'] { --zone: #eab308; }
.noise[data-zone='red'] { --zone: #e11d48; }
.noise-meter { width: 100%; max-width: 640px; }
.noise-bar { position: relative; height: clamp(56px, 12vw, 96px); border: 4px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.noise-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--level, 0) * 100%); background: var(--zone); transition: background-color 0.3s; }
.noise-limit-line { position: absolute; top: 0; bottom: 0; left: calc(var(--limit, 0.7) * 100%); width: 4px; margin-left: -2px; background: var(--ink); }
.noise-ball-box { display: none; position: relative; width: 100%; max-width: 640px; }
.noise-balls { display: block; width: 100%; height: clamp(220px, 40vw, 340px); border: 4px solid var(--ink); border-radius: var(--radius); background: #fff; }
.noise[data-current-view='balls'] .noise-meter, .noise[data-current-view='manual'] .noise-meter { display: none; }
.noise[data-current-view='balls'] .noise-ball-box { display: block; }
/* The preview before Start: CSS only, no sound, never counted. The bar swings and a few balls hop; Start or a first click ends it (.is-preview goes). */
.noise-preview { display: none; position: absolute; top: 10px; left: 10px; margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--s-100); color: var(--body); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.noise.is-preview:not([data-current-view='manual']) .noise-preview { display: block; }
.noise.is-preview .noise-fill { animation: noise-preview-bar 6s ease-in-out infinite; }
@keyframes noise-preview-bar { 0%, 100% { width: 12%; background: #22c55e; } 35% { width: 48%; background: #22c55e; } 55% { width: 62%; background: #eab308; } 70% { width: 78%; background: #e11d48; } 85% { width: 30%; background: #22c55e; } }
.noise-preview-balls { display: none; position: absolute; inset: 4px; pointer-events: none; }
.noise.is-preview .noise-preview-balls { display: block; }
.noise-preview-balls span { position: absolute; bottom: 0; left: calc(4% + var(--i) * 12%); width: 7%; aspect-ratio: 1; border-radius: 50%; background: var(--c, #7c3aed); animation: noise-preview-hop 1.6s cubic-bezier(0.3, 0, 0.7, 1) calc(var(--i) * -0.37s) infinite alternate; }
.noise-preview-balls span:nth-child(4n+2) { --c: #f97316; }
.noise-preview-balls span:nth-child(4n+3) { --c: #14b8a6; }
.noise-preview-balls span:nth-child(4n) { --c: #3b82f6; }
@keyframes noise-preview-hop { from { transform: translateY(0); } to { transform: translateY(calc(-40% * (2 + var(--i) / 2))); } }
@media (prefers-reduced-motion: reduce) {
  .noise.is-preview .noise-fill { animation: none; width: 40%; }
  .noise-preview-balls span { animation: none; }
}
.noise-privacy { flex-basis: 100%; margin: 0; text-align: center; font-size: 0.88rem; color: var(--body); }
/* The voice level display, no microphone: the teacher sets 0 to 4; data-level on the panel colours it. */
.noise-levels { display: none; justify-items: center; gap: 12px; width: 100%; max-width: 640px; }
.noise[data-current-view='manual'] .noise-levels { display: grid; }
.noise[data-current-view='manual'] .noise-word, .noise[data-current-view='manual'] .noise-start, .noise[data-current-view='manual'] .noise-privacy, .noise[data-current-view='manual'] .noise-alert { display: none; }
.noise-level-now { display: grid; justify-items: center; gap: 4px; width: 100%; margin: 0; padding: 24px 16px; border: 4px solid var(--ink); border-radius: var(--radius); background: var(--zone); color: #fff; text-align: center; }
.noise-level-now strong { font-size: clamp(2rem, 8vw, 4rem); line-height: 1.05; }
.noise-level-now span { font-size: clamp(1rem, 3vw, 1.4rem); font-weight: 600; }
.noise[data-current-view='manual'][data-level='0'] { --zone: #475569; }
.noise[data-current-view='manual'][data-level='1'] { --zone: #2563eb; }
.noise[data-current-view='manual'][data-level='2'] { --zone: #16a34a; }
.noise[data-current-view='manual'][data-level='3'] { --zone: #ca8a04; }
.noise[data-current-view='manual'][data-level='4'] { --zone: #dc2626; }
.noise-levels .chips { justify-content: center; }
.noise-levels .chip { cursor: pointer; font: inherit; }
.noise-level-keys { margin: 0; font-size: 0.85rem; color: var(--body); }
.noise:fullscreen .noise-level-now { min-height: 50vh; align-content: center; }
.noise:fullscreen .noise-level-now strong { font-size: 14vh; }
.noise-use-manual { cursor: pointer; font: inherit; }
.noise-word { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 700; line-height: 1.1; color: var(--ink); }
.noise[data-zone='red'] .noise-word { color: #e11d48; }
.noise-alert { visibility: hidden; padding: 10px 20px; border-radius: 999px; background: var(--bad-bg); color: var(--bad); font-weight: 700; font-size: clamp(1.1rem, 4vw, 1.6rem); text-align: center; }
.noise.is-loud .noise-alert { visibility: visible; animation: noise-pulse 2s ease-in-out infinite; }
@keyframes noise-pulse { 50% { opacity: 0.6; } }
.noise-message { max-width: 520px; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--s-100); color: var(--ink); text-align: center; }
.noise-message.is-note { background: var(--p-50); color: var(--muted); }
.noise-main { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.noise-start { min-width: 140px; font-size: 1.1rem; }
.noise-options { display: grid; justify-items: center; gap: 12px; width: 100%; }
.noise-options .chips { justify-content: center; }
.noise-options .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.noise-range { display: grid; gap: 4px; width: min(320px, 100%); font-size: 0.92rem; color: var(--body); }
.noise-range input { width: 100%; accent-color: var(--p-600); }
.noise-sounds { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; }
.noise-pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--body); }
.noise-pick select { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.noise-pick input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--p-600); }
.noise-reward { margin: 0; padding: 10px 20px; border-radius: 999px; background: #dcfce7; color: #166534; font-weight: 700; font-size: clamp(1.1rem, 4vw, 1.6rem); text-align: center; }
.noise.is-rewarded .noise-reward { animation: noise-pop 0.6s ease-out; }
@keyframes noise-pop { 0% { transform: scale(0.8); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
.noise:fullscreen .noise-reward { font-size: 6vh; }
.noise-count { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: 0.95rem; }
.noise:fullscreen { align-content: center; border: 0; border-radius: 0; box-shadow: none; }
.noise:fullscreen .noise-meter, .noise:fullscreen .noise-ball-box { max-width: 90vw; }
.noise:fullscreen .noise-bar { height: 22vh; }
.noise:fullscreen .noise-balls { height: 60vh; }
.noise:fullscreen .noise-word { font-size: 8vh; }
.noise:fullscreen .noise-options { display: none; }
.noise-notes { margin-top: 8px; }

/* /name-tracing-generator: the options on the left, a preview of each name's sheet on the right; in print, only the sheets, one per page on US Letter or A4. */
.nt { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; margin: 8px 0 40px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.nt-controls { display: grid; gap: 14px; position: sticky; top: 16px; }
.nt-field { display: grid; gap: 4px; font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.nt-field select, .nt-field textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 400; color: var(--ink); }
.nt-names textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.nt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nt-checks { display: grid; gap: 8px; font-size: 0.92rem; }
.nt-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.nt-check input { width: 18px; height: 18px; accent-color: var(--p-600); }
.nt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nt-actions .btn { cursor: pointer; }
.nt-status { flex-basis: 100%; margin: 0; font-size: 0.88rem; color: var(--muted); }
.nt-preview { display: grid; gap: 16px; min-width: 0; }
.nt-preview.is-many { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.nt-sheet { background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; }
.nt-sheet svg { display: block; width: 100%; height: auto; }
.nt-notes { margin-top: 8px; }
@media (max-width: 820px) {
  .nt { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .nt-controls { position: static; }
}
@page nt-letter { size: letter; margin: 0; }
@page nt-a4 { size: A4; margin: 0; }
@media print {
  .nt-page > :not(.nt), .nt-controls { display: none !important; }
  .nt { display: block; margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
  .nt-preview, .nt-preview.is-many { display: block; }
  .nt-sheet { break-after: page; border: 0; border-radius: 0; box-shadow: none; }
  .nt-sheet:last-child { break-after: auto; }
  .nt-preview[data-paper='letter'] .nt-sheet { page: nt-letter; width: 215.9mm; height: 279mm; }
  .nt-preview[data-paper='a4'] .nt-sheet { page: nt-a4; width: 210mm; height: 296.5mm; }
  .nt-sheet svg { width: 100%; height: 100%; }
}

/* /bingo-number-caller: the called number in big type with its letter, the last calls, and a board of every number (5 rows of 15 for 75 balls, 9 rows of 10 for 90). Full screen keeps the number and the board. */
.bingo { display: grid; gap: 18px; margin: 8px 0 40px; padding: 24px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.bingo-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 40px; }
.bingo-current { display: grid; place-items: center; align-content: center; width: clamp(150px, 40vw, 230px); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--ink); background: #fff; line-height: 1; color: var(--ink); }
.bingo.has-letter .bingo-current { background: var(--p-50); }
.bingo-letter { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 700; color: var(--p-600); }
.bingo-letter:empty { display: none; }
.bingo-number { font-size: clamp(3.4rem, 14vw, 6rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.bingo-side { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.bingo-progress { margin: 0; font-weight: 600; color: var(--ink); }
.bingo-last-label { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.bingo-last { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; margin: 0; padding: 0; list-style: none; }
.bingo-last li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--p-50); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bingo-main { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bingo-call { min-width: 160px; font-size: 1.1rem; }
.bingo-board { display: grid; gap: 4px; max-width: 100%; overflow-x: auto; }
.bingo-row { display: grid; grid-template-columns: repeat(var(--bingo-cols, 15), minmax(0, 1fr)); gap: 4px; }
.bingo-board[data-board-size='75'] .bingo-row { --bingo-cols: 16; }
.bingo-board[data-board-size='90'] .bingo-row { --bingo-cols: 10; }
.bingo-row-letter, .bingo-cell { display: grid; place-items: center; min-width: 0; aspect-ratio: 1; border-radius: 8px; font-size: clamp(0.62rem, 2.2vw, 1.05rem); font-weight: 600; font-variant-numeric: tabular-nums; }
.bingo-row-letter { background: var(--ink); color: #fff; font-weight: 700; }
.bingo-cell { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.bingo-cell.is-called { border-color: var(--p-600); background: var(--p-600); color: #fff; }
.bingo-cell.is-last { border-color: var(--s-500); background: var(--s-500); }
.bingo-board[data-board-size='90'] { max-width: 560px; margin: 0 auto; width: 100%; }
.bingo-options { display: grid; justify-items: center; gap: 12px; }
.bingo-options .chips { justify-content: center; align-items: center; }
.bingo-options .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.bingo-every { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--body); }
.bingo-every select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.bingo:fullscreen { align-content: center; border: 0; border-radius: 0; box-shadow: none; overflow: auto; }
.bingo:fullscreen .bingo-current { width: min(34vh, 40vw); }
.bingo:fullscreen .bingo-number { font-size: min(14vh, 14vw); }
.bingo:fullscreen .bingo-letter { font-size: min(6vh, 6vw); }
.bingo:fullscreen .bingo-board { width: min(100%, 150vh); margin: 0 auto; }
.bingo:fullscreen .bingo-options { display: none; }
/* Sound cues have a visual twin: the ball shakes while the cage rattles, the new number pops, and Bingo! shows a banner with confetti. */
.bingo { position: relative; }
.bingo-win-btn { min-width: 120px; font-size: 1.1rem; background: var(--s-500); border-color: var(--s-500); }
.bingo-win-btn:hover { background: var(--s-600); border-color: var(--s-600); }
.bingo.is-rolling .bingo-current { animation: bingo-shake 0.15s linear infinite; }
.bingo-current.is-new { animation: bingo-pop 0.35s ease-out; }
.bingo-win { position: relative; display: grid; justify-items: center; gap: 8px; padding: 18px 16px; border: 3px solid var(--s-500); border-radius: var(--radius); background: var(--s-100); text-align: center; overflow: hidden; }
.bingo-win[hidden] { display: none; }
.bingo-win-title { margin: 0; font-size: clamp(2.2rem, 9vw, 3.6rem); font-weight: 700; line-height: 1; color: var(--s-600); animation: bingo-pop 0.5s ease-out; }
.bingo-win-note { margin: 0; max-width: 46ch; font-weight: 600; color: var(--ink); }
.bingo-win .btn { position: relative; z-index: 1; }
.bingo-confetti { position: absolute; inset: 0; pointer-events: none; }
.bingo-confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: var(--c); opacity: 0; transform: rotate(var(--r)); animation: bingo-fall 2.4s ease-in var(--d) 2 both; }
@keyframes bingo-shake { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-4px) rotate(-3deg); } 75% { transform: translateX(4px) rotate(3deg); } }
@keyframes bingo-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes bingo-fall { 0% { opacity: 1; transform: translateY(0) rotate(var(--r)); } 100% { opacity: 0.2; transform: translateY(260px) rotate(calc(var(--r) * -8)); } }
@media (prefers-reduced-motion: reduce) {
  .bingo.is-rolling .bingo-current, .bingo-current.is-new, .bingo-win-title { animation: none; }
  .bingo.is-rolling .bingo-current { border-style: dashed; }
  .bingo-confetti i { animation: none; opacity: 1; top: auto; bottom: 6px; }
}
.bingo-notes { margin-top: 8px; }

/* /number-line-generator (src/tools/number-line-generator.tsx): the form, then the lines as SVG. Print shows the lines alone, sized to fit US Letter and A4. */
.nl-tool { display: grid; gap: 18px; margin: 8px 0 40px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.nl-controls { display: grid; gap: 14px; }
.nl-controls .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.nl-read-aloud { display: inline-flex; align-items: center; gap: 6px; }
.nl-read-aloud input { accent-color: var(--p-600); }
.nl-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 12px; }
.nl-field { display: grid; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.nl-field[hidden] { display: none; }
.nl-field input, .nl-field select { width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 0.95rem; font-weight: 400; color: var(--ink); }
.nl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nl-actions .btn { margin-left: auto; }
.nl-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 0.92rem; }
.nl-error[hidden] { display: none; }
.nl-print-head { display: none; }
.nl-sheet { display: grid; gap: 14px; }
.nl-line { cursor: pointer; border-radius: 10px; }
.nl-line:hover { background: var(--p-50); }
.nl-svg { display: block; width: 100%; height: auto; overflow: visible; }
.nl-axis, .nl-tick { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.nl-tick { stroke-width: 2.5; }
.nl-arrow { fill: var(--ink); }
.nl-label, .nl-frac text { fill: var(--ink); font-family: inherit; font-weight: 600; }
.nl-label { text-anchor: middle; }
.nl-frac-bar { stroke: var(--ink); stroke-width: 2; }
.nl-hop { fill: none; stroke: #e11d48; stroke-width: 3; }
.nl-hop-head { fill: #e11d48; }
.nl-hop-label { fill: #e11d48; text-anchor: middle; font-family: inherit; font-weight: 700; }
.nl-pending { fill: var(--p-300); fill-opacity: 0.6; stroke: var(--p-600); stroke-width: 2; }
.nl-notes { margin-top: 8px; }
.nl-notes ul + p { margin-top: 12px; }
@page nl-sheet { size: auto; margin: 12mm; }
@media print {
  .nl-page > :not(.nl-tool), .nl-controls { display: none !important; }
  .nl-tool { display: block; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .nl-paper { page: nl-sheet; width: 180mm; margin: 0 auto; }
  .nl-print-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8mm; font-size: 14pt; font-weight: 700; color: #000; }
  .nl-print-head span + span { font-size: 11pt; font-weight: 400; }
  .nl-sheet { gap: 10mm; }
  .nl-line { break-inside: avoid; }
  .nl-line:hover { background: none; }
  .nl-pending { display: none; }
  .nl-axis, .nl-tick, .nl-frac-bar { stroke: #000; }
  .nl-arrow, .nl-label, .nl-frac text { fill: #000; }
  .nl-hop, .nl-hop-head, .nl-hop-label { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* /multiplication-chart: the chart sizes itself to its box (--cell, from the number of columns), lights the row and column under the pointer, and prints on one page of Letter or A4. */
.mchart { display: grid; gap: 14px; margin: 8px 0 40px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.mchart-controls { display: grid; justify-items: center; gap: 10px; }
.mchart-controls .chips { justify-content: center; }
.mchart-controls .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.mchart-read-aloud { display: inline-flex; align-items: center; gap: 6px; }
.mchart-read-aloud input { accent-color: var(--p-600); }
.mchart-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.mchart-row select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.mchart-readout { margin: 0; min-height: 1.6em; text-align: center; font-size: clamp(1.05rem, 4vw, 1.35rem); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.mchart-sheet { display: grid; justify-items: center; gap: 6px; }
.mchart-title { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.mchart-name { display: none; margin: 0; }
.mchart-scroll { width: 100%; container-type: inline-size; overflow-x: auto; }
.mchart-grid { --cell: clamp(24px, calc((100cqi - 2px) / (var(--n) + 1)), 54px); margin: 0 auto; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; font-size: max(10px, calc(var(--cell) * 0.38)); color: var(--ink); }
.mchart-grid th, .mchart-grid td { width: var(--cell); height: var(--cell); padding: 0; border: 1px solid #cfc8e3; text-align: center; vertical-align: middle; }
.mchart-grid th { background: var(--p-100); color: var(--p-900); font-weight: 700; }
.mchart-grid .mchart-corner { background: var(--p-600); color: #fff; }
.mchart-grid td { background: #fff; cursor: pointer; }
.mchart.mchart-color .mchart-grid td { background: hsl(var(--h, 0) 85% 95%); }
.mchart.mchart-color .mchart-grid td.is-square { background: hsl(var(--h, 0) 80% 85%); font-weight: 700; }
.mchart-grid td.is-hidden { background: #fff !important; }
.mchart-grid td.is-shown { color: var(--p-600); font-weight: 700; }
.mchart-grid .is-table { background: #fde68a !important; font-weight: 700; }
.mchart-grid .is-row, .mchart-grid .is-col { background: var(--p-200) !important; }
.mchart-grid th.is-row, .mchart-grid th.is-col { background: var(--p-600) !important; color: #fff; }
.mchart-grid td.is-cell { background: var(--p-600) !important; color: #fff; font-weight: 700; }
.mchart-notes { margin-top: 8px; }
@media print {
  .mchart-controls, .mchart-readout { display: none !important; }
  .mchart { display: block; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .mchart, .mchart * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .mchart-sheet { break-inside: avoid; gap: 0.08in; }
  .mchart-title { font-size: 16pt; }
  .mchart[data-fill='blank'] .mchart-name, .mchart[data-fill='some'] .mchart-name { display: block; font-size: 11pt; margin-bottom: 0.08in; }
  .mchart-scroll { overflow: visible; container-type: normal; }
  /* 6.9in wide fits Letter (7.3in inside the margins) and A4 (7.07in); the chart is square, so it is 6.9in tall too. */
  .mchart-grid { --cell: calc(6.9in / (var(--n) + 1)); font-size: calc(var(--cell) * 0.4); }
  .mchart-grid td { cursor: auto; }
}

/* /word-search-maker: the form beside the sheet on a wide screen, the sheet below it on a phone. The grid is SVG; print shows the puzzle on one page of Letter or A4 and the answer key on the next. */
.wsm-tool { display: grid; gap: 24px; margin: 8px 0 40px; }
@media (min-width: 900px) { .wsm-tool { grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; } }
.wsm-controls { display: grid; gap: 14px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.wsm-field { display: grid; gap: 6px; font-weight: 500; color: var(--ink); }
.wsm-field input, .wsm-field select, .wsm-field textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); }
.wsm-field textarea { resize: vertical; min-height: 9em; line-height: 1.4; }
.wsm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.wsm-set { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; border: 0; }
.wsm-set legend { width: 100%; padding: 0; margin-bottom: 6px; font-weight: 500; color: var(--ink); }
.wsm-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.wsm-check input { width: 18px; height: 18px; accent-color: var(--p-600); }
.wsm-report { padding: 10px 12px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: 0.9rem; }
.wsm-report p { margin: 0; }
.wsm-report p + p { margin-top: 4px; }
.wsm-sheets { display: grid; gap: 24px; min-width: 0; }
.wsm-sheet { padding: 24px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.wsm-sheet-title { margin: 0 0 4px; text-align: center; font-size: 1.5rem; color: var(--ink); overflow-wrap: anywhere; }
.wsm-name { margin: 0 0 14px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.wsm-grid svg { display: block; width: 100%; max-width: 620px; margin: 0 auto; font-family: inherit; }
.wsm-grid text { font-size: 6px; font-weight: 600; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; }
.wsm-grid .wsm-frame { fill: none; stroke: var(--ink); stroke-width: 0.5; }
.wsm-grid .wsm-band { stroke-width: 7.4; stroke-linecap: round; opacity: 0.45; }
.wsm-band-0 { stroke: #fbbf24; } .wsm-band-1 { stroke: #34d399; } .wsm-band-2 { stroke: #60a5fa; } .wsm-band-3 { stroke: #f472b6; } .wsm-band-4 { stroke: #a78bfa; } .wsm-band-5 { stroke: #fb923c; }
.wsm-bank-box h3 { margin: 18px 0 8px; text-align: center; font-size: 1rem; color: var(--ink); }
.wsm-bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.wsm-number { margin: 14px 0 0; text-align: right; color: var(--muted); font-size: 0.8rem; }
.wsm-key .wsm-grid svg { max-width: 360px; }
.wsm-notes { margin-top: 8px; }
@media (max-width: 480px) { .wsm-row { grid-template-columns: 1fr; } .wsm-sheet { padding: 16px 10px; } }
@media print {
  .wsm-tool { display: block; margin: 0; }
  .wsm-sheets { display: block; }
  .wsm-sheet { padding: 0; border: 0; border-radius: 0; box-shadow: none; break-inside: avoid; }
  .wsm-sheet, .wsm-sheet * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .wsm-sheet-title { font-size: 20pt; }
  .wsm-name { font-size: 11pt; color: #000; margin-bottom: 0.15in; }
  /* 6.3in square leaves room for the title and a word bank of 30 words on Letter (9.8in inside the margins) and A4. */
  .wsm-grid svg { width: 6.3in; max-width: none; }
  .wsm-key { break-before: page; }
  .wsm-key .wsm-grid svg { width: 6.3in; max-width: none; }
  .wsm-bank { grid-template-columns: repeat(4, 1fr); font-size: 11pt; }
  .wsm-number { font-size: 9pt; }
}

/* The word list tools (/word-list-studio, /crossword-maker, /word-scramble-maker, /flashcard-maker, /spelling-test-maker):
   the word search maker's form and sheets (.wsm-*), plus each tool's own sheet. Print: each sheet on its own page. */
.wsm-hint { margin: -6px 0 0; font-size: 0.85rem; color: var(--muted); }
.wsm-hint code { font-size: 0.85em; }
.wl-links { border-top: 1px solid var(--line); padding-top: 12px; }
.wl-links-title { margin: 0 0 6px; font-weight: 500; color: var(--ink); }
.wl-links ul { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; }
.cw-grid svg { display: block; width: 100%; margin: 0 auto; font-family: inherit; }
.cw-cell { fill: #fff; stroke: var(--ink); stroke-width: 0.5; }
.cw-num { font-size: 2.6px; font-weight: 600; fill: var(--ink); }
.cw-letter { font-size: 5.6px; font-weight: 700; fill: var(--p-700); text-anchor: middle; }
.cw-clues { display: grid; gap: 8px 24px; margin-top: 18px; }
@media (min-width: 640px) { .cw-clues { grid-template-columns: 1fr 1fr; } }
.cw-clues h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink); }
.cw-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--ink); line-height: 1.4; }
.sc-do { margin: 0 0 14px; text-align: center; color: var(--body); }
.sc-items { display: grid; gap: 14px 28px; margin: 0; padding-left: 1.6em; color: var(--ink); }
@media (min-width: 640px) { .sc-items { grid-template-columns: 1fr 1fr; } }
.sc-item { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: end; }
.sc-mixed { font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
.sc-tiles { display: inline-flex; gap: 3px; letter-spacing: 0; }
.sc-tile { display: inline-flex; width: 1.6em; height: 1.8em; align-items: center; justify-content: center; border: 1.5px solid var(--ink); border-radius: 4px; }
.sc-line { border-bottom: 1.5px solid var(--ink); min-width: 6em; height: 1.4em; }
.sc-clue { grid-column: 1 / -1; font-size: 0.9rem; color: var(--body); }
.sc-key .sc-answer { font-weight: 700; color: var(--p-700); }
.st-score { margin: -8px 0 10px; text-align: right; color: var(--ink); font-weight: 500; }
.st-items { margin: 0; padding-left: 1.8em; color: var(--ink); }
.st-write { display: grid; gap: 20px 32px; }
@media (min-width: 640px) { .st-write { grid-template-columns: 1fr 1fr; } }
.st-write .st-item { display: flex; align-items: end; gap: 8px; }
.st-line { flex: 1; border-bottom: 1.5px solid var(--ink); height: 1.8em; }
.st-bonus { font-size: 0.8rem; color: var(--muted); }
.st-choice { display: grid; gap: 12px; }
.st-choices { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.st-option { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.st-bubble { display: inline-flex; width: 1.4em; height: 1.4em; align-items: center; justify-content: center; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 0.75rem; color: var(--muted); }
.st-read { margin: 0; padding-left: 1.8em; display: grid; gap: 8px; color: var(--ink); line-height: 1.45; }
.st-read-answer { font-weight: 700; color: var(--p-700); }
.fc-pages { display: grid; gap: 24px; min-width: 0; }
.fc-page { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.fc-page-label { margin: 0 0 10px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.fc-grid { display: grid; grid-template-columns: 1fr 1fr; }
.fc-card { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 10px; border: 1px dashed #999; text-align: center; color: var(--ink); }
.fc-per-4 .fc-card { min-height: 220px; }
.fc-per-6 .fc-card { min-height: 160px; }
.fc-text { font-size: 2.2rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.fc-back .fc-text, .fc-text.fc-long { font-size: 1.15rem; font-weight: 500; }
.fc-upper .fc-front .fc-text { text-transform: uppercase; }
.fc-empty { border-color: #eee; }
.studio { display: grid; gap: 24px; margin: 8px 0 40px; }
@media (min-width: 900px) { .studio { grid-template-columns: minmax(280px, 380px) 1fr; align-items: start; } }
.studio-count { margin: 0; font-weight: 600; color: var(--p-700); }
.studio-tools { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .studio-tools { grid-template-columns: 1fr 1fr; } }
.studio-tool { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.studio-tool h2 { margin: 0; font-size: 1.15rem; }
.studio-tool p { margin: 0 0 6px; color: var(--body); font-size: 0.95rem; flex: 1; }
.studio-tool .btn { align-self: flex-start; }
.studio-day { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-600); }
@media print {
  .cw-grid svg { width: auto; max-width: 6.8in !important; max-height: 5.4in; }
  .cw-key-grid svg { max-height: 8.5in; }
  .cw-clues { grid-template-columns: 1fr 1fr; font-size: 10.5pt; }
  .cw-clues h3 { font-size: 12pt; }
  .sc-items { grid-template-columns: 1fr 1fr; gap: 0.28in 0.4in; font-size: 13pt; }
  .st-write { grid-template-columns: 1fr 1fr; gap: 0.3in 0.4in; font-size: 13pt; }
  .st-choice { gap: 0.18in; font-size: 13pt; }
  .st-read { font-size: 12pt; }
  .fc-pages { display: block; }
  .fc-page { padding: 0; border: 0; border-radius: 0; box-shadow: none; break-after: page; }
  .fc-page:last-child { break-after: auto; }
  .fc-grid { width: 7.2in; }
  .fc-card { min-height: 0; height: 2.3in; }
  .fc-per-6 .fc-card { height: 3.05in; }
  .fc-per-4 .fc-card { height: 4.6in; }
  .fc-text { font-size: 30pt; }
  .fc-per-4 .fc-text { font-size: 48pt; }
  .fc-back .fc-text, .fc-text.fc-long { font-size: 14pt; }
}

/* /50-states-quiz, /states-and-capitals-quiz (GameType::MapQuiz): the game's tile map (games/map-quiz.js), every state
   one square, then the blank map test and its key (tools/map-quiz-print.js). Print shows the two sheets alone, one to a
   page, 180 x 250 mm so they fit both US Letter and A4 inside 12 mm margins. */
.gm-map, .gm-map * { box-sizing: border-box; }
.gm-map { display: grid; gap: 14px; width: 100%; min-width: 0; color: var(--ink); }
.gm-map-prompt { display: grid; gap: 2px; justify-items: center; padding: 14px 16px; text-align: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.gm-map-ask { margin: 0; color: var(--muted); font-size: 1rem; font-weight: 500; }
.gm-map-q { margin: 0; min-height: 1.15em; font-size: clamp(1.7rem, 7vw, 2.8rem); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.gm-map-note { margin: 0; min-height: 1.4em; color: var(--s-600); font-size: 0.95rem; font-weight: 600; }
.gm-map--right .gm-map-prompt { border-color: var(--ok); }
.gm-map--wrong .gm-map-prompt { border-color: var(--bad); }
.gm-map-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gm-map-choice { min-height: 56px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 1.15rem; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.gm-map-choice:hover { border-color: var(--p-300); }
.gm-map-choice:focus-visible { outline: 3px solid var(--p-300); outline-offset: 2px; }
.gm-map-choice.gm-map-good { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.gm-map-choice.gm-map-bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.gm-map-grid {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  gap: clamp(2px, 0.6vw, 5px); width: 100%; aspect-ratio: var(--cols) / var(--rows); margin: 0 auto;
  max-width: min(calc(var(--cols) * 76px), calc(62vh * var(--cols) / var(--rows)));
}
.gm-map--capitals .gm-map-grid, .gm-map--states .gm-map-grid { max-width: min(calc(var(--cols) * 52px), calc(40vh * var(--cols) / var(--rows))); }
.gm-map-tile {
  display: grid; place-items: center; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: clamp(3px, 1vw, 8px);
  background: var(--p-200); color: var(--p-900); font: inherit; font-size: clamp(0.55rem, 2.3vw, 1.05rem); font-weight: 700; line-height: 1;
}
button.gm-map-tile { cursor: pointer; }
button.gm-map-tile:hover { background: var(--p-300); }
button.gm-map-tile:focus-visible { outline: 3px solid var(--p-500); outline-offset: 1px; }
.gm-map--find .gm-map-code { visibility: hidden; }
.gm-map--find .gm-map-found .gm-map-code, .gm-map--find .gm-map-show .gm-map-code, .gm-map--find .gm-map-bad .gm-map-code { visibility: visible; }
.gm-map-tile.gm-map-off { background: #f1eff7; color: #b9b4c9; }
.gm-map-tile.gm-map-found { background: var(--ok-bg); color: var(--ok); }
.gm-map-tile.gm-map-now { background: var(--p-600); color: #fff; }
.gm-map-tile.gm-map-show { background: var(--ok); color: #fff; animation: gm-map-pulse 0.6s ease-in-out 2; }
.gm-map-tile.gm-map-bad { background: var(--bad); color: #fff; }
@keyframes gm-map-pulse { 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .gm-map-tile.gm-map-show { animation: none; } }

.mq-print { margin: 40px 0 8px; }
.mq-print h2 { margin: 0 0 8px; }
.mq-print-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 12px 0 20px; }
.mq-field { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink); font-size: 0.95rem; font-weight: 600; }
.mq-field select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 400; }
.mq-sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.mq-sheet { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #000; }
.mq-sheet-title { margin: 0; text-align: center; font-size: 1.3rem; color: #000; }
.mq-name, .mq-do { margin: 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.mq-map { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 520px; aspect-ratio: 11 / 8; margin: 0 auto; }
.mq-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; border: 1.5px solid #000; border-radius: 2px; font-size: clamp(0.5rem, 1.4vw, 0.75rem); line-height: 1.05; }
.mq-key .mq-num { font-size: 0.8em; color: #555; }
.mq-tile.mq-off { border-color: #c8c8c8; background: #eee; color: transparent; }
.mq-lines { margin: 0; padding: 0; columns: 3; column-gap: 1.4em; font-size: 0.8rem; }
.mq-caps .mq-lines { columns: 2; }
.mq-lines li { break-inside: avoid; padding: 3px 0; white-space: nowrap; overflow: hidden; }
.mq-n { display: inline-block; min-width: 1.9em; font-variant-numeric: tabular-nums; }
.mq-lines li[hidden] { display: none; }
.mq-line { display: inline-block; width: calc(100% - 2.3em); height: 1em; border-bottom: 1px solid #000; vertical-align: bottom; }
.mq-cap { display: none; }
.mq-caps .mq-cap { display: inline; }
.mq-caps .mq-line { width: calc(50% - 1.6em); }
.mq-caps .mq-cap .mq-line { margin-left: 0.8em; }
.mq-sheet, .mq-sheet * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
@page mq-sheet { size: auto; margin: 12mm; }
@media print {
  body:has(.mq-print) .embed-box, body:has(.mq-print) .wrap:has(> .embed-box) { display: none !important; }
  .mq-print { margin: 0; }
  .mq-sheets { display: block; }
  .mq-sheet { page: mq-sheet; width: 180mm; height: 246mm; margin: 0 auto; padding: 0; gap: 3mm; border: 0; border-radius: 0; overflow: hidden; break-inside: avoid; }
  .mq-sheet + .mq-sheet { break-before: page; }
  .mq-sheet-title { font-size: 16pt; }
  .mq-name, .mq-do { font-size: 10pt; }
  .mq-name { margin-top: 2mm; }
  .mq-map { width: 140mm; max-width: none; gap: 1mm; }
  .mq-caps .mq-map { width: 100mm; }
  .mq-tile { font-size: 10pt; }
  .mq-key .mq-tile { font-size: 9pt; }
  .mq-lines { margin-top: 2mm; font-size: 11pt; }
  .mq-lines li { height: 6mm; padding: 0; line-height: 6mm; }
  .mq-caps .mq-lines { font-size: 10pt; }
  .mq-caps .mq-lines li { height: 5.2mm; line-height: 5.2mm; }
}

/* /review-game-maker, /classroom-review-game, /math-review-game (tools/review-game-maker.js): the bar, the teams, then
   the board, a column a category; an open question fills the screen. Full screen keeps the game alone. Below it, the
   setup (editor, paste box, link). Print shows only the question list and the team answer sheet (.rg-print). */
.rg { display: grid; gap: 14px; margin: 8px 0 24px; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.rg .btn { min-height: 44px; }
.rg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rg-title { margin: 0; flex: 1 1 200px; font-size: 1.4rem; color: var(--ink); overflow-wrap: anywhere; }
.rg-play { margin: 0; color: var(--muted); }
.rg-play strong { color: var(--p-700); }
.rg-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.rg-teams { display: flex; flex-wrap: wrap; gap: 10px; }
.rg-team { flex: 1 1 140px; display: grid; gap: 4px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.rg-team.is-lead { border-color: var(--a-500); background: #f0fdfa; }
.rg-team-name { width: 100%; min-height: 44px; box-sizing: border-box; padding: 4px 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; font: inherit; font-weight: 700; color: var(--ink); text-align: center; }
.rg-team-name:hover, .rg-team-name:focus { border-color: var(--line); background: #fff; }
.rg-team-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rg-score { font-size: 1.8rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.rg-pm { min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--p-200); border-radius: 999px; background: var(--p-50); color: var(--p-700); font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.rg-pm:hover { background: var(--p-100); }
.rg-board { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 6px; }
.rg-cat { display: grid; place-items: center; min-height: 56px; padding: 6px 4px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; font-size: clamp(0.72rem, 1.6vw, 1rem); line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.rg-tile { min-height: 64px; padding: 4px; border: 0; border-radius: 10px; background: var(--p-600); color: #fff; font: inherit; font-weight: 700; font-size: clamp(1.1rem, 3.2vw, 2.2rem); font-variant-numeric: tabular-nums; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.rg-tile:hover { background: var(--p-700); }
.rg-tile:active { transform: scale(0.97); }
.rg-tile:focus-visible, .rg-pm:focus-visible { outline: 4px solid #f59e0b; outline-offset: 2px; }
.rg-tile.is-used { background: var(--p-100); }
.rg-none { background: transparent; border: 1px dashed var(--line); cursor: default; }
.rg-empty { grid-column: 1 / -1; margin: 0; padding: 32px 12px; text-align: center; color: var(--muted); }
.rg-q { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; overflow-y: auto; background: var(--ink); color: #fff; text-align: center; }
.rg-q[hidden] { display: none; }
.rg-q-head { margin: 0; font-size: clamp(1rem, 2.4vw, 1.5rem); font-weight: 600; color: var(--p-200); }
.rg-double { margin: 0; padding: 6px 18px; border-radius: 999px; background: #f59e0b; color: var(--ink); font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 700; animation: np-pop 0.35s ease-out; }
.rg-double[hidden], .rg-answer[hidden], .rg-q .btn[hidden] { display: none; }
.rg-q-text { max-width: 30em; margin: 0; font-size: clamp(1.8rem, 5vw, 4rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.rg-answer { max-width: 30em; margin: 0; padding: 10px 22px; border-radius: 14px; background: rgb(255 255 255 / 0.1); color: #fde68a; font-size: clamp(1.6rem, 4.4vw, 3.4rem); font-weight: 700; overflow-wrap: anywhere; }
.rg-q-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rg-q-buttons .btn { font-size: 1.1rem; }
.rg-q-teams { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rg-q-team { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 14px; background: rgb(255 255 255 / 0.08); }
.rg-q-name { max-width: 9em; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-q-score { min-width: 3ch; font-weight: 700; font-variant-numeric: tabular-nums; }
.rg-q .rg-pm { border-color: rgb(255 255 255 / 0.3); background: rgb(255 255 255 / 0.12); color: #fff; }
.rg-keys { margin: 0; font-size: 0.85rem; color: var(--p-200); }
.rg:fullscreen { align-content: start; overflow-y: auto; border: 0; border-radius: 0; box-shadow: none; background: var(--bg); padding: 2vh 2vw; }
.rg:fullscreen .rg-title { font-size: 3.4vh; }
.rg:fullscreen .rg-cat { min-height: 9vh; font-size: 2.6vh; }
.rg:fullscreen .rg-tile { min-height: 11vh; font-size: 5.5vh; }
.rg:fullscreen .rg-score { font-size: 4vh; }
.rg-setup { display: grid; gap: 12px; margin: 0 0 32px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.rg-setup h2 { margin: 0; font-size: 1.3rem; }
.rg-setup h3 { margin: 10px 0 0; font-size: 1.05rem; }
.rg-setup .wsm-hint { margin: 0; }
.rg-setup .chip { min-height: 44px; cursor: pointer; font: inherit; font-size: 0.9rem; }
.rg-setup .btn { min-height: 44px; }
.rg-setup-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; }
.rg-setup-row .wsm-field { flex: 1 1 180px; }
.rg-tests { margin-top: 14px; }
.rg-tests ul { list-style: none; margin: 0; padding: 0; }
.rg-setup .wsm-field select, .rg-setup .wsm-field input { min-height: 44px; }
.rg-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rg-ed-cat { display: grid; gap: 6px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.rg-ed-cat legend { padding: 0 4px; font-weight: 600; color: var(--ink); }
.rg-ed-row { display: grid; grid-template-columns: 64px minmax(0, 1.4fr) minmax(0, 1fr); gap: 6px; }
.rg-ed-cat input { width: 100%; min-height: 44px; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.rg-ed-name { font-weight: 600; }
.rg-ed-cat .chip { justify-self: start; }
.rg-notes { margin-top: 8px; }
.rg-print { display: none; }
@media (max-width: 560px) {
  .rg { padding: 12px 8px; }
  .rg-board { gap: 4px; }
  .rg-tile { min-height: 48px; }
  .rg-ed-row { grid-template-columns: 56px minmax(0, 1fr); }
  .rg-ed-a { grid-column: 2; }
}
@media print {
  .rg-print { display: block; color: #000; }
  .rg-print h2 { margin: 0 0 0.15in; font-size: 18pt; }
  .rg-print-page + .rg-print-page { break-before: page; }
  .rg-print:not(.has-sheet) .rg-print-answers { display: none; }
  .rg-print-cat { break-inside: avoid; margin-bottom: 0.15in; }
  .rg-print-cat h3 { margin: 0 0 4pt; font-size: 13pt; }
  .rg-print-cat ol { margin: 0; padding: 0; list-style: none; }
  .rg-print-cat li { display: grid; grid-template-columns: 0.9in 1fr; gap: 0 8pt; padding: 3pt 0; border-bottom: 0.5pt solid #ccc; font-size: 11pt; }
  .rg-print-a { grid-column: 2; font-weight: 700; }
  .rg-print-value { font-weight: 700; }
  .rg-print-team { font-size: 12pt; margin: 0 0 0.15in; }
  .rg-print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.1in 0.3in; }
  .rg-print-line { display: flex; align-items: end; gap: 8pt; margin: 0; height: 0.32in; border-bottom: 0.5pt solid #000; font-size: 10pt; }
}

/* /brain-break-board and its deck pages (tools/brain-break-board.js): the deck chips, one big card (two sides for
   would you rather and this or that, four corners, or one question), the buttons and the 1-minute timer. Full screen
   keeps the board alone. Print shows only the deck's list (.bb-list). */
.bb { display: grid; gap: 14px; margin: 8px 0 24px; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.bb .btn, .bb .chip { min-height: 44px; font: inherit; cursor: pointer; }
.bb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.bb-decks { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-young { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--ink); cursor: pointer; }
.bb-young input { width: 22px; height: 22px; }
.bb-card { display: grid; align-content: center; justify-items: center; gap: 18px; min-height: 340px; padding: 24px 16px; border-radius: 18px; background: var(--ink); color: #fff; text-align: center; }
.bb-deck-name { margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.7rem); font-weight: 600; color: var(--p-200); }
.bb-q { max-width: 26em; margin: 0; font-size: clamp(1.6rem, 4.4vw, 3.4rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.bb-answer { margin: 0; padding: 10px 22px; border-radius: 14px; background: rgb(255 255 255 / 0.1); color: #fde68a; font-size: clamp(1.4rem, 4vw, 3rem); font-weight: 700; animation: np-pop 0.35s ease-out; }
.bb-sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 12px; width: 100%; }
.bb-side { display: grid; align-content: center; gap: 10px; padding: 20px 14px; border-radius: 16px; }
.bb-left { background: #0f766e; }
.bb-right { background: #c2410c; }
.bb-go { font-size: clamp(0.9rem, 1.8vw, 1.2rem); font-weight: 600; opacity: 0.9; }
.bb-choice { font-size: clamp(1.4rem, 3.8vw, 3rem); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.bb-or { align-self: center; font-size: clamp(1.1rem, 2.6vw, 1.8rem); font-weight: 700; color: var(--p-200); }
.bb-corners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin: 0; padding: 0; list-style: none; counter-reset: corner; }
.bb-corner { counter-increment: corner; padding: 14px 12px; border-radius: 14px; background: rgb(255 255 255 / 0.1); font-size: clamp(1.1rem, 3vw, 2.2rem); font-weight: 700; overflow-wrap: anywhere; }
.bb-corner::before { content: 'Corner ' counter(corner); display: block; font-size: 0.55em; font-weight: 600; color: var(--p-200); }
.bb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bb-controls .btn[hidden] { display: none; }
.bb-count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.bb-timer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bb-clock { min-width: 4ch; font-size: 2rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.bb-timer.is-done .bb-clock { color: #e11d48; }
.bb-keys { margin: 0; font-size: 0.85rem; color: var(--muted); }
.bb:fullscreen { align-content: start; overflow-y: auto; border: 0; border-radius: 0; box-shadow: none; background: var(--bg); padding: 2vh 2vw; }
.bb:fullscreen .bb-card { min-height: 66vh; }
.bb:fullscreen .bb-q { font-size: 6vh; }
.bb:fullscreen .bb-choice { font-size: 5.5vh; }
.bb:fullscreen .bb-clock { font-size: 5vh; }
.bb-list ol { padding-left: 1.6em; }
.bb-list li { margin: 0 0 6px; }
.bb-list-a { color: var(--muted); }
.bb-list-grade { font-size: 0.85em; color: var(--muted); }
.bb-notes { margin-top: 8px; }
@media (max-width: 560px) {
  .bb { padding: 12px 8px; }
  .bb-card { min-height: 260px; padding: 16px 10px; }
  .bb-sides { grid-template-columns: 1fr; }
  .bb-corners { grid-template-columns: 1fr; }
  .bb-count { margin-left: 0; }
}
@media print {
  .bb-list { color: #000; font-size: 11pt; }
  .bb-list h2 { margin: 0 0 0.15in; font-size: 18pt; }
  .bb-list li { break-inside: avoid; }
  .bb-list-a, .bb-list-grade { color: #333; }
}

/* /voice-level-chart, /group-role-cards, /transition-cards (ClassroomCards): the controls, then the sheets as they print.
   Print shows the sheets alone, one to a page, 180 x 250 mm so they fit both US Letter and A4 inside 12 mm margins. */
.cards-tool { display: grid; gap: 16px; margin: 8px 0 40px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cards-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cards-controls .btn { margin-left: auto; }
.cards-controls .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.cards-check { display: inline-flex; align-items: center; gap: 6px; }
.cards-check input { accent-color: var(--p-600); }
.cards-field { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; }
.cards-field input { width: 70px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: center; }
.cards-count { margin: 0; color: var(--muted); font-size: 0.88rem; }
.cards-sheet { width: 100%; max-width: 640px; margin: 0 auto; aspect-ratio: 180 / 250; display: flex; flex-direction: column; gap: 3%; padding: 3%; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #000; container-type: inline-size; }
.cards-sheet[hidden], .cards-card[hidden] { display: none; }
.cards-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 3cqw; }
.cards-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqw; padding: 3cqw; border: 1.2cqw solid var(--card); border-radius: 4cqw; text-align: center; }
.card-icon { width: 18cqw; height: 18cqw; flex: none; }
.cards-tool, .cards-tool * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cards-notes { margin-top: 8px; }
/* Voice levels: one row a level, the number in a coloured square. */
.vl-title { margin: 0; font-size: 8cqw; font-weight: 700; text-align: center; }
.vl-levels { flex: 1; display: grid; grid-auto-rows: 1fr; gap: 2cqw; margin: 0; padding: 0; list-style: none; }
.vl-level { display: flex; align-items: center; gap: 4cqw; padding: 0 4cqw 0 0; border: 1cqw solid var(--card); border-radius: 4cqw; overflow: hidden; }
.vl-num { align-self: stretch; display: grid; place-items: center; width: 24cqw; background: var(--card); color: #fff; font-size: 17cqw; font-weight: 700; line-height: 1; }
.vl-level .card-icon { width: 15cqw; height: 15cqw; }
.vl-words { display: grid; gap: 1cqw; }
.vl-name { font-size: 7cqw; font-weight: 700; color: var(--card); line-height: 1.1; }
.vl-line { font-size: 3.6cqw; }
/* Role cards: six a page, each with its job and a thing to say. */
.rc-sheet + .rc-sheet { display: none; }
.rc-group { margin: 0; font-size: 4cqw; font-weight: 700; }
.rc-name { font-size: 6cqw; font-weight: 700; color: var(--card); line-height: 1.1; }
.rc-job { font-size: 3.2cqw; }
.rc-says { font-size: 3.2cqw; font-style: italic; }
/* Transition cards: a big number or an icon; the first-then board is two boxes. */
.tc-sheet + .tc-sheet { margin-top: 8px; }
.tc-big { font-size: 22cqw; font-weight: 700; line-height: 1; color: var(--card); }
.tc-name { font-size: 6cqw; font-weight: 700; color: var(--card); line-height: 1.1; }
.tc-box { flex: 1; display: flex; flex-direction: column; border: 1.2cqw solid var(--card); border-radius: 4cqw; overflow: hidden; }
.tc-box-head { padding: 2cqw 4cqw; background: var(--card); color: #fff; font-size: 9cqw; font-weight: 700; }
/* Under each tool page (tools/_page_end): the questions teachers ask, each opening on a click, and the day it last changed. */
.tool-faq { margin: 8px 0 16px; }
.tool-faq details { border-bottom: 1px solid var(--line); }
.tool-faq summary { cursor: pointer; padding: 10px 0; }
.tool-faq summary h3 { display: inline; margin: 0; font-size: 1rem; }
.tool-faq details p { margin: 0 0 12px; }
.tool-updated { margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; }
/* The last block of a tool page, above the footer: the same space as the end of .page. */
.tool-end { padding-bottom: 72px; }
/* The line after a board tool to a printable for the class (tools/_companion). */
.tool-companion { margin: 0 0 24px; font-size: 0.95rem; color: var(--muted); }
/* The language switcher of a tool page that comes in other languages (tools/_langs). */
.tool-langs { margin: -8px 0 12px; font-size: 0.85rem; color: var(--muted); }
.tool-langs a { color: var(--muted); }
.tool-langs a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }
@page cards-sheet { size: auto; margin: 12mm; }
@media print {
  .cards-tool { display: block; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .cards-controls, .cards-count, .cards-notes { display: none !important; }
  .cards-sheet { page: cards-sheet; width: 180mm; max-width: none; height: 250mm; aspect-ratio: auto; margin: 0 auto; padding: 0; border: 0; border-radius: 0; break-inside: avoid; }
  .cards-sheet + .cards-sheet { break-before: page; }
  .rc-sheet + .rc-sheet { display: flex; }
  .cards-sheet[hidden], .rc-sheet + .rc-sheet[hidden] { display: none; }
  .tc-sheet + .tc-sheet { margin-top: 0; }
}

/* /classroom-tools: a card for each tool, with its drawing (src/tools/thumbs.tsx) on top. */
.prose ul.tool-cards { max-width: none; list-style: none; margin: 18px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.prose ul.tool-cards li { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); transition: transform 0.15s ease; }
.prose ul.tool-cards li:hover { transform: translateY(-2px); }
.tool-thumb { display: block; line-height: 0; border-bottom: 1px solid var(--line); }
.tool-thumb svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.tool-card-body { padding: 14px 16px 16px; }
.prose .tool-card-body h3 { margin: 0 0 6px; font-size: 1.1rem; }
.prose .tool-card-body h3 a { color: var(--ink); text-decoration: none; }
.prose .tool-card-body h3 a:hover { color: var(--p-600); }
.prose .tool-card-body p { margin: 0; font-size: 0.92rem; }
.prose .tool-card-body .tool-pages { margin-top: 8px; font-size: 0.85rem; }
@media (max-width: 560px) {
  .prose ul.tool-cards li { flex-direction: row; }
  .tool-thumb { flex: 0 0 112px; border-bottom: 0; border-right: 1px solid var(--line); }
  .tool-thumb svg { height: 100%; aspect-ratio: auto; min-height: 90px; }
  .tool-card-body { padding: 12px 14px; }
}

/* The site-wide sound control on tool pages (src/tools/sound-control.tsx): mute and volume. */
.sound-control { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sound-control .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.sound-volume { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.sound-volume input { width: 110px; accent-color: var(--p-600); }

/* Page heroes: the Skills, Curricula and Pricing pages open with a soft band, a kicker and the title. */
.page-hero { margin: 4px 0 32px; padding: 34px 36px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(700px 300px at 100% 0%, #ede9fe 0%, transparent 70%), radial-gradient(500px 260px at 0% 100%, #ffedd5 0%, transparent 70%), #fff; }
.page-hero h1 { margin: 6px 0 10px; text-wrap: balance; }
.page-hero-kicker { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--s-100); color: #9a3412; font-size: 0.8rem; font-weight: 600; }
@media (max-width: 640px) { .page-hero { padding: 24px 20px; border-radius: 18px; } }

/* /skills: a sticky list of groups beside the groups' cards; on a phone the list is a row of chips. */
.skills-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.skill-jump { position: sticky; top: 88px; display: grid; gap: 18px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; scrollbar-width: thin; }
.skill-jump h2 { margin: 0 10px 6px; color: var(--tone-ink); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; }
.skill-jump a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; color: var(--ink); font-size: 0.9rem; font-weight: 500; line-height: 1.35; text-decoration: none; }
.skill-jump a:hover { background: var(--tone-bg); color: var(--tone-ink); }
.skill-jump small { color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.skill-group { scroll-margin-top: 90px; }
.skill-group + .skill-group { margin-top: 48px; }
.skill-group-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 20px; margin-bottom: 16px; padding-left: 16px; border-left: 4px solid var(--tone); }
.skill-group-head h2 { font-size: 1.45rem; }
.skill-group-subject { color: var(--tone-ink); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; }
.skill-group-meta { margin-top: 2px; color: var(--muted); font-size: 0.88rem; }
.skill-group-head .text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--tone-ink); text-decoration: none; white-space: nowrap; }
.skills-main .hub-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.skill-card { display: flex; gap: 6px; }
.skill-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.skill-card-foot { display: flex; align-items: center; gap: 10px; white-space: nowrap; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.skill-card-grades { padding: 2px 10px; white-space: nowrap; border-radius: 999px; background: var(--tone-bg); color: var(--tone-ink); font-weight: 600; }
.skill-card-foot .icon { margin-left: auto; color: var(--tone); opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; }
.skill-card:hover .skill-card-foot .icon { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .skills-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .skill-jump > div { min-width: 0; }
  .skill-jump { position: static; max-height: none; overflow: visible; padding: 0; border: 0; background: none; }
  .skill-jump ul { display: flex; gap: 8px; margin: 0 -20px; padding: 0 20px 4px; overflow-x: auto; scrollbar-width: none; }
  .skill-jump h2 { margin: 0 0 8px; }
  .skill-jump a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; white-space: nowrap; }
}

/* /curricula */
.curricula-by-grade { margin-top: 48px; }
.curricula-by-grade h2 { margin: 0 0 4px; font-size: 1.25rem; }
.curricula-by-grade .hub-grades { max-width: none; margin-top: 10px; }
.curricula-by-grade .hub-grades > span { min-width: 9.5em; color: var(--ink, inherit); }
.curricula-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.curriculum-card { gap: 10px; padding: 24px; }
.curriculum-card h2 { font-size: 1.4rem; }
.curriculum-card > p { color: var(--muted); font-size: 0.95rem; }
.curriculum-card-top { display: flex; align-items: center; gap: 12px; }
.curriculum-badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--tone-bg); color: var(--tone-ink); font-weight: 700; letter-spacing: 0.02em; }
.curriculum-place { color: var(--muted); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.curriculum-subjects { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.curriculum-subjects li { padding: 3px 10px; border-radius: 999px; background: var(--p-50); color: var(--body); font-size: 0.8rem; font-weight: 500; }
.curriculum-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.curriculum-card-foot strong { color: var(--ink); font-weight: 600; }
.curriculum-go { display: inline-flex; align-items: center; gap: 4px; color: var(--tone-ink); font-weight: 600; }
.curriculum-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; counter-reset: step; }
.curriculum-steps li { position: relative; padding: 22px 22px 22px 70px; border-radius: var(--radius); background: #f7f5fe; counter-increment: step; }
.curriculum-steps li::before { content: counter(step); position: absolute; top: 20px; left: 22px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--p-600); color: #fff; font-weight: 700; }
.curriculum-steps h3 { margin-bottom: 4px; }
.curriculum-steps p { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 820px) { .curriculum-steps { grid-template-columns: minmax(0, 1fr); } }

/* /pricing */
.pricing-hero { margin: 8px auto 36px; max-width: 760px; text-align: center; }
.pricing-hero h1 { margin: 10px 0 12px; font-size: clamp(2rem, 4.8vw, 2.9rem); text-wrap: balance; }
.pricing-hero .lead { margin: 0 auto; }
.offer-art { display: block; width: min(220px, 60%); height: auto; margin: 0 auto 4px; border-radius: 28px; }
/* /parents, signed out: the waiting pill and the frosted price tag (a placeholder price; blur thins on hover or focus). */
.offer-waiting { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 14px; padding: 5px 14px 5px 10px; border: 1px solid #fed7aa; border-radius: 999px; background: var(--s-100); color: var(--s-600); font-size: 0.85rem; font-weight: 600; }
.offer-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--s-500); animation: offer-pulse 1.8s infinite; }
@keyframes offer-pulse { 0% { box-shadow: 0 0 0 0 rgb(249 115 22 / 0.5); } 70%, 100% { box-shadow: 0 0 0 9px rgb(249 115 22 / 0); } }
.offer-tag { position: relative; display: grid; gap: 4px; justify-items: center; width: min(340px, 100%); margin: 0 auto 22px; padding: 20px 24px 18px; overflow: hidden; background: var(--card); border: 2px solid #2e1065; border-radius: 22px; box-shadow: 6px 6px 0 var(--p-300); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.offer-label { color: var(--p-600); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.offer-row { display: flex; align-items: baseline; gap: 10px; }
.offer-was { color: var(--muted); font-size: 1.1rem; font-weight: 600; text-decoration: line-through 3px var(--s-500); filter: blur(7px); transition: filter 0.35s ease; }
.offer-now { color: var(--ink); font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; filter: blur(14px); transition: filter 0.35s ease; }
.offer-per { color: var(--muted); font-size: 0.9rem; }
.offer-lock { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.78rem; }
.offer-shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.85) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.offer-ribbon { position: absolute; top: 24px; right: -44px; width: 170px; padding: 3px 0; text-align: center; background: var(--s-500); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0; transform: rotate(35deg) translateY(-6px); transition: opacity 0.3s ease, transform 0.3s ease; }
.offer-tag:hover, .offer-tag:focus { transform: translateY(-4px) rotate(-1deg); box-shadow: 10px 10px 0 var(--s-500); outline: none; }
.offer-tag:focus-visible { outline: 3px solid var(--s-500); outline-offset: 4px; }
.offer-tag:hover .offer-now, .offer-tag:focus .offer-now { filter: blur(6px); }
.offer-tag:hover .offer-was, .offer-tag:focus .offer-was { filter: blur(2.5px); }
.offer-tag:hover .offer-shine, .offer-tag:focus .offer-shine { animation: offer-shine 0.9s ease forwards; }
.offer-tag:hover .offer-ribbon, .offer-tag:focus .offer-ribbon { opacity: 1; transform: rotate(35deg) translateY(0); }
@keyframes offer-shine { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .offer-pulse, .offer-tag:hover .offer-shine, .offer-tag:focus .offer-shine { animation: none; } .offer-tag { transition: none; } }
.pricing-hero > .btn { display: inline-flex; width: auto; min-width: 220px; margin-top: 20px; }
.pricing-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 18px; color: var(--ink); font-size: 0.9rem; font-weight: 500; }
.pricing-points li::before { content: '✓'; margin-right: 6px; color: var(--p-600); font-weight: 700; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0 0 64px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.plan-card h2 { margin: 0; color: var(--p-700); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.plan-for { margin-top: -6px; color: var(--muted); font-size: 0.9rem; }
.plan-main { border: 2px solid var(--p-600); background: linear-gradient(180deg, #f5f3ff 0%, #fff 45%); box-shadow: 0 24px 50px -22px rgb(124 58 237 / 0.5); }
.plan-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 4px 14px; border-radius: 999px; background: var(--p-600); color: #fff; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.plan-price { margin: 4px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 2.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); font-size: 0.95rem; font-weight: 500; letter-spacing: 0; }
.plan-alt { margin: -6px 0 0; padding: 6px 12px; align-self: start; border-radius: 999px; background: var(--p-100); color: var(--p-700); font-size: 0.88rem; font-weight: 600; }
.plan-main .plan-price { padding-bottom: 0; border-bottom: 0; }
.plan-main .plan-alt { margin: 0 0 4px; }
.pricing-faq { margin: 0 0 64px; }
.pricing-faq > h2 { margin-bottom: 20px; text-align: center; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq-grid > div { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq-grid h3 { margin-bottom: 6px; }
.faq-grid p { font-size: 0.95rem; }
.pricing-org { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px; align-items: start; padding: 36px; border-radius: 24px; background: radial-gradient(600px 280px at 100% 0%, #ede9fe 0%, transparent 70%), var(--p-50); scroll-margin-top: 90px; }
.pricing-org-intro h2 { margin-bottom: 10px; }
.pricing-org-intro > p { margin-bottom: 16px; }
.pricing-org .org-form, .pricing-org .pricing-sent { padding: 24px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.pricing-org .org-form button { padding: 12px 28px; }
@media (max-width: 900px) {
  .plans { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }
  .plan-main { order: -1; }
  .faq-grid, .pricing-org { grid-template-columns: minmax(0, 1fr); }
  .pricing-org { padding: 24px 20px; gap: 20px; }
}

/* Skill hubs: the hero with a fan of the first sheets, the sets, then about, levels, tips and curricula; where next is in the browse column. */
.hub-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: center; }
.hub-hero .page-hero-kicker { background: var(--tone-bg); color: var(--tone-ink); }
.hub-hero .lead { max-width: 62ch; }
.hub-hero .reviewed-by { margin-top: 14px; }
.hub-fan { position: relative; height: 250px; }
.hub-fan img { position: absolute; top: 50%; left: 50%; width: 58%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 18px 40px -18px rgb(76 29 149 / 0.5); }
.hub-fan img:nth-child(1) { transform: translate(-95%, -50%) rotate(-8deg); }
.hub-fan img:nth-child(2) { transform: translate(-50%, -54%) rotate(1deg); z-index: 1; }
.hub-fan img:nth-child(3) { transform: translate(-5%, -48%) rotate(8deg); }
.hub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 32px; }
.hub-set { scroll-margin-top: 90px; }
.hub-set:first-of-type { margin-top: 8px; }
.hub-about, .hub-notes-levels, .hub-tips-box, .hub-related { margin-top: 56px; }
.hub-about h2, .hub-notes-levels h2, .hub-tips-box h2, .hub-related h2 { margin-bottom: 14px; font-size: 1.35rem; }
.hub-about-text { display: grid; gap: 12px; max-width: 75ch; }
.hub-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 0; counter-reset: hub-step; }
.hub-steps li { position: relative; padding: 20px 20px 20px 66px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; counter-increment: hub-step; }
.hub-steps li::before { content: counter(hub-step); position: absolute; top: 18px; left: 20px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--p-600); color: #fff; font-weight: 700; }
.hub-steps h3 { margin-bottom: 4px; }
.hub-steps p { color: var(--body); font-size: 0.93rem; line-height: 1.55; }
.hub-tips-box { padding: 28px 30px; border-radius: 22px; background: radial-gradient(500px 240px at 100% 0%, #ffedd5 0%, transparent 70%), var(--p-50); }
.hub-tips-box .ticks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 32px; margin: 0; }
.hub-tips-box .ticks li { margin: 0; }
.hub-related { padding-top: 28px; border-top: 1px solid var(--line); }
.hub-related > p:first-of-type { max-width: 75ch; }
@media (max-width: 900px) {
  .hub-hero { grid-template-columns: minmax(0, 1fr); }
  .hub-fan { display: none; }
}

/* Tool embeds (src/tools/embed.tsx): the tool alone, for an iframe on another site, and the box with its code on the tool's page. */
body.embed { background: var(--bg, #fff); }
body.embed .page { padding-top: 12px; padding-bottom: 8px; }
body.embed .page > :not(section) { display: none; }
body.embed .page > section ~ section { display: none; }
.embed-credit { margin: 0; padding: 6px 16px 10px; text-align: center; font-size: 0.85rem; }
.embed-credit a { color: var(--muted); }
.embed-box { margin: 32px 0 8px; padding: 20px 24px; border-radius: 16px; background: var(--p-50); max-width: 75ch; }
.embed-box h2 { margin: 0 0 8px; font-size: 1.2rem; }
.embed-code { width: 100%; box-sizing: border-box; font: 0.85rem/1.4 ui-monospace, Menlo, Consolas, monospace; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: 10px; resize: vertical; background: #fff; }
.embed-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.embed-note { font-size: 0.9rem; color: var(--muted); margin: 10px 0 0; }

/* Save to Pinterest (src/views/layout.tsx, PinSave). */
.pin-save { display: flex; align-items: center; gap: 16px; margin: 32px 0 8px; padding: 14px 18px; border-radius: 16px; background: var(--p-50); max-width: 75ch; }
.pin-save img { flex: none; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.pin-save p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* College app (/college and /college/<college>): fixed sidebar to choose, page beside it; a drawer on phones. */
.college-app { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.college-side { position: sticky; top: 64px; height: calc(100vh - 64px); display: grid; grid-template-rows: auto auto 1fr auto; background: var(--p-50); border-right: 1px solid var(--line); }
.college-side-top { display: grid; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.college-side .college-region { margin: 0; }
.college-side-close { display: none; justify-content: space-between; align-items: center; color: var(--ink); }
.college-side-close button { border: 0; background: var(--p-100); color: var(--p-700); border-radius: 10px; padding: 6px 12px; font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.college-find { position: relative; }
.college-find svg { position: absolute; left: 13px; top: 12px; color: var(--p-500); pointer-events: none; }
.college-find input { width: 100%; padding: 10px 12px 10px 40px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 0.95rem; }
.college-find input:focus { outline: none; border-color: var(--p-500); }
.college-filters { display: grid; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.college-filter { display: grid; gap: 6px; }
.college-filter > span, .college-filter > label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.college-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.college-tags button { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--body); font: inherit; font-size: 0.78rem; font-weight: 500; cursor: pointer; }
.college-tags button[aria-pressed="true"] { background: var(--p-100); border-color: var(--p-300); color: var(--p-700); font-weight: 600; }
.college-filter select { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 0.85rem; }
.college-list { overflow-y: auto; min-height: 0; padding: 4px 8px 10px; }
.college-list-head { display: flex; justify-content: space-between; padding: 6px 8px; font-size: 0.72rem; color: var(--muted); }
.college-list-head button { border: 0; background: none; color: var(--p-600); font: inherit; font-size: 0.72rem; font-weight: 600; padding: 0; cursor: pointer; }
.college-list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.college-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 11px; color: var(--ink); text-decoration: none; }
.college-item:hover { background: var(--card); }
.college-item[aria-current="page"] { background: var(--card); box-shadow: var(--shadow); }
.college-item strong { display: block; font-size: 0.88rem; font-weight: 600; line-height: 1.25; }
.college-item small { display: block; font-size: 0.74rem; color: var(--muted); line-height: 1.3; }
.college-mono { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--p-100); color: var(--p-700); font-size: 0.72rem; font-weight: 800; }
.college-item[aria-current="page"] .college-mono { background: var(--p-600); color: #fff; }
.college-dot { width: 8px; height: 8px; border-radius: 50%; }
.college-dot-open { background: var(--ok); } .college-dot-soon { background: var(--s-600); } .college-dot-passed { border: 1px solid var(--muted); }
.college-none { padding: 14px 10px; font-size: 0.85rem; color: var(--muted); }
.college-side-foot { padding: 10px 16px 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.college-side-foot > span { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.college-side-foot div { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.8rem; }
.college-side-foot a { color: var(--body); text-decoration: none; } .college-side-foot a:hover { color: var(--p-600); }
.college-main { min-width: 0; }
.college-picker { display: none; }
.college-article { padding: 24px 32px 56px; }
.college-article > .college-region { display: none; }
@media (max-width: 860px) { .college-article { padding: 18px 16px 44px; } }
.college-pane { max-width: 960px; margin: 0 auto; padding: 24px 32px 56px; display: grid; gap: 34px; }
.college-pane h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.college-sec { display: grid; gap: 12px; min-width: 0; }
.college-sec-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.college-sec-head h2 { margin: 0; font-size: 1.2rem; }
.college-sec-head span { font-size: 0.78rem; color: var(--muted); }
.college-sec h2#sources { font-size: 1.05rem; margin: 0; }
.college-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--p-600); }
.college-lede { margin: 0; max-width: 62ch; font-size: 1.02rem; }
.college-tip { margin: 0; padding: 12px 14px; border: 1px dashed var(--p-300); border-radius: 12px; font-size: 0.9rem; }
.college-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.college-head p { margin: 2px 0 0; font-size: 0.86rem; color: var(--muted); }
.college-badge { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: var(--p-600); color: #fff; font-weight: 800; font-size: 1.1rem; }
.college-pane .guide-answer { margin: 0; }
.college-pane .guide-byline { margin: 0; }
.college-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.college-card { padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; align-content: start; scroll-margin-top: 80px; }
.college-card-next { border: 2px solid var(--p-500); }
.college-card h3 { margin: 0; font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.college-date { font-size: 1.25rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.college-meta { font-size: 0.82rem; }
.college-pill { justify-self: start; display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.college-pill-open { background: var(--ok-bg); color: var(--ok); } .college-pill-soon { background: var(--s-100); color: var(--s-600); } .college-pill-passed { background: var(--line); color: var(--muted); }
.college-timeline { margin: 0; padding: 18px 18px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.college-timeline svg { display: block; min-width: 560px; width: 100%; height: auto; }
.college-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 0.76rem; color: var(--muted); }
.college-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.college-legend .due { background: var(--p-600); } .college-legend .aid { background: var(--s-600); } .college-legend .result { border: 2px solid var(--muted); }
.college-compare { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.college-compare th, .college-compare td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.college-compare thead th { font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); background: var(--p-50); }
.college-compare tr.me th, .college-compare tr.me td { background: var(--p-50); font-weight: 600; }
.college-faq { display: grid; gap: 8px; }
.college-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.college-faq summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; font-weight: 600; color: var(--ink); cursor: pointer; }
.college-faq summary::-webkit-details-marker { display: none; }
.college-faq summary::after { content: "+"; color: var(--p-600); font-weight: 700; }
.college-faq details[open] summary::after { content: "\2013"; }
.college-faq p { margin: 0; padding: 0 16px 14px; }
.college-agenda { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.college-agenda li + li { border-top: 1px solid var(--line); }
.college-agenda a { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 11px 16px; color: var(--body); text-decoration: none; }
.college-agenda a:hover { background: var(--p-50); }
.college-agenda strong { display: block; color: var(--ink); font-size: 0.94rem; }
.college-agenda a > span:nth-child(2) > span { font-size: 0.82rem; }
.college-cal { display: grid; text-align: center; line-height: 1.1; border-radius: 10px; border: 1px solid var(--p-200); overflow: hidden; }
.college-cal small { background: var(--p-600); color: #fff; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; padding: 2px 0; }
.college-cal b { font-size: 1.2rem; color: var(--ink); padding: 3px 0 4px; font-variant-numeric: tabular-nums; }
.college-months { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.college-months li { padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 2px; }
.college-months b { color: var(--ink); } .college-months span { font-size: 0.8rem; }
.college-months em { font-style: normal; font-size: 1.6rem; font-weight: 700; color: var(--p-600); line-height: 1.15; font-variant-numeric: tabular-nums; }
.college-guide-cards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.college-guide-cards a { height: 100%; display: grid; gap: 4px; align-content: start; padding: 14px 16px; border-radius: 14px; background: var(--p-50); color: var(--body); text-decoration: none; }
.college-guide-cards strong { color: var(--ink); } .college-guide-cards span { font-size: 0.82rem; }
.college-guide-cards a:hover strong { color: var(--p-600); }
.college-sources { margin: 0; }
@media (max-width: 860px) {
  .college-app { display: block; }
  .college-side { position: fixed; inset: 0; z-index: 60; height: 100dvh; border-right: 0; transform: translateX(-100%); transition: transform 0.22s ease; }
  .college-drawer-open .college-side { transform: none; }
  .college-side-close { display: flex; }
  .college-picker { display: flex; position: sticky; top: 64px; z-index: 10; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
  .college-picker button { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--p-200); background: var(--p-50); color: var(--ink); font: inherit; font-weight: 600; font-size: 0.92rem; text-align: left; cursor: pointer; }
  .college-picker button span { color: var(--p-600); font-size: 0.8rem; }
  .college-pane { padding: 18px 16px 44px; gap: 28px; }
  .college-pane h1 { font-size: 1.45rem; }
  .college-badge { width: 46px; height: 46px; font-size: 0.95rem; border-radius: 12px; }
  .college-agenda a { grid-template-columns: 48px 1fr; } .college-agenda a .college-pill { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .college-side { transition: none; } }

/* The college guides' terms dialog (college/_consent). */
.college-consent { box-sizing: border-box; width: min(560px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 0; border-radius: 18px; background: var(--card); color: var(--body); box-shadow: 0 24px 60px -20px rgb(31 22 55 / 0.45); }
.college-consent::backdrop { background: rgb(31 22 55 / 0.55); }
.college-consent h2 { margin: 0 0 10px; font-size: 1.25rem; color: var(--ink); }
.college-consent p { margin: 0 0 10px; line-height: 1.6; }
.college-consent-error { color: var(--bad); font-weight: 600; }
.college-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* College planning (/college, College). */
.college-region { display: grid; gap: 10px; margin: 0 auto 14px; }
.college-switch { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; justify-self: start; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 0.86rem; }
.college-switch a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.college-switch a:hover { color: var(--ink); background: var(--p-50); }
.college-switch a[aria-current="true"] { background: var(--p-100); color: var(--p-700); box-shadow: inset 0 0 0 1.5px var(--p-300); }
.college-flag { width: 26px; height: auto; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgb(31 22 55 / 0.12); }
.college-side .college-switch { display: grid; justify-self: stretch; }
/* The college app pages use the whole width: header and footer line up with the sidebar and page. */
.full-width .site-header > .wrap, .full-width .site-footer > .wrap { max-width: none; padding-left: 24px; padding-right: 24px; }
.college-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--p-50); border: 1px solid var(--p-200); color: var(--ink); font-size: 0.95rem; }
.college-hint[hidden] { display: none; }
.college-hint a { font-weight: 600; }
.college-hint button { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 2px 6px; cursor: pointer; }
.college-lede { font-size: 1.1rem; color: var(--ink); }
.college-guides, .college-related, .college-sources { padding-left: 20px; }
.college-guides li { margin: 0 0 12px; }
.college-sources li { margin: 0 0 6px; }
.fact-passed { padding: 1px 6px; border-radius: 6px; background: var(--line); color: var(--muted); font-size: 0.8em; }
.college-table td, .college-table th { vertical-align: top; }
.fact-unconfirmed { padding: 1px 6px; border-radius: 6px; background: var(--p-50); color: var(--p-700); font-size: 0.9em; white-space: nowrap; }

/* "How to teach" guides (src/views/teaching-guides.tsx). */
.guide-steps li { margin-bottom: 12px; }
.guide-grade { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--p-100); color: var(--p-700); font-size: 0.8rem; font-weight: 600; vertical-align: 1px; }
.teaching-guide .ws-grid { margin: 16px 0 8px; }
.guide-byline { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -4px 0 18px; font-size: 0.88rem; color: var(--muted); }
.guide-byline strong { color: var(--ink); font-weight: 600; }
.guide-answer { margin: 0 0 20px; padding: 16px 20px; border: 1px solid var(--p-200); border-radius: 14px; background: var(--p-50); }
.guide-answer strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--p-700); }
.guide-answer p { margin: 6px 0 0; color: var(--ink); font-size: 1.05rem; }
.guide-toc { margin: 8px 0 28px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.prose .guide-toc h2 { margin: 0 0 8px; font-size: 1rem; }
.prose .guide-toc ol { margin: 0; padding-left: 22px; columns: 2 16rem; column-gap: 28px; }
.guide-toc li { margin: 0 0 4px; break-inside: avoid; }
.prose ol.guide-path { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; counter-reset: none; }
.guide-path li { margin: 0; }
.guide-path a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.guide-path a:hover { border-color: var(--p-400); }
.guide-path-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--p-600); color: #fff; font-weight: 700; font-size: 0.9rem; }
.guide-path-t { font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.guide-path .guide-grade { margin: auto 0 0; align-self: flex-start; }
.guide-steps li { scroll-margin-top: 80px; }
.guide-figure { margin: 12px 0 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow-x: auto; contain: inline-size; }
.guide-figure .guide-wide { min-width: 520px; }
.prose ol.guide-order { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; flex-wrap: wrap; gap: 8px 26px; counter-reset: order; }
.guide-order li { position: relative; margin: 0; padding: 6px 12px 6px 40px; border-radius: 999px; background: var(--s-100); color: var(--ink); font-weight: 500; counter-increment: order; }
.guide-order li::before { content: counter(order); position: absolute; left: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--s-600); color: #fff; font-size: 0.8rem; font-weight: 700; }
.guide-order li:not(:last-child)::after { content: "→"; position: absolute; right: -20px; top: 50%; transform: translateY(-50%); color: var(--s-600); font-weight: 700; }
.guide-ages { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.guide-ages section { padding: 14px 16px; border: 1px solid var(--line); border-top: 4px solid var(--a-500); border-radius: 12px; background: var(--card); }
.prose .guide-ages h3 { margin: 0 0 6px; font-size: 1rem; }
.guide-ages p { margin: 0; font-size: 0.94rem; }
.guide-lesson { margin: 8px 0 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.prose .guide-lesson h3 { margin: 0 0 4px; }
.guide-lesson-meta { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.guide-lesson-meta .guide-grade { margin: 0; }
.guide-timebar { display: flex; gap: 3px; margin: 14px 0 16px; border-radius: 10px; overflow: hidden; font-size: 0.75rem; font-weight: 600; }
.guide-timebar span { min-width: 0; padding: 8px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); text-align: center; }
.guide-time-0 { background: var(--p-200); }
.guide-time-1 { background: #fed7aa; }
.guide-time-2 { background: #99f6e4; }
.guide-time-3 { background: #fbcfe8; }
.prose ol.guide-lesson-parts { list-style: none; padding: 0; margin: 0 0 12px; }
.guide-lesson-parts li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.guide-time-dot { position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%; }
.guide-lesson-min { color: var(--muted); font-size: 0.85rem; }
.guide-lesson-check { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ink); }
.guide-mistakes li::marker { color: var(--bad); }

/* Guide pages read like a script (2026-10-31): one centered column, larger type, each step a card of Do / Say / Ask /
   Child lines. */
.teaching-guide { font-size: 1.1875rem; }
.teaching-guide > * { max-width: 46rem; margin-left: auto; margin-right: auto; }
.teaching-guide p, .teaching-guide li { line-height: 1.7; max-width: none; }
.teaching-guide > p { max-width: 46rem; }
.prose.teaching-guide h2 { margin: 56px auto 16px; font-size: 1.6rem; scroll-margin-top: 80px; }
.prose.teaching-guide h3 { margin: 28px auto 8px; font-size: 1.2rem; }
.teaching-guide .ws-grid { max-width: none; }
.guide-head { text-align: center; margin-bottom: 28px; }
.guide-head .crumbs ol { justify-content: center; }
.guide-head h1 { margin: 12px 0 10px; }
.guide-head .guide-byline { justify-content: center; margin: 0; font-size: 0.95rem; }
/* The guide's picture (app/assets/images/guides), the same one as its row in the list of guides. */
.guide-hero { display: block; width: min(300px, 70%); height: auto; margin: 20px auto 0; border-radius: 20px; }
.teaching-guide .guide-answer { padding: 22px 26px; border-radius: 18px; }
.teaching-guide .guide-answer p { font-size: 1.3rem; line-height: 1.55; }
.teaching-guide .guide-toc { font-size: 1rem; }
.guide-key-caption { text-align: center; font-size: 1.25rem; color: var(--ink); }
.guide-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px auto 8px; }
.guide-key figure { margin: 0; padding: 18px; border: 2px solid var(--p-200); border-radius: 18px; background: var(--card); text-align: center; }
.guide-key figcaption { margin-bottom: 12px; font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.guide-key .method-figure { margin: 0 auto; }
.prose ol.guide-steps { list-style: none; padding: 0; display: grid; gap: 22px; }
.guide-step { margin: 0; padding: 24px 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); scroll-margin-top: 80px; }
.guide-step-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.guide-step-n { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--p-600); color: #fff; font-weight: 700; font-size: 1.2rem; }
.prose .guide-step-head h3 { margin: 0; font-size: 1.4rem; line-height: 1.3; flex: 1 1 12rem; }
.guide-step-head .guide-grade { margin: 0; }
.guide-step-goal { margin: 12px 0 16px; color: var(--muted); }
.prose ol.guide-script { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.guide-line { display: grid; grid-template-columns: 5.2rem 1fr; gap: 14px; align-items: baseline; margin: 0; }
.guide-role { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.guide-words { color: var(--ink); }
.guide-line-do .guide-role { background: var(--p-100); color: var(--p-700); }
.guide-line-say .guide-role, .guide-line-ask .guide-role { background: #ffedd5; color: #9a3412; }
.guide-line-say .guide-words, .guide-line-ask .guide-words { font-weight: 600; font-size: 1.12em; }
.guide-line-child .guide-role { background: #ccfbf1; color: #0f766e; }
.guide-line-child .guide-words { color: #0f766e; font-weight: 600; }
.guide-line-tip { margin-top: 4px; padding: 10px 12px; border-radius: 12px; background: var(--p-50); }
.guide-line-tip .guide-role { background: var(--card); color: var(--muted); }
.guide-line-tip .guide-words { color: var(--body); font-size: 0.95em; }
.teaching-guide .guide-step .guide-figure { margin: 16px 0 6px; text-align: center; }
.teaching-guide .guide-step .guide-figure .method-figure { margin: 0 auto; }
.guide-step-sheet { margin: 14px 0 0; font-size: 1rem; }
.guide-step-sheet a { display: inline-block; padding: 8px 14px; border-radius: 12px; background: var(--p-50); text-decoration: none; }
.guide-step-sheet a:hover { background: var(--p-100); }
.guide-taught { padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 1rem; }
.guide-taught summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.guide-fix { color: var(--muted); font-size: 1rem; }
@media (max-width: 640px) {
  .teaching-guide { font-size: 1.0625rem; }
  .guide-step { padding: 18px 16px; }
  .guide-line { grid-template-columns: 1fr; gap: 4px; }
}
.prose ul.guide-cards { list-style: none; padding: 0; margin: 12px 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; max-width: none; }
.guide-cards li { margin: 0; }
.guide-cards a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--body); text-decoration: none; box-shadow: var(--shadow); }
.guide-cards a:hover { border-color: var(--p-400); }
.guide-cards strong { color: var(--ink); }
.guide-cards span { font-size: 0.9rem; }
.guide-cards .guide-grade { margin: auto 0 0; align-self: flex-start; }
/* The guide pages as a lesson sheet (.guide-sheet, 2026-11-14): one narrow column, the short answer without a box, a
   step bar that stays under the header, steps divided by a rule with a large numeral and no card, the script as a
   label and its words, and the sample lesson as a sheet of paper. The college and math method pages share
   .teaching-guide and keep their own look. */
.teaching-guide.guide-sheet > * { max-width: 42rem; }
.teaching-guide.guide-sheet > .ws-grid { max-width: none; }
.teaching-guide.guide-sheet .guide-answer { margin: 0 auto 18px; padding: 0; border: 0; background: none; text-align: center; }
.teaching-guide.guide-sheet .guide-answer p { font-size: 1.4rem; font-weight: 500; line-height: 1.5; text-wrap: balance; }
.teaching-guide.guide-sheet .guide-toc { padding: 16px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.guide-stepnav { position: sticky; top: 65px; z-index: 5; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgb(252 251 255 / 0.94); backdrop-filter: blur(8px); font-size: 0.85rem; }
.guide-stepnav b { color: var(--ink); white-space: nowrap; }
.guide-stepnav a { flex: none; display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--p-200); border-radius: 999px; background: #fff; color: var(--p-700); font-weight: 600; text-decoration: none; white-space: nowrap; }
.guide-stepnav a:hover { border-color: var(--p-500); }
.guide-stepnav a[aria-current] { background: var(--p-600); border-color: var(--p-600); color: #fff; }
.prose.teaching-guide.guide-sheet h2, .guide-sheet .guide-step { scroll-margin-top: 136px; }
.prose.guide-sheet ol.guide-steps { gap: 0; }
.guide-sheet .guide-step { padding: 28px 0 30px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.guide-sheet .guide-step:first-child { padding-top: 8px; border-top: 0; }
.guide-sheet .guide-step-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; align-items: center; }
.guide-sheet .guide-step-n { grid-row: span 2; width: auto; height: auto; border-radius: 0; background: none; color: var(--p-300); font-size: 3.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.guide-sheet .guide-step-head .guide-grade { justify-self: start; margin-top: 4px; }
.prose.guide-sheet ol.guide-script { gap: 0; }
.guide-sheet .guide-line { grid-template-columns: 4rem minmax(0, 1fr); gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.guide-sheet .guide-line:last-child { border-bottom: 0; }
.guide-sheet .guide-line .guide-role { justify-self: end; padding: 0; background: none; font-size: 0.74rem; letter-spacing: 0.08em; }
.guide-sheet .guide-line-tip { margin-top: 0; border-radius: 0; background: none; }
.guide-sheet .guide-step-sheet a { padding: 0 0 2px; border-bottom: 2px solid var(--p-200); border-radius: 0; background: none; font-weight: 600; }
.guide-sheet .guide-step-sheet a:hover { border-color: var(--p-600); background: none; }
.guide-sheet .guide-key figure { padding: 0; border: 0; background: none; }
.prose.guide-sheet ol.guide-order { margin-left: auto; margin-right: auto; }
.guide-sheet .guide-lesson { padding: 26px; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 var(--p-100); }
@media (max-width: 640px) {
  .guide-sheet .guide-step-n { font-size: 2.6rem; }
  .guide-sheet .guide-line { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .guide-sheet .guide-line .guide-role { justify-self: start; }
  .guide-sheet .guide-lesson { padding: 18px; box-shadow: 5px 5px 0 var(--p-100); }
}
/* The list of guides (/how-to-teach): a search bar that stays under the header, then one guide per row with its picture. */
.wrap.guide-hub { max-width: 900px; }
.guide-hub.prose > .guide-find, .guide-hub.prose > .guide-rows { max-width: none; }
.guide-find { display: grid; gap: 12px; margin: 0 0 8px; padding: 14px; border: 1px solid var(--p-200); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.guide-search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border: 2px solid var(--p-200); border-radius: 14px; background: var(--p-50); color: var(--p-700); }
.guide-search:focus-within { border-color: var(--p-600); background: #fff; }
.guide-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; }
.guide-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.guide-opts .chip { padding: 5px 13px; font-family: inherit; cursor: pointer; }
.guide-check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.guide-check input { width: 18px; height: 18px; accent-color: var(--p-600); }
.guide-count { margin: 18px 0 4px; font-size: 0.92rem; color: var(--muted); }
.guide-count strong { color: var(--ink); }
.prose ul.guide-rows { display: block; margin: 0 0 28px; padding: 0; list-style: none; }
.guide-rows li { max-width: none; }
.guide-rows a { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 12px; color: var(--body); text-decoration: none; }
.guide-rows a:hover { background: var(--p-50); }
.guide-rows a:hover strong { color: var(--p-600); }
.guide-rows img, .guide-row-blank { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--tone-bg); }
.guide-row-text { display: grid; gap: 3px; }
.guide-row-text small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--tone-ink); }
.guide-row-text strong { color: var(--ink); font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.guide-row-desc { font-size: 0.92rem; line-height: 1.5; }
.guide-row-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 0.82rem; color: var(--muted); }
.guide-row-meta .guide-grade { margin: 0; }
.guide-row-meta .pill { padding: 1px 9px; font-size: 0.8rem; }
.guide-row-go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--p-100); color: var(--p-700); font-weight: 700; }
.guide-none { padding: 20px 8px; color: var(--ink); }
@media (max-width: 640px) {
  .guide-find { padding: 10px; }
  .guide-rows a { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; }
  .guide-row-go { display: none; }
  .guide-row-text strong { font-size: 1.02rem; }
  .guide-row-desc { font-size: 0.86rem; }
}
@media (max-width: 640px) {
  .guide-timebar { flex-direction: column; }
  .guide-timebar span { flex: none !important; text-align: left; }
}

/* School board registration pages (src/views/boards.tsx): Stepsies' own look, never the board's. */
.board .board-fact { margin: 0 0 18px; }
.board .board-fact > p { margin: 0 0 6px; }
.board .board-cite { font-size: 0.86rem; color: var(--muted); margin: 0; }
.board .board-cite a { color: inherit; }
.board .board-links { list-style: none !important; padding-left: 0 !important; display: grid; gap: 6px !important; margin: 8px 0 12px; }
.board .board-links span { color: var(--muted); }
.board .age-table .this-year { background: var(--p-50); font-weight: 600; }
.board .age-calc { display: grid; gap: 6px; max-width: 34rem; margin: 0 0 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.board .age-calc label { font-weight: 600; color: var(--ink); }
.board .age-calc input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; max-width: 14rem; }
.board .age-calc output { min-height: 1.4em; color: var(--ink); }
.board .board-ready, .board .board-others { display: grid; gap: 6px; }
.board .board-table th a { font-weight: 600; }

/* The share row (shared/_share.html.erb), under a page's print buttons or its title */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.share-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; margin-right: 2px; }
.share button.chip { font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; }
.share button[hidden] { display: none; }
.ws-download .share { justify-content: center; margin-top: 4px; }

/* School math methods for parents (/math-methods, MethodFigure). */
.method-figure { display: block; max-width: 100%; height: auto; font-family: inherit; }
.math-method figure { margin: 16px 0 20px; }
.method-hero { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.method-aka { color: var(--muted); }
.method-steps figure { margin: 12px 0 4px; }
.prose ul.method-cards { max-width: none; list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.method-cards li { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.method-cards figure { margin: 0; height: 150px; display: flex; align-items: center; justify-content: center; }
.method-cards .method-figure { max-height: 150px; width: auto; }
.prose .method-cards h2 { margin: 0 0 6px; font-size: 1.1rem; }
.method-cards h2 a { color: var(--ink); text-decoration: none; }
.method-cards p { margin: 0; font-size: 0.92rem; }

/* Chess for kids (/chess, /checkers; app/views/chess). The page, then the lesson list (beside it on a wide screen).
   A lesson has a parent part (teal tag), a hand-over panel for the child (orange) and a practice sheet that prints alone. */
.chess-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.chess-frame { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 40px; padding-top: 22px; padding-bottom: 72px; align-items: start; }
.chess-main { min-width: 0; }
.chess-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font-size: 0.9rem; }
.chess-side p { margin: 0 0 6px; }
.chess-side-top a { font-weight: 700; color: var(--ink); }
.chess-side h2 { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.chess-side h2 span { text-transform: none; letter-spacing: 0; color: var(--s-600); font-weight: 600; }
.chess-side ol, .chess-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chess-side a { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 8px; color: var(--body); text-decoration: none; }
.chess-side a:hover { background: var(--p-50); color: var(--p-700); }
.chess-side a[aria-current] { background: var(--p-100); color: var(--p-700); font-weight: 600; }
.chess-side-n { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--p-100); color: var(--p-700); font-size: 0.72rem; font-weight: 700; }
.chess-side a[aria-current] .chess-side-n { background: var(--p-600); color: #fff; }

.chess-lesson h1, .chess-hub h1 { margin: 6px 0 10px; }
.chess-lesson h2, .chess-hub h2 { margin: 36px 0 12px; font-size: 1.35rem; }
.chess-lesson h3, .chess-hub h3 { margin: 20px 0 6px; font-size: 1.05rem; }
.chess-lesson p, .chess-lesson li, .chess-hub p { max-width: 70ch; line-height: 1.65; }
.chess-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.chess-tag-parent { background: #ccfbf1; color: #0f766e; }
.chess-tag-kid { background: #ffedd5; color: #9a3412; }
.chess-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 18px; font-size: 0.9rem; color: var(--muted); }
.chess-meta strong { color: var(--ink); font-weight: 600; }
.chess-answer { margin: 0 0 22px; padding: 16px 20px; border-left: 5px solid #14b8a6; border-radius: 0 14px 14px 0; background: #f0fdfa; }
.chess-answer strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #0f766e; }
.chess-answer p { margin: 6px 0 0; color: var(--ink); font-size: 1.12rem; line-height: 1.6; }
.chess-answer ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 4px; list-style: disc; color: var(--ink); }

.chess-board { display: block; width: 100%; height: auto; max-width: 100%; }
.chess-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 320px)); gap: 20px; margin: 8px 0 10px; }
.chess-figures figure { margin: 0; display: grid; gap: 8px; }
.chess-figures figcaption { font-size: 0.9rem; color: var(--muted); }
.chess-script { margin-bottom: 8px; }
.chess-script .guide-words { font-size: 1.08rem; }

.chess-handover { margin: 36px 0 12px; padding: 24px; border-radius: 20px; background: #fff7ed; }
.chess-handover h2 { margin: 8px 0 16px; font-size: 1.7rem; }
.chess-handover > h3 { margin-top: 28px; font-size: 1.2rem; }
.chess-try { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: center; }
.chess-grid { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; width: 100%; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: #b9a6f5; }
.chess-grid > svg { grid-column: 1 / -1; grid-row: 1 / -1; }
.chess-grid button { all: unset; position: relative; display: grid; place-items: center; cursor: pointer; aspect-ratio: 1; }
.chess-grid button.l { background: #f3efff; }
.chess-grid button.d { background: #b9a6f5; }
.chess-grid button svg { width: 100%; height: 100%; }
.chess-grid button.sel { box-shadow: inset 0 0 0 4px #facc15; }
.chess-grid button.tgt::after { content: ""; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: var(--ink); opacity: 0.35; }
.chess-grid button.tgt:has(svg)::after { width: 86%; height: 86%; background: none; border: 4px solid rgb(31 22 55 / 0.4); box-sizing: border-box; }
.chess-grid button:focus-visible { outline: 3px solid var(--s-600); outline-offset: -3px; z-index: 1; }
.chess-star { color: var(--s-600); font-size: clamp(1.2rem, 5vw, 1.8rem); line-height: 1; }
.chess-msg { margin: 0 0 14px; min-height: 3.2em; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.chess-try-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.chess-won .chess-grid { animation: chess-won 0.8s ease; }
@keyframes chess-won { 50% { box-shadow: 0 0 0 8px #facc15; } }
@media (prefers-reduced-motion: reduce) { .chess-won .chess-grid { animation: none; } }

.chess-quiz { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.chess-q { padding: 14px 16px; border-radius: 14px; background: var(--card); }
.chess-q-text { margin: 0 0 10px; font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.chess-q-options { display: flex; flex-wrap: wrap; gap: 8px; }
.chess-q-options button { all: unset; cursor: pointer; padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 1.02rem; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.chess-q-options button:hover { box-shadow: inset 0 0 0 2px var(--p-300); }
.chess-q-options button:focus-visible { outline: 3px solid var(--s-600); outline-offset: 2px; }
.chess-q-options button.right { background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--ok); }
.chess-q-options button.wrong { background: var(--bad-bg); box-shadow: inset 0 0 0 2px var(--bad); }
.chess-q-why { margin: 8px 0 0; min-height: 1.4em; font-size: 0.95rem; }

.chess-sheet { margin: 36px 0 0; }
.chess-sheet-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin: 0 0 16px; }
.chess-sheet-bar h2, .chess-sheet-bar h1 { margin: 0 0 4px; }
.chess-sheet-bar p { margin: 0; color: var(--muted); }
.chess-sheet-page, .chess-print-area { padding: 20px; border: 1.5px dashed var(--line); border-radius: 14px; background: #fff; }
.chess-print-area .chess-sheet-page { padding: 0; border: 0; }
.chess-sheet-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; }
.chess-sheet-head strong { font-size: 1.15rem; color: var(--ink); }
.chess-sheet-head span { color: var(--muted); font-size: 0.9rem; }
.chess-sheet-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 18px; counter-reset: sheet; }
.chess-sheet-items li { display: grid; gap: 6px; align-content: start; counter-increment: sheet; }
.chess-sheet-items p { margin: 0; font-size: 0.95rem; color: var(--ink); }
.chess-board-small { max-width: 240px; }
.chess-sheet-lines { height: 28px; border-bottom: 1px solid #c9c3dc; }
.chess-sheet-answers { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.chess-sheet-answers h3 { margin: 0 0 6px; font-size: 0.95rem; }
.chess-sheet-answers ol { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; list-style: decimal; }

.chess-source { margin-top: 32px; font-size: 0.88rem; color: var(--muted); }
.chess-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; }

/* The chess hub */
.chess-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-bottom: 8px; }
.chess-hero .chess-board { max-width: 340px; justify-self: center; }
.chess-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chess-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 28px 0 8px; }
.chess-door { padding: 18px; border-radius: 16px; min-width: 0; }
.chess-hub .chess-door h2 { margin: 4px 0 10px; font-size: 1.15rem; }
.chess-door-rule { background: #f0fdfa; }
.chess-door-teach { background: var(--p-50); }
.chess-door-print { background: #fff7ed; }
.chess-door-who { font-size: 0.8rem; color: var(--muted); }
.chess-door ol, .chess-door ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 0.95rem; }
.chess-door ol { list-style: decimal; }
.chess-door ul { list-style: disc; }
.chess-door ul.chess-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chess-chips a { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 0.85rem; }
.chess-chips a:hover { color: var(--p-700); }
.chess-stages { display: grid; gap: 14px; }
.chess-stage { padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.chess-hub .chess-stage h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.chess-stage h3 span { font-size: 0.85rem; color: var(--s-600); }
.chess-stage ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.chess-stage a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; color: var(--body); text-decoration: none; }
.chess-stage a:hover { background: var(--p-50); }
.chess-stage a strong { display: block; color: var(--ink); }
.chess-stage a small { display: block; font-size: 0.82rem; line-height: 1.4; color: var(--muted); }

/* The chess parent guide and printables */
.chess-guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.chess-lesson .chess-guide-steps > li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); max-width: none; }
.chess-lesson .chess-guide-steps h3 { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; }
.chess-guide-link { margin: 8px 0 0; font-weight: 600; }
.chess-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.chess-games section { padding: 14px 16px; border-radius: 12px; background: #fff7ed; }
.chess-lesson .chess-games h3 { margin: 0 0 6px; }
.chess-games p { margin: 0; font-size: 0.95rem; }
.chess-print-list { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 12px; }
.chess-print-list li { padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.chess-lesson .chess-print-list h2 { margin: 0 0 4px; font-size: 1.1rem; }
.chess-print-list p { margin: 0; }
.chess-sheet-links { columns: 2 14rem; padding-left: 1.2em; list-style: disc; }
.chess-chart { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.chess-lesson .chess-chart h2 { margin: 6px 0 2px; font-size: 1.05rem; }
.chess-chart p { margin: 0; font-size: 0.88rem; }
.chess-setup-sheet { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.chess-setup-sheet ol { font-size: 1.05rem; display: grid; gap: 8px; padding-left: 1.3em; list-style: decimal; }
.chess-board-print { max-width: 560px; margin: 0 auto; }
.chess-cutouts { margin-top: 24px; }
.chess-cutouts ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); max-width: 560px; }
.chess-cutouts li { border: 1px dashed #9a91b8; aspect-ratio: 1; }
.chess-cutouts svg { display: block; width: 100%; height: 100%; }
.chess-rules-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.chess-lesson .chess-rules-sheet h2 { margin: 6px 0; font-size: 1.05rem; }
.chess-rules-sheet ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; list-style: disc; font-size: 0.92rem; }

@media (max-width: 900px) {
  .chess-frame { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .chess-side { position: static; max-height: none; }
  .chess-hero, .chess-doors, .chess-try, .chess-setup-sheet, .chess-rules-sheet { grid-template-columns: minmax(0, 1fr); }
  .chess-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .chess-handover { padding: 16px; }
  .chess-handover h2 { font-size: 1.45rem; }
  .chess-msg { font-size: 1.1rem; }
}

@media print {
  .chess-side, .chess-sheet-bar, .chess-next, .chess-source, .no-print { display: none !important; }
  .chess-frame { display: block; padding: 0; }
  /* A lesson prints only its practice sheet; a printable page prints only its print area. */
  .chess-print-sheet > *:not(.chess-sheet) { display: none !important; }
  .chess-printable > *:not(.chess-print-area) { display: none !important; }
  .chess-sheet { margin: 0; }
  .chess-sheet-page, .chess-print-area { padding: 0; border: 0; }
  .chess-sheet-items { grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
  .chess-sheet-items li { break-inside: avoid; }
  .chess-board-small { max-width: 2.5in; }
  .chess-sheet-answers { break-before: page; border: 0; }
  .chess-chart { grid-template-columns: repeat(3, 1fr); }
  .chess-chart li { break-inside: avoid; }
  .chess-cutouts { break-before: page; margin: 0; }
  .chess-board-print, .chess-cutouts ul { max-width: 7in; }
}

/* Printable tests (/tests, TestsController): short lines, chips to other tests, the questions as a list. */
.tests h2 { margin: 32px 0 10px; font-size: 1.25rem; }
.tests h3 { margin: 18px 0 8px; font-size: 1.05rem; }
.tests p, .tests li { max-width: 68ch; line-height: 1.65; }
.tests-facts, .tests-steps { padding-left: 1.2em; display: grid; gap: 6px; }
.tests-facts { list-style: disc; }
.tests-steps { list-style: decimal; }
.tests-print { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.tests-versions a { font-weight: 600; }
.tests-note { color: var(--muted); font-size: 0.92rem; }
.tests-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.tests-questions { padding-left: 2em; display: grid; gap: 8px; list-style: decimal; }
.tests-choices { padding-left: 1.6em; list-style: upper-alpha; color: var(--muted); }

/* State test practice (/us/texas/staar-practice, StateTestsController): the practice box, one question at a time, and
   the notice. Touch targets 44 px or more. */
.sp { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.sp h2 { margin-top: 0; }
.sp-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 0; }
.sp-label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.sp-label select, .sp-entry input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }
.sp-progress { color: var(--muted); font-size: 0.92rem; margin: 0 0 8px; }
.sp-question { font-size: 1.5rem; font-weight: 600; color: var(--ink); margin: 0 0 14px; overflow-wrap: anywhere; }
.sp-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.sp-choice { min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 1.1rem; text-align: left; cursor: pointer; color: var(--ink); }
.sp-choice:hover:not(:disabled), .sp-choice:focus-visible { border-color: var(--tone); }
.sp-choice.is-right { border-color: var(--ok); background: var(--ok-bg); }
.sp-choice.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.sp-entry { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-entry input { flex: 1 1 180px; max-width: 280px; font-size: 1.2rem; }
.sp-feedback { min-height: 1.6em; margin: 12px 0; font-weight: 600; }
.sp-feedback.is-right { color: var(--ok); }
.sp-feedback.is-wrong { color: var(--bad); }
.sp-score { font-size: 1.4rem; font-weight: 700; color: var(--ink); margin: 0; }
.state-note { margin: 32px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--body); font-size: 0.92rem; }
.state-note p { margin: 0 0 6px; }
.state-note p:last-child { margin: 0; }
.state-practice-link { margin: 18px 0; }

/* Back from Checkout (billing/done.html.erb): what was bought, or the payment being confirmed. */
.done-page { gap: 14px; }
.done-summary { width: 100%; margin: 6px 0 4px; padding: 4px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: left; }
.done-summary div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.done-summary div:last-child { border-bottom: 0; }
.done-summary dt { margin: 0; color: var(--muted); }
.done-summary dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.done-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--p-100); border-top-color: var(--p-600); animation: done-spin 0.9s linear infinite; }
@keyframes done-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .done-spinner { animation: none; } }

/* Invoices (invoices/*): the list, one invoice on its sheet, and the buyer's details. The invoice itself: invoices/_document_css. */
.invoice-page { display: grid; gap: 20px; max-width: 860px; }
.invoice-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.invoice-actions h1 { margin: 0; }
.invoice-sheet { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 32px -22px rgba(31, 22, 55, 0.45); }
.invoice-flash { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--p-100); color: var(--p-900); }
.invoice-flash-bad { background: var(--s-100); color: #7c2d12; }
.invoice-form { display: grid; gap: 8px; max-width: 560px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.invoice-form h2 { margin: 0; font-size: 20px; }
.invoice-form p { margin: 0 0 6px; color: var(--muted); }
.invoice-form label { font-weight: 600; color: var(--ink); margin-top: 6px; }
.invoice-form input, .invoice-form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.invoice-form button { justify-self: start; margin-top: 10px; }
.invoice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.invoice-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.invoice-list a:hover { border-color: var(--p-400); }
.invoice-list span { color: var(--muted); font-variant-numeric: tabular-nums; }
.invoice-list .invoice-amount { color: var(--ink); font-weight: 600; }

/* The special's landing page (/black-friday): one plan card in the middle, the offer terms below the questions. */
.special-plans { grid-template-columns: minmax(0, 420px); justify-content: center; }
.special-terms { max-width: 720px; margin: 24px auto 0; text-align: center; }

/* The Classroom Screen's links from the rest of the site: the menu link, the homepage band and side block, the button on
   worksheet pages with its "Good with" box, and "Add to my screen" on tool pages. The board has its own classroom-screen.css. */
.nav-new { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--s-500); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; vertical-align: 2px; }
.btn-screen { background: var(--s-500); color: #fff; }
.btn-screen:hover { background: var(--s-600); color: #fff; }
.side-screen p { margin: 0 0 8px; color: var(--muted); font-size: 0.85rem; }
.good-with { margin-top: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--s-100); }
.good-with h2 { margin: 0 0 6px; font-size: 0.95rem; }
.good-with ul { margin: 0; padding-left: 18px; font-size: 0.9rem; }
.add-to-screen { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin: 0 0 20px; padding: 16px 20px; border-radius: var(--radius); background: var(--s-100); }
.add-to-screen p { flex: 1 1 320px; margin: 0; }
.dash-saved { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dash-saved li { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.dash-saved li > span:first-child { display: grid; }
.dash-saved-actions { display: flex; gap: 6px; align-items: center; }
.dash-inline { display: inline; margin: 0; }
/* The developer sign-in on /sign-in (development only, DevSignInsController). */
.auth-dev { display: grid; gap: 8px; margin: 16px 0; padding: 14px 16px; border: 2px dashed var(--s-500); border-radius: var(--radius); background: var(--s-100); text-align: left; }
.auth-dev p { margin: 0; font-size: 0.9rem; }
.auth-dev label { display: grid; gap: 4px; font-size: 0.85rem; font-weight: 600; }
.auth-dev input, .auth-dev select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
