/* Malthen — "event horizon" identity.
   Loaded after space.css: re-maps the legacy tokens so every page picks up the new palette,
   then styles the shell (header, nav, footer) and the home page. */

:root {
    --void: #000000;
    --disk: #F2B35B;        /* accretion gold: primary accent */
    --doppler: #FFF3DC;     /* blueshifted white: text on dark, highlights */
    --ember: #B4532A;       /* redshifted edge: secondary accent */
    --starlight: #98A3B8;   /* secondary text */
    --hairline: rgba(255, 243, 220, 0.12);
    --rule-fade: linear-gradient(90deg, rgba(242,179,91,.30), rgba(255,243,220,.08) 45%, transparent);
    --rule-center: linear-gradient(90deg, transparent, rgba(242,179,91,.22) 30%, rgba(255,226,170,.4) 50%, rgba(242,179,91,.22) 70%, transparent);

    --font-display: 'Michroma', 'Manrope', sans-serif;
    --font-body: 'Manrope', system-ui, sans-serif;

    /* Legacy tokens used across other views */
    --black: var(--void);
    --white: var(--doppler);
    --cyan: var(--disk);
    --purple: var(--ember);
    --gold: var(--disk);
    --font-main: var(--font-body);

    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
}

html { background: var(--void) !important; }
body { background: transparent !important; font-family: var(--font-body); color: var(--doppler) !important; font-size: 1.0625rem; line-height: 1.6; }
h1, h2, h3 { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--disk); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--disk); color: var(--void); }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 10000; background: var(--disk); color: var(--void); padding: 10px 16px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--starlight); }

/* ---------- Header ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 18px var(--gutter);
    background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--doppler); }
.brand img { display: block; }
.brand-word { font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 0.28em; text-transform: uppercase; padding-top: 2px; }

.nav-disclosure > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; border-radius: 50%; border: 1px solid var(--hairline); }
.nav-disclosure > summary::-webkit-details-marker { display: none; }
.nav-disclosure > summary span { display: block; width: 18px; height: 1.5px; background: var(--doppler); transition: transform .25s ease; }
.nav-disclosure[open] > summary span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-disclosure[open] > summary span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.nav-panel { display: flex; align-items: center; gap: 4px; }
.nav-panel a, .lang-toggle > * { text-decoration: none; color: var(--starlight); font-size: 0.95rem; padding: 10px 14px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav-panel a:hover { color: var(--doppler); }
.nav-panel a[aria-current="page"] { color: var(--doppler); background: rgba(255,243,220,.07); }
.lang-toggle { display: inline-flex; margin-left: 12px; border: 1px solid var(--hairline); border-radius: 999px; padding: 2px; }
.lang-toggle > * { padding: 6px 12px; font-size: 0.8rem; line-height: 1.2; display: inline-flex; align-items: center; }
.lang-toggle span[aria-current] { color: var(--void); background: var(--disk); }

@media (min-width: 900px) {
    .nav-disclosure > summary { display: none; }
}
@media (max-width: 899px) {
    .nav-panel {
        position: fixed; inset: 76px 12px auto 12px; flex-direction: column; align-items: stretch;
        padding: 12px; border: 1px solid var(--hairline); border-radius: 18px;
        background: rgba(6, 6, 8, .96); backdrop-filter: blur(12px);
    }
    .nav-panel a { padding: 14px 16px; font-size: 1.05rem; }
    .lang-toggle { margin: 8px 0 0; align-self: flex-start; }
}

/* ---------- Buttons & links ---------- */
.btn-solid, .btn-quiet {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
    padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s; border: 1px solid transparent; cursor: pointer;
}
.btn-solid { background: var(--doppler); color: var(--void); }
.btn-solid:hover { background: var(--disk); color: var(--void); }
.btn-quiet { color: var(--doppler); border-color: var(--hairline); background: transparent; }
.btn-quiet:hover { border-color: var(--disk); color: var(--disk); }
.link-arrow { color: var(--disk); text-decoration: none; font-weight: 600; border-bottom: 1px solid rgba(242,179,91,.35); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--disk); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(120px, 16vh, 180px) 0 clamp(64px, 10vh, 112px); }
.hero-grid { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-name { font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--disk); margin: 0 0 20px; }
.hero-title { font-family: var(--font-body); font-weight: 600; font-size: clamp(2.2rem, 4.8vw, 3.9rem); line-height: 1.08; letter-spacing: -0.025em; max-width: 16ch; margin: 0 0 24px; }
.hero-lede { max-width: 52ch; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: rgba(255,243,220,.8); margin: 0 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-object { margin: 0; position: relative; }
.hero-object canvas { display: block; width: 100%; aspect-ratio: 1; }
.hero-object canvas.is-fallback { background: radial-gradient(circle at 50% 50%, #000 0 14%, rgba(242,179,91,.5) 15%, rgba(180,83,42,.15) 24%, transparent 40%); }
.hero-object figcaption { margin-top: 8px; font-size: 0.82rem; color: var(--starlight); text-align: center; }
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 88px; }
    .hero-object { order: -1; margin: 0 calc(var(--gutter) * -1) 8px; }
    .hero-object canvas { aspect-ratio: 16 / 9; }
    .hero-object figcaption { display: none; }
}

/* ---------- Sections ---------- */
.band { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.band::before { content: ""; position: absolute; top: 0; left: 50%; width: min(72%, 980px); height: 1px; transform: translateX(-50%); pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(242,179,91,.28) 30%, rgba(255,226,170,.55) 50%, rgba(242,179,91,.28) 70%, transparent); }
.band::after { content: ""; position: absolute; top: -12px; left: 50%; width: min(36%, 460px); height: 24px; transform: translateX(-50%); pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(242,179,91,.14), transparent 70%); filter: blur(4px); }
.band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 24px; max-width: 24ch; }
.band p { max-width: 62ch; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.band-head h2 { margin: 0; }

.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li { position: relative; }
.work-list li::after, .work-list::before { content: ""; display: block; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, rgba(242,179,91,.30), rgba(255,243,220,.08) 45%, transparent); }
.work-list li::after { position: absolute; left: 0; right: 0; bottom: 0; }
.work-row { display: grid; grid-template-columns: 56px minmax(160px, 1fr) 2fr; gap: 6px 28px; padding: 28px 0; text-decoration: none; color: var(--doppler); align-items: start; }
.work-icon { grid-row: span 2; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: rgba(255,243,220,.06); }
.work-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-name { font-size: 1.3rem; font-weight: 600; grid-row: span 2; transition: color .2s; }
.work-desc { color: rgba(255,243,220,.78); }
.work-meta { color: var(--starlight); font-size: 0.9rem; }
.work-row:hover .work-name { color: var(--disk); }
@media (max-width: 700px) { .work-row { grid-template-columns: 48px 1fr; gap: 6px 16px; } .work-icon { width: 48px; height: 48px; grid-row: span 3; } .work-name { grid-row: auto; } }

.dilation-grid { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.ocean-world { width: 100%; aspect-ratio: 1; display: block; }
@media (max-width: 800px) { .dilation-grid { grid-template-columns: 1fr; } .ocean-world { max-width: 300px; margin: 0 auto; } }

.stack { margin: 0; }
.stack-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 18px 0; background: var(--rule-fade) top / 100% 1px no-repeat; }
.stack dt { color: var(--starlight); font-weight: 500; }
.stack dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--hairline); border-radius: 999px; font-size: 0.95rem; }
.chip i { color: var(--disk); }
@media (max-width: 640px) { .stack-row { grid-template-columns: 1fr; } }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.social-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 4px; }
.social-list a { display: inline-flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; color: var(--doppler); }
.social-list a:hover { color: var(--disk); }
.social-list i { width: 20px; color: var(--disk); }

.contact-form { display: flex; flex-direction: column; gap: 8px; }
.contact-form label { font-size: 0.9rem; color: var(--starlight); margin-top: 8px; }
.contact-form input, .contact-form textarea {
    background: rgba(255,243,220,.04); border: 1px solid var(--hairline); border-radius: 12px;
    color: var(--doppler); padding: 14px 16px; font: inherit; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--disk); background: rgba(255,243,220,.07); }
.contact-form .btn-solid { margin-top: 16px; align-self: flex-start; }
.form-note { margin: 8px 0 0; padding: 12px 16px; border-radius: 12px; }
.form-note.ok { background: rgba(242,179,91,.12); color: var(--disk); }
.form-note.err { background: rgba(180,83,42,.2); color: #ffb39a; }

.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--hairline); background: #000; color: var(--starlight); font-size: 0.9rem; }
.site-footer .wrap { display: flex; align-items: center; gap: 12px; }

/* ---------- Legacy chrome on the new palette ---------- */
#command-trigger { background: #000 !important; border: 1px solid var(--hairline) !important; border-radius: 50% !important; box-shadow: none !important; }
#command-trigger:hover { border-color: var(--disk) !important; }
#command-trigger .m-rings { display: none !important; }
#command-trigger .m-letter { color: var(--disk) !important; }
@media (max-width: 899px) {
    #malthen-command-center { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Inner pages ---------- */
.page { padding-top: clamp(120px, 16vh, 168px); }
.page-head { padding-bottom: clamp(48px, 7vw, 80px); }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.1; letter-spacing: -0.025em; max-width: 22ch; margin: 0 0 20px; }
.page-lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: rgba(255,243,220,.82); max-width: 62ch; }
.split { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.split > h2 { margin: 0; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.principles { margin: 0; display: grid; gap: 32px 48px; grid-template-columns: 1fr 1fr; }
.principles-3 { grid-template-columns: repeat(3, 1fr); }
.principles dt { font-weight: 600; font-size: 1.1rem; margin-bottom: 8px; }
.principles dd { margin: 0; color: rgba(255,243,220,.75); }
@media (max-width: 860px) { .principles, .principles-3 { grid-template-columns: 1fr; } }

.cta-line { margin-top: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.project-list { list-style: none; margin: 0; padding: 0; }
.project { display: grid; grid-template-columns: 72px 1fr; gap: 28px; padding: 40px 0; background: var(--rule-fade) top / 100% 1px no-repeat; }
.project:first-child { background: none; padding-top: 0; }
.project-icon { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; background: rgba(255,243,220,.06); display: grid; place-items: center; font-size: 2rem; color: var(--doppler); }
.project-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project h2 { font-size: 1.6rem; margin: 0 0 4px; max-width: none; }
.project h2 a { text-decoration: none; }
.project h2 a:hover { color: var(--disk); }
.project-cat { color: var(--starlight); margin: 0 0 14px; }
.project-body > p { max-width: 64ch; }
.project-links { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 20px; }
.project-links a:not([class]) { color: var(--doppler); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--hairline); }
.project-links a:not([class]):hover { color: var(--disk); }
@media (max-width: 560px) { .project { grid-template-columns: 1fr; gap: 16px; } }

.back-link { color: var(--starlight); text-decoration: none; }
.back-link::before { content: '‹ '; }
.back-link:hover { color: var(--disk); }
.detail-title { display: flex; align-items: center; gap: 24px; margin-top: 24px; }
.detail-title img { border-radius: 22px; flex: none; }
.detail-title h1 { margin: 0 0 4px; }
.aside-title { font-size: 1rem; color: var(--starlight); font-weight: 500; margin: 0 0 12px; }
@media (max-width: 560px) { .detail-title { flex-direction: column; align-items: flex-start; } .detail-title img { width: 72px; height: 72px; } }

.hero-wordmark { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.8rem, 7vw, 5.6rem); letter-spacing: 0.02em; line-height: 1; margin: 0 0 28px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; }
.facts > div { display: flex; flex-direction: column-reverse; gap: 6px; border-left: 1px solid var(--hairline); padding-left: 20px; }
.facts dt { color: var(--starlight); font-weight: 500; }
.facts dd { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--disk); }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr 1fr; } }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 16px 0 16px 28px; background: var(--rule-fade) top / 100% 1px no-repeat; position: relative; color: rgba(255,243,220,.85); }
.feature-list li::before { content: ''; position: absolute; left: 4px; top: 26px; width: 8px; height: 8px; border-radius: 50%; background: var(--disk); }
.facts dd { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.02em; }
.band .aside-title { font-size: 1rem; color: var(--starlight); font-weight: 500; margin: 0 0 12px; max-width: none; }

/* ---------- Toys ---------- */
.is-draggable { cursor: grab; touch-action: pan-y; user-select: none; }
.is-draggable.is-dragging { cursor: grabbing; }

