/* The course index, 2026-11: the site's May 2026 look (the home's, css/home-may.css), on the course's own page.
   The watercolor behind (js/watercolor.js, started by index-page.js), plain white cards in front, one meaning per colour:
   - buttons are filled and big (.ix-btn--main gradient, .ix-btn--alt surface + 2 px line); links are underlined text;
   - tags are small, round, tinted, with no border and no shadow, and never react to the pointer (.ix-tag);
   - a box that only holds content has no border, a surface and a soft shadow; a card that is a link says so at rest
     ("Read the chapter →", an arrow) and lifts on hover;
   - what does not exist yet is a dashed slot with no surface and no shadow ("Coming"): never drawn like a control.
   Loaded after mobile.css, nav.css and present.css: it maps the home's tokens onto the course's, and switches off the
   old index's journey line, glows and serif kickers. The header and the footer are mobile.css's (every course page).
   Class names: ix-* where mobile.css already has the word (.card, .tag, .hero, .lede). */

/* ---------- Tokens: mobile.css holds them since 2026-11-03 (the home's values, in the course's names). ---------- */

/* ---------- Base: the page colour sits under the watercolor (html has none, so body's reaches the canvas) ---------- */
html { background: none; }
body { background: var(--bg); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; }
.ix { overflow-x: clip; }
.ix :where(p, h1, h2, h3, ul, ol, li, figure, figcaption) { margin: 0; padding: 0; }
.ix :where(ul, ol) { list-style: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ix .ico { width: 18px; height: 18px; flex: none; }
.ix .ix-link .ico { width: 16px; height: 16px; }   /* mobile.css's .ix-link size, after the line above */

/* The watercolor, the veil, the buttons, links and tags: mobile.css (every course page has them since 2026-11-03).
   The index's own halos: its hero's, wider; the map's heads, flatter. */
@media (min-width: 641px) {
  .ix-hero__text.veil::before { inset: -3.5rem -6rem;
    background: radial-gradient(closest-side, var(--veil) 66%, color-mix(in srgb, var(--veil) 45%, transparent) 84%, transparent 100%); }
  .st__head.veil::before, .ahead__k.veil::before { inset: -1.4rem -3rem; }
}

/* ---------- Logos (the home's tiles: each family's own colour) ---------- */
.ix-logos { display: flex; gap: .4rem; }
.lg-tile { --lc: var(--c-web); flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--lc) 11%, var(--surface)); color: var(--lc); }
.lg-tile--lg { width: 56px; height: 56px; border-radius: 15px; }
.lg-tile--xl { width: 64px; height: 64px; border-radius: 17px; }
.lg { width: 24px; height: 24px; fill: var(--lc); color: var(--lc); }
.lg-tile--lg .lg { width: 30px; height: 30px; }
.lg-tile--xl .lg { width: 34px; height: 34px; }
.lg-tile > svg:not(.lg) { width: 24px; height: 24px; }
.lg-tile--accent { --lc: var(--accent); }
.lg-tile:has(.lg--java) { --lc: var(--c-java); }
.lg-tile:has(.lg--kotlin) { --lc: var(--c-kotlin); }
.lg-tile:has(.lg--react) { --lc: var(--c-react); }
.lg-tile:has(.lg--flutter) { --lc: var(--c-flutter); }
.lg-tile:has(.lg--ionic) { --lc: var(--c-ionic); }
.lg-tile:has(.lg--pwa) { --lc: var(--c-pwa); }
.lg-tile--android { --lc: var(--c-android); }
.lg-tile--apple { --lc: var(--c-apple); }
.lg--java { --lc: var(--c-java); } .lg--kotlin { --lc: var(--c-kotlin); } .lg--react { --lc: var(--c-react); } .lg--flutter { --lc: var(--c-flutter); }
.lg--ionic { --lc: var(--c-ionic); } .lg--pwa { --lc: var(--c-pwa); } .lg--android { --lc: var(--c-android); } .lg--apple { --lc: var(--c-apple); }

