:root {
  color-scheme: light;
  --paper: oklch(97% .018 88);
  --paper-deep: oklch(93% .028 84);
  --ink: oklch(24% .06 260);
  --ink-soft: oklch(39% .045 258);
  --line: oklch(31% .07 258);
  --learn: oklch(57% .16 255);
  --try: oklch(68% .14 145);
  --check: oklch(84% .15 89);
  --stop: oklch(60% .19 26);
  --create: oklch(60% .14 308);
  --button-state: oklch(82% .08 255);
  --button-state-active: oklch(74% .105 255);
  --focus: oklch(47% .2 27);
  --shadow: 4px 5px 0 oklch(26% .06 260 / .2);
  --display: "Avenir Next Rounded", "Avenir Next", "Trebuchet MS", sans-serif;
  --body: "Avenir Next", "Helvetica Neue", sans-serif;
  --code: "SFMono-Regular", "Menlo", "Andale Mono", monospace;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  text-size-adjust: 100%;
}

.learning-snippet { padding: 1rem; background: oklch(94% .035 255); border: 2px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font: .9rem/1.65 var(--code); }
.full-source { margin-block: 1rem; }
.full-source > summary { cursor: pointer; min-height: 44px; padding: .7rem; font-weight: 750; }
.source-reference { font-size: .85rem; overflow-wrap: anywhere; }
.appendix-section p { white-space: pre-line; overflow-wrap: anywhere; }
main > *, .lesson-block, .mission-heading, .appendix-section, .quick-reference-section { min-width: 0; }
p, dd, li { overflow-wrap: anywhere; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; min-width: 320px; overflow-x: clip; color: var(--ink); background-color: var(--paper); background-image: radial-gradient(oklch(35% .03 82 / .11) .65px, transparent .75px); background-size: 12px 12px; font-size: clamp(1rem, .95rem + .2vw, 1.12rem); line-height: 1.58; }
img, svg { display: block; max-width: 100%; }
button, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: oklch(39% .15 255); text-decoration-thickness: .12em; text-underline-offset: .16em; }
a:hover { color: var(--create); }

:where(a, button, summary, textarea):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 5px var(--paper); }
.skip-link { position: fixed; z-index: 10; left: 1rem; top: -5rem; padding: .7rem 1rem; color: var(--paper); background: var(--ink); border: 3px solid var(--check); border-radius: .3rem; font-family: var(--display); font-weight: 800; }
.skip-link:focus { top: 1rem; }

.academy-header, main, footer, nav { width: min(100% - 2rem, 1120px); margin-inline: auto; }
.academy-header { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: clamp(.9rem, 3vw, 2rem); padding: clamp(1.5rem, 5vw, 4rem) 0 1.1rem; animation: page-arrive 300ms cubic-bezier(.16, 1, .3, 1) both; }
.academy-mark { width: 82px; height: 82px; filter: drop-shadow(3px 4px 0 oklch(24% .06 260 / .18)); }
.eyebrow, .mission-kicker { margin: 0 0 .2rem; color: oklch(36% .13 255); font-family: var(--display); font-size: .76rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.03; letter-spacing: -.035em; }
h1 { max-width: 13ch; margin: 0; font-size: clamp(2.45rem, 8vw, 5.7rem); }
h1 + p { margin: .65rem 0 0; color: var(--ink-soft); font-size: clamp(1rem, 2.8vw, 1.28rem); font-weight: 650; }

nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .8rem; padding: .62rem 0 1.25rem; border-top: 3px solid var(--line); border-bottom: 1px solid oklch(31% .07 258 / .5); font-size: .93rem; }
nav a, nav button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .42rem .55rem; color: var(--ink); background: transparent; border: 0; font-weight: 750; text-decoration: none; cursor: pointer; }
nav a:hover, nav button:hover { color: var(--learn); background: oklch(92% .06 255 / .35); }
.course-progress { margin-left: auto; color: var(--ink-soft); font-family: var(--display); font-size: .85rem; font-weight: 800; }
noscript { display: block; width: min(100% - 2rem, 65ch); margin: 1rem auto; padding: 1rem; border: 3px solid var(--line); background: var(--check); }
#live-region { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

