/* Joel's guide to Grok Bot in Night plate. One long page: breadcrumb, title, contents, fourteen chapters, 22 drawn figures.
   Loaded after /assets/css/shell.css, which owns the tokens, fonts, header, footer, search palette and phone menu.
   Reading is Geist 18/30 on a 720px measure, headings are Newsreader, amber replaces terra, every card sits on --bg-2 or --bg-3.
   Spacing only 0 2 4 8 12 16 24 32 40 48 64 80 96. The inline drawings are recoloured at the end of this file, by attribute,
   so the drawings themselves are never edited. */
:root{
  --paper:var(--bg);--paper-card:var(--bg-2);--paper-card-2:var(--bg-3);
  --rule:var(--line);--rule-strong:var(--line-2);
  --terra:var(--amber);--terra-deep:var(--amber);--terra-tint:#2a2218;--on-terra:var(--bg);
  --accent:var(--amber);--accent-text:var(--amber);--accent-tint:var(--terra-tint);--on-accent:var(--bg);
  --on-color:var(--bg);
  --gate:var(--amber); /* the "You say yes" boxes: amber fill, dark text (8.6:1) */
  --card:var(--bg-2);--card-2:var(--bg-3);--on:var(--on-color);
  --fsans:var(--sans);--mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,"Cascadia Mono","Roboto Mono",monospace;
  --green:#a9bf95;--green-deep:#a9bf95;--steel:#93a8bb;--gold:#d8bd6a;
  --step:25ms;
  --measure:720px;--w-wide:48rem;--w-full:64rem;--gutter:24px;
  --t-h1:400 64px/64px var(--serif);--t-h2:400 36px/40px var(--serif);--t-h3:400 26px/32px var(--serif);
  --t-lede:400 22px/32px var(--sans);--t-body:400 18px/30px var(--sans);--t-ui:400 16px/24px var(--sans);--t-ui6:500 16px/24px var(--sans);
  --t-lab:400 14px/20px var(--sans);--t-lab6:500 14px/20px var(--sans);--t-h4:500 18px/28px var(--sans);--t-20:500 20px/28px var(--sans);
  --t-reveal:400 48px/52px var(--serif);--t-num:300 56px/56px var(--serif);--t-prompt:400 15px/24px var(--mono);--dg:840px;--num-col:64px;
}
@media (max-width:639px){:root{--gutter:20px;--t-h1:400 42px/44px var(--serif);--t-h2:400 30px/34px var(--serif);--t-h3:400 24px/30px var(--serif)}}
/* form controls don't inherit the page font by default (the Copy buttons fell back to Arial) */
button,input,select,textarea,summary{font:inherit;color:inherit}
main{font:var(--t-body);font-feature-settings:"kern";overflow-wrap:break-word}
h1,h2,h3,h4{color:var(--ink);text-wrap:balance;margin:0;font-weight:400}
main h4{font-family:var(--sans);font-weight:500}
p,li,figcaption,dd{text-wrap:pretty}
main p{margin:0}
b,strong,summary,th{font-weight:600}
/* links: the accent, always underlined, so colour is never the only cue */
main a{color:var(--text);text-decoration:underline;text-decoration-color:var(--text-3);text-underline-offset:4px;text-decoration-thickness:1px;transition:color var(--t-fade) var(--e),text-decoration-color var(--t-fade) var(--e)}
main a:hover{color:var(--amber);text-decoration-color:var(--amber);text-decoration-thickness:2px}
.nw{white-space:nowrap}
.ic{width:24px;height:24px;flex:none}
.ic.s16{width:16px;height:16px}

/* ===== the one centre line */
.col{width:min(100% - 2 * var(--gutter), var(--measure));margin-inline:auto}
.wide{width:min(100% - 2 * var(--gutter), var(--w-wide));margin-inline:auto}
.full{width:min(100% - 2 * var(--gutter), var(--w-full));margin-inline:auto}
figure,.col,.wide,.full{min-width:0}

.progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:50;pointer-events:none}
.progress::before{content:"";display:block;height:100%;background:var(--amber);transform-origin:0 50%;transform:scaleX(0)}
html:not(.motion) .progress{display:none}
@supports (animation-timeline:scroll()){.progress::before{animation:read-progress linear both;animation-timeline:scroll(root)}}
@keyframes read-progress{to{transform:scaleX(1)}}

