/* =================================================================
   LegalDebug.com — luxury debug console for jurisprudence
   Navy-metallic palette · brushed bezels · elastic motion
   ================================================================= */

:root {
    /* Palette (locked from DESIGN.md) */
    --midnight-lacquer: #0B1530;
    --cabochon-navy:    #162447;
    --reading-room:     #1F3A6B;
    --milled-steel:     #A8B0BC;
    --pearl-mercury:    #D6DCE4;
    --amber-bezel:      #C9963C;
    --champagne-halo:   #E8C98A;
    --inkwell-graphite: #2A2D34;
    --vellum-whisper:   #F2F1ED;

    /* Typography */
    --f-display: "Bebas Neue", "Inter", sans-serif;
    --f-body:    "Cormorant Garamond", "Inter", Georgia, serif;
    --f-ui:      "Inter", system-ui, sans-serif;
    --f-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    /* Elastic timing — the house curve */
    --ease-elastic: cubic-bezier(0.16, 1.3, 0.4, 1);
    --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);

    /* Layout — golden three-pane 2:5:3 */
    --rail-left-w:  16vw;
    --rail-right-w: 30vw;
    --gutter:       96px;
}

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

html, body {
    background: var(--midnight-lacquer);
    color: var(--pearl-mercury);
    font-family: var(--f-ui);
    overflow-x: hidden;
    cursor: none;
}

body {
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
em, i { font-style: italic; }
.mono { font-family: var(--f-mono); }

/* =================================================================
   Bezel — milled aluminum frame (used as ::before via .bezel)
   ================================================================= */
.bezel {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 1px var(--milled-steel),
        inset 0 0 0 2px var(--midnight-lacquer),
        inset 0 0 0 3px rgba(201, 150, 60, 0.15),
        0 0 0 1px rgba(11, 21, 48, 0.4);
}

.kicker {
    font-family: var(--f-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--milled-steel);
}

/* =================================================================
   Movement I: Boot screen overlay
   ================================================================= */
.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--midnight-lacquer);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity 600ms var(--ease-out), visibility 0s linear 600ms;
}
.boot-screen.is-done {
    opacity: 0;
    visibility: hidden;
}

.boot-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.boot-crosshair .ch-line {
    position: absolute;
    background: var(--amber-bezel);
    opacity: 0.7;
}
.boot-crosshair .ch-h { left: 0; right: 0; top: 50%; height: 1px; }
.boot-crosshair .ch-v { top: 0; bottom: 0; left: 50%; width: 1px; }

.boot-line {
    position: relative;
    font-family: var(--f-mono);
    font-size: 14px;
    color: var(--amber-bezel);
    z-index: 2;
    margin-top: 80px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.boot-prompt { color: var(--amber-bezel); opacity: 0.7; }
.boot-typed { letter-spacing: 0.04em; }
.boot-caret {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--amber-bezel);
    margin-left: 2px;
    animation: caret 800ms steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.boot-meta {
    position: absolute;
    bottom: 32px;
    left: 32px;
    right: 32px;
    display: flex;
    justify-content: space-between;
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--milled-steel);
    opacity: 0.6;
    letter-spacing: 0.12em;
}

/* =================================================================
   Dashboard layout — three panes
   ================================================================= */
.dashboard {
    display: grid;
    grid-template-columns: var(--rail-left-w) 1fr var(--rail-right-w);
    min-height: 100vh;
    opacity: 0;
    transition: opacity 900ms var(--ease-out) 200ms;
}
.dashboard.is-live {
    opacity: 1;
    aria-hidden: false;
}

.rail, .pane {
    position: relative;
}

/* =================================================================
   Left rail — Inspector (brushed steel column, sticky)
   ================================================================= */
