/* DA-1, a pocket instrument. Deepan Alve, v3 exploration "instrument". */

/* ------------------------------------------------------------------ tokens */

:root {
    --room: #e9ebec;
    --paper: #f7f8f8;
    --card: #fbfbfb;
    --ink: #141619;
    --ink-2: #41474e;
    --ink-3: #5f666d;
    --rule: #d6dade;
    --rule-2: #b4babf;
    --orange: #ff5b1f;
    --focus: #141619;
    --sh: 34 38 44;

    /* chassis, daylight edition: machined aluminium */
    --al-1: #dee1e4;
    --al-2: #d1d5d8;
    --al-3: #c5c9cd;
    --edge-hi: rgba(255, 255, 255, 0.8);
    --edge-lo: rgba(20, 24, 28, 0.16);
    --etch: #1f2327;
    --etch-2: #4b5157;
    --etch-hi: rgba(255, 255, 255, 0.6);
    --hole: #25282c;
    --hole-lip: rgba(255, 255, 255, 0.75);
    --well: #7e848a;
    --cap-1: #3a3e43;
    --cap-2: #25282c;
    --cap-skirt: #15171a;
    --legend: #f2f0eb;
    --legend-glow: transparent;
    --kn-a: #f6f7f8;
    --kn-b: #b6bbc0;
    --kn-c: #e6e8ea;
    --screw-a: #fbfbfc;
    --screw-b: #c4c8cc;
    --screw-c: #8e949a;
    --slot-a: #5b6168;
    --slot-b: #3b4046;
    --glass: #0b0c0d;
    --bloom: 0;
    --pool: rgba(255, 255, 255, 0.7);
    --vignette: rgba(34, 38, 44, 0.12);
    --led: #2b2f33;
    --led-hot: #ff5b1f;
    --led-glow: transparent;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --detent: cubic-bezier(0.34, 1.56, 0.64, 1);

    --gutter: clamp(16px, 4vw, 56px);
    --pad: clamp(16px, 4.4vw, 64px);
    --gap: clamp(14px, 2vw, 28px);
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --room: #0b0c0d;
    --paper: #111315;
    --card: #15181a;
    --ink: #e8eaec;
    --ink-2: #b5bbc1;
    --ink-3: #8d949b;
    --rule: #24282c;
    --rule-2: #3b4046;
    --focus: #ffb04a;
    --sh: 0 0 0;

    /* night edition: anodised black, backlight on */
    --al-1: #232528;
    --al-2: #1b1d20;
    --al-3: #161719;
    --edge-hi: rgba(255, 255, 255, 0.1);
    --edge-lo: rgba(0, 0, 0, 0.6);
    --etch: #c9ced3;
    --etch-2: #8e959c;
    --etch-hi: transparent;
    --hole: #050606;
    --hole-lip: rgba(255, 255, 255, 0.07);
    --well: #070808;
    --cap-1: #2a2d31;
    --cap-2: #1d1f22;
    --cap-skirt: #08090a;
    --legend: #ffb04a;
    --legend-glow: rgba(255, 150, 40, 0.55);
    --kn-a: #3b3e43;
    --kn-b: #121315;
    --kn-c: #2a2d31;
    --screw-a: #4a4e53;
    --screw-b: #26292c;
    --screw-c: #121315;
    --slot-a: #050606;
    --slot-b: #0d0e10;
    --glass: #120b05;
    --bloom: 1;
    /* night: the display's amber spill on the wall */
    --pool: rgba(255, 150, 60, 0.08);
    --vignette: rgba(0, 0, 0, 0.6);
    --led: #ffb04a;
    --led-hot: #ffd9a8;
    --led-glow: rgba(255, 150, 40, 0.55);

    color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 64px;
    background: var(--room);
}


@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Lenis drives the scroll when it runs; native smooth scrolling would fight it */
html.lenis {
    scroll-behavior: auto;
}

body {
    margin: 0;
    background: var(--room);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.55;
    font-feature-settings: "ss01" 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main {
    overflow-x: clip;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
    margin: 0;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--orange);
    color: #141619;
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 100;
    padding: 12px 16px;
    background: var(--ink);
    color: var(--paper);
    font: 500 14px/1 var(--mono);
    text-decoration: none;
    border-radius: 4px;
    transform: translateY(-160%);
}

.skip:focus-visible {
    transform: none;
}

.defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    color: var(--ink);
}

/* The room: a full-screen shade used only while the backlight switch is thrown */
.room {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    background: #0b0c0d;
    transition: opacity 820ms var(--ease-out);
}

.room[data-tone="light"] {
    background: #e9ebec;
    z-index: 70;
}

html.is-dimming .room {
    opacity: 1;
    transition: opacity 560ms var(--ease-in-out);
}

html.is-lighting .room {
    opacity: 1;
    transition: opacity 200ms var(--ease-out);
}

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(24px, 6vh, 72px) var(--gutter) clamp(28px, 6vh, 64px);
    /* The surface the unit sits on, lit like a film still: a pool of key light, falloff
       into the corners and fine grain. Grain lives here, not in a pseudo-element on top. */
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
        radial-gradient(ellipse 50% 44% at 50% 44%, var(--pool), transparent 72%),
        radial-gradient(ellipse 120% 95% at 50% 40%, transparent 50%, var(--vignette));
}

/* The LED wall (drawn by the script): the display's dots at room scale, behind the unit.
   No z-index, so the display can still rise above .room when the light switch is thrown;
   the stage sits above the wall by position alone. */
.wall {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.stage {
    position: relative; /* above the wall; no z-index, so no stacking context */
    display: grid;
    gap: clamp(14px, 2.4vh, 24px);
    justify-items: start;
}

/* The small print under the unit: whether Deepan is available, and where the manual
   starts. Kept quiet so the unit leads. Spans the unit's width. */
.hero-foot {
    position: relative;
    justify-self: stretch;
    contain: inline-size; /* the unit sets the stage's width, never the caption */
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 24px;
}

/* Both are lit like a second, smaller readout under the unit: the same dot-matrix
   letters as the display, glowing amber at night and printed dark by day. */
.hero-status,
.hero-cue {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    font: 700 15px/1 "Doto", var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--led);
    text-shadow: 0 0 6px var(--led-glow), 0 0 14px var(--led-glow);
    white-space: nowrap;
}

.hero-status {
    justify-self: start;
}

/* a panel lamp, lit, with a slow ring going out from it: the same orange as the Call key */
.lamp {
    position: relative;
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #ffd9c4, var(--orange) 62%);
    box-shadow: 0 0 8px rgba(255, 91, 31, 0.75), 0 0 0 1px rgba(120, 30, 0, 0.3);
}

.lamp::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(255, 91, 31, 0.7);
    opacity: 0;
}

.hero-cue {
    text-decoration: none;
    border-radius: 2px;
    transition: color 200ms var(--ease-out);
}

.hero-cue:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

/* a drawn arrow, so it matches the hairlines of the manual's figures */
.cue-arrow {
    position: relative;
    width: 8px;
    height: 12px;
    filter: drop-shadow(0 0 4px var(--led-glow));
}

.cue-arrow::before,
.cue-arrow::after {
    content: "";
    position: absolute;
    left: 50%;
}

.cue-arrow::before {
    top: 0;
    bottom: 1px;
    width: 1.5px;
    margin-left: -0.75px;
    background: currentColor;
}

.cue-arrow::after {
    bottom: 1px;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transform-origin: 70% 70%;
}

@media (hover: hover) and (pointer: fine) {
    .hero-cue:hover {
        color: var(--led-hot);
    }
}

/* on phones the manual's running head is already in view, so the cue would only repeat it */
@media (max-width: 599px) {
    .hero-foot {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-cue {
        display: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    html.js .unit {
        animation: unit-in 1000ms var(--ease-out) backwards;
    }

    html.js .hero-foot {
        animation: line-in 900ms var(--ease-out) 420ms backwards;
    }

    .lamp {
        animation: lamp 2.4s ease-in-out infinite;
    }

    .lamp::after {
        animation: ping 2.4s var(--ease-out) infinite;
    }

    .cue-arrow {
        animation: cue 2.4s var(--ease-in-out) 1.6s infinite;
    }
}

@keyframes lamp {
    50% {
        box-shadow: 0 0 3px rgba(255, 91, 31, 0.4), 0 0 0 1px rgba(120, 30, 0, 0.3);
    }
}

@keyframes ping {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    70%,
    100% {
        opacity: 0;
        transform: scale(2.6);
    }
}

@keyframes cue {
    0%, 60%, 100% {
        transform: none;
    }

    30% {
        transform: translateY(4px);
    }
}

@keyframes unit-in {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
}

@keyframes line-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ------------------------------------------------------------------ the unit
   Everything on the chassis is placed on a grid of u, where the landscape
   unit is 40u x 24u and the portrait (phone) unit is 22u x 35u. */

.unit {
    --W: min(860px, 56vw, calc((100svh - 260px) * 5 / 3));
    --u: calc(var(--W) / 40);
    width: var(--W);
    font-family: var(--mono); /* hardware lettering, not book type */
}

.chassis {
    position: relative;
    width: 100%;
    height: calc(var(--u) * 24);
    border-radius: calc(var(--u) * 1.15);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 9%),
        radial-gradient(120% 90% at 22% 0%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%),
        linear-gradient(168deg, var(--al-1) 0%, var(--al-2) 52%, var(--al-3) 100%);
    box-shadow:
        inset 0 1px 0 var(--edge-hi),
        inset 0 -1px 0 var(--edge-lo),
        inset 1px 0 0 rgba(255, 255, 255, 0.18),
        inset -1px 0 0 rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(var(--sh) / 0.1),
        0 1px 1px rgba(var(--sh) / 0.2),
        0 calc(var(--u) * 0.5) calc(var(--u) * 0.9) calc(var(--u) * -0.3) rgba(var(--sh) / 0.24),
        0 calc(var(--u) * 1.8) calc(var(--u) * 3) calc(var(--u) * -1) rgba(var(--sh) / 0.36);
    -webkit-user-select: none;
    user-select: none;
}

:root[data-theme="dark"] .chassis {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 9%),
        radial-gradient(120% 90% at 22% 0%, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 60%),
        linear-gradient(168deg, var(--al-1) 0%, var(--al-2) 52%, var(--al-3) 100%);
    box-shadow:
        inset 0 1px 0 var(--edge-hi),
        inset 0 -1px 0 var(--edge-lo),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 1px 1px rgba(0, 0, 0, 0.6),
        0 calc(var(--u) * 1.6) calc(var(--u) * 3) calc(var(--u) * -0.8) rgba(0, 0, 0, 0.75);
}

.part {
    position: absolute;
    left: calc(var(--x) * var(--u));
    top: calc(var(--y) * var(--u));
    width: calc(var(--w) * var(--u));
    height: calc(var(--h) * var(--u));
    margin: 0;
}

/* Engraved text: cut into the metal, lit from above */
.engrave,
.unit-name,
.model,
.sw-name,
.sw-marks,
.bracket,
.plate {
    color: var(--etch);
    text-shadow: 0 1px 0 var(--etch-hi);
}

/* screws */
.screw {
    position: absolute;
    width: calc(var(--u) * 0.84);
    height: calc(var(--u) * 0.84);
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, var(--screw-a) 0, var(--screw-b) 48%, var(--screw-c) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.22),
        0 1px 0 var(--etch-hi);
}

