/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: #0f0f0f;
    color: #d4d4d4;
    font-family: 'IBM Plex Mono', 'Libre Baskerville', monospace;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}
/* Palette refs: #0A0A0A #222222 #2A2A2C #4A4A4D #E0B85C */

/* ===== PERLIN NOISE BG ===== */
#noise-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    opacity: 0.12;
    pointer-events: none;
}

/* Extended palette: #0A0A0A #222222 #2A2A2C #4A4A4D #E0B85C */
.console-shadow { background: #0A0A0A; }
.panel-deep { background: #222222; }
.panel-border-alt { border-color: #2A2A2C; }
.panel-mid { color: #4A4A4D; }
.brass-highlight { color: #E0B85C; }

/* ===== HUD CONSOLE FRAME ===== */
#console-frame {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    pointer-events: none;
    border: 4px solid #2a2a2a;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.8);
}
#console-frame > * { pointer-events: auto; }

.frame-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 48px;
    background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
    border-bottom: 2px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 24px;
}
.frame-indicator {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #c8a04a;
    box-shadow: 0 0 6px #c8a04a;
}
.frame-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #c8a04a;
    text-transform: uppercase;
}

.frame-left {
    position: absolute;
    top: 48px; left: 0; bottom: 48px;
    width: 48px;
    background: linear-gradient(90deg, #1a1a1a 0%, #141414 100%);
    border-right: 2px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
    gap: 20px;
}
.section-marker {
    width: 32px; height: 32px;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #7a6a3a;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1c1c1e;
}
.section-marker.active {
    border-color: #c8a04a;
    color: #c8a04a;
    box-shadow: 0 0 8px rgba(200,160,74,0.3);
}

.frame-right {
    position: absolute;
    top: 48px; right: 0; bottom: 48px;
    width: 140px;
    background: linear-gradient(270deg, #1a1a1a 0%, #141414 100%);
    border-left: 2px solid #2a2a2a;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.tracker-label, .readout-key {
    font-size: 9px;
    letter-spacing: 0.15em;
    color: #7a6a3a;
    text-transform: uppercase;
}
.tracker-bar {
    width: 100%;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    margin: 8px 0 4px;
    overflow: hidden;
}
.tracker-fill {
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #c8a04a, #7a6a3a);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.tracker-values {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: #d4d4d4;
    letter-spacing: 0.1em;
}
.readout-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.readout-val {
    font-size: 10px;
    color: #c8a04a;
    letter-spacing: 0.05em;
}

.frame-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 48px;
    background: linear-gradient(0deg, #1a1a1a 0%, #141414 100%);
    border-top: 2px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.screw-head {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #4a4a4a, #2a2a2a);
    border: 1px solid #3a3a3a;
    position: relative;
}
.screw-head::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) rotate(35deg);
    width: 8px; height: 1px;
    background: #1a1a1a;
}
.frame-serial {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: #7a6a3a;
}
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.toggle-track {
    width: 32px; height: 16px;
    background: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
    position: relative;
    transition: background 0.3s;
}
.toggle-knob {
    width: 12px; height: 12px;
    background: #c8a04a;
    border-radius: 50%;
    position: absolute;
    top: 1px; left: 1px;
    transition: left 0.3s;
    box-shadow: 0 0 4px rgba(200,160,74,0.4);
}
.toggle-switch.on .toggle-track { background: #3a3a2a; }
.toggle-switch.on .toggle-knob { left: 17px; }
.toggle-label {
    font-size: 9px;
    letter-spacing: 0.15em;
    color: #7a6a3a;
}

/* ===== MAIN CONTENT ===== */
#content {
    position: relative;
    z-index: 10;
    padding: 48px 48px 48px 48px;
    margin-left: 48px;
    margin-right: 140px;
}

.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
}
.panel-inner {
    max-width: 900px;
    width: 100%;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #f0f0f0;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
}
h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.06em;
    line-height: 1.05;
}
h3 {
    font-size: 1rem;
    color: #c8a04a;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}
.body-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15px;
    line-height: 1.7;
    color: #d4d4d4;
    margin-bottom: 16px;
}
.body-text em {
    color: #c8a04a;
    font-style: normal;
}

/* ===== HERO ===== */
.hero-title {
    text-align: center;
    margin: 32px 0;
}
.title-line {
    display: block;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #f0f0f0;
    line-height: 1;
}
.title-sub {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    letter-spacing: 0.3em;
    color: #c8a04a;
    margin-top: 16px;
    font-weight: 400;
}
.hero-tagline {
    text-align: center;
    font-size: 14px;
    color: #7a6a3a;
    letter-spacing: 0.15em;
    margin-top: 24px;
}

/* ===== BRASS RULES ===== */
.brass-rule {
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8a04a, transparent);
    width: 100%;
}
.brass-accent {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #c8a04a, transparent);
    margin-left: 16px;
}
.closing-brass-rule {
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8a04a, transparent);
    margin: 48px 0 24px;
}