.rail-left {
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        linear-gradient(180deg,
            rgba(168, 176, 188, 0.05) 0%,
            rgba(168, 176, 188, 0.02) 50%,
            rgba(168, 176, 188, 0.05) 100%),
        var(--cabochon-navy);
    border-right: 1px solid rgba(168, 176, 188, 0.18);
    display: flex;
    flex-direction: column;
    padding: 36px 22px 28px;
    animation: railInhale 6s var(--ease-elastic) infinite alternate;
    transform-origin: left center;
}
@keyframes railInhale {
    from { transform: scaleX(1); }
    to   { transform: scaleX(1.01); }
}

.rail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(168, 176, 188, 0.18);
}
.rail-mark {
    width: 28px;
    height: 28px;
    color: var(--amber-bezel);
}
.rail-mark svg { width: 100%; height: 100%; }
.rail-title { display: flex; flex-direction: column; line-height: 1.2; }
.rail-title .kicker { font-size: 10px; }
.rail-name {
    font-family: var(--f-display);
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--pearl-mercury);
    margin-top: 2px;
}

.rail-nav {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.rail-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: baseline;
    gap: 10px;
    padding: 12px 10px 12px 6px;
    border-left: 1px solid transparent;
    transition: border-left-color 360ms var(--ease-out),
                background 360ms var(--ease-out),
                transform 800ms var(--ease-elastic);
    transform: translateX(-12px);
    opacity: 0;
}
.dashboard.is-live .rail-item {
    transform: translateX(0);
    opacity: 1;
}
.dashboard.is-live .rail-item:nth-child(1) { transition-delay: 280ms, 280ms, 280ms; }
.dashboard.is-live .rail-item:nth-child(2) { transition-delay: 340ms, 340ms, 340ms; }
.dashboard.is-live .rail-item:nth-child(3) { transition-delay: 400ms, 400ms, 400ms; }
.dashboard.is-live .rail-item:nth-child(4) { transition-delay: 460ms, 460ms, 460ms; }
.dashboard.is-live .rail-item:nth-child(5) { transition-delay: 520ms, 520ms, 520ms; }
.dashboard.is-live .rail-item:nth-child(6) { transition-delay: 580ms, 580ms, 580ms; }

.rail-num {
    font-family: var(--f-display);
    font-size: 18px;
    letter-spacing: 0.08em;
    color: rgba(168, 176, 188, 0.55);
}
.rail-label {
    font-family: var(--f-ui);
    font-size: 13px;
    letter-spacing: -0.01em;
    color: var(--pearl-mercury);
}
.rail-meta {
    font-family: var(--f-mono);
    font-size: 10px;
    color: rgba(168, 176, 188, 0.55);
}
.rail-item.is-active {
    border-left-color: var(--amber-bezel);
    background: linear-gradient(90deg,
        rgba(201, 150, 60, 0.10) 0%,
        rgba(201, 150, 60, 0) 100%);
}
.rail-item.is-active .rail-num { color: var(--amber-bezel); }
.rail-item.is-active .rail-meta { color: var(--champagne-halo); }
.rail-item:hover .rail-label { color: var(--champagne-halo); }

.rail-footer {
    display: flex;
    gap: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(168, 176, 188, 0.18);
}
.rail-tool {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--milled-steel);
    opacity: 0.7;
}
.rail-tool svg { width: 16px; height: 16px; }

/* =================================================================
   Center pane — Document Theatre (vellum)
   ================================================================= */
.pane-center {
    background: var(--vellum-whisper);
    color: var(--inkwell-graphite);
    padding: 0 var(--gutter);
    overflow: hidden;
}
.guilloche {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--reading-room);
    opacity: 0.04;
    pointer-events: none;
}

.movement {
    position: relative;
    min-height: 100vh;
    padding: 22vh 0 18vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    transform: translateY(28px);
    opacity: 0;
    transition: transform 900ms var(--ease-elastic), opacity 600ms var(--ease-out);
}
.movement.is-in {
    transform: translateY(0);
    opacity: 1;
}

