/* ---------- the editor rail (section 21) ----------
   What is selected, or being typed in, gets its tools in one slim rail at the left edge: nothing but tools, as hairline
   glyphs, the most used at the top. Hovered, a tool's name slides out beside it on a dark chip. A tool with choices opens a card next to the rail. It moves to the right edge when what it edits is
   under it, and lies along the bottom on a phone. */
#insp {
  position: fixed; z-index: 12; left: calc(env(safe-area-inset-left, 0px) + 14px);
  top: 0; bottom: 0; height: fit-content; margin-block: auto;     /* centred by its margins, as the shapes strip is (chrome.css) */
  display: flex; flex-direction: column; align-items: center; width: 50px; padding: 6px 0; box-sizing: border-box;
  border-radius: 10px; background: var(--glass); box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  user-select: none; -webkit-user-select: none;
  transition: opacity 200ms ease-out, translate 280ms cubic-bezier(.2,.8,.2,1), visibility 0s;
}
#insp.right { left: auto; right: calc(env(safe-area-inset-right, 0px) + 14px); }
#insp.reshape { overflow: clip; }          /* while it eases to another length (railReshape) */
#insp.off { opacity: 0; translate: -12px 0; visibility: hidden; pointer-events: none; transition: opacity 140ms ease-in, translate 180ms ease-in, visibility 0s linear 180ms; }
#insp.right.off { translate: 12px 0; }
body.moving #insp, body.drawing #insp, body.sizing #insp, body.marking #insp, body.dv #insp:not(.map) { opacity: 0; pointer-events: none; transition-duration: 120ms; }
.in-tools { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.in-b {
  position: relative; display: grid; place-items: center; width: 38px; height: 36px; padding: 0; border: 0; border-radius: 7px;
  color: var(--ink-2); background: transparent; cursor: pointer;
  transition: background-color 140ms ease-out, color 140ms ease-out, box-shadow 140ms ease-out;
}
.in-b svg { width: 18px; height: 18px; overflow: visible; }
.in-b svg * { fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.in-b svg .f { fill: currentColor; stroke: none; }
@media (hover: hover) { .in-b:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 85%, transparent); } }
.in-b[aria-pressed="true"], .in-b[aria-expanded="true"] { color: var(--ink); background: var(--press-bg); box-shadow: var(--press); }
.in-b:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.in-b .gl { font: 600 15px/1 var(--f-ui); letter-spacing: -.01em; }
.in-b .gl.i { font: italic 500 17px/1 var(--f-display); }
.in-b .gl.s { font-weight: 500; text-decoration: line-through; text-decoration-thickness: 1.3px; }
.in-b .gl.aa { font: 500 16px/1 var(--f-display); letter-spacing: -.01em; }
.in-b .gl.aa::after { content: ""; display: block; height: 2px; margin: 2px 1px 0; border-radius: 1px; background: var(--ink-c, currentColor); opacity: var(--ink-o, .35); }
/* The Colour tool's mark: a block of the colour (none: of paper), edged so a white or a black one still shows. */
.in-sw { width: 16px; height: 16px; box-sizing: border-box; border-radius: 3px; background: var(--k-f, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent); }
.in-sw.clear { background: none; box-shadow: none; border: 1.25px dashed color-mix(in srgb, var(--ink) 45%, transparent); }   /* a transparent note (21d) */
.in-sep { width: 20px; height: 1px; margin: 5px 0; background: var(--rule-2); }

/* A tool's name: a dark chip beside the rail, its key in a lighter tone. */
#itip {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 9px 0 8px;
  border-radius: 4px; background: var(--hud); color: var(--on-hud); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
  font: 500 9.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
#itip::before { content: ""; flex: none; width: 4px; height: 4px; background: currentColor; opacity: .55; }
#itip kbd { font: inherit; letter-spacing: .06em; opacity: .55; }