/* labels: small, sentence case, on the same left edge */
.lab,.ch-n{margin:0 0 12px;font:var(--t-lab6);color:var(--text-2)}
.ch-n{margin-bottom:8px;color:var(--amber);font-variant-numeric:tabular-nums}

/* breadcrumb, title, byline, contents */
.hero{padding-top:48px}
.crumb{display:flex;flex-wrap:wrap;align-items:center;gap:0 4px;margin:0;padding:0;list-style:none;font:400 14px/20px var(--sans);color:var(--text-2)}
.crumb a{display:inline-flex;align-items:center;min-height:44px;padding:0 8px 0 0;color:var(--text-2);text-decoration-color:var(--line-2)}
.crumb a:hover{color:var(--amber)}
.crumb li+li::before{content:"\203A";margin-right:8px;color:var(--ink-soft)}
.crumb [aria-current]{color:var(--ink)}
.hero h1{margin-top:24px;font:var(--t-h1);letter-spacing:-.03em;text-wrap:balance;font-variation-settings:"opsz" 72}
.standfirst{margin-top:16px;font:var(--t-lede);color:var(--text-2)}
/* v9.1 (Hawk 1): the standfirst at 24/32 wherever the title is 60px; 20/28 on phones */
@media (min-width:640px){.standfirst{font:400 24px/34px var(--sans)}}
.byline{margin-top:16px;font:var(--t-lab);color:var(--ink-soft)}
.contents{margin-top:48px}
/* v8 (Hawk 6): the contents are one disclosure under 768 (closed by the inline script), a plain open list with a label from 768 */
.toc-s{display:flex;align-items:center;gap:12px;min-height:48px;list-style:none;cursor:pointer;font:var(--t-ui6);color:var(--ink);border-top:1px solid var(--rule)}
.toc-s::-webkit-details-marker{display:none}
.toc-d:not([open]) .toc-s{border-bottom:1px solid var(--rule)}
@media (min-width:768px){.toc-s{min-height:44px;margin:0 0 4px;border:0!important;cursor:default;font:var(--t-lab6);color:var(--ink-soft)}.toc-s .chev{display:none}}
.toc-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);column-gap:24px;border-bottom:1px solid var(--rule)}
@media (min-width:640px){.toc-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:column;grid-template-rows:repeat(7,1fr)}}
.toc-list li{border-top:1px solid var(--rule);display:flex}
.toc-list li>a{flex:1}
.toc-list a{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;min-height:48px;padding:8px 0;color:var(--ink);font:var(--t-ui);text-decoration:none;transition:color var(--t-fade) var(--ease)}
.toc-list a:hover,.toc-list a.is-hover{color:var(--amber)}
.toc-list a:hover .ct,.toc-list a.is-hover .ct{text-decoration:underline;text-underline-offset:4px}
.toc-list a.is-focus{outline:2px solid var(--amber);outline-offset:2px}
.toc-list .cn{font:var(--t-lab);color:var(--amber);font-variant-numeric:tabular-nums}

/* ===== vertical rhythm: 96 above a section heading, 24 heading to text, 48 around a figure or card, 48 above a sub heading */
.opener,.three,.chapter,.showcase{margin-top:96px}
.ch-h{font:var(--t-h2);letter-spacing:-.01em;margin:0}
.col>.ch-h+*{margin-top:24px}
.chapter>*+*{margin-top:24px}
.chapter>.full,.chapter>.wide,.chapter>.full+*,.chapter>.wide+*,.chapter>.side-fig,.chapter>.side-fig+*{margin-top:48px}
.chapter>.col:has(>.sub-h:first-child),.chapter>.col:has(>.worked),.chapter>.col:has(>.money){margin-top:48px}
.chapter>.col:first-child+.col{margin-top:24px}
.chapter>.col:has(>.sub-h:only-child)+.wide{margin-top:12px}
.sub-h{font:var(--t-h3);margin:48px 0 12px}
.col>.sub-h:first-child,.worked>.sub-h:first-child,.money>.sub-h:first-child{margin-top:0}
.lab+.sub-h{margin-top:0}
.prose>*+*{margin-top:24px}
/* v8 (Hawk 5): worked examples open with a 1px rule, 24 below it, and a 16px semibold label */
.worked{border-top:1px solid var(--rule-strong);padding-top:24px}
/* v9.1 (Hawk 3): first thing after a heading: no rule (it read as an underline), 24px gap */
.worked.is-first{border-top:0;padding-top:0}
.chapter>.col:has(>.worked.is-first){margin-top:24px}
.worked>.lab{font:500 16px/24px var(--sans);color:var(--text-2)}
.prose.items>*+*{margin-top:32px}
.wk-t{font-weight:500}

