/* =============================================================
   Bluestream Academy kit — the illustrated article format
   -------------------------------------------------------------
   An article in this format loads, in this order:
     <link rel="stylesheet" href="/shared.css">
     <link rel="stylesheet" href="/academy-kit.css">
     <script defer src="/toolbox-shot.js"></script>   (figures open full size)
     <script defer src="/academy-kit.js"></script>    (scrollspy, progress)
   and needs no <style> block of its own unless it draws a one-off figure.

   The rules for USING these components are in docs/academy-article-guide.md.
   Reference implementation: public/academy/toolbox.html

   THE LOOK, in five rules. Every component below follows them, and a new
   component has to as well.

     1. The plant is ink. What the article adds to it is blue. Equipment,
        frames and table rules are drawn in --ink; annotations, the path a
        reader should follow and links are --accent. Nothing else is coloured.
     2. Mono is for identifiers: a tag number, a failure-mode code, a clause.
        Something an engineer could type into a CMMS. Labels and captions are
        sentence-case Figtree. No letter-spaced capitals.
     3. A number marks a real sequence, or a balloon that has a note in a key.
        Never decoration.
     4. Flat and ruled, like a datasheet: one ink rule above a block, hairlines
        inside it. No drop shadows, no gradient fills, no rounded cards. The
        only thing with a radius is something you press.
     5. One bold thing per page: the drawing sheet at the top. Everything
        under it stays quiet.

   Contents
     1. Article shell        wrap, breadcrumb, header, body type, TOC
     2. Figure chrome        .fig, title line, kind, caption
     3. Drawing sheet        .sheet (the hero), notes, title block
     4. Screenshot plate     .shot, numbered pins, pin key
     5. Step sections        .step, .io hand-over row
     6. Diagram parts        .apart, .strip, .run, .ladder, .dia + svg.kd
     7. Tables               .ctable, .how, .dot
     8. Notes, fit, FAQ      .note, .fit, .faq
     9. Endmatter            .linklist
    10. Reading progress
    11. Responsive, motion, print
   ============================================================= */


/* =============================================================
   1. ARTICLE SHELL
   Narrow text, wide figures. Left aligned throughout.
   ============================================================= */
.article-wrap{--measure:660px;max-width:1160px;margin:0 auto;padding:calc(var(--nav-h) + 28px) 40px 88px;display:grid;grid-template-columns:minmax(0,1fr) 216px;gap:0 64px}
.breadcrumb{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap;font-size:13.5px;color:var(--ink-mid);margin-bottom:30px}
.breadcrumb a{color:var(--ink-mid);text-decoration:none}
.breadcrumb a:hover{color:var(--accent);text-decoration:underline}
.breadcrumb-sep{color:var(--border-s)}
.breadcrumb-current{color:var(--ink)}

