/* Lecture (slide) mode (shared/slides.js). Nothing here applies in reading mode except the "강의 모드" button in the
   page header; everything else is under html.slides-on. Sizes on the stage are in container units (cqw, cqh) of the
   16:9 stage, so the slide looks the same at 1920 × 1080 and 1366 × 768: body text is 28/1920 of the stage width. */
.slide-toggle{margin-left:4px;padding:6px 12px;border:1px solid #b9cdd2;border-radius:3px;background:white;color:#075873;font-size:13px;line-height:1.4;white-space:nowrap}
.slide-toggle:hover{border-color:var(--blue);background:#edf6f8}
/* On a phone the header has no room for it (at 320 px it pushed "강의 노트" and the family links onto two lines);
   the mode is meant for a projector, and ?mode=slides still opens it there. */
@media(max-width:540px){.slide-toggle{display:none}}

html.slides-on,html.slides-on body{overflow:hidden;height:100%}
/* The reading page stays laid out under the deck, out of sight and inert to the pointer, so its own figures, which
   book.js keeps mounting while the browser is idle, are drawn at their width (at display: none they drew at width 0).
   slides.js marks them (data-slide-hidden) when the deck opens: elements added to <body> later, such as a figure kit's
   measuring ruler, are left alone. */
html.slides-on body>[data-slide-hidden]{visibility:hidden!important;pointer-events:none!important;position:fixed!important;left:-200vw;top:0;width:100vw;height:100vh;overflow:hidden}
@media print{html.slides-on body>[data-slide-hidden]{display:none!important}}
.slide-deck{position:fixed;inset:0;background:#e9eef0;outline:none}
.slide-stage{position:absolute;inset:0;margin:auto;width:min(100vw,calc(100vh*16/9));height:min(100vh,calc(100vw*9/16));background:var(--paper);overflow:hidden;container-type:size}
.slide-layer{position:absolute;inset:0;transition:transform .25s ease}
.slide{position:absolute;inset:0;visibility:hidden;container-type:size}
.slide:not([data-current]) *{visibility:hidden!important}
.slide[data-current]{visibility:visible}

/* The lab deck frame (agent-rules docs/guides/slide_standards.md §1; engine remi-deck-template/build_deck.py, whose
   720 × 405 pt page is this 1920 px stage at 1 pt = 2.667 px = 0.1389cqw): crumb 9 pt, title 16.5 pt navy over a
   2.2 pt navy rule, body from 8 pt under the rule, footer rule 2.2 pt with 16 pt logos, 36 pt side margins. */
.slide{--navy:#17305e;--deck-ink:#1a2233;--deck-grey:#5b6878;--deck-blue:#2653c9;--deck-box:#f5f7fb;--deck-line:#d7dce6;color:var(--deck-ink)}
.slide-frame{position:absolute;inset:0;display:flex;flex-direction:column;padding:0 5cqw}
.slide-crumb{margin:0;padding-top:1.94cqw;min-height:3.19cqw;font-size:1.25cqw;line-height:1.3;color:var(--deck-grey);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.slide-title{margin:.28cqw 0 0;font-size:2.29cqw;font-weight:700;line-height:1.35;color:var(--navy);word-break:keep-all}
.slide-title .katex{font-size:1em}
.slide-rule{border-bottom:.31cqw solid var(--navy);margin-top:.69cqw}
.slide-body{position:relative;flex:1;min-height:0;margin:1.11cqw 0 .56cqw}
.slide-foot{display:flex;justify-content:space-between;align-items:center;border-top:.31cqw solid var(--navy);margin-top:.56cqw;padding:.69cqw 0 1.39cqw}
.slide-foot img{height:2.22cqw;width:auto;display:block}
.slide-number{font-size:1.25cqw;color:var(--deck-grey);font-variant-numeric:tabular-nums}
/* The cover (build_deck.py .cover): programme 13 pt navy ("<book> · 8장"; the deck's eyebrow line would repeat the
   book, so it is left out and the programme line takes its place, 70 + 11 + 14 pt from the top), the chapter's title
   26 pt on a 5 pt navy bar, the affiliation centred 11 pt. */
.slide-cover{flex:1;display:flex;flex-direction:column;padding:0 2.78cqw;min-height:0}
.slide-cover p,.slide-cover h1{margin:0}
.cover-prog{font-size:1.81cqw;font-weight:700;color:var(--navy);margin-top:13.33cqw!important}
.cover-bar{border-left:.69cqw solid var(--navy);padding-left:1.94cqw;margin-top:.56cqw}
.cover-bar h1{font-size:3.61cqw;font-weight:800;color:#101c33;line-height:1.5;word-break:keep-all}
.cover-aff{margin-top:8.89cqw!important;text-align:center;font-size:1.53cqw;line-height:2;color:#333f52}
.slide-cover-frame .slide-foot{justify-content:space-between}
/* The contents (build_deck.py .toc): numbered items 12.5 pt with the number in the bullet blue; over 7 items two
   columns at 11 pt (.toc.wide). */
.slide-toc{list-style:none;margin:0;padding:.83cqw 4.17cqw;font-size:1.74cqw;line-height:1.45}
.slide-toc li{display:flex;gap:1.94cqw;margin-bottom:1.25cqw;break-inside:avoid}
.slide-toc .toc-n{color:var(--deck-blue);font-weight:800;min-width:2.22cqw}
.slide-toc-wide{column-count:2;column-gap:3.33cqw;font-size:1.53cqw}
.slide-toc-wide li{gap:1.39cqw;margin-bottom:.69cqw}

/* Text: the book's own sentences at 28 px (10.5 pt, the deck's body size), top-aligned; --fit only ever shrinks it. */
.slide-flow{position:absolute;inset:0;overflow:hidden}
.slide-text{font-size:calc(var(--fit,1)*1.4583cqw);line-height:1.7;word-break:keep-all;overflow-wrap:break-word;color:var(--deck-ink)}
.slide-text>:first-child{margin-top:0}.slide-text>:last-child{margin-bottom:0}
.slide-text>:first-child>.katex-display:first-child,.slide-text>.katex-display:first-child{margin-top:0}
.slide-text p,.slide-text ul,.slide-text ol{margin:0 0 .75em}
.slide-text h2,.slide-text h3,.slide-text h4{font-size:1.1em;line-height:1.4;margin:0 0 .6em;color:var(--navy)}
.slide-text .lead{font-size:1.05em;line-height:1.7;color:#333f52}
.slide-text .katex-display{margin:.5em 0 .8em;padding:.2em 0;overflow:visible}
.slide-text .katex{font-size:1.06em}
.slide-text ul,.slide-text ol{padding-left:1.2em}.slide-text li{margin:.3em 0}.slide-text li::marker{color:var(--deck-blue)}
/* A list that opens the slide starts at the top of the body like a paragraph. */
.slide-text>:is(ul,ol):first-child>li:first-child{margin-top:0}
.slide-text code{font-size:.85em}
/* A 풀이 (details) or the practice summary on a text slide keeps the book's look at slide size. */
.slide-text details,.slide-text .practice-summary{font-size:.8em}
.slide-text details summary{font-size:1em!important}
.slide-text .figure-credit{font-size:.5em;line-height:1.6;color:var(--deck-grey)}

/* Figures and boxes: laid out at the reading column's width (840 px) and scaled by slides.js to fit their box. */
.slide-fit{position:absolute;inset:0}
.slide-book{position:absolute;left:0;top:0;width:840px;max-width:none;margin:0;transform-origin:0 0}
.slide-book>article>:first-child{margin-top:0}.slide-book>article>:last-child{margin-bottom:0}
.slide-book .concept-figure{margin:0}
.slide-book>article>.figure-credit{margin:8px 0 0}
/* A figure on a slide is shown bare (slides.js, SLIDE-AUTHORING.md): what the reading page needs and a lecture does not
   is hidden here, in lecture scope only; no figure module is changed. Hidden: the figure's reading-page heading (h3 and
   the kit's title classes), its lede (.fk-intro, every [data-part=intro]), its narration and calculation lines
   ([data-part=reading]: "chirp m = 7는 … 크게 그렸다", "f_b = 2KR/c = …"), and slow-time-phase's sign sentence
   (.rsp-sign). Kept: controls, ▶, plots, panel labels (.fk-caption), legends (.rvf-key), formula readouts
   ([data-part=formula]) and the source line of measured data (rd-map's .rrd-src). */
.slide-lean>article>*>:is(h3,.fk-intro,.dx-intro,.ps-intro,.ps-heading,.figure-heading,.figure-subtitle,.g-title,.sy-title),
.slide-lean [data-part="intro"],.slide-lean [data-part="reading"],.slide-lean .rsp-sign{display:none!important}
/* A figure's worked-number ledger is off on a slide unless the script asks for it ("@figure … formula"): the slide shows the point, the lecturer says the arithmetic (instructor 2026-10-09); data-slide-hide always hides explanation, data-slide-formula follows the formula flag. */
.slide-lean:not([data-keep~="formula"]) [data-part="formula"]{display:none!important}
.slide-lean [data-slide-hide]{display:none!important}
.slide-lean:not([data-keep~="formula"]) [data-slide-formula]{display:none!important}
/* A panel caption on a slide is its panel label: the rest of its words, and a source line's sentence after the
   citation, are wrapped by slides.js (trimCaption, trimSource) in this span. */
.slide-lean .slide-caption-rest{display:none!important}
/* "not to scale" (@figure … nts): grey, 14 px in the figure's own 840 px layout (16 to 21 px at 1920 at the scales a
   slide gives), pushed to the right end of the controls row; on a row of its own when the figure has no controls. */
.slide-nts{margin-left:auto;align-self:center;font-size:14px;line-height:1.2;color:#6b7684;font-style:italic;white-space:nowrap;letter-spacing:.02em}
.slide-nts-row{display:flex;justify-content:flex-end;margin:0 0 4px}
/* Without its heading the figure needs no reading-page rules above and below it: the slide's frame has them. */
.slide-lean>article>.concept-figure{border:0;padding-top:0;padding-bottom:0;margin:0}
.slide-book>article>.practice-check{margin:0;border-top:0;padding-top:0}
/* A figure slide with text: the deck's side layout (text left from the top, the figure centred in its column; slides.js
   sets the columns), or the text above and the figure under it at full width (.slide-wide). `only`: the figure alone. */
.slide-figure-body.slide-beside{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:1.94cqw}
.slide-beside>.slide-flow,.slide-beside>.slide-fit{position:relative;inset:auto;min-height:0}
.slide-beside.slide-wide{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:1.11cqw}
.slide-beside.slide-wide>.slide-flow{overflow:visible}
.slide-figure-body:not(.slide-beside)>.slide-flow{display:none}
/* A check slide with text: the text above the check. */
.slide-body:has(>.slide-flow+.slide-fit):not(.slide-figure-body){display:grid;grid-template-rows:auto minmax(0,1fr);gap:1.11cqw}
.slide-body:has(>.slide-flow+.slide-fit):not(.slide-figure-body)>*{position:relative;inset:auto;min-height:0}
/* Tables at slide size: the deck's table (header row navy, thin rules), cells on one line where they fit. */
.slide-text table{border-collapse:collapse;margin:0 0 .8em;font-size:1em;line-height:1.5}
.slide-text th,.slide-text td{padding:.28em .9em;border-bottom:1px solid var(--deck-line);text-align:left;vertical-align:top}
.slide-text thead th{color:var(--navy);border-bottom:.12cqw solid var(--navy);font-weight:700}
.slide-text th:empty{padding:0}
.slide-notes .figure-credit{margin:0}

/* v2 tools (shared/slide-ink.js). Off, none of them takes pointer events. */
.slide-ink{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none}
.slide-pen .slide-ink{pointer-events:auto;cursor:crosshair;touch-action:none}
.slide-laser{position:absolute;left:0;top:0;width:1.1cqw;height:1.1cqw;margin:-.55cqw 0 0 -.55cqw;border-radius:50%;background:rgba(226,38,28,.9);box-shadow:0 0 1.2cqw .35cqw rgba(255,46,30,.45);pointer-events:none;z-index:4;display:none}
.slide-laser-on .slide-laser{display:block}.slide-laser-on,.slide-laser-on *{cursor:none!important}
.slide-zoom-armed,.slide-zoom-armed *{cursor:zoom-in!important}

/* v2 presenter window: the live slide on the left, the next slide, the notes and the time on the right. */
.slide-deck.slide-presenter{background:#1e292e}
.slide-presenter .slide-stage{margin:0;left:2vw;top:4vh;right:auto;bottom:auto;width:60vw;height:calc(60vw*9/16)}
.presenter-side{position:absolute;left:64vw;right:2vw;top:4vh;bottom:3vh;display:flex;flex-direction:column;gap:8px;color:#e4ecee;font-size:15px;min-height:0}
.presenter-label{margin:6px 0 0;font-size:12px;letter-spacing:.06em;color:#9fb3bb}
.presenter-next{position:relative;overflow:hidden;background:var(--paper);color:var(--ink);flex:none;min-height:60px}
.presenter-frame{position:absolute;left:0;top:0;transform-origin:0 0}
.presenter-frame>.slide{visibility:visible}
.presenter-step{margin:0;padding:18px;font-size:18px;color:#075873}
.presenter-notes{flex:1;min-height:0;overflow:auto;background:var(--paper);color:var(--ink);padding:12px 16px;font-size:17px;line-height:1.7}
.presenter-notes .figure-credit{font-size:12px;color:var(--muted);margin-top:10px}.presenter-none{color:var(--muted)}
.presenter-keys{margin:0;font-size:12px;line-height:1.5;color:#9fb3bb}
.presenter-time{margin:0;display:flex;justify-content:space-between;font-size:26px;font-variant-numeric:tabular-nums}

/* v2 step handout (?mode=slides&print=steps): still copies of every slide and figure step, one per page. */
html.slides-handout,html.slides-handout body{overflow:auto;height:auto}
/* The live deck stays laid out behind the pages (a figure taken out of layout redraws at width 0), unseen and inert. */
html.slides-handout .slide-deck{opacity:0;pointer-events:none;z-index:-1}
.slide-handout{display:flex;flex-direction:column;align-items:center;gap:24px;padding:24px 0;background:#e9eef0}
.slide-handout>.slide{position:relative;inset:auto;width:1280px;height:720px;flex:none;overflow:hidden;visibility:visible;background:var(--paper)}
.slide-handout>.slide *{visibility:visible!important}

/* The stage's own controls sit in the footer row, between the slide number and the REMI LAB logo: the figure's step
   and the way back; a thin progress bar runs along the bottom edge. */
.slide-bar{position:absolute;left:55cqw;right:14cqw;bottom:1.25cqw;height:2.5cqw;display:flex;align-items:center;justify-content:flex-end;gap:1.5cqw;font-size:max(11px,.9cqw);color:var(--deck-grey,#5b6878);z-index:2}
.slide-step{font-variant-numeric:tabular-nums;color:#17305e}.slide-step:empty{display:none}
.slide-exit{padding:.3em .8em;border:1px solid #d7dce6;border-radius:3px;background:white;color:#5b6878;font-size:inherit;opacity:.75}
.slide-exit:hover,.slide-exit:focus-visible{opacity:1;color:#17305e;border-color:#17305e}
.slide-progress{position:absolute;left:0;right:0;bottom:0;height:max(3px,.3cqh);background:#eef1f7;z-index:2}
.slide-progress span{display:block;height:100%;width:0;background:#17305e;transition:width .15s}

/* Narrow screens: the stage is the whole screen and each slide is one scrolling column at its natural size: crumb,
   title, body, footer one under another. */
.slide-deck.slide-narrow .slide-stage{width:100vw;height:100vh;height:100dvh}
.slide-deck.slide-narrow .slide{overflow-y:auto}
.slide-deck.slide-narrow .slide-frame{position:static;display:block;padding:16px 18px 64px}
.slide-deck.slide-narrow .slide-crumb{font-size:12px;padding-top:0;min-height:0;white-space:normal}
.slide-deck.slide-narrow .slide-title{font-size:21px;margin-top:4px}
.slide-deck.slide-narrow .slide-rule{border-bottom-width:2px;margin-top:6px}
.slide-deck.slide-narrow .slide-body{margin:14px 0}
.slide-deck.slide-narrow .slide-foot{border-top-width:2px;padding:8px 0 0}
.slide-deck.slide-narrow .slide-foot img{height:24px}
.slide-deck.slide-narrow .slide-number{font-size:12px}
.slide-deck.slide-narrow .slide-cover{padding:0}
.slide-deck.slide-narrow .cover-prog{font-size:17px;margin-top:32px!important}
.slide-deck.slide-narrow .cover-bar{border-left-width:4px;padding-left:12px}
.slide-deck.slide-narrow .cover-bar h1{font-size:26px}
.slide-deck.slide-narrow .cover-aff{font-size:15px;margin:40px 0 24px!important}
.slide-deck.slide-narrow .slide-body,.slide-deck.slide-narrow .slide-flow,.slide-deck.slide-narrow .slide-fit,.slide-deck.slide-narrow .slide-body{position:static;display:block;overflow:visible;max-height:none}
.slide-deck.slide-narrow .slide-text{font-size:19px}
.slide-deck.slide-narrow .slide-toc{column-count:1;padding:0;font-size:16px}.slide-deck.slide-narrow .slide-toc li{gap:10px;margin-bottom:8px}
.slide-deck.slide-narrow .slide-book{position:static;width:auto;transform:none}
.slide-deck.slide-narrow .slide-beside>.slide-fit,.slide-deck.slide-narrow .slide-flow+.slide-fit{margin-top:20px}
.slide-deck.slide-narrow .slide-bar{left:18px;right:18px;bottom:6px;height:auto;background:var(--paper);padding:8px 0}
@media(max-aspect-ratio:1/1){.slide-stage{width:100vw;height:100vh;height:100dvh}}

/* Print in slide mode: one slide per 16:9 landscape page (13.333 × 7.5 in, 1280 × 720 CSS px), each with its number.
   Before printing, slides.js lays every slide out at that size (.slide-printing) so the figures are fitted to it. */
@page slide{size:13.333in 7.5in;margin:0}
.slide-deck.slide-printing{position:static;background:none}
.slide-deck.slide-printing .slide-stage{position:static;width:auto;height:auto;container-type:normal;overflow:visible}
.slide-deck.slide-printing .slide-layer{position:static;transform:none}
.slide-deck.slide-printing .slide{position:relative;inset:auto;width:1280px;height:720px;overflow:hidden;visibility:visible}
.slide-deck.slide-printing .slide *{visibility:visible!important}
.slide-deck.slide-printing .slide-bar,.slide-deck.slide-printing .slide-progress{display:none}
@media print{
  html.slides-handout .slide-deck{display:none!important}
  .slide-handout{display:block;padding:0;background:none}
  .slide-handout>.slide{page:slide;break-after:page}
  .slide-ink,.slide-laser{display:none!important}
  html.slides-on,html.slides-on body{overflow:visible;height:auto}
  .slide-deck{position:static;background:none}
  .slide-deck .slide-stage{position:static;width:auto;height:auto;container-type:normal;overflow:visible;margin:0}
  .slide-deck .slide-layer{position:static;transform:none!important}
  .slide-deck .slide{position:relative;inset:auto;width:1280px;height:720px;overflow:hidden;visibility:visible;page:slide;break-after:page}
  .slide-deck .slide *{visibility:visible!important}
  .slide-deck .slide-bar,.slide-deck .slide-progress{display:none}
}
/* Reduced motion: the zoom and the progress bar change at once. */
@media(prefers-reduced-motion:reduce){.slide-layer,.slide-progress span{transition:none}}
/* A static figure (@image) on a slide: no reading-page rules above and below it, centred, as large as its box. */
.slide-book .slide-image{border:0!important;padding:0!important;margin:0!important}.slide-book .slide-image>:is(img,svg,div){margin:0 auto}
/* A box whose every child is hidden on a slide (data-slide-hide) is hidden too, so no empty strip is left. */
.slide-lean :is(div,p,section):has(> [data-slide-hide]):not(:has(> :not([data-slide-hide]))){display:none!important}