/* what you do and the three things: plain numbered text, number in a 32px column */
.steps{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.steps .st{text-wrap:balance}
/* v8 (Hawk 3): from 768 the numbers hang in the gutter, so the words start on the body edge */
@media (min-width:768px){.steps li{margin-left:-32px}.three-list li{margin-left:calc(-1 * var(--num-col))}}
.steps li{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:baseline}
.sn{font:var(--t-lab6);color:var(--amber);font-variant-numeric:tabular-nums}
/* the three things, set as type: large accent numerals beside the three lines, no card. the numbers are decoration; the list order and the words carry the meaning */
.three-list{list-style:none;margin:0;padding:0;display:grid;gap:32px}
.three-list li{display:grid;grid-template-columns:var(--num-col) minmax(0,1fr);align-items:start}
.three-list .tn{font:var(--t-num);font-style:italic;color:var(--amber);letter-spacing:-.02em;font-variant-numeric:lining-nums}
.three-list .tt{font:400 24px/34px var(--serif);letter-spacing:-.01em;padding-top:12px;text-wrap:balance}
/* the big moment (B11): words already in the opener, shown at full ink with no script or with reduced motion; with motion each word darkens in turn */
.reveal{margin-top:96px}
.reveal-t{white-space:nowrap;font:var(--t-reveal);letter-spacing:-.025em;color:var(--ink);text-wrap:balance}
@media (max-width:639px){.reveal-t{font:400 30px/36px var(--serif)}}
@media (max-width:379px){.reveal-t{font:400 24px/32px var(--serif)}}
@media (max-width:639px){.three-list .tn{font:300 44px/44px var(--serif)}.three-list li{grid-template-columns:48px minmax(0,1fr)}.three-list .tt{padding-top:8px}}
.reveal-js .reveal-t .w{color:var(--text-3);transition:color 300ms var(--ease) calc(var(--w) * 60ms)}
.reveal-js .reveal-t.is-on .w{color:var(--ink)}

/* figures (the only boxes besides prompt cards and the Rules block) */
/* figures: live .fig card; title 18/28 sans 600 */
.fig,.side-fig{margin-block:0;background:var(--bg-2);border:1px solid var(--line);border-radius:20px;padding:24px}
/* the drawing is capped at 840 inside the 1024 card; every part of the card sits on that one centred 840 column */
.fig{display:grid;grid-template-columns:minmax(0,var(--dg));justify-content:center}
.fig-title{font:400 24px/30px var(--serif);letter-spacing:-.015em;margin:0 0 24px}
.fig-cap{margin-top:24px;font:var(--t-body);color:var(--ink-soft)}
.dg{display:block;justify-self:center;width:min(100% + 32px, var(--dg));max-width:none;margin:0;height:auto;overflow:visible}
.dg text{font-kerning:normal}
.fig-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px 32px;margin-top:16px;padding-top:16px;border-top:1px solid var(--rule)}
.legend{display:flex;flex-wrap:wrap;gap:8px 16px;list-style:none;margin:0;padding:0;font:var(--t-lab);color:var(--ink-soft)}
.legend li{display:inline-flex;align-items:center;gap:8px;padding:2px 12px 2px 8px;border:1px solid var(--line-2);border-radius:999px;background:var(--bg-3)}
.astext{margin-top:16px;border-top:1px dashed var(--line-2)}
.astext summary{display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:0 12px 0 0;margin-top:4px;cursor:pointer;list-style:none;font:var(--t-ui6);color:var(--ink)}
.astext summary::-webkit-details-marker{display:none}
.astext summary:hover span:first-child{text-decoration:underline;text-underline-offset:4px}
.chev{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform var(--t-fade) var(--ease);flex:none;margin:0 4px}
details[open]>summary .chev{transform:translateY(2px) rotate(225deg)}
.vrail,.vrail ol,.vrail ul{margin:0}
.astext-list{margin:8px 0 0;padding-left:24px;font:var(--t-ui)}
.astext-list>li{margin:8px 0}
.astext-list .who{font-weight:600;margin-right:8px}
.astext-list .who::after{content:":"}
.astext-list .kick:empty{display:none}
.astext-list .lane{color:var(--ink-soft);margin-right:8px}
.astext-list .lane::after{content:":"}
.astext-list .lane .lg{display:none}
.astext-list ul{margin:4px 0 0;padding-left:24px}
.astext-list .chip{font-weight:600;margin-right:8px}
.astext-list .chip::after{content:":"}
.astext-list .chip .ic,.astext-list .g-no{display:none}
.astext-list .then{color:var(--ink-soft);margin-left:8px}
.astext-list .then::before{content:"("}.astext-list .then::after{content:")"}
.vrail{display:none}
.motion .dg .pulse{opacity:1}
.dg .pulse{opacity:0}
.static .dg .pulse{display:none}