.movement-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.section-num {
    font-family: var(--f-display);
    font-size: 18px;
    letter-spacing: 0.1em;
    color: rgba(31, 58, 107, 0.6);
}
.section-hairline {
    flex: 0 0 0px;
    height: 1px;
    background: linear-gradient(90deg, var(--reading-room) 0%, var(--amber-bezel) 100%);
    transition: flex-basis 900ms var(--ease-out) 200ms;
}
.movement.is-in .section-hairline {
    flex-basis: 240px;
}
.section-title {
    font-family: var(--f-body);
    font-style: italic;
    font-size: 28px;
    color: #4F5560;
    letter-spacing: -0.005em;
}

/* Movement I — hero */
.movement-hero {
    padding-top: 24vh;
    max-width: 820px;
}
.hero-numeral {
    font-family: var(--f-display);
    font-size: clamp(64px, 8vw, 156px);
    font-weight: 400;
    color: var(--reading-room);
    line-height: 0.9;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
}
.hero-mark {
    font-family: var(--f-mono);
    font-size: 18px;
    color: var(--reading-room);
    letter-spacing: 0.02em;
    margin-bottom: 24px;
}
.hero-mark .brand { color: var(--cabochon-navy); font-weight: 500; }
.hero-mark .brand-dot { color: var(--amber-bezel); }
.hero-mark .brand-tld { color: var(--milled-steel); }

.hero-tag {
    font-family: var(--f-body);
    font-size: 26px;
    line-height: 1.45;
    color: var(--inkwell-graphite);
    max-width: 620px;
    margin-bottom: 28px;
}
.hero-tag em {
    color: var(--amber-bezel);
    border-bottom: 1px solid var(--champagne-halo);
    padding-bottom: 1px;
}

.hero-aside {
    font-family: var(--f-mono);
    font-size: 13px;
    color: var(--champagne-halo);
    opacity: 0.85;
    margin-bottom: 36px;
}
.hero-aside .mono { color: var(--amber-bezel); }

.boot-stamp {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 36px;
    padding: 16px 22px;
    border: 1px solid var(--milled-steel);
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 2px var(--vellum-whisper),
        inset 0 0 0 3px rgba(201, 150, 60, 0.15);
    background: rgba(168, 176, 188, 0.06);
    width: max-content;
    max-width: 100%;
}
.stamp-row {
    display: flex;
    flex-direction: column;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--reading-room);
    line-height: 1.5;
}
.stamp-row span:first-child {
    color: var(--milled-steel);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 9px;
    margin-bottom: 2px;
}
.stamp-row span:last-child { color: var(--cabochon-navy); }

/* Generic h on movements */
.movement-h {
    font-family: var(--f-body);
    font-weight: 500;
    font-size: 44px;
    line-height: 1.15;
    color: var(--cabochon-navy);
    letter-spacing: -0.01em;
    margin-bottom: 18px;
    max-width: 640px;
}
.movement-lede {
    font-family: var(--f-body);
    font-size: 21px;
    line-height: 1.55;
    color: var(--inkwell-graphite);
    margin-bottom: 40px;
    max-width: 600px;
}
.movement-lede em { color: var(--amber-bezel); }

/* =================================================================
   Statute (Movement II)
   ================================================================= */
.statute {
    position: relative;
    padding: 32px 36px 30px;
    background: rgba(11, 21, 48, 0.025);
    border-left: 2px solid var(--amber-bezel);
    border-radius: 0 4px 4px 0;
    box-shadow:
        2px 0 0 -1px var(--milled-steel),
        inset 0 0 0 1px rgba(168, 176, 188, 0.18);
}
.statute-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(168, 176, 188, 0.35);
    flex-wrap: wrap;
}
.statute-cite {
    font-size: 13px;
    color: var(--amber-bezel);
    letter-spacing: 0.04em;
}
.statute-meta {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--milled-steel);
    letter-spacing: 0.05em;
}
.statute-spark {
    width: 80px;
    height: 8px;
    color: var(--champagne-halo);
    margin-left: auto;
    opacity: 0.6;
}