/* A tool's choices: a card beside the rail. */
#ipop {
  position: fixed; left: 0; top: 0; z-index: 30; width: 244px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 13px 12px 12px; box-sizing: border-box; border-radius: 9px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule), var(--pop);
  user-select: none; -webkit-user-select: none;
}
.ip-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 11px; }
.ip-t { font: 500 9.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.ip-s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 9.5px/1 var(--f-mono); letter-spacing: .08em; color: var(--ink-q); }
.ip-row + .ip-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ip-l { display: flex; justify-content: space-between; margin: 0 2px 8px; font: 500 9px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-q); }
.ip-l em { font-style: normal; color: var(--ink-3); letter-spacing: .06em; }
.ip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ip-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 7px; background: var(--press-bg); box-shadow: var(--press); }
.ip-o {
  display: grid; place-items: center; gap: 4px; min-width: 0; height: 44px; padding: 0; border: 0; border-radius: 5px; cursor: pointer;
  color: var(--ink-2); background: transparent; font: inherit;
  transition: background-color 120ms ease-out, color 120ms ease-out, box-shadow 120ms ease-out;
}
.ip-o small { font: 500 8.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-q); }
@media (hover: hover) { .ip-o:hover { color: var(--ink); } }
.ip-o[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: var(--raise-sm), var(--edge); }
.ip-o[aria-pressed="true"] small { color: var(--ink-2); }
.ip-o:focus-visible, .ip-sw:focus-visible, .ip-dot:focus-visible, .ip-chip:focus-visible, .ip-act:focus-visible, .ip-ico:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.ip-act:has(> .pick-in:focus-visible) { outline: 2px solid var(--ink); outline-offset: 1px; }   /* a cover's Another picture (covIn) */
.ip-o .sz { font-family: var(--f-display); line-height: 1; }
.ip-o .ff { font-size: 19px; line-height: 1; }
.ip-o svg { width: 16px; height: 16px; }
/* letter spacing: a word spaced as the choice spaces text, more so; its trailing space taken back, so it sits centred */
.ip-o .ls { font: 500 16px/1 var(--f-ui); }
.ip-o[data-v="tight"] .ls { letter-spacing: -.09em; margin-right: .09em; }
.ip-o[data-v="wide"] .ls { letter-spacing: .2em; margin-right: -.2em; }
.ip-o svg * { fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; }
/* card colours: each swatch a block of that colour, as a card wears it, with its name in the ink on it */
.ip-sw {
  position: relative; display: flex; align-items: flex-end; height: 44px; padding: 0 0 6px 7px; box-sizing: border-box; border: 0; border-radius: 5px; cursor: pointer;
  background: var(--k-f, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
  font: 500 8.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--k-on, var(--ink-2)); text-align: left;
  transition: box-shadow 140ms ease-out, translate 140ms ease-out;
}
.ip-sw.none { background: var(--surface) linear-gradient(to top right, transparent calc(50% - .6px), var(--rule-2) calc(50% - .6px), var(--rule-2) calc(50% + .6px), transparent calc(50% + .6px)); color: var(--ink-q); }
@media (hover: hover) { .ip-sw:hover { translate: 0 -1px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), 0 3px 8px -4px var(--drop-1); } }
.ip-sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), 0 0 0 2px var(--surface), 0 0 0 3.5px color-mix(in srgb, var(--k-a, var(--ink-2)) 55%, transparent); }
.ip-sw[aria-pressed="true"]::after { content: ""; position: absolute; right: 7px; top: 6px; width: 7px; height: 4px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; rotate: -45deg; }
/* inks: dots of colour, the default ink first */
.ip-dots { display: flex; justify-content: space-between; padding: 0 2px; }
.ip-dot {
  position: relative; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--k-a, var(--ink));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); transition: scale 120ms ease-out, box-shadow 120ms ease-out;
}
@media (hover: hover) { .ip-dot:hover { scale: 1.12; } }
.ip-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--k-a, var(--ink)); }
[data-k="red"] { --k-a: var(--k-red-a); --k-t: var(--k-red-t); --k-n: var(--k-red-n); }
[data-k="orange"] { --k-a: var(--k-orange-a); --k-t: var(--k-orange-t); --k-n: var(--k-orange-n); }
[data-k="yellow"] { --k-a: var(--k-yellow-a); --k-t: var(--k-yellow-t); --k-n: var(--k-yellow-n); }
[data-k="green"] { --k-a: var(--k-green-a); --k-t: var(--k-green-t); --k-n: var(--k-green-n); }
[data-k="teal"] { --k-a: var(--k-teal-a); --k-t: var(--k-teal-t); --k-n: var(--k-teal-n); }
[data-k="blue"] { --k-a: var(--k-blue-a); --k-t: var(--k-blue-t); --k-n: var(--k-blue-n); }
[data-k="violet"] { --k-a: var(--k-violet-a); --k-t: var(--k-violet-t); --k-n: var(--k-violet-n); }
[data-k="pink"] { --k-a: var(--k-pink-a); --k-t: var(--k-pink-t); --k-n: var(--k-pink-n); }
/* Your colours (section 21d): + and then each colour picked, a block of it, like the rail's Colour tool; the picker
   under them: a field of shades over a strip of hues, and the colour's code */