/* ---------- 1. Hero: the text on the left over its halo, the app on the right ---------- */
.ix-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(1.75rem, 3.2vw, 3rem) 0 0; }
.ix-hero__text { display: grid; gap: 1.15rem; justify-items: start; }
.ix-news { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: .98rem; }
.ix-kick { color: var(--ink-3); font: 650 .98rem/1.3 var(--sans); }
.ix .ix-title { max-width: none; margin: 0; font: 700 clamp(2.8rem, 5.2vw, 4.5rem)/1.03 var(--display); letter-spacing: -.018em; color: var(--ink); text-wrap: balance; }
/* French says it in more words (5 lines against 3 at the English size): a size that keeps it to 4, so the main button
   stays above the fold on a 1366 × 768 or 1440 × 900 laptop (and on a 360 × 640 phone). */
:lang(fr) .ix .ix-title { font-size: clamp(2.3rem, 3.9vw, 3.5rem); }
.ix-title em { display: inline-block; font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.ix-lede { max-width: 33em; font-size: 1.15rem; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.ix-hero .ix-actions { margin-top: .35rem; }
.ix-hero .ix-feats { margin-top: .15rem; }

/* The visual: the app itself (two screens of Lab 1's Notes) and the six families' logos around it. */
.ix-vis { display: grid; justify-items: center; gap: 1rem; }
.ix-vis__art { position: relative; display: block; width: min(460px, 100%); aspect-ratio: 1 / 1.02; }
.ix-vis__art::before { content: ""; position: absolute; inset: 8% 4% 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(99, 102, 241, .22), rgba(236, 72, 153, .12) 60%, transparent 100%); filter: blur(8px); }
.ix-phone { position: absolute; width: 41%; aspect-ratio: 300 / 667; padding: 2.2%; border-radius: 30px; background: #0b0b12; box-shadow: 0 30px 60px -22px rgba(20, 16, 50, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.ix-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 24px; }
.ix-phone--back { left: 15%; top: 9%; transform: rotate(-9deg); }
.ix-phone--front { left: 44%; top: 5%; transform: rotate(5deg); }
.ix-vis .lg-tile { position: absolute; background: var(--surface); box-shadow: var(--shadow); }
[data-theme="dark"] .ix-vis .lg-tile { box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .06); }
.ix-f1 { left: 0; top: 14%; } .ix-f2 { left: 4%; top: 56%; } .ix-f3 { right: 0; top: 4%; } .ix-f4 { right: -2%; top: 44%; } .ix-f5 { left: 27%; bottom: 3%; } .ix-f6 { right: 15%; bottom: 0; }
[data-motion="on"] .ix-vis .lg-tile { animation: ix-bob 7s ease-in-out infinite; }
[data-motion="on"] .ix-f2 { animation-delay: -1.2s; } [data-motion="on"] .ix-f3 { animation-delay: -2.4s; } [data-motion="on"] .ix-f4 { animation-delay: -3.6s; }
[data-motion="on"] .ix-f5 { animation-delay: -4.8s; } [data-motion="on"] .ix-f6 { animation-delay: -6s; }
@keyframes ix-bob { 50% { translate: 0 -10px; } }
.ix-vis__cap { max-width: 36em; text-align: center; color: var(--ink-3); font: 600 .88rem/1.45 var(--sans); }
.ix-vis__cap b { color: var(--ink-2); font-weight: 700; }

/* ---------- 2. How a chapter works: one strip, three figures (like the home's stats, not three link-like boxes) ---------- */
.ix-how { margin-top: clamp(2.25rem, 4vw, 3.2rem); }
.ix-how__h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.how3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .4rem 0; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
[data-theme="dark"] .how3 { box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .05); }
.how3 > li { display: flex; align-items: flex-start; gap: .9rem; padding: 1.15rem 1.5rem; }
.how3 > li + li { border-left: 1px solid var(--rule); }
.how3__ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--tag-bg); color: var(--accent); }
.how3__ico svg { width: 22px; height: 22px; }
.how3 b { display: block; color: var(--ink); font: 700 1.05rem/1.3 var(--sans); }
.how3__t { display: block; margin-top: .15rem; color: var(--ink-2); font-size: .94rem; line-height: 1.5; }

