/* ---------- side view (section 19) ----------
   One camera drives every layer: #world is the open canvas carried into 3D, #depth holds a card per board, #lat draws
   the flight's lattice and the side grid, #depthBg the map's links. */
#world { transform-origin: 0 0; }
#objs .obj.board.nb { visibility: hidden; }      /* their 3D cards take over at identical pixels (placeWorld: a class on each board,
                                                   never a rule on #world over them all: 35 to 47 ms a toggle in Firefox and Chromium) */
#canvas.dots-off { background-image: none; }                /* the lattice (#lat) draws the grid in 3D */
#depthBg, #lat { position: absolute; left: 0; top: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#zax { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }        /* the zoom layer's dots and axes, drawn in screen px */
#depth { position: absolute; inset: 0; z-index: 3; }
.dv-ghost { position: absolute; inset: 0; z-index: 5; pointer-events: none; }      /* reduced motion's still picture (ghostSide): over the canvas's scene and the canvas in front (4) */
/* Nothing in the side view is text to select: a press there picks, carries or opens a board, and Firefox (Zen) painted
   every name it crossed blue (Axio, 2026-10-12). A board's name being typed is text. (The canvas under it is inert
   while the side view is up, prepareSide, which stops a selection in it too: Firefox 157, Chromium 141, WebKitGTK;
   a rule on body.dv over #world's every descendant restyled them all at each toggle, 40 ms in Chromium on Axio's
   Compass.) */
#depth { user-select: none; -webkit-user-select: none; }
#depth .ed { user-select: text; -webkit-user-select: text; }
.dv-ghost > canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
/* While a flight runs nothing in the side view takes the pointer: this bare sheet over it does (section 19c). */
#dvShield { position: absolute; inset: 0; z-index: 9; }
#cards, #cols { position: absolute; inset: 0; pointer-events: none; }
#cards { isolation: isolate; }
#cols { z-index: -1; }          /* depth labels sit under the cards */
body.dv-map #cols { z-index: 2; }
/* The map's + beside the board under the pointer: a board inside it (section 19m). */
#mapAdd {
  position: absolute; left: 0; top: 0; z-index: 3; width: 22px; height: 22px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font: 400 16px/1 var(--f-ui); color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule-2); box-shadow: var(--raise-sm); cursor: pointer;
}
#mapAdd:hover { color: var(--ink); border-color: var(--ink-3); }
#mapAdd:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }      /* ...but on the map (section 19m) they stand along the bottom, over what passes under them */
#depth > #gl { z-index: 2; }
/* The stack (section 19n): the canvas it stood on, left behind as a board opens; an icon board's name over its canvas,
   once its canvas is a layer of its own. */
/* The turn's lock (section 12e): a light up the Z axis, over its line, moved by the compositor alone (turnLight). Its
   head, the element's right end, is a bead of white in the axis's colour; its streak trails it along the line, lighter
   than the line so it shows on it. On a layer of its own, drawn once and see-through at rest: starting and ending it
   lays out and paints nothing. */
#tnLight { position: absolute; left: 0; top: 0; width: 52px; height: 3px; border-radius: 1.5px; opacity: 0;
  transform-origin: 0 0; will-change: transform, opacity; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9)); }
#tnLight::after { content: ''; position: absolute; right: -3.5px; top: -2px; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1.5px var(--z), 0 0 10px 3px var(--z); }
/* While the stack moves, its layers and the canvas under them are pictures moved by the GPU (section 19o): the layers'
   scene where the layers are, under the lines; the canvas's over everything, as the canvas is (body.stk-front). */
#stkGl, #gndGl, #axGl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#gndGl { z-index: 4; }
#axGl { z-index: 0; }           /* the main axes, where #depthBg has them (it comes after it) */
#stkHand { position: fixed; inset: 0; z-index: 2147483000; cursor: grabbing; touch-action: none; user-select: none; -webkit-user-select: none; }
body.stk-front #world { z-index: 4; pointer-events: none; }     /* nearer than every layer, and never in the hand's way */
.stk-gnd { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; transform-origin: 0 0; pointer-events: none; }
.stk-objs { position: absolute; inset: 0; transform-origin: 0 0; }
/* An icon board's body as its picture's parts are cut from it (zpCard, section 19p), read only by the body's own parts.
   Registered as not inherited, so they never reach the canvas inside it. */