.statute-body {
    font-family: var(--f-body);
    font-size: 19px;
    line-height: 1.68;
    color: var(--inkwell-graphite);
    margin-bottom: 14px;
}
.statute-body em {
    color: var(--reading-room);
    font-weight: 500;
}

.term {
    position: relative;
    border-bottom: 1px dotted var(--amber-bezel);
    color: var(--cabochon-navy);
    font-weight: 500;
    transition: color 280ms var(--ease-out), border-bottom-color 280ms var(--ease-out);
    cursor: none;
}
.term:hover {
    color: var(--amber-bezel);
    border-bottom-color: var(--champagne-halo);
    border-bottom-style: solid;
}

.statute-margin {
    margin-top: 18px;
    font-size: 12px;
    color: var(--champagne-halo);
    opacity: 0.75;
    letter-spacing: 0.02em;
}

/* =================================================================
   Reveal grid (Movement III)
   ================================================================= */
.reveal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 720px;
}
.reveal-card {
    position: relative;
    padding: 22px 24px 24px;
    background: rgba(11, 21, 48, 0.03);
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 1px var(--milled-steel),
        inset 0 0 0 2px var(--vellum-whisper),
        inset 0 0 0 3px rgba(201, 150, 60, 0.18);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 900ms var(--ease-elastic), opacity 600ms var(--ease-out);
}
.movement.is-in .reveal-card { transform: translateY(0); opacity: 1; }
.movement.is-in .reveal-card:nth-child(1) { transition-delay: 120ms; }
.movement.is-in .reveal-card:nth-child(2) { transition-delay: 220ms; }
.movement.is-in .reveal-card:nth-child(3) { transition-delay: 320ms; }
.movement.is-in .reveal-card:nth-child(4) { transition-delay: 420ms; }

.reveal-kicker {
    font-family: var(--f-ui);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--milled-steel);
    text-transform: uppercase;
}
.reveal-term {
    font-family: var(--f-body);
    font-style: italic;
    font-weight: 500;
    font-size: 28px;
    color: var(--cabochon-navy);
    margin: 6px 0 12px;
    border-bottom: 1px solid var(--amber-bezel);
    padding-bottom: 8px;
    display: inline-block;
}
.reveal-gloss {
    font-family: var(--f-body);
    font-size: 18px;
    line-height: 1.55;
    color: var(--inkwell-graphite);
    margin-bottom: 14px;
}
.reveal-cite {
    font-size: 11px;
    color: var(--amber-bezel);
    letter-spacing: 0.04em;
}

/* =================================================================
   Stack trace (Movement IV)
   ================================================================= */
.trace {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    max-width: 920px;
    margin-top: 6px;
}
.trace-col {
    position: relative;
    padding: 22px 22px 24px;
    background: rgba(11, 21, 48, 0.04);
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 1px var(--milled-steel),
        inset 0 0 0 2px var(--vellum-whisper),
        inset 0 0 0 3px rgba(201, 150, 60, 0.15);
    min-height: 260px;
    transform: translateY(18px) scale(0.97);
    opacity: 0;
    transition: transform 1100ms var(--ease-elastic), opacity 700ms var(--ease-out);
}
.movement.is-in .trace-col {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.movement.is-in .trace-col:nth-child(1) { transition-delay: 80ms; }
.movement.is-in .trace-col:nth-child(2) { transition-delay: 200ms; }
.movement.is-in .trace-col:nth-child(3) { transition-delay: 320ms; }

.trace-h {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(168, 176, 188, 0.4);
}
.trace-kicker {
    font-family: var(--f-ui);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--milled-steel);
    text-transform: uppercase;
}
.trace-cite { font-size: 11px; color: var(--amber-bezel); }
.trace-col p {
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--inkwell-graphite);
}
.trace-col p em { color: var(--reading-room); }
.trace-original p { font-style: italic; color: var(--reading-room); }
.trace-plain    p { color: var(--inkwell-graphite); }

