:root {
    /* Compliance vocabulary from DESIGN.md: Inter-panel Spacing* Spacing:* Spacing: Spacing:** 12px gaps filled with a dark burgundy (#3D1F2B IntersectionObserver` to trigger instrument panel activations. Each panel has three states: */
    --deep-burgundy: #3D1F2B;
    --antique-cream: #FAF3E8;
    --oxidized-brass: #8B6F5E;
    --wine-burgundy: #6B1D35;
    --midnight-plum: #1E0F16;
    --warm-amber: #D4A574;
    --near-black: #2A1A1F;
    --warm-brass: #A08872;
    --elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
    font-family: "Commissioner", Inter, system-ui, sans-serif;
    background:
        radial-gradient(circle at 18% 18%, rgba(107, 29, 53, 0.34), transparent 34%),
        radial-gradient(circle at 84% 72%, rgba(212, 165, 116, 0.12), transparent 36%),
        linear-gradient(135deg, #1E0F16 0%, #2A1A1F 48%, #3D1F2B 100%);
    color: var(--near-black);
    overflow: hidden;
}

.ambient-light {
    position: fixed;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.24), rgba(212, 165, 116, 0.08) 34%, transparent 70%);
    filter: blur(42px);
    pointer-events: none;
    animation: pulse 8s var(--elastic) infinite;
    z-index: 0;
}

.ambient-light--one { left: 24%; top: 46%; }
.ambient-light--two { right: 10%; top: 8%; animation-delay: -3.8s; opacity: .72; }

.observatory {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
    width: 100vw;
    height: 100vh;
    padding: 18px;
    background-image: linear-gradient(90deg, rgba(212,165,116,.05) 1px, transparent 1px), linear-gradient(rgba(212,165,116,.035) 1px, transparent 1px);
    background-size: 64px 64px;
    transition: grid-template-columns 1.2s var(--elastic);
}

.observatory.converging { grid-template-columns: .12fr 1fr .12fr; }
.observatory.converging .instrument { opacity: .22; filter: saturate(.35); transform: scale(.96); }
.observatory.converging .viewport { box-shadow: 0 0 0 1px #8B6F5E, 0 0 120px rgba(212, 165, 116, .32), inset 0 0 70px rgba(212, 165, 116, .08); }

.instrument, .viewport {
    border: 1px solid var(--oxidized-brass);
    border-radius: 2px;
    background: var(--antique-cream);
    box-shadow: 0 18px 48px rgba(30, 15, 22, .46), inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 7px rgba(139,111,94,.08);
    position: relative;
    overflow: hidden;
}

.instrument::before, .viewport::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 0 18px, rgba(139,111,94,.26) 19px, transparent 20px),
        linear-gradient(225deg, transparent 0 18px, rgba(139,111,94,.22) 19px, transparent 20px),
        radial-gradient(circle at 50% 0%, rgba(212, 165, 116, .14), transparent 42%);
    pointer-events: none;
    z-index: 3;
}

.instrument { align-self: start; height: calc(100vh - 36px); transition: opacity 1.2s var(--elastic), filter 1.2s var(--elastic), transform 1.2s var(--elastic); }
.instrument.dormant { opacity: .3; filter: saturate(.2); }
.instrument.active { opacity: 1; filter: saturate(1); transform: scale(1); }

.bezel { height: 100%; padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1.45rem; position: relative; }
.bezel::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(139, 111, 94, .24);
    border-radius: 2px;
    pointer-events: none;
}

.instrument-label, .gauge-caption, .annotation {
    font-size: .75rem;
    font-weight: 200;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--warm-brass);
}

.instrument-label { width: 100%; padding-bottom: 1rem; border-bottom: 1px solid rgba(139, 111, 94, .25); color: var(--oxidized-brass); text-align: center; }