.screw::after {
    content: "";
    position: absolute;
    inset: 27%;
    background: linear-gradient(180deg, #24282c, #52575d);
    clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    transform: rotate(var(--r, 0deg));
}

.screw:nth-child(1) { left: calc(var(--u) * 0.63); top: calc(var(--u) * 0.63); }
.screw:nth-child(2) { right: calc(var(--u) * 0.63); top: calc(var(--u) * 0.63); }
.screw:nth-child(3) { left: calc(var(--u) * 0.63); bottom: calc(var(--u) * 0.63); }
.screw:nth-child(4) { right: calc(var(--u) * 0.63); bottom: calc(var(--u) * 0.63); }

/* brand + name */
.brand {
    --x: 2.2; --y: 1.55; --w: 16; --h: 3.7;
    display: flex;
    align-items: flex-end;
    gap: calc(var(--u) * 0.85);
}

/* The maker's mark, D&A, drilled through the panel: a mask of holes inked twice, a lit
   lower lip and the hole itself, like the speaker grille. */
.model {
    position: relative;
    display: block;
    flex: none;
    height: calc(var(--u) * 2.1);
    aspect-ratio: 37 / 12;
}

.model::before,
.model::after {
    content: "";
    position: absolute;
    inset: 0;
    -webkit-mask: url("../images/logo/da-drilled.svg") center / 100% 100% no-repeat;
    mask: url("../images/logo/da-drilled.svg") center / 100% 100% no-repeat;
}

.model::before {
    background: var(--hole-lip);
    transform: translateY(1px);
}

.model::after {
    background: var(--hole);
}

.unit-name {
    display: grid;
    gap: calc(var(--u) * 0.16);
    padding-bottom: calc(var(--u) * 0.02);
    font-family: var(--mono);
    font-size: calc(var(--u) * 0.56);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.unit-name span:last-child {
    color: var(--etch-2);
}

/* slide switches */
.switches {
    --x: 18.6; --y: 1.6; --w: 10.6; --h: 3.4;
    display: flex;
    gap: calc(var(--u) * 1);
}

.sw {
    appearance: none;
    border: 0;
    margin: 0;
    padding: calc(var(--u) * 0.15) 0;
    background: none;
    display: grid;
    justify-items: start;
    align-content: start;
    row-gap: calc(var(--u) * 0.36);
    width: calc(var(--u) * 4.6);
    min-height: 44px;
    cursor: pointer;
    border-radius: calc(var(--u) * 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sw-name {
    display: flex;
    align-items: center;
    gap: calc(var(--u) * 0.35);
    font: 500 calc(var(--u) * 0.52) / 1 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sw-slot {
    position: relative;
    width: calc(var(--u) * 3.4);
    height: calc(var(--u) * 0.64);
    border-radius: calc(var(--u) * 0.32);
    background: linear-gradient(180deg, var(--slot-b), var(--slot-a));
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.6),
        0 1px 0 var(--etch-hi);
}

.sw-thumb {
    position: absolute;
    top: 50%;
    left: calc(var(--u) * 0.06);
    width: calc(var(--u) * 1.5);
    height: calc(var(--u) * 1.12);
    margin-top: calc(var(--u) * -0.56);
    border-radius: calc(var(--u) * 0.2);
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0 1px, rgba(255, 255, 255, 0) 1px calc(var(--u) * 0.16)) center / 56% 52% no-repeat,
        linear-gradient(180deg, var(--kn-a), var(--kn-b));
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.25),
        0 calc(var(--u) * 0.12) calc(var(--u) * 0.25) rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 200ms var(--ease-out);
}

.sw[aria-pressed="true"] .sw-thumb {
    transform: translateX(calc(var(--u) * 1.78));
}

/* the position the switch is in reads as engraved ink, the other stays quiet */
.sw[aria-pressed="false"] .sw-marks span:first-child,
.sw[aria-pressed="true"] .sw-marks span:last-child {
    color: var(--etch);
}

:root[data-theme="dark"] .sw-thumb {
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0 1px, rgba(255, 255, 255, 0) 1px calc(var(--u) * 0.16)) center / 56% 52% no-repeat,
        linear-gradient(180deg, #55595f, #2a2d31);
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.6),
        0 calc(var(--u) * 0.12) calc(var(--u) * 0.25) rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

:root[data-theme="dark"] #sw-light .sw-marks span:last-child {
    color: var(--legend);
    text-shadow: 0 0 calc(var(--u) * 0.3) var(--legend-glow);
}

.sw-marks {
    display: flex;
    justify-content: space-between;
    width: calc(var(--u) * 3.4);
    font: 500 calc(var(--u) * 0.4) / 1 var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--etch-2);
}

.led {
    width: calc(var(--u) * 0.34);
    height: calc(var(--u) * 0.34);
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #8c8079, #4e4642);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5), 0 1px 0 var(--etch-hi);
}

.sw[aria-pressed="true"] .led {
    background: radial-gradient(circle at 40% 35%, #ffd9c4, var(--orange) 62%);
    box-shadow: 0 0 calc(var(--u) * 0.45) rgba(255, 91, 31, 0.85), 0 0 0 1px rgba(120, 30, 0, 0.35);
}

/* speaker grille: drilled holes with a lit lower lip */
.grille {
    --x: 30.2; --y: 1.8; --w: 7.59; --h: 3.45;
    --p: calc(var(--u) * 0.69);
    --hr: calc(var(--p) * 0.235);
    background-image:
        radial-gradient(circle at 50% 44%, var(--hole) 0 var(--hr), transparent calc(var(--hr) + 0.7px)),
        radial-gradient(circle at 50% 58%, var(--hole-lip) 0 var(--hr), transparent calc(var(--hr) + 0.7px));
    background-size: var(--p) var(--p);
}

/* the display window */
.window {
    --x: 1.88; --y: 6.28; --w: 23.04; --h: 8.44;
    border-radius: calc(var(--u) * 0.86);
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(0, 0, 0, 0.06),
        0 1px 0 var(--etch-hi);
}

.display {
    --x: 2.2; --y: 6.6; --w: 22.4; --h: 7.8;
    z-index: 51;
    border-radius: calc(var(--u) * 0.55);
    background: var(--glass);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
}

/* backlight spill around the glass */
.bloom {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 calc(var(--u) * 1.8) calc(var(--u) * 0.2) rgba(255, 140, 40, 0.2);
    opacity: 0;
    transition: opacity 700ms var(--ease-out);
}

:root[data-theme="dark"] .bloom,
.display.is-warm .bloom {
    opacity: 1;
}

:root[data-theme="dark"] .display.is-cold .bloom {
    opacity: 0;
}

.matrix {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.display::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.06) 0 31%, rgba(255, 255, 255, 0) 31.2%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 34%);
    box-shadow:
        inset 0 calc(var(--u) * 0.1) calc(var(--u) * 0.3) rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* the encoder */
.encoder {
    --x: 27.2; --y: 6.1; --w: 8.8; --h: 8.8;
}

.scale {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.sc-minor,
.sc-major {
    fill: none;
    stroke: var(--etch-2);
    stroke-linecap: round;
}

.sc-minor { stroke-width: 0.5; }
.sc-major { stroke: var(--etch); stroke-width: 0.85; }

.sc-lbl {
    fill: var(--etch-2);
    font: 500 6px var(--mono);
    text-anchor: middle;
    dominant-baseline: central;
}

.sc-lbl.is-on {
    fill: var(--etch);
    font-weight: 600;
}

.sc-name {
    fill: var(--etch-2);
    font: 500 4.1px var(--mono);
    letter-spacing: 0.16em;
    text-anchor: middle;
    dominant-baseline: central;
}

:root[data-theme="dark"] .sc-lbl.is-on {
    fill: var(--legend);
}

.knob {
    position: absolute;
    left: 13.64%;
    top: 13.64%;
    width: 72.73%;
    height: 72.73%;
    border-radius: 50%;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    background: conic-gradient(from 205deg, var(--kn-a), var(--kn-b) 11%, var(--kn-c) 23%, var(--kn-b) 36%, var(--kn-a) 49%, var(--kn-b) 61%, var(--kn-c) 74%, var(--kn-b) 87%, var(--kn-a));
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.16),
        0 calc(var(--u) * 0.14) calc(var(--u) * 0.2) rgba(var(--sh) / 0.35),
        calc(var(--u) * 0.18) calc(var(--u) * 0.6) calc(var(--u) * 0.8) calc(var(--u) * -0.1) rgba(var(--sh) / 0.4);
}

.knob.is-dragging {
    cursor: grabbing;
}

/* top face: spun, with concentric machining rings */
.knob::before {
    content: "";
    position: absolute;
    inset: 9%;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0 0.6px, rgba(0, 0, 0, 0.035) 0.6px 1.6px),
        conic-gradient(from 25deg, var(--kn-c), var(--kn-b) 15%, var(--kn-a) 30%, var(--kn-b) 45%, var(--kn-c) 60%, var(--kn-b) 76%, var(--kn-a) 91%, var(--kn-c));
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.55),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.1);
}

.knob-cap {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    transform: rotate(var(--rot, -135deg));
    transition: transform 220ms var(--detent);
}

.knob.is-dragging .knob-cap {
    transition: none;
}

/* knurled rim */
.knob-cap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-conic-gradient(rgba(0, 0, 0, 0.12) 0 1.4deg, rgba(255, 255, 255, 0.08) 1.4deg 4deg);
    -webkit-mask: radial-gradient(circle, transparent 0 calc(41% - 0.5px), #000 41%);
    mask: radial-gradient(circle, transparent 0 calc(41% - 0.5px), #000 41%);
}

.knob-mark {
    position: absolute;
    left: 50%;
    top: 12%;
    width: calc(var(--u) * 0.22);
    height: 25%;
    margin-left: calc(var(--u) * -0.11);
    border-radius: calc(var(--u) * 0.11);
    background: var(--etch);
    box-shadow: 0 1px 0 var(--etch-hi);
}

:root[data-theme="dark"] .knob-mark {
    background: var(--legend);
    box-shadow: 0 0 calc(var(--u) * 0.3) var(--legend-glow);
}

/* focus: a ring drawn round the whole dial, clear of the scale */
.knob:focus-visible {
    outline-offset: calc(var(--u) * 1.32);
    border-radius: 50%;
}

/* bracket grouping keys 1 to 6 */
.bracket {
    --x: 2.2; --y: 15.45; --w: 30.38; --h: 0.9;
    display: flex;
    align-items: flex-start;
    gap: calc(var(--u) * 0.5);
    font: 500 calc(var(--u) * 0.46) / 1 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--etch-2);
}

.bracket::before,
.bracket::after {
    content: "";
    flex: 1;
    height: calc(var(--u) * 0.42);
    margin-top: calc(var(--u) * 0.23);
    border-top: 1px solid var(--etch-2);
    opacity: 0.85;
}

.bracket::before { border-left: 1px solid var(--etch-2); border-top-left-radius: 2px; }
.bracket::after { border-right: 1px solid var(--etch-2); border-top-right-radius: 2px; }

/* keys */
.keys {
    --x: 2.2; --y: 16.7; --w: 35.6; --h: 4.2;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: calc(var(--u) * 0.9);
}

.key {
    position: relative;
    display: block;
    border-radius: calc(var(--u) * 0.6);
    background: var(--well);
    box-shadow:
        inset 0 calc(var(--u) * 0.06) calc(var(--u) * 0.14) rgba(0, 0, 0, 0.55),
        0 1px 0 var(--etch-hi);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* the keycap's side wall and shadow: static, the cap travels down over it */
.key::before {
    content: "";
    position: absolute;
    inset: calc(var(--u) * 0.1 + max(2px, calc(var(--u) * 0.12))) calc(var(--u) * 0.1) calc(var(--u) * 0.09);
    border-radius: calc(var(--u) * 0.5);
    background: var(--cap-skirt);
    box-shadow: 0 calc(var(--u) * 0.1) calc(var(--u) * 0.24) rgba(0, 0, 0, 0.32);
}

.cap {
    --travel: max(2px, calc(var(--u) * 0.12));
    position: absolute;
    inset: calc(var(--u) * 0.1) calc(var(--u) * 0.1) calc(var(--u) * 0.24);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--u) * 0.42) calc(var(--u) * 0.46);
    border-radius: calc(var(--u) * 0.5);
    background: linear-gradient(180deg, var(--cap-1), var(--cap-2));
    color: var(--legend);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    transition: transform 170ms var(--ease-out);
}

.key:active .cap,
.key.is-down .cap {
    transform: translateY(var(--travel));
    transition-duration: 45ms;
}

.k-n {
    font: 500 calc(var(--u) * 0.5) / 1 var(--mono);
    opacity: 0.72;
}

