/* Zine Classes (/learn): cast, scenes, quizzes, flashcards. Builds on site.css tokens. */

.cl { max-width: 980px; margin-inline: auto; }
.cl-head { margin: 0 0 clamp(20px, 3vw, 34px); display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: end; }
.cl-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 800; font-variation-settings: "BNCE" 40; --face: var(--c, var(--yellow)); margin: 0; }
.cl-head .sub { margin: 12px 0 0; color: var(--ink-2); font-size: clamp(1.12rem, 0.6vw + 0.95rem, 1.35rem); line-height: 1.45; max-width: 58ch; }
.cl-head .post-meta { margin-top: 14px; }
.cl-head .cast-row { display: flex; align-items: flex-end; gap: 2px; }
.cl-head .cast-row .who { width: 74px; }
@media (max-width: 720px) { .cl-head { grid-template-columns: 1fr; } .cl-head .cast-row .who { width: 56px; } }

/* sticky progress */
.cl-progress { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 8px 14px; margin: 0 0 22px; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border: 2px solid var(--ink); border-radius: 999px; font-size: 0.9em; }
.cl-progress .cl-track { flex: 1; height: 12px; border-radius: 999px; background: var(--paper-2); border: 2px solid var(--ink); overflow: hidden; }
.cl-progress .cl-fill { height: 100%; width: 0; background: var(--mint); transition: width .6s var(--ease); }
.cl-progress .cl-txt { white-space: nowrap; font-weight: 700; }
.cl-progress .cl-reset { border: 0; background: none; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; padding: 0; }
@media (max-width: 560px) { .cl-progress .cl-reset { display: none; } .cl-progress { font-size: 0.8em; } }