.compass { width: min(82%, 220px); overflow: visible; filter: drop-shadow(0 8px 16px rgba(61,31,43,.12)); }
.ring, .arc-track, .gauge-track { fill: none; stroke: var(--oxidized-brass); stroke-width: 1.25; }
.ring--faint { opacity: .36; }
.rose { transform-origin: 110px 110px; animation: rotateCompass 60s linear infinite; }
.rose-main { fill: rgba(139, 111, 94, .16); stroke: var(--oxidized-brass); stroke-width: 1.2; }
.rose-cut { fill: rgba(212, 165, 116, .12); stroke: var(--wine-burgundy); stroke-width: .75; opacity: .8; }
.tick, .arc-marks line, .gauge-ticks line { stroke: var(--oxidized-brass); stroke-width: 1; }
.tick--major { stroke-width: 1.6; }
.svg-label { font: 200 13px "Commissioner", sans-serif; letter-spacing: .15em; fill: var(--oxidized-brass); text-anchor: middle; }
.pin, .arc-needle { fill: var(--warm-amber); filter: drop-shadow(0 0 8px rgba(212, 165, 116, .55)); }

.coordinate-bank, .readout-stack { width: 100%; display: grid; gap: .75rem; }
.coordinate-bank p, .readout-stack p {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .15rem;
    border-bottom: 1px solid rgba(139,111,94,.18);
    font-size: .72rem;
    letter-spacing: .12em;
}
.coordinate-bank span, .readout-stack span { color: var(--warm-brass); font-weight: 200; }
.coordinate-bank b, .readout-stack b { color: var(--deep-burgundy); font-weight: 500; font-variant-numeric: tabular-nums; }

.viewport { display: grid; grid-template-rows: 128px 1fr; min-width: 0; }
.timeline-gauge { padding: 1rem 2rem 0; border-bottom: 1px solid rgba(139,111,94,.22); background: linear-gradient(180deg, rgba(212,165,116,.13), transparent); }
.timeline-gauge svg { width: 100%; height: 92px; display: block; }
.arc-track { opacity: .32; stroke-width: 2; }
.arc-progress { fill: none; stroke: var(--warm-amber); stroke-width: 2.5; stroke-dasharray: 552; stroke-dashoffset: 552; filter: drop-shadow(0 0 8px rgba(212,165,116,.5)); transition: stroke-dashoffset .7s var(--elastic); }
.arc-needle { transition: cx .7s var(--elastic), cy .7s var(--elastic); }

.scrollport { overflow-y: auto; overflow-x: hidden; height: 100%; scroll-behavior: smooth; }
.scrollport::-webkit-scrollbar { width: 9px; }
.scrollport::-webkit-scrollbar-track { background: rgba(61,31,43,.08); }
.scrollport::-webkit-scrollbar-thumb { background: var(--oxidized-brass); border-radius: 999px; border: 2px solid var(--antique-cream); }

.chart-paper { position: relative; min-height: 500vh; padding: 0 clamp(1.4rem, 4vw, 4rem); background: radial-gradient(circle at 50% 42%, rgba(212,165,116,.10), transparent 40%); }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--elastic); }
.contours.visible { opacity: 1; }
.contour-set { fill: none; stroke: var(--warm-amber); stroke-width: 1.2; opacity: .45; transform-origin: center; }
.contour-set--one { transform: rotate(-8deg); }
.contour-set--two { transform: rotate(13deg); }
.contour-set--three { transform: rotate(-15deg); }