.trace-graph {
    display: flex;
    flex-direction: column;
}
.graph-svg {
    width: 100%;
    height: 100%;
    color: var(--reading-room);
    margin-top: 6px;
    flex: 1;
}
.graph-svg text {
    font-family: var(--f-mono);
    font-size: 7.5px;
    fill: var(--milled-steel);
}
.graph-node circle {
    fill: var(--vellum-whisper);
    stroke: var(--reading-room);
    stroke-width: 1.25;
    transition: fill 360ms var(--ease-out), stroke 360ms var(--ease-out);
}
.graph-node-root circle {
    fill: var(--amber-bezel);
    stroke: var(--cabochon-navy);
}
.graph-node-root text { fill: var(--amber-bezel); font-weight: 600; }
.movement.is-in .graph-node { animation: graphPulse 3.4s var(--ease-elastic) infinite; }
.movement.is-in .graph-node:nth-of-type(2) { animation-delay: 0.4s; }
.movement.is-in .graph-node:nth-of-type(3) { animation-delay: 0.8s; }
.movement.is-in .graph-node:nth-of-type(4) { animation-delay: 1.2s; }
.movement.is-in .graph-node:nth-of-type(5) { animation-delay: 1.6s; }
@keyframes graphPulse {
    0%, 100% { transform: scale(1); transform-origin: center; }
    50%       { transform: scale(1.06); }
}

.kbd {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    background: rgba(11, 21, 48, 0.08);
    box-shadow: inset 0 0 0 1px var(--milled-steel);
    font-size: 12px;
    color: var(--cabochon-navy);
    letter-spacing: 0.04em;
}

/* =================================================================
   Horizon (Movement V) — horizontal scroll of mini-waves
   ================================================================= */
.horizon {
    position: relative;
    width: 100%;
    max-width: 920px;
    height: 240px;
    background: var(--midnight-lacquer);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px var(--milled-steel),
        inset 0 0 0 3px var(--midnight-lacquer),
        inset 0 0 0 4px rgba(201, 150, 60, 0.18);
    cursor: none;
}
.horizon-rail {
    display: flex;
    height: 100%;
    align-items: center;
    padding: 0 32px;
    gap: 18px;
    will-change: transform;
    transition: transform 800ms var(--ease-elastic);
}
.mini-wave {
    flex: 0 0 auto;
    width: 92px;
    height: 60px;
    position: relative;
    color: var(--amber-bezel);
    opacity: 0.55;
    transition: opacity 280ms var(--ease-out), transform 600ms var(--ease-elastic);
}
.mini-wave.is-hot {
    opacity: 1;
    transform: scale(1.08);
}
.mini-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}
.mini-wave svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
}
.mini-wave .mini-wave-label {
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--f-mono);
    font-size: 9px;
    color: var(--milled-steel);
    opacity: 0.5;
    letter-spacing: 0.08em;
}
.horizon-label {
    position: absolute;
    left: 20px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    pointer-events: none;
}
.horizon-num {
    font-size: 11px;
    color: var(--milled-steel);
    letter-spacing: 0.14em;
}
.horizon-title {
    font-family: var(--f-display);
    font-size: 32px;
    color: var(--champagne-halo);
    letter-spacing: 0.06em;
    transition: opacity 360ms var(--ease-out);
}

/* =================================================================
   Sign-off (Movement VI)
   ================================================================= */
.movement-signoff {
    align-items: flex-start;
}
.signoff-line {
    font-family: var(--f-body);
    font-style: italic;
    font-size: 38px;
    line-height: 1.35;
    color: var(--cabochon-navy);
    margin-bottom: 6px;
    max-width: 620px;
}
.signoff-sub { color: var(--amber-bezel); margin-bottom: 38px; }

.signoff-flatline {
    width: 100%;
    max-width: 620px;
    height: 60px;
    color: var(--amber-bezel);
    margin-bottom: 36px;
}
.flat-svg { width: 100%; height: 100%; }
.flat-svg path {
    transition: d 1200ms var(--ease-elastic);
}