main { display: grid; gap: clamp(2.3rem, 7vw, 5.5rem); padding-bottom: 5rem; }
#mission-map { container-type: inline-size; animation: page-arrive 100ms cubic-bezier(.16, 1, .3, 1) both; }
#mission-map-title, #quick-reference > h2, #glossary > h2, #adult-appendix > h2 { margin: 0 0 .7rem; font-size: clamp(1.45rem, 4vw, 2rem); }
.mission-map-list { display: flex; gap: .65rem; margin: 0; padding: 0 0 .45rem; overflow-x: auto; overscroll-behavior-inline: contain; list-style: none; scroll-snap-type: inline mandatory; }
.mission-map-list li { flex: 0 0 auto; scroll-snap-align: start; }
.mission-map-button { min-width: 9.2rem; min-height: 74px; display: grid; grid-template-columns: 2.25rem 1fr; align-items: center; gap: .6rem; padding: .7rem; color: var(--ink); text-align: left; background: var(--paper); border: 3px solid var(--line); border-radius: .3rem; box-shadow: 2px 3px 0 oklch(24% .06 260 / .16); cursor: pointer; }
.mission-map-button:hover, .mission-map-button[aria-current="page"] { background: oklch(91% .07 255); transform: translate(-1px, -1px); box-shadow: 4px 5px 0 oklch(24% .06 260 / .2); }
.mission-number { display: grid; place-items: center; width: 2rem; aspect-ratio: 1; color: var(--paper); background: var(--learn); border: 2px solid var(--ink); border-radius: 50%; font-family: var(--display); font-weight: 900; }
.mission-map-title { font-family: var(--display); font-size: .87rem; font-weight: 850; line-height: 1.08; }

#course-content { min-width: 0; }
.mission-card { container-type: inline-size; position: relative; max-width: 72ch; padding: clamp(1.05rem, 4vw, 2.4rem); background: var(--paper); border: 3px solid var(--line); border-radius: .55rem .2rem .65rem .25rem; box-shadow: var(--shadow); animation: mission-arrive 500ms cubic-bezier(.16, 1, .3, 1) both; }
.mission-card[hidden] { display: none; }
.mission-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 30%); align-items: start; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 3px solid var(--line); }
.mission-header h2 { margin: .12rem 0 .65rem; font-size: clamp(2rem, 7cqw, 3.75rem); }
.mission-summary { margin: 0; color: var(--ink-soft); font-weight: 650; }
.mascot-figure { margin: -1.3rem -.55rem 0 0; transform: rotate(2.2deg); }
.mission-mascot { width: 100%; height: auto; object-fit: contain; filter: drop-shadow(3px 5px 0 oklch(24% .06 260 / .17)); }
.mascot-caption { margin: -.1rem 0 0; padding: .28rem .38rem; color: var(--ink); background: var(--check); border: 2px solid var(--ink); border-radius: .18rem; font-family: var(--display); font-size: clamp(.71rem, 2.4cqw, .88rem); font-weight: 850; line-height: 1.12; transform: rotate(-1deg); }

.mission-card > section, .mission-card > article, .mission-card > aside { margin-top: clamp(1.4rem, 4vw, 2.4rem); }
.lesson-block { position: relative; padding-left: clamp(.85rem, 3vw, 1.65rem); border-left: 7px solid var(--learn); }
.lesson-block:nth-of-type(3n + 1) { border-left-color: var(--try); }.lesson-block:nth-of-type(4n + 2) { border-left-color: var(--check); }.lesson-block:nth-of-type(5n + 3) { border-left-color: var(--create); }
.lesson-block h3, .concepts h3, .challenges h3, .mission-log h3, .mission-references h3, .appendix-section h3, .quick-reference-section h3 { margin: 0 0 .45rem; font-size: clamp(1.25rem, 4.7vw, 1.75rem); }
.lesson-block p { max-width: 66ch; margin: .55rem 0; }
.concepts { padding: 1rem 1.1rem; background: oklch(92% .06 255 / .45); border: 2px dashed var(--learn); border-radius: .3rem; }
.concepts ul { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }.concepts li { padding: .2rem .55rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; font-size: .88rem; font-weight: 700; }
.diagram-figure { margin: 1rem 0 0; padding: .8rem; background: oklch(95% .025 88); border: 2px solid var(--line); border-radius: .25rem; }.lesson-diagram { width: min(100%, 650px); height: auto; margin-inline: auto; }.diagram-figure figcaption { margin-top: .55rem; color: var(--ink-soft); font-size: .86rem; font-weight: 650; }