.movement {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 0;
    opacity: .18;
    transform: scale(.94) translateY(18px);
    filter: saturate(.55);
    transition: opacity 1.2s var(--elastic), transform 1.2s var(--elastic), filter 1.2s var(--elastic);
}
.movement.active { opacity: 1; transform: scale(1) translateY(0); filter: saturate(1); }
.movement-light {
    position: absolute;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,165,116,.38), rgba(212,165,116,.12) 36%, transparent 72%);
    filter: blur(36px);
    animation: pulse 8s var(--elastic) infinite;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--deep-burgundy);
    line-height: 1.05;
    margin: 1rem 0;
    text-shadow: 0 1px 0 rgba(255,255,255,.7);
}
h2 {
    font-size: clamp(1.25rem, 2.8vw, 1.6rem);
    font-weight: 300;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--oxidized-brass);
    margin: .95rem 0 1.15rem;
}
.lead, .movement p:not(.annotation) {
    max-width: 640px;
    font-size: 1.05rem;
    line-height: 1.75;
    font-weight: 400;
    color: var(--near-black);
}
.lead { font-weight: 300; color: var(--deep-burgundy); }

.branch-map, .convergence-figure { width: min(82%, 520px); margin-top: 2rem; overflow: visible; }
.branch { fill: none; stroke: var(--oxidized-brass); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.branch--fine { stroke: var(--warm-brass); stroke-width: .9; opacity: .72; stroke-dasharray: 9 7; }
.branch--draw { stroke-dasharray: 430; stroke-dashoffset: 430; }
.movement.active .branch--draw { animation: drawPath 1.8s var(--elastic) forwards; }
.movement.active .delay-a { animation-delay: .14s; }
.movement.active .delay-b { animation-delay: .28s; }
.movement.active .delay-c { animation-delay: .42s; }
.movement.active .delay-d { animation-delay: .56s; }
.movement.active .branch--fine { animation: frostBlink 2.6s var(--elastic) infinite; }
.movement--convergence .branch { stroke: var(--warm-amber); filter: drop-shadow(0 0 8px rgba(212,165,116,.42)); }
.core-ring { fill: none; stroke: var(--warm-amber); stroke-width: 1.2; }
.core-ring--soft { opacity: .36; }

.closing-plate {
    margin-top: 2.25rem;
    padding: 1.5rem 1.8rem;
    border: 1px solid rgba(139,111,94,.45);
    background: rgba(250,243,232,.54);
    box-shadow: inset 0 0 28px rgba(212,165,116,.11);
    display: grid;
    gap: .8rem;
}
.closing-plate span { font-size: 1rem; font-weight: 300; letter-spacing: .12em; color: var(--deep-burgundy); }

.large-numeral {
    font-size: clamp(5rem, 12vw, 7rem);
    line-height: .86;
    font-weight: 800;
    color: var(--wine-burgundy);
    opacity: .15;
    letter-spacing: -.06em;
    font-variant-numeric: tabular-nums;
}
.needle-gauge { width: 100%; margin-top: auto; }
.gauge-track { stroke-width: 1.6; }
.gauge-needle { stroke: var(--wine-burgundy); stroke-width: 2.5; stroke-linecap: round; transform-origin: 110px 118px; transition: transform .8s var(--elastic); filter: drop-shadow(0 0 7px rgba(107,29,53,.3)); }
.dendrite { width: 100%; opacity: .35; }
.dendrite path { fill: none; stroke: var(--warm-brass); stroke-width: 1; stroke-linecap: round; }

@keyframes pulse { 0%,100% { opacity: .46; transform: scale(1); } 50% { opacity: .9; transform: scale(1.1); } }
@keyframes rotateCompass { to { transform: rotate(360deg); } }
@keyframes drawPath { to { stroke-dashoffset: 0; } }
@keyframes frostBlink { 0%,100% { opacity: .38; } 50% { opacity: .88; } }

@media (max-width: 900px) {
    body { overflow: auto; }
    .observatory { height: auto; min-height: 100vh; grid-template-columns: 1fr; overflow: visible; }
    .observatory.converging { grid-template-columns: 1fr; }
    .instrument { height: auto; min-height: 360px; }
    .viewport { min-height: 100vh; grid-template-rows: 110px 1fr; }
    .scrollport { overflow: visible; }
    .chart-paper { min-height: auto; }
    .movement { min-height: 92vh; }
}