/* ---------- Section heads (the home's: a gradient icon, a Georgia title, one line under it) ---------- */
.ix-sec { padding: clamp(3.5rem, 6.5vw, 5rem) 0 1rem; }
/* A link to a section (#capsules, the drawer's first item) lands its title just under the header, not its padding. */
.ix .ix-sec { scroll-margin-top: -3.25rem; }
.ix-head { max-width: 820px; margin: 0 auto clamp(2rem, 3.6vw, 2.75rem); text-align: center; }
.ix .ix-head__t { display: flex; align-items: center; justify-content: center; gap: .9rem; margin: 0; font: 700 clamp(2rem, 4.2vw, 3rem)/1.15 var(--display); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.ix-head__icon { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: 0 10px 22px -8px rgba(99, 102, 241, .6); }
.ix-head__icon svg { width: 26px; height: 26px; }
.ix-head__sub { margin-top: .9rem; font-size: 1.12rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

/* ---------- 3. The map: one list of stations in route order; each station holds its entries (ul.stops) ---------- */
.ix .capsules { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.4rem 1.25rem; align-items: stretch; margin: 0; padding: 0; }
.ix .capsules > li { grid-column: auto; margin: 0; min-width: 0; }
.ix .capsules > .capsules__group { display: block; padding: 0; font: inherit; color: inherit; text-align: left; }
.ix .capsules > .st--open { grid-column: 1 / -1; }
.st__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin-bottom: 1.1rem; }
.st__head > span:first-child { color: var(--ink); font: 750 1.4rem/1.25 var(--sans); letter-spacing: -.012em; margin-right: .1rem; }
.ix .capsules__range { display: inline-flex; align-items: center; height: 26px; margin: 0; padding: 0 .7rem; border-radius: 999px; background: var(--mute-bg); color: var(--mute-ink); font: 650 .8rem/1 var(--sans); letter-spacing: 0; white-space: nowrap; }
.stops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.stops > li { min-width: 0; }
.stops > .stop--soon, .st--lab1 .stops > li { grid-column: 1 / -1; }

/* A written chapter: a plain card; the whole card is the link (the question's link, stretched), and it says so at rest. */
.ch { position: relative; display: flex; flex-direction: column; gap: .7rem; height: 100%; padding: 1.35rem 1.35rem 1.25rem; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
[data-theme="dark"] :is(.ch, .lab1, .rulecard, .lean) { box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .05); }
.ch:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.ch:has(h3 a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.ch h3 a:focus-visible { outline: none; }
.ch__top { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.ch__top { gap: .4rem; }
.ch__top .lg-tile { margin-right: .1rem; }
.ch__top .ix-tag { padding: 0 .55rem; }
.ix .ch h3 { margin: 0; font: 700 1.14rem/1.32 var(--sans); letter-spacing: -.006em; color: var(--ink); text-wrap: pretty; }
.ch h3 a { color: inherit; text-decoration: none; }
.ch h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ch__p { color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.ch__meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; color: var(--ink-3); font: 600 .84rem/1.35 var(--sans); }
.ch__meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.ch__meta svg { width: 14px; height: 14px; flex: none; }
.ch__go { display: inline-flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .25rem; color: var(--accent); font: 700 .95rem/1.2 var(--sans); }
.ch__go svg { width: 17px; height: 17px; transition: transform .25s; }
.ch:hover .ch__go svg { transform: translateX(3px); }

/* A chapter to come: the home's "In production" slot (no surface, no shadow, a dashed line), never a control. */
.soon { display: flex; align-items: center; gap: .8rem; min-height: 54px; padding: .6rem 1.1rem; border-radius: 16px; background: var(--veil); border: 2px dashed var(--slot-line); color: var(--ink-2); }
.soon__n { flex: none; color: var(--ink-3); font: 700 .9rem/1.45 var(--sans); font-variant-numeric: tabular-nums; }
.soon .capsule-row__q { font: 600 1rem/1.4 var(--sans); }
.soon .ix-tag { margin-left: auto; }

/* Lab 1, open now: one wide card (its app, its nine parts, its two actions); not one link. */
.lab1 { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; padding: 14px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.lab1__shots { display: flex; gap: 10px; align-items: center; padding: 20px 18px; border-radius: 16px; background: var(--shot-bg); }
.lab1__shots > span { flex: 1; aspect-ratio: 300 / 667; border-radius: 12px; overflow: hidden; background: #f3efe6; box-shadow: 0 0 0 2px #0b0b12, 0 12px 24px -12px rgba(20, 16, 50, .5); }
.lab1__shots img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lab1__body { display: grid; gap: .9rem; justify-items: start; padding: 1rem clamp(.5rem, 2vw, 1.75rem) 1rem 0; }
.lab1__fam { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem; color: var(--ink-2); font: 650 .98rem/1.3 var(--sans); }
.ix .lab1 h3 { margin: 0; font: 750 clamp(1.5rem, 2.5vw, 1.95rem)/1.2 var(--sans); letter-spacing: -.015em; color: var(--ink); }
.lab1 h3 a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--link-line); transition: text-decoration-color .2s; }
.lab1 h3 a:hover { color: inherit; text-decoration-color: currentColor; }
.lab1__p { max-width: 40em; color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; }
.parts { display: grid; gap: .5rem; width: 100%; max-width: 540px; }
.parts__sq { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
/* Each square is a link to its part (start from any part): a small control, so it looks like one (a surface, a line). */
.parts__sq > a { display: grid; place-items: center; height: 34px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-2); font: 700 .86rem/1 var(--sans); font-variant-numeric: tabular-nums; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.parts__sq > a:hover { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); transform: translateY(-2px); }
.parts__sq > a.is-done { background: var(--live-bg); color: var(--live-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 45%, transparent); }
.parts__sq > a.is-here { background: var(--grad-btn); color: #fff; box-shadow: 0 6px 14px -6px var(--btn-glow); }
.parts__sq svg { width: 15px; height: 15px; }
.parts__line { color: var(--ink-3); font: 600 .88rem/1.45 var(--sans); }
.parts__line b { color: var(--ink-2); }
.lab1 .ix-actions { margin-top: .3rem; }

/* The route ahead: each station is one dashed slot, in route order, four across (Part 2 · Part 3 · Part 4 · Lab 2 / …). */
.ix .capsules > .st--soon { display: grid; align-content: start; gap: .6rem; padding: 1.15rem 1.2rem 1.25rem; border-radius: 20px; background: var(--veil); border: 2px dashed var(--slot-line); }
.st--soon .st__head { gap: .4rem .45rem; margin: 0; }
.st--soon .st__head > span:first-child { flex-basis: 100%; margin: 0 0 .2rem; font-size: 1.05rem; line-height: 1.3; }
.st--soon .stops { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; }
.st--soon .stops > li { display: grid; grid-template-columns: 1.9rem minmax(0, 1fr); color: var(--ink-2); font-size: .93rem; line-height: 1.45; }
.st--soon .soon__n { font-size: .9rem; }
.ix .capsules > .st--soon.st--lab { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: .9rem; }
.st--lab > .lg-tile { grid-row: span 2; background: color-mix(in srgb, var(--lc) 12%, var(--surface)); }
.st--lab .stops > li { grid-template-columns: minmax(0, 1fr); }
.st--lab .capsules__range { display: none !important; }
/* Lab 1's "lab · 9 parts" would repeat its title and its card's "9 parts" (kept in the HTML: toc-check reads it). */
.st--lab1 .capsules__range { display: none; }
/* "Next in the course", above the first slot's row: inside the first station to come (the list holds only stations),
   placed on the list's left edge; that row leaves room for it. */
.ix .capsules > .st--first-soon { position: static; }
.ahead__k { position: absolute; left: 0; right: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; margin-top: calc(-1.15rem - 2px - 3.3rem); color: var(--ink); font: 750 1.4rem/1.25 var(--sans); letter-spacing: -.012em; pointer-events: none; }
.ahead__k b { font-weight: inherit; }
.ahead__k small { color: var(--ink-3); font: 600 .95rem/1.3 var(--sans); letter-spacing: 0; }
.ix .ahead__k.veil::before { inset: -.7rem -1.25rem -.35rem; right: auto; width: 34em; max-width: calc(100% + 2.5rem); filter: blur(8px); box-shadow: none; border-radius: 24px; }
.ix .capsules > .st--first-soon, .ix .capsules > .st--first-soon + .st, .ix .capsules > .st--first-soon + .st + .st, .ix .capsules > .st--first-soon + .st + .st + .st { margin-top: 3.1rem; }

/* ---------- 4. The rule ---------- */
.rulecard { max-width: 900px; margin: 0 auto; padding: clamp(1.75rem, 4vw, 3rem); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.ix .rulecard__k { margin: 0 0 1.1rem; font: inherit; line-height: 1; }
.rulecard__l { color: var(--ink); font: 700 clamp(1.5rem, 2.6vw, 2.1rem)/1.28 var(--display); text-wrap: balance; }
.rulecard__l > span { display: block; }
.rulecard__l em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rulecard__s { margin-top: 1rem !important; color: var(--ink-2); font-size: 1.05rem; text-wrap: pretty; }

/* ---------- 5. Already filmed: three link cards, each with its arrow at rest ---------- */
.ix-films { padding-bottom: 2rem; }
.leans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.lean { position: relative; display: flex; align-items: flex-start; gap: 1rem; height: 100%; padding: 1.35rem; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.lean:hover { color: var(--ink); transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.lean__ico { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; }
.lean__ico svg { width: 24px; height: 24px; }
.lean__ico--a { background: color-mix(in srgb, #7c3aed 12%, var(--surface)); color: #7c3aed; }
.lean__ico--b { background: color-mix(in srgb, #0891b2 12%, var(--surface)); color: #0891b2; }
.lean__ico--c { background: color-mix(in srgb, #e11d48 12%, var(--surface)); color: #e11d48; }
[data-theme="dark"] .lean__ico--a { color: #a78bfa; } [data-theme="dark"] .lean__ico--b { color: #22d3ee; } [data-theme="dark"] .lean__ico--c { color: #fb7185; }
.lean__b { display: grid; gap: .4rem; min-width: 0; }
.lean__b b { color: var(--ink); font: 700 1.05rem/1.35 var(--sans); text-wrap: pretty; }
.lean__m { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; color: var(--ink-3); font: 600 .85rem/1.3 var(--sans); }
.film-len { display: inline-flex; align-items: center; gap: .3rem; height: 24px; padding: 0 .6rem 0 .5rem; border-radius: 999px; background: var(--tag-bg); color: var(--tag-ink); font: 700 .78rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.film-len svg { width: 11px; height: 11px; }
.lean__go { flex: none; align-self: center; width: 20px; height: 20px; margin-left: auto; color: var(--accent); transition: transform .25s; }
.lean:hover .lean__go { transform: translateX(3px); }

/* ---------- The states course-journey.js writes (this browser's memory) ---------- */
.ix-tag--read { background: var(--live-bg); color: var(--live-ink); }

/* ---------- Reveal on scroll (motion on only; index-page.js): translate, so the hover lift keeps working ---------- */
[data-motion="on"] .ix-rv { opacity: 0; translate: 0 18px; }
[data-motion="on"] .ix-rv.is-in { opacity: 1; translate: none; transition: opacity .7s ease, translate .8s cubic-bezier(.2, .7, .2, 1), transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }

/* ---------- Motion off: nothing drifts, nothing lifts ---------- */
[data-motion="off"] :is(.ch, .lean, .ix-btn, .parts__sq > a):hover, [data-motion="off"] .ix-btn:hover .ico, [data-motion="off"] :is(.ch, .lean):hover :is(.ch__go svg, .lean__go) { transform: none; }

/* ---------- Widths ---------- */
@media (max-width: 1100px) {
  .ix .capsules, .stops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ix .capsules > .st--first-soon + .st + .st, .ix .capsules > .st--first-soon + .st + .st + .st { margin-top: 0; }
  .leans { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; }
}
@media (max-width: 860px) {
  .ix-hero { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .ix-vis__art { width: min(320px, 78vw); }
  .how3 { grid-template-columns: minmax(0, 1fr); }
  .how3 > li + li { border-left: 0; border-top: 1px solid var(--rule); }
  .lab1 { grid-template-columns: minmax(0, 1fr); }
  .lab1__body { padding: .25rem .5rem .75rem; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .ix-hero { padding-top: 1.75rem; gap: 1.25rem; }
  .ix-hero__text { gap: .9rem; }
  .ix .ix-title { font-size: 2.55rem; }
  .ix-lede { font-size: 1.05rem; }
  .ix-btn { width: 100%; }
  .ix-actions { width: 100%; }
  .ix-vis__art { width: min(240px, 64vw); }
  .ix-vis .lg-tile--lg { width: 42px; height: 42px; border-radius: 12px; }
  .ix-vis .lg-tile--lg .lg { width: 22px; height: 22px; }
  .ix-vis__cap { font-size: .8rem; }
  .ix-how { margin-top: 1.75rem; }
  .how3 > li { align-items: center; padding: .85rem 1rem; }
  .how3__t { display: none; }
  .ix-sec { padding-top: 3rem; }
  .ix .ix-head__t { flex-direction: column; gap: .75rem; }
  .ix-head__icon { width: 46px; height: 46px; border-radius: 14px; }
  .ix-head__sub { font-size: 1.02rem; }
  .ix .capsules, .stops { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .ix .capsules { row-gap: 1rem; }
  .ix .capsules > .st--lab1 { margin-top: .9rem; }
  .ix .capsules > .st--soon .lg-tile--xl { width: 46px; height: 46px; border-radius: 13px; }
  .ix .capsules > .st--soon .lg-tile--xl .lg { width: 26px; height: 26px; }
  .st__head > span:first-child { font-size: 1.2rem; flex-basis: 100%; }
  .ix .capsules > .st--first-soon + .st, .ix .capsules > .st--first-soon + .st + .st, .ix .capsules > .st--first-soon + .st + .st + .st { margin-top: 0; }
  .ix .capsules > .st--first-soon { margin-top: 3.6rem; }
  .ahead__k { font-size: 1.2rem; margin-top: calc(-1.15rem - 2px - 3.5rem); }
  .ahead__k small { font-size: .86rem; }
  /* the chapter cards: the question, the times, an arrow at the top right (the summary is on the chapter's page) */
  .ch { gap: .5rem; padding: 1rem 1.1rem 1.05rem; }
  .ch__p, .ch__go { display: none; }
  .ch::after { content: ""; position: absolute; right: 1rem; top: 1.6rem; width: 18px; height: 18px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
  .ch__top { padding-right: 1.6rem; }
  .soon { flex-wrap: wrap; row-gap: .35rem; }
  .soon .ix-tag { margin-left: 0; }
  .lab1 { padding: 10px; }
  .lab1__shots { justify-content: center; gap: 8px; padding: 12px; }
  .lab1__shots > span { flex: 0 1 78px; border-radius: 9px; }
  .lab1__shots > span:nth-child(4) { display: none; }
  .parts__sq { gap: 4px; }
  .parts__sq > a { height: 32px; border-radius: 8px; font-size: .8rem; }
  /* The route ahead, denser: a station's name and its "Coming" on one line where they fit; a lab's logo beside its
     name, its one line under both (2.2 to 2.8 screens of slots otherwise, more than what is open). */
  .ix .capsules > .st--soon { gap: .45rem; padding: .85rem 1rem .95rem; }
  .st--soon .st__head > span:first-child { flex-basis: auto; margin: 0 .2rem 0 0; }
  .ix .capsules > .st--soon.st--lab { grid-template-columns: 46px minmax(0, 1fr); align-items: center; }
  .st--lab > .lg-tile { grid-row: auto; }
  .st--lab > .stops { grid-column: 1 / -1; }
  .rulecard { padding: 1.6rem 1.25rem; }
  .lean { padding: 1.1rem; }
}

/* ---------- Presenting (present.js): hero → how → the map in two pages → the rule → "Today in class: Lab 1" ----------
   The slides are laid out at 1280 px and scaled; the watercolor stays behind them. */
:root.is-presenting body > canvas#wc { display: block !important; }
:root.is-presenting .ix-hero { padding: 0; }
:root.is-presenting .ix-how { margin: 0; }
:root.is-presenting .ix-how__h { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; margin: 0 0 1.4rem; text-align: center; font: 700 2.6rem/1.15 var(--display); color: var(--ink); }
:root.is-presenting .ix-how__h::before { content: none !important; }
:root.is-presenting .ix-sec { padding: 0; }
:root.is-presenting .ix-head { margin-bottom: 1.4rem; }
:root.is-presenting .ix-map .ix-head__sub { display: none; }
:root.is-presenting .ix .capsules { row-gap: 1.5rem; }
:root.is-presenting .ix .capsules > li[data-pp-hide] { display: none !important; }
:root.is-presenting .st--open .st__head { margin-bottom: .8rem; }
:root.is-presenting .ch { padding: 1.15rem 1.2rem 1.1rem; gap: .55rem; }
:root.is-presenting .ch:hover, :root.is-presenting .lean:hover { transform: none; }
:root.is-presenting .stops > .stop--soon .soon { min-height: 46px; }
:root.is-presenting .ch__go { display: none; }
:root.is-presenting .lab1 { grid-template-columns: auto minmax(0, 1fr); }
:root.is-presenting .lab1__shots { padding: 14px; }
:root.is-presenting .lab1__shots > span { flex: 0 0 96px; }
:root.is-presenting .lab1 .ix-btn { min-height: 46px; padding-block: .6rem; }
:root.is-presenting .lab1__body { gap: .7rem; padding-block: .5rem; }
:root.is-presenting .lab1__p { display: none; }
:root.is-presenting .ix-rv { opacity: 1 !important; translate: none !important; }
/* The end slide: present.css's (the same card on every course page since 2026-11-03). */

/* ---------- Print: the map and the rule on paper ---------- */
@media print {
  #wc, .sprite, .ix-vis__art, .ix-btn, .ch__go, .ix-feats { display: none !important; }
  .wc-css body::before { display: none; }
  .veil::before { display: none; }
  .ch, .lab1, .rulecard, .lean, .how3 { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
  .st--soon { background: none; }
  .ix-title em, .rulecard__l em { background: none; -webkit-text-fill-color: currentColor; color: #4f46e5; }
}

/* Narrow phones (320 px): "Next in the course" wraps to two lines; give it the room. */
@media (max-width: 360px) {
  .ix .capsules > .st--first-soon { margin-top: 4.6rem; }
  .ahead__k { margin-top: calc(-1.15rem - 2px - 4.5rem); }
}
