:root {
  color-scheme: light;
  --ink: #182238;
  --muted: #4e596d;
  --paper: #f8f9fd;
  --line: #dfe4ee;
  --navy: #121b30;
  font: 16px/1.55 "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
:focus-visible { outline: 3px solid #5269e4; outline-offset: 4px; }
.wrap { width: min(100% - 4rem, 73rem); margin-inline: auto; }
.skip { position: fixed; top: .6rem; left: 1rem; z-index: 10; padding: .6rem 1rem; background: white; transform: translateY(-180%); }
.skip:focus { transform: translateY(0); }
.site-header { background: var(--navy); color: white; border-bottom: 1px solid #ffffff24; }
.header-inner, .site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-inner { min-height: 4.6rem; }
.identity { display: inline-flex; align-items: center; gap: .75rem; font-weight: 750; text-decoration: none; }
.brand-mark { width: 1.5rem; height: 1.5rem; display: inline-block; flex: none; border-radius: .28rem; background: conic-gradient(from 90deg, #b49cff 0 25%, #f4a496 0 50%, #98e3c8 0 75%, #ffd984 0); transform: rotate(-8deg); }
.site-header nav { display: flex; align-items: center; gap: 1.4rem; font-size: .92rem; font-weight: 650; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.nav-tool { padding: .48rem .8rem; border: 1px solid #ffffff55; border-radius: .5rem; }
.hero {
  background: radial-gradient(ellipse at 73% 20%, #252e50 0%, var(--navy) 58%);
  color: white;
}
.hero-layout { display: grid; grid-template-columns: 1fr 1.03fr; align-items: center; gap: clamp(2rem, 5vw, 6rem); padding-block: 3.6rem 4.1rem; }
.eyebrow { margin: 0 0 .65rem; font-weight: 750; letter-spacing: .095em; text-transform: uppercase; font-size: .85rem; }
.hero .eyebrow { color: #bcebdc; }
h1, h2, h3 { line-height: 1.09; }
h1 { margin: 0; letter-spacing: -.055em; }
.hero h1 { font-size: clamp(3.65rem, 7.8vw, 7.1rem); }
.hero-copy > p:not(.eyebrow) { max-width: 32rem; margin: 1.15rem 0 1.6rem; color: #e3e7f5; font-size: clamp(1rem, 1.6vw, 1.23rem); }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: .55rem; padding: .64rem 1rem; color: white; background: var(--navy); font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover { background: #2d3960; }
.button-light { background: #bcebdc; color: #14283a; }
.button-light:hover { background: #d7f6ea; }
.hero-mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.tile { width: 100%; aspect-ratio: 1.46; object-fit: cover; border: 1px solid #ffffff44; border-radius: .65rem; box-shadow: 0 12px 22px #0c102a44; }
.tile:nth-child(even) { transform: translateY(1.1rem); }
.catalogue { padding-block: 3.2rem 4.75rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.5rem; justify-content: space-between; margin-bottom: 1.35rem; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
.section-heading p { margin: 0; color: var(--muted); font-weight: 600; }
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.coral { --accent: #a53938; --surface: #fff0e8; }
.violet { --accent: #5835ab; --surface: #f0eafd; }
.teal { --accent: #176454; --surface: #e4f6ee; }
.gold { --accent: #805014; --surface: #fff1d5; }
.course-card { border: 1px solid var(--line); border-radius: .9rem; background: white; box-shadow: 0 5px 18px #17264d09; min-width: 0; }
.card-link { display: flex; height: 100%; flex-direction: column; text-decoration: none; border-radius: inherit; }
.card-link:hover { box-shadow: 0 8px 30px #17264d1c; }
.card-link > img { width: 100%; border-radius: .85rem .85rem 0 0; }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 1.05rem; }
.card-copy h3 { font-size: 1.24rem; letter-spacing: -.025em; margin: .62rem 0 .45rem; }
.card-copy p { color: var(--muted); margin: 0 0 .8rem; }
.card-copy .card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; margin: 0; color: var(--accent); font-size: .875rem; font-weight: 750; }
.card-action { margin-top: auto; font-weight: 750; color: var(--accent); }
.card-link:hover .card-action { text-decoration: underline; text-underline-offset: 3px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.site-footer .wrap { padding-block: 1.35rem; }

.lesson-banner { background: var(--surface); overflow: hidden; border-block-end: 1px solid var(--line); }
.lesson-banner-inner { display: grid; grid-template-columns: 1fr minmax(14rem, 32%); align-items: center; gap: 2rem; padding-block: 2.25rem; }
.lesson-banner .eyebrow { color: var(--accent); }
.lesson-banner h1 { font-size: clamp(2.65rem, 6vw, 5.2rem); }
.lesson-banner p:not(.eyebrow) { font-size: 1.16rem; margin-block: .75rem 1.2rem; }
.lesson-banner img { border-radius: .75rem; width: 100%; }
.lesson-layout { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr); gap: clamp(1.6rem, 4vw, 4.7rem); padding-block: 2.5rem 4.2rem; }
.outline { position: sticky; align-self: start; top: 1.4rem; }
.outline h2 { font-size: 1.12rem; margin: 0 0 .85rem; }
.outline ol { margin: 0; padding: 0; list-style: none; }
.outline a { display: grid; padding: .5rem .6rem; border-inline-start: 2px solid var(--line); text-decoration: none; font-weight: 650; }
.outline a:hover { background: var(--surface); border-color: var(--accent); }
.outline a span { color: var(--accent); font-size: .875rem; }
.lesson-brief { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; padding: 1.2rem 1.35rem; background: white; border: 1px solid var(--line); border-radius: .75rem; }
.lesson-brief h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.lesson-brief p { margin: 0; color: var(--muted); }
.lesson-brief details { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: .72rem; }
.lesson-brief details p { margin: .45rem 0 .15rem; }
.lesson-brief summary { color: var(--accent); font-weight: 750; cursor: pointer; }
.step { padding: 1.4rem 0 1.1rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.step-label { color: var(--accent); font-weight: 750; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; font-size: .9rem; }
.step-label span { display: inline-block; background: var(--surface); border-radius: .4rem; padding: .22rem .55rem; }
.step h2 { margin: 0; letter-spacing: -.027em; font-size: clamp(1.55rem, 3vw, 2rem); }
.instructions { margin: .75rem 0 .2rem; padding-inline-start: 1.6rem; }
.instructions li { padding-inline-start: .13rem; margin-block: .42rem; }
.instructions li::marker { color: var(--accent); font-weight: 750; }
#maze-demo { margin: 1rem 0 .4rem; }
.lesson-next { margin-top: 1.4rem; font-weight: 750; color: var(--accent); }
.present-controls { position: fixed; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: .7rem; padding: .7rem; background: var(--navy); color: white; z-index: 4; }
.present-controls button { border: 1px solid #ffffff76; border-radius: .45rem; background: transparent; color: white; padding: .35rem .65rem; cursor: pointer; }
.present-controls button:hover:not(:disabled) { background: #374464; }
.present-controls button:disabled { opacity: .5; cursor: default; }
.presenting .site-header, .presenting .site-footer, .presenting .lesson-banner,
.presenting .lesson-brief, .presenting .outline, .presenting .lesson-next { display: none; }
.presenting .lesson-layout { display: block; width: min(100% - 3rem, 75rem); padding-block: clamp(1.6rem, 5vw, 4rem) 6rem; }
.presenting .step { border: 0; padding: 0; }
.presenting .step h2 { font-size: clamp(1.8rem, 5vw, 4.2rem); }
.presenting .step-label { font-size: clamp(.9rem, 2vw, 1.35rem); }
.presenting .instructions { font-size: clamp(1.05rem, 2.4vw, 2rem); margin-top: 1.1rem; }
.presenting .instructions li { margin-bottom: .65em; }
#maze-demo .mz-stage { max-height: 41vh; }
@media (max-width: 57rem) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-layout { gap: 1.6rem; }
  .wrap { width: calc(100% - 3rem); }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.8rem; }
  .identity { font-size: .89rem; gap: .5rem; }
  .site-header nav { gap: .8rem; }
  .site-header .nav-current { display: none; }
  .nav-tool { font-size: .86rem; padding: .35rem .5rem; }
  .hero-layout { grid-template-columns: 1fr; padding-block: 2.25rem 2.55rem; }
  .hero h1 { font-size: clamp(3.4rem, 13vw, 5.6rem); }
  .hero-mosaic { gap: .45rem; }
  .tile:nth-child(even) { transform: none; }
  .catalogue { padding-block: 2.25rem 2.8rem; }
  .course-grid { gap: .7rem; }
  .card-copy { padding: .72rem; }
  .card-copy h3 { font-size: 1.13rem; }
  .lesson-banner-inner { grid-template-columns: 1fr; gap: .9rem; padding-block: 1.6rem; }
  .lesson-banner img { max-width: 20rem; }
  .lesson-layout { display: block; padding-block: 1.15rem 2.65rem; }
  .outline { position: static; margin-bottom: 1.35rem; }
  .outline ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-brief { grid-template-columns: 1fr; }
  .site-footer .wrap { align-items: flex-start; flex-direction: column; gap: .25rem; }
}
@media print {
  body, .lesson-banner, .lesson-brief { background: white; }
  .site-header, .site-footer, .outline, .lesson-next, .present-start, .present-controls, .skip, #maze-demo { display: none !important; }
  .wrap { width: 100%; }
  .lesson-layout { display: block; padding-block: .7rem; }
  .lesson-banner-inner { display: block; padding-block: .5rem; }
  .lesson-banner h1 { font-size: 25pt; }
  .lesson-banner img { display: none; }
  .step { break-inside: avoid; }
}