.k-t {
    font: 600 calc(var(--u) * 0.5) / 1.15 var(--mono);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.k-n,
.k-t {
    text-shadow: 0 0 calc(var(--u) * 0.35) var(--legend-glow);
}

.key--call .cap {
    justify-content: flex-end;
    background: linear-gradient(180deg, #ff6d33, #f2501a);
    color: #1b0c05;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(120, 30, 0, 0.35);
}

.key--call::before {
    background: #a83508;
    box-shadow: 0 calc(var(--u) * 0.1) calc(var(--u) * 0.24) rgba(150, 40, 0, 0.3);
}

.key--call .k-t {
    text-shadow: none;
}

.key:focus-visible {
    outline-offset: 2px;
    border-radius: calc(var(--u) * 0.66);
}

@media (hover: hover) and (pointer: fine) {
    .key:hover .cap {
        background: linear-gradient(180deg, color-mix(in srgb, var(--cap-1) 88%, #fff), var(--cap-2));
    }

    .key--call:hover .cap {
        background: linear-gradient(180deg, #ff7840, #f2501a);
    }

    .sw:hover .sw-thumb {
        box-shadow:
            0 1px 0 rgba(0, 0, 0, 0.25),
            0 calc(var(--u) * 0.16) calc(var(--u) * 0.3) rgba(0, 0, 0, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }
}

/* serial plate */
.plate {
    --x: 2.2; --y: 22.12; --w: 35.6; --h: 0.9;
    display: flex;
    align-items: center;
    gap: calc(var(--u) * 1.6);
    font: 500 calc(var(--u) * 0.44) / 1 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--etch-2);
}

.edition-plate {
    margin-left: auto;
}

/* Night edition: legends and engravings carry a little light */
:root[data-theme="dark"] .model,
:root[data-theme="dark"] .unit-name span:first-child {
    color: #dde1e5;
}

/* ------------------------------------------------------------------ the unit, portrait (phones) */

@media (max-width: 599px) {
    .unit {
        --W: calc(100vw - 2 * var(--gutter));
        --u: calc(var(--W) / 22);
    }

    .chassis {
        height: calc(var(--u) * 35);
        border-radius: calc(var(--u) * 1.3);
    }

    .screw:nth-child(n) {
        width: calc(var(--u) * 0.8);
        height: calc(var(--u) * 0.8);
    }

    .brand {
        --x: 1.75; --y: 1.6; --w: 11.2; --h: 4.1;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0;
    }

    .model {
        height: calc(var(--u) * 1.9);
    }

    .unit-name {
        font-size: calc(var(--u) * 0.64);
        gap: calc(var(--u) * 0.12);
    }

    .grille {
        --x: 13.5; --y: 1.62; --w: 6.9; --h: 4.14;
        --p: calc(var(--u) * 0.69);
    }

    .window { --x: 1.28; --y: 6.48; --w: 19.44; --h: 7.54; border-radius: calc(var(--u) * 0.9); }
    .display { --x: 1.6; --y: 6.8; --w: 18.8; --h: 6.9; }

    .encoder { --x: 1.35; --y: 14.55; --w: 8.6; --h: 8.6; }
    .sc-lbl { font-size: 6.8px; }
    .sc-name { font-size: 5.4px; letter-spacing: 0.12em; }

    .switches {
        --x: 11.7; --y: 15.1; --w: 8.7; --h: 7.4;
        flex-direction: column;
        gap: calc(var(--u) * 0.55);
    }

    .sw {
        width: 100%;
        row-gap: calc(var(--u) * 0.36);
    }

    .sw-name { font-size: calc(var(--u) * 0.6); }
    .sw-slot,
    .sw-marks { width: calc(var(--u) * 4); }
    .sw-marks { font-size: calc(var(--u) * 0.46); }
    .sw-thumb { width: calc(var(--u) * 1.7); height: calc(var(--u) * 1.2); margin-top: calc(var(--u) * -0.6); }
    .sw[aria-pressed="true"] .sw-thumb { transform: translateX(calc(var(--u) * 2.18)); }

    .bracket {
        --x: 1.6; --y: 23.75; --w: 13.95; --h: 0.9;
        font-size: calc(var(--u) * 0.5);
    }

    .keys {
        --x: 1.6; --y: 25.05; --w: 18.8; --h: 7.9;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(3, minmax(0, 1fr));
        gap: calc(var(--u) * 0.6);
    }

    .key--call {
        grid-column: 1 / -1;
    }

    .cap {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: calc(var(--u) * 0.3);
        padding: 0 calc(var(--u) * 0.4);
    }

    .k-n { font-size: calc(var(--u) * 0.58); }
    .k-t { font-size: calc(var(--u) * 0.6); letter-spacing: 0.02em; white-space: nowrap; }

    .key--call .cap { justify-content: center; }

    .plate {
        --x: 1.6; --y: 33.55; --w: 18.8; --h: 0.9;
        gap: calc(var(--u) * 0.9);
        font-size: calc(var(--u) * 0.46);
        letter-spacing: 0.1em;
    }

    .plate span:nth-child(2) { display: none; }
}

@media (min-width: 600px) and (max-width: 1023px) {
    .unit {
        --W: min(920px, calc(100vw - 2 * var(--gutter)), calc((100svh - 200px) * 5 / 3));
    }
}

/* tablets and phones: the unit sits near the top; the manual follows straight after */
@media (max-width: 1023px) {
    .hero {
        min-height: 0;
        padding-top: clamp(20px, 6vw, 64px);
        padding-bottom: clamp(36px, 7vw, 72px);
    }
}

/* copy that changes with the theme */
.if-dark { display: none; }
:root[data-theme="dark"] .if-dark { display: inline; }
:root[data-theme="dark"] .if-light { display: none; }

/* ------------------------------------------------------------------ the manual */

.manual {
    position: relative;
    margin: 0 clamp(0px, 2.2vw, 36px);
    background: var(--paper);
    box-shadow: 0 0 0 1px var(--rule);
    outline: none;
}

.runhead {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    height: 56px;
    padding: 0 var(--pad);
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    font: 500 13px/1 var(--mono);
}

.rh-home {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    flex: none;
    min-height: 44px;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
}

.rh-model {
    font: 600 15px/1 var(--serif);
    letter-spacing: -0.01em;
}

.rh-title {
    color: var(--ink-3);
}

.rh-list {
    display: flex;
    gap: clamp(14px, 1.8vw, 26px);
    margin-left: auto;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.rh-list::-webkit-scrollbar {
    display: none;
}

.rh-list a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    white-space: nowrap;
    color: var(--ink-2);
    text-decoration: none;
}

.rh-n {
    color: var(--ink-3);
}

.rh-list a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    height: 2px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 260ms var(--ease-out);
}

.rh-list a[aria-current="true"] {
    color: var(--ink);
}

.rh-list a[aria-current="true"]::after {
    transform: scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
    .rh-list a:hover {
        color: var(--ink);
    }
}

/* shared section frame */
.cover,
.ch {
    padding: clamp(56px, 8vw, 120px) max(var(--pad), calc((100% - 1200px) / 2));
}

.ch {
    padding-top: clamp(40px, 5vw, 72px);
}

.ch-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
    padding-top: 22px;
    border-top: 2px solid var(--ink);
}

.ch-n {
    grid-column: 1;
    grid-row: 1;
    font: 400 clamp(40px, 5.2vw, 72px) / 0.86 var(--mono);
    letter-spacing: -0.04em;
    color: var(--ink-3);
}

:root[data-theme="dark"] .ch-n {
    color: #ffb04a;
    text-shadow: 0 0 22px rgba(255, 150, 40, 0.28);
}

/* the title sits one column from the number: a single digit needs no more room than that */
.ch-title {
    grid-column: 2 / span 8;
    grid-row: 1;
}

.ch-title h2 {
    font-size: clamp(38px, 5.2vw, 72px);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.ch-dek {
    margin-top: 16px;
    max-width: 44ch;
    font-size: clamp(17px, 1.35vw, 20px);
    line-height: 1.45;
    color: var(--ink-2);
    text-wrap: pretty;
}

/* a small credit line under a dek, like the note under a photograph */
.ch-note {
    display: block;
    margin-top: 10px;
    font: 500 12px/1.4 var(--mono);
    letter-spacing: 0.08em;
    color: var(--ink-3);
}

.ch-key {
    grid-column: 10 / span 3;
    grid-row: 1;
    justify-self: end;
    display: grid;
    justify-items: end;
    gap: 8px;
    color: var(--ink-2);
}

.mini {
    width: clamp(112px, 11vw, 150px);
    height: auto;
    overflow: visible;
    --sw: 2.6;
    --num: 0;
}

.ch-key figcaption,
.fig-n,
figcaption {
    font: 500 12px/1.3 var(--mono);
    letter-spacing: 0.04em;
    color: var(--ink-3);
}

/* line drawing styles (applied inside every <use> of #da1) */
.ln {
    fill: none;
    stroke: currentColor;
    stroke-width: var(--sw, 1);
    stroke-linejoin: round;
    stroke-linecap: round;
}

.ld-thin {
    stroke-width: calc(var(--sw, 1) * 0.7);
}

.ld-greek {
    stroke-width: calc(var(--sw, 1) * 1.4);
    opacity: 0.45;
}

.ld-dots {
    opacity: 0.6;
}

.ld-brand {
    fill: currentColor;
    font: 500 23px var(--serif);
    letter-spacing: -0.03em;
}

.ld-key {
    stroke-width: var(--sw, 1);
}

/* ------------------------------------------------------------------ cover */

.cover {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 48px;
    align-items: start;
}

.cover-head {
    grid-column: 1 / span 5;
}

.cover-head h2 {
    font-size: clamp(44px, 6vw, 88px);
    font-weight: 500;
    line-height: 0.92;
    letter-spacing: -0.02em;
}

.edition {
    margin-top: 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font: 500 14px/1.35 var(--mono);
    color: var(--ink);
}

.edition::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--ink);
    box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 1px var(--ink);
}

:root[data-theme="dark"] .edition::before {
    background: #ffb04a;
    box-shadow: 0 0 10px rgba(255, 150, 40, 0.7);
}

.cover-intro {
    margin-top: 28px;
    max-width: 40ch;
    font-size: clamp(18px, 1.5vw, 21px);
    line-height: 1.45;
    color: var(--ink-2);
    text-wrap: pretty;
}

.cover-specs {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px 24px;
    max-width: 460px;
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--rule-2);
    font: 500 13px/1.45 var(--mono);
}

.cover-specs dt {
    color: var(--ink-3);
}

.cover-specs dd {
    margin: 0;
    color: var(--ink);
}

.contents {
    margin-top: 48px;
    max-width: 460px;
}

.contents-h {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.contents ol {
    padding: 0;
    list-style: none;
}

.contents li {
    border-bottom: 1px solid var(--rule);
}

.contents a {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 10px;
    min-height: 44px;
    padding: 11px 0 10px;
    text-decoration: none;
}

.c-n {
    font: 500 12.5px/1 var(--mono);
    color: var(--ink-3);
}

.c-t {
    font-weight: 600;
    font-size: 16.5px;
    line-height: 1.3;
}

.c-p {
    font: 500 12.5px/1.3 var(--mono);
    color: var(--ink-2);
    text-align: right;
}

@media (hover: hover) and (pointer: fine) {
    .contents a:hover .c-t {
        text-decoration: underline;
        text-decoration-color: var(--orange);
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }
}

.fig-controls {
    grid-column: 7 / span 6;
    display: grid;
    gap: 18px;
    color: var(--ink-2);
}

.fig1 {
    width: 100%;
    height: auto;
    overflow: visible;
    --sw: 1.15;
    --kc: var(--orange);
}

.fig-controls figcaption {
    order: 1;
    color: var(--ink-3);
}

.fig-controls .legend {
    order: 2;
}

.fig-n {
    color: var(--ink);
    margin-right: 8px;
}

.lead {
    fill: none;
    stroke: var(--ink);
    stroke-width: 0.9;
}

.pin circle {
    fill: var(--paper);
    stroke: var(--ink);
    stroke-width: 1;
}

.pin text {
    fill: var(--ink);
    font: 600 10px var(--mono);
    text-anchor: middle;
    dominant-baseline: central;
}

.legend {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--gap);
    row-gap: 18px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink-2);
}

.legend li {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: baseline;
}

.legend b {
    display: block;
    color: var(--ink);
    font-weight: 600;
}

.lg-n {
    font: 600 12px/1 var(--mono);
    color: var(--ink);
}

/* ------------------------------------------------------------------ 1 programs */

.ch-programs {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
}

.ch-programs > .ch-head {
    grid-column: 1 / -1;
}

/* Projects: a bento of tiles, all visible at once. Each reads in seconds: the screen,
   the name, one plain line, a headline number, the stack, and a way in. How each one is
   built folds away under a toggle for whoever wants it. */
.ch-programs {
    row-gap: clamp(18px, 2vw, 28px);
}

.ch-programs > .ch-head {
    margin-bottom: clamp(10px, 2vw, 22px);
}

.tile {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--rule);
    border-radius: 18px;
    background: var(--card);
    overflow: hidden;
    transition: transform 260ms var(--ease-out), border-color 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}

/* cards side by side share a height */
.ch-programs > .tile {
    align-self: stretch;
}

.tile--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
}

.tile .screen {
    margin: 0;
    padding: 14px 14px 0;
}

.tile--wide .screen {
    flex: 0 0 58%;
    padding: 14px;
}

.tile .glass img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 6px;
}

.tile .prog-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px clamp(18px, 2.2vw, 30px) 26px;
}

.tile--wide .prog-body {
    padding: 28px clamp(22px, 3vw, 44px);
}

.tile h3 {
    margin: 0;
    font-size: clamp(30px, 2.8vw, 42px);
}

.tile--wide h3 {
    font-size: clamp(38px, 4vw, 60px);
}

.tile .result {
    margin: 0;
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.4;
    color: var(--ink-2);
    max-width: 38ch;
}

/* the headline number, lit like the display */
.stat {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 2px 0 0;
}

.stat b {
    font: 700 clamp(30px, 2.8vw, 42px) / 1 "Doto", var(--mono);
    letter-spacing: 0.02em;
    color: var(--orange);
    text-shadow: 0 0 14px rgba(255, 91, 31, 0.35);
}

