/* minimac.com v3: spec-sheet chrome (after Attik, NOISE 3.5) over the scene drawn by shards.js.
   No backdrop-filter or shadows. Blend modes and filters are used in one place, the foil sticker,
   which is also the only per-frame work besides the canvas (and it stops when it cannot be seen). */

@font-face { font-family: 'Michroma'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/michroma.woff2') format('woff2'); }
@font-face { font-family: 'Share Tech Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/share-tech-mono.woff2') format('woff2'); }
/* metric-matched fallbacks: text set in these before the woff2 arrives occupies the same width, so
   the swap causes no layout shift (ratios measured against the real faces, 2026-10-23) */
@font-face { font-family: 'Michroma Fallback'; src: local('Arial'), local('Helvetica'); size-adjust: 143%; ascent-override: 80%; descent-override: 20%; }
@font-face { font-family: 'Share Tech Mono Fallback'; src: local('Menlo'), local('Consolas'); size-adjust: 90%; }

:root {
    --bg: #4478b6;
    --ink: #efeefa;
    --lime: #c2fe0b;
    --orange: #ff7a1a;
    --rule: rgba(194, 254, 11, 0.42);
    --rule-soft: rgba(194, 254, 11, 0.22);
    --lime-fill: rgba(194, 254, 11, 0.08);
    --panel: rgba(10, 11, 22, 0.85);

    --display: 'Michroma', 'Michroma Fallback', 'Eurostile', 'Bank Gothic', sans-serif;
    --mono: 'Share Tech Mono', 'Share Tech Mono Fallback', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-tap-highlight-color: transparent; }
body {
    margin: 0;
    min-height: 100svh;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}
::selection { background: var(--lime); color: var(--bg); }
body.grabbing, body.grabbing * { cursor: grabbing !important; user-select: none; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible { outline: 1px solid var(--lime); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
    a:hover { color: var(--lime); text-decoration-color: var(--lime); }
}
h1, p, dl, dd { margin: 0; }

/* ---------- layers ---------- */
#shards { position: fixed; inset: 0; width: 100%; height: 100%; height: 100lvh; display: block; }   /* the large viewport: iOS Safari's toolbar collapsing on scroll must not resize the canvas (that reallocates every buffer and clears a frame: a visible flicker) */
#shards { z-index: 1; }
.schem { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.fig, .reg, .format, .tear, .label, .imprint, .readout { position: fixed; z-index: 3; }

/* ---------- schematic ---------- */
.schem path { vector-effect: non-scaling-stroke; }
.schem .ink path { fill: none; stroke: var(--rule-soft); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.schem .ink path:nth-child(2) { animation-delay: 60ms; }
.schem .ink path:nth-child(3) { animation-delay: 120ms; }
.schem .ink path:nth-child(4) { animation-delay: 180ms; }
.schem .ink path:nth-child(n+5) { animation-delay: 240ms; }
.schem .tick path { fill: none; stroke: var(--rule); stroke-width: 1; }
.glyph { position: fixed; z-index: 3; width: 12px; height: 12px; transform: translate(-50%, -50%); fill: var(--lime); opacity: 0.9; pointer-events: none; }
.glyph.g-edge { width: 22px; height: 22px; left: calc(95vw + 24px); top: 50vh; }   /* past the end of the centre line, at the right edge */
.glyph.ring { fill: none; stroke: var(--lime); stroke-width: 1; }   /* the page's absolute centre: one empty circle */
.g-centre { left: 50vw; top: 50vh; }
.masthead {
    position: fixed; z-index: 3; top: 2.4vh; left: 50vw; transform: translateX(-50%);
    font-family: var(--display); font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--lime); opacity: 0.9;
}
/* the glyph sheet (Mac's picks, 2026-10-23): <symbol>s drawn once, placed with <use>; a <use> instance
   takes fill and stroke from the <svg> that places it, so .g-fill goes on the placing element */
.glyphs { position: absolute; width: 0; height: 0; overflow: hidden; }
.g-fill { fill: currentColor; color: var(--lime); }
.g-inline { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; margin: 0 0.3em 0 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- small chrome ---------- */
.fig {
    top: 5vh; left: 4vw;
    font-family: var(--mono);
    font-size: 10px; line-height: 2; letter-spacing: 0.14em; text-transform: uppercase;   /* set like the callouts */
    color: var(--lime); opacity: 0.85;
}
.fig .g-inline { width: 0.78em; height: 0.78em; margin: 0 0 0 0.45em; vertical-align: -0.05em; }   /* the cube, cap height, after the figure number */
.callout {
    position: fixed; z-index: 3;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--lime); opacity: 0.85; white-space: nowrap; pointer-events: none;
}
.c-core { left: calc(69vw + 8px); top: 40vh; transform: translateY(-50%); }   /* at the end of the leader from the core */
.c-mass { left: calc(8vw + 12px); top: calc(80vh + 6px); }                   /* under the dimension line, inset from its tick */
body.over-mass { cursor: grab; }
.reg { width: 14px; height: 14px; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--lime); opacity: 0.8; }
.reg::before { left: 50%; top: 0; width: 1px; height: 100%; }
.reg::after { top: 50%; left: 0; height: 1px; width: 100%; }
.reg-tl { left: 2vw; top: 2vh; }
.reg-tr { right: 2vw; top: 2vh; }
.reg-bl { left: 2vw; bottom: 2vh; }
.reg-br { right: 2vw; bottom: 2vh; }

.format {
    /* rotated, centred on the page's vertical axis, beside the centre hairline */
    left: calc(50vw - 16px); top: 50vh;
    transform: translate(-50%, -50%) rotate(-90deg); transform-origin: center;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--lime); opacity: 0.75; white-space: nowrap;
}

