/* The Codex: /codex and /codex/{slug} (web/templates/fragments/codex/counter; the Codex bake-off r1
   merge, p6 "the counter, polished" + the grafts of .claude/plans/site-v2/03-build/
   codex-bakeoff-r1-result.md §3). Loaded in <head> on every page (a boosted swap never touches
   <head>); every rule is scoped under the counter's root, .cx-lab[data-codex="scene"|"entry"]. CH 3
   and the Codex clipboard page are in station.css (.dk-ch-cdx, .dk-page-codex).
   A kitchen counter in the building: the chalk board on the wall, the cookbooks standing spine-out
   on a wall shelf, the magazines in a two-pocket wire rack, the fridge with notes under magnets and
   the house card, and on the counter a reading stand that holds ONE thing open at a time. The scene
   and an entry share one grid; the shelf, the rack and the board hang on the wall (top-aligned), so
   opening a bigger thing on the stand moves nothing in reach. The root is [data-physical]: a scene
   of physical objects that keeps its geometry under any text direction; text inside the paper
   objects uses logical properties.
   Tokens only (room.css / input.css): no new fonts (the marker stack for chalk and handwriting;
   chalk is a treatment), no new palette families, no third-party URLs. No looping visuals.
   Text colours are flat (no gradient under text): checkers read the layers under the glyphs. */

