/* ==========================================================================
   Dashboard intro (index.html, first visit only)

   The live grid (#portal) sits in its normal grid state behind this layer,
   scaled by --dash-k about a fixed point so its first screenful fills the
   transparent screen frame (#dash-screen). The push-in scales the scene by
   1/k and the grid back to 1 about the same point, so the two meet the
   window's edges together. Artwork ported from
   docs/superpowers/artwork/{Main,Phone}.dc.html.
   ========================================================================== */

:root {
    --dash-k: 0.48;
    --dash-left: 47vw;
    --dash-top: 43vh;
    --dash-shield: 34vh;
    --dash-ox: calc(var(--dash-left) / (1 - var(--dash-k)));
    --dash-oy: calc(var(--dash-top) / (1 - var(--dash-k)));
    --dash-w: calc(var(--dash-k) * 100vw);
    --dash-h: calc(var(--dash-k) * 100vh);
    --dash-frame-h: var(--dash-h); /* the screen's height before the push-in; inline (px) only for the rendered phone upright */
    --dash-ease: cubic-bezier(0.7, 0, 0.2, 1);
    --dash-push: 1000ms;
    /* Set by DashIntro.mount() on mount and resize. */
    --dash-fit: 1;   /* furniture: min(innerWidth / 1440, innerHeight / 900) */
    --dash-ss: 1;    /* windshield overlays: windshield height / artwork windshield height */
}
@media (max-width: 760px) and (orientation: portrait) {
    :root {
        --dash-k: 0.62;
        --dash-left: 19vw;
        --dash-top: 32vh;
        --dash-shield: 26vh;
    }
}

/* ---- The grid, placed in the screen ------------------------------------ */

html.dash-intro,
html.dash-intro body {
    overflow: hidden !important;
}
html.dash-intro #portal {
    transform-origin: var(--dash-ox) var(--dash-oy);
    transform: scale(var(--dash-k));
    clip-path: inset(0 0 calc(100% - var(--dash-frame-h) / var(--dash-k)) 0); /* cut at the screen's foot */
}
/* Grid chrome that lives outside #portal stays hidden until the push-in lands. */
html.dash-intro .copyright-tag.fixed {
    opacity: 0 !important;
}

/* ---- Scene ------------------------------------------------------------- */

#dash-scene {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: auto;      /* the whole scene, screen included, catches click-to-skip */
    transform-origin: var(--dash-ox) var(--dash-oy);
    color: #FFFFFF;
    font-family: var(--display);
}

/* Windshield band. No z-index and no clipping, so the doll can stand over the dash. */
#dash-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--dash-shield);
}
.dash-sky {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}
/* The view holds the scene box (still, clip). No z-index, transform or
   clipping here: the view adds no stacking level of its own. */
#dash-view,
#dash-scenebox {
    position: absolute;
    inset: 0;
}
/* A scene's still and clip, under the windshield's frame. Cropped like the
   drawn scene (xMidYMax slice). Shown only once loaded; [hidden] until then. */
#dash-still,
#dash-clip {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 100%;
}
#dash-still[hidden],
#dash-clip[hidden] { display: none; }
#dash-shield.dash-has-still #dash-drawn { display: none; }