/* The Colour card's Background for notes (section 21d): a card, or transparent, only the words */
.ip-bg .ip-o { grid-auto-flow: column; justify-content: center; gap: 7px; }
.ip-bg :is(.bg-card, .bg-clear) { width: 14px; height: 11px; box-sizing: border-box; border-radius: 2.5px; }
.ip-bg .bg-card { background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent), 0 1px 2px var(--drop-1, rgba(0, 0, 0, .12)); }
.ip-bg .bg-clear { border: 1.25px dashed color-mix(in srgb, currentColor 70%, transparent); }
.ip-grid + .ip-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ip-mine { display: grid; grid-template-columns: repeat(8, 22px); justify-content: space-between; row-gap: 8px; padding: 0 2px; }
.ip-mc, .ip-more { position: relative; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; box-sizing: border-box; cursor: pointer; }
.ip-mc { background: var(--k-f); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent); transition: translate 140ms ease-out, box-shadow 140ms ease-out; }
@media (hover: hover) { .ip-mc:hover { translate: 0 -1px; } }
.ip-mc[aria-pressed="true"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), 0 0 0 2px var(--surface), 0 0 0 3.5px color-mix(in srgb, var(--k-a) 55%, transparent); }
.ip-more { display: grid; place-items: center; color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); transition: color 140ms ease-out, box-shadow 140ms ease-out; }
.ip-more svg { width: 14px; height: 14px; transition: rotate 220ms cubic-bezier(.2,.8,.2,1); }
.ip-more svg * { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
@media (hover: hover) { .ip-more:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); } }
.ip-more[aria-expanded="true"] { color: var(--ink); background: var(--press-bg); box-shadow: var(--press); }
.ip-more[aria-expanded="true"] svg { rotate: 45deg; }
.ip-mc:focus-visible, .ip-more:focus-visible, .ip-sv:focus-visible, .ip-hue:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ip-pick { margin-top: 12px; }
.ip-sv, .ip-hue { position: relative; touch-action: none; }
.ip-sv { height: 96px; border-radius: 5px; cursor: crosshair; box-shadow: inset 0 0 0 1px rgba(22, 27, 29, .08);
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(var(--h) 100% 50%)); }
.ip-hue { height: 10px; margin-top: 12px; border-radius: 5px; cursor: ew-resize;
  background: linear-gradient(to right, #f00, #ff0 16.667%, #0f0 33.333%, #0ff 50%, #00f 66.667%, #f0f 83.333%, #f00); }
.ip-sv > i, .ip-hue > i {
  position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y, .5) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid #fff; background: var(--now); box-shadow: 0 0 0 1px rgba(22, 27, 29, .32), 0 1px 3px rgba(22, 27, 29, .3); pointer-events: none;
}
.ip-hue > i { width: 6px; height: 16px; margin: -8px 0 0 -3px; border-radius: 3px; background: hsl(var(--h) 100% 50%); }
.ip-hex {
  display: flex; align-items: center; gap: 1px; height: 30px; margin-top: 12px; padding: 0 10px; box-sizing: border-box; border-radius: 6px; cursor: text;
  font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em; color: var(--ink-3); background: var(--press-bg); box-shadow: var(--press);
}
.ip-hex:focus-within { box-shadow: var(--press), 0 0 0 1.5px var(--ink-3); }
.ip-hx { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; font: inherit; letter-spacing: inherit; color: var(--ink); text-transform: uppercase; }
/* Editing Your colours: the bin beside the code takes the colour being changed out of them. */
.ip-hr { display: flex; gap: 6px; margin-top: 12px; }
.ip-hr .ip-hex { flex: 1; min-width: 0; margin-top: 0; }
.ip-del {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); transition: color 140ms ease-out, box-shadow 140ms ease-out;
}
.ip-del svg { width: 16px; height: 16px; }
.ip-del svg * { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .ip-del:hover { color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; } }
.ip-del:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* labels */
.ip-in {
  display: block; width: 100%; height: 36px; padding: 0 11px; box-sizing: border-box; border: 0; border-radius: 6px; outline: none;
  font: 500 13px/36px var(--f-ui); color: var(--ink); background: var(--press-bg); box-shadow: var(--press);
}
.ip-in::placeholder { color: var(--ink-3); }
.ip-in:focus-visible { box-shadow: var(--press), 0 0 0 1.5px var(--ink-3); }
.ip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.otag.ip-chip { border: 0; cursor: pointer; pointer-events: auto; height: 22px; font: 500 9.5px/1 var(--f-mono); }
@media (hover: hover) { .ip-chip:hover { color: var(--ink); } }
.ip-none { font: 500 11.5px/16px var(--f-ui); color: var(--ink-q); }
.ip-tip { font: 500 9px/16px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-q); }
.ip-tip kbd {     /* the dock's key cap (.sbtn kbd): hairline, its lower edge heavier */
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px 1px; margin-right: 3px; box-sizing: border-box; border-radius: 3px;
  font: inherit; letter-spacing: .04em; color: var(--ink-2); background: transparent; border: 1px solid var(--rule-2); border-bottom-width: 2px;
}
.ip-seg.slim .ip-o { height: 32px; }
/* actions: one per row, like the context menu's */
.ip-act {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px; box-sizing: border-box; border: 0; border-radius: 5px;
  font: 500 13px/1 var(--f-ui); color: var(--ink); background: transparent; cursor: pointer; text-align: left;
}
.ip-act svg { flex: none; width: 16px; height: 16px; color: var(--ink-2); }
.ip-act svg * { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ip-act span { flex: 1; }
.ip-act kbd { font: 500 10.5px/1 var(--f-mono); letter-spacing: .06em; color: var(--ink-3); }
@media (hover: hover) { .ip-act:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); } }
/* a line's styles (section 21f): each drawn as it looks in a note, its keys at the right; the one the lines have is
   marked by the canvas's little square */
