/* provelab: module M1 on Platform A. Three demos in one figure: rule versions, medicines, warfarin dose band.
   Uses core .mod-head .figbox .ftabs .readout .ph-cell .opt .act .btn .tag .key .note details.sources; this file only lays them out.
   v5 (the films' look): phenotype cells in the warm scale with a fine ink outline, labels in Figtree caps, numbers and hashes in
   mono, the dose in Newsreader, one-line figure captions in Newsreader italic, the Jolt guest as an ink bar with paper text. */

.pl-box { margin: 32px 0 0; }
.pl-box > .pl-tabs { grid-column: 1 / -1; }
/* The controls come first in the markup (tab order: tabs, controls, figure); side by side they sit in the right column. */
.pl-box > .pl-fig { grid-column: 1; grid-row: 2; }
.pl-box > .pl-ctl { grid-column: 2; grid-row: 2; }
.pl-fig { container: pl / inline-size; }
.pl-pane:focus-visible { outline-offset: 6px; }
.pl-gi { display: inline-flex; flex: none; }
.pl-gi svg, .pl .rd-cell dt > svg { flex: none; }
.pl-fh { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 20px; }
.pl-fe { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.pl-c2 { text-align: right; }
.pl-blk { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; }
.pl-bh { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.pl code { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }

/* 256-bit fingerprint: the hash bits as 16 × 16 pixels; bits that differ from v0.2 in the signal colour. */
.pl-fp { display: block; width: 54px; height: 54px; background: var(--soft); color: var(--ink); }
.pl-fp rect { fill: currentColor; }
.pl-fp .d rect { fill: var(--signal); }

/* ---------- 01 · Rule versions: three versions of one table side by side, lines into the one guest ---------- */
/* One grid; each version is a column whose seven rows line up across the columns (subgrid), the axis sits beside the cells. */
.pl-vs { --c: 30px; --k: 3; --mid: calc((var(--k) * var(--c) + (var(--k) - 1) * 4px) / 2); display: grid; grid-template-columns: max-content repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(7, auto) 30px auto; column-gap: 20px; }
.pl-vload { grid-column: 1 / -1; margin: 0; }
.pl-vs > .note { grid-column: 1 / -1; margin: 0; }
.pl-v { position: relative; grid-row: 1 / span 7; display: grid; grid-template-rows: subgrid; align-content: start; min-width: 0; padding-top: 12px; }
.pl-vr { position: absolute; top: 0; left: 0; right: 0; height: 1.5px; background: var(--ink); }
.pl-v[data-v="N"] .pl-vr { background: var(--tone); }
.pl-vk { margin: 0 0 10px; overflow-wrap: anywhere; }
.pl-vfp { display: block; margin: 0 0 8px; }
.pl-vfp .pl-fp { width: 72px; height: 72px; }
.pl-vh { margin: 0; font: 12px/1.45 var(--mono); }
.pl-vh code { font-size: 12px; }
.pl-vm, .pl-vd { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 2px 0 0; font: 500 10.5px/1.5 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-vb, .pl-vbits { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.pl-vd { margin-bottom: 12px; padding: 0 2px 0 0; }
.pl-vok { display: inline-flex; align-items: center; gap: 4px; color: var(--tone); }
.pl-vok.bad, .pl-vbits { color: var(--signal-ink); }
.pl-vst { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.pl-vst li { display: inline-flex; align-items: center; gap: 4px; font: 11px/1.4 var(--mono); white-space: nowrap; }
.pl-vst i { flex: none; width: 8px; height: 8px; background: var(--mk); box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .5); }
.pl-vst li.new { color: var(--tone); }
.pl-vax { grid-column: 1; grid-row: 7; align-self: end; display: grid; grid-auto-rows: var(--c); gap: 4px; }
.pl-vax span { font: 500 10.5px/var(--c) var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: right; }
/* Cells: the phenotype colour (the --ph-* scale), its initials, a fine ink outline like the films' atoms; hollow = no site of that
   function or no rule. */
.pl-mx { align-self: end; display: grid; grid-template-columns: repeat(var(--k), var(--c)); grid-auto-rows: var(--c); gap: 4px; }
.pl-c { position: relative; display: flex; align-items: center; justify-content: center; width: var(--c); height: var(--c); margin: 0; padding: 0; border: 0; border-radius: 0; font: 10.5px/1 var(--mono); letter-spacing: 0; box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .5); outline: 0 solid transparent; outline-offset: 2px; transition: background-color var(--t3) var(--ease), color var(--t3) var(--ease), outline-color var(--t2); }
.pl-c.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.pl-c.ch { outline: 1.5px solid var(--ink); }
.pl-c.hl { outline: 1.5px solid var(--signal); }
.pl-c.me::after { content: ""; position: absolute; top: -4px; right: -4px; width: 6px; height: 6px; background: var(--ink); border: 1.5px solid var(--white); }
button.pl-c { cursor: pointer; }
button.pl-c:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Lines from each version into the guest: a 1.5px rule with a 6px head, under the middle of the cells. */
.pl-cn { position: relative; grid-row: 8; }
span.pl-cn:nth-of-type(1) { grid-column: 2; }
span.pl-cn:nth-of-type(2) { grid-column: 3; }
span.pl-cn:nth-of-type(3) { grid-column: 4; }
.pl-cn::before, .pl-cn::after { content: ""; position: absolute; left: var(--mid); background: var(--ink); }
.pl-pk { position: absolute; top: 3px; left: calc(var(--mid) - 3px); width: 6px; height: 6px; background: var(--ink); opacity: 0; }
.pl-cn::before { top: 6px; bottom: 5px; width: 1.5px; margin-left: -.75px; }
.pl-cn::after { bottom: 0; width: 8px; height: 6px; margin-left: -4px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
/* The guest: one ink engine bar (the Jolt guest), paper text. */
.pl-gst { grid-column: 2 / -1; grid-row: 9; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; background: var(--ink); color: var(--paper); }
.pl-gn { display: inline-flex; align-items: center; gap: 8px; font: 13px/1.3 var(--mono); }
.pl-gn b { font-weight: 400; }
.pl-ge { color: var(--g1); font-size: 12px; }
.pl-gs { flex: 1 1 150px; font-family: var(--display); font-style: italic; font-size: 16px; line-height: 1.3; letter-spacing: -0.005em; color: var(--g1); }
.pl-gst .tag { margin-left: auto; }
/* One-line captions under the figures: the films' italic Newsreader voice */
.pl .pl-vinfo, .pl .pl-rinfo { font-family: var(--display); font-style: italic; font-size: 17px; line-height: 1.35; letter-spacing: -0.005em; color: var(--ink); }
.pl-vinfo { min-height: 2.7em; margin: 18px 0 0; max-width: none; }
.pl-vkey { margin-top: 10px; }
.pl-vkey i.pl-ki-me { width: 6px; height: 6px; vertical-align: 1px; background: var(--ink); }
.pl-vkey i.pl-ki-ch { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Recompute steps */
.pl-rp { list-style: none; margin: 0; padding: 0; counter-reset: rp; }
.pl-rp:empty::before { content: "Nothing recomputed yet."; display: block; padding: 10px 0; font-family: var(--display); font-style: italic; font-size: 16px; color: var(--muted); }
.pl-rp li { counter-increment: rp; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 3px 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); transition: opacity var(--t2); }
.pl-rp.stale li { opacity: .5; }
.pl-rp li::before { content: "0" counter(rp); grid-row: 1 / span 3; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pl-rp li b { font-weight: 500; font-size: 15px; }
.pl-rv { grid-column: 2 / -1; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.pl-rv b { font-family: var(--font); font-weight: 500; font-size: 14px; color: var(--tone); }
.pl-rp li small { grid-column: 2 / -1; font-size: 13px; line-height: 1.45; color: var(--muted); }
/* In development: the last step, framed (solid; dashed is kept for planned). */
.pl-rp li.plan { margin-top: 8px; padding: 11px 10px; border: 1.5px solid var(--line-2); }
.pl-st { justify-self: end; }
.pl-st.pl-new, .pl-st.pl-bad { --mk: var(--signal); }

/* ---------- 02 · Medicines: CPIC cell → effective cell, one arrow between ---------- */
.pl-genes { display: grid; gap: 24px; }
.pl-pc { --gap: 56px; column-gap: var(--gap); }
.pl-pc .ph-cell + .ph-cell { position: relative; }
.pl-pc .ph-cell + .ph-cell::before,
.pl-pc .ph-cell + .ph-cell::after { content: ""; position: absolute; background: var(--line-2); transition: background var(--t2); }
.pl-pc .ph-cell + .ph-cell::before { top: 39px; left: calc(10px - var(--gap)); width: calc(var(--gap) - 24px); height: 1.5px; }
.pl-pc .ph-cell + .ph-cell::after { top: 36.75px; left: -14px; width: 6px; height: 6px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.pl-pc.moved .ph-cell + .ph-cell::before, .pl-pc.moved .ph-cell + .ph-cell::after { background: var(--signal); }
.pl-key .pl-gi { margin-right: 6px; vertical-align: -3px; }
.pl-key + .fnote { margin-top: 8px; }
.pl-out { --n: 3; margin-top: 28px; }
.pl-led > .k { margin: 0 0 4px; }
.pl-led ul { list-style: none; margin: 0; padding: 0; }
.pl-led li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.pl-led li:last-child { border-bottom: 0; padding-bottom: 0; }
.pl-led .tag { justify-self: start; }

/* ---------- 03 · Warfarin dose band ---------- */
.pl-warn { margin: 0 0 20px; }
/* Two labels carry lowercase data (an rsID, a unit): Figtree with tracking, but not set in caps */
.pl #pl-vkl, #pl-p3 .pl-bh .pl-c2:not([id]) { text-transform: none; letter-spacing: .03em; }
.pl-strip { margin-top: 16px; }
.pl-strip:first-child { margin-top: 0; }
.pl-sth { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.pl-sl { display: inline-flex; align-items: center; gap: 8px; }
.pl-dose, .pl-band { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; }
.pl-band { color: var(--tone); }
.pl-track { position: relative; display: grid; grid-template-columns: 21fr 28fr 51fr; gap: 2px; height: 28px; }
.pl-bd { display: block; min-width: 0; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; line-height: 28px; background: var(--soft); color: var(--muted); font-family: var(--font); font-weight: 500; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: background var(--t3) var(--ease), color var(--t3) var(--ease); }
.pl-strip-priv .pl-bd.on { background: var(--g2); color: var(--ink); }
.pl-strip-pub .pl-bd.on { background: var(--ink); color: var(--paper); }
/* The exact private value: an ink rule with a small ink triangle above it. */
.pl-mk { position: absolute; top: -6px; bottom: -6px; left: var(--d, 0%); width: 2px; margin-left: -1px; background: var(--ink); transition: left var(--t3) var(--ease); }
.pl-mk::before { content: ""; position: absolute; top: -4px; left: -3px; width: 8px; height: 6px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.pl-axis { position: relative; height: 16px; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.pl-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.pl-axis span:first-child { transform: none; } .pl-axis span:last-child { transform: translateX(-100%); }

/* Waterfall of the IWPC terms on the √(mg/week) scale; thin solid rules at 21 and 49 mg/week. */
.pl-wh, .pl-wr { display: grid; grid-template-columns: minmax(0, 158px) 64px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.pl-wh { padding-bottom: 6px; border-bottom: 1.25px solid var(--ink); font-family: var(--font); font-weight: 500; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-wh > span:nth-child(2) { text-align: right; }
.pl-wsc { position: relative; height: 13px; font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.pl-wsc i { position: absolute; top: 0; transform: translateX(-50%); font-style: normal; }
.pl-wr { padding: 6px 0; border-bottom: 1px solid var(--line); }
.pl-wt { display: flex; flex-direction: column; min-width: 0; }
.pl-wt b { font-weight: 500; font-size: 14px; line-height: 1.25; }
.pl-wt small { font-family: var(--mono); font-size: 10.5px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.pl-wv { font-family: var(--mono); font-size: 12.5px; text-align: right; }
.pl-wb { position: relative; height: 14px; }
.pl-wb::before, .pl-wb::after { content: ""; position: absolute; top: -7px; bottom: -7px; width: 1px; background: var(--line-2); }
.pl-wb::before { left: var(--t21); } .pl-wb::after { left: var(--t49); }
.pl-wb i { position: absolute; top: 2px; bottom: 2px; left: 0; width: 0; min-width: 2px; background: var(--ink); transition: left var(--t3) var(--ease), width var(--t3) var(--ease), background var(--t2); }
.pl-wb i.up { background: var(--blue-500); box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .5); }
.pl-wb i.dn { background: var(--white); box-shadow: inset 0 0 0 1px var(--ink); }
.pl-wb i.zero { background: var(--line-2); }
.pl-wsum { border-bottom: 0; padding-top: 10px; }
.pl-wsum .pl-wv { color: var(--tone); }
.pl-wsum .pl-wb i { background: var(--sel); left: 0; }
.pl-wsum .pl-wb em { position: absolute; top: -5px; bottom: -5px; left: 0; width: 3px; margin-left: -1.5px; background: var(--ink); transition: left var(--t3) var(--ease); }
.pl-fx { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.pl-fx thead th { text-align: left; font-family: var(--font); font-weight: 500; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px 0; border-bottom: 1.25px solid var(--ink); }
.pl-fx thead th:first-child { width: 24%; }
.pl-fx tbody th { text-align: left; font-weight: 500; padding: 9px 10px 9px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.pl-fx td { padding: 9px 10px 9px 0; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.pl-fx code { font-size: 12.5px; }
.pl-fx small { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.pl-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--tone); }
.pl-bad { color: var(--signal-ink); }
.pl-drift { background: var(--signal-tint); color: var(--signal-ink); padding: 0 1px; }

/* ---------- Control column ---------- */
.pl-ctl { gap: 24px; }
.pl-cg { display: flex; flex-direction: column; gap: 20px; }
.pl-cg[data-for="2"] { gap: 8px; }
.pl-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pl-ch .k { margin: 0; }
.pl-ch .act { position: relative; padding-top: 0; }
/* "Clear" is a short word: give it a 44px hit area without moving its rule (stops at the 8px gap above the chips). */
.pl-ch .act::after { content: ""; position: absolute; top: -12px; bottom: -8px; left: -8px; right: -8px; }
.pl-sdesc { margin: 10px 0 0; }
.pl-meds .opt { gap: 6px; padding: 9px 8px; min-width: 0; }
.pl-cb { flex: none; width: 10px; height: 10px; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background var(--t1), box-shadow var(--t1); }
.pl .opt[aria-pressed="true"] .pl-cb { background: var(--ink); box-shadow: none; }
/* The result of the controls in one line; shown only in one-column layouts (see the media query below). */
.pl-sum { display: none; }
.pl-c9 { margin: 0; font-family: var(--mono); font-size: 16px; line-height: 1.3; }
.pl-c9 small { display: block; margin-top: 3px; font-family: var(--font); font-size: 13px; color: var(--muted); }
.pl-o4 .opt { min-height: 40px; }
.pl-ctl .fnote { margin-top: 8px; }
.pl-rng { display: flex; flex-direction: column; }
.pl-rt { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 12px; }
.pl-rt:first-child { margin-top: 0; }
.pl-rt .k { margin: 0; }
.pl-rt output { font-family: var(--mono); font-size: 13px; color: var(--tone); }
.pl-rng .range { display: block; margin: 8px 0 2px; }
.pl-sug { align-self: flex-start; }
.pl-sug:disabled { color: var(--muted); cursor: default; }
.pl-acts { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Footnote across both columns ---------- */
.pl-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 16px 24px 20px; }
.pl-foot .fnote { margin: 0; }
.pl-foot details.sources { margin-top: 8px; }

/* ---------- One native run, end to end (assets/zk/benchmarks.json): rows on the run's time axis ---------- */
/* Columns: step | time track | padded trace (meter, one square = the smallest trace) | time and check. */
.pl-run { margin: 32px 0 0; container: plr / inline-size; }
.pl-lh, .pl-ln { display: grid; grid-template-columns: minmax(0, 168px) minmax(0, 1fr) 96px 88px; column-gap: 16px; align-items: center; }
.pl-lh { padding-bottom: 8px; border-bottom: 1.25px solid var(--ink); font: 500 10.5px/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-lh > span:last-child { text-align: right; }
.pl-ax { position: relative; height: 14px; font-family: var(--mono); font-weight: 400; letter-spacing: 0; text-transform: none; }
.pl-ax i { position: absolute; top: 0; transform: translateX(-50%); font-style: normal; white-space: nowrap; }
.pl-ax i:first-child { transform: none; }
.pl-ll { list-style: none; margin: 0; padding: 0; }
.pl-ln { width: 100%; min-height: 52px; margin: 0; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--t2); }
.pl-ln:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pl-ln.on { background: var(--sel); }
.pl-lt { display: flex; flex-direction: column; min-width: 0; }
.pl-lt b { font-weight: 500; font-size: 15px; line-height: 1.25; }
.pl-lt small { font: 10.5px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
/* The track: a hairline axis, the step's bar where it ran (warm grey with a fine ink outline, the commit in ink), the proof as an
   orange square where it landed (the one key mark), the scan line. */
.pl-lb { position: relative; height: 22px; background: linear-gradient(var(--line-2), var(--line-2)) 0 50% / 100% 1px no-repeat; }
.pl-gl { position: absolute; top: -9px; bottom: -9px; width: 1px; background: var(--line); }
.pl-seg { position: absolute; top: 5px; bottom: 5px; min-width: 2px; background: var(--blue-500); box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .5); transition: background-color var(--t3) var(--ease), box-shadow var(--t3) var(--ease); }
.pl-seg.data { background: var(--ink); }
.pl-seg.oth { background: var(--line-2); box-shadow: none; }
.pl-pf { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 3px; background: var(--signal); transition: background-color var(--t3) var(--ease); }
.pl-ph { position: absolute; top: -9px; bottom: -9px; left: calc(var(--p, 1) * 100%); width: 1.5px; margin-left: -.75px; background: var(--ink); transition: opacity var(--t2); }
.pl-ll.done .pl-ph { opacity: 0; }
.pl-ll.sel .pl-ln:not(.on) .pl-seg:not(.oth), .pl-ll.sel .pl-ln:not(.on) .pl-pf { background: var(--line-2); box-shadow: none; }
.pl-lm { display: flex; align-items: center; gap: 8px; }
.pl-lm .meter { flex: 0 0 44px; }
.pl-l2 { font: 12px/1 var(--mono); }
.pl-l2 sup { font-size: 9px; }
.pl-lv { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pl-lv b { font: 400 14px/1.3 var(--mono); }
.pl-lv small { display: inline-flex; align-items: center; gap: 4px; font: 10.5px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.pl-lv small svg { color: var(--tone); }
.pl-rinfo { min-height: 2.7em; margin: 14px 0 0; max-width: none; }
.pl-rout { margin-top: 20px; }
.pl-rverd { margin-top: 24px; max-width: none; }   /* the verdict spans the sheet (core caps paragraph width) */
.pl-run > .fnote code { font-size: 12px; }
/* Before the first playback: only the rows and the axis (the build draws the rest; reduced motion shows the end state). */
.pl-run.pre .pl-seg, .pl-run.pre .pl-pf, .pl-run.pre .pl-lm, .pl-run.pre .pl-lv, .pl-run.pre .pl-ph, .pl-run.pre .pl-rout .rd-v, .pl-run.pre .pl-rout .meter { visibility: hidden; }
/* Narrow figure (phones, narrow tablets): name, trace and time on one line, the track below across the full width. */
@container plr (max-width: 560px) {
  .pl-lh, .pl-ln { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; }
  .pl-lh > span:not(.pl-ax) { display: none; }
  .pl-ax { grid-column: 1 / -1; }
  .pl-ln { padding: 10px 0 12px; }
  .pl-lt { grid-column: 1; grid-row: 1; }
  .pl-lm { grid-column: 2; grid-row: 1; }
  .pl-lv { grid-column: 3; grid-row: 1; }
  .pl-lb { grid-column: 1 / -1; grid-row: 2; margin-top: 8px; }
  .pl-lm .meter { flex-basis: 30px; }
}

/* One column (tablets and phones): the controls sit between the tabs and the figure, options wrap as rows,
   and the result line stays pinned to the bottom of the screen while the controls scroll past. */
@media (max-width: 1000px) {
  .pl-box > .pl-fig, .pl-box > .pl-ctl { grid-column: auto; grid-row: auto; }
  .pl-box > .pl-ctl { border-top: 0; border-bottom: 1px solid var(--line); }
  .pl-ctl .opts { display: flex; flex-wrap: wrap; }
  .pl-samples .opt { padding-left: 10px; padding-right: 10px; }   /* ten ids in two rows on a phone */
  .pl-meds .pl-cb { display: none; }                               /* three medicines a row; pressed = core .opt state */
  .pl-sdesc { margin-top: 8px; }
  .pl-acts { flex-direction: row; flex-wrap: wrap; }
  /* The panel scrolls with var(--sec) bottom padding, which a sticky box would keep clear of: offset it to the panel's edge. */
  .pl-sum { position: sticky; bottom: calc(-1 * var(--sec)); z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 48px; max-width: none; margin: 0 -24px -24px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--white); }
  .pl-sum:empty { display: none; }
  .pl-sum svg { flex: none; }
  .pl-sum .pl-sp { color: var(--muted); padding: 0 4px; }
}
@media (max-width: 760px) {
  .pl-tx { display: none; }   /* "Rules", "Warfarin": all three tabs fit on a phone */
  .pl-sum { margin: 0 -16px -16px; padding: 12px 16px; }
  .pl-foot { padding: 14px 16px 16px; }
}
/* A wide figure column (one-column tablets, wide screens): bigger cells and fingerprints. */
@container pl (min-width: 640px) {
  .pl-vs { --c: 34px; }
  .pl-vfp .pl-fp { width: 84px; height: 84px; }
}
/* A narrow figure column (phones, and screens from 1001 to about 1150px wide where the control column takes 320px). */
@container pl (max-width: 400px) {
  .pl-vs { --c: 22px; column-gap: 10px; }
  .pl-vfp .pl-fp { width: 48px; height: 48px; }
  .pl-vh code { font-size: 11px; }
  .pl-vm, .pl-vd { font-size: 9.5px; letter-spacing: .05em; gap: 0 6px; }
  .pl-vst { gap: 3px 6px; }
  .pl-vst li { font-size: 10px; gap: 3px; }
  .pl-vst i { width: 7px; height: 7px; }
  .pl-vax span { font-size: 9.5px; letter-spacing: .05em; }
  .pl-c { font-size: 8.5px; }
  .pl-gst { padding: 10px 12px; gap: 6px 10px; }
  .pl-gs { flex-basis: 100%; order: 3; }
  .pl-gst .tag { margin-left: 0; }
}
@container pl (max-width: 420px) {
  .pl-pc { --gap: 36px; }
  .pl-pc .ph-cell + .ph-cell::before { left: calc(6px - var(--gap)); width: calc(var(--gap) - 18px); }
  .pl-pc .ph-cell + .ph-cell::after { left: -12px; }
  .pl-out { --n: 2; }
  .pl-led li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pl-wh, .pl-wr { grid-template-columns: minmax(0, 104px) minmax(0, 1fr) 52px; gap: 4px 8px; }
  .pl-wh > span:nth-child(2), .pl-wv { grid-column: 3; grid-row: 1; }
  .pl-wsc, .pl-wb { grid-column: 2; grid-row: 1; }
  .pl-wv { font-size: 11.5px; }
  .pl-bd { padding: 0 3px; font-size: 9.5px; letter-spacing: .02em; }
  .pl-fx { font-size: 13px; }
  .pl-fx code { font-size: 11.5px; }
  .pl-fx thead th:first-child { width: 22%; }
}