.dash-ink { stroke: #1A1020; stroke-width: 3; stroke-linejoin: round; }
.dash-road { transform-origin: 720px 262px; animation: dash-drive .7s linear infinite; }
@keyframes dash-drive { from { transform: scale(1); } to { transform: scale(2); } }

/* The intro's heading, and the line that says how to enter: for assistive
   technology and search, never seen. */
#standoff-splash h1.dash-headline,
#standoff-splash p.dash-hint {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Rear-view mirror: stem, frame and plain glass. Drawn dashboard only. */
.dash-mirror {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.dash-mirror-stem {
    width: calc(18px * var(--dash-ss));
    height: calc(30px * var(--dash-ss));
    background: #0B0B0C;
}
.dash-mirror-glass {
    width: calc(230px * var(--dash-ss));
    height: calc(60px * var(--dash-ss));
    box-sizing: border-box;
    border: calc(7px * var(--dash-ss)) solid #0B0B0C;
    border-radius: calc(16px * var(--dash-ss));
    background: #3A3A3A;
}

/* Minimap */
.dash-minimap {
    position: absolute;
    z-index: 1;
    top: calc(44px * var(--dash-ss));
    right: 11%;
    width: calc(96px * var(--dash-ss));
    height: calc(96px * var(--dash-ss));
    box-sizing: border-box;
    border-radius: 50%;
    border: calc(4px * var(--dash-ss)) solid #F2EFE9;
    background: #1A1020;
    overflow: hidden;
}
.dash-minimap svg,
.dash-minimap img { display: block; width: 100%; height: 100%; }

/* First visit: the page stays dark until the fonts and the screen's pictures
   are ready, then the dashboard appears complete and the intro starts. */
html.dash-loading body > * { visibility: hidden !important; }

/* The grid sits in the screen before the intro starts (body.intro-active), so
   hide the header, menu and corners for the whole time the dashboard is up. */
html.dash-intro .header-name,
html.dash-intro .apex-nav,
html.dash-intro .action-group,
html.dash-intro #project-display,
html.dash-intro .footer-metadata,
html.dash-intro .corner-frame {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important; /* hidden at once; their own fade-in returns at landing */
}
/* Tiles are on screen at once, no fade-in. A negative delay finishes the
   cardFadeIn animation instantly; removing it after landing does not replay it
   (only a change of animation-name restarts an animation). */
html.dash-intro .grid-card { animation-delay: -1s; }

/* First visit: the full-size film backgrounds stay out of the way until the
   grid takes over (the grid page hides them too), so the grid tiles download first. */
html.dash-first #bg-container { display: none !important; }

/* Bobblehead doll, standing on the dash cap */
.dash-doll {
    position: absolute;
    z-index: 4;
    left: 42%;
    top: calc(var(--dash-shield) + 30px * var(--dash-ss));
    width: calc(150px * var(--dash-ss));
    transform: translateY(-100%);
    /* Hops off the dash once per dance loop; `translate` composes with the transform above. */
    animation: dash-hop 1.6s linear infinite;
}
.dash-doll svg { display: block; width: 100%; height: auto; }
.dash-doll-top {
    width: 100%;
    aspect-ratio: 150 / 140;
    transform-origin: 50% 100%;
    animation: dash-dance 1.6s ease-in-out infinite;
}
/* The raised arm waves, pivoting at the shoulder. */
.dash-doll-wave {
    transform-box: view-box;
    transform-origin: 48px 102px;
    animation: dash-wave .4s ease-in-out infinite;
}
.dash-doll-top svg { height: 100%; overflow: visible; }
.dash-doll-base { margin-top: calc(-2px * var(--dash-ss)); }
html.dash-pushing .dash-doll-top { animation: dash-sway-hard .5s ease-in-out infinite; }
/* Excited for a visitor: three quick wiggles, a stretch up into the hop,
   a squash on landing, then a smaller wobble to settle. Origin is the
   doll's feet, so stretch and squash never lift the body off its spring. */
@keyframes dash-dance {
    0%   { transform: rotate(0deg) scale(1, 1); }
    8%   { transform: rotate(-13deg) scale(1.02, 0.98); }
    18%  { transform: rotate(13deg) scale(1.02, 0.98); }
    28%  { transform: rotate(-13deg) scale(1.02, 0.98); }
    38%  { transform: rotate(13deg) scale(1.02, 0.98); }
    48%  { transform: rotate(0deg) scale(0.94, 1.08); }
    62%  { transform: rotate(0deg) scale(1.08, 0.92); }
    74%  { transform: rotate(-7deg) scale(1, 1); }
    86%  { transform: rotate(5deg) scale(1, 1); }
    100% { transform: rotate(0deg) scale(1, 1); }
}
@keyframes dash-hop {
    0%, 40% { translate: 0 0; animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
    50%     { translate: 0 -9%; animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.3); }
    60%, 100% { translate: 0 0; }
}
@keyframes dash-wave { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(22deg); } }
@keyframes dash-sway-hard { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
.dash-spring { fill: none; stroke: #A8A39A; stroke-width: 4; stroke-linejoin: round; }
.dash-spec { fill: #33415C; stroke: #0B0B0C; stroke-width: 5; stroke-linejoin: round; }
.dash-zip { stroke: #F2EFE9; stroke-width: 3; }

/* ---- Dash body --------------------------------------------------------- */

#dash-body {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
/* The dash surface, with the screen cut out of it. */
.dash-surface {
    position: absolute;
    z-index: 2;
    top: var(--dash-shield);
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #17171A 0px, #0E0E10 calc(460px * var(--dash-fit)));
    --hl: var(--dash-left);
    --ht: calc(var(--dash-top) - var(--dash-shield));
    --hr: calc(var(--dash-left) + var(--dash-w));
    --hb: calc(var(--dash-top) - var(--dash-shield) + var(--dash-h));
    clip-path: polygon(evenodd,
        0 0, 100% 0, 100% 100%, 0 100%, 0 0,
        var(--hl) var(--ht), var(--hr) var(--ht), var(--hr) var(--hb), var(--hl) var(--hb), var(--hl) var(--ht));
}
.dash-cap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(46px * var(--dash-fit));
    background: linear-gradient(180deg, #2C2C31 0%, #1B1B1E 45%, #111113 100%);
}
.dash-cap::after {
    content: "";
    position: absolute;
    top: calc(12px * var(--dash-fit));
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.28);
}
.dash-vent {
    position: absolute;
    top: calc(46px * var(--dash-fit));
    left: 0;
    right: 0;
    height: calc(26px * var(--dash-fit));
    box-sizing: border-box;
    border-top: 1px solid #8C9098;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    background: repeating-linear-gradient(180deg, #060607 0px, #060607 5px, #26262B 5px, #26262B 7px);
}

/* Furniture: a 1440-wide design-space box, origin at the dash's top-left. */
.dash-furniture {
    position: absolute;
    z-index: 3;
    top: var(--dash-shield);
    left: 0;
    width: 1440px;
    height: 0;
    transform: scale(var(--dash-fit));
    transform-origin: 0 0;
}
.dash-furniture > * { position: absolute; }
.dash-furniture svg { display: block; width: 100%; height: 100%; }
.dash-cluster { left: 86px; top: -8px; width: 340px; height: 120px; }
.dash-wheel { left: 36px; top: -70px; width: 440px; height: 440px; }
.dash-knee {
    left: 110px;
    top: 392px;
    width: 280px;
    box-sizing: border-box;
    padding: 28px 40px 22px;
    border: 1px solid #2A2A2E;
    border-radius: 20px;
    background: linear-gradient(180deg, #1A1A1D 0%, #0D0D0F 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.dash-knee::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 20px;
    right: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.24);
}
.dash-knee .dash-dial { flex: none; width: 64px; height: 64px; }
.dash-knee .dash-wire-slot { flex: none; width: 76px; height: 76px; }
/* Footwell: tops aligned so both pedals show at the window's lower edge. */
.dash-pedals { left: 150px; top: 532px; display: flex; align-items: flex-start; gap: 44px; }
.dash-pedal-brake {
    width: 124px;
    height: 84px;
    box-sizing: border-box;
    border: 3px solid #5E636B;
    border-radius: 12px;
    background: repeating-linear-gradient(90deg, #B9BCC2 0px, #B9BCC2 14px, #1A1A1D 14px, #1A1A1D 20px);
}
.dash-pedal-gas {
    width: 62px;
    height: 150px;
    box-sizing: border-box;
    border: 3px solid #5E636B;
    border-radius: 12px;
    background: repeating-linear-gradient(180deg, #B9BCC2 0px, #B9BCC2 14px, #1A1A1D 14px, #1A1A1D 20px);
    transform: rotate(4deg);
}
.dash-rim-o { fill: none; stroke: #4A4A52; stroke-width: 42; stroke-linejoin: round; }
.dash-rim { fill: none; stroke: #0B0B0D; stroke-width: 37; stroke-linejoin: round; }
.dash-stitch { fill: none; stroke: #8A8A94; stroke-width: 1.5; stroke-dasharray: 3 5; }
.dash-sheen { fill: none; stroke: #FFFFFF; stroke-width: 6; stroke-linecap: round; opacity: .18; }
.dash-chrome-s { fill: none; stroke: url(#dash-chrome); stroke-width: 4; stroke-linecap: round; }
.dash-chrome-f { fill: url(#dash-chrome); }
.dash-ticks { fill: none; stroke: #D0D3D8; stroke-width: 5; stroke-dasharray: 1.5 9.8; }
.dash-needle { fill: none; stroke: var(--vibrant-red-hud); stroke-width: 2.5; stroke-linecap: round; }

/* ---- Screen frame ------------------------------------------------------ */

/* The element's box is the frame rect; the bezel is drawn outside it. Opaque
   until the grid is mounted behind it, then transparent. */
#dash-screen {
    position: absolute;
    z-index: 3;
    left: var(--dash-left);
    top: var(--dash-top);
    width: var(--dash-w);
    height: var(--dash-frame-h);
    background: var(--bg, #050505);
    --dash-bezel-line: #5E636B; /* the bezel's grey line; brightens on hover */
    box-shadow:
        0 0 0 calc(10px * var(--dash-fit)) #000000,
        0 0 0 calc(11px * var(--dash-fit)) var(--dash-bezel-line),
        0 calc(24px * var(--dash-fit)) calc(48px * var(--dash-fit)) calc(11px * var(--dash-fit)) rgba(0, 0, 0, 0.6);
    transition: box-shadow 150ms;
}
html.dash-intro #dash-screen { background: transparent; }
/* While the intro waits, the screen is the way in: a pointer, and on hover its
   grey line brightens. The black ring and the drop shadow stay. Not once the
   push-in has started. */
html.dash-intro:not(.dash-pushing) #dash-screen { cursor: pointer; }
html.dash-intro:not(.dash-pushing) #dash-screen:hover { --dash-bezel-line: #C9CDD3; }

/* ---- Start button: Wire Omar ------------------------------------------- */

/* Sits in the knee panel's slot (design x 273, y 421 from the dash top). */
#dash-wire {
    position: absolute;
    z-index: 5;
    left: calc(273px * var(--dash-fit));
    top: calc(var(--dash-shield) + 421px * var(--dash-fit));
    width: calc(76px * var(--dash-fit));
    height: calc(76px * var(--dash-fit));
    box-sizing: border-box;
    border-radius: 50%;
    border: calc(3px * var(--dash-fit)) solid #C9CDD3;
    box-shadow: 0 0 0 1px #5E636B, inset 0 0 0 calc(4px * var(--dash-fit)) #151517, 0 calc(6px * var(--dash-fit)) calc(14px * var(--dash-fit)) rgba(0, 0, 0, 0.6);
    background: #070708;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: calc(3px * var(--dash-fit));
    color: #FFFFFF;
    text-decoration: none;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 700;
    font-size: calc(14px * var(--dash-fit));
    line-height: 1.05;
    text-align: center;
    pointer-events: auto;
    cursor: pointer;
}
#dash-wire:hover { color: var(--vibrant-red-hud); }
#dash-wire:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
#dash-wire svg {
    display: block;
    width: auto;
    height: calc(16px * var(--dash-fit));
    fill: currentColor;
}

/* ---- Push-in ----------------------------------------------------------- */

html.dash-pushing #dash-scene {
    transform: scale(calc(1 / var(--dash-k)));
    transition: transform var(--dash-push) var(--dash-ease);
}
html.dash-pushing #portal {
    transform: scale(1);
    clip-path: inset(0 0 calc(100% - 100vh) 0);
    transition: transform var(--dash-push) var(--dash-ease), clip-path var(--dash-push) var(--dash-ease);
}
/* A short screen grows to --dash-h on the grid cut's clock (elsewhere nothing moves). Phone upright: the page sits --dash-slide higher in it, and slides back. */
html.dash-pushing #dash-screen { height: var(--dash-h); transition: box-shadow 150ms, height var(--dash-push) var(--dash-ease); }
html.dash-pushing.dash-rendered #dash-cockpit { --hb: calc(var(--dash-top) + var(--dash-h)); transition: clip-path var(--dash-push) var(--dash-ease); }
html.dash-intro.dash-rendered[data-dash-mode="tall"] #grid-scroll-container { transform: translateY(calc(-1 * var(--dash-slide, 0px))); }
html.dash-pushing.dash-rendered[data-dash-mode="tall"] #grid-scroll-container { transform: none; transition: transform var(--dash-push) var(--dash-ease); }

/* ---- Phone, upright (on its side it takes the wide rules) --------------- */

@media (max-width: 760px) and (orientation: portrait) {
    .dash-furniture { display: none; }

    .dash-mirror-stem { width: calc(10px * var(--dash-ss)); height: calc(22px * var(--dash-ss)); }
    .dash-mirror-glass {
        width: calc(120px * var(--dash-ss));
        height: calc(34px * var(--dash-ss));
        border-width: calc(5px * var(--dash-ss));
        border-radius: calc(10px * var(--dash-ss));
    }

    .dash-minimap {
        top: calc(16px * var(--dash-ss));
        right: calc(16px * var(--dash-ss));
        width: calc(64px * var(--dash-ss));
        height: calc(64px * var(--dash-ss));
        border-width: calc(3px * var(--dash-ss));
    }

    .dash-doll {
        left: calc(130px * var(--dash-ss));
        top: calc(var(--dash-shield) + 16px * var(--dash-ss));
        width: calc(100px * var(--dash-ss));
    }

    .dash-surface { background: #050505; }
    .dash-cap { height: calc(30px * var(--dash-ss)); }
    .dash-cap::after { top: calc(9px * var(--dash-ss)); }
    .dash-vent {
        top: calc(30px * var(--dash-ss));
        height: calc(18px * var(--dash-ss));
        background: repeating-linear-gradient(180deg, #060607 0px, #060607 4px, #26262B 4px, #26262B 6px);
    }

    #dash-screen {
        box-shadow:
            0 0 0 6px #000000,
            0 0 0 7px var(--dash-bezel-line),
            0 16px 32px 7px rgba(0, 0, 0, 0.6);
    }

    /* Drawn: no knee panel on the phone, so the button sits centred in the margin
       left of the bezel (7px wide), level with the screen's foot. */
    html:not(.dash-rendered) #dash-wire {
        left: calc((var(--dash-left) - 7px) / 2 - 27px);
        top: calc(var(--dash-top) + var(--dash-h) - 54px);
        width: 54px;
        height: 54px;
        border-width: 2px;
        box-shadow: 0 0 0 1px #5E636B, inset 0 0 0 3px #151517, 0 4px 10px rgba(0, 0, 0, 0.6);
        gap: 2px;
        font-size: 10px;
    }
    html:not(.dash-rendered) #dash-wire svg { height: 11px; }
}

/* ---- Rendered cockpit (html.dash-rendered) ----------------------------- */

/* One rendered cockpit picture in place of the drawn dash, with the screen cut
   out of it. dashboard-intro.js sets html.dash-rendered, html[data-dash-mode]
   and the layout variables (px; --dash-k a number) only once the picture has
   loaded while the page was dark. Without the class nothing below applies and
   the drawn dashboard shows as before.
   Paint order: scene (#dash-shield, z 1 and lower), cockpit (z 2),
   screen and minimap (z 3), doll (z 4), Wire Omar (z 5). #dash-shield and
   #dash-body set no z-index, so all of these stack together. */
#dash-cockpit { display: none; }
html.dash-rendered #dash-cockpit {
    display: block;
    position: absolute;
    z-index: 2;
    inset: 0;
    /* The screen's hole, as in .dash-surface but in window coordinates. */
    --hl: var(--dash-left);
    --ht: var(--dash-top);
    --hr: calc(var(--dash-left) + var(--dash-w));
    --hb: calc(var(--dash-top) + var(--dash-frame-h));
    clip-path: polygon(evenodd,
        0 0, 100% 0, 100% 100%, 0 100%, 0 0,
        var(--hl) var(--ht), var(--hr) var(--ht), var(--hr) var(--hb), var(--hl) var(--hb), var(--hl) var(--ht));
}
html.dash-rendered #dash-cockpit-img {
    position: absolute;
    top: 0;
    left: var(--ck-x);
    display: block;
    width: var(--ck-w);
    max-width: none;
    height: var(--ck-h);
}
/* Phone upright: the picture is the cockpit's slice from x = 0.25 to 0.64. */
html.dash-rendered[data-dash-mode="tall"] #dash-cockpit-img { left: calc(var(--ck-x) + 0.25 * var(--ck-w)); width: calc(0.39 * var(--ck-w)); }
/* Wider than 16:9: black beside the picture, fading in over its outer 6%.
   The width is 0 when the picture starts at x = 0 (no margin to fade into). */
html.dash-rendered[data-dash-mode="wide"] #dash-cockpit::before,
html.dash-rendered[data-dash-mode="wide"] #dash-cockpit::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    width: min(calc(var(--ck-x) * 1000), calc(var(--ck-x) + 0.06 * var(--ck-w)));
}
html.dash-rendered[data-dash-mode="wide"] #dash-cockpit::before {
    left: 0;
    background: linear-gradient(90deg, #000000 var(--ck-x), rgba(0, 0, 0, 0));
}
html.dash-rendered[data-dash-mode="wide"] #dash-cockpit::after {
    right: 0;
    background: linear-gradient(270deg, #000000 var(--ck-x), rgba(0, 0, 0, 0));
}

/* The windshield spans the picture. Pillars, roof, hood and the dash itself
   are in the picture now; the drawn scene (#dash-drawn) stays as the fallback
   for a missing still. */
html.dash-rendered #dash-shield {
    left: var(--ck-x);
    width: var(--ck-w);
}
html.dash-rendered .dash-surface,
html.dash-rendered .dash-furniture,
html.dash-rendered .dash-sky > :not(defs):not(#dash-drawn) {
    display: none;
}

/* The mirror, glass and all, is painted into the cockpit picture. */
html.dash-rendered .dash-mirror { display: none; }

/* Minimap over the picture, 7% of its width in from its visible right edge. */
html.dash-rendered .dash-minimap {
    z-index: 3;
    right: calc(var(--ck-crop-r) + 0.07 * var(--ck-w));
}
/* Phone upright: under the mirror, over the sky, 10px in from the window's left (the windshield starts at --ck-x). */
html.dash-rendered[data-dash-mode="tall"] .dash-minimap {
    left: calc(10px - var(--ck-x)); right: auto; top: calc(0.16 * var(--ck-h)); width: 56px; height: 56px;
}

/* Wire Omar on the picture's start button: a ring 128px across at 3840 wide,
   centred on (0.428, 0.674), in both modes. The knight alone on its face, no
   words (the link keeps its name in aria-label and title). */
html.dash-rendered #dash-wire {
    left: calc(var(--ck-x) + (0.428 - 0.01665) * var(--ck-w));
    top: calc(0.674 * var(--ck-h) - 0.01665 * var(--ck-w));
    width: calc(0.0333 * var(--ck-w));
    height: calc(0.0333 * var(--ck-w));
    border: 0;
    background: none;
    box-shadow: none;
}
html.dash-rendered #dash-wire:focus-visible { color: var(--vibrant-red-hud); }
html.dash-rendered #dash-wire svg { height: 46%; }
html.dash-rendered #dash-wire span { display: none; }

/* Scene box: one box in the scene's 21:9 shape, so the still and the clip
   share coordinates. Under the cockpit (z 2). */
html.dash-rendered #dash-view { overflow: hidden; }
html.dash-rendered #dash-scenebox {
    right: auto;
    bottom: auto;
    left: var(--sb-x);
    top: var(--sb-y);
    width: var(--sb-w);
    height: var(--sb-h);
}

/* Rendered doll: two pictures split at the spring. The base stands still; the
   top sways about the spring's top, with the drawn doll's motion. Only with
   .dash-doll-rendered (dashboard-intro.js adds it under html.dash-rendered once
   both pieces have loaded); otherwise the drawn doll shows, as before.
   Left and top resolve against #dash-shield, which starts at --ck-x and is
   --ck-w wide, so the doll's centre is --ck-x + CX * --ck-w. Feet at 0.42 of
   the picture are below the shield's foot: the shield does not clip. */
.dash-doll-r { display: none; }
html.dash-rendered .dash-doll.dash-doll-rendered {
    width: auto;
    height: calc(0.18 * var(--ck-h));
    aspect-ratio: 1161 / 3092;
    left: calc(0.43 * var(--ck-w));
    top: calc(0.42 * var(--ck-h));
    transform: translate(-50%, -100%);
}
html.dash-rendered[data-dash-mode="tall"] .dash-doll.dash-doll-rendered { height: calc(0.15 * var(--ck-h)); }
/* Phone upright, a doll picture missing: the drawn doll (100px wide there) keeps the same centre. */
html.dash-rendered[data-dash-mode="tall"] .dash-doll:not(.dash-doll-rendered) { left: calc(0.43 * var(--ck-w) - 50px * var(--dash-ss)); }
html.dash-rendered .dash-doll-rendered .dash-doll-top,
html.dash-rendered .dash-doll-rendered .dash-doll-base { display: none; }
html.dash-rendered .dash-doll-rendered .dash-doll-r {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    max-width: none;
    object-fit: fill;
}
html.dash-rendered .dash-doll-rendered .dash-doll-r-base { top: 43.47%; height: 56.53%; }
html.dash-rendered .dash-doll-rendered .dash-doll-r-top {
    top: 0;
    height: 57.21%;
    transform-origin: 49.53% 77.33%;
    animation: dash-dance 1.6s ease-in-out infinite;
}
html.dash-pushing.dash-rendered .dash-doll-rendered .dash-doll-r-top { animation: dash-sway-hard .5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .dash-road, .dash-doll, .dash-doll-top, .dash-doll-wave,
    html.dash-pushing .dash-doll-top,
    html.dash-rendered .dash-doll-rendered .dash-doll-r-top,
    html.dash-pushing.dash-rendered .dash-doll-rendered .dash-doll-r-top { animation: none; }
}