.article-head{grid-column:1/-1;max-width:800px}
h1.article-title{font:700 clamp(34px,5.2vw,56px)/1.03 var(--display);letter-spacing:-.032em;color:var(--ink);margin:0 0 20px;text-wrap:balance}
.article-lede{font-size:20.5px;line-height:1.5;color:var(--ink-mid);margin:0;max-width:680px;text-wrap:pretty}
.article-lede strong{color:var(--ink);font-weight:600}
.head-cta{display:flex;align-items:center;gap:8px 22px;flex-wrap:wrap;margin:26px 0 0}
.btn-pri{display:inline-block;padding:13px 22px;border-radius:6px;background:var(--blue-vivid);color:#fff;font:600 15px/1 var(--sans);text-decoration:none;transition:background var(--t)}
.btn-pri:hover{background:var(--blue-mid)}
.btn-pri:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.head-cta a:not(.btn-pri){color:var(--accent);font-size:15.5px;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.head-cta span{font-size:15px;color:var(--ink-mid)}
article .head-cta{margin-top:30px}
.article-meta{margin:22px 0 0;font-size:13.5px;line-height:1.5;color:var(--ink-mid);max-width:none}

article{min-width:0;margin-top:56px;color:var(--ink-mid)}
article h2{font:700 clamp(25px,3vw,31px)/1.14 var(--display);letter-spacing:-.025em;color:var(--ink);margin:76px 0 16px;max-width:var(--measure);scroll-margin-top:calc(var(--nav-h) + 20px);text-wrap:balance}
article h2:first-child{margin-top:0}
article h3{font:600 20px/1.3 var(--display);letter-spacing:-.01em;color:var(--ink);margin:38px 0 8px;max-width:var(--measure);scroll-margin-top:calc(var(--nav-h) + 20px)}
article p{font-size:17px;line-height:1.66;color:var(--ink-mid);margin:0 0 16px;max-width:var(--measure);text-wrap:pretty}
article p strong{color:var(--ink);font-weight:600}
article a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
article a:hover{text-decoration-thickness:2px}
article code,.sheet code{font:500 .86em var(--mono);color:var(--ink);background:var(--bg2);border-radius:3px;padding:1px 5px}
:where(.article-wrap) :where(a,button,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* "In short": the page in three sentences, set one size up */
.tldr{margin:0 0 8px;max-width:var(--measure)}
.tldr p{font-size:19px;line-height:1.58;color:var(--ink)}
.tldr p:last-child{margin-bottom:0}

.toc{position:sticky;top:calc(var(--nav-h) + 28px);align-self:start;margin-top:56px;font-size:14px;max-height:calc(100vh - var(--nav-h) - 56px);overflow:auto}
.toc-label{font-weight:600;color:var(--ink);margin-bottom:10px}
.toc ul{list-style:none;margin:0;padding:0;border-left:1px solid var(--border-s)}
.toc li{margin:0}
.toc a{display:block;padding:5px 0 5px 14px;margin-left:-1px;border-left:1px solid transparent;color:var(--ink-mid);text-decoration:none;line-height:1.35}
.toc a:hover{color:var(--ink)}
.toc a.active{color:var(--ink);font-weight:600;border-left-color:var(--accent)}
.toc .sub a{padding-left:28px;font-size:13.5px}
.toc a.toc-cta{display:block;margin:20px 0 0;padding:11px 14px;border:0;border-radius:6px;background:var(--blue-vivid);color:#fff;font-weight:600;text-align:center}
.toc a.toc-cta:hover{background:var(--blue-mid);color:#fff}


/* =============================================================
   2. FIGURE CHROME
   One line above the figure, ruled in ink: its number, a title that
   states the point, and what kind of picture it is. A caption below
   that says what to notice.
   ============================================================= */
.fig{margin:36px 0 42px}
.fig-top{display:flex;justify-content:space-between;align-items:baseline;gap:2px 24px;flex-wrap:wrap;margin:0 0 14px;padding:0 0 9px;border-bottom:1px solid var(--ink)}
.fig-title{font:600 16.5px/1.35 var(--display);letter-spacing:-.005em;color:var(--ink);margin:0;max-width:none;text-wrap:balance}
.fig-no{margin-right:.55em;font-weight:500;color:var(--ink-mid);font-variant-numeric:tabular-nums}
.fig-tag{font-size:13.5px;color:var(--ink-mid);white-space:nowrap}
.fig figcaption{font-size:14.5px;line-height:1.55;color:var(--ink-mid);margin:13px 0 0;max-width:var(--measure);text-wrap:pretty}
.fig figcaption b{color:var(--ink);font-weight:600}
.fig-sub{font-size:14.5px;line-height:1.5;color:var(--ink-mid);margin:0 0 10px;max-width:none}
.fig-sub b{color:var(--ink);font-weight:600}
.apart+.fig-sub,.strip+.fig-sub,.ladder+.fig-sub,.run+.fig-sub{margin-top:26px}


/* =============================================================
   3. DRAWING SHEET  (the hero)
   The subject itself, drawn the way its own trade draws it: an
   arrangement sketch with tag numbers, a notes column and a title
   block. Numbered balloons on the drawing match the numbered notes
   beside it, and each note links to its section.

   <figure class="fig sheet" data-zoom aria-labelledby="f1-t">
     <div class="sheet-draw"><svg class="kd" …>…</svg></div>
     <div class="sheet-notes">
       <p class="fig-title" id="f1-t"><span class="fig-no">Fig. 1</span>…</p>
       <ol class="notes">…</ol>
       <figcaption><dl class="titleblock">…</dl></figcaption>
     </div>
   </figure>
   ============================================================= */
.sheet{grid-column:1/-1;margin:40px 5px 5px;display:grid;grid-template-columns:minmax(0,1.62fr) minmax(0,1fr);grid-template-rows:auto 1fr;background:var(--surface);border:1.5px solid var(--ink);outline:1px solid var(--ink);outline-offset:4px}
.sheet-draw{grid-column:1;grid-row:1;min-width:0;padding:18px 12px 6px 16px;overflow-x:auto}
.sheet-draw svg{display:block;width:100%;height:auto}
.sheet-notes{grid-column:2;grid-row:1/3;display:flex;flex-direction:column;min-width:0;border-left:1px solid var(--ink)}
.sheet-notes .fig-title{padding:18px 22px 12px;font-size:17.5px;border-bottom:1px solid var(--ink)}
.notes{list-style:none;counter-reset:note;margin:0;padding:0}
.notes li{counter-increment:note;border-bottom:1px solid var(--border)}
.notes a{position:relative;display:block;padding:10px 22px 11px 56px;color:var(--ink-mid);text-decoration:none;font-size:14.5px;line-height:1.45}
.notes a::before{content:counter(note);position:absolute;left:22px;top:10px;width:23px;height:23px;border-radius:50%;background:var(--accent);color:#fff;font:500 12.5px/23px var(--mono);text-align:center}
.notes b{color:var(--ink);font-weight:600}
.notes a:hover b,.notes a:focus-visible b{text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:3px}
.notes .eg{display:block;margin-top:2px;font-size:13.5px}
.notes-rest{grid-column:1;grid-row:2;align-self:end;padding:13px 22px 15px;border-top:1px solid var(--ink);font-size:14.5px;line-height:1.5;color:var(--ink-mid)}
.notes-rest p{margin:0 0 6px;font-size:inherit;line-height:inherit;max-width:none}
.notes-rest p:last-child{margin-bottom:0}
.notes-rest b{color:var(--ink);font-weight:600}
.notes-rest a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.sheet figcaption{margin:auto 0 0;max-width:none}
.titleblock{display:grid;grid-template-columns:auto minmax(0,1fr);margin:0;border-top:1.5px solid var(--ink);font-size:13px;line-height:1.4}
.titleblock dt,.titleblock dd{margin:0;padding:7px 12px;border-top:1px solid var(--border-s)}
.titleblock dt{padding-left:22px;color:var(--ink-mid);border-right:1px solid var(--border-s);white-space:nowrap}
.titleblock dd{padding-right:22px;color:var(--ink)}
.titleblock dt:first-of-type,.titleblock dd:first-of-type{border-top:0}
/* toolbox-shot.js adds the "view it full size" hint after the caption; here it is the title block's last row */
figure.sheet[data-zoom] figcaption::after{margin:0;padding:7px 22px 8px;border-top:1px solid var(--border-s);font-size:12.5px;opacity:1;color:var(--ink-mid)}
/* pointing at a note rings its balloon on the drawing */
.sheet svg .b circle{transition:r .15s ease}
.sheet:has(.notes li:nth-child(1) a:is(:hover,:focus-visible)) .b1 .b circle,
.sheet:has(.notes li:nth-child(2) a:is(:hover,:focus-visible)) .b2 .b circle,
.sheet:has(.notes li:nth-child(3) a:is(:hover,:focus-visible)) .b3 .b circle,
.sheet:has(.notes li:nth-child(4) a:is(:hover,:focus-visible)) .b4 .b circle,
.sheet:has(.notes li:nth-child(5) a:is(:hover,:focus-visible)) .b5 .b circle{r:16px}


/* =============================================================
   4. SCREENSHOT PLATE
   <figure class="fig shot" data-zoom>
     <div class="fig-top">…</div>
     <div class="shot-frame">
       <img src="/images/toolbox/x.webp" width="1500" height="1150" alt="…">
       <span class="pin" style="--x:30%;--y:41%">1</span>
     </div>
     <ol class="pin-key"><li>…</li></ol>
     <figcaption>…</figcaption>
   </figure>
   toolbox-shot.js wraps the <img> in a button that opens it at 1500px.
   Pins are placed in percent of the frame, so they hold at any width,
   and ignore the pointer so a tap still reaches that button. A pin is
   the same balloon the drawing sheet uses.
   ============================================================= */
.shot-frame{position:relative;border:1px solid var(--border-s);background:var(--surface);overflow:hidden}
.shot-frame img{display:block;width:100%;height:auto}
.shot-frame .tool-shot-btn{border-radius:0}
/* A tall capture shows its top part only; the rest is one tap away. */
.shot-frame.crop img{aspect-ratio:var(--crop,1500/1150);object-fit:cover;object-position:top}
.pin{position:absolute;left:var(--x);top:var(--y);z-index:2;transform:translate(-50%,-50%);width:25px;height:25px;border-radius:50%;background:var(--blue-vivid);color:#fff;font:500 12.5px/25px var(--mono);text-align:center;box-shadow:0 0 0 2.5px #fff;pointer-events:none}
.pin-key{list-style:none;counter-reset:pin;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 26px;margin:16px 0 0;padding:0}
.pin-key li{counter-increment:pin;position:relative;padding-left:34px;font-size:14.5px;line-height:1.5;color:var(--ink-mid)}
.pin-key li::before{content:counter(pin);position:absolute;left:0;top:0;width:23px;height:23px;border-radius:50%;background:var(--blue-vivid);color:#fff;font:500 12px/23px var(--mono);text-align:center}
.pin-key b{display:block;color:var(--ink);font-weight:600}


/* =============================================================
   5. STEP SECTIONS
   One per tool. A numeral only where the tools run in order.
   <section class="step" id="step-1">
     <header class="step-head">
       <span class="step-no" aria-hidden="true">1</span>
       <div><h3 class="step-title">…</h3><p class="step-facts">…</p></div>
     </header>
   Tools with no order take class="step tool" and no numeral.
   ============================================================= */
.step{margin:68px 0 0;scroll-margin-top:calc(var(--nav-h) + 12px)}
.step-head{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:0 22px;margin:0 0 16px;padding-top:18px;border-top:1.5px solid var(--ink)}
.step.tool .step-head{grid-template-columns:minmax(0,1fr)}
.step-no{font:700 58px/.8 var(--display);letter-spacing:-.04em;color:var(--ink);font-variant-numeric:lining-nums;padding-top:3px}
.step-title{font:700 clamp(22px,2.6vw,27px)/1.15 var(--display);letter-spacing:-.022em;color:var(--ink);margin:0;max-width:none;text-wrap:balance}
.step-facts{font-size:14.5px;line-height:1.5;color:var(--ink-mid);margin:7px 0 0;max-width:none}
.step-more{font-size:15px;margin:16px 0 0}

/* hand-over row: what goes in, what comes out, who gets it next */
.io{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:26px 0 0;border-top:1px solid var(--ink);border-bottom:1px solid var(--ink)}
.io>div{min-width:0;padding:12px 20px 14px 0}
.io>div+div{padding-left:20px;border-left:1px solid var(--border-s)}
.io dt{font:600 14px/1.4 var(--sans);color:var(--ink);margin-bottom:3px}
.io>.next dt{color:var(--accent)}
.io dd{margin:0;font-size:14.5px;line-height:1.5;color:var(--ink-mid)}
.io dd b{color:var(--ink);font-weight:600}


/* =============================================================
   6. DIAGRAM PARTS
   HTML wherever the picture is cells and a direction, because HTML
   reflows on a phone and an SVG only shrinks.
   ============================================================= */

/* .apart — things that stand alone: separate boxes, a gap between each */
.apart{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(var(--n,5),minmax(0,1fr));gap:16px}
.apart>li{min-width:0;padding:11px 13px 12px;border:1px solid var(--border-s);background:var(--surface)}
/* .strip — things that are joined: one bar, cells sharing their walls */
.strip{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(var(--n,5),minmax(0,1fr));border:1.5px solid var(--accent);background:var(--surface)}
.strip>li{min-width:0;padding:11px 13px 12px}
.strip>li+li{border-left:1.5px solid var(--accent)}
.strip.plain{border:1px solid var(--ink)}
.strip.plain>li+li{border-left:1px solid var(--ink)}
.apart .h,.strip .h{display:block;font:600 15px/1.3 var(--sans);color:var(--ink)}
.apart .d,.strip .d{display:block;margin-top:3px;font-size:13.5px;line-height:1.42;color:var(--ink-mid);overflow-wrap:anywhere}
.strip .who{display:block;margin-bottom:3px;font-size:13px;color:var(--accent)}
.apart code,.strip code{white-space:nowrap}
/* .run — the direction to read a strip in: a rule with one arrowhead */
.run{display:flex;align-items:center;gap:10px;margin:9px 0 0;font-size:13.5px;line-height:1.4;color:var(--accent);max-width:none}
.run i{flex:1;min-width:24px;border-top:1.5px solid currentColor}
.run::before,.run::after{flex:none;width:0;height:0;border:5px solid transparent}
.run.back::before{content:'';border-right:8px solid currentColor;border-left:0;margin-right:-10px}
.run.on::after{content:'';border-left:8px solid currentColor;border-right:0;margin-left:-10px}

/* .ladder — a fixed order of questions; the first yes wins */
.ladder{list-style:none;margin:0;padding:0;counter-reset:rung}
.ladder li{counter-increment:rung;display:grid;grid-template-columns:22px 58px minmax(0,1fr);align-items:baseline;gap:0 14px;padding:11px 0 12px;border-bottom:1px solid var(--border);font-size:15.5px;line-height:1.5;color:var(--ink-mid)}
.ladder li::before{content:counter(rung);font:500 14px var(--mono);color:var(--ink-mid)}
.ladder b{color:var(--ink);font-weight:600}
.ladder code{justify-self:start}

/* .dia — the plate an inline SVG drawing sits on.
   svg.kd — the drawing itself. Never hard-code a colour in the SVG: use these
   classes, so the drawing follows light and dark. The rules hang off the
   <svg class="kd"> element, not off a container, because toolbox-shot.js clones
   the SVG into the full-size overlay, where it has no ancestor of ours. */
.dia svg{display:block;width:100%;height:auto;overflow:visible}
svg.kd text{font-family:var(--sans)}
svg.kd .t{font:600 13.5px var(--sans);fill:var(--ink)}
svg.kd .s{font:400 13px var(--sans);fill:var(--ink-mid)}
svg.kd .sa{font:500 13px var(--sans);fill:var(--accent)}
svg.kd .tg{font:500 13px var(--mono);fill:var(--ink)}
svg.kd .tgs{font:500 10.5px var(--mono);fill:var(--ink)}
svg.kd .box{fill:var(--surface);stroke:var(--ink);stroke-width:1}
svg.kd .box-a{fill:var(--surface);stroke:var(--accent);stroke-width:1.5}
svg.kd .eq{fill:none;stroke:var(--ink);stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
svg.kd .eqf{fill:var(--surface);stroke:var(--ink);stroke-width:1.5;stroke-linejoin:round}
svg.kd .blk{fill:var(--ink)}
svg.kd .pipe{fill:none;stroke:var(--ink);stroke-width:2.4;stroke-linejoin:round}
svg.kd .thin{fill:none;stroke:var(--ink);stroke-width:1}
svg.kd .wave{fill:none;stroke:var(--ink-mid);stroke-width:1}
svg.kd .sea0{stop-color:var(--accent);stop-opacity:.15}
svg.kd .sea1{stop-color:var(--accent);stop-opacity:0}
svg.kd .ln{fill:none;stroke:var(--ink);stroke-width:1}
svg.kd .ln-a{fill:none;stroke:var(--accent);stroke-width:1.5}
svg.kd .ah{fill:var(--ink)}
svg.kd .ah-a{fill:var(--accent)}
svg.kd .b circle{fill:var(--accent);stroke:var(--surface);stroke-width:2.5;r:12.5px}
svg.kd .b text{font:500 13px var(--mono);fill:#fff;text-anchor:middle}
svg.kd .b.sm circle{r:9.5px}


/* =============================================================
   7. TABLES
   A comparison is a table. Ink rule under the head, hairlines under
   the rows, no cell fills.
   ============================================================= */
/* position:relative matters: a visually-hidden label inside a wide table is absolutely
   positioned, and without a positioned ancestor here it escapes the scroll box and makes
   the whole page as wide as the table on a phone. */
.ctable-wrap{position:relative;overflow-x:auto}
.ctable{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5}
.ctable th,.ctable td{text-align:left;vertical-align:top;padding:11px 22px 12px 0;border-bottom:1px solid var(--border)}
.ctable th:last-child,.ctable td:last-child{padding-right:0}
.ctable thead th{font:600 14px/1.4 var(--sans);color:var(--ink);border-bottom:1px solid var(--ink);white-space:nowrap}
.ctable tbody th{font-weight:600;color:var(--ink)}
.ctable td{color:var(--ink-mid)}
.ctable td b{color:var(--ink);font-weight:600}
.ctable .grp th{padding-top:20px;font-size:14px;color:var(--ink-mid);font-weight:600}
.ctable .big{font:700 27px/1.15 var(--display);letter-spacing:-.02em;color:var(--ink);white-space:nowrap}
.ctable .nw{white-space:nowrap}
.ctable .c{text-align:center}
.ctable-wrap+p{margin-top:18px}
/* .how — how an output is produced: by rule, by you, by a model */
.how{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;color:var(--ink)}
.how::before{content:'';flex:none;box-sizing:border-box;width:10px;height:10px;border:1.5px solid var(--ink)}
.how.rule::before{background:var(--ink)}
.how.you::before{border-radius:50%}
.how.ai::before{border-style:dashed}
.keyline{display:flex;flex-wrap:wrap;gap:6px 26px;margin:12px 0 0;font-size:14px;color:var(--ink-mid)}
/* .dot — a mark in a schedule matrix: solid is the job's own, ring is carried over */
.dot{display:inline-block;box-sizing:border-box;width:13px;height:13px;border-radius:50%;background:var(--accent);border:1.5px solid var(--accent);vertical-align:-1px}
.dot.ring{background:none}


/* =============================================================
   8. NOTES, FIT, FAQ
   ============================================================= */
.note{margin:22px 0 0;padding:1px 0 1px 18px;border-left:2px solid var(--ink);max-width:var(--measure)}
.note p{font-size:15.5px;line-height:1.6;margin:0}
.fit{display:grid;grid-template-columns:1fr 1fr;gap:0 56px;margin:20px 0 0}
.fit h3{font:600 17px/1.3 var(--display);color:var(--ink);margin:0;padding:0 0 9px;border-bottom:1px solid var(--ink);max-width:none}
.fit ul{list-style:none;margin:0;padding:0}
.fit li{padding:11px 0 12px;border-bottom:1px solid var(--border);font-size:15px;line-height:1.55;color:var(--ink-mid)}
.fit li strong{color:var(--ink);font-weight:600}
.faq{border-top:1px solid var(--ink);margin-top:8px;max-width:var(--measure)}
.faq details{border-bottom:1px solid var(--border)}
.faq summary{position:relative;cursor:pointer;list-style:none;padding:15px 34px 15px 0;font:600 16.5px/1.4 var(--sans);color:var(--ink)}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:'+';position:absolute;right:2px;top:12px;font:400 22px/1 var(--sans);color:var(--ink-mid)}
.faq details[open] summary::after{content:'\2212'}
.faq summary:hover{color:var(--accent)}
.faq .a{padding:0 34px 18px 0;font-size:15.5px;line-height:1.62;color:var(--ink-mid)}
.faq .a strong{color:var(--ink);font-weight:600}


/* =============================================================
   9. ENDMATTER
   ============================================================= */
.linklist{list-style:none;margin:16px 0 0;padding:0;columns:2;column-gap:56px;border-top:1px solid var(--ink)}
.linklist li{break-inside:avoid;padding:11px 0 12px;border-bottom:1px solid var(--border);font-size:14.5px;line-height:1.5;color:var(--ink-mid)}
.linklist a{display:block;font-weight:600;font-size:15.5px}


/* =============================================================
   10. READING PROGRESS  (bar is created by academy-kit.js)
   ============================================================= */
.read-bar{position:fixed;top:var(--nav-h);left:0;right:0;height:2px;z-index:90;pointer-events:none}
.read-bar i{display:block;height:100%;transform-origin:0 50%;transform:scaleX(var(--p,0));background:var(--accent)}


/* =============================================================
   11. RESPONSIVE, MOTION, PRINT
   ============================================================= */
@media(max-width:1040px){
  .article-wrap{grid-template-columns:minmax(0,1fr);gap:0}
  .toc{display:none}
}
@media(max-width:900px){
  /* one column: title, drawing, numbered notes, general notes, title block */
  .sheet{grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
  .sheet-notes{display:contents}
  .sheet-draw,.notes-rest,.sheet-notes>*{grid-column:1;grid-row:auto}
  .sheet-notes .fig-title{order:1}
  .sheet-draw{order:2;border-bottom:1px solid var(--ink)}
  .notes{order:3}
  .notes-rest{order:4;border-top:0}
  .sheet figcaption{order:5}
  .linklist{columns:1}
}
@media(max-width:760px){
  .article-wrap{padding:calc(var(--nav-h) + 20px) 20px 56px}
  .article-lede{font-size:18.5px}
  article{margin-top:44px}
  article p{font-size:16.5px}
  article h2{margin-top:60px}
  .tldr p{font-size:18px}
  /* the drawing keeps a readable scale and pans sideways, like a drawing does */
  .sheet-draw .tool-shot-btn,.sheet-draw>svg{min-width:560px}
  .pin{width:19px;height:19px;font-size:10.5px;line-height:19px;box-shadow:0 0 0 2px #fff}
  .pin-key{grid-template-columns:1fr;gap:12px}
  .step-no{font-size:44px}
  .io{grid-template-columns:1fr}
  .io>div{padding:11px 0 12px}
  .io>div+div{padding-left:0;border-left:0;border-top:1px solid var(--border-s)}
  /* cells stack; a strip stays one bar, turned on its side */
  .apart,.strip{grid-template-columns:1fr}
  .apart{gap:10px}
  .strip>li+li,.strip.plain>li+li{border-left:0;border-top:1.5px solid var(--accent)}
  .strip.plain>li+li{border-top:1px solid var(--ink)}
  .run i{display:none}
  .run::before,.run::after{display:none}
  .ladder li{grid-template-columns:22px minmax(0,1fr);row-gap:3px}
  .ladder li>span{grid-column:2}
  .ctable{min-width:560px}
  .fit{grid-template-columns:1fr;gap:28px}
}
@media(prefers-reduced-motion:reduce){
  .btn-pri,.sheet svg .b circle{transition:none}
}
@media(forced-colors:active){.pin,.notes a::before,.pin-key li::before{forced-color-adjust:none}}
@media print{
  #main-nav,.mobile-menu,.toc,.read-bar,.head-cta,.li-follow-wrap,footer,.pin,.tool-shot-zoom{display:none!important}
  .article-wrap{display:block;max-width:none;padding:0}
  .fig,.step-head,.io,.sheet{break-inside:avoid}
  article h2,article h3{break-after:avoid}
}