@property --tk { syntax: "<number>"; inherits: false; initial-value: 1; }       /* the tile */
@property --gk { syntax: "<number>"; inherits: false; initial-value: 1; }       /* its glyph */
@property --nk { syntax: "<number>"; inherits: false; initial-value: 0; }       /* the layer's name */
@property --stf { syntax: "<length>"; inherits: false; initial-value: 14px; }   /* ...and its size */
#cards > * > .obj.c3 > .binner > .stk-t {
  --nk: inherit; --stf: inherit;
  position: absolute; left: .1em; bottom: calc(100% + .3em); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 var(--stf)/1.25 var(--f-display); letter-spacing: -.005em; color: var(--ink); opacity: var(--nk); pointer-events: none;
}
.c3 { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: auto; }
/* Each card sits in a bare box that carries what changes every frame (its quad, opacity, order): restyling a box
   that no rule matches is cheap, restyling the card itself (every board rule matches it) is not. Same pixels. */
#cards > .cw { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
/* A board's box: empty, its picture drawn by the GPU under it (section 19p). Only where the picture shows the board (its
   card, or an icon's tile with its name over it: itHit) takes a press; the rest lets it through to a board behind or
   the canvas. */
#cards > * > .c3.c3k { pointer-events: none; outline: none; }
.c3k > .c3h { position: absolute; pointer-events: auto; cursor: pointer; border-radius: 6px; }
.c3k:focus-visible > .c3h { outline: 2px solid var(--ink); outline-offset: 4px; }
/* A card: header and body paint themselves, so the body can fade alone while its children lift off it. */
.obj.c3 { cursor: pointer; outline: none; background: transparent; }
.c3 > * { transition: none; }
.c3 > .bhead { position: relative; background: var(--surface); border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; }
.c3 > .bhead > .bt { visibility: hidden; }
.c3 > .binner { background-image: none; }
.mdots, .pdots {
  position: absolute; pointer-events: none;
  background-image: radial-gradient(var(--dot-ink) var(--dot-r), transparent calc(var(--dot-r) + .3px)); background-size: 24px 24px; background-position: 12px 12px;
}
.pdots { inset: 0; }       /* the parent's screen grid, as the flat card shows it (background-attachment: fixed) */
/* Side title: one element that grows from the flat 14px title to a legible size as the card shrinks. */
.bt2 {
  position: absolute; left: 37px; top: 0; height: 100%; max-width: calc(100% - 51px); display: flex; align-items: center;
  transform-origin: 0 50%; font: 600 14px/1.428571 var(--f-ui); white-space: nowrap; color: var(--ink);
}
.bt2 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bt2 > .bt2t { overflow: visible; min-width: 1em; cursor: text; }
.obj.c3:focus-within { border-color: var(--rule); box-shadow: var(--shadow-rest); }
.obj.c3.sharp { box-shadow: var(--shadow-lift); }       /* lifted off its plane (cardSharp) */
@media (hover: hover) { :where(#depth.rest) .obj.c3.sharp:hover { border-color: var(--rule-2); box-shadow: var(--shadow-lift), 0 0 0 4px var(--halo); } }
#cards > * > .obj.c3:focus-visible { border-color: var(--ink); box-shadow: var(--shadow-lift), 0 0 0 3px var(--halo); }
#cards > * > .obj.c3.msel { outline: 1.25px solid var(--sel); outline-offset: 4px; }     /* selected on the map (19m) */
#cards > * > .obj.c3.msel[data-view="icon"] { outline: 0; }
#cards > * > .obj.c3.msel[data-view="icon"] > .binner { outline: 1.25px solid var(--sel); outline-offset: 4px; }
#mapMarq { position: absolute; left: 0; top: 0; z-index: 3; }
#cards > * > .obj.c3.target { border-color: var(--c-board); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c-board) 22%, transparent); }
#cards > * > .obj.c3.naming { border-color: var(--ink-3); box-shadow: var(--shadow-lift), 0 0 0 3px var(--halo); cursor: default; }
/* An icon board in the side view: its tile and its name, as its canvas shows them (section 19c). The card's frame and
   rings move onto the tile; its name grows from its top (bt2Size). While a flight opens or leaves it (.im), the tile
   changes shape around the board's miniature, its face (tk) and glyph (gk) fading in. */
#cards > * > .obj.c3[data-view="icon"] { border-color: transparent !important; box-shadow: none !important; }
#cards > * > .obj.c3[data-view="icon"] > .bhead { transform-origin: 50% 0; }
#cards > * > .obj.c3[data-view="icon"] > .bhead > .bt { visibility: visible; }
#cards > * > .obj.c3[data-view="icon"] .bt[data-ph]:empty::before { content: attr(data-ph); color: var(--ink-3); pointer-events: none; }
#cards > * > .obj.c3[data-view="icon"] .bt.bt2t { cursor: text; }
#cards > * > .obj.c3[data-view="icon"]:focus-visible > .binner { outline: 2px solid var(--ink); outline-offset: 4px; }
#cards > * > .obj.c3[data-view="icon"].naming > .binner { outline: 1.5px solid var(--ink-3); outline-offset: 4px; }
#cards > * > .obj.c3[data-view="icon"].target > .binner { scale: 1.1; box-shadow: var(--raise), var(--edge); outline: 1.5px solid var(--c-board); outline-offset: 5px; }
/* On the map a tile grows into its ring as a board carried near it would go in, and the origin (the top level) swells
   in the depth colour (section 19m) */
body.dv-map #cards > * > .obj.c3[data-view="icon"] > .binner { transition: scale 180ms cubic-bezier(.2,.8,.2,1); }
#cards > * > .c3.org.target::before { scale: 1.4; background: var(--c-board); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-board) 22%, transparent); }
/* (square once it is a layer, where it keeps room about what is on it: zpCard) */
#cards > * > .obj.c3[data-view="icon"] > .binner > .tmini { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; visibility: hidden; }
#cards > * > .obj.c3.im > .binner { overflow: visible; background: none; box-shadow: none; translate: none; }
/* A layer's name sits inside its body's box, in a clear band over the face (the face, its canvas and its glyph keep to
   the padding box, where zpCard puts them), so its picture's parts are cut from the body's box (section 19p). */
#cards > * > .obj.c3.im > .binner { box-sizing: content-box; border-top: calc(var(--stf) * 1.6) solid transparent; margin-top: calc(var(--stf) * -1.6); }
#cards > * > .obj.c3.im > .binner > .tmini { visibility: inherit; }
/* A face fades by its colours, not by an opacity: its shadows are --raise-sm and --edge in parts (--fc-*, tokens.css),
   each colour faded by --tk (a picture's face is whole: zpFill). */
#cards > * > .obj.c3.im > .binner::before {
  --tk: inherit; --fk: calc(var(--tk) * 100%); content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: color-mix(in srgb, var(--surface) var(--fk), transparent);
  box-shadow: var(--fc-hi) color-mix(in srgb, var(--fc-hi-c) var(--fk), transparent), 2px 3px 6px color-mix(in srgb, var(--fc-lo-c) var(--fk), transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--fc-rim) var(--fk), transparent);
}
#cards > * > .obj.c3.im[data-color] > .binner::before { --fc-rim: var(--rim-c); background: color-mix(in srgb, var(--k-f) var(--fk), transparent); }
#cards > * > .obj.c3.im > .binner::after { --gk: inherit; inset: auto; left: 50%; top: 50%; width: 30px; height: 30px; translate: -50% -50%; opacity: var(--gk); z-index: 1; }
/* The root in the side view: the main origin as a point, named Origin under it (section 19c). */
#cards > * > .c3.org { cursor: pointer; outline: none; border-radius: 50%; }
#cards > * > .c3.org::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ink) 9%, transparent);
  transition: scale 200ms cubic-bezier(.2,.8,.2,1);
}
#cards > * > .c3.org > .org-lab {
  position: absolute; left: 50%; top: calc(50% + 17px); translate: -50% 0; white-space: nowrap; pointer-events: none;
  font: 500 10px/12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