.ip-pas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.ip-pa {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 5px 8px 5px 16px; box-sizing: border-box;
  border: 0; border-radius: 5px; color: var(--ink-2); background: transparent; cursor: pointer; text-align: left; font: inherit;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.ip-pa kbd { margin-left: auto; flex: none; font: 500 10px/1 var(--f-mono); letter-spacing: .02em; color: var(--ink-3); }
@media (hover: hover) { .ip-pa:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); } }
.ip-pa[aria-pressed="true"] { color: var(--ink); background: var(--press-bg); box-shadow: var(--press); }
.ip-pa[aria-pressed="true"]::before { content: ""; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; background: currentColor; }
.ip-pa:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.pa-s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-ui); font-size: 13px; line-height: 18px; }
.pa-h1 { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.02em; }
.pa-h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.pa-small { font-size: 11px; color: var(--ink-q); }
.ip-pa[aria-pressed="true"] .pa-small { color: var(--ink-2); }
.pa-code { font: 500 11.5px/18px var(--f-mono); padding: 0 6px; border-radius: 4px; background: color-mix(in srgb, currentColor 8%, transparent); }
.pa-callout { display: inline-flex; align-items: center; gap: 6px; padding: 0 7px 0 5px; border-radius: 4px; background: color-mix(in srgb, currentColor 8%, transparent); }
.pa-callout i { flex: none; width: 12px; height: 12px; background: currentColor; opacity: .7; -webkit-mask: var(--co-mark) center / contain no-repeat; mask: var(--co-mark) center / contain no-repeat; }
.pa-quote { padding-left: 8px; box-shadow: inset 1.5px 0 0 color-mix(in srgb, currentColor 35%, transparent); font-family: var(--f-display); font-style: italic; font-size: 14px; }
/* a timer's rings, each drawn where it sits on the dial, and its presets: times in a press (section 20) */
.tm-rs .ip-o svg { width: 20px; height: 20px; }
.tm-rs .ip-o svg circle { stroke-width: 1.1; opacity: .3; }
.tm-rs .ip-o svg circle.on { stroke-width: 1.7; opacity: 1; }
.tm-rs .ip-o[aria-disabled="true"] { cursor: default; }
.ip-ed { margin: -4px -2px -4px 0; padding: 3px 4px; border: 0; border-radius: 3px; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-2); background: transparent; }
@media (hover: hover) { .ip-ed:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); } }
.ip-pres { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-pre {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; box-sizing: border-box; border: 0; border-radius: 9px; cursor: pointer;
  font: 500 11px/1 var(--f-mono); letter-spacing: -.01em; white-space: nowrap; color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2);
  transition: color 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
}
@media (hover: hover) { .ip-pre:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); } }
.ip-pre[aria-pressed="true"] { color: var(--surface); background: var(--ink); box-shadow: none; }
.ip-pre.keep { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--rule-2); background: none; border: 1px dashed var(--rule-2); box-shadow: none; }
.ip-pres.editing .ip-pre { padding-right: 7px; }
.ip-pre i { font-style: normal; font-size: 13px; line-height: 1; color: var(--ink-3); }
@media (hover: hover) { .ip-pres.editing .ip-pre:hover { color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; } .ip-pres.editing .ip-pre:hover i { color: currentColor; } }
.ip-pre:focus-visible, .ip-ed:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.ip-act.danger { color: var(--k-red-a); }
.ip-act.danger svg { color: currentColor; }
/* icons for a board's tile */
.ip-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ip-ico {
  display: grid; place-items: center; height: 44px; padding: 0; border: 0; border-radius: 8px; cursor: pointer;
  color: var(--ink-2); background: var(--surface); box-shadow: var(--raise-sm), var(--edge); transition: scale 120ms ease-out, color 120ms ease-out;
}
.ip-ico svg { width: 20px; height: 20px; }
.ip-ico svg * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ip-ico svg .f { fill: currentColor; stroke: none; }
@media (hover: hover) { .ip-ico:hover { color: var(--ink); scale: 1.05; } }
.ip-ico[aria-pressed="true"] { color: var(--k-on, var(--on-tc)); background: var(--k-f, var(--ink-2)); box-shadow: var(--raise-sm); }      /* as the tile wears it */
/* the whole set (section 21c): a search field over the groups, which scroll under it; denser tiles, flat until pointed at */
#ipop:has(.ip-isc) { width: min(292px, calc(100vw - 24px)); }
.ip-q {
  display: flex; align-items: center; gap: 7px; height: 34px; margin-bottom: 10px; padding: 0 10px; box-sizing: border-box; border-radius: 6px;
  color: var(--ink-3); background: var(--press-bg); box-shadow: var(--press); cursor: text;
}
.ip-q:focus-within { box-shadow: var(--press), 0 0 0 1.5px var(--ink-3); }
.ip-q svg { flex: none; width: 15px; height: 15px; }
.ip-q svg * { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.ip-qi { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; font: 500 13px/34px var(--f-ui); color: var(--ink); }
.ip-qi::placeholder { color: var(--ink-3); }
.ip-qi::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.ip-isc {
  position: relative; max-height: min(336px, calc(100vh - 210px)); margin: 0 -12px; padding: 2px 12px 4px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent;
}
.ip-ig + .ip-ig { margin-top: 14px; }
.ip-ig[hidden], .ip-isc .ip-ico[hidden] { display: none; }
.ip-isc .ip-icons { grid-template-columns: repeat(6, 1fr); gap: 3px; }
.ip-isc .ip-ico { height: 40px; border-radius: 6px; background: transparent; box-shadow: none; }
.ip-isc .ip-ico svg { width: 19px; height: 19px; }
.ip-ico svg .d { fill: currentColor; }
@media (hover: hover) { .ip-isc .ip-ico:hover { scale: 1; background: var(--press-bg); } }
.ip-isc .ip-ico[aria-pressed="true"] { background: var(--k-f, var(--ink-2)); box-shadow: var(--raise-sm); }
.ip-nf { margin: 22px 0 18px; text-align: center; font: 500 12px/16px var(--f-ui); color: var(--ink-3); }
.ip-isc + .ip-row { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rule); }
/* The fold-out (section 21e): a hinge down the card's outer edge folds out a column beside its rows, each of its cells
   level with the row it refines (the card a grid, foGrid putting each in its row); away from the rail (.flip: left of
   a rail at the right). Shut, the hinge is a short hairline with its chevron; out, the seam between the columns. */