/* ===== GAUGES ===== */
.gauge-cluster {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}
.gauge {
    text-align: center;
}
.gauge svg {
    width: 100px; height: 100px;
}
.gauge-track {
    fill: none;
    stroke: #2a2a2a;
    stroke-width: 6;
}
.gauge-fill {
    fill: none;
    stroke: #c8a04a;
    stroke-width: 6;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1.5s ease;
}
.gauge-text {
    fill: #c8a04a;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 20px;
    text-anchor: middle;
    dominant-baseline: middle;
}
.gauge-label {
    display: block;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: #7a6a3a;
    margin-top: 8px;
}

/* ===== PANEL HEADER ===== */
.panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.panel-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #7a6a3a;
    border: 1px solid #2a2a2a;
    padding: 4px 8px;
    border-radius: 2px;
    background: #1c1c1e;
}

/* ===== RECESSED PANEL ===== */
.recessed-panel {
    background: #1c1c1e;
    border: 1px solid #2a2a2a;
    padding: 32px;
    border-radius: 4px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}
.engraved-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #c8a04a;
    border-left: 3px solid #c8a04a;
    padding-left: 20px;
    margin-top: 24px;
    font-style: italic;
    line-height: 1.5;
}

/* ===== SPLIT PANEL (ARGUMENTS) ===== */
.split-panel {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.argument-column {
    flex: 1;
}
.column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #d4d4d4;
}
.led {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.led-green {
    background: #4a9a4a;
    box-shadow: 0 0 6px #4a9a4a;
}
.led-amber {
    background: #c8a04a;
    box-shadow: 0 0 6px #c8a04a;
}
.divider-line {
    width: 1px;
    background: linear-gradient(180deg, transparent, #2a2a2a, #c8a04a, #2a2a2a, transparent);
    align-self: stretch;
    min-height: 300px;
}
.argument-card {
    background: #1c1c1e;
    border: 1px solid #2a2a2a;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.3);
    transition: border-color 0.3s ease;
}
.argument-card:hover {
    border-color: #c8a04a;
}
.argument-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #d4d4d4;
}

/* ===== DATA GRID (EVIDENCE) ===== */
.data-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
.data-cell {
    background: #1c1c1e;
    border: 1px solid #2a2a2a;
    padding: 24px 16px;
    text-align: center;
    border-radius: 4px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}
.data-value {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #c8a04a;
    line-height: 1;
}
.data-unit {
    font-size: 10px;
    letter-spacing: 0.25em;
    color: #7a6a3a;
    margin: 8px 0;
}
.data-desc {
    font-size: 11px;
    color: #d4d4d4;
    line-height: 1.4;
}

/* ===== OSCILLOSCOPE ===== */
.oscilloscope {
    background: #141414;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    position: relative;
}
#scope-canvas {
    width: 100%;
    height: 120px;
    display: block;
}
.scope-label {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: #7a6a3a;
    text-align: center;
    margin-top: 8px;
}

/* ===== VERDICT METER ===== */
.verdict-display {
    text-align: center;
    padding: 32px 0;
}
.verdict-needle-container {
    max-width: 400px;
    margin: 0 auto 32px;
}
#verdict-meter { width: 100%; }
.meter-track {
    fill: none;
    stroke: #2a2a2a;
    stroke-width: 8;
    stroke-linecap: round;
}
.meter-fill {
    fill: none;
    stroke: #c8a04a;
    stroke-width: 8;
    stroke-linecap: round;
    opacity: 0.3;
}
.meter-needle {
    stroke: #c8a04a;
    stroke-width: 3;
    stroke-linecap: round;
    transform-origin: 150px 150px;
    transition: transform 1s ease;
}
.meter-pivot {
    fill: #c8a04a;
}
.meter-label-left, .meter-label-right {
    fill: #7a6a3a;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
}
.meter-label-right { text-anchor: end; }
.verdict-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15px;
    color: #d4d4d4;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
.panel-footer {
    text-align: center;
    padding-top: 16px;
}
.footer-text {
    font-size: 10px;
    letter-spacing: 0.3em;
    color: #7a6a3a;
}

/* ===== ANIMATIONS ===== */
.panel-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.panel-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    #content { margin-right: 0; }
    .frame-right { display: none; }
    .split-panel { flex-direction: column; }
    .divider-line { width: 100%; height: 1px; min-height: auto; }
    .data-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    #content { margin-left: 0; padding: 48px 16px; }
    .frame-left { display: none; }
    .gauge-cluster { flex-direction: column; align-items: center; gap: 24px; }
    .data-grid { grid-template-columns: 1fr 1fr; }
}
