:root {
  --ink: #172126;
  --muted: #536168;
  --paper: #fffdf8;
  --wash: #f2f7f4;
  --line: #d8e2dd;
  --green: #00a86b;
  --green-dark: #08764f;
  --lime: #d9f45b;
  --coral: #f15b5d;
  --pink: #ffdadd;
  --yellow: #ffd956;
  --blue: #3578c8;
  --purple: #7f52a7;
  --shadow: 0 14px 38px rgba(23, 33, 38, 0.1);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 18px; line-height: 1.55; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input { font: inherit; }
:focus-visible { outline: 4px solid #1565c0; outline-offset: 4px; }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 100; padding: .75rem 1rem; background: white; border: 3px solid var(--ink); border-radius: .5rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.organization-bar { min-height: 36px; padding: .4rem max(4vw, 1rem); display: flex; align-items: center; justify-content: center; gap: .45rem; color: #dce7e2; background: var(--ink); font-size: .76rem; letter-spacing: .025em; }
.organization-bar a { display: inline-flex; align-items: center; gap: .3rem; color: white; text-underline-offset: 3px; }
.organization-dot { width: 8px; height: 8px; flex: 0 0 auto; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 3px rgba(217, 244, 91, .14); }

h1, h2, h3 { font-family: "Fredoka", "Atkinson Hyperlegible", sans-serif; line-height: 1.08; margin: 0 0 .75rem; }
h1 { font-size: clamp(3rem, 7vw, 6.7rem); letter-spacing: -.045em; }
h2 { font-size: clamp(2.1rem, 4vw, 3.5rem); letter-spacing: -.025em; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; }
.eyebrow { margin-bottom: .8rem; color: var(--green-dark); font-size: .83rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.large-copy { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; }
.site-header { position: sticky; top: 0; z-index: 30; min-height: 76px; padding: .85rem max(4vw, 1rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: "Fredoka", sans-serif; font-size: 1.15rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; color: white; background: var(--green); border-radius: 10px; font-size: 1.7rem; transform: rotate(90deg); }
.site-header nav { display: flex; align-items: center; gap: .35rem; }
.site-header nav a { padding: .5rem .72rem; border-radius: 999px; color: var(--muted); font-size: .92rem; font-weight: 700; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); background: #e6f4ed; }

.hero { min-height: calc(100vh - 76px); padding: clamp(3rem, 8vw, 8rem) max(5vw, 1.25rem); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); align-items: center; gap: 5vw; overflow: hidden; }
.home-hero { background: var(--wash); }
.hero h1 span { color: var(--green); }
.hero-intro { max-width: 720px; color: #3f4d53; font-size: clamp(1.2rem, 2.2vw, 1.55rem); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 52px; padding: .75rem 1.15rem; border: 2px solid var(--ink); border-radius: 12px; font-weight: 700; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.button-primary { color: white; background: var(--ink); }
.button-secondary { background: white; }
.button-small { min-height: 44px; margin-top: .4rem; padding: .5rem .85rem; font-size: .94rem; box-shadow: 3px 3px 0 var(--ink); }
.text-link { color: var(--green-dark); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.hero-visual { display: grid; justify-items: center; gap: 1.5rem; }
.visual-caption { padding: .65rem 1rem; background: white; border-radius: 999px; box-shadow: var(--shadow); transform: rotate(-2deg); }
.microbit { position: relative; width: min(100%, 360px); aspect-ratio: 1.08; padding: 20% 24% 25%; background: #20272b; border: 4px solid #0d1113; border-radius: 28px 28px 46px 46px; box-shadow: 0 18px 0 #0c1114, 0 28px 45px rgba(0,0,0,.2); }
.microbit::before { content: "micro:bit"; position: absolute; left: 7%; top: 6%; color: white; font: 600 1rem "Fredoka", sans-serif; }
.microbit::after { content: "USB"; position: absolute; top: -12px; left: calc(50% - 37px); width: 74px; height: 20px; display: grid; place-items: center; color: #263036; background: #b8c2c7; border: 3px solid #68747a; border-radius: 5px 5px 0 0; font-size: .58rem; font-weight: 700; }
.microbit-large { width: min(100%, 470px); animation: float 4s ease-in-out infinite; }
.led-grid { width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 7%; }
.led { background: #4a3034; border-radius: 2px; box-shadow: inset 0 0 3px rgba(0,0,0,.7); }
.led.on { background: #ff375c; box-shadow: 0 0 10px #ff3358, 0 0 20px rgba(255,51,88,.35); }
.button-a, .button-b { position: absolute; top: 47%; display: grid; place-items: center; width: 13%; aspect-ratio: 1; color: white; background: #313b40; border: 3px solid #899399; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.button-a { left: 5%; }.button-b { right: 5%; }
.pin-row { position: absolute; left: 6%; right: 6%; bottom: -2px; display: flex; justify-content: space-between; }
.pin-row i { display: grid; place-items: center; width: 17%; aspect-ratio: 1; color: #5e4c00; background: #efcb42; border: 2px solid #9f8422; border-radius: 50% 50% 18% 18%; font-size: .52rem; font-style: normal; font-weight: 700; }
@keyframes float { 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes pulse { 50% { transform: scale(.82); } }
.pulse-icon { display: inline-block; animation: pulse 1s steps(1, end) infinite; transform-origin: center; }

.section { padding: clamp(4rem, 8vw, 7rem) max(5vw, 1.25rem); }
.section-heading { max-width: 800px; margin-bottom: 2.5rem; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.15rem; }
.lesson-cards { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; list-style: none; counter-reset: lessons; }
.lesson-cards-extended { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.path-group-title { margin: 3rem 0 1rem; font-size: 1.15rem; letter-spacing: .04em; }
.path-group-title:first-of-type { margin-top: 0; }
.lesson-card { min-height: 420px; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 7px 7px 0 var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
.lesson-card:hover { transform: translate(3px, 3px); box-shadow: 4px 4px 0 var(--ink); }
.lesson-card a { height: 100%; padding: 1.6rem; display: flex; flex-direction: column; text-decoration: none; }
.intro-card { background: #e9f3ff; }.heart-card { background: var(--pink); }.beat-card { background: #fff0ba; }
.name-card { background: #e8ddff; }.animal-card { background: #daf4ea; }.emotion-card { background: #ffdfe8; }
.silly-card { background: #e0efff; }.sunlight-card { background: #fff0a8; }.dice-card { background: #dff5d1; }.magic-card { background: #ebe0ff; }
.lesson-number { align-self: flex-end; font: 600 3rem "Fredoka", sans-serif; opacity: .25; }
.lesson-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: .5rem 0 1.4rem; background: white; border: 2px solid var(--ink); border-radius: 18px; font-size: 2.1rem; box-shadow: 4px 4px 0 var(--ink); }
.lesson-kicker { font-size: .86rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.lesson-card h3 { margin-top: .35rem; font-size: 2rem; }
.lesson-card p { color: #425056; }
.card-link { margin-top: auto; padding-top: 1rem; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 7vw; align-items: center; }
.classroom-section { color: white; background: var(--ink); }
.classroom-section .eyebrow { color: var(--lime); }
.role-list { margin: 0; padding: 0; display: grid; gap: .75rem; list-style: none; }
.role-list li { padding: 1rem; display: grid; grid-template-columns: 50px 1fr; align-items: center; column-gap: .8rem; background: #263237; border: 1px solid #465358; border-radius: 14px; }
.role-list span { grid-row: 1 / span 2; display: grid; place-items: center; width: 46px; height: 46px; color: var(--ink); background: var(--lime); border-radius: 50%; font-size: 1.4rem; }
.role-list small { color: #c5d0d4; }
.next-up { text-align: center; background: #eff9f4; }
.next-up p { max-width: 700px; margin-left: auto; margin-right: auto; }

.lesson-hero { min-height: 430px; padding: 4rem max(6vw, 1.25rem); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
.lesson-hero > div:first-child { max-width: 900px; }
.lesson-hero h1 { max-width: 850px; font-size: clamp(3.2rem, 7vw, 6rem); }
.intro-lesson-hero { background: #dfefff; }.heart-lesson-hero { background: var(--pink); }.beat-lesson-hero { background: #fff0ba; }
.name-lesson-hero { background: #e8ddff; }.animal-lesson-hero { background: #daf4ea; }.emotion-lesson-hero { background: #ffdfe8; }
.silly-lesson-hero { background: #e0efff; }.sunlight-lesson-hero { background: #fff0a8; }.dice-lesson-hero { background: #dff5d1; }.magic-lesson-hero { background: #ebe0ff; }
.sun-symbol { color: #d48300; }
.breadcrumb { display: flex; gap: .55rem; margin-bottom: 2rem; font-size: .9rem; font-weight: 700; }
.breadcrumb a { text-underline-offset: 3px; }
.lesson-symbol { display: grid; place-items: center; width: clamp(120px, 18vw, 220px); aspect-ratio: 1; background: white; border: 4px solid var(--ink); border-radius: 34px; box-shadow: 10px 10px 0 var(--ink); font-size: clamp(4rem, 10vw, 8rem); transform: rotate(4deg); }
.heart-symbol { color: var(--coral); }
.lesson-layout { max-width: 1440px; margin: 0 auto; padding: 0 max(4vw, 1rem); display: grid; grid-template-columns: 220px minmax(0, 900px); justify-content: center; gap: 5vw; }
.lesson-sidebar { position: sticky; top: 105px; align-self: start; margin-top: 4rem; padding-left: 1rem; border-left: 3px solid var(--line); display: grid; gap: .35rem; }
.sidebar-title { margin: 0 0 .4rem; font-weight: 700; }
.lesson-sidebar a { padding: .35rem .2rem; color: var(--muted); font-size: .92rem; text-decoration: none; }
.lesson-sidebar a:hover { color: var(--green-dark); text-decoration: underline; }
.lesson-content { min-width: 0; }
.content-section { padding: clamp(3.5rem, 7vw, 6rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 85px; }
.content-section > h2 { max-width: 760px; }
.word-row { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.word-row span { padding: 1rem; background: var(--wash); border: 1px solid var(--line); border-radius: 12px; }
.word-row strong { display: block; color: var(--green-dark); }
.concept-section { margin-top: 3rem; padding: clamp(2rem, 5vw, 3.5rem); background: #f0f7f3; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 7px 7px 0 var(--ink); }
.concept-label { display: inline-block; margin-bottom: 1rem; padding: .35rem .65rem; color: white; background: var(--green-dark); border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.concept-note { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid #bed2c8; }
.concept-example { margin-top: 1.5rem; padding: 1.2rem; display: flex; align-items: center; justify-content: center; gap: 1.2rem; background: white; border: 1px solid var(--line); border-radius: 14px; }
.concept-code { padding: .55rem .75rem; color: white; background: var(--blue); border-radius: 8px; font-weight: 700; }
.scroll-preview { min-width: 130px; overflow: hidden; color: var(--coral); font: 600 2rem "Fredoka", sans-serif; white-space: nowrap; }
.scroll-preview::before { content: ""; }
.scroll-preview { animation: text-scroll 3s linear infinite; }
@keyframes text-scroll { from { text-indent: 100%; } to { text-indent: -60%; } }
.definition-grid { margin: 1.5rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.definition-grid > div { padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 12px; }
.definition-grid strong { color: var(--green-dark); font-size: 1.05rem; }.definition-grid p { margin: .3rem 0 0; color: var(--muted); }
.event-flow { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: .7rem; }
.event-flow span { min-height: 100px; padding: .8rem; display: grid; place-items: center; text-align: center; background: white; border: 2px solid var(--ink); border-radius: 12px; font-weight: 700; }.event-flow small { color: var(--muted); font-weight: 400; }
.choice-row, .random-row { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.choice-row span, .random-row span { min-width: 74px; padding: .65rem .9rem; display: grid; place-items: center; background: white; border: 2px solid var(--ink); border-radius: 10px; font-weight: 700; box-shadow: 3px 3px 0 var(--ink); }
.random-row span { width: 58px; min-width: 58px; height: 58px; padding: 0; border-radius: 50%; font-size: 1.35rem; }
.pixel-plan { padding: .75rem; color: var(--coral); background: #20272b; border-radius: 8px; font-family: monospace; font-size: 1.25rem; line-height: 1.15; letter-spacing: .18em; }
.board-explorer { margin-top: 2rem; display: grid; grid-template-columns: minmax(290px, .8fr) 1fr; align-items: center; gap: 3rem; }
.label-list { margin: 0; padding: 0; display: grid; gap: 1rem; list-style: none; }
.label-list li { display: grid; grid-template-columns: 42px 1fr; gap: .8rem; }
.label-list li > span { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: var(--green); border-radius: 50%; font-weight: 700; }
.label-list p { margin: .1rem 0 0; color: var(--muted); }
.connection-flow, .transfer-steps { margin: 2rem 0; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: .65rem; }
.connection-flow > div, .transfer-steps > div { min-height: 155px; padding: 1rem .75rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--wash); border: 2px solid var(--ink); border-radius: 16px; }
.connection-flow > div > span, .transfer-steps > div > span { align-self: flex-start; color: var(--green-dark); font-size: .8rem; font-weight: 700; }
.connection-flow b { font-size: 2rem; }.connection-flow small, .transfer-steps p { color: var(--muted); }.transfer-steps p { margin: .3rem 0 0; font-size: .9rem; }
.remember { padding: 1rem 1.2rem; background: #fff0ba; border-left: 5px solid var(--yellow); border-radius: 4px 12px 12px 4px; }
.makecode-map { margin-top: 1rem; padding: .7rem; display: grid; grid-template-columns: 1fr .8fr 1.8fr; gap: .4rem; background: #e5e8ea; border: 2px solid #6d777c; border-radius: 12px; }
.makecode-map span { min-height: 80px; display: grid; place-items: center; text-align: center; background: white; border: 1px solid #9ba4a8; border-radius: 8px; font-size: .9rem; font-weight: 700; }
.step-list { margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; list-style: none; }
.step-list > li { padding: 1.25rem; display: grid; grid-template-columns: 56px 1fr; gap: 1rem; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgba(23,33,38,.06); }
.step-list h3 { margin-top: .2rem; margin-bottom: .35rem; }
.step-list p { margin-bottom: .4rem; color: #435158; }
.step-number { display: grid; place-items: center; width: 48px; height: 48px; color: white; background: var(--green); border-radius: 14px; font: 600 1.25rem "Fredoka", sans-serif; }
.block-chip { display: inline-block; margin-top: .7rem; padding: .35rem .8rem; color: white; border-radius: 8px; font-weight: 700; }.basic-chip, .basic-block { background: var(--blue); }
.code-stack { width: min(100%, 300px); margin-top: 1rem; color: white; font-size: .9rem; font-weight: 700; }
.code-stack > div, .loop-block { padding: .65rem .8rem; }.event-block { background: #e7ac18; border-radius: 10px 10px 4px 4px; }.basic-block { margin: .25rem 0 0 .7rem; border-radius: 7px; }.mini-heart { color: #ff9eaa; font-size: 1.2rem; }.small-mini-heart { font-size: .8rem; }
.long-stack { width: min(100%, 350px); }.loop-block { padding-bottom: 1rem; background: var(--green); border-radius: 10px; }.loop-block .basic-block { margin-left: 1.2rem; }
.materials { margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }.materials li { padding: .45rem .7rem; background: #eef3f0; border-radius: 999px; font-size: .9rem; font-weight: 700; }
.project-opening { display: grid; grid-template-columns: 1.2fr minmax(270px, .8fr); align-items: center; gap: 3rem; }
.project-opening .microbit { max-width: 320px; justify-self: center; }
details { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
summary { padding: 1rem 1.2rem; cursor: pointer; color: var(--green-dark); font-weight: 700; }
details > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; } details > :last-child { margin-bottom: 1.2rem; }
.video-section { background: #f7f1ff; margin-left: -2rem; margin-right: -2rem; padding-left: 2rem; padding-right: 2rem; border-radius: var(--radius); }
.video-links { margin: 1.5rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.video-links a { padding: 1rem; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: .8rem; background: white; border: 2px solid var(--ink); border-radius: 14px; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); }
.video-links a > span { display: grid; place-items: center; width: 48px; height: 48px; color: white; background: #d52d2d; border-radius: 50%; }.video-links small { display: block; color: var(--muted); }
.teacher-section { background: #eaf8f1; margin-left: -2rem; margin-right: -2rem; padding-left: 2rem; padding-right: 2rem; border-radius: var(--radius); }
.timeline { margin-top: 2rem; display: grid; gap: 0; }.timeline > div { padding: .9rem 0; display: grid; grid-template-columns: 90px 1fr; gap: 1rem; border-top: 1px solid #b8d5c6; }.timeline time { color: var(--green-dark); font-weight: 700; }.timeline p { margin: 0; }
.check-section { border-bottom: 0; }.checklist { margin: 1.5rem 0; padding: 0; display: grid; gap: .7rem; list-style: none; }.checklist label { padding: 1rem; display: flex; align-items: center; gap: .8rem; background: white; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }.checklist input { width: 24px; height: 24px; accent-color: var(--green-dark); }
.lesson-pagination { padding: 2rem 0 5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }.lesson-pagination a { padding: 1rem; display: flex; flex-direction: column; background: var(--wash); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }.lesson-pagination .next-lesson { text-align: right; }.lesson-pagination span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.sequence-demo { margin: 2rem 0; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto; align-items: center; gap: .7rem; }.frame-card { min-height: 160px; padding: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff8dc; border: 2px solid var(--ink); border-radius: 16px; }.pixel-heart { color: var(--coral); font-size: 2.5rem; }.large-pixel-heart { font-size: 4rem; }.pause-card span { font: 600 2.7rem "Fredoka", sans-serif; }
.heartbeat-lab { margin-top: 2rem; padding: 2rem; display: grid; grid-template-columns: minmax(280px, 1fr) 1fr; align-items: center; gap: 3rem; background: #fff8dc; border: 2px solid var(--ink); border-radius: var(--radius); }.heartbeat-lab .microbit { max-width: 330px; }.speed-controls [role="group"] { display: flex; flex-wrap: wrap; gap: .5rem; }.speed-controls button { padding: .6rem .9rem; background: white; border: 2px solid var(--ink); border-radius: 10px; cursor: pointer; font-weight: 700; }.speed-controls button:hover, .speed-controls button.is-active { color: white; background: var(--ink); }.status { margin-top: 1rem; color: var(--green-dark); font-weight: 700; }
.demo-panel { margin-top: 2rem; padding: 2rem; display: grid; grid-template-columns: minmax(280px, 1fr) 1fr; align-items: center; gap: 3rem; background: #f8f4ea; border: 2px solid var(--ink); border-radius: var(--radius); }
.demo-panel .microbit { max-width: 330px; }.demo-controls [role="group"] { display: flex; flex-wrap: wrap; gap: .6rem; }.demo-controls button:not(.button) { padding: .65rem 1rem; background: white; border: 2px solid var(--ink); border-radius: 10px; cursor: pointer; font-weight: 700; }.demo-controls button:not(.button):hover, .demo-controls button:not(.button):focus-visible { color: white; background: var(--ink); }.demo-button { cursor: pointer; background: white; }
.decision-visual { max-width: 650px; margin: 1.5rem auto; }.condition { padding: 1rem; text-align: center; color: white; background: var(--purple); border-radius: 14px 14px 4px 4px; font-weight: 700; }.decision-paths { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }.decision-paths span { padding: 1rem; display: grid; text-align: center; background: white; border: 2px solid var(--purple); border-radius: 4px 4px 12px 12px; }.decision-paths b { color: var(--purple); }
.demo-controls input[type="range"] { width: 100%; margin-top: 1rem; accent-color: var(--green-dark); }.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.three-way { margin: 1.5rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }.three-way span { padding: 1rem; display: grid; text-align: center; background: white; border: 2px solid var(--ink); border-radius: 12px; font-weight: 700; }.three-way b { margin-bottom: .5rem; color: var(--purple); font-size: .78rem; }
.source-link { margin-top: 1.5rem; }
.site-footer { padding: 2rem max(4vw, 1rem); display: flex; justify-content: space-between; gap: 2rem; color: #cbd5d9; background: var(--ink); font-size: .85rem; }.site-footer p { margin: 0; }.site-footer a { color: white; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .site-header { position: static; flex-direction: column; align-items: flex-start; }
  .site-header nav { width: 100%; overflow-x: auto; padding-bottom: .25rem; }
  .site-header nav a { white-space: nowrap; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-visual { padding: 2rem 0; }
  .lesson-cards { grid-template-columns: 1fr; }
  .lesson-card { min-height: 350px; }
  .two-column, .project-opening, .board-explorer, .heartbeat-lab { grid-template-columns: 1fr; }
  .demo-panel { grid-template-columns: 1fr; }
  .lesson-hero { grid-template-columns: 1fr; }
  .lesson-symbol { width: 130px; }
  .lesson-layout { display: block; }
  .lesson-sidebar { position: static; margin-top: 2rem; padding: 1rem; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; }
  .sidebar-title { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  body { font-size: 17px; }
  .organization-bar { justify-content: flex-start; flex-wrap: wrap; gap: .2rem .45rem; font-size: .7rem; }
  .organization-bar > span:not(.organization-dot) { display: none; }
  .site-header { padding: .75rem 1rem; }
  .brand { font-size: 1rem; }
  .site-header nav { flex-wrap: wrap; overflow: visible; }
  .site-header nav a { padding: .38rem .55rem; font-size: .84rem; }
  .hero, .section, .lesson-hero { padding-left: 1rem; padding-right: 1rem; }
  .lesson-hero { min-height: 0; padding-top: 3rem; padding-bottom: 3rem; }
  .connection-flow, .transfer-steps { grid-template-columns: 1fr; }
  .connection-flow > i, .transfer-steps > i { transform: rotate(90deg); justify-self: center; }
  .word-row, .video-links { grid-template-columns: 1fr; }
  .definition-grid, .three-way { grid-template-columns: 1fr; }
  .event-flow { grid-template-columns: 1fr; }
  .event-flow > b { transform: rotate(90deg); justify-self: center; }
  .sequence-demo { grid-template-columns: 1fr; }
  .sequence-demo > i { transform: rotate(90deg); justify-self: center; }
  .lesson-sidebar { grid-template-columns: 1fr 1fr; }
  .step-list > li { grid-template-columns: 44px 1fr; padding: 1rem; }
  .step-number { width: 40px; height: 40px; }
  .video-section, .teacher-section { margin-left: 0; margin-right: 0; padding-left: 1rem; padding-right: 1rem; }
  .lesson-pagination { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .organization-bar, .site-header, .lesson-sidebar, .button-row, .speed-controls, .lesson-pagination { display: none; }
  body { color: #000; background: #fff; font-size: 12pt; }
  .lesson-layout { display: block; max-width: none; }
  .lesson-hero { min-height: 0; padding: 1cm 0; background: white !important; border-bottom: 2px solid #000; }
  .lesson-symbol { display: none; }
  .content-section { padding: .7cm 0; break-inside: avoid; }
  a { color: #000; }
}