.stat span {
    font: 500 12.5px/1.3 var(--mono);
    color: var(--ink-3);
}

/* the stack, as chips */
.tile .stack {
    margin: 0;
}

.tile .stack dt {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.tile .stack dd {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.tile .stack dd span {
    padding: 5px 10px 4px;
    border: 1px solid var(--rule-2);
    border-radius: 999px;
    font: 500 11.5px/1 var(--mono);
    color: var(--ink-2);
}

/* the way in: a real button, not a footnote */
.tile .out {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    font: 600 13px/1 var(--mono);
    text-decoration: none;
    color: var(--ink);
    transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.tile .status {
    margin-top: auto;
}

@media (hover: hover) and (pointer: fine) {
    .tile:hover {
        transform: translateY(-4px);
        border-color: var(--rule-2);
        box-shadow: 0 26px 40px -30px rgb(var(--sh) / 0.7);
    }

    .tile .out:hover {
        background: var(--ink);
        color: var(--paper);
    }
}

@media (max-width: 899px) {
    .tile,
    .tile--wide {
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
    }

    .tile--wide .screen {
        flex-basis: auto;
        padding: 14px 14px 0;
    }
}

.screen {
    min-width: 0;
}

.glass {
    position: relative;
    padding: clamp(7px, 0.9vw, 13px);
    border-radius: 12px;
    background: #0c0d0e;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 26px 44px -30px rgba(var(--sh) / 0.7);
}

.glass img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 4px;
}

.glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(112deg, rgba(255, 255, 255, 0.055) 0 30%, rgba(255, 255, 255, 0) 30.2%);
}

:root[data-theme="dark"] .glass {
    box-shadow:
        0 0 0 1px rgba(255, 176, 74, 0.14),
        0 0 40px -16px rgba(255, 140, 40, 0.28);
}

.pid {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 600 12px/1 var(--mono);
    letter-spacing: 0.06em;
}

.pid span:first-child {
    padding: 5px 7px 4px;
    border-radius: 3px;
    background: var(--ink);
    color: var(--paper);
}

.beta {
    padding: 4px 7px 3px;
    border: 1px solid var(--ink);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
}

.prog h3 {
    margin-top: 16px;
    font-size: clamp(30px, 3.2vw, 44px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.035em;
}

.result {
    margin-top: 12px;
    font-size: clamp(18px, 1.45vw, 21px);
    line-height: 1.4;
    color: var(--ink);
    text-wrap: pretty;
    max-width: 34ch;
}

.stack {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    display: grid;
    gap: 4px;
}

.stack dt {
    font: 500 11.5px/1.2 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.stack dd {
    font: 500 14.5px/1.45 var(--mono);
    color: var(--ink);
}

.status {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font: 500 13px/1.3 var(--mono);
    color: var(--ink);
}

.status::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    background: var(--orange);
}

.out {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-top: 10px;
    font: 500 14.5px/1 var(--mono);
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

@media (hover: hover) and (pointer: fine) {
    .out:hover {
        text-decoration-color: var(--ink);
    }
}

/* ------------------------------------------------------------------ 2 firmware history */

/* A dot wall like the hero's, lit with one internship's name. It pins while the chapter
   scrolls, and each stretch of scroll sends the lit dots flying to spell the next name.
   Without the script the wall is hidden and every internship reads in order. */
.dw {
    margin-top: clamp(40px, 5vw, 64px);
}

html:not(.js) .dw-wall {
    display: none;
}

/* the script sets the track's height so there is a stretch of scroll per internship */
html.js .dw-stage {
    position: sticky;
    top: 64px;
}

.dw-wall {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: inset 0 0 0 1px var(--rule);
    cursor: crosshair;
    touch-action: pan-y;
}

:root[data-theme="dark"] .dw-wall {
    background: #0c0d0f;
}

.dw-cv {
    display: block;
    width: 100%;
    /* the screen gives way on short windows so the release notes still fit under it */
    height: clamp(200px, min(34vw, 100vh - 470px), 440px);
}

.dw-tl,
.dw-tr,
.dw-bl,
.dw-br {
    position: absolute;
    font: 500 11px/1 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
    pointer-events: none;
}

.dw-tl { left: 22px; top: 20px; }
.dw-tr { right: 22px; top: 20px; }
.dw-bl { left: 22px; bottom: 18px; }
.dw-br { right: 22px; bottom: 18px; }

.dw-tl b,
.dw-bl b {
    font-weight: 600;
    color: var(--orange);
}

/* how far through the chapter the scroll is */
.dw-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: var(--orange);
    box-shadow: 0 0 8px rgba(255, 91, 31, 0.7);
    transform: scaleX(var(--p, 0));
    transform-origin: 0 50%;
}

/* the chosen internship, read plainly */
.dw-list {
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

html.js .dw-job {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    grid-template-rows: repeat(5, auto) 1fr;
    column-gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

html.js .dw-job > :not(.dw-notes):not(.dw-cta) {
    grid-column: 1;
}

html.js .dw-notes,
html.js .dw-cta {
    grid-column: 2;
    grid-row: 1 / span 6;
    justify-self: start;
}

html.js .dw-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 32px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

html:not(.js) .dw-job + .dw-job {
    margin-top: 40px;
}

html.js .dw-job[hidden] {
    display: none;
}

.dw-list.is-swapping {
    opacity: 0;
}

.dw-list {
    transition: opacity 300ms var(--ease-out);
}

.dw-job h3 {
    font-size: clamp(32px, 3.2vw, 46px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
}

.dw-job--next h3 {
    color: var(--orange);
}

/* the unwritten version: its notes are a plan, drawn in dashes, and the call sits under them */
html.js .dw-job--next .dw-notes {
    grid-row: 1 / span 5;
}

html.js .dw-job--next .dw-cta {
    grid-row: 6;
    align-self: start;
}

.dw-job--next .dw-notes li {
    color: var(--ink-2);
}

.dw-job--next .dw-notes .k {
    color: var(--orange);
}

.dw-job--next .dw-stack li {
    border-style: dashed;
}

.dw-when {
    margin-top: 10px;
    font: 500 12.5px/1.5 var(--mono);
    color: var(--ink-3);
}

.dw-role {
    margin-top: 6px;
    color: var(--ink-2);
}

.dw-about {
    margin-top: 14px;
    max-width: 40ch;
    font-style: italic;
    color: var(--ink-2);
    text-wrap: pretty;
}

/* one number per job, set like a readout */
.dw-stat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    margin-top: 18px;
    padding: 12px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.dw-stat b {
    font: 700 clamp(34px, 3.4vw, 48px)/1 "Doto", var(--mono);
    color: var(--orange);
    letter-spacing: 0.02em;
}

.dw-stat span {
    font: 500 12px/1.45 var(--mono);
    color: var(--ink-3);
    text-wrap: balance;
}

.dw-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    padding: 0;
    list-style: none;
}

.dw-stack li {
    padding: 4px 8px;
    border: 1px solid var(--rule-2);
    border-radius: 4px;
    font: 500 11px/1.2 var(--mono);
    color: var(--ink-2);
}

.dw-notes {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    padding: 20px 0 0;
    border-top: 1px solid var(--rule-2);
    list-style: none;
}

.dw-notes li {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    font-size: 16px;
    line-height: 1.5;
}

.dw-notes .g {
    font: 600 15px/1.55 var(--mono);
    color: var(--orange);
    text-align: center;
}

.dw-notes .k {
    display: block;
    font: 600 10.5px/1.4 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.dw-cta {
    display: inline-flex;
    gap: 12px;
    margin-top: 24px;
    padding: 15px 22px;
    border-radius: 8px;
    background: var(--orange);
    color: #190a03;
    font: 600 13px/1 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}

.dw-cta:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
    .dw-cta:hover {
        filter: brightness(1.08);
    }
}

@media (max-width: 767px) {
    .dw-cv {
        height: clamp(140px, 22vh, 200px);
    }

    /* on a phone the notes keep their three strongest lines */
    .dw-stack,
    .dw-notes li:nth-child(n + 4) {
        display: none;
    }

    .dw-tr,
    .dw-hint {
        display: none;
    }

    .dw-list {
        margin-top: 18px;
    }

    html.js .dw-job {
        grid-template-columns: minmax(0, 1fr);
    }

    html.js .dw-notes,
    html.js .dw-cta {
        grid-column: 1;
        grid-row: auto;
    }

    html.js .dw-job--next .dw-notes,
    html.js .dw-job--next .dw-cta {
        grid-row: auto;
    }

    html.js .dw-notes {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 16px;
        gap: 10px;
    }

    .dw-job h3 {
        font-size: 30px;
    }

    .dw-notes li {
        font-size: 15.5px;
        line-height: 1.45;
    }
}

/* ------------------------------------------------------------------ 3 benchmarks */

.bench-wrap {
    margin-top: clamp(40px, 5vw, 64px);
}

.bench {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.bench thead th {
    padding: 0 0 12px;
    border-bottom: 2px solid var(--ink);
    font: 500 11.5px/1 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.bench .grp th {
    padding: 30px 0 10px;
    font: 600 14px/1.2 var(--serif);
    letter-spacing: 0;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
}

.bench td,
.bench tbody th[scope="row"] {
    padding: 15px 16px 15px 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: baseline;
}

.bench .r {
    width: 22%;
    font: 500 clamp(21px, 2vw, 28px) / 1 var(--mono);
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.bench tbody th[scope="row"] {
    width: 40%;
    font-size: clamp(17px, 1.4vw, 19px);
    font-weight: 600;
    line-height: 1.3;
}

.bench td:last-child {
    color: var(--ink-2);
    line-height: 1.4;
}

.podium .r::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 10px;
    vertical-align: 0.18em;
    background: var(--orange);
}

/* The results board: a dark LED panel lit in the display's amber dot letters, the way
   a scoreboard is. It stays a dark, lit object in both editions, like the display.
   The rows light one after another when the board comes into view. */
.board {
    --amber: #ffb04a;
    --amber-dim: #b07a3a;
    --warm: #f6dfbd;
    position: relative;
    padding: 22px clamp(18px, 3vw, 40px) 28px;
    border-radius: 14px;
    background:
        radial-gradient(circle at center, rgba(255, 176, 74, 0.07) 1.1px, transparent 1.6px) 0 0 / 9px 9px,
        radial-gradient(120% 90% at 50% 0%, #1a110a, #0b0806 70%);
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.8),
        inset 0 0 0 1px rgba(255, 176, 74, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 30px 60px -36px rgba(0, 0, 0, 0.8),
        0 0 70px -30px rgba(255, 140, 40, 0.35);
    color: var(--warm);
}

.board-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 6px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(255, 176, 74, 0.35);
    font: 700 14px/1 "Doto", var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
    text-shadow: 0 0 6px rgba(255, 150, 40, 0.55);
}

.board-head span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* the board's power lamp */
.board-head i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 8px rgba(255, 91, 31, 0.9);
}

.board-head span:last-child {
    color: var(--amber-dim);
    text-shadow: none;
}

.board .bench thead th {
    padding-top: 14px;
    border-bottom: 1px solid rgba(255, 176, 74, 0.25);
    color: var(--amber-dim);
}

.board .bench .grp th {
    font: 600 11.5px/1.2 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
    border-bottom: 1px solid rgba(255, 176, 74, 0.25);
}

.board .bench .grp th::before {
    content: "▶ ";
    font-size: 9px;
}

.board .bench td,
.board .bench tbody th[scope="row"] {
    padding: 14px 16px 13px 0;
    border-bottom: 1px dotted rgba(255, 176, 74, 0.18);
}

.board .bench .r {
    font: 700 clamp(22px, 2.1vw, 30px) / 1 "Doto", var(--mono);
    letter-spacing: 0.04em;
    color: var(--amber);
    text-shadow: 0 0 6px rgba(255, 150, 40, 0.6), 0 0 16px rgba(255, 150, 40, 0.3);
}

.board .bench tbody th[scope="row"] {
    font: 600 clamp(14px, 1.15vw, 16px) / 1.3 var(--mono);
    color: var(--warm);
}

.board .bench td:last-child {
    font: 400 13px/1.4 var(--mono);
    color: var(--amber-dim);
}

/* podium finishes: lit hotter, with an orange lamp */
.board .podium .r {
    color: #ffd29a;
    text-shadow: 0 0 8px rgba(255, 170, 60, 0.85), 0 0 22px rgba(255, 120, 30, 0.5);
}

.board .podium .r::after {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 9px rgba(255, 91, 31, 0.95);
}

@media (prefers-reduced-motion: no-preference) {
    html.js .board.rv tbody tr {
        opacity: 0.08;
        transition: opacity 90ms steps(2, end);
    }

    html.js .board.rv.in tbody tr {
        opacity: 1;
    }

    html.js .board.rv.in tbody:first-of-type tr:nth-child(1) { transition-delay: 150ms; }
    html.js .board.rv.in tbody:first-of-type tr:nth-child(2) { transition-delay: 260ms; }
    html.js .board.rv.in tbody:first-of-type tr:nth-child(3) { transition-delay: 370ms; }
    html.js .board.rv.in tbody:first-of-type tr:nth-child(4) { transition-delay: 480ms; }
    html.js .board.rv.in tbody:first-of-type tr:nth-child(5) { transition-delay: 590ms; }
    html.js .board.rv.in tbody:first-of-type tr:nth-child(6) { transition-delay: 700ms; }
    html.js .board.rv.in tbody:last-of-type tr:nth-child(1) { transition-delay: 810ms; }
    html.js .board.rv.in tbody:last-of-type tr:nth-child(2) { transition-delay: 920ms; }
    html.js .board.rv.in tbody:last-of-type tr:nth-child(3) { transition-delay: 1030ms; }
    html.js .board.rv.in tbody:last-of-type tr:nth-child(4) { transition-delay: 1140ms; }
    html.js .board.rv.in tbody:last-of-type tr:nth-child(5) { transition-delay: 1250ms; }
}

@media (max-width: 767px) {
    .board-head span:last-child {
        display: none;
    }

    .board .bench .r {
        font-size: 17px;
        white-space: nowrap;
    }
}

/* ------------------------------------------------------------------ 4 specifications */

/* Fall in love with ___. Default (no JS, reduced motion): a plain list. With .go the
   track is tall and the stage pins while the headline's last word swaps on scroll. */
.lv {
    position: relative;
    margin-top: clamp(16px, 2vw, 28px);
}

.lv-count {
    display: none;
}

.lv-head {
    font-size: clamp(36px, 4.2vw, 66px);
    font-weight: 380;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.lv-slot {
    position: relative;
    display: block;
    height: 1.14em;
    overflow: hidden;
}

/* the plain list has no use for the fourth line */
.lv:not(.go) .lv-slot:nth-of-type(4) {
    display: none;
}

.lv-w {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
}

.lv-w.lv-it {
    font-style: italic;
    font-weight: 420;
}

/* who said it, under the pen line */
.lv-by {
    position: relative;
    display: none;
    height: 1.4em;
    margin-top: 8px;
    font: 500 12px/1.4 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.lv.go .lv-by {
    display: block;
}

.lv-by span {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    opacity: 0;
}

.lv-w + .lv-w {
    display: none;
}

.lv-w span {
    display: inline-block;
}

.lv-ul {
    display: block;
    height: 14px;
    margin-top: -2px;
    overflow: hidden;
}

.lv-ul svg {
    display: block;
    width: 1600px;
    height: 14px;
}

.lv-ul path {
    fill: none;
    stroke: var(--orange);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 330 4000;
}

.lv-stories {
    position: relative;
    margin-top: clamp(22px, 4vh, 40px);
    color: var(--ink-2);
}

.lv-st {
    max-width: 640px;
}

.lv-st + .lv-st {
    margin-top: 40px;
}

.lv-word {
    font: italic 420 30px/1.1 var(--serif);
    color: var(--ink);
    margin-bottom: 10px;
}

.lv-k {
    font: 600 11px/1 var(--mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 14px;
}

.lv-k em {
    font-style: normal;
    color: var(--orange);
}

.lv-st p {
    font-size: 17.5px;
    line-height: 1.86;
    text-wrap: pretty;
}

.lv-st p.lede {
    font-size: clamp(18px, 1.55vw, 22px);
    line-height: 1.8;
}

.lv-st p.lv-k {
    font-size: 11px;
    line-height: 1;
}

.lv-st b,
.lv-st em {
    color: var(--ink);
}

.lv-st b {
    font-weight: 600;
}

.lv-st a {
    color: var(--ink);
    text-decoration-color: var(--orange);
    text-underline-offset: 3px;
}

.lv-hint {
    display: none;
}

/* pencil work: drawn once its story is on (always on in the plain list) */
.lv-st mark {
    padding: 0 2px;
    color: var(--ink);
    background: linear-gradient(transparent 52%, color-mix(in srgb, var(--orange) 34%, transparent) 52% 92%, transparent 92%) no-repeat 0 0 / 100% 100%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.lv-x {
    position: relative;
    color: var(--ink-3);
}

.lv-x::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 54%;
    height: 2px;
    background: var(--orange);
    transform: rotate(-2deg);
    transform-origin: left;
}

.lv-fix {
    position: absolute;
    left: 0;
    bottom: 74%;
    white-space: nowrap;
    font: 600 1.12em/1 "Caveat", cursive;
    color: var(--orange);
    transform: rotate(-3deg);
}

.lv-note {
    display: inline-block;
    margin-top: 12px;
    font: 600 22px/1.05 "Caveat", cursive;
    color: var(--orange);
    transform: rotate(-2.5deg);
}

.lv-note::before {
    content: "\2196  ";
    font-family: var(--serif);
    font-size: 0.8em;
}

/* pictures: polaroids, never cropped */
.lv-pics {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 28px;
    margin-top: 48px;
}

.lv-pol {
    position: relative;
    width: 220px;
    background: #f3f1ea;
    padding: 12px 12px 46px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 22px 44px -14px rgba(0, 0, 0, 0.55);
}

.lv-pol img {
    display: block;
    width: 100%;
    height: auto;
}

.lv-pol figcaption {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 15px;
    font: 500 11px/1 var(--mono);
    letter-spacing: 0.04em;
    color: #4a4c50;
}

.lv-me {
    order: -1;
    width: 300px;
}

.lv-tape {
    position: absolute;
    top: -13px;
    left: 50%;
    width: 36%;
    height: 24px;
    translate: -50% 0;
    background: rgba(226, 219, 190, 0.8);
    transform: rotate(-2deg);
    z-index: 1;
}

.lv-doodle,
.lv-cap {
    display: none;
}

/* ---- pinned ---- */
.lv.go {
    height: 330vh;
}

.lv.go .lv-stage {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    height: calc(100svh - 64px);
    overflow: hidden;
}

.lv.go .lv-count {
    position: absolute;
    right: 0;
    top: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    font: 500 11.5px/1 var(--mono);
    letter-spacing: 0.14em;
    color: var(--ink);
}

.lv-ticks {
    display: flex;
    gap: 5px;
}

.lv-ticks i {
    position: relative;
    width: 18px;
    height: 2px;
    overflow: hidden;
    background: var(--rule-2);
}

.lv-ticks i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--orange);
    transform: scaleX(var(--f, 0));
    transform-origin: left;
}

.lv.go .lv-copy {
    position: absolute;
    left: 0;
    top: clamp(40px, 7vh, 88px);
    width: min(58%, 820px);
}

.lv.go .lv-w + .lv-w {
    display: block;
}

.lv.go .lv-w span {
    will-change: transform;
    transform: translateY(135%);
}

.lv.go .lv-stories {
    min-height: 250px;
}

.lv.go .lv-st {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    opacity: 0;
    will-change: transform, opacity;
}

.lv.go .lv-word {
    display: none;
}

.lv.go .lv-hint {
    display: block;
    margin-top: 22px;
    font: 500 11px/1 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.lv.go .lv-st mark {
    background-size: 0% 100%;
    transition: background-size 0.9s var(--ease-out) 0.35s;
}

.lv.go .lv-x {
    color: var(--ink-2);
    transition: color 0.4s ease 0.9s;
}

.lv.go .lv-x::after {
    transform: scaleX(0) rotate(-2deg);
    transition: transform 0.45s var(--ease-out) 0.75s;
}

.lv.go .lv-fix {
    opacity: 0;
    transform: translateY(4px) rotate(-3deg);
    transition: opacity 0.4s ease 1.15s, transform 0.4s var(--ease-out) 1.15s;
}

.lv.go .lv-note {
    opacity: 0;
    transform: rotate(-2.5deg) translateX(-6px);
    transition: opacity 0.5s ease 1.3s, transform 0.5s var(--ease-out) 1.3s;
}

.lv.go .lv-st.on mark {
    background-size: 100% 100%;
}

.lv.go .lv-st.on .lv-x {
    color: var(--ink-3);
}

.lv.go .lv-st.on .lv-x::after {
    transform: scaleX(1) rotate(-2deg);
}

.lv.go .lv-st.on .lv-fix {
    opacity: 1;
    transform: translateY(0) rotate(-3deg);
}

.lv.go .lv-st.on .lv-note {
    opacity: 1;
    transform: rotate(-2.5deg) translateX(0);
}

.lv.go .lv-pics {
    position: absolute;
    right: 0;
    top: clamp(40px, 7vh, 88px);
    height: min(calc(100% - 80px), 540px);
    width: min(34%, 480px);
    margin: 0;
    display: block;
}

.lv.go .lv-pol {
    position: absolute;
    left: 50%;
    top: 50%;
    will-change: transform, opacity;
}

.lv.go .lv-me {
    width: 72%;
}

/* doodles sit off the print's corner, drawn in pencil when their word arrives */
.lv.go .lv-doodle {
    display: block;
    position: absolute;
    right: -16%;
    bottom: -8%;
    width: 34%;
    overflow: visible;
    pointer-events: none;
}

.lv-doodle path,
.lv-doodle circle {
    fill: none;
    stroke: var(--orange);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
}

.lv.go .lv-cap {
    display: block;
    position: absolute;
    left: 0;
    top: calc(50% + 235px);
    width: 100%;
    text-align: center;
    font: 600 23px/1 "Caveat", cursive;
    color: var(--orange);
}

.lv-cap span {
    position: absolute;
    left: 0;
    right: 0;
    opacity: 0;
    transform: rotate(-2deg);
}

.lv-cap small {
    display: block;
    margin-top: 4px;
    font-size: 0.8em;
    color: var(--ink-2);
}

.specs {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 44px;
    margin-top: clamp(48px, 6vw, 80px);
}

.spec-group {
    grid-column: span 6;
}

.spec-group h3 {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.spec-group dl > div {
    display: grid;
    grid-template-columns: minmax(110px, 36%) 1fr;
    column-gap: 16px;
    padding: 11px 0 10px;
    border-bottom: 1px solid var(--rule);
}

.spec-group dt {
    font: 500 12.5px/1.5 var(--mono);
    letter-spacing: 0.02em;
    color: var(--ink-3);
    padding-top: 0.15em;
}

.spec-group dd {
    font-size: 16px;
    line-height: 1.45;
}

.warranty {
    margin-top: 56px;
    margin-left: auto;
    width: min(440px, 100%);
}

.sig-line {
    position: relative;
    height: 96px;
    border-bottom: 1px solid var(--ink);
}

.sig {
    position: absolute;
    left: 6%;
    bottom: -14px;
    width: 230px;
    aspect-ratio: 457 / 200;
    background: var(--ink);
    -webkit-mask: url("../images/section/signature-1.webp") center / contain no-repeat;
    mask: url("../images/section/signature-1.webp") center / contain no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
    html.js .warranty.rv .sig {
        clip-path: inset(0 100% 0 0);
        transition: clip-path 1400ms var(--ease-in-out) 300ms;
    }

    html.js .warranty.rv.in .sig {
        clip-path: inset(0 0 0 0);
    }
}

.sig-label {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    font: 500 12px/1.3 var(--mono);
    color: var(--ink-3);
}

/* The rating plate: machined from the same stock as the chassis (aluminium by day,
   anodised black at night), engraved, riveted at the corners */
.specs.plate {
    position: relative;
    padding: 30px clamp(22px, 3.4vw, 48px) 26px;
    border-radius: 12px;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
        linear-gradient(168deg, var(--al-1) 0%, var(--al-2) 52%, var(--al-3) 100%);
    box-shadow:
        inset 0 1px 0 var(--edge-hi),
        inset 0 -1px 0 var(--edge-lo),
        0 0 0 1px rgb(var(--sh) / 0.12),
        0 24px 40px -28px rgb(var(--sh) / 0.6);
    color: var(--etch);
    text-shadow: 0 1px 0 var(--etch-hi);
}

/* rivets */
.specs.plate::before,
.specs.plate::after {
    content: "";
    position: absolute;
    top: 12px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, var(--screw-a) 0, var(--screw-b) 52%, var(--screw-c) 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 0 var(--etch-hi);
}

.specs.plate::before { left: 12px; }
.specs.plate::after { right: 12px; }

.plate-head,
.plate-foot {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0;
    font: 600 11px/1 var(--mono);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--etch-2);
}

.plate-head {
    padding: 0 14px 16px;
    border-bottom: 1px solid var(--etch-2);
}

.plate-head span:nth-child(2) {
    color: var(--etch);
}

.plate-foot {
    padding: 18px 0 0;
    border-top: 1px solid var(--etch-2);
}

.barcode {
    width: 150px;
    height: 26px;
    background: repeating-linear-gradient(90deg,
        var(--etch) 0 2px, transparent 2px 4px, var(--etch) 4px 5px, transparent 5px 8px,
        var(--etch) 8px 11px, transparent 11px 12px, var(--etch) 12px 13px, transparent 13px 16px);
    opacity: 0.85;
}

.specs.plate .spec-group h3 {
    border-bottom: 1px solid var(--etch);
    font: 600 12px/1.2 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--etch);
}

.specs.plate .spec-group dl > div {
    border-bottom: 1px solid color-mix(in srgb, var(--etch-2) 35%, transparent);
}

.specs.plate .spec-group dt {
    color: var(--etch-2);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.specs.plate .spec-group dd {
    color: var(--etch);
    font: 500 15px/1.45 var(--mono);
}

@media (max-width: 767px) {
    .plate-head span:nth-child(3),
    .plate-foot span:nth-child(3) {
        display: none;
    }

}

/* ------------------------------------------------------------------ 5 after hours */

/* One object, pinned, told in three takes. Photography: a lens whose iris opens and focus
   pulls one of my photographs sharp. Film: the camera pushes through the glass, the frame
   opens out and the roll plays at each photo's own shape, with the edit underneath. Writing:
   fade out, and a bound script turns its cover and types a draft. Essays follow as booklets. */
:root { --out: cubic-bezier(.16, 1, .3, 1); }

.as { position: relative; margin-top: clamp(32px, 4vw, 56px); }
.as-stage { position: sticky; top: 64px; height: calc(100vh - 64px); max-height: 860px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(24px, 3.5vw, 64px); }

/* copy: the outgoing lines leave first, then the new ones rise out of their masks */
.as-copy { position: relative; height: 380px; }
.as-count { display: flex; align-items: center; gap: 12px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.as-odo { display: inline-block; height: 22px; overflow: hidden; }
.as-odo-in { display: grid; transition: transform .9s var(--out); }
.as-odo-in b { font: 700 22px/22px "Doto", var(--mono); color: var(--orange); }
.as-rail { display: flex; gap: 6px; margin-left: auto; }
.as-rail i { position: relative; width: 34px; height: 2px; background: var(--rule-2); overflow: hidden; }
.as-rail i::after { content: ""; position: absolute; inset: 0; background: var(--orange); transform: scaleX(var(--f, 0)); transform-origin: 0 50%; }
.as-item { position: absolute; left: 0; right: 0; top: 52px; pointer-events: none; }
.as-item.on { pointer-events: auto; }
.as-ln { display: block; padding-bottom: .1em; clip-path: inset(-.05em -100vw 0 -100vw); }
.as-item .as-ln:nth-child(2) { margin-top: 14px; }
.as-item .as-ln:nth-child(3) { margin-top: 16px; }
.as-item .as-ln:nth-child(4) { margin-top: 22px; }
.as-ln > * { display: block; transform: translateY(120%); transition: transform 1s var(--out); }
.as-item.on .as-ln > * { transform: none; transition-delay: 260ms; }
.as-item.on .as-ln:nth-child(2) > * { transition-delay: 320ms; }
.as-item.on .as-ln:nth-child(3) > * { transition-delay: 380ms; }
.as-item.on .as-ln:nth-child(4) > * { transition-delay: 440ms; }
.as-item.past .as-ln > * { transform: translateY(-120%); }
.as-item:not(.on) .as-ln > * { transition-duration: .5s; transition-timing-function: cubic-bezier(.7, 0, .84, 0); }
.as-item .as-k { font: 500 12px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.as-item h3 { font-size: clamp(52px, 5.4vw, 88px); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.as-item p.as-b { max-width: 30ch; font-size: clamp(18px, 1.45vw, 20px); line-height: 1.45; color: var(--ink-2); }
.as-item .lk, .ac-bks-h .lk { display: flex; gap: 10px; width: max-content; font: 500 14px/1 var(--mono); color: var(--ink); text-decoration: none; padding-bottom: 7px; border-bottom: 2px solid var(--orange); }
.as-item .lk.note { border-bottom-color: var(--rule-2); color: var(--ink-3); }
.as-hint { position: absolute; left: 0; bottom: 0; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); transition: opacity .5s; }

/* the object */
.as-art { position: relative; width: 100%; }
.as-box { position: relative; aspect-ratio: 4 / 3; max-height: calc(100vh - 170px); margin: 0 auto; }
.as-box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.as-read { display: flex; justify-content: center; gap: 22px; margin-top: 14px; min-height: 12px; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.as-read b { color: var(--orange); font-weight: 600; font-variant-numeric: tabular-nums; }

.as { --ring: #1a1d20; --ring-hi: #3b4046; --print: #9aa1a8; --glass: #050505; --metal-a: #2d3136; --metal-b: #101215; }
:root:not([data-theme="dark"]) .as { --ring: #202327; --ring-hi: #4a4f55; }

/* ---- booklets (from the premium boxes preview) ---- */
.ac-bks {
  margin-top: clamp(64px, 7vw, 104px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start;
}
.ac-bks-h { grid-column: 1 / span 3; padding-top: 6px; border-top: 2px solid var(--ink); }
.ac-bks-h > span { display: block; margin-top: 12px; font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.ac-bks-h h3 { margin-top: 8px; font-size: clamp(28px, 2.4vw, 34px); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.ac-bks-h .lk { margin-top: 16px; }
.ac-bk-list { grid-column: 4 / -1; list-style: none; margin: 0; padding: 0 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 30px); }
.ac-bk-list li { position: relative; }
.ac-bk {
  --bk-bg: #eef0f1; --bk-ink: #141619; --bk-ink-2: #41474e; --bk-spine: rgba(20, 24, 28, .14);
  position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 20px 20px 18px 34px;
  border-radius: 2px 6px 6px 2px; background: linear-gradient(100deg, rgba(0,0,0,.06), transparent 14%), var(--bk-bg);
  color: var(--bk-ink); text-decoration: none;
  box-shadow: 1px 1px 0 #f7f8f8, 2px 2px 0 #c9cdd1, 3px 3px 0 #f2f3f4, 4px 4px 0 #b9bec3, 0 14px 24px -10px rgba(var(--sh) / .45);
  transform-origin: 50% 100%; transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
}
.ac-bk::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; background: linear-gradient(90deg, var(--bk-spine), transparent 70%); border-right: 1px solid var(--bk-spine); }
.ac-bk::after { content: ""; position: absolute; left: 8px; top: 22%; bottom: 22%; width: 2px; background: linear-gradient(180deg, #8e949a 0 14px, transparent 14px calc(100% - 14px), #8e949a calc(100% - 14px)); opacity: .9; }
.ac-bk-no { display: flex; justify-content: space-between; align-items: baseline; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bk-ink-2); }
.ac-bk-no b { font: 700 26px/1 "Doto", var(--mono); letter-spacing: 0; color: var(--bk-ink); }
.ac-bk-t { margin-top: 26px; font-size: clamp(25px, 2.1vw, 30px); font-weight: 500; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
/* the blurb reads like back-cover copy: pinned low, under a hairline, in italic, so the three line up */
.ac-bk-b { margin-top: auto; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--bk-ink) 22%, transparent); font-size: 15.5px; font-style: italic; line-height: 1.45; color: var(--bk-ink-2); text-wrap: pretty; }
.ac-bk-t + .ac-bk-b { margin-top: auto; }
.ac-bk-f { margin-top: 16px; display: flex; justify-content: space-between; font: 500 13px/1 var(--mono); color: var(--bk-ink); }
.ac-bk-f .arr { transition: transform .4s var(--ease-out); }
.ac-bk.c1 { --bk-bg: #ff5b1f; --bk-ink: #141619; --bk-ink-2: #3a1606; --bk-spine: rgba(60, 14, 0, .28); }
.ac-bk.c2 .ac-bk-no b { color: #e04a12; }
.ac-bk.c3 { --bk-bg: #26292d; --bk-ink: #eceef0; --bk-ink-2: #aeb4ba; --bk-spine: rgba(0, 0, 0, .55); }
.ac-bk.c3 .ac-bk-no b { color: #ffb04a; }
.ac-bk:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
.ac-bk:hover .ac-bk-t, .ac-bk:focus-visible .ac-bk-t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ac-bk:hover .ac-bk-f .arr { transform: translate(3px, -3px); }
@media (min-width: 768px) {
  .ac-bk-list li:nth-child(1) .ac-bk { transform: rotate(-1.2deg); }
  .ac-bk-list li:nth-child(3) .ac-bk { transform: rotate(1deg); }
  .ac-bk-list:hover li:nth-child(1) .ac-bk, .ac-bk-list:focus-within li:nth-child(1) .ac-bk { transform: translateX(-10px) rotate(-5deg); }
  .ac-bk-list:hover li:nth-child(2) .ac-bk, .ac-bk-list:focus-within li:nth-child(2) .ac-bk { transform: translateY(-4px); }
  .ac-bk-list:hover li:nth-child(3) .ac-bk, .ac-bk-list:focus-within li:nth-child(3) .ac-bk { transform: translateX(10px) rotate(5deg); }
  .ac-bk-list li .ac-bk:hover, .ac-bk-list li .ac-bk:focus-visible { z-index: 2; box-shadow: 1px 1px 0 #f7f8f8, 2px 2px 0 #c9cdd1, 3px 3px 0 #f2f3f4, 4px 4px 0 #b9bec3, 0 30px 40px -16px rgba(var(--sh) / .6); }
  .ac-bk-list li:nth-child(1) .ac-bk:hover, .ac-bk-list li:nth-child(1) .ac-bk:focus-visible { transform: translate(-10px, -16px) rotate(-5deg); }
  .ac-bk-list li:nth-child(2) .ac-bk:hover, .ac-bk-list li:nth-child(2) .ac-bk:focus-visible { transform: translateY(-18px); }
  .ac-bk-list li:nth-child(3) .ac-bk:hover, .ac-bk-list li:nth-child(3) .ac-bk:focus-visible { transform: translate(10px, -16px) rotate(5deg); }
}
@media (max-width: 1100px) and (min-width: 768px) {
  .ac-bks-h { grid-column: 1 / -1; margin-bottom: 28px; }
  .ac-bk-list { grid-column: 1 / -1; }
}



/* ---- the screening: a wide frame that grows out of the lens box, with the edit underneath ---- */
.cine { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; }
.cine.on { opacity: 1; }
.cine-cap { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: baseline; gap: 18px; white-space: nowrap; }
.cine-cap .as-k { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.cine-cap b { font: 500 34px/1 var(--serif); letter-spacing: -.03em; color: var(--ink); }
.cine-cap span.d { font-size: 16px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.cine-cap .yt { margin-left: auto; font: 500 12px/1 var(--mono); color: var(--ink-3); }
/* the frame is placed by the script: always the shape of the photo it is showing */
.cine-view { position: absolute; overflow: hidden; background: #000; border-radius: 10px; transform-origin: 50% 50%; }
.cine-shot { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; }
.cine-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cine-grain { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: overlay; opacity: .07; }
.cine-vig { position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0,0,0,.55)); }
.cine-leak { position: absolute; inset: -20%; opacity: 0; mix-blend-mode: screen; background: radial-gradient(40% 60% at 85% 40%, rgba(255,120,40,.95), rgba(255,60,20,.35) 45%, transparent 70%); }
.cine-dip { position: absolute; inset: 0; background: #000; opacity: 0; }
/* subtitles sit under the picture, so nothing in a photo is ever covered */
.cine-sub { position: absolute; left: 0; right: 0; text-align: center; font: italic 400 clamp(16px, 1.6vw, 22px)/1.3 var(--serif); color: var(--ink-2); opacity: 0; padding: 0 8%; }
.cine-fo { position: absolute; right: 7%; bottom: 12%; font: 500 clamp(14px, 1.5vw, 20px)/1 var(--mono); letter-spacing: .06em; color: #f1eee8; }

/* the edit: ruler, picture track with the eight clips, audio track, playhead */
.cine-tl { position: absolute; left: 0; right: 0; bottom: 14px; padding: 10px 12px 12px 44px; border-radius: 10px; background: #0d0e10; box-shadow: inset 0 0 0 1px #24282c; font: 500 10px/1 var(--mono); letter-spacing: .1em; color: #6f767d; }
.tl-head { display: flex; justify-content: space-between; margin: 0 0 8px -32px; text-transform: uppercase; }
.tl-head b { color: #ff5b1f; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-ruler { position: relative; height: 12px; margin-bottom: 6px; background: repeating-linear-gradient(90deg, #3a3f45 0 1px, transparent 1px calc(100% / 48)) 0 100% / 100% 5px no-repeat, repeating-linear-gradient(90deg, #565c63 0 1px, transparent 1px calc(100% / 8)) 0 100% / 100% 9px no-repeat; }
.tl-track { position: relative; display: flex; gap: 2px; height: 38px; margin-top: 4px; }
.tl-track.a { height: 22px; }
.tl-lab { position: absolute; left: -32px; top: 50%; transform: translateY(-50%); }
.tl-clip { position: relative; flex: 1; border-radius: 3px; overflow: hidden; background: #222 center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); opacity: .55; transition: opacity .3s, box-shadow .3s; }
.tl-clip.on { opacity: 1; box-shadow: inset 0 0 0 2px #ff5b1f; }
.tl-clip i { position: absolute; left: 4px; bottom: 3px; font-style: normal; font-size: 9px; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: .06em; }
.tl-wave { flex: 1; border-radius: 3px; background: #15261c; overflow: hidden; }
.tl-wave canvas { width: 100%; height: 100%; display: block; }
.tl-play { position: absolute; top: 24px; bottom: 6px; width: 2px; margin-left: -1px; background: #ff5b1f; box-shadow: 0 0 8px rgba(255,91,31,.8); }
.tl-play::before { content: ""; position: absolute; left: -5px; top: -6px; border: 6px solid transparent; border-top-color: #ff5b1f; }
.as-copy, .as-read { transition: opacity .4s var(--out), transform .4s var(--out); }
.as-stage.filming .as-copy, .as-stage.filming .as-read { opacity: 0; transform: translateX(-16px); }
@media (max-width: 899px) {
  .cine-cap b { font-size: 26px; }
  .cine-cap span.d, .cine-cap .yt { display: none; }
  .cine-tl { padding-left: 12px; }
  .tl-lab, .tl-track.a { display: none; }
  .tl-head { margin-left: 0; }
  .tl-head span:first-child { display: none; }
  .tl-clip i { display: none; }
}

/* ---- the writing desk: a bound script under a lamp, a title page that turns, a draft being typed ---- */
.desk { position: absolute; inset: 0; z-index: 2; overflow: visible; opacity: 0; pointer-events: none; perspective: 1600px; background: transparent; }
.sheets { position: absolute; left: 24%; top: 5%; width: 52%; aspect-ratio: 8.5 / 11; transform-style: preserve-3d; transform-origin: 50% 20%; }
.pg { position: absolute; inset: 0; border-radius: 2px; color: #1c1a17; font-family: "Courier Prime", "Courier New", monospace; backface-visibility: hidden; transform-origin: 0 50%;
  background: #f2ede3;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 40px -12px rgba(0,0,0,.75), 0 2px 4px rgba(0,0,0,.4); }
.pg1 { box-shadow: 0 24px 40px -12px rgba(0,0,0,.75), 1px 1px 0 #d9d2c4, 2px 2px 0 #cfc7b8, 3px 3px 0 #e9e3d7; }
/* brass brads in the punched holes */
.brad { position: absolute; left: 5.5%; width: 3.2%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c2, #c99a3e 45%, #6b4a14 100%); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.brad.b1 { top: 18%; } .brad.b2 { top: 79%; }
.tp { position: absolute; left: 0; right: 0; top: 36%; display: grid; justify-items: center; gap: 1.1em; text-align: center; }
.tp b { font-weight: 700; letter-spacing: .08em; text-decoration: underline; text-underline-offset: .25em; font-size: 1.25em; }
.tp-foot { position: absolute; left: 12%; bottom: 7%; font-size: .85em; line-height: 1.5; color: #4b463f; }
.pg-n { position: absolute; right: 9%; top: 5%; }
.pg-body { position: absolute; left: 13%; right: 8%; top: 9%; bottom: 6%; line-height: 1.32; white-space: pre; }
.pg-body .ln2 { min-height: 1.32em; }
.pg-body .scene { font-weight: 700; }
.pg-body .char { margin-left: 34%; }
.pg-body .paren { margin-left: 26%; }
.pg-body .dial { margin-left: 17%; }
.pg-body .trans { text-align: right; }
.pg-body .struck { text-decoration: line-through; text-decoration-color: #e0491a; text-decoration-thickness: 2px; color: #6b655c; }
.caret2 { display: inline-block; width: .55em; height: 1.05em; margin-left: 1px; vertical-align: -.15em; background: #ff5b1f; }
.caret2.off { opacity: .2; }
.note { position: absolute; font: 600 1.7em/1 "Caveat", cursive; color: #e0491a; transform: rotate(-6deg); white-space: nowrap; opacity: 0; transition: opacity .35s; }
.note.on { opacity: 1; }
.note svg { position: absolute; overflow: visible; }

@media (max-width: 899px) {
  .as-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; gap: 6px; padding-top: 4px; }
  .as-art { order: -1; }
  .as-box { max-height: 44vh; }
  .as-read { margin-top: 8px; font-size: 10.5px; gap: 12px; }
  .as-copy { height: 300px; margin-top: 6px; }
  .as-item { top: 34px; }
  .as-item h3 { font-size: 46px; }
  .as-item .as-ln:nth-child(2) { margin-top: 8px; }
  .as-item .as-ln:nth-child(3) { margin-top: 10px; }
  .as-item .as-ln:nth-child(4) { margin-top: 14px; }
  .as-item p.as-b { font-size: 16.5px; }
  .as-hint { display: none; }
}
@media (max-width: 767px) {
  .ac-bks { grid-template-columns: minmax(0, 1fr); }
  .ac-bks-h, .ac-bk-list { grid-column: 1; }
  .ac-bks-h { margin-bottom: 24px; }
  .ac-bk-list { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-right: 4px; }
  .ac-bk { min-height: 0; padding: 18px 18px 16px 32px; }
  .ac-bk-t { margin-top: 16px; }
  .ac-bk-t + .ac-bk-b { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .as-ln > *, .as-odo-in, .ac-bk, .ac-bk-f .arr { transition: none !important; }
  .ac-bk-list li .ac-bk, .ac-bk-list:hover li .ac-bk, .ac-bk-list li .ac-bk:hover { transform: none !important; }
}
html:not(.js) .as-stage { position: static; height: auto; display: block; }
html:not(.js) .as-art, html:not(.js) .as-count, html:not(.js) .as-hint { display: none; }
html:not(.js) .as-copy { height: auto; }
html:not(.js) .as-item { position: static; margin-bottom: 48px; pointer-events: auto; }
html:not(.js) .as-ln > * { transform: none; }

/* ------------------------------------------------------------------ 6 troubleshooting */

.trouble {
    margin-top: clamp(40px, 5vw, 64px);
}

.tr-head,
.tr {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--gap);
}

.tr-head {
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ink);
    font: 500 11.5px/1 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.trouble dl {
    margin: 0;
}

.tr {
    padding: 24px 0 26px;
    border-bottom: 1px solid var(--rule);
}

.tr dt {
    font-size: clamp(18px, 1.45vw, 21px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
    max-width: 26ch;
}

.tr dd {
    margin: 0;
    color: var(--ink-2);
    max-width: 64ch;
}

.tr-lbl {
    display: none;
}

/* Fault codes: each question is an error the unit can raise, its code lit on a small
   amber readout, its answer the fix */
.trouble dl {
    counter-reset: fault;
}

.tr-head,
.tr {
    grid-template-columns: 92px minmax(0, 5fr) minmax(0, 7fr);
}

.tr-head::before {
    content: "Code";
}

.tr {
    counter-increment: fault;
    align-items: start;
}

.tr::before {
    content: "E0" counter(fault);
    justify-self: start;
    padding: 9px 12px 8px;
    border-radius: 5px;
    background: #120b05;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #ffb04a;
    font: 700 22px/1 "Doto", var(--mono);
    letter-spacing: 0.06em;
    text-shadow: 0 0 6px rgba(255, 150, 40, 0.6), 0 0 14px rgba(255, 150, 40, 0.35);
}

.tr dd::before {
    content: "Fix";
    display: block;
    margin-bottom: 6px;
    font: 600 10.5px/1 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--orange);
}

@media (max-width: 767px) {
    .tr-head::before {
        content: none;
    }

    .tr {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 12px;
    }
}

/* ------------------------------------------------------------------ 7 service and support */

.support {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 48px;
    margin-top: clamp(40px, 5vw, 64px);
    align-items: start;
}

.card {
    grid-column: 1 / span 8;
    position: relative;
    background: var(--card);
    border: 1.5px solid var(--ink);
    border-radius: 10px;
    box-shadow: 0 30px 50px -40px rgba(var(--sh) / 0.6);
}

/* perforation along the left edge */
.card::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 26px;
    border-left: 1.5px dashed var(--rule-2);
}

.card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 24px;
    padding: 22px 28px 18px 52px;
    border-bottom: 1.5px solid var(--ink);
}

/* The card is a reply postcard; its stamp and postmark sit on the address side (.pc-post) */
.card-head {
    position: relative;
}

.pc-post {
    position: relative;
    height: 104px;
    margin-bottom: -6px;
}

.stamp {
    position: absolute;
    top: 4px;
    right: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    width: 76px;
    height: 88px;
    background:
        radial-gradient(circle, transparent 3px, var(--orange) 3.5px) -5px -5px / 10px 10px;
    color: #141619;
    transform: rotate(4deg);
}

.stamp::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1.5px solid #141619;
    border-radius: 2px;
    background: var(--orange);
    z-index: 0;
}

.stamp b,
.stamp span {
    position: relative;
    z-index: 1;
    font: 700 15px/1 var(--mono);
    letter-spacing: 0.04em;
}

.stamp span {
    font: 600 8px/1.2 var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    max-width: 52px;
}

/* A G.P.O. cancellation beside the stamp: the ring just catches the stamp's left edge,
   as a real one does, and its wavy lines trail away from it, so the stamp still reads */
.postmark {
    position: absolute;
    top: 2px;
    right: 60px;
    width: 176px;
    height: 98px;
    color: color-mix(in srgb, var(--ink) 58%, transparent);
    transform: rotate(-10deg);
    transform-origin: 72% 50%;
    pointer-events: none;
}

.postmark svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.pm-ring,
.pm-wave {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.pm-thin {
    stroke-width: 1;
}

.pm-wave {
    stroke-width: 1.3;
    stroke-linecap: round;
    opacity: 0.85;
}

.pm-arc {
    font: 600 8.6px var(--mono);
    letter-spacing: 0.16em;
    fill: currentColor;
}

.pm-pin {
    font: 700 12px var(--mono);
    letter-spacing: 0.08em;
    fill: currentColor;
}

@media (max-width: 767px) {
    .card-head {
        min-height: 0;
    }

}

.card-title {
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.card-model {
    display: flex;
    gap: 18px;
    font: 500 12px/1 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* A postcard: the message on the left as a letter with blanks to fill, the address on the right,
   a rule down the middle like the real thing. */
.postcard {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    padding: 26px 0 28px 52px;
}

.pc-msg {
    padding-right: 30px;
    font: 400 clamp(18px, 1.5vw, 21px) / 2 var(--serif);
    color: var(--ink);
}

.pc-addr {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 4px 28px 0 30px;
    border-left: 1.5px solid var(--rule-2);
}

/* the blanks: the reader's words, set in the accent, on a dotted line */
.blank {
    display: inline-block;
}

.blank input {
    width: 11ch;
    min-height: 40px;
    padding: 0 2px;
    border: 0;
    border-bottom: 1.5px dashed var(--ink-3);
    border-radius: 0;
    background: transparent;
    font: italic 400 1em/1.3 var(--serif);
    color: var(--orange);
}

.blank--wide input {
    width: 17ch;
}

#phone {
    width: 15ch;
}

.blank input::placeholder,
.pc-body::placeholder {
    color: var(--ink-3);
    opacity: 0.8;
}

.blank input:focus-visible,
.pc-body:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
    border-bottom-color: var(--ink);
}

/* what it's about: pick any, tap again to put back */
.pc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 16px;
    padding: 0;
    border: 0;
}

.pc-chips label {
    position: relative;
    cursor: pointer;
}

.pc-chips input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pc-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1.5px solid var(--rule-2);
    border-radius: 999px;
    font: italic 400 16px/1 var(--serif);
    color: var(--ink-2);
    transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .pc-chips label:hover span {
        border-color: var(--ink-2);
        color: var(--ink);
    }
}

.pc-chips input:checked + span {
    background: var(--orange);
    border-color: var(--orange);
    color: #190a03;
}

.pc-chips input:focus-visible + span {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
    .pc-chips input:checked + span {
        transform: rotate(-1.5deg);
    }
}

/* the body of the letter, written on the card's ruled lines */
.pc-body {
    display: block;
    width: 100%;
    min-height: 168px;
    margin: 0 0 6px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    resize: vertical;
    background: repeating-linear-gradient(180deg, transparent 0 calc(2em - 1px), var(--rule-2) calc(2em - 1px) 2em);
    background-attachment: local;
    font: italic 400 1em/2 var(--serif);
    color: var(--ink);
}

.pc-opt {
    color: var(--ink-2);
}

/* the sign-off picks up the name as it is typed */
.pc-sign {
    margin-top: 10px;
    line-height: 1.3;
}

.pc-sign span {
    display: block;
    margin-top: 2px;
    font: 600 34px/1 "Caveat", cursive;
    color: var(--orange);
    transform: rotate(-3deg);
    transform-origin: 0 50%;
}

.pc-sign span.is-blank {
    color: var(--ink-3);
    opacity: 0.55;
}

.pc-dest {
    display: grid;
    gap: 18px;
    margin-top: auto;
    padding-top: 18px;
}

.pc-to {
    font: 600 11px/1 var(--mono);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.pc-lines {
    display: grid;
    margin-bottom: 6px;
    font-style: normal;
}

.pc-lines span {
    padding: 4px 0 2px;
    border-bottom: 1.5px solid var(--rule-2);
    font: 600 26px/1.25 "Caveat", cursive;
    color: var(--ink);
}

.human,
.form-foot {
    grid-column: auto;
}

/* in the narrow address column: light and words on one line, the Turnstile link under them */
.pc-addr .human-status {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 6px 10px;
}

.pc-addr .human-status i {
    transform: translateY(-1px);
}

.pc-addr .human-status a {
    grid-column: 2;
    margin-left: 0;
    justify-self: start;
}

.hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.send {
    position: relative;
    appearance: none;
    border: 0;
    padding: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.send::before {
    content: "";
    position: absolute;
    inset: 3px 0 -3px;
    border-radius: 9px;
    background: #15171a;
    box-shadow: 0 6px 12px -4px rgba(var(--sh) / 0.45);
}

.send-cap {
    position: relative;
    display: block;
    min-height: 44px;
    padding: 15px 24px 14px;
    border-radius: 8px;
    background: linear-gradient(180deg, #3a3e43, #25282c);
    color: #f2f0eb;
    font: 600 14px/1 var(--serif);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 160ms var(--ease-out);
}

.send:active .send-cap {
    transform: translateY(3px);
    transition-duration: 45ms;
}

.send:focus-visible {
    outline-offset: 5px;
}

.send:disabled {
    cursor: progress;
}

.send:disabled .send-cap {
    opacity: 0.8;
}

:root[data-theme="dark"] .send::before {
    background: #050606;
}

:root[data-theme="dark"] .send-cap {
    background: linear-gradient(180deg, #2c2f33, #1e2023);
    color: #ffb04a;
    text-shadow: 0 0 8px rgba(255, 150, 40, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* the human check: Turnstile stays out of sight; this line says what it is doing */
.human {
    display: grid;
    gap: 10px;
}

/* When Cloudflare must ask, its box arrives in a slot cut for it, like the stamp's corner:
   a dashed frame with its label let into the border. The box itself is Cloudflare's to draw. */
.human.is-asking .human-slot {
    position: relative;
    padding: 18px 14px 14px;
    border: 1.5px dashed var(--rule-2);
    border-radius: 8px;
    background: color-mix(in srgb, var(--ink) 3%, transparent);
}

.human-slot-l {
    display: none;
}

.human.is-asking .human-slot-l {
    display: block;
    position: absolute;
    left: 12px;
    top: -0.65em;
    padding: 0 8px;
    background: var(--card);
    font: 600 10.5px/1.3 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--orange);
}

.human-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font: 500 12px/1.4 var(--mono);
    letter-spacing: 0.06em;
    color: var(--ink-3);
}

.human-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink-3);
    opacity: 0.6;
}

.human-status a {
    margin-left: auto;
    color: var(--ink-3);
    text-decoration: underline;
    text-decoration-color: var(--rule-2);
    text-underline-offset: 3px;
}

.human-status[data-state="ok"] {
    color: var(--ink-2);
}

.human-status[data-state="ok"] i {
    background: #3ecf6e;
    box-shadow: 0 0 8px rgba(62, 207, 110, 0.7);
    opacity: 1;
}

.human-status[data-state="ask"] {
    color: var(--ink);
}

.human-status[data-state="ask"] i {
    background: #ffb04a;
    box-shadow: 0 0 8px rgba(255, 176, 74, 0.7);
    opacity: 1;
}

.human-status[data-state="err"] i {
    background: var(--orange);
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .human-status:not([data-state]) i {
        animation: human-wait 1.1s ease-in-out infinite;
    }
}

@keyframes human-wait {
    50% { opacity: 0.15; }
}

.form-status {
    font: 500 14px/1.4 var(--mono);
    color: var(--ink-2);
}

.form-status.is-ok {
    color: var(--ink);
}

.form-status.is-ok::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    background: var(--orange);
}

.form-status.is-err {
    color: var(--ink);
    padding-left: 10px;
    border-left: 3px solid var(--orange);
}

.card.is-sent {
    border-color: var(--ink);
}

.direct {
    grid-column: 10 / span 3;
}

.direct h3 {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.mail {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 12px;
    font-size: clamp(19px, 1.5vw, 22px);
    font-weight: 600;
    letter-spacing: -0.02em;
    word-break: break-word;
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.links {
    margin-top: 18px;
    padding: 0;
    list-style: none;
}

.links li {
    border-bottom: 1px solid var(--rule);
}

.links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    font: 500 14.5px/1 var(--mono);
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .links a:hover,
    .mail:hover {
        text-decoration: underline;
        text-decoration-color: var(--ink);
    }
}

/* ------------------------------------------------------------------ footer */

.back {
    padding: 56px max(var(--gutter), calc((100% - 1200px) / 2 + 40px)) 24px;
    font: 500 13px/1.4 var(--mono);
    color: var(--ink-3);
}

.back-h {
    font: 500 11px/1.3 var(--mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.back-tracks {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--gap);
    margin: 16px 0 0;
    padding: 0;
}

.back-tracks li {
    display: grid;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--rule-2);
}

.bt-n {
    font: 700 20px/1 "Doto", var(--mono);
    color: var(--orange);
}

.bt-t {
    margin-top: 8px;
    font: 500 19px/1.15 var(--serif);
    color: var(--ink);
}

.bt-a {
    font-size: 12px;
}

.back-note {
    margin-top: 24px;
    max-width: 90ch;
    font-size: 12px;
    line-height: 1.6;
}

.back .back-note a {
    display: inline;
    min-height: 0;
}

.back-end {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px 24px;
    margin-top: 32px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
}

.back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-underline-offset: 5px;
}

/* ------------------------------------------------------------------ reveals */

@media (prefers-reduced-motion: no-preference) {
    html.js .rv {
        opacity: 0;
        transform: translateY(18px);
        transition:
            opacity 800ms var(--ease-out) var(--d, 0ms),
            transform 800ms var(--ease-out) var(--d, 0ms);
    }

    html.js .rv.in {
        opacity: 1;
        transform: none;
    }

    /* screenshots power on like the unit's own display */
    html.js .prog.rv .glass img {
        clip-path: inset(49.6% 0 49.6% 0);
        transition: clip-path 620ms var(--ease-out) 220ms;
    }

    html.js .prog.rv.in .glass img {
        clip-path: inset(0 0 0 0);
    }

    html.js .fig-controls.rv .lead {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        transition: stroke-dashoffset 700ms var(--ease-out) var(--ld, 300ms);
    }

    html.js .fig-controls.rv.in .lead {
        stroke-dashoffset: 0;
    }

    html.js .fig-controls.rv .pin {
        opacity: 0;
        transition: opacity 300ms var(--ease-out) var(--pd, 700ms);
    }

    html.js .fig-controls.rv.in .pin {
        opacity: 1;
    }
}

/* ------------------------------------------------------------------ responsive: tablet */

@media (max-width: 1023px) {
    .cover-head {
        grid-column: 1 / -1;
    }

    .fig-controls {
        grid-column: 1 / -1;
    }

    .rh-title {
        display: none;
    }

    /* the chapter strip scrolls sideways, fading at its ends */
    .rh-list {
        mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent);
        padding: 0 18px 0 12px;
    }


    .card { grid-column: 1 / -1; }
    .direct { grid-column: 1 / span 8; }

}

/* ------------------------------------------------------------------ responsive: phone */

@media (max-width: 767px) {
    body {
        font-size: 16px;
    }

    .manual {
        margin: 0;
        box-shadow: none;
        border-top: 1px solid var(--rule);
    }

    .runhead {
        height: 52px;
        gap: 14px;
        font-size: 12.5px;
    }

    .ch-head {
        grid-template-columns: auto 1fr;
        column-gap: 16px;
        row-gap: 18px;
    }

    .ch-n {
        grid-column: 1;
        grid-row: 1;
    }

    .ch-key {
        grid-column: 2;
        grid-row: 1;
    }

    .mini {
        width: 104px;
    }

    .ch-title {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .cover {
        row-gap: 40px;
    }

    .legend {
        grid-template-columns: 1fr;
    }

    .ch-programs {
        grid-template-columns: minmax(0, 1fr);
    }

    /* rows become two-line entries: result | event, with the field under the event */
    .bench,
    .bench tbody {
        display: block;
    }

    .bench thead {
        display: none;
    }

    .bench tbody tr {
        display: grid;
        grid-template-columns: 36% minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 3px;
        padding: 13px 0 14px;
        border-bottom: 1px solid var(--rule);
    }

    .bench tbody tr.grp {
        display: block;
        padding: 0;
        border: 0;
    }

    .bench .grp th {
        display: block;
        padding: 28px 0 10px;
    }

    .bench td,
    .bench tbody th[scope="row"] {
        padding: 0;
        border: 0;
        width: auto;
    }

    .bench .r {
        grid-row: span 2;
        font-size: 18px;
        line-height: 1.15;
        white-space: nowrap;
    }

    .bench tbody th[scope="row"] {
        font-size: 16.5px;
    }

    .bench td:last-child {
        grid-column: 2;
        font-size: 14.5px;
    }

    .podium .r::after {
        width: 6px;
        height: 6px;
        margin-left: 6px;
    }

    .specs,
    .support {
        display: block;
    }

    .lv.go .lv-count { top: 8px; }
    .lv.go .lv-copy { top: 40px; transform: none; width: auto; right: 0; }
    .lv-head { font-size: 30px; }
    .lv.go .lv-stories { min-height: 0; margin-top: 16px; }
    .lv-st p { font-size: 15.5px; line-height: 1.78; }
    .lv-st p.lede { font-size: 16.5px; line-height: 1.75; }
    .lv-note { font-size: 19px; margin-top: 6px; }
    .lv.go .lv-hint { display: none; }
    .lv.go .lv-pics { left: 0; right: 0; width: auto; top: auto; bottom: 0; height: 32%; }
    .lv.go .lv-pol { top: 50%; padding: 8px 8px 28px; }
    .lv.go .lv-me { width: 44%; }
    .lv-pol figcaption { font-size: 8.5px; bottom: 8px; left: 8px; }
    .lv-tape { height: 14px; top: -8px; }
    .lv.go .lv-cap { display: none; }

    .spec-group + .spec-group {
        margin-top: 36px;
    }

    .specs {
        margin-top: 48px;
    }

    .warranty {
        margin-left: 0;
    }

    .sig {
        width: 200px;
    }

    .tr-head {
        display: none;
    }

    .tr {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .tr-lbl {
        display: block;
        margin-bottom: 6px;
        font: 500 11px/1 var(--mono);
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--ink-3);
    }

    .trouble dl {
        border-top: 2px solid var(--ink);
    }

    .card::before {
        left: 14px;
    }

    .card-head {
        padding: 18px 18px 16px 32px;
    }

    .postcard {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px 18px 24px 32px;
    }

    .pc-msg {
        padding-right: 0;
    }

    .pc-addr {
        margin-top: 22px;
        padding: 22px 0 0;
        border-left: 0;
        border-top: 1.5px solid var(--rule-2);
    }

    .direct {
        margin-top: 48px;
    }

    .back {
        padding: 40px var(--gutter) 24px;
    }

    /* the tracks stack, each one a line: number, title, artist */
    .back-tracks {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .back-tracks li {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        align-items: baseline;
        padding: 10px 0;
    }

    .bt-t {
        margin-top: 0;
    }
}

/* ------------------------------------------------------------------ reduced motion: nothing moves */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        transition-delay: 0ms !important;
    }
}

/* ------------------------------------------------------------------ signal flow figures (programs) */

/* pressing the display replays the opening */
.display {
    cursor: pointer;
}