/* ═══════════════ the counter: /codex and /codex/{slug} ═══════════════ */
.cx-lab:is([data-codex="scene"], [data-codex="entry"]) {
  /* named numbers (DESIGN.md: every number gets a name and a reason) */
  --cx-gap: clamp(16px, 2.2vw, 34px);          /* between the things on the wall */
  --cx-air: clamp(16px, 2.6svh, 30px);         /* wall between the board and the shelf/rack */
  --cx-bk-row: 176px;                          /* a shelf row: the tallest cookbook */
  --cx-plank: 14px;                            /* the shelf plank under each row */
  --cx-slab: 22px;                             /* the counter top's thickness */
  --cx-post: 34px;                             /* the stand's base, from its board to the drawer unit */
  --cx-lip: 26px;                              /* the rack's front bar */
  --cx-band-under: 12px;                       /* how much of a band the issue in front of it covers */
  --cx-pocket-gap: 12px;                       /* between the rack's two pockets */
  --cx-edge: 44px;                             /* a phone: how much of the fridge's door shows beside the shelf */
  --cx-chalk: var(--color-paper);
  --cx-chalk-dim: #c9c6b9;                     /* paper 78% on the slate, flattened: 9:1 */
  --cx-slate: #202720;                         /* screen 52% + steel-lo 48% (precomputed) */
  --cx-cloth: #6f1f17;                         /* the house book's cover */
  --cx-poster: #f6f1e3;                        /* DESIGN.md colors.poster (no CSS token yet) */
  --cx-stamp-green: #1d7a3e;                   /* DESIGN.md colors.stamp-green (no CSS token yet) */
  --cx-enamel: var(--color-polaroid);
  --cx-enamel-lo: #e7e6df;
  --cx-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;   /* the § glyph only, as on CH 3 */

  position: relative;
  z-index: 1;
  display: grid;
  max-width: var(--wallmax);
  margin: 0 auto;
  padding: var(--wall-top) var(--pad) 0;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.95fr) minmax(0, 1fr) minmax(250px, .98fr);
  grid-template-areas:
    "board board board fridge"
    "shelf stand rack  fridge"
    "top   top   top   fridge";
  grid-template-rows: auto auto minmax(150px, 1fr);
  column-gap: var(--cx-gap);
  color: var(--color-ink);
  font: 14px/1.55 var(--font-term);

  & :is(h1, h2, p, ol, ul, figure, blockquote) { margin: 0; }
  & :is(ol, ul) { list-style: none; padding: 0; }
  & a { color: inherit; }
  & .tbd { font-family: var(--font-term); font-size: max(var(--fs-floor, 0px), .85em); }
  & .cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* ── the board: wood frame, slate, chalk; a tray with chalk and the eraser ── */
  & .cx-board {
    grid-area: board;
    position: relative;
    align-self: start;
    margin-bottom: var(--cx-air);
    padding: 13px 13px 22px;
    border-radius: 4px;
    background:
      linear-gradient(135deg, rgba(255, 230, 190, .16), transparent 40%),
      repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 2px, transparent 2px 9px),
      linear-gradient(var(--color-wood-hi), var(--color-wood));
    box-shadow: var(--sh), inset 1px 1px 0 rgba(255, 230, 190, .25), inset -1px -2px 0 rgba(0, 0, 0, .4);
  }
  & .cx-slate {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    align-items: start;
    gap: 12px clamp(24px, 3.4vw, 60px);
    min-height: clamp(150px, 19svh, 196px);
    padding: clamp(16px, 2.2svh, 26px) clamp(18px, 2.4vw, 36px) clamp(18px, 2.4svh, 28px);
    color: var(--cx-chalk);
    background: var(--cx-slate);
    box-shadow: inset 2px 3px 9px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(0, 0, 0, .55);
  }
  /* chalk dust: the eraser's last swipes and a smudge (under the slate's text, never a text colour) */
  & .cx-slate::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse 34% 40% at 74% 46%, rgba(244, 239, 226, .05), transparent 70%),
      radial-gradient(ellipse 20% 26% at 20% 82%, rgba(244, 239, 226, .045), transparent 70%),
      repeating-linear-gradient(172deg, transparent 0 22px, rgba(244, 239, 226, .018) 22px 40px, transparent 40px 70px),
      linear-gradient(170deg, rgba(244, 239, 226, .04), transparent 32%);
  }
  & .cx-board-hd { position: relative; display: flex; flex-direction: column; gap: 6px; }
  & .cx-chalk-h {
    font: 400 clamp(40px, 4vw, 60px)/1 var(--font-marker);
    color: var(--cx-chalk);
    text-shadow: 0 0 1px rgba(244, 239, 226, .8), 1px 1px 0 rgba(244, 239, 226, .18), 0 0 9px rgba(244, 239, 226, .16);
    padding: 0 6px 10px 0;
    background: linear-gradient(97deg, rgba(244, 239, 226, .7), rgba(244, 239, 226, .3) 70%, transparent) 0 100% / 100% 3px no-repeat;
  }
  & .cx-chalk-a {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch);
    text-decoration: none;
  }
  & .cx-chalk-a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
  & .cx-board-q { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 4px; }
  & .cx-chalk-sm {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 .6em;
    font: 700 max(var(--fs-floor, 0px), 11.5px)/1.6 var(--font-term);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--cx-chalk-dim);
  }
  & .cx-chalk-sm time { letter-spacing: .1em; }
  & .cx-chalk-tbd { padding: 0 .4em; border: 1.5px dashed rgba(244, 239, 226, .55); letter-spacing: .06em; }
  & .cx-quote { display: flex; flex-direction: column; gap: 8px; }
  & .cx-quote blockquote p {
    font: 400 clamp(24px, 2.3vw, 36px)/1.22 var(--font-marker);
    color: var(--cx-chalk);
    text-shadow: 0 0 1px rgba(244, 239, 226, .7), 0 0 8px rgba(244, 239, 226, .12);
    max-width: 40ch;
    overflow-wrap: anywhere;
  }
  & .cx-quote.cx-ql blockquote p { font-size: clamp(19px, 1.8vw, 28px); }
  & .cx-quote.cx-qxl blockquote p { font-size: clamp(17px, 1.5vw, 24px); }
  & .cx-quote figcaption { font: 13px/1.5 var(--font-term); color: var(--cx-chalk-dim); letter-spacing: .04em; }
  & .cx-quote cite { font-style: normal; }
  /* no quote is up: [TBD] chalked inside a box the size of a two-line quote, a space kept on the board */
  & .cx-quote-tbd blockquote p {
    display: flex;
    align-items: center;
    max-width: 26ch;
    min-height: 2.44em;
    padding: .1em .5em;
    border: 2px dashed rgba(244, 239, 226, .5);
    border-radius: 3px;
  }
  & .cx-tray {
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 5px;
    height: 11px;
    border-radius: 2px;
    background: linear-gradient(#8c6744, var(--color-wood) 60%, #3f2b1b);
    box-shadow: 0 3px 4px rgba(0, 0, 0, .45);
  }
  & .cx-stick {
    position: absolute;
    bottom: 7px;
    left: 9%;
    width: 36px;
    height: 7px;
    border-radius: 3px;
    background: linear-gradient(#fbfaf5, #d8d2c2);
    transform: rotate(-4deg);
    box-shadow: 1px 2px 2px rgba(0, 0, 0, .35);
  }
  & .cx-stick-2 { left: calc(9% + 46px); width: 18px; transform: rotate(7deg); background: linear-gradient(#f2e27a, #c9bb5e); }
  & .cx-eraser {
    position: absolute;
    bottom: 7px;
    right: 12%;
    width: 66px;
    height: 17px;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(var(--color-wood-hi) 0 58%, #2b2b28 58%);
    box-shadow: 2px 3px 3px rgba(0, 0, 0, .4);
    transform: rotate(1.5deg);
  }

  /* ── tape labels on the objects ── */
  & .cx-tag {
    align-self: flex-start;
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 16px 6px;
    color: var(--color-tape-ink);
    background: var(--color-tape);
    clip-path: polygon(0 8%, 3% 0, 97% 4%, 100% 0, 99% 92%, 100% 100%, 2% 96%, 0 100%);
    transform: rotate(-1.6deg);
    box-shadow: var(--sh-s);
  }
  & .cx-tag-o { font: 700 max(var(--fs-floor, 0px), 12px)/1.3 var(--font-term); letter-spacing: .18em; text-transform: uppercase; }
  & .cx-tag-h { font: 400 max(var(--fs-floor, 0px), 11px)/1.3 var(--font-term); letter-spacing: .04em; color: var(--color-tape-ink); }

  /* ── the cookbooks: standing spine-out on a wall shelf; a plank under every row, a bookend ── */
  & .cx-shelf { grid-area: shelf; align-self: start; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  & .cx-books {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    row-gap: var(--cx-plank);
    column-gap: 3px;
    padding: 0 10px var(--cx-plank) 8px;
    margin: 0 -6px;
    /* each row is --cx-bk-row tall (the tallest book), so the planks fall under every row */
    background:
      repeating-linear-gradient(to bottom,
        transparent 0 var(--cx-bk-row),
        #a37a50 var(--cx-bk-row) calc(var(--cx-bk-row) + 2px),
        var(--color-wood-hi) calc(var(--cx-bk-row) + 2px) calc(var(--cx-bk-row) + 8px),
        var(--color-wood) calc(var(--cx-bk-row) + 8px) calc(var(--cx-bk-row) + 12px),
        #2c1e12 calc(var(--cx-bk-row) + 12px) calc(var(--cx-bk-row) + var(--cx-plank)));
    filter: drop-shadow(3px 7px 6px rgba(0, 0, 0, .45));
  }
  /* a run of books: it wraps to the next plank as a whole (it only breaks itself on a very narrow shelf) */
  & .cx-run { display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: var(--cx-plank); column-gap: 3px; }
  & .cx-run li { display: flex; align-items: flex-end; height: var(--cx-bk-row); }
  /* the bookend: steel, after the last book of the last run (it wraps with it, never alone) */
  & .cx-run:last-child li:last-child { position: relative; margin-right: 18px; }
  & :is(.cx-run:last-child li:last-child, .cx-books-tbd)::after {
    content: "";
    align-self: flex-end;
    width: 9px;
    height: 112px;
    margin-left: 4px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(90deg, var(--color-steel-hi), var(--color-steel) 50%, var(--color-steel-lo));
    box-shadow: -14px 0 0 -5px var(--color-steel-lo);
  }
  & .cx-books-tbd::after { margin-left: 8px; }
  & .cx-run:last-child li:last-child::after { position: absolute; left: calc(100% + 5px); bottom: 0; margin: 0; }
  & .cx-bk {
    --c: var(--color-pen-navy);
    --hb: #c9a64a;                                /* headband and foil */
    --h: 168px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 46px;
    height: var(--h);
    padding: 12px 8px 9px;
    color: var(--color-paper);
    text-decoration: none;
    background: var(--c);
    border-radius: 3px 3px 1px 1px;
    box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25), inset 0 -3px 0 rgba(0, 0, 0, .3), 2px 0 0 rgba(0, 0, 0, .35);
    transition: translate var(--fast) var(--ease);
  }
  /* the cloth's round: light on the left (the lamp), shade on the right; headbands top and bottom */
  & .cx-bk::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, .16), transparent 26%, transparent 70%, rgba(0, 0, 0, .28)),
      linear-gradient(var(--hb) 0 2px, transparent 2px 7px, rgba(0, 0, 0, .2) 7px 8px, transparent 8px calc(100% - 8px), rgba(0, 0, 0, .2) calc(100% - 8px) calc(100% - 7px), transparent calc(100% - 7px) calc(100% - 2px), var(--hb) calc(100% - 2px));
  }
  & .cx-bk-t {
    position: relative;
    flex: 1;
    min-height: 0;
    writing-mode: vertical-rl;
    max-height: calc(var(--h) - 58px);
    font: 700 max(var(--fs-floor, 0px), 12.5px)/1.3 var(--font-term);
    letter-spacing: .04em;
    overflow-wrap: anywhere;
    text-align: start;
  }
  /* the library sticker: the book's number */
  & .cx-bk-no {
    position: relative;
    flex: none;
    min-width: 28px;
    padding: 3px 4px 2px;
    font: 700 max(var(--fs-floor, 0px), 10.5px)/1.2 var(--font-term);
    letter-spacing: .04em;
    text-align: center;
    color: var(--color-ink);
    background: var(--color-polaroid);
    border-radius: 40% / 50%;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .3);
  }
  & a.cx-bk:hover, & a.cx-bk:focus-visible { translate: 0 -10px; }
  & a.cx-bk:hover .cx-bk-t { text-decoration: underline; text-underline-offset: 3px; }
  & .cx-picked { transition: none; translate: none !important; }   /* picked: still, so the flight starts from a known rect */
  /* cloth by the book's place on the whole shelf (cx-c0..7), not by its place in its run */
  & .cx-c1 .cx-bk { --c: var(--color-stamp-red); --h: 176px; }
  & .cx-c2 .cx-bk { --c: var(--cx-stamp-green); --h: 160px; --hb: #e8dcb2; }
  & .cx-c3 .cx-bk { --c: var(--color-label-brown); --h: 172px; --hb: #e8dcb2; }
  & .cx-c4 .cx-bk { --c: var(--color-plastic-dark); --h: 164px; }
  & .cx-c5 .cx-bk { --c: var(--color-pen-blue); --h: 176px; }
  & .cx-c6 .cx-bk { --c: var(--color-wood); --h: 158px; --hb: #e8dcb2; }
  & .cx-c7 .cx-bk { --c: var(--color-steel-lo); --h: 170px; }
  /* paper slips left in some of the books (decoration, no text) */
  & :is(.cx-c0, .cx-c3, .cx-c6, .cx-c1, .cx-c5) a.cx-bk::after {
    content: "";
    position: absolute;
    left: 28%;
    top: -9px;
    width: 9px;
    height: 13px;
    background: var(--color-paper);
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .3);
    transform: rotate(4deg);
    pointer-events: none;
  }
  & :is(.cx-c1, .cx-c5) a.cx-bk::after { left: 56%; height: 11px; background: var(--color-sticky); transform: rotate(-3deg); }
  /* the one [TBD] cookbook: a grey unprinted board cover, leaning on the bookend: the way in */
  & .cx-bk-tbd { --c: var(--color-plastic-lo); --hb: var(--color-plastic); --h: 172px; width: 56px; color: var(--color-ink); transform: rotate(4deg); transform-origin: 100% 100%; margin-right: 6px; align-self: flex-end; }
  & .cx-bk-tbd .cx-bk-t { writing-mode: vertical-rl; }
  /* a book that is open on the stand: its place on the shelf is a gap */
  & .cx-out.cx-bk { background: #161b17; box-shadow: inset 2px 3px 8px rgba(0, 0, 0, .6); outline: 2px dashed rgba(244, 239, 226, .45); outline-offset: -2px; color: var(--cx-chalk-dim); }
  & .cx-out.cx-bk::before { display: none; }
  /* every ghost keeps its object's size (the title is there, unseen), so nothing around it moves */
  & .cx-out :is(.cx-bk-t, .cx-hl, .cx-nt, .cx-nd, .cx-cv) { visibility: hidden; }
  & .cx-out-l {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    font: italic 400 max(var(--fs-floor, 0px), 12.5px)/1.3 var(--font-term);
    letter-spacing: .04em;
    color: var(--cx-chalk-dim);
    text-align: center;
  }
  & .cx-out.cx-bk .cx-out-l { writing-mode: vertical-rl; padding-bottom: 34px; }
  & .cx-front .cx-out.cx-iss .cx-out-l { inset: auto 0 calc(var(--cx-lip) + 10px) 0; }
  & .cx-behind .cx-out.cx-iss .cx-out-l { inset: 4px 10px auto auto; padding: 0; }
  & .cx-out.cx-note .cx-out-l { color: var(--color-ink); top: 30px; align-items: flex-start; }
  & .cx-out .cx-bk-no { background: none; color: var(--cx-chalk-dim); box-shadow: none; }

  /* ── the reading stand: a slanted board on the counter, the open thing, a lip in front ── */
  & .cx-stand {
    grid-area: stand;
    position: relative;
    z-index: 2;                                  /* what is picked up flies over the rest */
    display: flex;
    flex-direction: column;
    min-width: 0;
    container: cxstand / inline-size;
  }
  & .cx-lect {
    position: relative;
    padding: 14px 14px 0;
    background:
      linear-gradient(135deg, rgba(255, 230, 190, .14), transparent 45%),
      repeating-linear-gradient(90deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 11px),
      linear-gradient(var(--color-wood-hi), var(--color-wood));
    border-radius: 6px 6px 0 0;
    box-shadow: var(--sh-s), inset 1px 1px 0 rgba(255, 230, 190, .22);
  }
  /* the stand's short base: a foot on the drawer unit under it */
  & .cx-base {
    position: relative;
    display: block;
    flex: none;
    width: 44px;
    height: var(--cx-post);
    margin: 0 auto;
    background:
      linear-gradient(90deg, rgba(255, 230, 190, .16), transparent 40%, rgba(0, 0, 0, .3)),
      linear-gradient(var(--color-wood), var(--color-wood-hi) 30%, var(--color-wood));
    box-shadow: 4px 0 8px rgba(0, 0, 0, .35);
  }
  & .cx-base::after {
    content: "";
    position: absolute;
    left: -46px;
    right: -46px;
    bottom: 0;
    height: 12px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(#9a714a 0 2px, var(--color-wood-hi) 2px 50%, var(--color-wood));
    box-shadow: 0 -2px 4px rgba(0, 0, 0, .3);
  }
  /* under the stand, down to the counter: a drawer unit standing on it (static furniture, it fills the
     height the wall beside it leaves; with none left it is not there) */
  & .cx-under {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
    margin: 0 4%;
    padding: 6px 6px 0;
    background: linear-gradient(#2c2a25, #22211d);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, .35);
  }
  & .cx-under b {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    max-height: 120px;
    background: linear-gradient(170deg, #3d3a33, #2f2d28);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .06), inset -1px -1px 0 rgba(0, 0, 0, .4);
  }
  & .cx-under b::after {
    content: "";
    position: absolute;
    top: min(16px, 30%);
    left: calc(50% - 22px);
    width: 44px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(var(--color-steel-hi), var(--color-steel-lo));
  }
  & .cx-lip {
    position: relative;
    z-index: 2;
    display: block;
    height: 14px;
    margin: -8px -20px 0;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(#9a714a 0 2px, var(--color-wood-hi) 2px 50%, var(--color-wood));
    box-shadow: 0 -2px 4px rgba(0, 0, 0, .35);
  }
  & .cx-open { position: relative; z-index: 1; }
  /* a thick book lying open: cloth cover round two pages, the gutter, the page edges */
  & .cx-book-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 6px 7px 16px;
    border-radius: 5px;
    background:
      repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .12) 2px 3px) 0 100% / 100% 10px no-repeat,
      var(--cx-cloth);
    box-shadow: var(--sh);
  }
  & .cx-pg {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: clamp(16px, 1.8vw, 28px) clamp(16px, 1.8vw, 28px) clamp(18px, 2vw, 30px);
    color: var(--color-ink);
    background: var(--color-paper);
  }
  & .cx-pg-l { box-shadow: -2px 2px 0 #e6dfcc, -4px 4px 0 #d8d0ba; }
  & .cx-pg-r { box-shadow: 2px 2px 0 #e6dfcc, 4px 4px 0 #d8d0ba; }
  /* the gutter's shade, over the paper's inner edge (never under text: pages keep their padding) */
  & .cx-pg::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14px;
    pointer-events: none;
  }
  & .cx-pg-l::before { right: 0; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .13)); }
  & .cx-pg-r::before { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .15), transparent); }
  & .cx-sect { font: 400 clamp(64px, 6vw, 96px)/.9 var(--cx-serif); color: var(--color-ink-soft); }
  & .cx-kick { font: 700 max(var(--fs-floor, 0px), 11px)/1.5 var(--font-term); letter-spacing: .2em; text-transform: uppercase; color: var(--color-ink-soft); }
  & .cx-contents { display: grid; gap: 4px; }
  & .cx-contents li { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
  & .cx-contents li::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted rgba(29, 35, 32, .45); }
  & .cx-contents b { order: 2; }
  & .cx-first { font: 700 15px/1.5 var(--font-term); padding-top: 10px; border-top: 1px solid rgba(29, 35, 32, .14); }
  & .cx-forth { font: 700 max(var(--fs-floor, 0px), 11px)/1.5 var(--font-term); letter-spacing: .2em; text-transform: uppercase; color: var(--color-ink-soft); }
  & .cx-stampline { margin-top: auto; padding-top: 6px; text-align: end; }
  & .cx-stamp {
    display: inline-block;
    padding: 6px 10px 5px;
    font: 700 max(var(--fs-floor, 0px), 12.5px)/1.2 var(--font-term);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--color-stamp-red);
    border: 3px solid currentColor;
    border-radius: 3px;
    transform: rotate(-4deg);
  }

  /* the open entries */
  & .cx-title { font: 700 clamp(21px, 1.8vw, 30px)/1.15 var(--font-term); overflow-wrap: anywhere; }
  & .cx-dek { font-size: 15px; line-height: 1.5; color: var(--color-ink); }
  & .cx-imprint { display: flex; flex-wrap: wrap; gap: 0 .6em; font: 700 max(var(--fs-floor, 0px), 11px)/1.5 var(--font-term); letter-spacing: .14em; text-transform: uppercase; color: var(--color-ink-soft); }
  & .cx-pl { font: 700 max(var(--fs-floor, 0px), 12px)/1.5 var(--font-term); letter-spacing: .16em; text-transform: uppercase; color: var(--color-ink-soft); margin-top: 6px; }
  & .cx-code { margin: 0; padding: 10px 12px; overflow-x: auto; font: max(var(--fs-floor, 0px), 12.5px)/1.5 var(--font-term); background: rgba(29, 35, 32, .06); border-left: 3px solid rgba(29, 35, 32, .2); }
  & .cx-steps { counter-reset: cxs; display: grid; gap: 10px; }
  & .cx-steps li { counter-increment: cxs; display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 8px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px dashed rgba(29, 35, 32, .18); overflow-wrap: anywhere; }
  & .cx-steps li::before { content: counter(cxs, decimal-leading-zero); font: 700 14px/1 var(--font-term); color: var(--color-stamp-red); }
  & .cx-back { margin-top: auto; padding-top: 10px; text-align: end; }
  & .cx-back-a {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    min-height: var(--touch);
    padding: 0 4px;
    font-weight: 700;
    color: var(--color-pen-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  /* a magazine folded back on the stand: the pages under it, its cover turned under at the edge */
  & .cx-mag {
    --m: var(--color-stamp-red);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-block: 0 6px;
    margin-inline-start: 12px;
    padding: 0 clamp(16px, 2vw, 30px) 16px;
    background: var(--cx-poster);
    box-shadow: var(--sh), -4px 4px 0 0 #e2dac6, -7px 7px 0 0 #d6ccb4, -11px 10px 0 0 var(--m);
    transform: rotate(-.4deg);
  }
  & .cx-mag .cx-title { font-size: clamp(23px, 5.6cqi, 36px); }
  & .cx-cook .cx-title { font-size: clamp(19px, 4.4cqi, 28px); }
  & .cx-mag .cx-dek { font-size: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--color-ink); }
  & .cx-cols { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.6; }
  & .cx-mast-open { margin: 0 calc(-1 * clamp(16px, 2vw, 30px)); padding: 12px clamp(16px, 2vw, 30px) 10px; }
  & .cx-mast-open .cx-logo { font-size: clamp(30px, 3vw, 44px); }
  /* a note held under its magnet */
  & .cx-memo {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 520px;
    margin: 20px auto 16px;
    padding: 36px clamp(18px, 2.4vw, 32px) 14px;
    background: var(--color-sticky);
    color: var(--color-sticky-ink);
    box-shadow: var(--sh-s), 3px 6px 14px rgba(0, 0, 0, .3);
    transform: rotate(-1.2deg);
  }
  & .cx-memo .cx-title { font: 400 clamp(28px, 2.6vw, 40px)/1.15 var(--font-marker); color: var(--color-pen-navy); }
  & .cx-memo :is(.cx-sec, .cx-imprint) { color: var(--color-sticky-ink); }
  & .cx-memo .cx-back-a { color: var(--color-pen-navy); }
  & .cx-memo-b { display: flex; flex-direction: column; gap: 8px; }

  /* ── the magazines: a two-pocket wire rack, dealt like a newsagent's: the front issue of each pocket
        shows its whole cover, the ones behind it their ink-edged top band. The list stays in issue
        order (the tab order); counter.go places each issue in its pocket (--col) and depth (--row). ── */
  & .cx-rack { grid-area: rack; align-self: start; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  & .cx-wire {
    position: relative;
    padding: 14px 10px 0;
    border-top: 4px solid var(--color-steel);
    border-radius: 2px;
    /* the side rails, the divider between the pockets, the mesh (an empty pocket is just this) */
    background:
      linear-gradient(90deg, var(--color-steel) 0 3px, transparent 3px calc(50% - 1.5px), var(--color-steel) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px) calc(100% - 3px), var(--color-steel) calc(100% - 3px)),
      repeating-linear-gradient(0deg, transparent 0 30px, rgba(163, 168, 163, .3) 30px 32px),
      repeating-linear-gradient(90deg, transparent 0 26px, rgba(163, 168, 163, .22) 26px 28px);
  }
  & .cx-issues { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--cx-pocket-gap); align-items: end; }
  & .cx-iss-li { position: relative; z-index: var(--row); grid-column: var(--col); grid-row: var(--row); min-width: 0; container: cxpocket / inline-size; }
  /* a band behind: the issue in front covers its foot, never its words (its padding is deeper than the overlap) */
  & .cx-behind { margin-bottom: calc(-1 * var(--cx-band-under)); }
  & .cx-iss {
    --m: var(--color-stamp-red);
    --r: -.8deg;
    position: relative;
    display: flex;
    flex-direction: column;
    color: var(--color-ink);
    text-decoration: none;
    background:
      linear-gradient(115deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 30%),
      var(--cx-poster);
    box-shadow: 0 -3px 6px rgba(0, 0, 0, .3), 0 1px 0 rgba(0, 0, 0, .12);
    transform: rotate(var(--r));
    transition: translate var(--fast) var(--ease);
  }
  & .cx-iss-li:nth-child(8n+2) .cx-iss { --m: var(--color-pen-blue); --r: .9deg; }
  & .cx-iss-li:nth-child(8n+3) .cx-iss { --m: var(--cx-stamp-green); --r: -.4deg; }
  & .cx-iss-li:nth-child(8n+4) .cx-iss { --m: var(--color-pen-navy); --r: .6deg; }
  & .cx-iss-li:nth-child(8n+5) .cx-iss { --m: var(--color-label-brown); --r: -1deg; }
  & .cx-iss-li:nth-child(8n+6) .cx-iss { --m: var(--color-stamp-red); --r: .3deg; }
  & .cx-iss-li:nth-child(8n+7) .cx-iss { --m: var(--color-pen-blue); --r: -.6deg; }
  & .cx-iss-li:nth-child(8n+8) .cx-iss { --m: var(--cx-stamp-green); --r: .7deg; }
  & a.cx-iss:hover, & a.cx-iss:focus-visible { translate: 0 -6px; }
  & a.cx-iss:hover .cx-hl { text-decoration: underline; text-underline-offset: 3px; }
  & .cx-behind .cx-iss { padding: 6px 10px calc(var(--cx-band-under) + 6px); border-top: 6px solid var(--m); }
  & .cx-behind a.cx-iss:hover .cx-logo { text-decoration: underline; text-underline-offset: 3px; }
  & .cx-mast {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 1ch;
    font: 700 max(var(--fs-floor, 0px), 10.5px)/1.3 var(--font-term);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-ink);
  }
  /* the masthead: the section's name set big and tight in the issue's ink */
  & .cx-logo {
    margin-right: auto;
    font: 800 17px/1 var(--font-term);
    letter-spacing: -.02em;
    text-transform: uppercase;
    color: var(--m, var(--color-stamp-red));
  }
  & .cx-ino { white-space: nowrap; }
  & .cx-idate { color: var(--color-ink-soft); letter-spacing: .06em; }
  /* the front issue: its whole cover, above the rack's front bar */
  & .cx-front .cx-iss {
    gap: 8px;
    min-height: clamp(210px, 26svh, 280px);
    padding: 10px clamp(10px, 1vw, 16px) calc(var(--cx-lip) + 10px);
    box-shadow: 0 -3px 8px rgba(0, 0, 0, .3), 3px 6px 10px rgba(0, 0, 0, .35);
  }
  & .cx-front .cx-mast { padding-bottom: 6px; border-bottom: 3px solid var(--m); }
  & .cx-front .cx-logo { flex-basis: 100%; font-size: clamp(18px, 22cqi, 36px); line-height: .95; }
  & .cx-hl { display: block; font: 700 clamp(14px, 1.1vw, 16.5px)/1.25 var(--font-term); overflow-wrap: anywhere; }
  & .cx-cv { position: relative; display: flex; flex-direction: column; gap: 8px; font-size: max(var(--fs-floor, 0px), 12.5px); line-height: 1.45; }
  & .cx-dk { color: var(--color-ink-soft); overflow-wrap: anywhere; }
  /* the cover picture: a halftone block in the issue's ink (print furniture, no picture of anything) */
  & .cx-art {
    display: block;
    height: 54px;
    border: 1px solid rgba(29, 35, 32, .15);
    background:
      radial-gradient(circle at 50% 50%, var(--m, var(--color-stamp-red)) 0 1.3px, transparent 1.6px) 0 0 / 6px 6px,
      linear-gradient(120deg, rgba(255, 255, 255, .6), transparent 60%),
      color-mix(in srgb, var(--m, var(--color-stamp-red)) 16%, var(--cx-poster));
  }
  /* the rack's front bar, across the foot of the front covers */
  & .cx-bar {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--cx-lip);
    pointer-events: none;
    background: linear-gradient(var(--color-steel-hi) 0 3px, transparent 3px 11px, var(--color-steel) 11px 14px, transparent 14px 20px, var(--color-steel-lo) 20px);
    border-radius: 0 0 3px 3px;
    filter: drop-shadow(1px 3px 2px rgba(0, 0, 0, .45));
  }
  & .cx-iss-tbd { --r: -.6deg; }
  & .cx-iss-tbd .cx-logo { color: var(--color-ink-soft); }
  & .cx-iss-tbd .cx-art { background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(29, 35, 32, .08) 7px 8px), var(--cx-poster); }
  & .cx-iss-tbd .cx-mast { border-bottom-color: rgba(29, 35, 32, .3); }
  & .cx-out.cx-iss { background: #161b17; box-shadow: inset 2px 3px 8px rgba(0, 0, 0, .6); outline: 2px dashed rgba(244, 239, 226, .45); outline-offset: -2px; }
  & .cx-out .cx-mast { border-bottom-color: rgba(244, 239, 226, .3); }
  & .cx-out :is(.cx-logo, .cx-ino, .cx-idate) { color: var(--cx-chalk-dim); }
  & .cx-behind .cx-out .cx-mast { visibility: hidden; }

  /* ── the fridge: enamel, freezer above, notes under magnets on the door, a kick grille ── */
  & .cx-fridge {
    grid-area: fridge;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 10px 10px 0;
    border-radius: 20px 20px 4px 4px;
    background: linear-gradient(100deg, var(--cx-enamel) 30%, var(--cx-enamel-lo));
    box-shadow: var(--sh), inset 2px 2px 0 rgba(255, 255, 255, .7), inset -3px -2px 0 rgba(0, 0, 0, .14);
  }
  & .cx-freezer, & .cx-door {
    position: relative;
    padding: 18px 34px 18px 12px;
    border-radius: 14px 14px 6px 6px;
    background: linear-gradient(160deg, #fff 0%, var(--cx-enamel) 35%, var(--cx-enamel-lo));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 2px 3px rgba(0, 0, 0, .18);
  }
  & .cx-freezer { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-height: 104px; padding-bottom: 46px; }
  /* spare magnets on the freezer door: hardware waiting for notes */
  & .cx-spare { position: absolute; right: 38px; bottom: 14px; display: flex; gap: 8px; }
  /* the house card: the desk page's lead, typed on a ruled index card under a magnet */
  & .cx-card {
    position: relative;
    align-self: stretch;
    padding: 22px 14px 14px;
    color: var(--color-ink);
    font: max(var(--fs-floor, 0px), 12.5px)/20px var(--font-term);
    text-align: start;
    background:
      linear-gradient(transparent 0 15px, rgba(191, 53, 39, .45) 15px 16px, transparent 16px),
      repeating-linear-gradient(transparent 0 19px, rgba(31, 76, 156, .12) 19px 20px) 0 22px,
      var(--color-polaroid);
    box-shadow: var(--sh-s);
    transform: rotate(-1.1deg);
  }
  & .cx-card-mag { --mg: var(--pin-green); }
  & .cx-card-l { margin-block-end: 6px; font-weight: 700; }
  & .cx-card .cx-stampline { margin-block-start: 8px; }
  & .cx-spare b {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), transparent 42%), var(--pin-yellow);
    box-shadow: 1px 3px 3px rgba(0, 0, 0, .4), inset 0 -2px 0 rgba(0, 0, 0, .2);
  }
  & .cx-spare b:nth-child(2) { background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), transparent 42%), var(--pin-green); translate: 0 9px; }
  & .cx-spare b:nth-child(3) { background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), transparent 42%), var(--pin-red); translate: 0 -3px; }
  & .cx-door { flex: 1; container: cxdoor / inline-size; padding-top: 28px; padding-bottom: 30px; border-radius: 6px 6px 4px 4px; }
  & .cx-handle {
    position: absolute;
    right: 12px;
    top: 18px;
    width: 10px;
    height: min(140px, calc(100% - 36px));
    border-radius: 5px;
    background: linear-gradient(90deg, var(--color-steel-hi), var(--color-steel) 60%, var(--color-steel-lo));
    box-shadow: 2px 3px 4px rgba(0, 0, 0, .35);
  }
  & .cx-door .cx-handle { top: 22px; height: min(180px, calc(100% - 44px)); }
  & .cx-grille {
    display: block;
    height: 26px;
    margin: 4px 6px 0;
    border-radius: 3px 3px 0 0;
    background:
      repeating-linear-gradient(90deg, transparent 0 6px, rgba(0, 0, 0, .55) 6px 9px),
      linear-gradient(#5c5d57, #3a3b37);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, .45);
  }
  & .cx-notes { display: flex; flex-wrap: wrap; gap: 22px 12px; }
  & .cx-notes li { flex: 1 1 calc(50% - 12px); min-width: 0; max-width: 100%; display: flex; }
  & .cx-note {
    --n: var(--color-paper);
    --mg: var(--pin-red);
    --r: -2deg;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 72px;
    padding: 18px 10px 10px;
    color: var(--color-ink);
    text-decoration: none;
    background: var(--n);
    box-shadow: 2px 4px 6px rgba(0, 0, 0, .28);
    transform: rotate(var(--r));
    transition: translate var(--fast) var(--ease);
  }
  & .cx-notes li:nth-child(4n+2) .cx-note { --n: var(--color-sticky); --mg: var(--pin-blue); --r: 2.4deg; }
  & .cx-notes li:nth-child(4n+3) .cx-note { --n: var(--color-polaroid); --mg: var(--pin-green); --r: 1.2deg; }
  & .cx-notes li:nth-child(4n+4) .cx-note { --n: var(--color-tape); --mg: var(--pin-yellow); --r: -1.4deg; }
  & a.cx-note:hover, & a.cx-note:focus-visible { translate: 0 -4px; }
  & a.cx-note:hover .cx-nt { text-decoration: underline; text-underline-offset: 3px; }
  & .cx-magnet {
    position: absolute;
    top: -10px;
    left: calc(50% - 11px);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), transparent 42%), var(--mg, var(--pin-red));
    box-shadow: 1px 3px 3px rgba(0, 0, 0, .45), inset 0 -2px 0 rgba(0, 0, 0, .2);
  }
  & .cx-magnet-big { top: -15px; left: calc(50% - 17px); width: 34px; height: 34px; --mg: var(--pin-blue); }
  & .cx-sec { font: 700 max(var(--fs-floor, 0px), 10.5px)/1.3 var(--font-term); letter-spacing: .12em; color: var(--color-ink); }
  & .cx-nt { font: 400 19px/1.15 var(--font-marker); color: var(--color-pen-navy); overflow-wrap: anywhere; }
  & .cx-nd { font: max(var(--fs-floor, 0px), 12px)/1.35 var(--font-term); color: var(--color-ink); }
  & .cx-note-tbd { --r: -1.6deg; min-height: 92px; max-width: 220px; }
  & .cx-note-tbd .cx-nt { font: inherit; margin-top: 4px; }
  & .cx-out.cx-note { background: none; box-shadow: none; outline: 2px dashed rgba(29, 35, 32, .3); outline-offset: -2px; }
  & .cx-out.cx-note :is(.cx-sec, .cx-nt) { color: var(--color-ink); }

  /* ── a phone: the fridge's door edge beside the shelf (enamel, handle, a note's corner under its
        magnet), so the first screen shows all four kinds; decoration only ── */
  & .cx-edge {
    grid-area: edge;
    position: relative;
    display: none;
    align-self: stretch;
    margin-inline-end: calc(-1 * var(--pad));
    border-radius: 16px 0 0 16px;
    background: linear-gradient(100deg, #fff 0%, var(--cx-enamel) 30%, var(--cx-enamel-lo));
    box-shadow: var(--sh), inset 2px 2px 0 rgba(255, 255, 255, .7);
  }
  & .cx-edge b { position: absolute; display: block; }
  & .cx-edge-h { left: 10px; top: 22px; width: 9px; height: min(150px, 60%); border-radius: 5px; background: linear-gradient(90deg, var(--color-steel-hi), var(--color-steel) 60%, var(--color-steel-lo)); box-shadow: 2px 3px 4px rgba(0, 0, 0, .35); }
  & .cx-edge-n { left: 26px; top: 44px; right: 0; height: 64px; background: var(--color-paper); box-shadow: 2px 4px 6px rgba(0, 0, 0, .28); transform: rotate(-2deg); }
  & .cx-edge-m { left: 30px; top: 34px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), transparent 42%), var(--pin-red); box-shadow: 1px 3px 3px rgba(0, 0, 0, .45), inset 0 -2px 0 rgba(0, 0, 0, .2); }

  /* ── the counter top and the cabinet under it ── */
  & .cx-top { grid-area: top; position: relative; display: flex; flex-direction: column; margin-left: calc(-1 * var(--pad)); }
  & .cx-slab {
    display: block;
    height: var(--cx-slab);
    background:
      radial-gradient(ellipse 40% 160% at 30% 0%, rgba(255, 222, 160, .2), transparent 80%),
      linear-gradient(#a37a50 0 2px, var(--color-wood-hi) 2px 55%, var(--color-wood));
    box-shadow: 0 10px 18px rgba(0, 0, 0, .55);
    border-radius: 0 3px 3px 0;
    position: relative;
    z-index: 1;
  }
  & .cx-cab {
    flex: 1;
    display: flex;
    gap: 6px;
    min-height: 128px;
    margin: 0 10px 0 0;
    padding: 10px 10px 0;
    background: linear-gradient(#2c2a25, #22211d);
  }
  & .cx-cab b {
    position: relative;
    flex: 1;
    background: linear-gradient(170deg, #3d3a33, #2f2d28);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .06), inset -1px -1px 0 rgba(0, 0, 0, .4);
  }
  & .cx-cab b::after {
    content: "";
    position: absolute;
    top: 16px;
    left: calc(50% - 22px);
    width: 44px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(var(--color-steel-hi), var(--color-steel-lo));
  }

  /* ── tablets: the board; the shelf beside the rack; the stand; the fridge ── */
  @media (max-width: 1099.98px) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "board board"
      "shelf rack"
      "stand stand"
      "fridge fridge";
    grid-template-rows: none;
    row-gap: 30px;
    padding-bottom: 40px;

    & .cx-board { margin-bottom: 0; }
    & .cx-top, & .cx-base, & .cx-under { display: none; }
    & .cx-fridge { border-radius: 20px 20px 6px 6px; }
    & .cx-freezer { min-height: 0; }
    & .cx-notes li { flex-basis: calc(33.333% - 12px); }
  }
  /* ── phones: one column ── */
  @media (max-width: 760px) {
    grid-template-columns: minmax(0, 1fr) var(--cx-edge);
    grid-template-areas: "board board" "shelf edge" "rack rack" "stand stand" "fridge fridge";
    row-gap: 26px;
    column-gap: 14px;

    & .cx-edge { display: block; }

    & .cx-slate { grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; }
    & .cx-board-hd { flex-direction: row; align-items: baseline; }
    & .cx-chalk-h { font-size: 40px; padding-bottom: 6px; }
    & .cx-quote blockquote p { font-size: 23px; }
    & .cx-quote.cx-ql blockquote p { font-size: 18px; line-height: 1.2; }
    & .cx-quote.cx-qxl blockquote p { font-size: 16px; line-height: 1.2; }
    & .cx-notes li { flex-basis: calc(50% - 12px); }
    & .cx-chalk-h { padding-bottom: 4px; }
  }
  @media (max-width: 360px) {
    row-gap: 20px;
    & .cx-slate { padding: 12px 14px 14px; gap: 6px; }
    & .cx-chalk-h { font-size: 34px; }
    & .cx-chalk-sm { font-size: max(var(--fs-floor, 0px), 10px); letter-spacing: .08em; }
    & .cx-board-q { gap: 6px; padding-top: 0; }
    & .cx-board { padding-bottom: 20px; }
    & .cx-shelf { gap: 10px; }
    & .cx-notes li { flex-basis: 100%; }
    & .cx-quote:not(.cx-ql, .cx-qxl) blockquote p { font-size: 21px; }
  }
}

/* the open book on a narrow stand: its pages one above the other */
@container cxstand (max-width: 439.98px) {
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) .cx-book-open { grid-template-columns: minmax(0, 1fr); }
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) :is(.cx-pg-l, .cx-pg-r) { box-shadow: -2px 2px 0 #e6dfcc; }
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) .cx-pg-l::before { top: auto; left: 0; right: 0; width: auto; height: 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .1)); }
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) .cx-pg-r::before { bottom: auto; left: 0; right: 0; width: auto; height: 10px; background: linear-gradient(rgba(0, 0, 0, .12), transparent); }
  .cx-lab[data-codex="scene"] .cx-pg-l { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; }
  .cx-lab[data-codex="scene"] .cx-sect { font-size: 56px; }
}
@container cxdoor (max-width: 230px) {
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) .cx-notes li { flex-basis: 100%; }
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) .cx-notes li:nth-child(even) { padding-inline-start: 14%; }
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) .cx-notes li:nth-child(odd) { padding-inline-end: 10%; }
}
@container cxstand (min-width: 620px) {
  .cx-lab[data-codex="entry"] .cx-cols { display: block; column-count: 2; column-gap: 28px; }
  .cx-lab[data-codex="entry"] .cx-cols > * { break-inside: avoid; margin-bottom: 10px; }
}

/* ── an entry: the open thing leads on tablets and phones ── */
.cx-lab[data-codex="entry"] {
  @media (max-width: 1099.98px) {
    grid-template-areas:
      "stand stand"
      "board board"
      "shelf rack"
      "fridge fridge";
  }
  @media (max-width: 760px) {
    grid-template-areas: "stand stand" "board board" "shelf edge" "rack rack" "fridge fridge";
  }
}

@media (prefers-reduced-motion: reduce) {
  .cx-lab:is([data-codex="scene"], [data-codex="entry"]) :is(.cx-bk, .cx-iss, .cx-note) { transition: none; }
}