#ipop.fx { display: grid; width: max-content; grid-template-columns: [m-start] 220px [m-end h-start] 22px [h-end]; align-content: start; padding-right: 0; }
#ipop.fx.flip { grid-template-columns: [h-start] 22px [h-end m-start] 220px [m-end]; padding-left: 0; padding-right: 12px; }
#ipop.fx.fo { grid-template-columns: [m-start] 220px [m-end h-start] 25px [h-end f-start] 196px [f-end]; padding-right: 12px; }
#ipop.fx.fo.flip { grid-template-columns: [f-start] 196px [f-end h-start] 25px [h-end m-start] 220px [m-end]; padding-left: 12px; }
#ipop.fx > * { grid-column: m; min-width: 0; }
#ipop.fx > .ip-h { grid-column: 1 / -1; }
#ipop.fx:not(.fo) > .ip-h { grid-column: m; }      /* folded: over the rows, clear of the hinge */
#ipop.fx > .ip-fine { grid-column: f; }
#ipop.fx > .ip-fx {
  grid-column: h; grid-row: 2 / span 40; position: relative; display: grid; place-items: center; min-height: 48px; padding: 0; border: 0;
  background: transparent; color: var(--ink-3); cursor: pointer; transition: color 140ms ease-out;
}
#ipop.fx > .ip-fx::before { content: ""; position: absolute; left: 50%; top: 50%; width: 1px; height: 44px; margin: -22px 0 0 -.5px; background: var(--rule-2); }
#ipop.fx.fo > .ip-fx::before { top: 0; height: 100%; margin-top: 0; background: var(--rule); }
.ip-fx svg { position: relative; width: 8px; height: 14px; padding: 6px 0; background: var(--surface); overflow: visible; transition: translate 160ms cubic-bezier(.2,.8,.2,1); }
.ip-fx svg path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ip-fx span { display: none; }
#ipop.fo > .ip-fx svg, #ipop.flip > .ip-fx svg { rotate: 180deg; }
#ipop.fo.flip > .ip-fx svg { rotate: 0deg; }
@media (hover: hover) {
  #ipop > .ip-fx:hover { color: var(--ink); }
  #ipop > .ip-fx:hover svg { translate: 1.5px 0; }
  #ipop.fo > .ip-fx:hover svg, #ipop.flip > .ip-fx:hover svg { translate: -1.5px 0; }
  #ipop.fo.flip > .ip-fx:hover svg { translate: 1.5px 0; }
}
.ip-fx:focus-visible { outline: none; }
.ip-fx:focus-visible svg { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: 3px; }
/* a cell: under its row's label, level with its controls; under a hairline where its row has one */
.ip-fine { display: flex; flex-direction: column; min-width: 0; padding-top: 17px; box-sizing: border-box; }
.ip-fine.sep { margin-top: 12px; padding-top: 29px; border-top: 1px solid var(--rule); }
.ip-fine + .ip-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.fo-b { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 30px; }
/* a slider: a hairline, inked up to its handle; the presets' marks across it */
.fo-sl { position: relative; flex: 1; min-width: 0; height: 28px; margin: 0 6px; cursor: pointer; touch-action: none; outline: none; }
.fo-sl > b { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px;
  background: linear-gradient(to right, var(--ink-2) calc(var(--x) * 100%), var(--rule-2) calc(var(--x) * 100%)); }