/* draw-in: html.motion only, <= 600ms per figure */
.motion .fx .fx-rail{stroke-dasharray:1 1;stroke-dashoffset:0;transition:stroke-dashoffset var(--t-fade) var(--ease) calc(var(--i,0) * var(--step)),opacity 200ms var(--ease) calc(var(--i,0) * var(--step))}
.motion .fx:not(.is-in) .fx-rail{stroke-dashoffset:1;opacity:0}
.motion .fx .fx-n{transition:opacity var(--t-fade) var(--ease) calc(var(--i,0) * var(--step)),transform var(--t-fade) var(--ease) calc(var(--i,0) * var(--step))}
.motion .fx:not(.is-in) .fx-n{opacity:0;transform:translateY(8px)}
.motion .vrail>li{transition:opacity var(--t-fade) var(--ease),transform var(--t-fade) var(--ease)}
.motion .fig:not(.rail-in) .vrail>li{opacity:0;transform:translateY(8px)}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0s!important;scroll-behavior:auto!important}.copy-btn:active .cb-pill{transform:none!important}.chev{transition:none!important}}


/* the ch01 and ch09 drawings and the one-place drawing: cards on the 48rem line, drawing left, caption right at 18/28, stacked below 820 */
.side-fig{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:32px;align-items:center}
.side-fig>.fig-title{grid-column:1 / -1}
.side-fig>svg{display:block;width:auto;height:160px;max-width:100%;margin:0}
.side-fig>.fig-cap{margin:0;font:var(--t-body);color:var(--ink-soft)}
.lanes-fig{display:block}
@media (max-width:820px){.side-fig{grid-template-columns:minmax(0,1fr);row-gap:16px}}
.cap-k{display:block;font:var(--t-lab6);color:var(--ink)}
.lanes{margin-top:0}
.lane-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.lane-box{display:flex;flex-direction:column;gap:8px;padding:16px 24px;background:var(--bg-3);border:1px solid var(--line-2);border-radius:12px}
.lane-box>span:first-child{display:flex;align-items:center;gap:8px;font:var(--t-h4)}
.plug{display:flex;align-items:center;gap:8px;font:var(--t-lab);color:var(--ink-soft)}
.lane-join{position:relative;height:40px}
.lane-join span{position:absolute;top:0;height:24px;border-bottom:2px solid var(--ink);width:25%}
.lane-join span:first-child{left:25%;border-left:2px solid var(--ink);border-bottom-left-radius:12px}
.lane-join span:last-child{right:25%;border-right:2px solid var(--ink);border-bottom-right-radius:12px}
.lane-join::after{content:"";position:absolute;left:calc(50% - 1px);top:24px;height:16px;width:2px;background:var(--ink)}
.lane-one{display:flex;align-items:center;justify-content:center;gap:12px;min-height:64px;padding:12px 24px;border-radius:12px;background:var(--ink);color:var(--on);font:var(--t-h4)}