.cl-body { max-width: 74ch; margin-inline: auto; font-size: clamp(16.5px, 0.35vw + 15px, 18.5px); line-height: 1.7; }
.cl-body > * { margin: 0 0 1.1em; }
.cl-body h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); font-weight: 800; line-height: 1.1; margin: 2.4em 0 0.5em; scroll-margin-top: 80px; }
.cl-body h2 .num { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; margin-right: 0.35em; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--ink); font-size: 0.7em; vertical-align: 0.15em; }
.cl-body h3 { font-size: 1.25em; font-weight: 800; margin: 1.7em 0 0.5em; }
.cl-body ul, .cl-body ol { padding-left: 1.3em; }
.cl-body li { margin: 0.25em 0; }
.cl-body code { font-size: 0.86em; }
.cl-body pre { background: #16213e; color: #e8ecf7; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 0.84em; line-height: 1.55; }
.cl-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.cl-body pre .bad { background: rgba(236, 58, 120, .35); border-radius: 3px; padding: 0 2px; }
.cl-body pre .ok { background: rgba(18, 184, 134, .3); border-radius: 3px; padding: 0 2px; }
.cl-body pre .cm { color: #9aa6c4; }
.cl-body a { color: var(--sky-d); }
.cl-body .lede { font-size: 1.12em; }

/* chapter map */
.cl-toc { padding: 18px 22px; background: var(--paper-2); border-radius: 16px; }
.cl-toc ol { margin: 0.5em 0 0; columns: 2; column-gap: 28px; }
.cl-toc li { break-inside: avoid; }
.cl-toc a { text-decoration: none; color: var(--ink); }
.cl-toc a:hover { text-decoration: underline; }
.cl-toc a.ticked::after { content: " \2713"; color: var(--mint-d); font-weight: 800; }
@media (max-width: 640px) { .cl-toc ol { columns: 1; } }

/* the cast */
.who { display: inline-block; position: relative; line-height: 0; }
.who .cast-svg { width: 100%; height: auto; overflow: visible; filter: url(#pen); }
.who .nm { display: block; line-height: 1.1; text-align: center; font-size: 0.8em; font-weight: 800; margin-top: 2px; }
.who.bump .cast-svg { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: translateY(-6%) rotate(-3deg); } 60% { transform: translateY(1%) rotate(2deg); } }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 1.2em 0 1.6em; }
.cast-card { text-align: center; padding: 12px 10px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); }
.cast-card .who { width: 92px; }
.cast-card b { display: block; font-size: 1.1em; }
.cast-card span { display: block; color: var(--ink-2); font-size: 0.86em; line-height: 1.35; }

/* boxes shared with the blog */
.plain b, .deep b.h { display: block; margin-bottom: 0.2em; }
.say-it { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.say-it .who { width: 64px; }
.say-it .bub { position: relative; padding: 12px 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px 16px 16px 4px; }
.say-it.r { grid-template-columns: 1fr 64px; }
.say-it.r .who { order: 2; }
.say-it.r .bub { border-radius: 16px 16px 4px 16px; }

/* ---------- scenes ---------- */
.scene { position: relative; width: min(900px, calc(100vw - 32px)); margin: 1.6em 0 1.8em calc(50% - min(450px, 50vw - 16px)); }
.stage { position: relative; aspect-ratio: var(--W, 900) / var(--h, 400); container-type: inline-size; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 20px 24px 18px 26px / 22px 18px 26px 20px; overflow: hidden; cursor: pointer; user-select: none; line-height: 1.2; }
.stage > :not(svg) { font-size: max(10px, calc(var(--fs, 17) / var(--W, 900) * 100cqw)); }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 1px 1px, rgba(22,33,62,.1) 1px, transparent 1.4px) 0 0 / 22px 22px; pointer-events: none; }
.stage > svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stage > svg.wires path, .stage > svg.wires circle, .stage > svg.wires rect { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.stage > svg.wires .dash { stroke-dasharray: 8 9; }
.stage > svg.wires .red { stroke: var(--magenta); }
.stage > svg.wires .grn { stroke: var(--mint); }
.stage > svg.wires .fat { stroke-width: 5; }
.stage > svg.wires text { font-family: var(--font); font-size: 17px; fill: var(--ink-2); stroke: none; }
.stage > * { --x: 0; --y: 0; --w: 120; }
.stage > :not(svg) { position: absolute; left: calc(var(--x) / var(--W, 900) * 100%); top: calc(var(--y) / var(--h, 400) * 100%); }
.stage > .who { width: calc(var(--w) / var(--W, 900) * 100%); }
.stage [data-s] { visibility: hidden; }
.stage [data-s].on { visibility: visible; }
.stage .pop { animation: pop .5s cubic-bezier(.2,.9,.3,1.35) both; }
.stage svg [data-s].pop, .stage .who.pop { animation: none; }
@keyframes pop { from { opacity: 0; transform: scale(.7) translateY(8px); } }
.stage .tb { max-width: calc(var(--mw, 260) / var(--W, 900) * 100%); width: max-content; padding: .45em .7em; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; font-weight: 500; }
.stage .tb.r { border-radius: 14px 14px 14px 3px; }
.stage .tb.l { border-radius: 14px 14px 3px 14px; }
.stage .tb.yel { background: var(--yellow-t); } .stage .tb.red { background: var(--magenta-t); } .stage .tb.grn { background: var(--mint-t); } .stage .tb.blu { background: var(--sky-t); } .stage .tb.vio { background: var(--violet-t); }
.stage .tb code, .stage code { font-size: .8em; background: rgba(22,33,62,.07); padding: 0 .25em; border-radius: 4px; overflow-wrap: break-word; }
.stage .lbl { font-weight: 800; font-size: .9em; color: var(--ink-2); white-space: nowrap; }
.stage .chip-s { padding: .2em .6em; border-radius: 999px; border: 2px solid var(--ink); background: var(--yellow); font-weight: 800; font-size: .85em; white-space: nowrap; }
.stage .tok { width: calc(var(--w) / var(--W, 900) * 100%); line-height: 0; }
.stage .tok svg { width: 100%; height: auto; overflow: visible; }
.stage .boom { padding: .3em .7em; background: var(--magenta); color: #fff; font-weight: 800; border: 2.5px solid var(--ink); border-radius: 10px; transform: rotate(-6deg); }
.stage .ok-stamp { padding: .3em .7em; background: var(--mint); color: #fff; font-weight: 800; border: 2.5px solid var(--ink); border-radius: 10px; transform: rotate(4deg); }
.stage .page { width: calc(var(--w) / var(--W, 900) * 100%); padding: .5em .6em; background: #fff; border: 2px solid var(--ink); border-radius: 8px; font-size: .78em; line-height: 1.35; box-shadow: 4px 4px 0 var(--ink); }
.stage .page .bar { display: block; height: .55em; margin: 0 0 .5em; border-radius: 99px; background: var(--rule-soft); }
.stage .page .line { display: block; padding: .15em .3em; border-radius: 4px; }
.stage .page .line.evil { background: var(--magenta-t); outline: 2px dashed var(--magenta); }
.stage .db { width: calc(var(--w) / var(--W, 900) * 100%); }

.scene-bar { display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; }
.scene-bar button { font: inherit; font-size: 0.85em; font-weight: 800; border: 2px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 0.15em 0.8em; cursor: pointer; color: var(--ink); line-height: 1.5; }
.scene-bar button:hover { background: var(--yellow-t); }
.scene-bar .sb-play { background: var(--yellow); min-width: 3.2em; }
.scene-bar .sb-again { margin-left: auto; }
.sb-dots { display: flex; gap: 5px; flex-wrap: wrap; margin-left: 6px; }
.sb-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; }
.sb-dots i.on { background: var(--ink); }
.beats { list-style: none; padding: 0 !important; margin: 10px 0 0; min-height: 3.2em; }
.js .beats > li { display: none; }
.js .beats > li.now { display: block; animation: pop .4s ease both; }
.beats > li { padding: 10px 14px; background: var(--yellow-t); border-radius: 12px; border: 2px solid var(--ink); font-size: 0.98em; line-height: 1.5; }
.beats > li::before { content: attr(data-n); }
.js .scene[data-step="0"] .beats::before { content: "Press play, or tap the picture to step through."; display: block; padding: 10px 14px; color: var(--ink-2); border: 2px dashed var(--rule-soft); border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .js .beats > li { display: block; margin-bottom: 6px; } .scene-bar { display: none; } }

/* ---------- questions ---------- */
.q { position: relative; margin: 1.8em 0; padding: 18px 20px 18px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 22px 26px 20px 28px / 24px 20px 28px 22px; box-shadow: 5px 6px 0 var(--orange-t); }
.q-head { display: flex; align-items: center; gap: 10px; margin: -4px 0 8px; }
.q-ada { display: inline-block; width: 44px; line-height: 0; flex: none; }
.q-ada svg { width: 100%; height: auto; overflow: visible; }
.q-tag { font-weight: 800; font-size: 0.82em; padding: 0.15em 0.75em; border-radius: 999px; background: var(--orange-t); border: 2px solid var(--ink); }
.q .ask { font-weight: 700; font-size: 1.05em; margin: 0 0 0.7em; }
.q .opts { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 8px; }
.q .opts > li { margin: 0; }
.q .opt { width: 100%; text-align: left; font: inherit; font-size: 0.96em; line-height: 1.45; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); cursor: pointer; color: var(--ink); }
.q .opt:hover:not(:disabled) { background: var(--yellow-t); }
.q .opt[aria-pressed=true] { background: var(--sky-t); }
.q .opt:disabled { cursor: default; }
.q .opts > li.right .opt { background: var(--mint-t); border-color: var(--mint-d); }
.q .opts > li.right .opt::after { content: " \2713"; font-weight: 800; color: var(--mint-d); }
.q .opts > li.wrong .opt { background: var(--magenta-t); border-color: var(--magenta-d); }
.q .opts > li.wrong .opt::after { content: " \2717"; font-weight: 800; color: var(--magenta-d); }
.q .fb { margin: 0.8em 0 0; }
.q .fb:empty { display: none; }
.q .fb.yes b { color: var(--mint-d); } .q .fb.no b { color: var(--magenta-d); }
.q .why { margin-top: 0.8em; padding: 12px 16px; background: var(--orange-t); border-radius: 12px; border: 2px dashed var(--ink); }
.q .why > :last-child { margin-bottom: 0; }
.q .why > :first-child { margin-top: 0; }
.js .q:not(.done) .why { display: none; }
.q .q-check, .q .q-show { margin-top: 12px; }
.q .grade { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.q .grade > span { font-weight: 700; margin-right: 4px; }
.q.seen .q-tag::after { content: " · done before"; font-weight: 600; color: var(--ink-2); }
/* spot the bug */
.q pre { padding: 10px 0; }
.q pre .ln { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 1px 14px 1px 0; cursor: pointer; white-space: pre; }
.q pre .ln .no { display: inline-block; width: 2.6em; padding-right: 0.8em; text-align: right; color: #7d89a8; user-select: none; }
.q pre .ln:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.q pre .ln[aria-pressed=true] { background: rgba(43,155,244,.35); }
.q pre .ln.right { background: rgba(18,184,134,.35); }
.q pre .ln.wrong { background: rgba(236,58,120,.4); }
.q pre .ln.missed { background: rgba(255,212,59,.35); }
/* sort */
.q .items { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 8px; }
.q .items > li { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--rule-soft); border-radius: 12px; margin: 0; line-height: 1.45; }
.q .items > li.right { border-color: var(--mint); background: var(--mint-t); }
.q .items > li.wrong { border-color: var(--magenta); background: var(--magenta-t); }
.q .pick { display: flex; gap: 4px; flex-wrap: wrap; }
.q .pick button { font: inherit; font-size: 0.82em; font-weight: 700; padding: 0.2em 0.7em; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; color: var(--ink); }
.q .pick button[aria-pressed=true] { background: var(--sky-t); }
.q .pick button.is { background: var(--mint); color: #fff; }
@media (max-width: 640px) { .q .items > li { grid-template-columns: 1fr; } }
/* order */
.q .steps { padding: 0 !important; list-style: none; margin: 0; display: grid; gap: 8px; }
.q .steps > li { position: relative; margin: 0; padding: 10px 14px 10px 48px; border: 2px solid var(--ink); border-radius: 12px; cursor: pointer; line-height: 1.45; background: var(--paper); }
.q .steps > li::before { content: attr(data-at); position: absolute; left: 10px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px dashed var(--rule-soft); font-weight: 800; font-size: 0.85em; }
.q .steps > li[data-at]::before { border: 2px solid var(--ink); background: var(--yellow); }
.q .steps > li.right { background: var(--mint-t); } .q .steps > li.wrong { background: var(--magenta-t); }

/* ---------- tabs: context explorer ---------- */
.tabs { margin: 1.4em 0; border: 2.5px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--paper); }
.tabs [role=tablist] { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.tabs [role=tab] { font: inherit; font-size: 0.86em; font-weight: 800; padding: 0.25em 0.85em; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; color: var(--ink); }
.tabs [role=tab][aria-selected=true] { background: var(--yellow); }
.tabs [role=tabpanel] { padding: 14px 18px 6px; }
.tabs [role=tabpanel] > * { margin: 0 0 0.9em; }
.tabs .k { display: inline-block; min-width: 6.5em; font-weight: 800; color: var(--ink-2); font-size: 0.86em; }
html:not(.js) .tabs [role=tablist] { display: none; }
html:not(.js) .tabs [role=tabpanel] { display: block !important; border-bottom: 2px dashed var(--rule-soft); }

/* ---------- flashcards ---------- */
.flash { margin: 1.4em 0 0.8em; }
.fl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 0.88em; color: var(--ink-2); margin-bottom: 10px; }
.fl-top .fl-count { font-weight: 800; color: var(--ink); }
.fl-top label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.fl-top .fl-shuf { margin-left: auto; }
.fl-card { position: relative; min-height: 220px; padding: 22px 24px 22px 92px; border: 2.5px solid var(--ink); border-radius: 22px; background: var(--orange-t); cursor: pointer; box-shadow: 6px 7px 0 var(--ink); transition: background .3s; }
.flash.flipped .fl-card { background: var(--mint-t); }
.fl-card .q-ada { position: absolute; left: 18px; top: 18px; width: 58px; }
.fl-card .fl-lvl { margin: 0 0 4px; font-size: 0.8em; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.fl-card .fl-q { font-size: 1.18em; font-weight: 800; line-height: 1.35; }
.fl-card .fl-a { margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--ink); line-height: 1.55; }
.fl-card .fl-hint { margin: 14px 0 0; color: var(--ink-2); font-size: 0.86em; }
.fl-btns { display: flex; gap: 10px; margin-top: 14px; }
.deck-list { display: none; }
.deck-list.open { display: block; margin-top: 1em; }
.deck-list dt { font-weight: 800; margin-top: 1em; }
.deck-list dd { margin: 0.2em 0 0; color: var(--ink-2); }
html:not(.js) .deck-list { display: block; }
@media (max-width: 560px) { .fl-card { padding: 78px 18px 18px; } .fl-card .q-ada { width: 46px; } }

/* ---------- cheat sheet ---------- */
.cheat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cheat > div { padding: 14px 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); font-size: 0.92em; line-height: 1.5; }
.cheat > div b.h { display: block; font-size: 1.05em; margin-bottom: 4px; }
.cheat > div ul { margin: 0; padding-left: 1.1em; }
.cheat .c1 { background: var(--magenta-t); } .cheat .c2 { background: var(--sky-t); } .cheat .c3 { background: var(--mint-t); } .cheat .c4 { background: var(--yellow-t); } .cheat .c5 { background: var(--violet-t); } .cheat .c6 { background: var(--orange-t); }

/* ---------- /learn hub ---------- */
.hub-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; margin: clamp(18px, 3vw, 36px) 0 clamp(26px, 4vw, 48px); }
.hub-hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 800; line-height: 1; margin: 0; font-variation-settings: "BNCE" 45; }
.hub-hero p { font-size: clamp(1.1rem, 0.6vw + 0.95rem, 1.35rem); color: var(--ink-2); line-height: 1.5; max-width: 46ch; }
.hub-hero .cast-row { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; align-items: end; gap: 10px 18px; }
.hub-hero .cast-row .who { width: clamp(64px, 9vw, 96px); }
@media (max-width: 760px) { .hub-hero { grid-template-columns: 1fr; } }
.class-card { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 20px 22px; border: 2.5px solid var(--ink); border-radius: 22px; background: var(--magenta-t); text-decoration: none; color: var(--ink); box-shadow: 6px 7px 0 var(--ink); transition: transform .2s var(--ease); }
.class-card:hover { transform: translate(-2px, -2px); }
.class-card .who { width: 80px; }
.class-card h2 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; }
.class-card p { margin: 6px 0 0; color: var(--ink-2); }
@media (max-width: 640px) { .class-card { grid-template-columns: 1fr; } .class-card .who { width: 64px; } }
.roadmap { columns: 3 220px; column-gap: 26px; padding-left: 1.4em; margin: 1em 0; }
.roadmap li { break-inside: avoid; margin: 0.2em 0; color: var(--ink-2); }
.roadmap li.live { color: var(--ink); font-weight: 800; }
.roadmap li.live a { color: var(--magenta-d); }
.road-h { font-size: 1.15em; font-weight: 800; margin: 1.6em 0 0.2em; }