.command, code, pre { font-family: var(--code); }.command { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: .5rem .65rem; color: oklch(25% .055 262); background: oklch(90% .055 255); border: 2px solid var(--line); font-size: .9em; font-weight: 700; }.source-box { border: 2px solid var(--line); background: oklch(94% .018 88); }.source-box pre { max-width: 100%; margin: 0; padding: 1rem; overflow-x: auto; font-size: clamp(.77rem, 2.4vw, .94rem); line-height: 1.5; tab-size: 2; }.copy-button { margin: 0 .8rem .8rem; }
button, .hint-button, .copy-button { min-height: 44px; padding: .5rem .8rem; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: .25rem; box-shadow: 2px 2px 0 oklch(24% .06 260 / .17); font-family: var(--display); font-size: .9rem; font-weight: 850; cursor: pointer; }button:hover, .hint-button:hover, .copy-button:hover { color: var(--ink); background: var(--button-state); box-shadow: 3px 3px 0 oklch(24% .06 260 / .23); transform: translate(-1px, -1px); }button:active, .hint-button:active, .copy-button:active { color: var(--ink); background: var(--button-state-active); transform: translate(0, 0); }button:disabled { cursor: default; opacity: .65; transform: none; }
.hint-panel { margin-top: .7rem; padding: .2rem 1rem; background: oklch(91% .07 90); border: 2px solid var(--line); }.hint-panel[hidden] { display: none; }
.quiz { padding: 1rem; background: oklch(94% .075 90 / .58); border: 3px solid var(--check); border-radius: .3rem; }.quiz-choices { display: grid; gap: .55rem; margin-top: .8rem; }.quiz-choice { width: 100%; text-align: left; }.quiz-feedback { margin-bottom: 0; font-weight: 700; }.quiz-feedback.is-correct { color: oklch(34% .1 145); }.quiz-feedback.is-try-again { color: oklch(37% .11 85); }
.safety-alert { padding: .78rem 1rem; border: 3px solid var(--ink); border-radius: .25rem; box-shadow: 3px 3px 0 oklch(24% .06 260 / .16); font-family: var(--display); font-weight: 900; }.safety-alert::before { content: "Safety note: "; }.safety-alert.red { color: oklch(27% .1 25); background: oklch(88% .075 25); }.safety-alert.yellow { color: oklch(29% .09 82); background: oklch(91% .085 90); }
.challenges { padding-top: 1.2rem; border-top: 3px dashed var(--create); }.challenge { margin: .7rem 0; border: 2px solid var(--line); background: var(--paper); }.challenge summary { min-height: 44px; padding: .65rem .75rem; cursor: pointer; font-family: var(--display); font-weight: 850; }.challenge p { padding: 0 .75rem; }.challenge button { margin: 0 .75rem .8rem; }.challenge-easy summary { background: oklch(93% .06 145); }.challenge-medium summary { background: oklch(93% .07 90); }.challenge-creative summary { background: oklch(92% .05 308); }
.mission-log { padding: 1rem; background: oklch(95% .03 88); border: 3px solid var(--line); border-radius: .3rem; }.mission-log textarea { display: block; width: 100%; min-height: 8rem; margin: .65rem 0; padding: .7rem; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: .2rem; line-height: 1.5; resize: vertical; }.mission-log button + button { margin-left: .55rem; }.complete-button { background: var(--try); }
.mission-references { border-left: 6px solid var(--stop); padding-left: 1rem; }.mission-references ul { padding-left: 1.2rem; }
#quick-reference, #glossary, #adult-appendix { max-width: 72ch; scroll-margin-top: 1rem; }.quick-reference-section, .appendix-section { margin-top: 1rem; padding: 1rem; border: 2px solid var(--line); background: oklch(96% .022 88); }.quick-reference-section:nth-child(odd), .appendix-section:nth-child(odd) { transform: rotate(-.25deg); }.quick-reference-section dt, #glossary dt { margin-top: .8rem; font-family: var(--display); font-weight: 900; }.quick-reference-section dd, #glossary dd { margin: .12rem 0 .8rem; color: var(--ink-soft); }#glossary dl { margin: 0; columns: 2 16rem; gap: 2rem; }
footer { padding: 1.4rem 0 3rem; border-top: 3px solid var(--line); color: var(--ink-soft); font-family: var(--display); font-weight: 750; }

@keyframes page-arrive { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes mission-arrive { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: translateY(0); } }
@media (min-width: 850px) { main { grid-template-columns: minmax(14rem, 19rem) minmax(0, 72ch); align-items: start; column-gap: clamp(2rem, 7vw, 6rem); } #mission-map { position: sticky; top: 1rem; } .mission-map-list { display: grid; max-height: calc(100vh - 8rem); overflow-y: auto; padding-right: .4rem; scroll-snap-type: none; }.mission-map-button { width: 100%; min-width: 0; }.mission-card { width: 100%; }.academy-header { grid-template-columns: 130px 1fr; }.academy-mark { width: 118px; height: 118px; }.mission-header { grid-template-columns: minmax(0, 1fr) 11.5rem; }.mascot-figure { margin-top: -2.4rem; } #quick-reference, #glossary, #adult-appendix { grid-column: 2; } }
@container (max-width: 420px) { .mission-header { grid-template-columns: minmax(0, 1fr) 102px; }.mascot-figure { margin-top: -.2rem; }.mission-header h2 { font-size: 2.05rem; }.mission-log button { width: 100%; }.mission-log button + button { margin: .55rem 0 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }.mission-map-button:hover, button:hover, .quick-reference-section:nth-child(odd), .appendix-section:nth-child(odd), .mascot-figure { transform: none; } }