.open-console {
    font-family: var(--f-mono);
    font-size: 14px;
    color: var(--amber-bezel);
    padding: 12px 18px;
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 1px var(--milled-steel),
        inset 0 0 0 2px var(--vellum-whisper),
        inset 0 0 0 3px rgba(201, 150, 60, 0.25);
    background: rgba(11, 21, 48, 0.04);
    letter-spacing: 0.04em;
    transition: color 280ms var(--ease-out), background 280ms var(--ease-out);
}
.open-console:hover {
    color: var(--cabochon-navy);
    background: rgba(201, 150, 60, 0.16);
}
.open-caret {
    display: inline-block;
    animation: caret 800ms steps(1) infinite;
}

.signoff-meta {
    display: flex;
    gap: 24px;
    margin-top: 60px;
    font-size: 10px;
    color: var(--milled-steel);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* =================================================================
   Right rail — Console
   ================================================================= */
.rail-right {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--midnight-lacquer);
    border-left: 1px solid rgba(168, 176, 188, 0.2);
    padding: 32px 26px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}
.console-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.console-header .kicker { color: var(--milled-steel); }
.console-title {
    font-family: var(--f-display);
    font-size: 16px;
    letter-spacing: 0.1em;
    color: var(--pearl-mercury);
}
.console-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amber-bezel);
    margin-left: auto;
    box-shadow: 0 0 6px var(--amber-bezel), 0 0 14px rgba(201, 150, 60, 0.4);
    animation: ledPulse 2.4s ease-in-out infinite;
}
@keyframes ledPulse {
    0%, 100% { opacity: 0.9; }
    50%      { opacity: 0.3; }
}

.osc-panel {
    position: relative;
    height: 200px;
    padding: 14px;
    background: var(--midnight-lacquer);
    color: var(--amber-bezel);
    border-radius: 4px;
}
.osc-svg {
    width: 100%;
    height: calc(100% - 22px);
    color: var(--amber-bezel);
    display: block;
}
.osc-svg #osc-path {
    stroke: var(--amber-bezel);
    filter: drop-shadow(0 0 4px rgba(201, 150, 60, 0.5));
}
.osc-svg #osc-cursor { fill: var(--champagne-halo); }
.osc-svg rect[fill="url(#oscGrid)"] { color: var(--milled-steel); opacity: 0.45; }

.osc-legend {
    position: absolute;
    bottom: 8px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--milled-steel);
    letter-spacing: 0.1em;
}
.osc-legend span span {
    color: var(--amber-bezel);
    margin-left: 4px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.mini {
    position: relative;
    padding: 10px 12px 12px;
    background: rgba(168, 176, 188, 0.04);
    border-radius: 4px;
    height: 96px;
    color: var(--amber-bezel);
}
.mini-label {
    display: block;
    font-family: var(--f-ui);
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--milled-steel);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.mini-svg {
    display: block;
    width: 100%;
    height: 36px;
    color: var(--amber-bezel);
}
.mini-value {
    display: block;
    font-size: 14px;
    color: var(--champagne-halo);
    margin-top: 4px;
    letter-spacing: 0.04em;
}
.mini-unit { color: var(--milled-steel); font-size: 10px; margin-left: 2px; }

.trace-pane {
    position: relative;
    flex: 1;
    padding: 14px 16px;
    background: rgba(168, 176, 188, 0.03);
    border-radius: 4px;
    overflow: hidden;
}
.trace-pane header {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 10px;
}
.trace-pane header .kicker { color: var(--milled-steel); }
.trace-pane header .mono { font-size: 10px; color: var(--amber-bezel); }

.trace-log {
    list-style: none;
    font-size: 11px;
    line-height: 1.6;
    color: var(--pearl-mercury);
    max-height: 100%;
    overflow: hidden;
}
.trace-log li {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(168, 176, 188, 0.08);
}
.trace-time { color: var(--milled-steel); }
.trace-line { color: var(--champagne-halo); }
.trace-log li.is-new .trace-line { color: var(--amber-bezel); }

.console-foot {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--milled-steel);
    letter-spacing: 0.1em;
    padding-top: 6px;
    border-top: 1px solid rgba(168, 176, 188, 0.15);
}
.console-foot span span { color: var(--amber-bezel); }
.led-tag { color: var(--champagne-halo); }