.imprint {
    left: 50vw; bottom: 3vh; transform: translateX(-50%);
    display: grid; place-items: center; width: 24px; height: 24px; padding: 0; margin: 0;
    border: 1px solid var(--rule); background: transparent; cursor: pointer; color: var(--lime);
}
.imprint .face { width: 18px; height: 14px; display: block; }   /* the blob face: the settings button's mark */
.imprint:focus-visible { outline: 1px solid var(--lime); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .imprint:hover { border-color: var(--lime); } }

/* the secret menu: live PARAMS of the scene */
#tune {
    position: fixed; z-index: 5; top: 2vh; right: 2vw; width: 272px; max-height: 92vh; overflow: auto;
    padding: 12px 14px 14px; border: 1px solid var(--rule); background: rgba(10, 11, 22, 0.9);
    font-family: var(--mono); font-size: 11px; color: var(--ink);
}
#tune h2 .g-inline { width: 18px; height: 18px; margin: 0; }   /* the atom: the menu's mark */
#tune h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--lime); }
#tune details { border-top: 1px solid var(--rule-soft); padding: 0 0 4px; }
#tune summary {
    margin: 0 0 6px; padding: 7px 0 5px; cursor: pointer; list-style: none;
    font-family: var(--display); font-weight: 400; font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); opacity: 0.75;
}
#tune summary::-webkit-details-marker { display: none; }
#tune summary::before { content: '\25B8'; display: inline-block; width: 12px; }
#tune details[open] > summary::before { content: '\25BE'; }
#tune summary:focus-visible { outline: 1px solid var(--lime); outline-offset: 2px; }
/* page layers switched off from the menu, for isolated captures */
body.hide-card main.label { visibility: hidden; }
body.hide-tears .tear { visibility: hidden; }
body.hide-marks :is(.schem, .glyph, .masthead, .fig, .callout, .figtag, .reg, .format, .readout, .deck) { visibility: hidden; }
body.hide-marks .imprint { opacity: 0; }   /* invisible in captures, still clickable to reopen the menu */
body.hide-marks .imprint:is(:hover, :focus-visible, [aria-expanded="true"]) { opacity: 1; }
#tune .ctl { display: grid; grid-template-columns: 1fr 52px; align-items: center; gap: 4px 8px; margin: 0 0 6px; }
#tune .ctl span { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--ink); opacity: 0.85; }
#tune .ctl span output { color: var(--lime); }
#tune .sw { grid-template-columns: 1fr auto; }
#tune .sw span { grid-column: 1; }
#tune .sw input { accent-color: var(--lime); margin: 0; }
/* sliders drawn in the page's own style: a hairline track, a square lime thumb */
#tune input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; }
#tune input[type=range]:focus-visible { outline: 1px solid var(--lime); outline-offset: 2px; }
#tune input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--rule); }
#tune input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 9px; height: 9px; margin-top: -4px; border: 1px solid var(--lime); background: var(--lime); border-radius: 0; }
#tune input[type=range]::-moz-range-track { height: 1px; background: var(--rule); }
#tune input[type=range]::-moz-range-progress { height: 1px; background: var(--lime); }
#tune input[type=range]::-moz-range-thumb { width: 9px; height: 9px; border: 1px solid var(--lime); background: var(--lime); border-radius: 0; }
#tune input[type=number] { width: 52px; background: transparent; border: 1px solid var(--rule-soft); color: var(--ink); font: inherit; padding: 2px 4px; }
#tune select { background: transparent; border: 1px solid var(--rule-soft); color: var(--ink); font: inherit; padding: 2px 4px; }
#tune select option { background: #0a0b16; }
#tune .swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#tune .swatches label { display: grid; grid-template-columns: 1fr; gap: 3px; margin: 0; font-size: 9px; text-align: center; opacity: 0.85; }
#tune input[type=color] { width: 100%; height: 22px; padding: 0; border: 1px solid var(--rule-soft); background: transparent; }
#tune .row { display: flex; gap: 8px; margin-top: 12px; }
#tune button { flex: 1; padding: 6px 8px; border: 1px solid var(--rule); background: transparent; color: var(--lime); font: inherit; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
#tune button:hover { border-color: var(--lime); }
#tune .note { margin: 8px 0 0; font-size: 10px; opacity: 0.6; }

