/* WEB-DD-1 L0-1 comic panels (R4.1 "Clean Comic Panels + Selective Drama"; IRP v0.2 §12). Loaded on the L0-1 page only.
   Locked tokens only (tokens.css), no alpha. MIAC-1: the panel number is ink on orange (5.86:1). MIAC-2: dimmed board
   digits are ink2 on qbg (7.39:1). Decorative shapes (rays, check icons, hook box, shadows) carry no meaning (A11Y-04). */
.lesson.l01{max-width:none}
.l01 .top{display:grid;grid-template-columns:1fr minmax(0,420px);gap:24px;align-items:center;margin-bottom:8px}
.l01 .top .kicker{display:inline-block;background:var(--orange);color:var(--ink);border-radius:999px;padding:2px 14px;margin:0 0 6px}
.l01 h1{font-size:clamp(2rem,5vw,3.25rem);font-style:italic;line-height:1.15;margin:4px 0 0}
.l01 .sub{font-size:1.4rem;font-weight:700;color:var(--ink2);margin:2px 0 0}
.l01 .hook{position:relative;width:100%;max-width:420px;aspect-ratio:420/170;justify-self:end}
.l01 .hook svg{position:absolute;inset:0;width:100%;height:100%}
.hook-s{fill:var(--white);stroke:var(--ink);stroke-width:3;stroke-linejoin:round}
.hook-u{stroke:var(--orange);stroke-width:5;stroke-linecap:round;fill:none}
.l01 .hook p{position:absolute;left:12%;right:9%;top:17%;margin:0;font-size:clamp(1.2rem,2.4vw,1.6rem);font-weight:700;font-style:italic;line-height:1.3;transform:rotate(-4deg);text-align:center}
.l01 .hook p span{display:inline-block}