/* =================================================================
   Gloss tooltip (hover defined terms)
   ================================================================= */
.gloss {
    position: fixed;
    z-index: 150;
    max-width: 280px;
    padding: 14px 16px;
    background: var(--pearl-mercury);
    color: var(--inkwell-graphite);
    border-radius: 4px;
    box-shadow: 0 18px 36px rgba(11, 21, 48, 0.18);
    transform: translate(-50%, calc(-100% - 18px)) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 480ms var(--ease-elastic), opacity 280ms var(--ease-out);
}
.gloss::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: var(--pearl-mercury);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 2px 2px 4px rgba(11, 21, 48, 0.08);
}
.gloss.is-show {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 14px)) scale(1);
}
.gloss .bezel {
    box-shadow:
        inset 0 0 0 1px var(--milled-steel),
        inset 0 0 0 2px var(--pearl-mercury),
        inset 0 0 0 3px rgba(201, 150, 60, 0.45);
}
.gloss-kicker {
    display: block;
    font-size: 10px;
    color: var(--amber-bezel);
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}
.gloss-body {
    display: block;
    font-family: var(--f-body);
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    color: var(--cabochon-navy);
    border-bottom: 1px solid var(--amber-bezel);
    padding-bottom: 6px;
}

/* =================================================================
   Custom crosshair cursor
   ================================================================= */
.crosshair {
    position: fixed;
    top: 0; left: 0;
    width: 28px;
    height: 28px;
    pointer-events: none;
    z-index: 300;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: transform 80ms linear, width 240ms var(--ease-out), height 240ms var(--ease-out);
}
.crosshair .ch-h, .crosshair .ch-v {
    position: absolute;
    background: var(--champagne-halo);
    opacity: 0.55;
}
.crosshair .ch-h { left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%); }
.crosshair .ch-v { top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); }
.crosshair .ch-dot {
    position: absolute;
    top: 50%; left: 50%;
    width: 4px;
    height: 4px;
    background: var(--amber-bezel);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px var(--amber-bezel);
}
.crosshair.is-on-console {
    width: 22px;
    height: 22px;
}
.crosshair.is-on-console .ch-dot {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 9px;
    border-color: transparent transparent transparent var(--amber-bezel);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* =================================================================
   Responsive — preserve dashboard feel down to small screens
   ================================================================= */
@media (max-width: 1100px) {
    :root {
        --rail-left-w: 18vw;
        --rail-right-w: 32vw;
        --gutter: 56px;
    }
    .hero-tag { font-size: 22px; }
    .movement-h { font-size: 36px; }
    .reveal-grid { grid-template-columns: 1fr; }
    .trace { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    html, body { cursor: auto; }
    .crosshair { display: none; }
    .dashboard {
        grid-template-columns: 1fr;
    }
    .rail-left,
    .rail-right {
        position: relative;
        height: auto;
        min-height: 0;
    }
    .rail-left {
        padding: 22px 22px 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(168, 176, 188, 0.18);
    }
    .rail-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .rail-item {
        flex: 0 0 auto;
        padding: 8px 12px;
        border-left: 0;
        border-bottom: 1px solid transparent;
    }
    .rail-item.is-active {
        border-bottom-color: var(--amber-bezel);
        background: rgba(201, 150, 60, 0.08);
    }
    .rail-right {
        padding: 26px 22px;
    }
    .osc-panel { height: 160px; }
    .trace-pane { min-height: 120px; }
    .pane-center { padding: 0 32px; }
    .hero-numeral { font-size: 78px; }
    .movement-h { font-size: 30px; }
    .hero-tag { font-size: 19px; }
    .signoff-line { font-size: 28px; }
    .horizon { height: 200px; }
}