.fo-tk { position: absolute; left: calc(var(--x) * 100%); top: 50%; width: 1px; height: 9px; margin: -4.5px 0 0 -.5px; background: var(--ink-3); }
.fo-th {
  position: absolute; left: calc(var(--x) * 100%); top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; box-sizing: border-box; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink), 0 1px 3px var(--drop-1); transition: scale 120ms ease-out;
}
@media (hover: hover) { .fo-sl:hover .fo-th { scale: 1.12; } }
.fo-sl.moving .fo-th { scale: 1.12; }
.fo-sl:focus-visible .fo-th { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 3px color-mix(in srgb, var(--ink) 22%, transparent); }
/* figures, and a code: in a press, as the colour's code is */
.fo-num {
  display: flex; align-items: center; gap: 3px; flex: none; width: 64px; height: 28px; padding: 0 8px 0 6px; box-sizing: border-box; border-radius: 6px; cursor: text;
  color: var(--ink-3); background: var(--press-bg); box-shadow: var(--press);
}
.fo-num:focus-within { box-shadow: var(--press), 0 0 0 1.5px var(--ink-3); }
.fo-in { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; font: 500 11.5px/1 var(--f-mono); color: var(--ink); text-align: right; }
.fo-in::placeholder { color: var(--ink-3); }
.fo-num span { font: 500 8.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
/* a typeface: its name in its own face */
.fo-face {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 11px 0 12px; box-sizing: border-box; border: 0; border-radius: 6px; cursor: pointer;
  color: var(--ink); background: var(--press-bg); box-shadow: var(--press); text-align: left; font: inherit; transition: box-shadow 120ms ease-out;
}
.fo-face > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 20px; }
.fo-face svg { flex: none; width: 10px; height: 10px; color: var(--ink-3); transition: rotate 200ms cubic-bezier(.2,.8,.2,1); }
.fo-face svg path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fo-face[aria-expanded="true"] svg { rotate: 180deg; }
@media (hover: hover) { .fo-face:hover { box-shadow: var(--press), 0 0 0 1px var(--rule-2); } }
.fo-face:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
/* an ink, beside Ink and Align: the field of shades as tall as they leave it, the hues and the code under it */
.ip-fine[data-f="ink"] { padding-top: 0; }
.ip-fine.sep[data-f="ink"] { padding-top: 12px; }
.ip-sv.fo-sv { flex: 1 1 0; min-height: 52px; height: auto; }
.fo-ir { flex: none; display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.fo-ir .ip-hue { flex: 1; min-width: 0; margin-top: 0; }
.ip-hex.fo-hex { flex: none; width: 86px; margin-top: 0; padding: 0 8px; }
.fo-hx { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; font: inherit; letter-spacing: inherit; color: var(--ink); text-transform: uppercase; }
/* The typefaces: a list beside the card, a search over the faces, each named in itself (only those in sight drawn) */
#folist {
  position: fixed; left: 0; top: 0; z-index: 31; display: flex; flex-direction: column; width: 252px; max-height: min(400px, calc(100vh - 24px));
  padding: 8px; box-sizing: border-box; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule), var(--pop);
  user-select: none; -webkit-user-select: none;
}
#folist[hidden] { display: none; }
#folist .ip-q { flex: none; margin-bottom: 4px; }
.fl-sc { position: relative; flex: 1 1 auto; min-height: 0; max-height: 312px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
.fl-in { position: relative; }
.fl-o, .fl-h { position: absolute; left: 0; right: 0; height: 30px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-o { padding: 0 10px 0 20px; border-radius: 5px; font-size: 15px; line-height: 30px; color: var(--ink); cursor: pointer; }
.fl-o.on { background: var(--press-bg); }
.fl-o[aria-selected="true"]::before { content: ""; position: absolute; left: 8px; top: 13px; width: 4px; height: 4px; background: currentColor; }
.fl-h { padding: 14px 8px 0; font: 500 9px/16px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-q); }
.fl-ft { flex: none; margin-top: 6px; padding: 8px 8px 2px; border-top: 1px solid var(--rule); font: 500 9px/14px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-q); }
.fl-ft:empty { display: none; }
/* A phone (html.phone: a phone or a tablet, or a window as narrow as a phone; set in index.html, PHONE in the scripts):
   the rail lies along the bottom, over the shapes strip. */