#ro-user { border: 1px solid var(--rule); border-radius: 999px; padding: 1px 7px 2px; }   /* the capsule */
.readout {
    right: 5vw; bottom: 3vh;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
    color: var(--lime); opacity: 0.75; white-space: nowrap;
}
/* the music's licence, the last stat in the readout (Mac, 2026-11-02): the link leads to llms.txt, which
   credits each track (title, artist, source) under CC BY 4.0 with the licence's address */
.readout .ro-cc { color: inherit; text-decoration-color: var(--rule); pointer-events: auto; }
@media (hover: hover) and (pointer: fine) { .readout .ro-cc:hover { color: var(--orange); } }

/* ---------- perforation lines (all live) ---------- */
.tear {
    display: flex; align-items: center; gap: 8px;
    height: 32px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--lime); text-decoration: none; white-space: nowrap;
}
button.tear { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }   /* no margin here: the layout rules own it */
button.tear:focus-visible { outline: 1px solid var(--lime); outline-offset: 3px; }
.tear::before { content: ""; width: 10px; height: 1px; background: var(--rule); flex: none; order: 1; }
.tear span { order: 2; opacity: 0.95; }
.tear .chev { height: 8px; width: 13px; flex: none; order: 0; color: inherit; }   /* turns orange with the line on hover */
.tear::after { content: ""; flex: 1; height: 1px; order: 3; background: repeating-linear-gradient(90deg, var(--rule) 0 10px, transparent 10px 16px); }
.tear-2 { top: 50vh; left: 18vw; width: 37vw; margin-top: -16px; }   /* on the centre hairline, ends on the card's left edge */
.tear-3 { top: 90vh; left: 4vw; width: 42vw; margin-top: -16px; }
@media (hover: hover) and (pointer: fine) {
    .tear:hover { color: var(--orange); }
    .tear:hover .chev { animation: advance 0.8s linear infinite; }
}
@keyframes advance { from { transform: translateX(0); } to { transform: translateX(8px); } }

/* ---------- the label block ---------- */
.label {
    /* centred in the bottom-right quadrant: 55–95vw, mid-point 75vh (Mac, 2026-10-23) */
    left: 55vw; width: 40vw; top: 75vh; transform: translateY(-50%);
    border: 1px solid var(--rule);
    background: var(--panel);
}
.title {
    display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 0 20px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--rule);
}
h1 {
    font-family: var(--display); font-weight: 400;
    font-size: clamp(22px, 2.6vw, 38px); line-height: 1; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ink); white-space: nowrap;
}
h1 .home { color: inherit; text-decoration: none; display: inherit; align-items: inherit; gap: inherit; }
h1 .home:focus-visible { outline: 1px solid var(--lime); outline-offset: 4px; }
h1 .tld { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: none; color: var(--lime); margin-left: 4px; vertical-align: baseline; }
/* wordmark: the drawn logotype, or Michroma text (body[data-wm], set by tune.js; text is also the no-WebGL2 rendering) */
h1 .wm-svg { display: none; height: 1.08em; width: auto; vertical-align: -0.12em; overflow: visible; }
/* the h1's text stays in the document for crawlers and screen readers; a drawn mark only hides it visually */
body[data-wm="block"] h1 .wm-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-wm="block"] h1 .wm-block { display: inline-block; }
h1 .wm-block { height: 1.35em; vertical-align: -0.28em; }   /* x-height mark with its dots: drawn a little larger than the caps were */
body[data-wm="block"] h1, body[data-wm="block"] h1 .home { display: flex; align-items: flex-end; gap: 0; }          /* .com sits on the mark's foot */
body[data-wm="block"] h1 .wm-block { vertical-align: 0; margin: 0 -0.138em -0.02em 0; }   /* the box ends 37 units past the leaning c's foot; pull .com back so the gap equals the mark's letter gap (18 units) */
body[data-wm="block"] h1 .tld { margin: 0 0 1px; }
.sub {
    font-family: var(--display); font-weight: 400;
    font-size: clamp(9px, 0.8vw, 11px); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime);   /* 0.14em: the longer strap must fit beside the mark */
    justify-self: end; padding-bottom: 2px; text-align: right; line-height: 1.5;   /* one line where it fits; otherwise it breaks after the backslash, right-aligned */
}
.cols {
    display: grid; grid-template-columns: 1.4fr 1fr;
    border-bottom: 1px solid var(--rule);
}
.cols dl { padding: 10px 14px 12px; border-left: 1px solid var(--rule-soft); min-width: 0; }
.cols dl:first-child { border-left: 0; }
dt { font-family: var(--display); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); margin-bottom: 5px; }
dd { font-size: 12px; color: var(--ink); opacity: 0.9; overflow-wrap: anywhere; }
dd a { white-space: nowrap; }   /* an address broken mid-word reads as a typo; the grid steps down instead */
.socials { margin-top: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); opacity: 0.9; }
.socials a { color: inherit; text-decoration-color: var(--rule); }
.socials a:hover { color: var(--orange); }
.field { margin: 8px 12px; padding: 8px 10px 9px !important; border: 1px solid var(--lime) !important; background: var(--lime-fill); align-self: center; }
.field dd { opacity: 1; }
.field dd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-arrow { flex: none; width: 10px; height: 12px; margin: 0; transition: transform 0.4s; }
body.cat .field-arrow { transform: rotate(180deg); }
.nb { white-space: nowrap; }
.linklike { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--lime); text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 2px; cursor: pointer; text-align: left; }
.linklike:hover { color: var(--orange); }
.linklike:focus-visible { outline: 1px solid var(--lime); outline-offset: 2px; }

