:root { --ink:#1f2937; --navy:#14263c; --blue:#3f7fbf; --blue-dark:#2f6fb2; --mut:#6b7280;
        --line:#e2e8f0; --code-bg:#f1f5f9; }
* { box-sizing: border-box; }
body { margin:0; font-family:'Lato','Helvetica Neue',Arial,sans-serif; color:var(--ink); background:#fff;
       font-size:22px; line-height:1.62; }
p { margin:.55em 0 .9em; }
ul, ol { margin:.4em 0 1em; padding-left:1.35em; }
li { margin:.28em 0; }
code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.86em;
       background:var(--code-bg); border-radius:4px; padding:.1em .35em; }
strong { color:var(--navy); }
a { color:var(--blue-dark); }
h1 { font-size:40px; font-weight:900; color:var(--navy); margin:1.1em 0 .6em; line-height:1.2;
     letter-spacing:-.01em; }
h2 { font-size:28px; font-weight:700; color:var(--navy); margin:1.7em 0 .45em; }
figure { margin:1.4em 0 1.7em; text-align:center; }
figure img { max-width:100%; height:auto; border:1px solid var(--line); border-radius:10px;
             box-shadow:0 1px 4px rgba(20,38,60,.07); background:#fff; }
figcaption { color:var(--mut); margin-top:.6em; font-style:italic; font-size:18px; }
/* Arriving from a Goto card: the start frame, applied before the FIRST paint by the head script, so the
   page never shows itself at rest and then jump-cuts into the animation. site.js animates from here and
   removes the attribute. A page opened any other way has no attribute and no cost. */
html[data-arrive] main { opacity:0; will-change:transform, opacity; }
html[data-arrive="zoomin"] main  { transform:scale(.92); }
html[data-arrive="zoomout"] main { transform:scale(1.28); }
html[data-arrive="jump"] main    { transform:translateX(5%); }
/* No prefers-reduced-motion exemption, on Andrew's call (2026-09-23): the move between two pages of
   a published site is the thing that says they are one document rather than a pile of pictures, and a
   reader whose machine has Reduce motion set was getting a jump-cut with no explanation. Same rule the
   app already applies to the concept bounce and the modification disc — if the gesture is the content,
   it plays. */
/* the figure opens in a zoom/pan viewer — a big diagram is unreadable at column width */
.shot img { cursor:zoom-in; }
/* NOT a centring flex container. Every child here is absolutely positioned, so the centring did
   nothing for the bar or the hint — and for the picture it did real harm (see below). */
.lens { position:fixed; inset:0; z-index:90; background:rgba(12,20,32,.92);
        overscroll-behavior:contain; }
/* left/top PINNED to the corner, and that is not decoration. `.lens` used to be a centring flex
   container, and the static position of an absolutely-positioned flex child is where it would sit as
   the sole flex ITEM — i.e. already centred. The script then added its own translate computed from the
   viewport corner, so the picture was centred twice and landed about half a screen out, worse the
   larger it was (Andrew, 2026-09-23: "it seems to center the diagram weird… when i click fit, it does
   this"). Pinning the corner makes the script the only thing that positions the picture, which is what
   its arithmetic has always assumed. */
.lens img { position:absolute; left:0; top:0; transform-origin:0 0; max-width:none; max-height:none;
            cursor:grab; image-rendering:auto; user-select:none; -webkit-user-drag:none; }
.lens.drag img { cursor:grabbing; }
.lens .bar { position:absolute; top:18px; right:18px; display:flex; gap:8px; z-index:1; }
.lens .bar button { font:600 16px/1 inherit; color:#0d1b2a; background:#fff; border:0; cursor:pointer;
                    border-radius:10px; min-width:42px; height:42px; padding:0 12px;
                    box-shadow:0 2px 10px rgba(0,0,0,.3); }
.lens .bar button:hover { background:#eef2f7; }
.lens .hint { position:absolute; bottom:18px; left:50%; transform:translateX(-50%); color:#cfd8e3;
              font-size:14px; background:rgba(0,0,0,.35); padding:6px 14px; border-radius:999px; }
/* the picture, and the Goto cards drawn on it as links over their own rectangles */
.shot { position:relative; display:inline-block; max-width:100%; line-height:0; }
.shot .hot { position:absolute; display:block; border-radius:10px; }
.shot .hot:hover, .shot .hot:focus-visible { outline:2px solid #647080; outline-offset:2px;
                                             background:rgba(100,112,128,.08); }
/* …and the same jumps listed under it — reachable by keyboard, and by a reader who never spots the card */
nav.gotos { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0 0; }
nav.gotos .goto { display:inline-flex; align-items:baseline; gap:9px; text-decoration:none;
                  border:1px solid var(--line); border-radius:999px; padding:7px 16px 8px;
                  background:#fff; color:inherit; }
nav.gotos .goto:hover { border-color:#647080; background:#f6f8fb; }
nav.gotos .verb { color:#647080; font-size:13px; font-weight:700; letter-spacing:.06em;
                  text-transform:uppercase; }
nav.gotos .txt { font-size:17px; }
.layout { display:flex; min-height:100vh; }
nav.toc { width:380px; flex:0 0 380px; position:sticky; top:0; height:100vh; overflow-y:auto;
          border-right:1px solid var(--line); padding:36px 26px 60px 32px; background:#fafcfe; }
nav.toc .brand { display:block; padding:4px 12px 2px; text-decoration:none; border-radius:8px; }
nav.toc .brand .wm { font-size:28px; font-weight:900; letter-spacing:-.02em; line-height:1.15; color:var(--navy); }
nav.toc .brand:hover .wm, nav.toc .brand.active .wm { color:var(--blue-dark); }
nav.toc .sub { color:var(--mut); font-size:16px; margin:4px 12px 24px; }
nav.toc ol { list-style:none; margin:0; padding:0; }
nav.toc li { margin:0; }
nav.toc a.row { display:block; padding:7px 12px; border-radius:8px; color:#334155;
                text-decoration:none; font-size:18px; line-height:1.35; }
nav.toc a.row:hover { background:#eef4fb; color:var(--blue-dark); }
nav.toc a.row.active { background:#e3eefb; color:var(--blue-dark); font-weight:700; }
nav.toc a .n { color:var(--blue); font-weight:700; margin-right:8px; }
main { flex:1; min-width:0; container-type:inline-size; }
.page { max-width:1280px; margin:0 auto; padding:48px 60px 130px; }
header.masthead { border-bottom:1px solid var(--line); padding-bottom:30px; margin-bottom:8px; }
header.masthead .t { font-size:53px; font-weight:900; letter-spacing:-.02em; line-height:1.05; color:var(--navy); }
header.masthead .d { color:var(--mut); font-size:18px; margin-top:12px; }
.lede { font-size:24px; color:#334155; margin:1.1em 0 .2em; }
.none { font-size:17px; color:var(--mut); font-style:italic; }
.contents { list-style:none; padding:0; margin:1em 0; display:grid;
            grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:22px; }
.contents li { margin:0; }
.contents a { display:flex; flex-direction:column; height:100%; text-decoration:none; color:inherit;
              border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#fff;
              box-shadow:0 1px 4px rgba(20,38,60,.05); transition:box-shadow .15s, border-color .15s; }
.contents a:hover { border-color:#b5d3ef; box-shadow:0 4px 14px rgba(20,38,60,.1); }
.contents .thumb { height:190px; padding:12px; background:#fbfdff; border-bottom:1px solid var(--line);
                   display:flex; align-items:center; justify-content:center; }
.contents .thumb img { max-width:100%; max-height:100%; object-fit:contain; }
.contents .txt { padding:14px 18px 18px; }
.contents .tt { font-size:20px; font-weight:700; color:var(--navy); line-height:1.3; }
.contents .tt .n { color:var(--blue); margin-right:8px; }
.contents .dd { font-size:16px; color:var(--mut); margin-top:6px; line-height:1.45; display:-webkit-box;
                -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.desc { color:#334155; }
/* A diagram's picture is wider than the text: the page area's full width less 24px each side (up to 1600px),
   centred under the text column. 100cqw is main's width (container-type on main). */
article.diagram figure { --fig-w:min(calc(100cqw - 48px), 1600px); width:var(--fig-w);
                         margin-left:calc((100% - var(--fig-w)) / 2); }
details.source { margin:.2em 0 2em; border:1px solid var(--line); border-radius:12px; background:#fbfdff; }
details.source > summary { cursor:pointer; padding:12px 18px; font-size:18px; font-weight:700; color:var(--navy); }
details.source[open] > summary { border-bottom:1px solid var(--line); }
details.source .body { padding:4px 18px 18px; }
.code-block { margin:14px 0 0; }
.code-block .bar { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px;
                   font-size:16px; font-weight:700; color:#334155; }
.code-block button { font:inherit; font-size:14px; color:var(--blue-dark); background:#fff; cursor:pointer;
                     border:1px solid #cbd5e1; border-radius:8px; padding:3px 12px; }
.code-block button:hover { background:#eef4fb; }
.code-block pre { margin:0; max-height:420px; overflow:auto; background:var(--code-bg); border-radius:8px;
                  padding:12px 14px; font-size:14px; line-height:1.5; }
.code-block pre code { background:none; padding:0; font-size:inherit; }
.figure-code { font-size:15px; color:var(--mut); margin:14px 0 0; }
section.explanation table { border-collapse:collapse; margin:1em 0; font-size:.9em; }
section.explanation th, section.explanation td { border:1px solid var(--line); padding:.35em .7em; }
section.explanation pre { background:var(--code-bg); border-radius:8px; padding:12px 14px; overflow:auto;
                          font-size:15px; }
section.explanation pre code { background:none; padding:0; }
nav.pager { display:flex; justify-content:space-between; gap:20px; margin-top:80px; padding-top:22px;
            border-top:1px solid var(--line); font-size:18px; }
nav.pager a { text-decoration:none; }
/* ── the Showcase's additions (docs/publish-showcase.md clauses 8 and 12); a zip has none of these elements ── */
footer.pub { display:flex; justify-content:space-between; align-items:center; gap:18px; flex-wrap:wrap;
             margin-top:48px; padding-top:18px; border-top:1px solid var(--line); color:var(--mut); font-size:16px; }
footer.pub a { color:var(--blue-dark); }
footer.pub .madewith { display:inline-flex; align-items:center; gap:8px; text-decoration:none; font-weight:700;
                       color:var(--navy); border:1px solid var(--line); border-radius:999px; padding:6px 14px 6px 8px;
                       background:#fff; }
footer.pub .madewith:hover { border-color:#b5d3ef; background:#f6f8fb; }
footer.pub .mark { height:22px; width:auto; }
/* The curtain: present in the markup, shown only when the head script said so BEFORE the first paint, so a
   returning visitor never sees it flash. site.js takes it down after 3 s or on Continue. */
.splash { display:none; position:fixed; inset:0; z-index:100; background:#fff; align-items:center;
          justify-content:center; }
html[data-splash] .splash { display:flex; }
.splash .card { text-align:center; max-width:520px; padding:40px 48px; }
.splash .mark { height:72px; width:auto; }
.splash .t { font-size:34px; font-weight:900; color:var(--navy); letter-spacing:-.02em; margin:18px 0 6px; }
.splash p { color:var(--mut); font-size:18px; margin:0 0 26px; }
.splash .more { display:block; font-size:16px; margin-bottom:22px; }
.splash button { font:700 18px/1 inherit; color:#fff; background:var(--blue-dark); border:0; cursor:pointer;
                 border-radius:10px; padding:14px 30px; }
.splash button:hover { background:var(--blue); }
.splash.out { transition:opacity .3s; opacity:0; }
@media (max-width: 1200px) {
  .layout { display:block; }
  nav.toc { position:static; width:auto; height:auto; border-right:0; border-bottom:1px solid var(--line); }
  .page { padding:36px 28px 80px; }
}