/* Skill orbit: each skill group is a ring; chips ride the ring and stay upright. */
.orbit { --step: 92px; position: relative; width: min(100%, 760px); aspect-ratio: 1; margin: 8px auto 0; }
.orbit-core { position: absolute; left: 50%; top: 50%; translate: -50% -50%; filter: drop-shadow(0 0 24px rgba(242,179,91,.35)); }
.orbit-ring {
    position: absolute; left: 50%; top: 50%;
    width: calc(var(--r) * var(--step) * 2 + 80px); aspect-ratio: 1; translate: -50% -50%;
    border: 1px dashed rgba(255,243,220,.10); border-radius: 50%;
    animation: orbit-spin var(--dur) linear infinite; animation-direction: var(--dir);
}
.orbit-body { position: absolute; left: 50%; top: 50%; width: 0; height: 0; rotate: var(--a); }
.orbit-chip {
    position: absolute; left: 0; top: 0;
    translate: calc(var(--r) * var(--step) + 40px - 50%) -50%;
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    padding: 7px 14px; border-radius: 999px; font-size: 0.9rem;
    background: #050505; border: 1px solid var(--hairline); color: var(--doppler);
    animation: orbit-spin var(--dur) linear infinite reverse; animation-direction: var(--dir);
    rotate: calc(var(--a) * -1);
    transition: scale .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.orbit-ring:nth-child(odd) .orbit-chip { animation-direction: normal; }
.orbit-ring:nth-child(even) .orbit-chip { animation-direction: reverse; }
.orbit-chip i { color: var(--disk); }
.orbit-chip b { font-weight: 500; }
.orbit:hover .orbit-ring, .orbit:hover .orbit-chip { animation-play-state: paused; }
.orbit-chip:hover { scale: 1.12; border-color: var(--disk); box-shadow: 0 0 24px rgba(242,179,91,.25); z-index: 2; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }


@media (max-width: 860px), (prefers-reduced-motion: reduce) { .orbit { display: none; } }

/* ---------- Every remaining piece of chrome on the same system ---------- */
/* Scrollbar: the thumb is a sliver of accretion disk (redshifted ember -> gold -> blueshifted white)
   moving down a dark well lit by a faint gold seam, the same light the black hole throws. */
html { scrollbar-color: #C98A45 #050404; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; background: #000; }
::-webkit-scrollbar-track { background: linear-gradient(90deg, #000 0 45%, rgba(242,179,91,.08) 50%, #000 55% 100%); }
::-webkit-scrollbar-thumb {
    border: 3px solid transparent; background-clip: padding-box; border-radius: 999px;
    background-image: linear-gradient(180deg, var(--ember), var(--disk) 55%, var(--doppler));
}
::-webkit-scrollbar-thumb:hover { border-width: 2px; }
::-webkit-scrollbar-corner { background: #000; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.scroll-progress { background: linear-gradient(90deg, var(--ember), var(--disk)) !important; height: 2px !important; box-shadow: none !important; }

/* Right-click menu */
#malthen-context-menu {
    background: rgba(8,8,10,.96) !important; backdrop-filter: blur(12px);
    border: 1px solid var(--hairline) !important; border-radius: 14px !important;
    padding: 6px !important; box-shadow: 0 18px 50px rgba(0,0,0,.6) !important; min-width: 180px;
}
#malthen-context-menu .ctx-item {
    font-family: var(--font-body) !important; font-size: .92rem !important; letter-spacing: 0 !important;
    text-transform: none !important; color: var(--doppler) !important;
    padding: 10px 14px !important; border-radius: 10px !important; display: flex; align-items: center; gap: 10px;
}
#malthen-context-menu .ctx-item i { color: var(--disk) !important; }
#malthen-context-menu .ctx-item:hover { background: rgba(255,243,220,.07) !important; }

/* Command terminal */
#global-terminal, .hud-window {
    background: rgba(6,6,8,.97) !important; border: 1px solid var(--hairline) !important;
    border-radius: 18px !important; box-shadow: 0 30px 80px rgba(0,0,0,.7) !important; overflow: hidden;
}
.hud-header { border-bottom: 1px solid var(--hairline) !important; background: transparent !important; }
.hud-title, .hud-status { color: var(--starlight) !important; }
.hud-status .pulse-dot { background: var(--disk) !important; box-shadow: 0 0 10px var(--disk) !important; }
.hud-body, .hud-log, .hud-line { color: rgba(255,243,220,.85) !important; }
.hud-input-area { border-top: 1px solid var(--hairline) !important; background: transparent !important; }
.hud-input-area .prompt { color: var(--disk) !important; }
#global-cli-input { color: var(--doppler) !important; caret-color: var(--disk); }
.hud-input-area .cursor { background: var(--disk) !important; }
.hud-scanline { display: none !important; }
#close-terminal { color: var(--starlight) !important; }
#close-terminal:hover { color: var(--disk) !important; }
.cmd-chip, .cmd-chip.gold {
    background: transparent !important; border: 1px solid var(--hairline) !important; color: var(--doppler) !important;
    border-radius: 999px !important; padding: 3px 10px !important;
}
.cmd-chip:hover, .cmd-chip.gold:hover { border-color: var(--disk) !important; color: var(--disk) !important; }

/* Legacy components still used by the lab, login and error pages */
.card-phi { background: rgba(255,243,220,.03) !important; border: 1px solid var(--hairline) !important; border-radius: 18px !important; box-shadow: none !important; }
.btn-phi, .btn-primary-space {
    border-radius: 999px !important; font-family: var(--font-body) !important; letter-spacing: 0 !important;
    text-transform: none !important; font-weight: 600 !important;
}
.btn-phi.btn-primary, .btn-primary-space { background: var(--doppler) !important; color: var(--void) !important; border: 0 !important; }
.btn-phi.btn-primary:hover, .btn-primary-space:hover { background: var(--disk) !important; }
.btn-phi.btn-outline { background: transparent !important; color: var(--doppler) !important; border: 1px solid var(--hairline) !important; }
.btn-phi.btn-outline:hover { border-color: var(--disk) !important; color: var(--disk) !important; }
.label-mono { color: var(--starlight) !important; }

/* Error page */
.error-container { background: transparent !important; }
.error-glow { background: radial-gradient(circle, rgba(242,179,91,.08) 0%, transparent 70%) !important; }
.error-code { font-family: var(--font-display) !important; color: var(--disk) !important; letter-spacing: .1em !important; }
.error-title { font-family: var(--font-body) !important; letter-spacing: -0.01em !important; text-transform: none !important; }
.error-desc { color: rgba(255,243,220,.75) !important; font-family: var(--font-body) !important; }
.orbit { --step: 58px; width: min(100%, 600px); }
.orbit-chip { box-shadow: none; font-size: .85rem; padding: 6px 12px; }
.site-header { background: rgba(0,0,0,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--hairline); padding-top: 14px; padding-bottom: 14px; }
.orbit .orbit-ring { filter: none; }
.orbit .orbit-ring::after { display: none; }
.brand-word { font-size: 1rem; letter-spacing: 0.34em; }
.orbit-core.brand-word { font-family: var(--font-display); font-size: .8rem; letter-spacing: .3em; color: var(--disk); white-space: nowrap; filter: none; }

/* ---------- Laboratory ---------- */
.lab-page { padding-top: var(--lab-top, 84px); }
body.lab-focus #malthen-command-center { opacity: 0; pointer-events: none; transform: scale(.85); transition: opacity .2s, transform .2s; }
/* The laboratory is a workspace: it fills the screen under the site header, edge to edge.
   The side panel floats over the stage and can be hidden; on narrow screens everything stacks. */
.lab { --panel-w: 352px; position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 0 clamp(10px, 1.4vw, 20px) 14px;
       height: calc(100svh - var(--lab-top, 84px)); min-height: 560px; margin-bottom: clamp(40px, 6vw, 72px); outline: none; }
.lab.is-panel-hidden { --panel-w: 0px; }
.lab-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.lab-heading { min-width: 0; display: flex; align-items: baseline; gap: 14px; }
.lab-heading h1 { font-size: clamp(1.15rem, 1.6vw, 1.45rem) !important; line-height: 1.2; margin: 0 !important; max-width: none !important; white-space: nowrap; letter-spacing: -0.01em; }
.lab-lede { margin: 0; font-size: .86rem; color: var(--starlight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lab-bar-actions { flex: none; display: flex; gap: 6px; }
.lab-btn-sm { min-height: 34px; padding: 0 12px; font-size: .8rem; border-radius: 10px; }
.lab-btn-sm[aria-pressed="true"] { border-color: rgba(242,179,91,.55); color: var(--disk); }
.lab-btn:disabled { opacity: .4; cursor: not-allowed; }
.lab-toast { position: absolute; top: 56px; left: 50%; translate: -50% 0; z-index: 6; margin: 0; padding: 8px 14px; border-radius: 10px; background: rgba(12,12,14,.92); border: 1px solid var(--hairline); font-size: .82rem; color: var(--doppler); opacity: 0; pointer-events: none; transition: opacity .2s; }
.lab-toast.is-on { opacity: 1; }
.lab-body { position: relative; flex: 1 1 auto; min-height: 0; }
.lab-stage { position: absolute; inset: 0; border: 1px solid var(--hairline); border-radius: 20px; overflow: hidden; background: #000; }
.lab:fullscreen { height: 100vh; padding: 12px; margin: 0; background: #000; }
.lab:fullscreen .lab-heading { visibility: hidden; }
#lab-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.lab-hud { position: absolute; top: 14px; left: 16px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; pointer-events: none; font-size: .8rem; }
.lab-hud div { display: flex; flex-direction: column; }
.lab-hud dt { color: var(--starlight); font-weight: 500; }
.lab-hud { text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,.9); }
.lab-hud dd { margin: 0; color: var(--doppler); font-variant-numeric: tabular-nums; }
.lab-hint { position: absolute; left: calc(50% - var(--panel-w) / 2); bottom: 84px; translate: -50% 0; margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.6); color: var(--starlight); font-size: .82rem; white-space: nowrap; pointer-events: none; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.lab-tools { position: absolute; left: calc(50% - var(--panel-w) / 2); bottom: 14px; translate: -50% 0; display: flex; gap: 4px; padding: 6px; border: 1px solid var(--hairline); border-radius: 16px; background: rgba(6,6,8,.88); backdrop-filter: blur(12px); max-width: calc(100% - var(--panel-w) - 24px); overflow-x: auto; scrollbar-width: none; transition: left .25s ease; }
.lab-tools button { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 70px; padding: 8px 6px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--starlight); font: inherit; font-size: .72rem; cursor: pointer; }
.lab-tools button:hover { color: var(--doppler); background: rgba(255,243,220,.05); }
.lab-tools button[aria-pressed="true"] { color: var(--doppler); border-color: rgba(242,179,91,.55); background: rgba(242,179,91,.1); }
.lab-tools .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.lab-tools .dot-blackhole { background: #000; box-shadow: 0 0 0 1.5px #ffecd0, 0 0 10px rgba(255,190,110,.7); }
.lab-tools .dot-dust { background: radial-gradient(circle, #ffcf9a 0 25%, transparent 26%), radial-gradient(circle at 20% 30%, #c98a5a 0 20%, transparent 21%), radial-gradient(circle at 75% 70%, #c98a5a 0 20%, transparent 21%); box-shadow: none; }
.lab-tools .lbl { white-space: nowrap; }
.lab-tools .ico-sel { height: 14px; color: var(--doppler); }
.lab-tools-sep { flex: none; width: 1px; margin: 8px 2px; background: var(--hairline); }

/* Exactly as tall as the stage and never taller: overflowing content would slide under the next page
   section, which then swallows the clicks. Whatever does not fit scrolls inside the panel. */
.lab-side { position: absolute; top: 10px; right: 10px; bottom: 10px; width: calc(var(--panel-w, 352px) - 12px); z-index: 4;
             display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--hairline); border-radius: 18px;
             background: rgba(6,6,8,.74); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15);
             overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; transition: transform .25s ease, opacity .25s ease; }
.lab.is-panel-hidden .lab-side { width: 340px; transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.lab-side .lab-card { background: rgba(255,243,220,.025); }
.lab-viewbox summary { cursor: pointer; color: var(--starlight); font-size: .78rem; list-style: none; display: flex; justify-content: space-between; }
.lab-viewbox summary::after { content: '▾'; transition: transform .2s; }
.lab-viewbox[open] summary::after { transform: rotate(180deg); }
.lab-viewbox[open] summary { margin-bottom: 8px; }
.lab-viewbox summary:hover { color: var(--disk); }
.lab-sizek { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 8px; font-size: .78rem; color: var(--starlight); }
.lab-sizek input { width: 100%; accent-color: var(--disk); }
.lab-sizek input:disabled { opacity: .35; }
.lab-sizek output { min-width: 7ch; text-align: right; color: var(--doppler); font-variant-numeric: tabular-nums; }
/* Simple view (default): plain words and the essentials; Technical adds every number. */
.lab:not(.is-tech) .lab-hud .tech, .lab:not(.is-tech) .lab-facts, .lab:not(.is-tech) .lab-limit small { display: none; }
.lab-tech-switch { font-size: .8rem; color: var(--starlight); align-self: center; padding: 0 4px; }
.lab-search { display: flex; }
.lab-search input { width: 220px; min-height: 34px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 10px; background: rgba(255,243,220,.04); color: var(--doppler); font: inherit; font-size: .8rem; }
.lab-search input:focus { outline: 2px solid var(--disk); outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1280px) { .lab-search input { width: 150px; } }
@media (max-width: 700px) { .lab-search { display: none; } }
.hud-real dd { display: flex; align-items: baseline; gap: 6px; }
.hud-real small { color: var(--starlight); font-size: .72rem; }
.lab-graph { margin: 10px 0 0; }
.lab-graph figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; color: var(--starlight); margin-bottom: 4px; }
.lab-graph figcaption b { color: var(--doppler); font-weight: 600; font-variant-numeric: tabular-nums; }
.lab-graph canvas { display: block; width: 100%; height: 84px; border-radius: 8px; background: rgba(255,243,220,.03); }
.lab-side > .lab-card:first-child, .lab-keys { flex: none; }
.lab-card { border: 1px solid var(--hairline); border-radius: 16px; background: rgba(8,8,10,.72); padding: 12px; }
.lab-transport { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; }
.lab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: 11px; background: transparent; color: var(--doppler); font: inherit; font-size: .86rem; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.lab-btn:hover { border-color: rgba(242,179,91,.6); color: var(--disk); }
.lab-btn:focus-visible, .lab-seg button:focus-visible, .lab-tablist button:focus-visible, .lab-scenes button:focus-visible, .lab-catalog button:focus-visible, .lab-bodies button:focus-visible, .lab-actions button:focus-visible { outline: 2px solid var(--disk); outline-offset: 2px; }
.lab-btn .ico { font-size: .8rem; opacity: .85; }
.lab-btn-main { background: var(--doppler); color: #111; border-color: transparent; font-weight: 600; }
.lab-btn-main:hover { background: var(--disk); color: #111; }
.lab-btn-main[aria-pressed="true"] { background: var(--disk); }
.lab-btn-wide { width: 100%; margin-top: 10px; }
.lab-field { display: grid; gap: 6px; margin-top: 12px; font-size: .78rem; color: var(--starlight); }
.lab-seg { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); padding: 3px; border: 1px solid var(--hairline); border-radius: 10px; }
.lab-seg button { padding: 5px 0; border: 0; border-radius: 7px; background: transparent; color: var(--starlight); font: inherit; font-size: .8rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.lab-seg button:hover { color: var(--doppler); }
.lab-seg button[aria-checked="true"] { background: rgba(242,179,91,.16); color: var(--disk); font-weight: 600; }
.lab-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.lab-switch { display: flex; align-items: center; gap: 8px; color: var(--doppler); font-size: .84rem; cursor: pointer; }
.lab-switch input { position: absolute; opacity: 0; pointer-events: none; }
.lab-switch i { flex: none; position: relative; width: 28px; height: 16px; border-radius: 999px; background: rgba(255,243,220,.14); transition: background .15s; }
.lab-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--starlight); transition: transform .15s, background .15s; }
.lab-switch input:checked + i { background: rgba(242,179,91,.55); }
.lab-switch input:checked + i::after { transform: translateX(12px); background: #fff3dc; }
.lab-switch input:focus-visible + i { outline: 2px solid var(--disk); outline-offset: 2px; }

.lab-inspector { flex: 0 1 auto; min-height: 96px; max-height: 62%; overflow-y: auto; scrollbar-width: thin; }
.lab-inspector .muted { margin: 0; font-size: .86rem; line-height: 1.5; color: var(--starlight); }
.lab-ins-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lab-ins-head h2, .lab-ins-head h3 { font-size: 1.05rem; margin: 0; line-height: 1.2; }
.lab-ins-head .kind { margin: 2px 0 0; font-size: .76rem; color: var(--starlight); }
.lab-ins-head .ttl { flex: 1; min-width: 0; }
.lab-ins-head h2, .lab-ins-head h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-ins-tools { display: flex; gap: 4px; }
.lab-ins-tools button { width: 30px; height: 30px; border: 1px solid var(--hairline); border-radius: 9px; background: transparent; color: var(--doppler); font: inherit; font-size: .95rem; line-height: 1; cursor: pointer; }
.lab-ins-tools button:hover { border-color: var(--disk); color: var(--disk); }
.lab-ins-tools button[aria-pressed="true"] { border-color: var(--disk); background: rgba(242,179,91,.14); color: var(--disk); }
.lab-ins-tools .danger:hover { border-color: #ff9b7a; color: #ff9b7a; }
.lab-mass { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; margin: 0 0 8px; }
.lab-mass > button { height: 38px; border: 1px solid var(--hairline); border-radius: 10px; background: transparent; color: var(--doppler); font: inherit; font-size: 1.2rem; cursor: pointer; }
.lab-mass > button:hover:not(:disabled) { border-color: var(--disk); color: var(--disk); background: rgba(242,179,91,.08); }
.lab-mass > button:disabled { opacity: .35; cursor: not-allowed; }
.lab-mass > button:focus-visible, .lab-ins-tools button:focus-visible { outline: 2px solid var(--disk); outline-offset: 2px; }
.lab-mass .val { text-align: center; display: grid; line-height: 1.25; }
.lab-mass .lbl { font-size: .7rem; color: var(--starlight); }
.lab-mass b { font-size: 1rem; font-weight: 600; color: var(--doppler); font-variant-numeric: tabular-nums; }
.lab-mass small { font-size: .74rem; color: var(--starlight); }
.lab-mass em { font-style: normal; font-size: .7rem; color: #ffcf9a; }
.lab-about-box { margin-top: 4px; font-size: .8rem; }
.lab-about-box summary { cursor: pointer; color: var(--starlight); }
.lab-about-box summary:hover { color: var(--disk); }
.lab-about-box[open] summary { margin-bottom: 6px; }
.lab-about { margin: 0 0 8px; font-size: .84rem; line-height: 1.5; color: rgba(255,243,220,.82); }
.lab-real { color: var(--starlight); font-size: .8rem; }
.lab-status { margin: 0 0 12px; font-size: .9rem; line-height: 1.5; color: var(--doppler); text-wrap: pretty; }
.lab-facts { margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: .84rem; }
.lab-facts dt { color: var(--starlight); font-size: .74rem; }
.lab-facts dd { margin: 1px 0 0; font-variant-numeric: tabular-nums; color: var(--doppler); line-height: 1.3; }
.lab-facts dd small { display: block; color: var(--starlight); font-size: .74rem; }
.lab-facts dd em { display: block; color: #ffcf9a; font-size: .72rem; font-style: normal; }
.sun { font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", serif; font-size: .95em; }
.lab-limit { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: .8rem; color: var(--starlight); margin: 0 0 10px; }
.lab-limit meter { grid-column: 1 / -1; width: 100%; height: 6px; }
.lab-limit meter::-webkit-meter-bar { background: rgba(255,243,220,.08); border: 0; border-radius: 3px; }
.lab-limit meter::-webkit-meter-optimum-value { background: linear-gradient(90deg, var(--disk), var(--ember)); border-radius: 3px; }
.lab-limit b { color: var(--doppler); font-weight: 600; }
.lab-limit small { grid-column: 1 / -1; font-size: .74rem; line-height: 1.4; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-actions button { border: 1px solid var(--hairline); border-radius: 999px; background: transparent; color: var(--doppler); padding: 6px 12px; font: inherit; font-size: .8rem; cursor: pointer; }
.lab-actions button:hover:not(:disabled) { border-color: var(--disk); color: var(--disk); }
.lab-actions button[aria-pressed="true"] { border-color: var(--disk); background: rgba(242,179,91,.14); color: var(--disk); }
.lab-actions button:disabled { opacity: .4; cursor: not-allowed; }
.lab-actions .danger:hover { border-color: #ff9b7a !important; color: #ff9b7a !important; }
.lab-note { margin: 8px 0 0; font-size: .74rem; color: #ffcf9a; }

.lab .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.lab .dot[data-type="BLACKHOLE"] { background: #000; box-shadow: 0 0 0 1.5px #ffecd0, 0 0 8px rgba(255,190,110,.7); }

.lab-tabs { flex: 1 1 0; min-height: 160px; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.lab-tablist { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--hairline); overflow-x: auto; scrollbar-width: none; }
.lab-tablist button { flex: 1 0 auto; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--starlight); font: inherit; font-size: .78rem; cursor: pointer; white-space: nowrap; }
.lab-tablist button:hover { color: var(--doppler); }
.lab-tablist button[aria-selected="true"] { background: rgba(255,243,220,.08); color: var(--doppler); }
.lab-tablist b { font-weight: 500; color: var(--disk); font-variant-numeric: tabular-nums; margin-left: 2px; }
.lab-panel { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 8px 10px 14px; scrollbar-width: thin; }   /* min-height 0: lets the list scroll to its last row */
.lab-panel-note { margin: 2px 2px 8px; font-size: .78rem; color: var(--starlight); }
.lab-panel-bar { display: flex; justify-content: flex-end; }
.lab-link { border: 0; background: none; color: var(--starlight); font: inherit; font-size: .76rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lab-link:hover { color: var(--disk); }
.lab-h { font-size: .72rem !important; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--starlight); margin: 8px 2px 6px !important; max-width: none !important; }
.lab-scenes, .lab-catalog, .lab-bodies { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lab-scenes button { width: 100%; display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--doppler); font: inherit; cursor: pointer; }
.lab-scenes button:hover { background: rgba(255,243,220,.05); }
.lab-scenes button[aria-current="true"] { border-color: rgba(242,179,91,.5); background: rgba(242,179,91,.08); }
.lab-scenes b { font-size: .86rem; font-weight: 600; }
.lab-scenes span { font-size: .76rem; color: var(--starlight); }
.lab-catalog { grid-template-columns: 1fr 1fr; }
.lab-catalog button { width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; text-align: left; padding: 7px 8px; border: 1px solid var(--hairline); border-radius: 10px; background: transparent; color: var(--doppler); font: inherit; cursor: pointer; }
.lab-catalog button:hover { border-color: rgba(242,179,91,.5); }
.lab-catalog button[aria-pressed="true"] { border-color: var(--disk); background: rgba(242,179,91,.1); }
.lab-catalog .dot { grid-row: span 2; }
.lab-catalog b { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-catalog small { font-size: .72rem; color: var(--starlight); }
.lab-bodies li { display: flex; gap: 2px; min-width: 0; }
.lab-bodies .lab-follow { width: 28px; }
.lab-panel { overflow-x: hidden; }
.lab-bodies li.muted { font-size: .82rem; color: var(--starlight); padding: 6px 2px; }
.lab-body-sel { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--doppler); font: inherit; font-size: .84rem; text-align: left; cursor: pointer; }
.lab-body-sel:hover { background: rgba(255,243,220,.05); }
.lab-bodies li[aria-current="true"] .lab-body-sel { border-color: rgba(242,179,91,.5); background: rgba(242,179,91,.08); }
.lab-body-sel .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-body-sel .nm small { margin-left: 6px; color: var(--starlight); font-size: .72rem; }
.lab-body-sel .ms { font-size: .76rem; color: var(--starlight); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lab-follow { flex: none; width: 32px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--starlight); cursor: pointer; font-size: .95rem; }
.lab-follow:hover { color: var(--disk); border-color: var(--hairline); }
.lab-remove { font-size: 1.1rem; line-height: 1; }
.lab-remove:hover { color: #ff9b7a; }
.lab-follow[aria-pressed="true"] { color: var(--disk); border-color: rgba(242,179,91,.5); background: rgba(242,179,91,.1); }
.lab-log { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.lab-log li { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 5px 2px; border-bottom: 1px solid rgba(255,243,220,.05); color: rgba(255,243,220,.8); line-height: 1.4; }
.lab-log li time { color: var(--starlight); font-variant-numeric: tabular-nums; }
.lab-log li.gold { color: var(--disk); } .lab-log li.warn { color: #ffcf9a; } .lab-log li.hot { color: #ff9b7a; }
.lab-keys { font-size: .82rem; color: var(--starlight); flex: none; }
.lab-keys summary { cursor: pointer; color: var(--doppler); }
.lab-keys ul { padding-left: 18px; margin: 8px 0 0; }
.lab-keys li { margin: 4px 0; }
kbd { font: inherit; font-size: .78rem; padding: 1px 6px; border: 1px solid var(--hairline); border-radius: 5px; color: var(--doppler); }
.lab-physics .formula { margin-top: 10px; color: var(--disk); font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) {
    .lab { --panel-w: 0px; height: auto; min-height: 0; padding-bottom: 0; }
    .lab-body { position: static; display: flex; flex-direction: column; gap: 12px; }
    .lab-stage { position: relative; inset: auto; }
    .lab-side { position: static; width: auto; height: auto; min-height: 0; overflow: visible; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .lab.is-panel-hidden .lab-side { transform: none; opacity: 1; pointer-events: auto; width: auto; }
    #lab-panel-toggle { display: none; }
    .lab-lede { display: none; }
    .lab-inspector { max-height: none; }
    .lab-tabs .lab-panel { max-height: 360px; }
    .lab-stage { height: 64vh; min-height: 380px; }
    .lab-hint { bottom: 82px; font-size: .75rem; }
    .lab-hud { font-size: .72rem; gap: 4px 12px; }
}
.lab-overlay { position: absolute; inset: 0; pointer-events: none; }

/* Store screenshots: a horizontal strip that scrolls on narrow screens */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 0 var(--gutter) 8px; scroll-snap-type: x mandatory; max-width: var(--wrap); margin: 0 auto; scrollbar-width: thin; }
.shots img { flex: none; width: clamp(180px, 22vw, 260px); height: auto; aspect-ratio: 9 / 16; border-radius: 18px; border: 1px solid var(--hairline); scroll-snap-align: start; background: #0a0a12; }
.project-links .btn-solid i { margin-right: 8px; }

/* Lab on phones: tools move under the canvas as a 4-column grid, nothing gets cut off */
@media (max-width: 700px) {
    .lab-stage { height: auto; min-height: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; }
    #lab-canvas { height: 58vh; border: 1px solid var(--hairline); border-radius: 16px; }
    .lab-overlay { inset: 0 auto auto 0; }
    .lab-hint { position: static; translate: none; margin: 10px 0 0; white-space: normal; text-align: center; background: none; padding: 0 4px; }
    .lab-tools-sep { display: none; }
    .lab-bar-actions .txt { display: none; }
    .lab-tools { position: static; translate: none; margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); max-width: none; overflow: visible; }
    .lab-tools button { min-width: 0; padding: 8px 2px; }
    .lab-tools .lbl { white-space: normal; text-align: center; line-height: 1.2; font-size: .7rem; }
}

/* Sky: Milky Way + spilled light, behind the starfield and all content */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block; }

/* ================= Header & footer (2026-11 refresh) ================= */
.site-header {
    padding: 16px var(--gutter); background: transparent; border-bottom: 1px solid transparent;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    transition: background-color .35s ease, border-color .35s ease, padding .35s ease, backdrop-filter .35s ease;
}
.site-header.is-scrolled {
    padding-top: 10px; padding-bottom: 10px; background: rgba(6,6,8,.62);
    backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom-color: transparent;
    box-shadow: 0 1px 0 0 transparent;
    background-image: var(--rule-center); background-position: bottom; background-size: 100% 1px; background-repeat: no-repeat;
}
.brand-word { font-size: .92rem; letter-spacing: .32em; }
@media (min-width: 900px) {
    .nav-panel { gap: 2px; }
    .nav-panel a { position: relative; padding: 10px 14px; border-radius: 0; background: none !important; font-size: .93rem; }
    /* active page: a small gold mass under the word */
    .nav-panel a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--disk); box-shadow: 0 0 8px rgba(242,179,91,.8); }
    .nav-panel a.nav-cta { margin-left: 14px; padding: 9px 16px; border-radius: 999px; color: var(--void); background: var(--doppler) !important; font-weight: 600; }
    .nav-panel a.nav-cta:hover { background: #fff !important; color: var(--void); }
    .lang-toggle { margin-left: 10px; border: 0; padding: 0; gap: 2px; }
    .lang-toggle > * { padding: 6px 7px; font-size: .78rem; letter-spacing: .08em; border-radius: 0; }
    .lang-toggle span[aria-current] { color: var(--doppler); background: none; }
    .lang-toggle a { color: rgba(152,163,184,.7); }
}
@media (max-width: 899px) {
    .nav-panel a.nav-cta { margin-top: 6px; text-align: center; color: var(--void); background: var(--doppler); border-radius: 999px; font-weight: 600; }
}

.site-footer { position: relative; margin-top: 40px; padding: 72px 0 28px; background: linear-gradient(#000, #050506); border-top: 0; color: var(--starlight); font-size: .92rem; }
/* the event horizon: one thin line, lit in the middle by the light that almost escaped */
.horizon-line { position: absolute; left: 0; right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(180,83,42,.35) 25%, rgba(242,179,91,.9) 50%, rgba(180,83,42,.35) 75%, transparent); }
.horizon-line::after { content: ""; position: absolute; left: 30%; right: 30%; top: -14px; height: 28px;
    background: radial-gradient(50% 50% at 50% 50%, rgba(242,179,91,.18), transparent 70%); filter: blur(4px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h2 { font-family: var(--font-body); font-size: .78rem; font-weight: 600; letter-spacing: .12em; color: rgba(255,243,220,.55); margin: 4px 0 14px; text-transform: none; }
.footer-grid nav, .footer-grid > div:last-child { display: flex; flex-direction: column; gap: 9px; }
.footer-grid a:not(.brand) { color: var(--starlight); text-decoration: none; width: fit-content; transition: color .2s; }
.footer-grid a:not(.brand):hover { color: var(--doppler); }
.footer-brand p { margin: 16px 0 0; max-width: 34ch; line-height: 1.6; }
.footer-base { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; padding-top: 20px; background: var(--rule-center) top / 100% 1px no-repeat; font-size: .82rem; color: rgba(152,163,184,.75); }
.footer-base .to-top { color: inherit; text-decoration: none; }
.footer-base .to-top:hover { color: var(--doppler); }
@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
    .footer-brand { grid-column: 1 / -1; }
}

.site-footer .footer-grid { display: grid; align-items: start; }
.site-footer .footer-base { display: flex; padding-right: 72px; }
@media (max-width: 860px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 899px) { .site-header .nav-panel { background: #070709; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 24px 60px rgba(0,0,0,.6); } }

/* ================= Vision page: scroll-driven film ================= */
.film { position: relative; height: 620vh; }
.film-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.film-bar { position: absolute; left: 0; right: 0; height: 0; background: #000; z-index: 4; pointer-events: none; }
.film-bar.top { top: 0; } .film-bar.bottom { bottom: 0; }
.film-planet { position: absolute; left: 50%; top: 50%; width: min(70vmin, 640px); height: auto; aspect-ratio: 1; transform-origin: center; will-change: transform, opacity; }
.film-hole { position: absolute; left: 50%; top: 50%; margin: 0; width: min(170vmin, 1700px); aspect-ratio: 1; opacity: 0; will-change: transform, opacity; }
.film-hole canvas { width: 100%; height: 100%; display: block; }
.film-flash { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 3;
    background: radial-gradient(60% 55% at 50% 50%, rgba(255,243,220,.95), rgba(242,179,91,.45) 40%, transparent 75%); mix-blend-mode: screen; }
.film-captions { position: absolute; left: 0; right: 0; bottom: 16vh; z-index: 5; display: grid; place-items: center; pointer-events: none; padding: 0 var(--gutter); }
.film-captions .cap { grid-area: 1 / 1; margin: 0; text-align: center; opacity: 0; visibility: hidden;
    font-family: var(--font-body); font-weight: 500; font-size: clamp(1.25rem, 2.6vw, 2.1rem); letter-spacing: -.01em; line-height: 1.25;
    color: var(--doppler); text-shadow: 0 2px 24px rgba(0,0,0,.9); max-width: 26ch; }
.film-captions h1.cap { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 3.4vw, 2.8rem); letter-spacing: .01em; max-width: 22ch; }
.film-captions .cap-final { display: grid; gap: 22px; justify-items: center; pointer-events: auto; }
.film-captions .cap-final p { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 3.8vw, 3.1rem); color: #fff; }
.film-scroll { position: absolute; left: 50%; bottom: 13vh; width: 1px; height: 46px; margin-left: -.5px; z-index: 5; background: linear-gradient(rgba(255,243,220,.0), rgba(255,243,220,.6)); overflow: hidden; }
.film-scroll span { position: absolute; left: -1px; width: 3px; height: 10px; border-radius: 2px; background: var(--disk); animation: film-drop 1.8s ease-in-out infinite; }
@keyframes film-drop { from { top: -10px; } to { top: 46px; } }
.film-after { position: relative; z-index: 2; }
@media (max-width: 700px) {
    .film { height: 520vh; }
    .film-captions { bottom: 14vh; }
    .film-planet { width: 82vmin; }
    .film-hole { width: 210vmin; }
}
@media (prefers-reduced-motion: reduce) {
    .film { height: auto; }
    .film-stage { position: relative; }
    .film-scroll span { animation: none; }
}
@media (prefers-reduced-motion: reduce) { .film-captions { position: relative; bottom: auto; padding: 30vh var(--gutter) 10vh; gap: 28px; } .film-captions .cap { grid-area: auto; } }

/* ================= Tell us about your project ================= */
.tell { padding-top: clamp(120px, 16vh, 170px); padding-bottom: 80px; }
.tell-head h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4.4vw, 3.4rem); letter-spacing: .005em; margin: 0 0 18px; }
.tell-head .page-lede { max-width: 54ch; }
.tell-form { max-width: 760px; margin-top: 44px; display: grid; gap: 34px; }
.tell-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.tell-step legend { display: flex; align-items: center; gap: 12px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 600; color: var(--doppler); margin-bottom: 16px; padding: 0; }
.tell-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .8rem; color: var(--void); background: var(--disk); box-shadow: 0 0 18px rgba(242,179,91,.35); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-opt { position: relative; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-block; padding: 11px 18px; border-radius: 999px; border: 1px solid rgba(255,243,220,.16); color: var(--starlight); background: rgba(255,255,255,.02);
    transition: color .2s, border-color .2s, background-color .2s, transform .15s; }
.chip-opt:hover span { color: var(--doppler); border-color: rgba(255,243,220,.32); }
.chip-opt input:checked + span { color: var(--void); background: var(--doppler); border-color: var(--doppler); transform: translateY(-1px); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--disk); outline-offset: 3px; }
.tell-form textarea, .tell-form input[type=text], .tell-form input[type=email] {
    width: 100%; color: var(--doppler); font: inherit; background: rgba(255,255,255,.03); border: 1px solid rgba(255,243,220,.14); border-radius: 16px; padding: 14px 16px; transition: border-color .2s, background-color .2s; }
.tell-form textarea:focus, .tell-form input:focus { outline: none; border-color: rgba(242,179,91,.7); background: rgba(255,255,255,.05); }
.tell-form textarea::placeholder { color: rgba(152,163,184,.6); }
.tell-who { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.tell-who label { display: grid; gap: 8px; font-size: .9rem; color: var(--starlight); }
.tell-send { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.tell-send .muted { font-size: .88rem; }
.tell-done { max-width: 640px; margin-top: 40px; padding: 28px; border: 1px solid rgba(242,179,91,.3); border-radius: 22px; background: rgba(242,179,91,.05); display: grid; gap: 14px; justify-items: start; }
.tell-done p { margin: 0; font-size: 1.15rem; color: var(--doppler); }
.tell-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--disk); box-shadow: 0 0 16px var(--disk); }
@media (max-width: 600px) { .tell-who { grid-template-columns: 1fr; } }

/* Name never stands alone: "Malthen" always comes with what it is. */
.brand-text { display: inline-grid; line-height: 1.05; }
.brand-desc { font-family: var(--font-body); font-size: .62rem; letter-spacing: .22em; color: rgba(242,179,91,.85); margin-top: 4px; padding-left: 1px; text-transform: lowercase; }
.hero-kicker { margin: 0 0 10px; font-size: clamp(.8rem, 1.1vw, .95rem); letter-spacing: .24em; color: var(--disk); text-transform: lowercase; }
@media (max-width: 360px) { .brand-desc { display: none; } }
/* film v2: own warp field, shorter track */
.film { height: 420vh; }
.film-warp { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
@media (max-width: 700px) { .film { height: 350vh; } .film-hole { width: 160vmin; } }
@media (prefers-reduced-motion: reduce) { .film { height: auto; } }

/* ================= Vision page: after the film ================= */
.film { padding: 0 !important; }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: .01em; margin: 0 0 clamp(28px, 4vw, 48px); }
.offer-list { background: var(--rule-fade) top / 100% 1px no-repeat; }
.offer-row { display: grid; grid-template-columns: minmax(180px, 1fr) 1.5fr 1.2fr minmax(120px, .7fr); gap: 20px 40px; align-items: start; padding: 34px 0; background-image: var(--rule-fade); background-position: bottom; background-size: 100% 1px; background-repeat: no-repeat; transition: background-color .3s; }
.offer-row:hover { background: linear-gradient(90deg, transparent, rgba(242,179,91,.04), transparent); }
.offer-row h3 { margin: 0; font-size: clamp(1.15rem, 1.7vw, 1.4rem); color: var(--doppler); }
.offer-row p { margin: 0; color: rgba(255,243,220,.78); line-height: 1.6; }
.offer-row ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--starlight); font-size: .95rem; }
.offer-row li::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--disk); margin: 0 10px 2px 0; vertical-align: middle; }
.offer-ex { display: grid; gap: 4px; justify-items: end; text-align: right; font-size: .85rem; color: rgba(152,163,184,.75); }
.offer-ex a { color: var(--disk); text-decoration: none; font-size: 1rem; }
.offer-ex a:hover { text-decoration: underline; }
.process-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; position: relative; }
.process-list::before { content: ""; position: absolute; left: 14px; right: 14px; top: 14px; height: 1px; background: linear-gradient(90deg, var(--disk), rgba(242,179,91,.15)); }
.process-list li { position: relative; padding: 56px 28px 0 0; counter-increment: step; }
.process-list li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; color: var(--void); background: var(--disk); box-shadow: 0 0 18px rgba(242,179,91,.4); }
.process-list h3 { margin: 0 0 10px; font-size: 1.15rem; color: var(--doppler); }
.process-list p { margin: 0 0 12px; color: rgba(255,243,220,.75); line-height: 1.6; }
.process-list .process-get { color: var(--starlight); font-size: .92rem; border-left: 2px solid rgba(242,179,91,.5); padding-left: 12px; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.proof { display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: 20px; border: 1px solid rgba(255,243,220,.1); background: rgba(255,255,255,.02); text-decoration: none; transition: border-color .25s, transform .25s; }
.proof:hover { border-color: rgba(242,179,91,.45); transform: translateY(-2px); }
.proof b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: var(--disk); }
.proof span { color: rgba(255,243,220,.78); line-height: 1.5; }
.closing { text-align: center; }
.closing-inner { display: grid; justify-items: center; gap: 24px; padding: clamp(24px, 5vw, 56px) 0; }
.closing-inner p { margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 2.8vw, 2.2rem); max-width: 28ch; color: var(--doppler); }
@media (max-width: 1000px) {
    .offer-row { grid-template-columns: 1fr 1fr; }
    .offer-ex { justify-items: start; text-align: left; }
    .process-list { grid-template-columns: 1fr 1fr; row-gap: 36px; }
    .process-list::before { display: none; }
    .proof-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .offer-row { grid-template-columns: 1fr; padding: 26px 0; }
    .process-list { grid-template-columns: 1fr; }
    .process-list li { padding: 0 0 0 46px; }
    .proof-grid { grid-template-columns: 1fr; }
}

/* ================= Site speed test ================= */
.speed { padding-top: clamp(120px, 16vh, 170px); }
.speed-head h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4.4vw, 3.4rem); margin: 0 0 18px; }
.speed-form { display: flex; gap: 10px; max-width: 640px; margin-top: 34px; padding: 6px; border: 1px solid rgba(255,243,220,.16); border-radius: 999px; background: rgba(255,255,255,.03); transition: border-color .2s; }
.speed-form:focus-within { border-color: rgba(242,179,91,.7); }
.speed-form input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--doppler); font: inherit; font-size: 1.05rem; padding: 10px 16px; }
.speed-form input::placeholder { color: rgba(152,163,184,.6); }
.speed-form .btn-solid { flex: none; }
.speed-form .btn-solid:disabled { opacity: .6; cursor: progress; }
.speed-note { margin-top: 12px; font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.speed-out { padding-top: 40px; padding-bottom: 40px; scroll-margin-top: 100px; }
.speed-wait { display: flex; align-items: center; gap: 18px; color: var(--doppler); }
.speed-orbit { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,243,220,.15); position: relative; animation: speed-spin 1.1s linear infinite; }
.speed-orbit::after { content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--disk); box-shadow: 0 0 12px var(--disk); }
@keyframes speed-spin { to { transform: rotate(360deg); } }
.speed-card { display: flex; align-items: center; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; }
.speed-score { position: relative; width: 150px; height: 150px; flex: none; }
.speed-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.speed-score circle { fill: none; stroke-width: 7; }
.speed-score .track { stroke: rgba(255,243,220,.08); }
.speed-score .bar { stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: calc(326.7 - 326.7 * var(--p) / 100); transition: stroke-dashoffset 1.2s ease; }
.speed-score.good .bar { stroke: #4fd18b; } .speed-score.mid .bar { stroke: var(--disk); } .speed-score.bad .bar { stroke: #ff6b5a; }
.speed-score > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.speed-score b { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; color: var(--doppler); line-height: 1; }
.speed-score span { font-size: .75rem; color: var(--starlight); margin-top: 4px; }
.speed-url { margin: 0 0 6px; color: var(--starlight); word-break: break-all; }
.speed-sum h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.speed-sum .good, .metric.good b { color: #4fd18b; } .speed-sum .mid, .metric.mid b { color: var(--disk); } .speed-sum .bad, .metric.bad b { color: #ff6b5a; }
.speed-field { margin: 8px 0 0; color: var(--starlight); font-size: .92rem; }
.metrics { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.metric { padding: 18px 20px; border-radius: 18px; border: 1px solid rgba(255,243,220,.1); background: rgba(255,255,255,.02); border-top: 3px solid; }
.metric.good { border-top-color: #4fd18b; } .metric.mid { border-top-color: var(--disk); } .metric.bad { border-top-color: #ff6b5a; }
.metric-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.metric-top span { color: var(--doppler); font-weight: 600; }
.metric-top b { font-size: 1.15rem; white-space: nowrap; }
.metric p { margin: 10px 0 0; color: var(--starlight); font-size: .9rem; line-height: 1.55; }
.fixes-title { margin: 44px 0 14px; font-size: 1.2rem; color: var(--doppler); }
.fixes { margin: 0; padding: 0; list-style: none; counter-reset: fx; background: var(--rule-fade) top / 100% 1px no-repeat; }
.fixes li { counter-increment: fx; display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; background: var(--rule-fade) bottom / 100% 1px no-repeat; color: rgba(255,243,220,.85); }
.fixes li span::before { content: counter(fx) ". "; color: var(--disk); }
.fixes em { font-style: normal; color: var(--disk); white-space: nowrap; }
.speed-cta { margin-top: 40px; padding: 28px; border-radius: 22px; border: 1px solid rgba(242,179,91,.3); background: rgba(242,179,91,.05); display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.speed-cta p { margin: 0 auto 0 0; font-size: 1.15rem; color: var(--doppler); }
@media (max-width: 600px) {
    .speed-form { border-radius: 22px; flex-direction: column; }
    .speed-form .btn-solid { width: 100%; }
    .fixes li { flex-direction: column; gap: 4px; }
    .speed-cta p { margin: 0; width: 100%; }
}

/* ================= Tool pages: tables, causes, FAQ, share ================= */
.table-wrap { overflow-x: auto; border: 1px solid rgba(255,243,220,.1); border-radius: 18px; }
.read-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.read-table th, .read-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid rgba(255,243,220,.08); vertical-align: top; }
.read-table th { font-size: .85rem; font-weight: 600; color: rgba(255,243,220,.6); background: rgba(255,255,255,.02); }
.read-table td { color: rgba(255,243,220,.82); line-height: 1.5; }
.read-table td.g { color: #4fd18b; white-space: nowrap; } .read-table td.b { color: #ff6b5a; white-space: nowrap; }
.read-table tr:last-child td { border-bottom: 0; }
.causes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.causes li { display: grid; gap: 8px; padding: 22px; border-radius: 18px; border: 1px solid rgba(255,243,220,.1); background: rgba(255,255,255,.02); }
.causes b { color: var(--doppler); font-size: 1.05rem; }
.causes span { color: var(--starlight); line-height: 1.6; }
.causes-cta { margin: 26px 0 0; color: rgba(255,243,220,.8); display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid rgba(255,243,220,.1); border-radius: 16px; background: rgba(255,255,255,.02); transition: border-color .2s; }
.faq details[open] { border-color: rgba(242,179,91,.35); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; color: var(--doppler); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--disk); font-weight: 400; font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: rgba(255,243,220,.78); line-height: 1.7; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; color: var(--starlight); font-size: .92rem; }
.share-x, .share-copy { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,243,220,.18); background: none; color: var(--doppler); font: inherit; text-decoration: none; cursor: pointer; transition: border-color .2s, background-color .2s; }
.share-x:hover, .share-copy:hover { border-color: var(--disk); background: rgba(242,179,91,.08); }
.brand-desc { font-size: 12px; letter-spacing: .14em; }

/* ================= Privacy notice ================= */
.legal { padding-top: clamp(120px, 16vh, 170px); padding-bottom: 80px; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 3.6vw, 2.8rem); margin: 0 0 16px; }
.legal-body { max-width: 760px; margin-top: 24px; }
.legal-body h2 { font-size: 1.15rem; color: var(--doppler); margin: 36px 0 10px; }
.legal-body p, .legal-body li { color: rgba(255,243,220,.8); line-height: 1.75; }
.legal-body ul { padding-left: 20px; display: grid; gap: 8px; }
.legal-body a, .form-legal a, .footer-base a { color: var(--disk); }
.form-legal { margin: 10px 0 0; font-size: .85rem; color: var(--starlight); }
.footer-base a { text-decoration: none; } .footer-base a:hover { text-decoration: underline; }

/* ================= Compose-to-email fallback ================= */
.compose-alt { margin-top: 18px; padding: 18px 20px; border-radius: 18px; border: 1px solid rgba(242,179,91,.3); background: rgba(242,179,91,.05); display: grid; gap: 12px; }
.compose-alt p { margin: 0; color: rgba(255,243,220,.85); }
.compose-links { display: flex; flex-wrap: wrap; gap: 10px; }
.compose-links a, .compose-links button { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255,243,220,.2); background: none; color: var(--doppler); font: inherit; text-decoration: none; cursor: pointer; }
.compose-links a:hover, .compose-links button:hover { border-color: var(--disk); background: rgba(242,179,91,.08); }
.contact-form .muted a, .tell-send .muted a, .compose-alt a { color: var(--disk); }

/* ---------- Laboratory: responsive overrides (kept last so they win over the base rules) ---------- */
/* Small laptops and landscape tablets: a narrower panel and a tighter toolbar so both fit side by side. */
@media (min-width: 1001px) and (max-width: 1280px) {
    .lab { --panel-w: 312px; }
    .lab-tools button { min-width: 0; width: 58px; padding: 7px 2px; font-size: .64rem; }
    .lab-tools .lbl { white-space: normal; text-align: center; line-height: 1.15; }
    .lab-lede { display: none; }
}
/* Phones held sideways: the stage takes the whole screen height and the toolbar floats over it. */
@media (max-width: 1000px) and (max-height: 520px) and (orientation: landscape) {
    .lab-stage { height: calc(100svh - 16px) !important; min-height: 0 !important; }
    .lab-hud { font-size: .66rem; }
}


/* ---------- Laboratory polish: one icon set, no nested cards, themed browser surfaces ---------- */
.lab-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lab .ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.lab-btn-main .ic { fill: currentColor; stroke-width: 1.2; }
.lab-btn-main .ic-state { fill: none; stroke-width: 2.2; }
.lab-btn-main[aria-pressed="true"] .ic-state { fill: currentColor; stroke-width: 1.2; }
.lab-ins-tools button, .lab-mass > button, .lab-follow, .lab-remove { display: inline-grid; place-items: center; }
.lab-ins-tools .ic, .lab-follow .ic, .lab-remove .ic { width: 15px; height: 15px; }
.lab-mass > button .ic { width: 16px; height: 16px; }
/* The floating panel is the one surface; sections inside it are divided, not boxed. */
.lab-side .lab-card { border: 0; border-radius: 0; background: none; padding: 6px 4px 14px; }
.lab-side .lab-card + .lab-card, .lab-side .lab-card + .lab-keys { border-top: 1px solid var(--hairline); padding-top: 14px; }
.lab-side .lab-tabs { padding: 0; }
.lab-side .lab-tablist { padding: 0 0 8px; border-bottom: 1px solid var(--hairline); }
.lab-side .lab-panel { padding: 10px 2px 8px; }
.lab-inspector { max-height: none; flex: 1 1 auto; }
.lab-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px -4px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--starlight); font: inherit; font-size: .78rem; cursor: pointer; }
.lab-back:hover { color: var(--disk); background: rgba(255,243,220,.04); }
.lab-back .ic { width: 14px; height: 14px; }
/* Hint: shown when a tool is picked, then it steps out of the way. */
.lab-hint { transition: opacity .6s ease; }
.lab-hint.is-faded { opacity: 0; }
/* Browser surfaces in the palette */
.lab ::selection { background: rgba(242,179,91,.35); color: #fff; }
.lab input { caret-color: var(--disk); }
.lab-side, .lab-panel, .lab-inspector { scrollbar-color: rgba(255,243,220,.18) transparent; }
.lab-side ::-webkit-scrollbar, .lab-panel::-webkit-scrollbar, .lab-inspector::-webkit-scrollbar { width: 6px; }
.lab-side ::-webkit-scrollbar-thumb, .lab-panel::-webkit-scrollbar-thumb { background: rgba(255,243,220,.18); border-radius: 3px; }
.lab :focus-visible { outline: 2px solid var(--disk); outline-offset: 2px; }

/* Technical controls */
.lab:not(.is-tech) .tech-only { display: none !important; }
.lab-readout { margin: 8px 0 0; font-size: .74rem; color: var(--starlight); font-variant-numeric: tabular-nums; }
.lab-editor { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); display: grid; gap: 10px; }
.lab-editor h3, .lab-editor h4 { margin: 0; font-size: .74rem; font-weight: 500; color: var(--starlight); letter-spacing: .02em; }
.lab-editor .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lab-editor .row.two { grid-template-columns: repeat(2, 1fr); }
.lab-editor label { display: grid; gap: 3px; font-size: .68rem; color: var(--starlight); }
.lab-editor input { width: 100%; min-width: 0; padding: 5px 7px; border: 1px solid var(--hairline); border-radius: 7px; background: rgba(255,243,220,.03); color: var(--doppler); font: inherit; font-size: .78rem; font-variant-numeric: tabular-nums; }
.lab-editor input:focus { border-color: rgba(242,179,91,.6); outline: none; }
.lab-editor .acts { display: flex; gap: 6px; }
.lab-editor .acts button { flex: 1; min-height: 32px; }
.lab-editor .note { margin: 0; font-size: .7rem; color: var(--starlight); }

/* Welcome: a light first step over the stage, not a wall */
.lab-welcome { position: absolute; z-index: 5; left: calc(50% - var(--panel-w) / 2); top: 50%; translate: -50% -50%; width: min(440px, calc(100% - 32px));
               padding: 24px 24px 18px; border: 1px solid var(--hairline); border-radius: 18px; background: rgba(8,8,10,.86);
               box-shadow: 0 24px 60px rgba(0,0,0,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lab-welcome[hidden] { display: none; }
.lab-welcome h2 { margin: 0 0 8px !important; font-size: 1.25rem !important; line-height: 1.25; max-width: none !important; }
.lab-welcome-lede { margin: 0 0 16px; font-size: .86rem; line-height: 1.55; color: var(--starlight); }
.lab-welcome-paths { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.lab-welcome-paths button { width: 100%; display: grid; gap: 2px; text-align: left; padding: 11px 12px; border: 1px solid var(--hairline); border-radius: 12px;
                            background: transparent; color: var(--doppler); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.lab-welcome-paths button:hover { border-color: rgba(242,179,91,.6); background: rgba(242,179,91,.06); }
.lab-welcome-paths b { font-size: .92rem; font-weight: 600; }
.lab-welcome-paths span { font-size: .78rem; color: var(--starlight); }
.lab-welcome-keys { margin: 0 0 10px; font-size: .74rem; color: var(--starlight); }
.lab-welcome-close { width: 100%; }
@media (max-width: 700px) { .lab-welcome { top: 12px; translate: -50% 0; } }

.lab-editor .cmp { display: grid; grid-template-columns: 7.5em 1fr 4.6em; align-items: center; gap: 8px; font-size: .72rem; }
.lab-editor .cmp input { padding: 0; border: 0; background: none; accent-color: var(--disk); }
.lab-editor .cmp output { text-align: right; color: var(--doppler); font-variant-numeric: tabular-nums; }
.lab-editor [data-preview] { color: var(--doppler); font-size: .76rem; line-height: 1.45; }
.lab-inspector { overflow-x: hidden; }

/* What if…? */
.lab-whatif { margin: 0 0 12px; }
.lab-whatif h3, .lab-whatif h4 { margin: 0 0 6px; font-size: .74rem; font-weight: 500; color: var(--starlight); }
.lab-whatif .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-whatif .chips button { padding: 6px 10px; border: 1px solid var(--hairline); border-radius: 999px; background: transparent; color: var(--doppler); font: inherit; font-size: .76rem; cursor: pointer; }
.lab-whatif .chips button:hover { border-color: rgba(242,179,91,.6); color: var(--disk); }
.lab-outcome { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(242,179,91,.07); font-size: .82rem; line-height: 1.5; color: var(--doppler); }
.lab-raw summary { cursor: pointer; font-size: .74rem; color: var(--starlight); margin-top: 4px; }
.lab-raw[open] summary { margin-bottom: 10px; }
.lab-raw { display: grid; gap: 10px; }
.lab-raw > * + * { margin-top: 8px; }

/* Simple view gets the one-click experiments; Technical gets the continuous controls instead. */
.lab.is-tech .lab-whatif { display: none; }

/* Scale: one clear choice, with its consequence spelled out underneath */
.lab-scale { display: grid; gap: 6px; margin-bottom: 12px; }
.lab-scale-label { font-size: .74rem; color: var(--starlight); }
.lab-seg.lab-seg-2 { --n: 2; }
.lab-scale-note { margin: 0; font-size: .74rem; line-height: 1.45; color: var(--starlight); }
.lab-welcome-keys-more { margin: 0 0 12px; font-size: .78rem; }
.lab-welcome-keys-more ul { padding-left: 16px; margin: 8px 0 0; line-height: 1.6; }

/* Near a black hole: a quiet readout of what being there would mean (time dilation, tides, proper time). */
.lab-bhhud { position: absolute; left: 16px; bottom: 96px; z-index: 3; max-width: min(360px, calc(100% - 32px)); display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; background: rgba(8, 7, 6, .72); border: 1px solid rgba(242, 179, 91, .25); font-size: .78rem; line-height: 1.4; color: var(--starlight); pointer-events: none; backdrop-filter: blur(6px); }
.lab-bhhud b { color: var(--ink, #f5efe6); font-weight: 600; }
.lab-bhhud em { font-style: normal; color: #f2b35b; font-variant-numeric: tabular-nums; }
.lab-bhhud.is-inside { border-color: rgba(140, 170, 255, .45); }
.lab-bhhud.is-inside b { color: #b9c9ff; }

/* Perspective chooser (Normal / Spacetime / 4D / Light speed); its readout sits above the black-hole one. */
.lab-seg.lab-seg-4 { --n: 4; }
.lab-seg.lab-seg-4 button { font-size: .74rem; padding: 6px 2px; }
.lab-persphud { bottom: 96px; }

.lab-journey { display: grid; gap: 8px; }
.lab-journey-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.lab-journey-row select { min-width: 0; padding: 6px 8px; border: 1px solid var(--hairline); border-radius: 8px; background: rgba(255,255,255,.03); color: var(--ink, #f5efe6); font: inherit; font-size: .8rem; }

/* ---------- Panel, narrative first ---------- */
.lab-now { display: grid; gap: 10px; }
.lab-now-head { display: grid; gap: 2px; }
.lab-now-kicker { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--disk); }
.lab-now-title { margin: 0; font-size: 1.12rem; line-height: 1.25; font-weight: 600; color: var(--ink, #f5efe6); }
.lab-now-story { margin: 0; font-size: .86rem; line-height: 1.5; color: var(--doppler, #e6dccb); }
.lab-now-watch { margin: 0; display: grid; gap: 2px; padding: 8px 10px; border-left: 2px solid var(--disk); background: rgba(242,179,91,.06); border-radius: 0 8px 8px 0; font-size: .82rem; line-height: 1.45; color: var(--doppler, #e6dccb); }
.lab-now-watch b { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--disk); font-weight: 600; }
.lab-now-event { margin: 0; display: flex; gap: 8px; align-items: baseline; font-size: .8rem; line-height: 1.4; color: var(--starlight); }
.lab-now-event .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--disk); box-shadow: 0 0 8px var(--disk); transform: translateY(-1px); }
.lab-now-event.is-fresh .dot { animation: lab-pulse 1.2s ease-out 2; }
@keyframes lab-pulse { 0% { box-shadow: 0 0 0 0 rgba(242,179,91,.7); } 100% { box-shadow: 0 0 0 10px rgba(242,179,91,0); } }
@media (prefers-reduced-motion: reduce) { .lab-now-event.is-fresh .dot { animation: none; } }
.lab-choice { display: grid; gap: 6px; }
.lab-choice button { display: grid; gap: 2px; text-align: left; padding: 9px 11px; border: 1px solid var(--hairline); border-radius: 10px; background: transparent; color: var(--starlight); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.lab-choice button b { font-size: .86rem; font-weight: 600; color: var(--ink, #f5efe6); }
.lab-choice button span { font-size: .76rem; line-height: 1.35; }
.lab-choice button:hover { border-color: rgba(242,179,91,.45); }
.lab-choice button[aria-checked="true"] { border-color: var(--disk); background: rgba(242,179,91,.09); }
.lab-choice button[aria-checked="true"] b { color: var(--disk); }
.lab-choice button:focus-visible { outline: 2px solid var(--disk); outline-offset: 2px; }
.lab-subh { margin: 14px 0 6px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--starlight); font-weight: 600; }
/* Simple view keeps the canvas readout to what means something to a visitor: the real date and rate. */
.lab:not(.is-tech).has-real .hud-sim { display: none; }

/* The panel slides out to the right when hidden: it must not widen the page. */
.lab-body { overflow: clip; }

/* The chosen point of view is told in the "Now showing" card; no second copy under the list. */
#lab-persp-note { display: none; }

/* Native controls follow the dark theme: the open list of a select, date and colour pickers, scrollbars. */
.lab { color-scheme: dark; }
.lab select, .lab option, .lab optgroup { background-color: #15120f; color: #f5efe6; }
.lab option:checked, .lab option:hover { background-color: #3a2c19; color: #f2b35b; }

/* Panel order: what is happening → the selected body or the scene library → settings. */
.lab-settings { padding-top: 6px; padding-bottom: 6px; }
.lab.has-selection .lab-now-story, .lab.has-selection .lab-now-watch { display: none; }
/* The selected body's card and the settings keep their natural height; the panel as a whole scrolls
   (a squeezed inspector showed only its title, with a scrollbar of its own). */
.lab-side > .lab-settings, .lab-side > .lab-inspector { flex: none; max-height: none; overflow: visible; }
/* The library (scenes, add, bodies, events) keeps a usable height; the panel scrolls instead of squeezing it. */
.lab-side > .lab-tabs { flex: none; height: min(62vh, 560px); min-height: 300px; }
@media (max-width: 900px) { .lab-side > .lab-tabs { height: auto; min-height: 0; } }

/* ---------- Lab: experiment showcase ---------- */
.demos-band .eyebrow { margin: 0 0 10px; color: var(--disk); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.demos-lead { max-width: 62ch; margin: 0 0 28px; color: var(--starlight); line-height: 1.65; }
.demos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.demo { width: 100%; height: 100%; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; text-align: left; padding: 0 0 18px; border-radius: 18px; overflow: hidden; cursor: pointer;
    color: inherit; font: inherit; background: rgba(255,255,255,.02); border: 1px solid rgba(255,243,220,.1); transition: border-color .25s, transform .25s, background .25s; }
.demo > b, .demo > .demo-text, .demo > .demo-foot { padding: 0 20px; }
.demo b { color: var(--doppler); font-size: 1.05rem; line-height: 1.35; }
.demo-text { color: var(--starlight); line-height: 1.6; font-size: .94rem; }
.demo-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; }
.demo-foot code { color: rgba(242,179,91,.85); font: 500 .8rem/1.3 var(--font-body); font-variant-numeric: tabular-nums; }
.demo-go { color: var(--doppler); font-size: .88rem; white-space: nowrap; opacity: .7; transition: opacity .25s, transform .25s; }
.demo:hover, .demo:focus-visible { border-color: rgba(242,179,91,.45); background: rgba(242,179,91,.04); transform: translateY(-2px); }
.demo:hover .demo-go, .demo:focus-visible .demo-go { opacity: 1; transform: translateX(3px); }
.demo:focus-visible { outline: 2px solid var(--disk); outline-offset: 3px; }
.demo-art { display: block; height: 150px; position: relative; overflow: hidden; background: #000;
    background-image: radial-gradient(1px 1px at 12% 30%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 70% 18%, #fff6 50%, transparent 51%), radial-gradient(1px 1px at 86% 72%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 34% 80%, #fff5 50%, transparent 51%); }
.demo-art::before, .demo-art::after { content: ""; position: absolute; inset: 0; margin: auto; border-radius: 50%; transition: transform .6s ease; }
.demo:hover .demo-art::before { transform: scale(1.06); }
/* black hole: shadow, photon ring, tilted disk */
.demo-bh::before { width: 120px; height: 34px; background: radial-gradient(closest-side, transparent 55%, #ffd79a 62%, #f2b35b 72%, rgba(180,83,42,.5) 88%, transparent); }
.demo-bh::after { width: 46px; height: 46px; background: radial-gradient(circle, #000 58%, #ffe7b8 64%, rgba(242,179,91,.35) 72%, transparent 78%); }
/* light speed: aberrated sky, blue ahead */
.demo-light::before { width: 260px; height: 260px; background: repeating-conic-gradient(from 0deg, rgba(190,210,255,.5) 0 .6deg, transparent .6deg 9deg); -webkit-mask: radial-gradient(circle, transparent 8%, #000 30%, transparent 70%); mask: radial-gradient(circle, transparent 8%, #000 30%, transparent 70%); }
.demo-light::after { width: 30px; height: 30px; background: radial-gradient(circle, #fff, #9fc2ff 40%, transparent 70%); }
.demo:hover .demo-light::before { transform: scale(1.25); }
/* hot Earth: lava glow from the lit side */
.demo-hot::before { width: 72px; height: 72px; background: radial-gradient(circle at 30% 40%, #ffd08a, #ff6a2a 35%, #8a1d0a 70%, #2a0905); box-shadow: 0 0 40px 8px rgba(255,90,30,.45); }
.demo-hot::after { width: 140px; height: 140px; left: -260px; background: radial-gradient(circle, #fff 20%, #ffe2a6 40%, transparent 70%); }
/* tidal disruption: stretched stream */
.demo-tde::before { width: 170px; height: 18px; transform: rotate(-18deg); background: linear-gradient(90deg, transparent, rgba(255,190,120,.8) 45%, #fff2d6 60%, transparent); filter: blur(2px); }
.demo-tde::after { width: 30px; height: 30px; background: radial-gradient(circle, #000 55%, #f2b35b 65%, transparent 75%); }
/* binary black hole + ripples */
.demo-bbh::before { width: 180px; height: 180px; background: repeating-radial-gradient(circle, rgba(242,179,91,.18) 0 1px, transparent 2px 16px); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
.demo-bbh::after { width: 70px; height: 24px; border-radius: 12px; background: radial-gradient(circle at 18% 50%, #000 9px, #ffd79a 11px, transparent 14px), radial-gradient(circle at 82% 50%, #000 9px, #ffd79a 11px, transparent 14px); }
/* supernova */
.demo-sn::before { width: 150px; height: 150px; background: radial-gradient(circle, #fff 4%, #ffe1a8 12%, rgba(255,120,60,.55) 30%, rgba(120,60,200,.25) 48%, transparent 66%); }
.demo-sn::after { width: 150px; height: 150px; background: repeating-conic-gradient(rgba(255,230,190,.35) 0 2deg, transparent 2deg 14deg); -webkit-mask: radial-gradient(circle, transparent 20%, #000 35%, transparent 60%); mask: radial-gradient(circle, transparent 20%, #000 35%, transparent 60%); }
/* Sgr A*: eccentric S2 orbit */
.demo-sgra::before { width: 190px; height: 60px; transform: rotate(-24deg) translateX(60px); border: 1px solid rgba(207,224,255,.55); background: none; }
.demo-sgra::after { width: 22px; height: 22px; background: radial-gradient(circle, #000 50%, #ffd79a 62%, transparent 75%); }
/* galaxies */
.demo-gal::before { width: 110px; height: 46px; transform: translate(-46px, -14px) rotate(-20deg); background: radial-gradient(closest-side, #fff4 , rgba(160,180,255,.35) 40%, transparent); filter: blur(1px); }
.demo-gal::after { width: 90px; height: 40px; transform: translate(52px, 18px) rotate(32deg); background: radial-gradient(closest-side, #ffe8c855, rgba(255,190,140,.3) 45%, transparent); filter: blur(1px); }
/* true scale: a tiny Sun and a lot of nothing */
.demo-real::before { width: 10px; height: 10px; left: -70%; background: radial-gradient(circle, #fff, #ffe2a6 50%, transparent); box-shadow: 0 0 18px 4px rgba(255,226,166,.35); }
.demo-real::after { width: 3px; height: 3px; left: 40%; background: #8fb6ff; }
@media (prefers-reduced-motion: reduce) { .demo, .demo-art::before, .demo-go { transition: none; } .demo:hover { transform: none; } }

/* ---------- Lab: navigation chip (following / lost in space) ---------- */
.lab-navchip { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
    max-width: calc(100% - 32px); padding: 7px 8px 7px 14px; border-radius: 999px; background: rgba(8, 7, 6, .78); border: 1px solid rgba(242, 179, 91, .3);
    color: var(--starlight); font-size: .82rem; line-height: 1.3; backdrop-filter: blur(6px); }
.lab-navchip b { color: var(--doppler); font-weight: 600; }
.lab-navchip button { border: 1px solid rgba(255, 243, 220, .18); background: rgba(255, 243, 220, .06); color: var(--doppler); font: inherit; padding: 5px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.lab-navchip button:hover, .lab-navchip button:focus-visible { border-color: var(--disk); background: rgba(242, 179, 91, .12); }
.lab-navchip kbd { margin-left: 4px; font: 500 .7rem/1 var(--font-body); opacity: .6; }
.lab-navarrow { display: inline-block; margin-right: 8px; color: var(--disk); font-style: normal; transition: transform .3s; }
@media (max-width: 640px) { .lab-navchip { top: auto; bottom: 92px; border-radius: 14px; } }
/* Card art: real frames rendered by the simulator itself (not drawings). */
.demo-art { background-size: cover; background-position: center; transition: transform .6s ease; }
.demo-art::before, .demo-art::after { display: none; }
.demo:hover .demo-art { transform: scale(1.04); }
.demo-bh { background-image: url(/img/lab/demo-bhsolar.webp); }
.demo-light { background-image: url(/img/lab/demo-lightspeed.webp); }
.demo-hot { background-image: url(/img/lab/demo-hotearth.webp); }
.demo-tde { background-image: url(/img/lab/demo-tde.webp); }
.demo-bbh { background-image: url(/img/lab/demo-bbh.webp); }
.demo-sn { background-image: url(/img/lab/demo-supernova.webp); }
.demo-sgra { background-image: url(/img/lab/demo-sgra.webp); }
.demo-gal { background-image: url(/img/lab/demo-galaxies.webp); }
.demo-real { background-image: url(/img/lab/demo-solarReal.webp); }
@media (prefers-reduced-motion: reduce) { .demo-art { transition: none; } .demo:hover .demo-art { transform: none; } }

/* Lab: "put something else in its place" chips */
.lab-swap .lab-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(255, 243, 220, .3); }

/* "Which one?" menu when a click lands on several things */
.lab-pick{position:absolute;z-index:6;min-width:150px;padding:6px;border-radius:12px;background:rgba(16,14,12,.94);border:1px solid rgba(242,179,91,.35);box-shadow:0 10px 30px rgba(0,0,0,.5);display:flex;flex-direction:column;gap:2px;font-size:.85rem}
.lab-pick[hidden]{display:none}
.lab-pick b{padding:4px 8px;font-weight:500;color:rgba(255,243,220,.55);font-size:.75rem}
.lab-pick button{all:unset;cursor:pointer;padding:6px 8px;border-radius:8px;color:#fff3dc}
.lab-pick button:hover,.lab-pick button:focus-visible{background:rgba(242,179,91,.18)}
/* Black hole in the toolbar: the shadow inside a thin glowing accretion ring, not an empty black dot. */
.lab .dot-blackhole, .lab .dot[data-type="BLACKHOLE"] { background: radial-gradient(circle, #000 0 40%, #ffd9a0 47%, #ff8a3a 58%, rgba(255,120,40,0) 72%); box-shadow: 0 0 7px rgba(255,160,80,.65); }

/* Cinematic view: the HUD steps back too, only the picture and the toolbar stay. */
.lab.is-cine .lab-hud, .lab.is-cine .lab-navchip { opacity: 0; pointer-events: none; transition: opacity .3s; }
#lab-cine[aria-pressed="true"] { background: rgba(242,179,91,.18); border-color: rgba(242,179,91,.5); }
/* Said plainly while gravitational waves show on the grid. */
/* The first load has real work to do -- two modules, a WebGL context, a scene -- and until it is
   done the stage is a black rectangle that looks broken. This sits over it from the first paint and
   leaves on the first drawn frame, so the wait reads as the simulation arriving rather than as
   nothing happening. It is in the markup rather than built in JS on purpose: the slow part is
   fetching and parsing that very JS. */
/* Failsafe, in CSS so it needs no script to work: if the modules never load, the cover must not
   sit over a dead page for ever. After 25 s it leaves on its own and the user sees the stage and
   the controls rather than a frozen message. */
.lab-loading { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 14px; background: #07060a; text-align: center; transition: opacity .45s ease; animation: lab-cover-failsafe 1s ease 25s forwards; }
@keyframes lab-cover-failsafe { to { opacity: 0; visibility: hidden; } }
.lab-loading.is-done { opacity: 0; pointer-events: none; }
.lab-loading p { margin: 0; font-size: .95rem; color: rgba(255,243,220,.88); letter-spacing: .01em; }
.lab-loading small { color: rgba(255,243,220,.42); font-size: .76rem; }
/* A body on an orbit: the one picture the whole page is about. */
.lab-loading-orbit { position: relative; width: 62px; height: 62px; border-radius: 50%; border: 1px solid rgba(255,243,220,.16); }
.lab-loading-orbit::after { content: ""; position: absolute; inset: 42%; border-radius: 50%; background: rgba(255,228,170,.9); box-shadow: 0 0 14px 3px rgba(255,200,120,.45); }
.lab-loading-orbit span { position: absolute; inset: 0; animation: lab-orbit 1.5s linear infinite; }
.lab-loading-orbit span::before { content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #cfe3ff; box-shadow: 0 0 10px 2px rgba(150,190,255,.6); }
@keyframes lab-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lab-loading-orbit span { animation: none; } }

.lab-gw-note { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); margin: 0; padding: 4px 10px; border-radius: 999px; font-size: .72rem; color: rgba(255,243,220,.7); background: rgba(12,10,8,.6); pointer-events: none; }
.lab-gw-note[hidden] { display: none; }

/* Phones: the title gets its own line; search and buttons wrap beneath it instead of overlapping it. */
@media (max-width: 700px) {
    .lab-bar { flex-wrap: wrap; row-gap: 10px; }
    .lab-heading { flex: 1 1 100%; }
    .lab-heading .lab-lede { display: none; }
    .lab-bar-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; }
    .lab-search { flex: 1 1 100%; }
    .lab-search input { width: 100%; }
}

/* Rates too fast for the scene stay usable but look muted. */
.lab-seg button.is-fast { opacity: .45; }
.lab-seg button.is-fast[aria-checked="true"] { opacity: 1; }

/* Falling into a black hole */
.lab-fallbtn { position: absolute; left: 16px; bottom: 56px; z-index: 3; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(242, 179, 91, .5); background: rgba(8, 7, 6, .78); color: #f2b35b; font: inherit; font-size: .8rem; cursor: pointer; backdrop-filter: blur(6px); }
.lab-fallbtn:hover, .lab-fallbtn:focus-visible { background: rgba(242, 179, 91, .16); }
.is-falling canvas { transition: transform .4s ease, filter 2.5s ease; transform-origin: 50% 50%; }
.is-fallend canvas { filter: brightness(0); }
.lab-fallend { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 16px; animation: lab-fallend-in 2.5s ease both; }
.lab-fallend[hidden] { display: none; }
.lab-fallend > div { max-width: 460px; padding: 18px 20px; border-radius: 12px; background: rgba(8, 7, 6, .82); border: 1px solid rgba(140, 170, 255, .35); color: var(--starlight); font-size: .86rem; line-height: 1.55; }
.lab-fallend b { display: block; margin-bottom: 6px; color: #b9c9ff; font-size: 1rem; }
.lab-fallend.is-torn > div { border-color: rgba(242, 120, 91, .45); }
.lab-fallend.is-torn b { color: #f5a07a; }
.lab-fallend-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lab-fallend button { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(242, 179, 91, .5); background: transparent; color: #f2b35b; font: inherit; cursor: pointer; }
.lab-fallend button:hover, .lab-fallend button:focus-visible { background: rgba(242, 179, 91, .16); }
@keyframes lab-fallend-in { 0%, 40% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .is-falling canvas { transition: none; } .lab-fallend { animation: none; } }

.lab-fallend button.is-fiction { border-color: rgba(185, 201, 255, .5); color: #b9c9ff; }
.lab-fallend.is-fic > div { border-color: rgba(185, 201, 255, .45); }
.lab-fallend small { color: var(--starlight); opacity: .8; }
.is-whitehole canvas { filter: brightness(6) saturate(0); transition: filter .8s ease-in; }
@media (prefers-reduced-motion: reduce) { .is-whitehole canvas { filter: brightness(1.6); } }
#lab-canvas { transition: transform .4s ease, filter 1.6s ease-out; transform-origin: 50% 50%; }
.is-fallend #lab-canvas { transition: transform .4s ease, filter 2.5s ease; }
.is-whitehole #lab-canvas { transition: filter .8s ease-in; }
@media (prefers-reduced-motion: reduce) { #lab-canvas { transition: none; } }

.lab-tunnel { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; border-radius: inherit; }

/* Fiction: outside time */
.lab-beyond { position: absolute; inset: 0; z-index: 5; overflow: hidden; border-radius: inherit; background: radial-gradient(ellipse at 50% 45%, #0d1024 0%, #040409 70%); animation: lab-beyond-in 2.4s ease both; }
.lab-beyond-space { position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 45%; }
.lab-beyond figure { position: absolute; left: 50%; top: 45%; width: 240px; margin: 0; transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z)); transition: transform 1.1s cubic-bezier(.2,.7,.2,1), opacity .6s; animation: lab-beyond-drift 14s ease-in-out var(--d) infinite alternate, lab-beyond-pop 1.6s ease var(--d) both; cursor: pointer; }
.lab-beyond figure img { display: block; width: 100%; border-radius: 6px; border: 1px solid rgba(185, 201, 255, .35); box-shadow: 0 0 40px rgba(120, 140, 255, .18); }
.lab-beyond figcaption { margin-top: 4px; font-size: .7rem; color: #b9c9ff; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lab-beyond figure.is-near { transform: translate(-50%, -50%) translate3d(0, 0, 420px); z-index: 2; animation: none; }
.lab-beyond-card { position: absolute; left: 16px; bottom: 16px; max-width: 420px; padding: 14px 16px; border-radius: 12px; background: rgba(8, 7, 14, .84); border: 1px solid rgba(185, 201, 255, .4); color: var(--starlight); font-size: .82rem; line-height: 1.5; }
.lab-beyond-card b { display: block; margin-bottom: 4px; color: #b9c9ff; }
.lab-beyond-card small { opacity: .8; }
.lab-beyond button { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(242, 179, 91, .5); background: transparent; color: #f2b35b; font: inherit; cursor: pointer; }
@keyframes lab-beyond-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lab-beyond-pop { from { opacity: 0; } to { opacity: 1; } }
@keyframes lab-beyond-drift { from { translate: 0 0; } to { translate: 0 -14px; } }
@media (max-width: 700px) { .lab-beyond figure { width: 150px; } .lab-beyond-card { right: 16px; } }
@media (prefers-reduced-motion: reduce) { .lab-beyond, .lab-beyond figure { animation: none; transition: none; } }

.lab-beyond-go { display: none; margin: 8px auto 0; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(185, 201, 255, .55) !important; background: rgba(8, 7, 14, .8) !important; color: #b9c9ff !important; font: inherit; font-size: .78rem; cursor: pointer; }
.lab-beyond figure.is-near .lab-beyond-go { display: block; }
.lab-beyond figure.is-near figcaption { font-size: .8rem; }

/* Science fiction: outside time (live) */
.lab-tb { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(8, 7, 14, .82); border: 1px solid rgba(185, 201, 255, .35); backdrop-filter: blur(8px); color: var(--starlight); font-size: .8rem; }
.lab-tb input[type=range] { flex: 1 1 220px; accent-color: #b9c9ff; min-width: 140px; }
.lab-tb button { padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(242, 179, 91, .5); background: transparent; color: #f2b35b; font: inherit; cursor: pointer; white-space: nowrap; }
.lab-tb button:hover:not(:disabled), .lab-tb button:focus-visible { background: rgba(242, 179, 91, .16); }
.lab-tb button:disabled { opacity: .4; cursor: not-allowed; }
.lab-tb .lab-tb-play { width: 36px; padding: 6px 0; border-color: rgba(185, 201, 255, .5); color: #b9c9ff; }
.lab-tb .lab-tb-push { border-color: rgba(185, 201, 255, .6); color: #d6e0ff; }
.lab-tb .lab-tb-push.is-on { background: rgba(185, 201, 255, .18); }
.lab-tb-read { flex: 1 0 100%; font-variant-numeric: tabular-nums; }
.lab-tb-read em, .lab-tb-card em { font-style: normal; color: #f2b35b; }
.lab-tb-card { position: absolute; left: 16px; top: 16px; z-index: 5; max-width: min(380px, calc(100% - 32px)); display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: rgba(8, 7, 14, .82); border: 1px solid rgba(185, 201, 255, .4); color: var(--starlight); font-size: .8rem; line-height: 1.45; backdrop-filter: blur(8px); }
.lab-tb-card b { color: #b9c9ff; font-size: .9rem; }
.lab-tb-card small { opacity: .75; }
.is-timebeyond .lab-bhhud, .is-timebeyond .lab-fallbtn, .is-timebeyond .lab-navchip { display: none !important; }
.is-aiming #lab-canvas { cursor: crosshair; }

/* ================= Laboratory shell (2026-11): the scene owns the screen =================
   One quiet top bar (back, search, more), one dock at the bottom (play, time, add, panel).
   Everything else appears only when asked for. Overrides the earlier lab layout above. */
.lab-page { padding-top: 0; }
body.lab-focus .site-header { opacity: 0; pointer-events: none; transform: translateY(-100%); transition: opacity .25s, transform .25s; }
.lab-page .lab { --panel-w: 0px; height: 100svh; min-height: 480px; padding: 0; gap: 0; margin-bottom: clamp(40px, 6vw, 72px); background: #000; }
.lab-page .lab-body { position: absolute; inset: 0; }
.lab-page .lab-stage { position: absolute; inset: 0; border: 0; border-radius: 0; }
.lab-page #lab-canvas { height: 100%; border: 0; border-radius: 0; }

/* Top bar floats over the scene */
.lab-page .lab-bar { position: absolute; z-index: 7; top: 0; left: 0; right: 0; min-height: 0; padding: 14px 16px; pointer-events: none;
    background: linear-gradient(rgba(0,0,0,.55), transparent); }
.lab-page .lab-bar > * { pointer-events: auto; }
.lab-home { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px; color: var(--doppler); font-size: .86rem; font-weight: 500; letter-spacing: .02em; text-decoration: none; }
.lab-home:hover { background: rgba(255,243,220,.07); }
.lab-home .ic { width: 18px; height: 18px; }
.lab-page .lab-bar-actions { position: relative; align-items: center; gap: 8px; }
.lab-page .lab-search { position: relative; align-items: center; }
.lab-page .lab-search .ic { position: absolute; z-index: 1; left: 11px; width: 15px; height: 15px; color: var(--starlight); pointer-events: none; }
.lab-page .lab-search input { width: 170px; height: 36px; min-height: 0; padding: 0 12px 0 32px; border-radius: 999px; border-color: rgba(255,243,220,.1);
    background: rgba(20,20,24,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: width .25s ease; }
.lab-page .lab-search input:focus { width: 240px; outline: none; border-color: rgba(242,179,91,.5); }
.lab-icon-btn { width: 36px; height: 36px; min-height: 0; padding: 0; justify-content: center; border-radius: 999px; background: rgba(20,20,24,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* More menu */
.lab-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 9; width: 250px; padding: 6px; border: 1px solid rgba(255,243,220,.1); border-radius: 16px;
    background: rgba(18,18,22,.86); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: 0 18px 50px rgba(0,0,0,.55); animation: lab-pop .16s ease-out; transform-origin: top right; }
.lab-menu[hidden] { display: none; }
@keyframes lab-pop { from { opacity: 0; transform: scale(.96); } }
.lab-menu hr { margin: 5px 8px; border: 0; border-top: 1px solid rgba(255,243,220,.08); }
.lab-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: none;
    color: var(--doppler); font: inherit; font-size: .84rem; text-align: left; cursor: pointer; }
.lab-menu-item:hover:not(:disabled), .lab-menu-item:focus-visible { background: rgba(255,243,220,.08); outline: none; }
.lab-menu-item:disabled { opacity: .35; cursor: default; }
.lab-menu-item .ic { flex: none; width: 17px; height: 17px; color: var(--starlight); }
.lab-menu-item .txt { flex: 1; }
.lab-menu-item kbd { border: 0; padding: 0; color: var(--starlight); font-size: .74rem; }
.lab-menu-item[aria-pressed="true"] .ic { color: var(--disk); }
.lab-menu-item[aria-pressed="true"]::after { content: "\2713"; color: var(--disk); font-size: .8rem; }
.lab-menu .lab-tech-switch i { flex: none; position: relative; width: 28px; height: 16px; border-radius: 999px; background: rgba(255,243,220,.14); transition: background .15s; }
.lab-menu .lab-tech-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--starlight); transition: transform .15s, background .15s; }
.lab-menu .lab-tech-switch input:checked ~ i { background: rgba(242,179,91,.55); }
.lab-menu .lab-tech-switch input:checked ~ i::after { transform: translateX(12px); background: #fff; }
.lab-menu .lab-tech-switch input:focus-visible ~ i { outline: 2px solid var(--disk); outline-offset: 2px; }

/* Date and numbers: top left under the bar, quiet */
.lab-page .lab-hud { top: 64px; left: 22px; font-size: .78rem; }
.lab-page .lab-hud dd { font-size: .95rem; font-weight: 500; letter-spacing: .01em; }
.lab-page .lab-toast { top: 64px; z-index: 8; border-radius: 999px; background: rgba(18,18,22,.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

/* Dock */
.lab-dock { position: absolute; z-index: 6; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; display: flex; align-items: center; gap: 4px;
    max-width: calc(100% - 24px); padding: 5px; border: 1px solid rgba(255,243,220,.1); border-radius: 999px;
    background: rgba(18,18,22,.72); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.lab-dock-play, .lab-dock-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--doppler); cursor: pointer; transition: background .15s, transform .1s; }
.lab-dock-play { background: var(--doppler); color: #0a0a0c; }
.lab-dock-play:active, .lab-dock-btn:active { transform: scale(.94); }
.lab-dock-btn:hover, .lab-dock-btn:focus-visible { background: rgba(255,243,220,.09); outline: none; }
.lab-dock-btn[aria-pressed="true"], .lab-dock-btn[aria-expanded="true"] { background: rgba(242,179,91,.16); color: var(--disk); }
.lab-dock .ic { width: 18px; height: 18px; }
.lab-dock-play .ic { fill: currentColor; }
.lab-dock-sep { flex: none; width: 1px; height: 22px; margin: 0 4px; background: rgba(255,243,220,.12); }
.lab-dock-time { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.lab-dock-time::-webkit-scrollbar { display: none; }
.lab-dock .lab-seg { display: flex; gap: 2px; padding: 0; border: 0; background: none; }
.lab-dock .lab-seg button { flex: none; height: 32px; padding: 0 11px; border: 0; border-radius: 999px; background: none; color: var(--starlight); font: inherit; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.lab-dock .lab-seg button:hover { color: var(--doppler); }
.lab-dock .lab-seg button[aria-checked="true"] { background: rgba(255,243,220,.12); color: var(--doppler); }

/* Body tray: rises above the dock when "+" is pressed */
.lab-page .lab-tools { left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 62px); max-width: calc(100% - 24px); border-radius: 20px; border-color: rgba(255,243,220,.1);
    background: rgba(18,18,22,.78); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); animation: lab-rise .18s ease-out; }
.lab-page .lab-tools[hidden] { display: none; }
@keyframes lab-rise { from { opacity: 0; transform: translateY(8px); } }
.lab-page .lab-hint { left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 62px); background: rgba(0,0,0,.45); }
.lab-page .lab:has(.lab-tools:not([hidden])) .lab-hint { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 150px); }

/* Panel: a floating sheet on the right, closed by default */
.lab-page .lab-side { top: 64px; right: 12px; bottom: 84px; width: 360px; border-color: rgba(255,243,220,.1); border-radius: 20px;
    background: rgba(14,14,18,.8); backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lab-page .lab.is-panel-hidden .lab-side { transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.lab-page .lab-tablist { overflow-x: auto; scrollbar-width: none; }
.lab-page .lab-tablist::-webkit-scrollbar { display: none; }

.lab-page .lab-welcome { z-index: 8; border-radius: 22px; border-color: rgba(255,243,220,.1); background: rgba(16,16,20,.84); backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4); }
.lab-page .lab:fullscreen { padding: 0; }

@media (max-width: 1000px) {
    .lab-page .lab { height: 100svh; }
    .lab-page .lab-body { position: absolute; display: block; }
    .lab-page .lab-stage { position: absolute; inset: 0; }
    .lab-page #lab-panel-toggle { display: grid; }
    .lab-page .lab-side { position: absolute; top: auto; left: 8px; right: 8px; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 60px); width: auto; max-height: 62svh;
        padding: 8px; overflow-y: auto; border: 1px solid rgba(255,243,220,.1); background: rgba(14,14,18,.9); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); }
    .lab-page .lab.is-panel-hidden .lab-side { transform: translateY(calc(100% + 90px)); opacity: 0; pointer-events: none; width: auto; }
}
@media (max-width: 700px) {
    .lab-page .lab-stage { overflow: hidden; }
    .lab-page #lab-canvas { height: 100%; border: 0; }
    .lab-page .lab-bar { padding: 10px; }
    .lab-page .lab-search input { width: 120px; }
    .lab-page .lab-search input:focus { width: 170px; }
    .lab-page .lab-hud { top: 58px; left: 14px; }
    .lab-page .lab-hint { position: absolute; translate: -50% 0; margin: 0; white-space: nowrap; }
    .lab-page .lab-tools { position: absolute; translate: -50% 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); width: calc(100% - 24px); }
    .lab-page .lab-dock .lab-seg button { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .lab-menu, .lab-page .lab-tools { animation: none; }
}
@media (min-width: 1001px) {
    .lab-page .lab:not(.is-panel-hidden) .lab-tools { left: calc(50% - 186px); max-width: calc(100% - 420px); }
}
.lab-menu-item { padding-right: 12px; }
.lab-page .lab-bar { flex-direction: row; flex-wrap: nowrap; align-items: center; }
.lab-page .lab-bar-actions { flex-wrap: nowrap; width: auto; }
@media (max-width: 1000px) {
    .lab-page .lab-side > * { flex-shrink: 0; }
    .lab-page .lab-tabs .lab-panel { max-height: 300px; overflow-y: auto; }
}
@media (max-width: 700px) {
    .lab-page .lab-home span { display: none; }
    .lab-page .lab-home { padding: 0; width: 36px; justify-content: center; background: rgba(20,20,24,.55); }
    .lab-page .lab-search input, .lab-page .lab-search input:focus { width: min(52vw, 220px); }
    .lab-page .lab-dock-time { max-width: 52vw; }
}
.lab-page .lab-bar-actions { flex: none; justify-content: flex-end; }
.lab-page .lab-search { display: flex; flex: none; }
@media (max-width: 1000px) { .lab-page .lab-tabs .lab-panel { flex: none; } }

/* Selected body: a floating card over the scene (left on desktop, a sheet above the dock on phones) */
.lab-page .lab-float { position: absolute; z-index: 5; left: 16px; top: 118px; width: 340px; max-height: calc(100% - 118px - 92px); overflow-y: auto; overscroll-behavior: contain;
    padding: 14px; border: 1px solid rgba(255,243,220,.1); border-radius: 20px; scrollbar-width: thin;
    background: rgba(14,14,18,.8); backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4); box-shadow: 0 20px 60px rgba(0,0,0,.5);
    animation: lab-rise .2s ease-out; }
.lab-page .lab-float[hidden] { display: none; }
@media (max-width: 1000px) {
    .lab-page .lab-float { left: 8px; right: 8px; top: auto; width: auto; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 60px); max-height: 42svh; }
    .lab-page .lab.has-selection .lab-side { display: none; }
}

/* Search pill opens the palette */
.lab-page .lab-search input { cursor: pointer; caret-color: transparent; }
.lab-search-kbd { position: absolute; right: 10px; border: 0; padding: 0; color: var(--starlight); font-size: .7rem; opacity: .7; pointer-events: none; }
@media (hover: none) { .lab-search-kbd { display: none; } }

/* Command palette */
.lab-palette { position: absolute; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 12px 12px; background: rgba(0,0,0,.35); animation: lab-fade .15s ease-out; }
.lab-palette[hidden] { display: none; }
@keyframes lab-fade { from { opacity: 0; } }
.lab-pal-box { width: min(560px, 100%); max-height: 70vh; display: flex; flex-direction: column; border: 1px solid rgba(255,243,220,.12); border-radius: 20px; overflow: hidden;
    background: rgba(18,18,22,.88); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: lab-pop .16s ease-out; }
.lab-pal-field { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,243,220,.08); }
.lab-pal-field .ic { width: 18px; height: 18px; color: var(--starlight); }
.lab-pal-field input { flex: 1; min-width: 0; border: 0; background: none; color: var(--doppler); font: inherit; font-size: 1.02rem; outline: none; }
.lab-pal-field kbd { border: 0; color: var(--starlight); font-size: .72rem; }
.lab-pal-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.lab-pal-list li[role="option"] { display: flex; align-items: baseline; gap: 10px; padding: 9px 12px; border-radius: 11px; cursor: pointer; color: var(--doppler); font-size: .9rem; }
.lab-pal-list li[role="option"] span { color: var(--starlight); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lab-pal-list li[role="option"] b { font-weight: 500; flex: none; }
.lab-pal-list li[aria-selected="true"], .lab-pal-list li[role="option"]:hover { background: rgba(255,243,220,.09); }
.lab-pal-h { padding: 10px 12px 4px; color: var(--starlight); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.lab-pal-empty { padding: 18px 12px; color: var(--starlight); font-size: .88rem; }
@media (prefers-reduced-motion: reduce) { .lab-palette, .lab-pal-box, .lab-page .lab-float { animation: none; } }
.lab-pal-field input, .lab-pal-field input:focus { border: 0 !important; box-shadow: none !important; outline: none !important; padding: 0 !important; background: none !important; min-height: 0; }
/* The old stacked layout capped the stage at 64vh below 1000px; the shell fills the screen at every width. */
@media (max-width: 1000px) { .lab-page .lab-stage { height: auto; min-height: 0; } }
.lab-home { gap: 8px; padding: 0 12px 0 8px; }
.lab-home img { display: block; width: 22px; height: 22px; }
.lab-home span { letter-spacing: .28em; text-transform: uppercase; font-size: .78rem; }
@media (max-width: 700px) { .lab-page .lab-home { width: 36px; padding: 0; } .lab-page .lab-home img { margin: 0 auto; } }
/* Keyboard focus is always visible (WCAG 2.4.7 / 2.4.11) */
.lab-page .lab-dock-btn:focus-visible, .lab-page .lab-dock-play:focus-visible, .lab-page .lab-icon-btn:focus-visible,
.lab-page .lab-home:focus-visible, .lab-menu-item:focus-visible, .lab-page .lab-dock .lab-seg button:focus-visible,
.lab-page .lab-search input:focus-visible { outline: 2px solid var(--disk); outline-offset: 2px; }
a.lab-menu-item { text-decoration: none; }
/* Touch: inside the simulator two fingers belong to the scene, never to the browser's page zoom.
   Scrollable panels still scroll with one finger. */
.lab-page .lab { touch-action: none; }
.lab-page .lab-side, .lab-page .lab-float, .lab-page .lab-pal-list, .lab-page .lab-tabs .lab-panel, .lab-page .lab-dock-time, .lab-page .lab-tools, .lab-page .lab-menu { touch-action: pan-x pan-y; }
/* Touch: only the canvas takes gestures; bars, dock and the strip below scroll the page vertically.
   (pan-y also rules out the browser's pinch zoom on them.) */
.lab-page .lab { touch-action: pan-y; }
.lab-page #lab-canvas { touch-action: none; }
.lab-below { display: none; }
@media (pointer: coarse) {
    /* The scene stops just short of the screen's foot, so the page visibly goes on below it. */
    .lab-page .lab { height: calc(100svh - 64px); min-height: 420px; margin-bottom: 0; }
    .lab-below { display: flex; align-items: center; justify-content: center; gap: 6px; height: 64px; color: var(--starlight);
        font-size: .86rem; text-decoration: none; background: linear-gradient(#000, transparent); touch-action: pan-y; }
    .lab-below .ic { width: 18px; height: 18px; animation: lab-nudge 2.4s ease-in-out infinite; }
}
@keyframes lab-nudge { 0%, 70%, 100% { transform: none; } 82% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .lab-below .ic { animation: none; } }
.lab-page .lab-now-head { position: relative; }
.lab-side-close { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,243,220,.08); color: var(--doppler); cursor: pointer; }
.lab-side-close:hover, .lab-side-close:focus-visible { background: rgba(255,243,220,.16); outline: 2px solid transparent; }
.lab-side-close:focus-visible { box-shadow: 0 0 0 2px var(--disk); }
/* Losing the GPU: a quiet card over the scene instead of a black rectangle with no explanation. */
.lab-glnote { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6;
    max-width: 34ch; padding: 18px 20px; border-radius: 14px; text-align: center;
    background: rgba(10, 10, 14, .88); border: 1px solid rgba(255, 243, 220, .16); color: var(--starlight);
    backdrop-filter: blur(6px); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.lab-glnote b { display: block; margin-bottom: 6px; font-size: .98rem; }
.lab-glnote p { margin: 0; font-size: .86rem; color: var(--doppler); }
.lab-glnote-reload { margin-top: 12px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--disk); color: #000; font: inherit; font-size: .84rem; }
/* The scale panel: what this scene is not. Numbers computed per scene, never a fixed slogan. */
.lab-truth { margin-top: 10px; display: grid; gap: 6px; }
.lab-truth p { margin: 0; font-size: .78rem; line-height: 1.45; color: var(--doppler); }