/* the deck: the music player (player.js), its own box top right on the drawing, the fig block's
   counterpart at top left (Mac, 2026-11-02: outside the card, in its own box). Tag and counter beside the
   transport (previous, play/hold, next); the track (title \ artist) beside its time, the title wrapping if it
   must; the seek bar across the whole box (Mac, 2026-11-02); the meter hangs below the box from its bottom
   edge, in the box's rule colour. Boxed like the card: the same rule and panel */
.deck[hidden] { display: none; }
.deck {
    position: fixed; z-index: 3; top: 5vh; right: 4vw; width: 288px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px;
    padding: 9px 12px 6px; border: 1px solid var(--rule); background: var(--panel);
    font-family: var(--mono); font-size: 10px; line-height: 1.6; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime);
}
.dk-tag { white-space: nowrap; opacity: 0.85; }
.dk-tag span { opacity: 0.75; }
.dk-ctl { display: flex; gap: 4px; }
.dk-btn {
    display: grid; place-items: center; height: 22px; min-width: 26px; padding: 0 7px; margin: 0;
    border: 1px solid var(--rule); background: transparent; color: var(--lime); cursor: pointer;
    font: inherit; line-height: 1; letter-spacing: 0.14em;
}
.dk-btn .chev { width: 12px; height: 8px; display: block; }
.dk-prev .chev { transform: scaleX(-1); }
.dk-play { min-width: 52px; }
.deck.on .dk-play { border-color: var(--lime); background: var(--lime-fill); }
.dk-btn:focus-visible { outline: 1px solid var(--lime); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .dk-btn:hover { border-color: var(--lime); color: var(--orange); } }
.dk-now { grid-column: 1; grid-row: 2; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.dk-now .dk-by { opacity: 0.7; }
.dk-time { grid-column: 2; grid-row: 2; align-self: start; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0.85; }
/* the meter (Mac, 2026-11-02): bars hanging down from the box's bottom edge, outside it, in the box's own
   rule colour, low frequencies at the left; drawn by player.js while music plays, nothing at all otherwise */
.dk-wave { position: absolute; left: 0; right: 0; top: 100%; width: 100%; height: 30px; display: block; pointer-events: none; }
body.cat .deck { visibility: hidden; }   /* the drawing's chrome, like the fig block: the sheet covers this corner; the music plays on */
/* the seek bar: a hairline in the rule colour, the played part in lime; the input's box is taller than
   the line so it can be caught */
.dk-seek {
    --p: 0;
    grid-column: 1 / -1; grid-row: 3; width: 100%; height: 11px; margin: 0; padding: 0;
    -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
.dk-seek::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--lime) calc(var(--p) * 100%), var(--rule) 0); }
.dk-seek::-moz-range-track { height: 1px; background: linear-gradient(90deg, var(--lime) calc(var(--p) * 100%), var(--rule) 0); }
.dk-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 7px; height: 7px; margin-top: -3px; border: 0; border-radius: 0; background: var(--lime); }
.dk-seek::-moz-range-thumb { width: 7px; height: 7px; border: 0; border-radius: 0; background: var(--lime); }
.dk-seek:focus-visible { outline: 1px solid var(--lime); outline-offset: 0; }
.dk-seek:disabled { cursor: default; }
.dk-seek:disabled::-webkit-slider-thumb { visibility: hidden; }
.dk-seek:disabled::-moz-range-thumb { visibility: hidden; }

.spec {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 24px;
    padding: 12px 20px 14px;
}
/* the issue block: the affixed edition sticker over its line */
.issue { display: grid; justify-items: center; gap: 8px; }
.issue .date { text-align: center; }
/* the sticker's field: the dashed box the edition is affixed in (the book's cover) */
.sticker { display: grid; place-items: center; width: 84px; height: 70px; border: 1px dashed var(--rule); }   /* the field, with the sticker inside it */
/* ---------- the affixed edition: the unit's mascot as a holographic foil sticker, the diffraction kind
   (pale iridescent base, a field of flakes that each catch a different hue as the angle changes, sparse
   glints, a soft glare), a square sticker with the mascot printed on it, tilted in 3D toward the pointer; it idles
   on its own sweep. Textures: assets/foil-flake.png (periodic Voronoi, one grey per cell = its phase) and
   assets/foil-glint.png, both generated once. Driven by --px/--py (pointer, %), --rx/--ry (tilt) and
   --on (0..1), set from readout.js ---------- */