/* prompt cards and the Rules block: label above, small copy button, the serif on the white card (v12) */
.prompt-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.prompt-hl{min-width:0}
.prompt-h{margin:0!important}
/* v9: the card is the text column's width, so the prompt words wrap at the card (about 66 characters at 16px) */
.prompt-text code{display:block}
.chapter>.prompt,.chapter>.prompt+*{margin-top:48px}
.prompt-l{display:flex;align-items:center;gap:8px;margin:0;font:var(--t-lab6);color:var(--text)}
.is-rules .prompt-l{color:var(--amber)}
.is-rules .prompt-text{border:1px solid var(--amber)}
.copy-btn{display:inline-flex;align-items:center;justify-content:flex-end;min-height:44px;min-width:44px;padding:0;margin:0;border:0;border-radius:8px;background:none;color:var(--ink);cursor:pointer}
.cb-pill{display:inline-flex;align-items:center;gap:8px;padding:4px 14px;border:1px solid var(--line-2);border-radius:999px;background:none;font:var(--t-lab6);
  transition:background-color 200ms var(--ease),border-color 200ms var(--ease),transform 160ms var(--ease)}
.copy-btn:hover .cb-pill{border-color:var(--text-3)}
.copy-btn:hover .cb-l{text-decoration:underline;text-underline-offset:4px}
.copy-btn:active .cb-pill{transform:scale(.98)}
.cb-ok{display:none}
.copy-btn.is-copied .cb-ok{display:block}
.copy-btn.is-copied .cb-i{display:none}
.copy-btn.is-copied .cb-pill{border-color:var(--amber);color:var(--amber)}
.copy-btn[aria-disabled=true]{cursor:not-allowed}
.copy-btn[aria-disabled=true] .cb-pill{background:transparent;border-style:dashed;color:var(--ink-soft)}
.copy-btn[aria-disabled=true]:active .cb-pill{transform:none}
.prompt-text{margin:0;padding:24px;font:var(--t-prompt);white-space:pre-wrap;color:var(--ink);background:var(--bg-3);border:1px solid var(--line-2);border-radius:12px}
.prompt-text code{font:inherit}
.prompt-err{margin:8px 0 0;font:var(--t-lab);color:var(--ink)}