/* panels: number order = DOM order = reading order on every width (A11Y-02) */
.comic{display:grid;grid-template-columns:1fr;gap:22px;margin:16px 0 8px}
.pn{position:relative;background:var(--white);border:3px solid var(--ink);border-radius:20px;padding:16px 18px 18px;box-shadow:5px 6px 0 var(--band);min-width:0}
.pn h2{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;background:var(--cream);border-radius:999px;padding:2px 18px 2px 2px;margin:0 0 12px;font-size:1.2rem;width:max-content;max-width:100%}
.pn h2:focus{outline:3px solid var(--ink);outline-offset:3px}
.pn h2 .no{width:38px;height:38px;flex:none;border-radius:50%;background:var(--orange);color:var(--ink);border:2.5px solid var(--ink);display:inline-flex;align-items:center;justify-content:center;font-size:1.3rem}
.po{font-size:1rem;font-weight:500;color:var(--ink2);margin-left:-6px}
.pn p{margin:0 0 8px}
.pn .q{font-size:1.2rem;font-weight:700}
.pn .s{font-size:.95rem;color:var(--ink2)}
.row2{display:flex;flex-direction:column;gap:14px}
.bd{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.cen{display:flex;justify-content:center;margin:8px 0}

/* boards (static SVG from LEVEL0[0]) */
.cb{display:block;height:auto;max-width:100%}
.cb.b-full{width:min(100%,300px)}
.cb.b-strip{width:min(100%,330px)}
.cb.b-strip-l{width:min(100%,400px)}
.cb text{font-family:var(--sans);font-size:23px;text-anchor:middle;dominant-baseline:central}
.cb-w{fill:var(--white)}.cb-band{fill:var(--band)}.cb-q{fill:var(--qbg)}.cb-mint{fill:var(--mint-fill)}
.cb-d{fill:var(--ink);font-weight:500}.cb-g{fill:var(--ink);font-weight:700}.cb-d2{fill:var(--ink2);font-weight:500}
.cb line{fill:none}.cb-thin{stroke:var(--gridline);stroke-width:1}.cb-box{stroke:var(--ink);stroke-width:2.5}.cb-edge{stroke:var(--ink);stroke-width:4}
.cb-frame{fill:none;stroke:var(--ink);stroke-width:2.5}
.cb-ring{fill:none;stroke:var(--orange);stroke-width:3}
.lg{display:flex;flex-wrap:wrap;gap:4px 14px;justify-content:center;list-style:none;margin:2px 0 0;padding:0;font-size:.9rem}
.lg li{display:inline-flex;align-items:center;gap:6px;max-width:none}
.lg-sw{width:28px;height:16px;flex:none}.lg-sw.lg-sq{width:16px}
.lg-b{stroke:var(--ink);stroke-width:1.5}
.pn .board-note{font-size:.95rem;color:var(--ink2);margin:0;text-align:center}
.l01-add{border-left:6px solid var(--orange);background:var(--cream);border-radius:8px;padding:8px 12px}
.cb-text{align-self:stretch;font-size:.95rem}
.cb-text summary,.steps summary{cursor:pointer;min-height:44px;padding:10px 0;box-sizing:border-box;font-weight:700}
.cb-text ul{margin:4px 0 0;padding-left:20px}

/* panel 3 / 4 count boxes */
.tally{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px;margin:10px 0 6px;padding:0;list-style:none}
.tally li{border:2px solid var(--ink);border-radius:6px;text-align:center;background:var(--white);padding:2px 0 3px;max-width:none}
.tally b{display:block;font-size:1.05rem}
.tally i{display:block;font-style:normal;min-height:20px;font-weight:700}
.tally.ok li{background:var(--mint-fill)}
.stamp{display:inline-flex;align-items:center;gap:8px;border:3px solid var(--mint-accent);border-radius:10px;padding:3px 12px;transform:rotate(-3deg);background:var(--white);font-weight:700;margin:6px 0 8px}
.chk{width:26px;height:26px;flex:none}
.chk-c{fill:var(--mint-accent);stroke:var(--ink);stroke-width:2.5}
.chk-p{fill:none;stroke:var(--white);stroke-width:5;stroke-linecap:round;stroke-linejoin:round}

/* panel 5 */
.trio{display:flex;flex-wrap:nowrap;gap:16px 26px;align-items:flex-end;justify-content:center;margin:2px 0 12px}
.trio figure{margin:0;text-align:center;color:var(--ink2);font-size:.9rem;flex:none}
.cb.b-u-row{width:234px}.cb.b-u-col{width:26px}.cb.b-u-box{width:117px}
@media (max-width:1100px){.trio{flex-wrap:wrap;gap:12px 30px}.trio figure:first-child{flex-basis:100%}.cb.b-u-row{width:min(100%,270px);margin:0 auto}.cb.b-u-col{width:24px}.cb.b-u-box{width:120px}}
.rule{background:var(--cream);border-left:6px solid var(--orange);border-radius:8px;padding:8px 12px;font-size:1.05rem}

/* covered / locked states (set by l01.js; without JS every panel shows its content) */
.pn.lock{background:var(--qbg);border-style:dashed;border-color:var(--ink2);box-shadow:none}
.pn.lock h2 .no{background:var(--band);color:var(--ink)}
.cover{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:150px;text-align:center}
.pn .locked{color:var(--ink2);text-align:center;padding:40px 0}
.pn .btn{background:var(--orange);color:var(--ink);border:3px solid var(--ink);border-radius:12px;font:inherit;font-weight:700;font-size:1.05rem;padding:8px 20px;cursor:pointer;min-height:48px;min-width:44px;box-shadow:3px 3px 0 var(--ink)}
.pn .btn:focus-visible,.cta-next:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.ask{display:flex;flex-direction:column;align-items:center;gap:12px}
.ask .btn{flex:none;white-space:nowrap}
[hidden]{display:none!important}

/* panel 6: the one dramatic panel (rays only after the reveal, never on load) */
.pn.drama{overflow:hidden;background:var(--cream)}
.pn.drama.lock{background:var(--qbg)}
.pn.drama .rays{position:absolute;inset:0;width:100%;height:100%;fill:var(--orange)}
.pn h2{position:relative;z-index:2}
.p6w{position:relative;z-index:1;display:flex;flex-direction:column;gap:14px}
.p6w .txt{background:var(--white);border:3px solid var(--ink);border-radius:16px;padding:14px 16px}
.burst{display:flex;align-items:center;gap:14px}
.big-chk{width:46px;height:46px}
.big{display:block;font-size:1.75rem;font-weight:700;font-style:italic;line-height:1.15}
.p6w .note{border-left:6px solid var(--orange);background:var(--cream);border-radius:8px;padding:8px 12px;font-weight:700;margin:0}
.p6w .bd{background:var(--white);border-radius:6px;padding:6px}

/* steps, summary, links, next lesson */
.steps{margin:18px 0}
.steps ol{margin:4px 0 0;list-style:decimal}
.sum{background:var(--white);border:3px solid var(--ink);border-radius:18px;overflow:hidden;margin:18px 0 10px}
.sum h2{background:var(--ink);color:var(--white);padding:12px 20px;margin:0;font-size:1.3rem;display:flex;flex-direction:column}
.sum h2 .po{color:var(--cream);font-size:.95rem}.sum h2 .po>[aria-hidden]{display:none}
.sum ul{list-style:none;margin:0;padding:0}
.sum li{display:flex;gap:12px;align-items:center;padding:12px 18px;max-width:none}
.sum li+li{border-top:2px solid var(--band)}
.sum li strong{display:block}
.ic{width:40px;height:40px;flex:none}
.ic-r{fill:var(--mint-fill);stroke:var(--ink);stroke-width:2.5}.ic-l{fill:none;stroke:var(--ink);stroke-width:2}
.ic-o{fill:var(--white);stroke:var(--orange);stroke-width:4}.ic-d{fill:var(--orange)}
.cta{display:flex;flex-direction:column-reverse;gap:14px;margin:0 0 30px}
.more{display:flex;flex-wrap:wrap;gap:0 22px;list-style:none;margin:0;padding:0}
.more a{display:inline-block;min-height:44px;line-height:24px;padding:10px 0}
.cta-next{display:inline-flex;align-items:center;justify-content:center;text-align:center;background:var(--orange);color:var(--ink);border:3px solid var(--ink);border-radius:999px;font-weight:700;font-size:1.15rem;padding:10px 24px;min-height:48px;text-decoration:none;box-shadow:3px 3px 0 var(--ink)}

@media (max-width:760px){
  .l01 .top{grid-template-columns:1fr}
  .l01 .hook{justify-self:center;max-width:340px}
  .pn h2{width:auto}
}
@media (max-width:420px){
  .big{font-size:1.45rem}
  .burst{flex-direction:column;align-items:flex-start;gap:8px}
}
@media (min-width:761px){
  .comic{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-areas:"p1 p1 p2 p2 p3 p3" "p4 p4 p4 p5 p5 p5" "p6 p6 p6 p6 p6 p6"}
  #p1{grid-area:p1}#p2{grid-area:p2}#p3{grid-area:p3}#p4{grid-area:p4}#p5{grid-area:p5}#p6{grid-area:p6}
  #p4,#p5{display:flex;flex-direction:column}#p4>.body,#p5>.body{margin:auto 0}
  .p6w{flex-direction:row;align-items:center;justify-content:center;gap:40px}
  .p6w .txt{max-width:440px}
  .p6w .cb.b-full{width:360px}
  .ask{flex-direction:row;justify-content:center;gap:32px}
  .ask .q{max-width:320px;font-size:1.4rem}
  .cta{flex-direction:row;align-items:center;justify-content:space-between}
  .sum ul{display:flex}.sum li{flex:1}.sum li+li{border-top:0;border-left:2px solid var(--band)}
}
@media (prefers-reduced-motion:reduce){.stamp,.l01 .hook p{transform:none}}

/* ---- R5.1 (design selected by Owner D-R51-1..5 2026-11-23 08:53Z; implementation OA-1 09:05Z). Ported from the R5.1
   prototype r5.css @bb169b3. Locked tokens only, no alpha, no new colours. C4: no decorative "?" badges; the reveal
   button stays the only orange control in a covered state. ---- */
/* C4 covered panels: muted, dashed, quiet background (no badge) */
.pn.lock{background:var(--qbg);border-style:dashed;border-color:var(--ink2);box-shadow:none}
.pn .locked{padding:18px 0;color:var(--ink2);text-align:center}
.cover{min-height:110px}
.cover p{color:var(--ink2);max-width:36ch;margin:0}

/* C3 Think -> Check: count boxes show "?" only before the reason (state 0), "×1" after it and without JS */
.tally i .t0{display:none}
#p3.st0 .tally i .t0{display:inline;color:var(--ink2)}
#p3.st0 .tally i .t1{display:none}
.check{display:flex;flex-direction:column;align-items:center;gap:6px;margin:10px 0 0;text-align:center}
.check p{margin:0;color:var(--ink2);font-size:.95rem}
.check .btn{background:var(--orange);color:var(--ink);border:3px solid var(--ink);border-radius:12px;font:inherit;
  font-weight:700;font-size:1.05rem;padding:8px 20px;cursor:pointer;min-height:48px;min-width:44px;box-shadow:3px 3px 0 var(--ink)}
.check .btn:focus-visible{outline:3px solid var(--ink);outline-offset:3px}

/* C2 panel 6 before the reason: the question shows; its board and button come after panel 4 */
.ask.tease .bd,.ask.tease .btn{display:none}
.pn.drama.lock .ask.tease{padding:6px 0 0}
.pn.drama.lock .locked{padding:4px 0 10px}

/* C1-b progressive recap: a covered item is a dashed placeholder line that says how to open it */
.sum li.ph{display:block;border:2px dashed var(--ink2);border-radius:10px;background:var(--qbg);color:var(--ink2);
  padding:10px 14px;margin:0 0 10px}
.sum li.ph[hidden]{display:none}

/* C5 mobile: tighter gaps and compact covered panels so the first board comes sooner.
   R5.1: the R5 smaller hook bubble (max-width 250px) is withdrawn: on EN mobile its text hit the underline (QA-R51 M1). */
@media (max-width:760px){
  .l01 .top{gap:6px}
  .comic{gap:16px}
  .cover{min-height:0;padding:6px 0}
  .pn .locked{padding:8px 0}
}

/* R5.1 F5 (QA-R51-FINAL; Owner OA-1 item 5): mobile focus placement. Without this rule, after "Show the reason" the
   browser's own focus() scroll left #p4-h at the bottom edge of a 390x844 screen with none of the reason in view.
   scroll-margin-bottom makes the browser treat the heading plus the space below it as the area that must be in view
   when it focuses the heading. So it can START a focus scroll that would not happen without it, and it changes where
   that scroll stops; it acts at every width. The margin is capped just under the shortest panel 4 reason measured
   below its heading: 13.5rem (216px) up to 760px wide (shortest 218px, TH 360px), 19rem (304px) from 761px (shortest
   308px, TH 1280px). So the browser does not scroll when the reason is already fully in view, and scrolls only as far
   as needed when it is not (QA-R51-IMPL QI-01/QI-02). 50vh is the cap on very short screens so the heading is never
   pushed off the top. l01.js adds no scrolling of its own (A11Y-08); without JS the
   rule has no effect. */
#p4-h,#p6-h{scroll-margin-bottom:min(13.5rem,50vh)}
@media (min-width:761px){#p4-h,#p6-h{scroll-margin-bottom:min(19rem,50vh)}}

/* m5 fix (QA-RC2-WA m5; Owner 2026-11-24 10:01Z): every scene title pill (panels 1-11) is a two-line grid: number on the
   left over both lines, title on line 1, the other language on line 2. The ": " separator is not shown, so a wrap can no
   longer leave ":" at the start of a line or outside the pill. Screen readers still hear "title, other title" (.vh). */
.pn h2{display:inline-grid;grid-template-columns:38px minmax(0,auto);column-gap:10px;row-gap:0;align-items:center;border-radius:24px;padding:3px 18px 3px 3px;width:auto;max-width:100%}
.pn h2 .no{grid-row:1/3}
.pn h2 .pt,.pn h2 .po{grid-column:2;min-width:0;overflow-wrap:break-word}
.pn h2 .po{margin-left:0;font-size:.95rem}
.pn h2 .po>[aria-hidden]{display:none}

/* WEB-DD-1 R6 option B: scenes 7-11 (PR #46 storyboard v0.2; Owner 2026-11-24 10:01Z). The RC sections inside keep the
   site styles; Goal keeps its plain bullets (condition: no decorative tick boxes). Locked tokens only (MIAC-1/2). */
.pn.r6{margin:0 0 22px}
.r6 .lsec{margin:0 0 10px}
.r6 .lsec>h3{font-size:1rem;color:var(--ink2);margin:6px 0 6px;text-transform:none}
.r6-two{display:grid;grid-template-columns:1fr;gap:14px}
@media (min-width:760px){.r6-two{grid-template-columns:minmax(0,300px) 1fr;align-items:start}}
.r6-bub{position:relative;background:var(--white);border:3px solid var(--ink);border-radius:18px;padding:10px 14px;font-weight:700;margin:6px 0 24px}
.r6-bub::after{content:"";position:absolute;left:30px;bottom:-13px;width:20px;height:20px;background:var(--white);border-right:3px solid var(--ink);border-bottom:3px solid var(--ink);transform:skewY(30deg) rotate(45deg)}
.r6-cap{background:var(--qbg);border:2px solid var(--ink);border-radius:4px;padding:8px 12px;font-weight:700;margin:0 0 10px}
.r6 p.watch-out{display:inline-block;background:var(--cream);border:3px solid var(--orange);border-radius:12px;padding:8px 12px;transform:rotate(-1.5deg);font-weight:700}
.r6-row{display:flex;align-items:center;gap:10px;margin:4px 0 12px}.r6-row svg{width:calc(100% - 52px);max-width:360px;height:auto}
.r6-miss{flex:none;width:40px;height:40px;border:2.5px dashed var(--ink);border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:var(--ink2);background:var(--qbg)}
.r6 .why-list{padding-left:1.5em}
.r6 .check-list{list-style:none;padding:0;display:grid;gap:12px;counter-reset:q}.r6 .check-list>li{counter-increment:q;border:2.5px dashed var(--ink);border-radius:14px;padding:10px 12px;background:var(--qbg)}
.r6 .check-list>li>p::before{content:counter(q) ". "}
.r6 .check-list details{border:none;background:none;padding:0;margin:8px 0 0}
.r6 .check-list summary{display:inline-flex;padding:0 16px;border:2.5px solid var(--ink);border-radius:12px;background:var(--orange)}
.r6 .check-list details[open]>p{background:var(--mint-fill);border:2px solid var(--ink);border-radius:10px;padding:8px 12px;margin:8px 0 0}
.r6 .lsec-recap p{background:var(--mint-fill);border:2px solid var(--ink);border-radius:12px;padding:8px 12px;font-weight:700}
@media (prefers-reduced-motion:reduce){.r6 p.watch-out{transform:none}}
.l01>.lsec-practice{background:var(--white);border:3px solid var(--ink);border-radius:20px;padding:16px 12px;box-shadow:5px 6px 0 var(--orange);margin:0 0 22px}
@media (max-width:400px){.l01>.lsec-practice{border:none;box-shadow:none;padding:0;background:none}}
/* F5 kept with the m5 fix: the two-line panel 4 pill is taller, so up to 760px the reason below the focused heading gets
   1rem more room (13.5rem -> 14.5rem, still capped at 50vh); from 761px the 19rem rule above is unchanged. */
@media (max-width:760px){#p4-h,#p6-h{scroll-margin-bottom:min(14.5rem,50vh)}}
/* COMIC LESSONS (Owner 2026-11-25 14:23Z): Level 0 lessons 2-3 and Level 1 lessons 1-2 drawn as comics with the L0-1
   structure. New classes only (cx-*, board marks); L0-1 rules above are unchanged. Locked tokens only, no alpha. */
.cb .cb-n{fill:var(--ink2);font-size:14px;font-weight:500}
.cb .cb-c{fill:var(--ink);font-size:13px;font-weight:500}
.cb .cb-c.cb-cx{fill:var(--ink2)}
.cb .cb-c.cb-ce{font-weight:700}
.cb-xl{stroke:var(--ink);stroke-width:1.5}
.cb-em{fill:var(--orange)}
.cb-hatch{stroke:var(--ink);stroke-width:1.5}
.cb-qd{fill:none;stroke:var(--ink);stroke-width:2.5;stroke-dasharray:7 4}
.cb-tri{fill:var(--ink)}
.cx-f{margin:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.cx-f figcaption{background:var(--white);border:2px solid var(--ink);border-left:8px solid var(--orange);border-radius:10px;padding:8px 10px;font-size:1rem;line-height:1.5}
.cx-frames{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:18px;margin:4px 0 12px}
.cx-frames .b-full{width:min(100%,300px)}
.cx-lg{font-size:.85rem}
.cx-k{display:inline-block;width:16px;height:16px;flex:none;border:1.5px solid var(--ink);background:var(--white)}
.cx-k.k-p{box-shadow:inset 0 0 0 2px var(--ink);border:2px solid var(--orange)}
.cx-k.k-band{background:var(--band);width:28px}
.cx-k.k-q{background:var(--qbg);border:2px dashed var(--ink)}
.cx-k.k-no{background:repeating-linear-gradient(45deg,var(--white) 0 4px,var(--ink) 4px 5.5px)}
.cx-k.k-ok{border:2px solid var(--ink);background:linear-gradient(225deg,var(--ink) 0 4px,var(--white) 4px)}
.cx-k.k-val{background:var(--mint-fill)}
.cx-k.k-x{background:linear-gradient(135deg,var(--white) 45%,var(--ink) 45% 55%,var(--white) 55%)}
.cx-k.k-em{background:var(--orange);border-radius:3px}
.cb-qd.cb-qc{stroke-width:1.5;stroke-dasharray:4 3}
/* zoom callout of the framed cell's candidates (decorative; the board name carries the text) */
.cx-zoom{display:flex;align-items:center;gap:10px;margin-top:8px;font-size:.9rem;color:var(--ink2)}
.cx-zoom svg{width:96px;height:96px;flex:none}
.cx-zoom text{font-family:var(--sans);text-anchor:middle;dominant-baseline:central}
.cx-zoom .cz-c{fill:var(--ink);font-size:28px;font-weight:600}
.cx-zoom .cz-c.cb-cx{fill:var(--ink2)}
.cx-zoom .cz-c.cb-ce{font-weight:800}
.cx-zoom .cz-xl{stroke-width:3;fill:none}
.cx-zoom .cb-w{fill:var(--white)}
/* RC4-ST-01 (Owner 2026-11-26 05:22Z): the no-JS copy of the scene 6 question (<noscript>, no button) uses the .ask layout and sits on the rays like the answer card */
.ask-nj{display:flex;flex-direction:column;align-items:center;gap:12px;position:relative;z-index:1}
.ask-nj .q{background:var(--white);border:3px solid var(--ink);border-radius:16px;padding:14px 16px}
@media (min-width:761px){.ask-nj{flex-direction:row;justify-content:center;gap:32px}.ask-nj .q{max-width:320px;font-size:1.4rem}}