/* phones: keep the stage readable and let it scroll sideways (learn.js follows the action) */
.stage-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-radius: 20px; }
@media (max-width: 640px) {
  .scene { width: calc(100vw - 32px); --fs: 15.5; }
  .sb-dots i { width: 9px; height: 9px; }
  .scene-bar .sb-again { padding-inline: 0.6em; }
}
.q pre .ln { display: grid; grid-template-columns: 2.6em 1fr; white-space: normal; padding-right: 10px; }
.q pre .ln .tx { white-space: pre-wrap; overflow-wrap: anywhere; }
.q pre .ln .no { width: auto; }

/* ================= v2: calmer reading font, louder questions, progress rails ================= */
:root { --read: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --ok: #0ca678; --ok-d: #087f5b; --ok-t: #d3f9e8; --no: #e03131; --no-d: #b02525; --no-t: #ffe3e3; }
/* long reading text in a plain font, hand-drawn font kept for headings, the cast and Ada's questions */
.cl-body, .cl-head .sub, .cl-head .post-meta, .beats > li, .cast-card span, .cheat > div, .tabs [role=tabpanel], .fl-card .fl-a, .fl-top, .say-it .bub, .hub-hero p, .class-card p, .roadmap { font-family: var(--read); }
.cl-body { font-size: clamp(16.5px, 0.3vw + 15.4px, 18px); line-height: 1.72; letter-spacing: 0.002em; }
.cl-body h2, .cl-body h3, .cl-toc b, .plain > b:first-child, .deep b.h, .cheat b.h, .cast-card b, .road-h, .scene-bar button, .tabs [role=tab] { font-family: var(--font); }
.cl-body .lede { font-size: 1.1em; color: var(--ink); }
.beats > li { font-size: 0.95em; }
.cl-body .plain, .cl-body .deep { line-height: 1.65; }

/* the question card: hand-drawn font, warm paper, stands apart from the reading text */
.q { font-family: var(--font); background: #fffbea; border: 3px solid var(--ink); box-shadow: 6px 7px 0 var(--ink); padding: 20px 22px 18px; }
.q-head { margin: -2px 0 10px; }
.q-ada { width: 50px; }
.q-tag { background: var(--yellow); }
.q-num { margin-left: auto; font-size: 0.8em; font-weight: 800; color: var(--ink-2); }
.q .ask { font-size: 1.15em; font-weight: 800; line-height: 1.35; }
.q .why { font-family: var(--read); background: #fff; border: 2px dashed var(--ink); line-height: 1.65; }
.q.is-right { box-shadow: 6px 7px 0 var(--ok); }
.q.is-wrong { box-shadow: 6px 7px 0 var(--no); }
.q.seen .q-tag::after { content: none; }

/* options: letter badge, yellow while choosing, solid green / red once checked */
.q .opt { display: grid; grid-template-columns: 2.1em 1fr; gap: 10px; align-items: center; font-family: var(--font); font-weight: 600; padding: 10px 14px 10px 10px; background: #fff; transition: background .15s, border-color .15s, transform .15s; }
.q .opt .ltr { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper-2); font-weight: 800; font-size: 0.9em; }
.q .opt:hover:not(:disabled) { background: var(--yellow-t); transform: translateX(3px); }
.q .opt:hover:not(:disabled) .ltr { background: var(--yellow); }
.q .opt[aria-pressed=true]:not(:disabled) { background: var(--yellow); border-width: 3px; }
.q .opt[aria-pressed=true]:not(:disabled) .ltr { background: var(--ink); color: #fff; }
.q.done .opts > li .opt { opacity: 0.45; }
.q.done .opts > li.right .opt, .q.done .opts > li.wrong .opt { opacity: 1; }
.q .opts > li.right .opt { background: var(--ok); border-color: var(--ok-d); border-width: 3px; color: #fff; }
.q .opts > li.right .opt .ltr { background: #fff; color: var(--ok-d); border-color: #fff; }
.q .opts > li.right .opt::after { content: "\2713  correct"; grid-column: 2; font-size: 0.82em; font-weight: 800; color: #fff; }
.q .opts > li.wrong .opt { background: var(--no); border-color: var(--no-d); border-width: 3px; color: #fff; }
.q .opts > li.wrong .opt .ltr { background: #fff; color: var(--no-d); border-color: #fff; }
.q .opts > li.wrong .opt::after { content: "\2717  your pick"; grid-column: 2; font-size: 0.82em; font-weight: 800; color: #fff; }
.q .opts > li.right.picked .opt::after { content: "\2713  correct, your pick"; }
.q .opts > li .opt code { background: rgba(255,255,255,.25); color: inherit; }
.q .fb { font-family: var(--read); padding: 10px 14px; border-radius: 12px; border: 2.5px solid; line-height: 1.55; }
.q .fb.yes { background: var(--ok-t); border-color: var(--ok); }
.q .fb.no { background: var(--no-t); border-color: var(--no); }
.q .fb.yes b { color: var(--ok-d); } .q .fb.no b { color: var(--no-d); }
.q .fb:not(.yes):not(.no) { border: 0; padding: 0; color: var(--ink-2); }
.q-retry { margin-top: 12px; font: inherit; font-size: 0.82em; font-weight: 800; background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.q .grade .gr { padding: 6px 12px; border-radius: 999px; font-weight: 800; }
.q .grade .gr.yes { background: var(--ok); color: #fff; } .q .grade .gr.no { background: var(--no); color: #fff; }
/* other question types use the same green and red */
.q pre .ln[aria-pressed=true]:not(:disabled) { background: rgba(255, 212, 59, .45); }
.q pre .ln.right { background: rgba(12, 166, 120, .75); }
.q pre .ln.wrong { background: rgba(224, 49, 49, .75); }
.q pre .ln.missed { background: rgba(255, 212, 59, .45); outline: 2px dashed #ffd43b; outline-offset: -2px; }
.q .items > li { background: #fff; font-family: var(--read); }
.q .items > li.right { border: 2.5px solid var(--ok); background: var(--ok-t); }
.q .items > li.wrong { border: 2.5px solid var(--no); background: var(--no-t); }
.q .pick button { font-family: var(--font); }
.q .pick button[aria-pressed=true] { background: var(--yellow); }
.q .items > li.wrong .pick button[aria-pressed=true] { background: var(--no); color: #fff; border-color: var(--no-d); }
.q .pick button.is { background: var(--ok); color: #fff; border-color: var(--ok-d); }
.q .steps > li { font-family: var(--read); }
.q .steps > li.picked { background: var(--yellow-t); }
.q .steps > li.right { background: var(--ok-t); border: 2.5px solid var(--ok); }
.q .steps > li.wrong { background: var(--no-t); border: 2.5px solid var(--no); }
.q .steps > li.right::before { background: var(--ok); color: #fff; border-color: var(--ok-d); }
.q .steps > li.wrong::before { background: var(--no); color: #fff; border-color: var(--no-d); }

/* side rails: reading (left) and questions (right) */
.rail { position: fixed; top: 96px; bottom: 28px; width: 128px; z-index: 15; display: none; flex-direction: column; font-size: 12.5px; line-height: 1.25; }
.rail-read { left: max(12px, calc((100vw - 980px) / 2 - 150px)); }
.rail-qs { right: max(12px, calc((100vw - 980px) / 2 - 150px)); align-items: flex-end; text-align: right; }
.rail-h { font-family: var(--font); font-weight: 800; font-size: 14px; }
.rail-pct, .rail-score { font-family: var(--read); color: var(--ink-2); margin: 2px 0 10px; }
.rail-score .s-ok, .cl-score .s-ok { color: var(--ok-d); font-weight: 700; }
.rail-score .s-no, .cl-score .s-no { color: var(--no-d); font-weight: 700; }
.rail-line { position: relative; flex: 1; width: 100%; }
.rail-line::before { content: ""; position: absolute; top: 0; bottom: 0; width: 4px; border-radius: 4px; background: var(--rule-soft); }
.rail-read .rail-line::before { left: 6px; }
.rail-qs .rail-line::before { right: 10px; }
.rail-fill { position: absolute; left: 6px; top: 0; width: 4px; height: 0; border-radius: 4px; background: var(--ink); transition: height .2s linear; }
.rail-mark { position: absolute; left: 0; display: flex; align-items: center; gap: 8px; width: 100%; translate: 0 -50%; text-decoration: none; color: var(--ink-2); font-family: var(--read); }
.rail-mark i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--rule-soft); background: var(--paper); }
.rail-mark b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-mark.past i { background: var(--ink); border-color: var(--ink); }
.rail-mark.now i { background: var(--yellow); border-color: var(--ink); transform: scale(1.25); }
.rail-mark.now b { color: var(--ink); font-weight: 800; }
.rail-mark:hover b { color: var(--ink); overflow: visible; background: var(--paper); }
.rail-q { position: absolute; right: 0; translate: 0 -50%; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--rule-soft); background: var(--paper); text-decoration: none; color: var(--ink-2); font-family: var(--read); font-weight: 700; font-size: 11px; }
.rail-q i { font-style: normal; }
.rail-q.ok { background: var(--ok); border-color: var(--ok-d); color: #fff; }
.rail-q.no { background: var(--no); border-color: var(--no-d); color: #fff; }
.rail-q:hover { transform: scale(1.15); border-color: var(--ink); }
.rail-reset { margin-top: 10px; font: inherit; font-family: var(--read); background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
@media (min-width: 1260px) { .rail { display: flex; } .cl-progress { display: none; } }

/* compact bar for smaller screens: reading % plus one dot per question */
.cl-progress { font-family: var(--read); flex-wrap: wrap; row-gap: 6px; }
.cl-progress .cl-fill { background: var(--ink); }
.cl-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.cl-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--rule-soft); background: var(--paper); }
.cl-dot.ok { background: var(--ok); border-color: var(--ok-d); }
.cl-dot.no { background: var(--no); border-color: var(--no-d); }
.cl-score { font-weight: 700; }
@media (max-width: 560px) { .cl-dots { order: 5; width: 100%; } .cl-dot { width: 10px; height: 10px; } }
/* v2 fixes */
.q .opt .otx { min-width: 0; overflow-wrap: anywhere; }
/* the right answer you didn't pick: green outline and tint, still easy to spot */
.q .opts > li.right:not(.picked) .opt { background: var(--ok-t); color: var(--ink); border: 3px solid var(--ok); }
.q .opts > li.right:not(.picked) .opt .ltr { background: var(--ok); color: #fff; border-color: var(--ok-d); }
.q .opts > li.right:not(.picked) .opt::after { content: "\2713  correct answer"; color: var(--ok-d); }
.q .opts > li.right:not(.picked) .opt code { background: rgba(22,33,62,.07); }
.cl-progress { top: calc(var(--hdr, 0px) + 8px); }
.rail { top: calc(var(--hdr, 68px) + 26px); width: clamp(100px, calc((100vw - 980px) / 2 - 44px), 210px); }
.rail-read { left: 20px; }
.rail-qs { right: 20px; }
.q .items > li .itx { min-width: 0; }
.stage .boom, .stage .ok-stamp, .stage .chip-s { white-space: nowrap; }
.stage, .stage .tb, .stage .page { font-family: var(--font); }

/* ================= v3: progress bar that slims to a green line, opens on tap ================= */
.cl-progress { display: block; padding: 0; border: 0; background: none; backdrop-filter: none; border-radius: 0; margin: 0 0 22px; transition: margin .3s var(--ease); }
.cl-toggle { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 14px; cursor: pointer; background: rgba(255,255,255,.95); border: 2px solid var(--ink); border-radius: 999px; font-family: var(--read); font-size: 0.9em; transition: padding .3s var(--ease), border-color .3s, border-radius .3s, background .3s; }
.cl-toggle:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.cl-progress .cl-track { position: relative; flex: 1; height: 14px; border-radius: 999px; background: var(--paper-2); border: 2px solid var(--ink); overflow: visible; transition: height .3s var(--ease), border-color .3s; }
.cl-progress .cl-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--ok); transition: width .2s linear; }
.cl-track .cl-dot { position: absolute; top: 50%; translate: -50% -50%; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-2); background: #fff; transition: width .3s, height .3s; }
.cl-dot.ok { background: var(--ok); border-color: var(--ok-d); }
.cl-dot.no { background: var(--no); border-color: var(--no-d); }
.cl-more { font-size: 0.9em; color: var(--ink-2); transition: transform .3s; }
.cl-progress.open .cl-more { transform: rotate(180deg); }
.cl-txt, .cl-score { white-space: nowrap; transition: opacity .2s; }
/* slim: just the green line with the question dots */
.cl-progress.slim .cl-toggle { padding: 6px 0; border-color: transparent; background: transparent; gap: 0; }
.cl-progress.slim .cl-txt, .cl-progress.slim .cl-score, .cl-progress.slim .cl-more { width: 0; opacity: 0; overflow: hidden; }
.cl-progress.slim .cl-track { height: 6px; border: 0; background: rgba(22,33,62,.15); }
.cl-progress.slim .cl-track .cl-dot { width: 9px; height: 9px; border-width: 1.5px; }
/* open: the panel with chapters and every question */
.cl-panel { margin-top: 8px; max-height: min(62vh, 520px); overflow: auto; padding: 14px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 18px; box-shadow: 5px 6px 0 var(--ink); font-family: var(--read); font-size: 0.92em; }
.cl-ph { margin: 0 0 6px; font-family: var(--font); font-weight: 800; }
.cl-chap, .cl-qlist { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; }
.cl-chap { grid-template-columns: 1fr 1fr; column-gap: 12px; counter-reset: c; }
.cl-chap li { counter-increment: c; }
.cl-chap a::before { content: counter(c) ". "; color: var(--ink-2); }
.cl-chap a, .cl-qlist a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.cl-chap a:hover, .cl-qlist a:hover { background: var(--yellow-t); }
.cl-qlist .cl-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-2); background: #fff; }
.cl-panel .rail-reset { margin: 0; }
@media (max-width: 560px) { .cl-chap { grid-template-columns: 1fr; } .cl-toggle { font-size: 0.82em; gap: 8px; } }
.cl-progress.slim .cl-toggle { padding: 9px 12px; background: rgba(255,255,255,.96); border-color: transparent; border-radius: 999px; box-shadow: 0 2px 10px rgba(22,33,62,.12); }
.cl-chap a, .cl-qlist a { padding: 3px 6px; }
.cl-chap, .cl-qlist { gap: 0; }
@media (min-width: 1260px) { .cl-progress { display: none; } }

/* ================= v4: burger + page drawer ================= */
.burger { display: none; flex: none; width: 40px; height: 40px; padding: 0; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); cursor: pointer; place-content: center; gap: 4px; }
.burger span { display: block; width: 18px; height: 2.5px; border-radius: 2px; background: var(--ink); }
.burger:hover { background: var(--yellow-t); }
.mini-top .burger { width: 34px; height: 34px; border-radius: 10px; }
@media (max-width: 1259px) { .burger { display: inline-grid; } }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(22,33,62,.35); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 61; width: min(86vw, 340px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px 28px; background: var(--paper); border-right: 2.5px solid var(--ink); box-shadow: 6px 0 0 rgba(22,33,62,.12); font-family: var(--read); transform: translateX(-105%); transition: transform .28s var(--ease); }
.drawer.on { transform: none; }
html.dr-open { overflow: hidden; }
.dr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.dr-head b { flex: 1; font-family: var(--font); font-size: 1.15em; line-height: 1.15; }
.dr-x { width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); font-size: 1.4em; line-height: 1; cursor: pointer; }
.dr-h { margin: 16px 0 6px; font-family: var(--font); font-weight: 800; font-size: 0.95em; display: flex; justify-content: space-between; }
.dr-h .dr-score { font-family: var(--read); font-weight: 700; }
.dr-chap, .dr-site { list-style: none; margin: 0; padding: 0; }
.dr-chap { counter-reset: c; }
.dr-chap li { counter-increment: c; }
.dr-chap a, .dr-site a { display: block; padding: 7px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.dr-chap a::before { content: counter(c) ". "; color: var(--ink-2); }
.dr-chap a:hover, .dr-site a:hover { background: var(--yellow-t); }
.dr-chap a.now { background: var(--yellow); font-weight: 700; }
.dr-chap a.ticked::after { content: " \2713"; color: var(--ok-d); font-weight: 800; }
.dr-qs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dr-qs a { display: grid; place-items: center; position: relative; height: 36px; border-radius: 10px; border: 2px solid var(--rule-soft); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.9em; }
.dr-qs a .cl-dot { position: absolute; inset: -2px; width: auto; height: auto; border-radius: 10px; border: 2px solid transparent; background: none; z-index: -1; }
.dr-qs li { position: relative; z-index: 0; }
.dr-qs a:has(.cl-dot.ok) { background: var(--ok); border-color: var(--ok-d); color: #fff; }
.dr-qs a:has(.cl-dot.no) { background: var(--no); border-color: var(--no-d); color: #fff; }
.dr-site { display: grid; grid-template-columns: 1fr 1fr; }
/* sticky progress bar sits under the slim logo bar on phones */
html.mini-on .cl-progress { top: 58px; }

/* ================= v5: hand-inked outlines on the scene boxes ================= */
.stage .tb, .stage .page, .stage .chip-s, .stage .boom, .stage .ok-stamp { border-color: transparent; }
.stage .tb::after, .stage .page::after, .stage .chip-s::after, .stage .boom::after, .stage .ok-stamp::after { content: ""; position: absolute; inset: -2px; border: 2.2px solid var(--ink); border-radius: inherit; filter: url(#pen); pointer-events: none; }
.stage .boom::after, .stage .ok-stamp::after { border-width: 2.6px; }
.stage { border-color: transparent; }
.stage-scroll { position: relative; }
.stage-scroll::after { content: ""; position: absolute; inset: 0; border: 2.5px solid var(--ink); border-radius: 20px 24px 18px 26px / 22px 18px 26px 20px; filter: url(#pen); pointer-events: none; }
.stage > svg.wires path { stroke-width: 2.8; }
.stage > svg.wires .fat { stroke-width: 4.5; }
.class-card.t-magenta { background: var(--magenta-t); } .class-card.t-sky { background: var(--sky-t); } .class-card.t-mint { background: var(--mint-t); } .class-card.t-violet { background: var(--violet-t); } .class-card.t-orange { background: var(--orange-t); } .class-card.t-teal { background: var(--teal-t); } .class-card.t-lime { background: var(--lime-t); } .class-card.t-yellow { background: var(--yellow-t); }
.class-card + .class-card { margin-top: 16px; }

/* ================= v6: hub built for 100 classes ================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub-kicker { margin: 0 0 6px; font-family: var(--font); font-weight: 800; color: var(--magenta-d); text-transform: uppercase; letter-spacing: .04em; font-size: .85em; }
.hub-count { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-family: var(--read); color: var(--ink-2); }
.hub-count b { color: var(--ink); }
.hub-track { flex: 0 0 160px; height: 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper-2); overflow: hidden; }
.hub-track span { display: block; height: 100%; min-width: 6px; background: var(--ok, #0ca678); }
.hub-spot { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin: 0 0 clamp(30px, 5vw, 56px); }
.spot-today { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 26px 24px 22px; border: 3px solid var(--ink); border-radius: 24px; background: var(--magenta-t); color: var(--ink); text-decoration: none; box-shadow: 7px 8px 0 var(--ink); transition: transform .2s var(--ease); }
.spot-today:hover { transform: translate(-2px, -2px); }
.spot-today .who { width: clamp(70px, 9vw, 100px); }
.spot-today h2 { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.3rem); line-height: 1.05; }
.spot-today p { margin: 8px 0 14px; font-family: var(--read); color: var(--ink-2); }
.spot-tag { position: absolute; top: -14px; left: 20px; padding: 3px 12px 5px; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--ok, #0ca678); color: #fff; font-weight: 800; font-size: .85em; transform: rotate(-3deg); }
.spot-tag.soon { background: var(--yellow); color: var(--ink); }
.spot-next { position: relative; padding: 26px 22px 20px; border: 3px dashed var(--ink); border-radius: 24px; background: var(--paper); }
.spot-next h3 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.1; }
.spot-next p { margin: 8px 0 0; font-family: var(--read); color: var(--ink-2); font-size: .95em; }
@media (max-width: 760px) { .hub-spot { grid-template-columns: 1fr; gap: 26px; } .spot-today { grid-template-columns: 1fr; } }
.hub-all-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hub-all-head h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.hub-search input { font: inherit; font-family: var(--read); width: min(320px, 80vw); padding: 9px 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; }
.hub-search input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.hub-chips button { font: inherit; font-weight: 800; font-size: .88em; padding: 5px 12px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ct, var(--paper)); color: var(--ink); cursor: pointer; }
.hub-chips button small { font-family: var(--read); font-weight: 600; color: var(--ink-2); }
.hub-chips button[aria-pressed=true] { background: var(--ink); color: #fff; }
.hub-chips button[aria-pressed=true] small { color: #cfd5e4; }
.hub-track-sec { margin-top: 26px; }
.hub-track-sec h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 1.3em; }
.hub-track-sec h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); align-self: center; }
.hub-track-sec h3 small { font-family: var(--read); font-weight: 600; font-size: .7em; color: var(--ink-2); }
.zc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.zc-tile > a, .zc-tile > div { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; height: 100%; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--ink); }
.zc-tile > div { border: 2px dashed var(--rule-soft); background: rgba(255,255,255,.7); color: var(--ink-2); }
.zc-tile.is-live > a { border: 2.5px solid var(--ink); background: var(--ct); box-shadow: 4px 5px 0 var(--ink); transition: transform .15s var(--ease); }
.zc-tile.is-live > a:hover { transform: translate(-2px, -2px); }
.zc-n { grid-row: 1 / span 3; align-self: start; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid currentColor; font-family: var(--read); font-weight: 800; font-size: .85em; }
.zc-tile.is-live .zc-n { background: var(--c); color: #fff; border-color: var(--ink); }
.zc-tile b { font-size: 1.05em; line-height: 1.15; }
.zc-tile small { font-family: var(--read); font-size: .8em; line-height: 1.3; color: var(--ink-2); }
.zc-st { margin-top: 6px; font-family: var(--read); font-weight: 700; font-size: .78em; }
.zc-tile.is-live .zc-st { color: var(--ink); }
.zc-tile:not(.is-live) .zc-st::before { content: "\1F512  "; }
.hub-empty { margin-top: 20px; font-family: var(--read); color: var(--ink-2); }


@media (max-width: 640px) { .zc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .zc-tile > a, .zc-tile > div { grid-template-columns: 1fr; padding: 10px 11px; } .zc-n { grid-row: auto; width: 28px; height: 28px; margin-bottom: 4px; } .zc-tile small { display: none; } .hub-chips button { font-size: .8em; padding: 4px 10px 5px; } }

/* ================= v7: phones, small and crisp ================= */
@media (max-width: 640px) {
  /* /learn hub */
  .hub-hero { gap: 10px; margin: 12px 0 22px; }
  .hub-kicker { font-size: 0.72em; margin-bottom: 2px; }
  .hub-hero h1 { font-size: 2.3rem; }
  .hub-hero p { font-size: 0.95em; line-height: 1.45; margin: 8px 0; }
  .hub-count { font-size: 0.85em; gap: 6px 10px; }
  .hub-track { flex-basis: 100px; height: 10px; }
  .hub-hero .cast-row { order: -1; grid-template-columns: repeat(6, auto); gap: 2px; justify-content: start; }
  .hub-hero .cast-row .who { width: 46px; }
  .hub-hero .cast-row .who .nm { display: none; }
  .hub-spot { gap: 18px; margin-bottom: 26px; }
  .spot-today { grid-template-columns: auto 1fr; gap: 12px; padding: 18px 14px 14px; border-radius: 18px; box-shadow: 4px 5px 0 var(--ink); }
  .spot-today .who { width: 54px; }
  .spot-today h2 { font-size: 1.2rem; }
  .spot-today p { font-size: 0.8em; margin: 4px 0 10px; }
  .spot-today .btn { font-size: 0.85em; padding: 0.35em 0.9em 0.4em; }
  .spot-tag { top: -11px; left: 14px; font-size: 0.72em; padding: 2px 9px 3px; }
  .spot-next { padding: 18px 14px 12px; border-radius: 18px; }
  .spot-next h3 { font-size: 1.05rem; }
  .spot-next p { font-size: 0.8em; }
  .hub-all-head h2 { font-size: 1.4rem; }
  .hub-search input { width: 100%; padding: 7px 14px; font-size: 0.9em; }
  .hub-all-head { gap: 8px; }
  .hub-search { width: 100%; }
  .hub-chips { gap: 5px; margin: 10px 0 2px; }
  .hub-chips button { font-size: 0.72em; padding: 3px 9px 4px; border-width: 1.5px; }
  .hub-track-sec { margin-top: 18px; }
  .hub-track-sec h3 { font-size: 1.05em; margin-bottom: 8px; }
  .zc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .zc-tile > a, .zc-tile > div { display: block; padding: 7px 8px 8px; border-radius: 12px; min-height: 64px; }
  .zc-tile.is-live > a { box-shadow: 3px 3px 0 var(--ink); border-width: 2px; }
  .zc-n { width: 22px; height: 22px; margin: 0 0 4px; font-size: 0.68em; border-width: 1.5px; }
  .zc-tile b { display: block; font-size: 0.8em; line-height: 1.15; }
  .zc-st { position: absolute; top: 7px; right: 8px; margin: 0; font-size: 0.62em; }
  .zc-tile:not(.is-live) .zc-st { font-size: 0; }
  .zc-tile:not(.is-live) .zc-st::before { font-size: 11px; }
  .zc-tile.is-live .zc-st { font-size: 0; }
  .zc-tile.is-live .zc-st::after { content: "\2192"; font-size: 13px; font-weight: 800; }
}
@media (max-width: 640px) { .hub-count { display: block; } .hub-count .hub-track { display: inline-block; width: 90px; vertical-align: middle; margin-right: 8px; } }


/* ================= v8: home strip for Zine Classes, small, hover like the AWS covers ================= */
.learn-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: clamp(12px, 2vw, 20px) 0 clamp(14px, 2.4vw, 24px); padding: 14px clamp(16px, 2vw, 24px); border: 2.5px solid var(--ink); border-radius: 22px; background: var(--magenta-t); }
.lb-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.lb-tape { padding: 2px 10px 4px; border: 2px solid var(--ink); border-radius: 9px; background: var(--magenta); color: #fff; font-weight: 800; font-size: .85em; transform: rotate(-4deg); }
.learn-band h2.bubble { --face: var(--magenta); margin: 0; font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 800; line-height: 1; }
.learn-band p { flex-basis: 100%; margin: 0; font-family: var(--read); font-size: .9em; color: var(--ink-2); }
.lb-cards { display: flex; gap: 14px; padding: 4px 6px; }
.lb-card { display: flex; flex-direction: column; min-width: 150px; max-width: 220px; padding: 8px 14px 10px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 4px 4px 0 var(--ink); transition: transform var(--t) var(--ease); }
.lb-today { transform: rotate(-2deg); }
.lb-next { transform: rotate(2deg); background: var(--yellow-t); }
.lb-card small { font-family: var(--read); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .66em; color: var(--ink-2); }
.lb-today small { color: var(--ok-d, #087f5b); }
.lb-card b { font-size: 1.25em; line-height: 1.1; }
.lb-card span { font-family: var(--read); font-size: .74em; line-height: 1.3; color: var(--ink-2); }
@media (hover: hover) { .lb-card:hover { transform: rotate(0) scale(1.07); position: relative; z-index: 2; } }
@media (max-width: 640px) {
  .learn-band { padding: 12px 12px 14px; gap: 10px; border-radius: 18px; }
  .learn-band h2.bubble { font-size: 1.3rem; }
  .learn-band p { font-size: .8em; }
  .lb-cards { width: 100%; gap: 10px; padding: 2px; }
  .lb-card { flex: 1; min-width: 0; max-width: none; padding: 7px 10px 9px; }
  .lb-card b { font-size: 1.05em; }
}@media (min-width: 641px) { .learn-band { flex-wrap: nowrap; } .lb-copy { flex: 1 1 auto; } .lb-cards { flex: none; } }

/* ================= v9: countdown + class pager ================= */
.lb-count { display: block; margin-top: 3px; font-family: var(--read); font-style: normal; font-weight: 700; font-size: .72em; color: var(--magenta-d); }
.lb-count:empty { display: none; }
.spot-next .lb-count { display: inline; font-size: 1em; }
.cl-pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 2.4em 0 0; }
.cl-pager a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 2.5px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 4px 4px 0 var(--ink); transition: transform var(--t) var(--ease); }
.cl-pager a.soon { border-style: dashed; box-shadow: none; background: var(--yellow-t); }
.cl-pager small { font-family: var(--read); font-weight: 800; font-size: .72em; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.cl-pager b { font-family: var(--font); font-size: 1.05em; line-height: 1.2; }
@media (hover: hover) { .cl-pager a:hover { transform: rotate(-1deg) scale(1.03); } }