@media (hover: hover) { :where(#depth.rest) #cards > * > .c3.org.sharp:hover::before { scale: 1.2; } }
#cards > * > .c3.org:focus-visible::before { box-shadow: 0 0 0 3px var(--canvas), 0 0 0 5px var(--ink); }
.col {     /* a depth's name: in the depth colour (section 25) */
  position: absolute; left: 0; top: 0; translate: -50% 0; white-space: nowrap;
  font: 500 10px/14px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--z);
  background: var(--canvas); padding: 0 6px; border-radius: 3px;    /* the main Y axis passes behind the name */
}
/* Under the bar whenever the side view is up, so cards passing beneath never collide with the crumbs. */
#band {
  position: fixed; left: 0; right: 0; top: 0; z-index: 9; height: calc(env(safe-area-inset-top, 0px) + 52px); pointer-events: none;
  background: linear-gradient(var(--canvas) 55%, color-mix(in srgb, var(--canvas) 0%, transparent)); opacity: 0;
  transition: opacity 160ms ease-out;
}
body.dv #band { opacity: 1; }
/* Where the pointer is in CoordXYZ, in axis units: bottom left, while the mouse moves over the canvas (flat view). */
#coords {     /* on a chip of the canvas, so an axis pinned along the bottom edge never shows its figures through it */
  position: fixed; left: calc(env(safe-area-inset-left, 0px) + 11px); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); z-index: 9;
  padding: 2px 7px; border-radius: 5px; background: var(--canvas);
  font: 500 10px/14px var(--f-mono); letter-spacing: .08em; color: var(--ink-q); white-space: pre; pointer-events: none; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 600ms ease-out;
}
#coords.on { opacity: 1; transition-duration: 120ms; }
#coords .z { color: var(--z); }      /* Z, the depth: in the depth colour (section 25) */
body.dv #coords, body.drawing #coords { opacity: 0; }
@media (max-width: 1260px), (pointer: coarse) { #coords { display: none; } }      /* narrower, the shapes strip reaches it (WebKit sets its words a little wider) */
#guide.dv-off, #empty.dv-off { opacity: 0; visibility: hidden; transition: opacity 160ms ease-out, visibility 0s linear 160ms; }   /* (the side view up: landClass) */
/* The last moments of a flight back (.dv-land) already bring the shapes strip and the empty state back, so the
   landing never ends on a pop; the bar's buttons fade in whenever they reappear. */
@keyframes chrome-in { from { opacity: 0; } }
.dock > .btn { animation: chrome-in 160ms ease-out; }
.crumb.mode { font-style: italic; color: var(--ink-q); }
/* The toggle: its two labels share one cell, so it never changes width (or moves what is beside it). */
.sbtn { display: flex; align-items: center; gap: 7px; padding: 0 6px 0 8px; }
.sbtn .sl { display: grid; }
.sbtn .sl > span { grid-area: 1 / 1; }
.sbtn .s-off, .sbtn[aria-pressed="true"] .s-on { visibility: hidden; }
.sbtn[aria-pressed="true"] .s-off { visibility: visible; }
.sbtn[aria-pressed="true"] { color: var(--ink); }
.sbtn kbd {     /* a key cap drawn in hairline, its lower edge heavier: a key to press, not a menu's chevron */
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px 1px; box-sizing: border-box; border-radius: 3px;
  font: 500 9.5px/1 var(--f-mono); color: var(--ink-q); background: transparent;
  border: 1px solid var(--rule-2); border-bottom-width: 2px;
}
@media (max-width: 480px), (pointer: coarse) { .sbtn kbd { display: none; } .sbtn { padding: 0 8px; } }
/* A phone: "Side" / "Flat", so the path keeps its room; the full name stays the button's accessible name. */
.sbtn .s-p { display: none; }
@media (max-width: 480px) { .sbtn .s-w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .sbtn .s-p { display: inline; } }
/* Night and Axes: a glyph and a name; on a phone the glyph alone, the name stays the accessible name. */
.lbtn, .abtn, .gbtn { display: flex; align-items: center; gap: 6px; }
.lbtn svg, .abtn svg, .gbtn svg { flex: none; width: 14px; height: 14px; overflow: visible; }
.gbtn svg path { fill: none; stroke: currentColor; stroke-width: 1.3px; stroke-linecap: round; stroke-linejoin: round; }
.lbtn:not([data-mode="night"]) .lk-n, .lbtn:not([data-mode="day"]) .lk-d, .lbtn:not([data-mode="auto"]) .lk-a { display: none; }
.lbtn .l-w { min-width: 2.6em; text-align: left; }      /* Night, Day and Auto take the same room: the dock never shifts */
@media (max-width: 480px) { .lbtn, .abtn, .gbtn { padding: 0 7px; } :is(.lbtn, .abtn, .gbtn) .l-w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
/* The axes glyph says which of the three it is: drawn, faint (dashed and pale), or struck through. */
.abtn svg path { fill: none; stroke: currentColor; stroke-width: 1.3px; stroke-linecap: round; stroke-linejoin: round; transition: opacity 160ms ease-out, stroke-dashoffset 220ms ease-out; }
.abtn .ax-l { transition: opacity 160ms ease-out; }
.abtn .ax-x { stroke-dasharray: 15; stroke-dashoffset: 15; opacity: 0; }
.abtn[data-ax="faint"] .ax-l { opacity: .45; }
.abtn[data-ax="faint"] .ax-l path:first-child { stroke-dasharray: 2 1.6; }
.abtn[data-ax="off"] .ax-l { opacity: .35; }
.abtn[data-ax="off"] .ax-x { stroke-dashoffset: 0; opacity: 1; }