.unit {
    --px: 50%; --py: 50%; --rx: 0deg; --ry: 0deg; --on: 0; --flip: 0deg;
    position: relative; display: block; width: 56px; height: 56px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
    transform: perspective(240px) rotateX(var(--ry)) rotateY(calc(var(--rx) + var(--flip))) rotate(-7deg);
    transform-style: preserve-3d; will-change: transform;
}
.unit:focus-visible { outline: 1px solid var(--lime); outline-offset: 4px; }
.unit > span { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* front: a pale foil square with the mascot printed on it */
.unit .face-front { background: #e9e6f2; isolation: isolate; }
.unit .face-front::after { content: ""; position: absolute; inset: 0; background: url(assets/unit.png) center / 78% no-repeat; }
.unit .face-front > i { position: absolute; inset: 0; }
.unit .foil {
    /* pastel diffraction wash, hard-lit by the flake field so every cell sits at its own point of the spectrum */
    background-image:
        linear-gradient(115deg, hsl(300 90% 78%), hsl(200 95% 78%), hsl(140 85% 76%), hsl(55 95% 76%), hsl(15 95% 78%), hsl(300 90% 78%), hsl(200 95% 78%), hsl(140 85% 76%)),
        url(assets/foil-flake.png);
    background-size: 340% 340%, 44px 44px;
    background-position: calc(((50% - var(--px)) * 2.2) + 50%) calc(((50% - var(--py)) * 2.2) + 50%), calc(var(--px) * -0.35) calc(var(--py) * -0.35);
    background-blend-mode: hard-light;
    mix-blend-mode: multiply;
    filter: saturate(1.25) contrast(1.05);
}
.unit .glare {
    /* glints sweep the other way; the glare follows the pointer */
    background-image:
        radial-gradient(farthest-corner circle at var(--px) var(--py), hsla(0, 0%, 100%, 0.9) 0%, hsla(0, 0%, 100%, 0.25) 30%, hsla(0, 0%, 100%, 0) 70%),
        url(assets/foil-glint.png);
    background-size: cover, 54px 54px;
    background-position: center, calc(var(--px) * 0.9) calc(var(--py) * 0.6);
    mix-blend-mode: screen;
    opacity: calc(0.55 + 0.45 * var(--on));
}
/* back: the printed label (serial, key, seal, the palette's three swatches), seen when turned over */
.unit .face-back {
    transform: rotateY(180deg) translateZ(0); isolation: isolate; background: #e9e6f2; color: #0a0b16;   /* its own layer: WebKit drops a rounded clip on a turning face otherwise */
    display: grid; align-content: center; justify-items: center; gap: 2px;
    font-family: var(--mono); font-size: 6px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3;
    border: 2px solid #0a0b16; box-sizing: border-box;
}
.unit .face-back b { font-family: var(--display); font-weight: 400; font-size: 7px; letter-spacing: 0.1em; margin-bottom: 1px; }
.unit .face-back .sw { display: flex; gap: 3px; margin-top: 3px; }
.unit .face-back .sw i { display: block; width: 7px; height: 7px; border-radius: 50%; border: 1px solid #0a0b16; box-sizing: border-box; }   /* ringed: a pale swatch still reads on the paper */
.unit .face-back .sw-a { background: var(--bg); } .unit .face-back .sw-b { background: var(--lime); } .unit .face-back .sw-c { background: var(--orange); }
@media (prefers-reduced-motion: reduce) { .unit { transform: rotateY(var(--flip)) rotate(-7deg); } }
.rd { font-size: 11px; line-height: 1.35; color: var(--ink); opacity: 0.72; min-width: 0; }
.date { font-family: var(--mono); font-size: 15px; color: var(--ink); white-space: nowrap; }
.date span { display: block; font-family: var(--display); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); margin-bottom: 3px; }
/* the card is a printed label on the drawing: a figure tag outside its top-left corner and die-cut marks */
.figtag { position: absolute; left: 0; top: -16px; font-family: var(--display); font-size: 7px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); opacity: 0.85; white-space: nowrap; }
.cut { position: absolute; width: 7px; height: 7px; }
.cut::before, .cut::after { content: ""; position: absolute; background: var(--lime); opacity: 0.8; }
.cut::before { width: 1px; height: 100%; }
.cut::after { height: 1px; width: 100%; }
.cut-tl { left: -8px; top: -8px; } .cut-tl::before { right: 0; } .cut-tl::after { bottom: 0; }
.cut-tr { right: -8px; top: -8px; } .cut-tr::before { left: 0; } .cut-tr::after { bottom: 0; }
.cut-bl { left: -8px; bottom: -8px; } .cut-bl::before { right: 0; } .cut-bl::after { top: 0; }
.cut-br { right: -8px; bottom: -8px; } .cut-br::before { left: 0; } .cut-br::after { top: 0; }

/* ---------- the catalogue: the label unfolds into the portfolio sheet, centred over the mass, which
   has gone to its reference state behind it (Mac, 2026-10-23). Two beats so nothing heavy reflows
   while the card is moving: 1. body.cat moves the card (only the header and cells re-lay),
   2. body.cat-open unfolds the sheet inside it (a 0fr→1fr grid track, so the height eases) ---------- */
.label { transition: left 0.55s cubic-bezier(0.6, 0, 0.2, 1), top 0.55s cubic-bezier(0.6, 0, 0.2, 1), width 0.55s cubic-bezier(0.6, 0, 0.2, 1), transform 0.55s cubic-bezier(0.6, 0, 0.2, 1); }
.label.no-anim { transition: none !important; }   /* readout.js sets the FLIP start pose with this on */
.ft-cat, body.cat .ft-label { display: none; }
body.cat .ft-cat { display: inline; }
body.cat .label { left: 50vw; width: min(1080px, 88vw); top: 50vh; transform: translate(-50%, -50%); }
/* the sheet inside the card scrolls; the figure tag and die-cut marks stay outside it, as on the label */
body.cat .sheet { max-height: 86vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--lime) transparent; }
/* the piled section heads: the sheet's content is masked away under the pile (so the card stays see-through
   there, nothing paints over it) and copies of the passed heads sit in an overlay on top of that band.
   readout.js measures the pile (--pile, --hh) on scroll and marks the stuck copies .on */