/* close */
.sign{margin-top:96px}
.sign>.col:first-child{padding-top:24px;border-top:1px solid var(--line)}
.sign-by{font:400 24px/32px var(--serif)}
.back{margin-top:8px}
.back a{display:inline-flex;align-items:center;min-height:44px;font:var(--t-ui6)}
/* the money section: the accent on its heading, with a lock icon beside the words */
.money .sub-h{display:flex;align-items:center;gap:12px;color:var(--amber)}
.money .sub-h .ic{color:var(--accent)}
/* ===== the drawn svg needs at least 735px to keep its labels at 14px; below 820 the same steps run as the phone rail */
@media (max-width:819px){
  .dg{display:none}
  .astext{display:none}
  .fig-foot .legend{display:none}
  .fig-foot:empty,.fig-foot:has(.legend:only-child){display:none}
  .fig{padding:24px 16px}
  .vrail{display:block;position:relative;list-style:none;margin:0;padding:0}
  .vrail::before{content:"";position:absolute;left:11px;top:16px;bottom:24px;width:2px;background:var(--text-3)}
  .vrail>li{position:relative;padding:0 0 24px 40px;font:var(--t-ui)}
  .vrail>li::before{content:"";position:absolute;left:4px;top:4px;width:16px;height:16px;border-radius:50%;background:var(--card);border:2px solid var(--ink)}
  .vrail .kick{display:inline-block;margin-right:8px;font:var(--t-lab);color:var(--ink-soft)}
  .vrail .t{display:block}
  .vrail .lane{display:inline-flex;align-items:center;gap:8px;margin:0 0 4px;font:var(--t-lab);color:var(--ink)}
  .vrail .lg{display:inline-block;width:12px;height:12px}
  .vrail .lane-circle .lg{border:2px solid var(--ink);border-radius:50%}
  .vrail .lane-square .lg{background:var(--ink);border-radius:2px}
  .vrail .lane-tri .lg{width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:12px solid var(--ink)}
  .vrail .kick+.lane::before{content:"\00b7";margin-right:4px;color:var(--ink-soft)}
  .vrail .k-start>.t{font:var(--t-h4)}
  .vrail .k-start::before{width:24px;height:24px;left:0;top:0;border-radius:8px;background:var(--ink);border-color:var(--ink)}
  .vrail .k-decision>.t{font-weight:600}
  .vrail .br{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
  .vrail .br>li{padding:8px 12px;border:2px solid var(--ink);background:var(--card-2);border-radius:8px}
  .vrail .br>li.b-no,.vrail .br>li.b-loop{border-style:dashed}
  .vrail .chip{display:inline-flex;align-items:center;gap:4px;padding:0 8px;margin-bottom:4px;border:1px solid var(--ink);border-radius:999px;font:var(--t-lab);background:var(--card)}
  .vrail .g-no{display:inline-block;width:12px;height:0;border-top:2px solid var(--ink)}
  .vrail .then{display:block;font:var(--t-lab);color:var(--ink-soft)}
  .vrail .k-gate::before{display:none}
  .vrail .k-gate{margin-bottom:12px}
  .vrail .k-gate{padding:24px 24px 24px 64px;border-radius:12px;background:var(--gate);color:var(--on-accent);outline:1px solid rgba(20,18,15,.45);outline-offset:-8px;font:var(--t-20);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314120f' stroke-width='1.75' stroke-linecap='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V7.5a3.5 3.5 0 0 1 7 0v3'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-position:24px 50%;background-size:24px}
  .vrail-a,.vrail-b,.vrail-c,.vrail-d,.vrail-e,.vrail-f{padding-bottom:0}
  .vrail .k-rules>.t,.vrail .k-team>.t,.vrail .k-chief>.t{font-weight:600}
  .vrail .k-rules>.t{color:var(--accent-text)}
  .vrail .k-rules ul,.vrail .k-team ul{list-style:none;margin:8px 0 0;padding:12px 16px;background:var(--card-2);border:1px solid var(--ink);border-radius:8px}
  .vrail .k-rules li{display:flex;gap:8px;align-items:flex-start;padding:4px 0}
  .vrail .k-rules li .ic{margin-top:4px}
  .vrail .k-team li{padding:4px 0;border-top:1px solid var(--rule)}
  .vrail .k-team li:first-child{border-top:0}
  .vrail .k-msg .who,.vrail .k-reply .who{display:block;font:var(--t-lab);color:var(--ink-soft)}
  .vrail .k-msg::before{border-radius:2px;background:var(--ink)}
  .vrail .k-reply::before{background:var(--card);border-style:dashed}
  .vrail .k-reply>.t .rp{display:inline-block;margin-right:8px;vertical-align:-2px}
  .vrail .k-note{padding:12px 16px 12px 40px;margin:0 0 24px 32px;border-radius:8px;background:var(--bg-2);border:1px dashed var(--text-3)}
  .vrail .k-note::before{left:12px;top:16px;width:16px;height:16px;border-color:var(--ink)}
  .vrail-c::before{bottom:32px}
}
@media (max-width:639px){
  .fig,.side-fig{padding:16px}
  .prompt-text{padding:16px}
  .lane-row{gap:8px}
  .lane-box{padding:12px 16px}
}
@media (max-width:380px){.lane-row{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.progress::before{animation-duration:auto!important}}

.astext-list .rp{display:inline-block;margin-right:8px;vertical-align:-2px}

/* ===== from 768: one content area, left aligned. The text column is the 720px measure (about 68 characters at 18px),
   the title and standfirst run to 820, and the prompt cards, the Rules block and the diagrams share one centre line with the site (28px gutters). */
@media (min-width:768px){
  :root{--gutter:28px;--area:1064px;--edge:max(var(--gutter), calc((100% - var(--area)) / 2));
    --t-h1:400 72px/72px var(--serif);--t-h2:400 40px/46px var(--serif);--t-h3:400 28px/36px var(--serif);--t-prompt:400 15px/26px var(--mono);--t-reveal:400 52px/58px var(--serif);--dg:960px}
  /* redesign: one centred reading column, so a wide screen doesn't leave the right half empty */
  .col,.wide{width:min(100% - 2 * var(--gutter), var(--measure));margin-inline:auto}
  .full{width:min(100% - 2 * var(--gutter), var(--area));margin-inline:auto}
  .hero>.col{width:min(100% - 2 * var(--gutter), var(--measure))}
  .hero h1,.hero .standfirst{max-width:820px}
  .hero .contents,.hero .byline,.hero nav[aria-label=Breadcrumb]{max-width:var(--measure)}
  .steps li,.three-list li{margin-left:0;grid-template-columns:40px minmax(0,1fr)}
  .side-fig>svg{height:176px}
}
/* with 28px gutters the diagram card at 820 is 764 wide; 16px padding up to 1023 keeps its labels at 16px or more */
@media (min-width:768px) and (max-width:1023px){.fig{padding:16px}}
/* v13: under 768 the money heading is 20px, so it takes terra-deep (terra text only at 24px and up); the lock and the words carry the meaning */

/* ===== the 22 inline drawings: every hardcoded paper colour recoloured here, by attribute, never by editing the drawing.
   Paper fills become the night grounds, ink becomes bone, terra becomes amber, hairline greys become the rule tokens.
   Text that sat light-on-dark flips to dark-on-bone together with its box. */
.dg{color:var(--ink)}
.dg text,.dg [font-family]{font-family:var(--serif)}
svg [fill="#2a2520"]{fill:var(--ink)}
svg [stroke="#2a2520"]{stroke:var(--ink)}
svg [fill="#655b50"]{fill:var(--ink-soft)}
svg [stroke="#655b50"]{stroke:var(--ink-soft)}
svg [fill="#f1ebdd"],svg [fill="#faf6ec"],svg [fill="#fdf7ec"]{fill:var(--bg-2)}
svg [fill="#f6f0e2"]{fill:var(--bg-3)}
svg text[fill="#f1ebdd"],svg text[fill="#faf6ec"],svg text[fill="#fdf7ec"],svg text[fill="#f6f0e2"]{fill:var(--bg)}
svg [stroke="#fdf7ec"]{stroke:var(--bg)}
svg [stroke="#cabd9f"]{stroke:var(--text-3)}
svg [fill="#cabd9f"]{fill:var(--text-3)}
svg [fill="#ddd2ba"]{fill:var(--line-2)}
svg [fill="#90401f"],svg [fill="#b1542f"]{fill:var(--amber)}
svg [stroke="#90401f"],svg [stroke="#b1542f"]{stroke:var(--amber)}
svg [stroke="#faf6ec"],svg [stroke="#f1ebdd"],svg [stroke="#f6f0e2"]{stroke:var(--bg)}
svg [stroke="#ddd2ba"]{stroke:var(--line-2)}

/* ===== print: black on white, no chrome */
@media print{
  .site-h,.site-f,.progress,dialog,.copy-btn{display:none!important}
  :root{--bg:#fff;--bg-2:#fff;--bg-3:#f4f4f4;--text:#000;--text-2:#222;--text-3:#444;--line:#bbb;--line-2:#999;--ink:#000;--ink-soft:#333;--amber:#000;--on-color:#fff}
  body{background:#fff;color:#000}
  svg [fill="#2a2520"]{fill:#2a2520}svg [stroke="#2a2520"]{stroke:#2a2520}svg [fill="#f1ebdd"],svg [fill="#faf6ec"],svg [fill="#fdf7ec"],svg [fill="#f6f0e2"]{fill:#faf6ec}
  svg text[fill="#f1ebdd"],svg text[fill="#faf6ec"],svg text[fill="#fdf7ec"],svg text[fill="#f6f0e2"]{fill:#fdf7ec}
  svg [stroke="#cabd9f"]{stroke:#cabd9f}svg [fill="#90401f"],svg [fill="#b1542f"]{fill:#90401f}svg [stroke="#90401f"],svg [stroke="#b1542f"]{stroke:#90401f}svg [stroke="#fdf7ec"]{stroke:#fdf7ec}svg [fill="#655b50"]{fill:#655b50}svg [fill="#cabd9f"]{fill:#cabd9f}svg [fill="#ddd2ba"]{fill:#ddd2ba}
}