:where(html.phone) #insp {
  left: 0; right: 0; top: auto; bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--kb, 0px)) + 14px); margin: 0 auto;
  flex-direction: row; width: max-content; max-width: calc(100% - 24px); padding: 5px 6px; border-radius: 10px;
}
:where(html.phone) #insp.right { left: 0; right: 0; }
:where(html.phone) #insp.off, :where(html.phone) #insp.right.off { translate: 0 12px; }
:where(html.phone) .in-tools { flex-direction: row; gap: 0; }
/* Typing in a note, more tools than a phone is wide (section 21h's Code and Link): they scroll across, the last one
   cut at the edge so it shows there are more. */
:where(html.phone) #insp:not(.reshape) { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
:where(html.phone) #insp::-webkit-scrollbar { display: none; }
:where(html.phone) .in-b { flex: none; }
:where(html.phone) .in-b { width: 36px; height: 38px; }
:where(html.phone) .in-sep { width: 1px; height: 20px; margin: 0 4px; }
:where(html.phone) body.inspecting #guide { opacity: 0; visibility: hidden; transition: opacity 120ms ease-out, visibility 0s linear 120ms; }
:where(html.phone) #ipop { width: min(300px, calc(100vw - 24px)); }
:where(html.phone) .ip-mine { grid-template-columns: repeat(8, 28px); }       /* Your colours: a finger's size */
:where(html.phone) .ip-mc, :where(html.phone) .ip-more { width: 28px; height: 28px; }
/* the fold-out: its cells under their rows, the hinge a row at the foot */
:where(html.phone) #ipop.fx, :where(html.phone) #ipop.fx.fo { display: block; width: min(300px, calc(100vw - 24px)); padding-right: 12px; }
:where(html.phone) .ip-fine, :where(html.phone) .ip-fine.sep, :where(html.phone) .ip-fine.sep[data-f="ink"] { margin-top: 10px; padding-top: 0; border-top: 0; }
:where(html.phone) .ip-sv.fo-sv { flex: none; height: 96px; }
:where(html.phone) #ipop.fx > .ip-fx {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 36px; margin: 12px 0 0; border-top: 1px solid var(--rule);
  font: 500 9px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
}
:where(html.phone) #ipop.fx > .ip-fx::before { display: none; }
:where(html.phone) .ip-fx span { display: inline; }
:where(html.phone) #ipop.fx > .ip-fx svg { rotate: 90deg; padding: 0; background: none; }
:where(html.phone) #ipop.fx.fo > .ip-fx svg { rotate: -90deg; }