body.cat .sheet { --pile: 0px; --pt: 0px; -webkit-mask-image: linear-gradient(#000 var(--pt), #0000 var(--pt), #0000 calc(var(--pt) + var(--pile)), #000 calc(var(--pt) + var(--pile))); mask-image: linear-gradient(#000 var(--pt), #0000 var(--pt), #0000 calc(var(--pt) + var(--pile)), #000 calc(var(--pt) + var(--pile))); }
.cat-heads { --hh: 24px; position: absolute; left: 20px; right: 20px; top: 0; z-index: 2; display: none; pointer-events: none; }
body.cat-open .cat-heads { display: block; }
.cat-heads h2 { position: absolute; left: 0; right: 0; }
.cat-heads h2:not(.on) { display: none; }
.cat-heads h2:nth-child(2) { top: var(--hh); } .cat-heads h2:nth-child(3) { top: calc(var(--hh) * 2); } .cat-heads h2:nth-child(4) { top: calc(var(--hh) * 3); } .cat-heads h2:nth-child(5) { top: calc(var(--hh) * 4); }
body.cat .sheet::-webkit-scrollbar { width: 6px; }
body.cat .sheet::-webkit-scrollbar-thumb { background: var(--lime); }
body.cat :is(.fig, .format, .callout, .schem, .glyph, .tear-2, .tear-3) { visibility: hidden; }   /* the drawing's annotations belong to the home state; under the sheet they read as debris */
.spec-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.4s cubic-bezier(0.6, 0, 0.2, 1); }   /* the spec row folds shut in the catalogue (a 0fr track, so no fixed height to outgrow) */
body.cat .spec-wrap { grid-template-rows: 0fr; }
.spec { min-height: 0; overflow: hidden; transition: padding 0.4s cubic-bezier(0.6, 0, 0.2, 1), opacity 0.25s; }
body.cat .spec { padding-top: 0; padding-bottom: 0; opacity: 0; }
.catalogue[hidden] { display: none; }   /* the author display below would otherwise beat the hidden attribute */
.catalogue { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s cubic-bezier(0.6, 0, 0.2, 1); outline: 0; }
body.cat-open .catalogue { grid-template-rows: 1fr; }
.cat-inner { min-height: 0; overflow: clip; padding: 4px 20px 0; opacity: 0; transition: opacity 0.35s; }
body.cat-open .cat-inner { opacity: 1; }
.cat-end { height: 18px; }   /* the sheet's bottom padding, inside the clipped track */
.sub .g-inline { width: 1.1em; height: 1.1em; margin: 0 0 0 0.2em; vertical-align: -0.18em; }
.catalogue h2 .zig, .cat-heads h2 .zig { width: 2em; height: 1em; margin: 0; }
.cat-dim { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); opacity: 0.75; margin: 10px 0 2px; }
.catalogue h2, .cat-heads h2 {
    padding: 6px 0;
    display: flex; align-items: center; gap: 10px; margin: 30px 0 6px;
    font-family: var(--display); font-weight: 400; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lime);
}
.cat-heads h2 { margin: 0; }
.catalogue h2 span, .cat-heads h2 span { opacity: 0.7; }
.catalogue h2::after, .cat-heads h2::after { content: ""; flex: 1; height: 1px; background: var(--rule-soft); }
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px; }
.cat-grid li.wide { grid-column: 1 / -1; }
/* no box per item: the thumbnail as a mounted plate (die-cut ticks at its corners, the same marks as the card), the figure number on its corner, captions stacked beneath */
.cat-grid a { position: relative; display: grid; grid-template-columns: 1fr; gap: 3px; align-content: start; height: 100%; color: var(--ink); text-decoration: none; }   /* start: a stretched grid would pad its auto rows and push the plate's ticks off the image */
.cat-grid a:focus-visible { outline: 1px solid var(--lime); outline-offset: 4px; }
.cat-grid a:hover b, .cat-grid a:focus-visible b { color: var(--lime); }
.cat-grid a:hover em, .cat-grid a:focus-visible em { border-color: var(--lime); }
.plate { position: relative; display: block; margin-bottom: 7px; }
.plate::before {
    content: ""; position: absolute; inset: -4px; pointer-events: none;
    --t: linear-gradient(var(--lime), var(--lime));
    background: var(--t) left top / 7px 1px, var(--t) left top / 1px 7px, var(--t) right top / 7px 1px, var(--t) right top / 1px 7px,
                var(--t) left bottom / 7px 1px, var(--t) left bottom / 1px 7px, var(--t) right bottom / 7px 1px, var(--t) right bottom / 1px 7px;
    background-repeat: no-repeat; opacity: 0.8;
}
.cat-grid img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cat-grid li.wide a { grid-template-columns: 110px 1fr; column-gap: 14px; align-items: start; }
.cat-grid li.wide .plate { grid-row: 1 / 5; margin: 0; }
.cat-grid li.wide img { aspect-ratio: 1; }
.cat-grid i { position: absolute; top: 0; right: 0; padding: 2px 5px 3px; background: var(--panel); font-family: var(--mono); font-style: normal; font-size: 9px; letter-spacing: 0.1em; color: var(--lime); }
.cat-grid li.wide i { right: auto; left: 0; }
.cat-grid b { font-family: var(--display); font-weight: 400; font-size: clamp(11px, 1vw, 13px); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.25; }
.cat-grid span:not(.plate) { font-size: 11px; line-height: 1.35; opacity: 0.72; }   /* the one-line description; the plate is a span too */
.cat-grid em { justify-self: start; margin-top: 5px; padding: 2px 6px 3px; border: 1px solid var(--rule); font-family: var(--mono); font-style: normal; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); opacity: 0.9; }
.cat-channels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.cat-channels a { padding: 5px 10px 6px; border: 1px solid var(--rule); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); text-decoration: none; }
.cat-channels a:hover, .cat-channels a:focus-visible { border-color: var(--lime); background: var(--lime-fill); outline: 0; }
.tear-origin { position: static; width: 100%; margin-top: 22px; }   /* the other tears are fixed; this one is in the sheet */

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .schem .ink path { animation: none; stroke-dashoffset: 0; }
    .tear .chev { animation: none !important; }
    .label, .catalogue, .cat-inner, .spec, .spec-wrap, .field-arrow, body { transition: none !important; }
    .unit { transition: none; }
}

/* ---------- laptop and tablet: the card shrinks to a fixed width, two data columns, before
   the flowing layout takes over ---------- */
@media (min-width: 761px) and (min-height: 641px) and (max-width: 1280px) {
    .label { left: calc(95vw - min(560px, 45vw)); top: 91vh; width: min(560px, 45vw); transform: translateY(-100%); }   /* never across the centre line; left/top so the trip to the catalogue interpolates */
    .cols { grid-template-columns: 1fr 1fr; }
    .field { align-self: stretch; }
    .spec { gap: 0 14px; }
    .tear-3 { width: 34vw; }
    .format { font-size: 9px; letter-spacing: 0.1em; }   /* fits a 720 px tall window between masthead and M */
    .title { grid-template-columns: 1fr; gap: 8px 0; align-items: start; }   /* the tracked subtitle does not fit beside the mark here */
    .sub { justify-self: start; text-align: left; }
    body.cat .label { left: 50vw; top: 50vh; width: min(1080px, 90vw); transform: translate(-50%, -50%); }
}

/* ---------- wide and short (Mac, 2026-11-09): the 75vh mid-point puts the card's foot on the readout
   below about 740 px of height, and below 765 px where the card is at its narrowest and tallest (just
   past 1280 px wide), so up to 780 px the card stands on the laptop tier's line (foot at 91vh).
   top and transform stay lengths, so the trip to the catalogue still interpolates ---------- */
@media (min-width: 1281px) and (min-height: 641px) and (max-height: 780px) {
    .label { top: 91vh; transform: translateY(-100%); }
}

/* ---------- tablet widths (Mac, 2026-11-09): the readout (right-aligned, one line) reaches the page's
   centre here and ran over the settings face, so the face sits at the left, as on phones. Not the 404
   page: it has no readout and keeps its face centred ---------- */
@media (min-width: 761px) and (max-width: 1060px) and (min-height: 641px) {
    body:not(.e404) > .imprint { left: 5vw; transform: none; }
}

/* ---------- phone: the portrait cover ---------- */
@media (max-width: 760px), (max-height: 640px) {
    body { overflow: auto; display: flex; flex-direction: column; padding-top: 44svh; }
    .format, .schem, .glyph, .masthead, .callout { display: none; }
    .fig { position: absolute; top: max(4vh, calc(max(4px, env(safe-area-inset-top)) + 40px)); left: 5vw; }   /* never under the mini player, which sits below a notch's status bar: its top plus 32 px of bar and the seek's 6 px overhang. Absolute, not fixed: it belongs to the cover and scrolls away with it, so the card and the tear never slide over it */
    .label, .tear-2, .tear-3, .readout, .imprint { position: relative; left: auto; right: auto; top: auto; bottom: auto; transform: none; margin-top: 0; }
    .tear-2 { order: 1; width: 90vw; margin: auto 5vw 0; }   /* the card block prefers the bottom of the page; the padding keeps the mass its room */
    .label { order: 2; margin: 0 5vw 0; width: auto; }
    .tear-3 { order: 3; width: 90vw; margin: 14px 5vw 0; }
    .imprint { order: 4; }
    .readout { order: 5; white-space: normal; }
    .title { grid-template-columns: 1fr; gap: 8px 0; align-items: start; }
    .sub { justify-self: start; text-align: left; }
    h1 { font-size: clamp(20px, 6.4vw, 30px); }
    .cols { grid-template-columns: 1fr 1fr; }
    .field { margin: 8px 10px; align-self: stretch; }
    .spec { grid-template-columns: 1fr auto; gap: 10px 14px; }
    /* the mini player (Mac, 2026-11-02: the full box covered the urchin): a slim bar across the top, above
       the fig block and between the corner registration marks, where nothing else sits. Title on one
       clipped line, then the transport; the seek bar is the box's bottom edge; counter and time drop out */
    .deck {
        top: max(4px, env(safe-area-inset-top)); left: calc(max(2vw, env(safe-area-inset-left)) + 22px); right: calc(max(2vw, env(safe-area-inset-right)) + 22px); width: auto; max-width: 420px; margin-left: auto;   /* clear of a landscape notch */
        display: flex; align-items: center; gap: 8px; padding: 3px 3px 3px 8px;
    }
    .dk-tag, .dk-time, .dk-wave { display: none; }
    .dk-now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; font-size: 9px; }
    .dk-btn { height: 24px; min-width: 28px; padding: 0 5px; }
    .dk-play { min-width: 44px; }
    .dk-ctl { order: 1; flex: none; }
    .dk-seek { position: absolute; left: 0; right: 0; bottom: -6px; height: 12px; }
    .figtag, .cut { display: none; }
    /* the catalogue takes the screen: a fixed sheet that scrolls itself (as on desktop), so the head pile
       and its masked band track the sheet exactly; the page beneath does not scroll meanwhile */
    body.cat { overflow: hidden; }
    body.cat .tear-2 { display: none; }
    body.cat :is(.imprint, .readout, .tear-3) { visibility: hidden; }   /* the page's own chrome would show through the sheet */
    body.cat .label { position: fixed; left: 3vw; right: 3vw; top: 2svh; width: auto; margin: 0; transform: none; }
    body.cat .sheet { max-height: 96svh; overflow-y: auto; }
    .cat-heads { left: 12px; right: 12px; }
    .cat-inner { padding: 4px 12px 0; }
    /* one item per row: a square thumbnail beside the caption (no orphan cells, no four-line names) */
    .cat-grid { grid-template-columns: 1fr; gap: 14px; }
    .cat-grid a, .cat-grid li.wide a { grid-template-columns: 96px 1fr; column-gap: 12px; align-items: start; }
    .cat-grid .plate { grid-row: 1 / 5; margin: 0; }
    .cat-grid img { aspect-ratio: 1; }
    .cat-grid i { right: auto; left: 0; }
    /* the settings button and readout share the last row; the readout shrinks a step so it stays one line on a phone */
    .imprint { margin: 18px 5vw 24px; justify-self: start; }   /* the button sits left; its face stays centred inside it */
    .readout { margin: -42px 5vw 20px; padding-left: 40px; text-align: right; font-size: 9px; letter-spacing: 0.02em; pointer-events: none; }   /* shares the row with the settings button; must not cover it */
    .reg-bl, .reg-br { display: none; }
}

/* ---------- 404: the field, the ribbons and the orb; one number over it ---------- */
.e404 { overflow: hidden; }
.e404 .notfound { position: fixed; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px; pointer-events: none; }
.e404 .notfound h1 {
    font-family: var(--display); font-weight: 400; font-size: clamp(88px, 22vw, 260px); line-height: 1; letter-spacing: 0.04em;
    color: var(--ink); white-space: nowrap;
}
.e404 .notfound .callout { position: static; opacity: 0.9; }
.e404 .tear-home { position: fixed; z-index: 3; left: 50vw; bottom: 10vh; width: min(60vw, 420px); transform: translateX(-50%); }

/* ---------- print: the mark and the addresses, nothing else ---------- */
.print-only { display: none; }
@media print {
    html, body { background: #fff !important; color: #000; overflow: visible; height: auto; min-height: 0; padding: 0; display: block; }
    @page { size: auto; margin: 0; }
    body > :not(.print-only) { display: none !important; }
    .print-only { display: block; margin: 30mm 20mm 0; font-family: var(--mono); font-size: 11pt; line-height: 1.8; color: #000; }
    .print-mark { display: block; width: 120mm; height: auto; margin: 0 0 10mm -2mm; }
    .print-only p { margin: 0; }
    .print-heart { display: block; width: 7mm; height: 6mm; margin-top: 8mm; fill: #000; }
}
