/* ==============================================
   CONTINUA.QUEST - Industrial Skeuomorphic Dashboard
   Cold War-era test equipment aesthetic
   ============================================== */

/* --- CSS Variables --- */
:root {
    --deep-walnut: #3D2B1F;
    --terracotta: #C06030;
    --amber-phosphor: #E07A3A;
    --formica-cream: #E8D5B8;
    --khaki-dust: #C4A882;
    --burnished-brass: #A08050;
    --smoked-acrylic: #1A1208;
    --signal-green: #4A7A3A;
    --alert-amber: #D4A020;
    --deactivated-gray: #6B5E52;
    --grid-color: #8B6D4F;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--burnished-brass) var(--deep-walnut);
}

body {
    font-family: 'Overpass', sans-serif;
    font-weight: 400;
    color: var(--formica-cream);
    background-color: var(--deep-walnut);
    line-height: 1.6;
    letter-spacing: 0.02em;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* --- Grid Overlay (Engineering Graph Paper) --- */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 119px, rgba(139,109,79,0.2) 119px, rgba(139,109,79,0.2) 120px),
        repeating-linear-gradient(90deg, transparent, transparent 119px, rgba(139,109,79,0.2) 119px, rgba(139,109,79,0.2) 120px),
        repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(139,109,79,0.1) 23px, rgba(139,109,79,0.1) 24px),
        repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(139,109,79,0.1) 23px, rgba(139,109,79,0.1) 24px);
}

/* --- Dashboard Layout --- */
.dashboard {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    padding: 12px;
    max-width: 1440px;
    margin: 0 auto;
}

/* --- Module Base --- */
.module {
    position: relative;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.module.module-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.module-bezel {
    background: linear-gradient(135deg, #4a3828 0%, var(--deep-walnut) 40%, #2d1e14 100%);
    border: 1px solid rgba(139,109,79,0.3);
    border-radius: 3px;
    box-shadow:
        inset 0 1px 0 rgba(160,128,80,0.15),
        inset 0 -1px 0 rgba(0,0,0,0.3),
        0 2px 8px rgba(0,0,0,0.4),
        0 0 0 1px rgba(0,0,0,0.2);
    padding: 12px;
    height: 100%;
}

/* --- Module Label (Dymo Tape) --- */
.module-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.label-tape {
    display: inline-block;
    background: var(--terracotta);
    color: var(--formica-cream);
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3em;
    padding: 3px 10px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 -1px 0 rgba(255,255,255,0.1);
    border-radius: 2px;
    text-transform: uppercase;
}

/* --- Header Module --- */
.module-header {
    grid-column: 1 / -1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.status-indicators-left,
.status-indicators-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px;
}

.mission-title {
    text-align: center;
    flex: 1;
}

.dymo-label {
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--formica-cream);
    background: var(--terracotta);
    display: inline-block;
    padding: 2px 12px;
    margin-bottom: 8px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 -1px 0 rgba(255,255,255,0.1);
    text-transform: uppercase;
}

.mission-title h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 72px);
    letter-spacing: 0.08em;
    color: var(--formica-cream);
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.title-dot {
    color: var(--amber-phosphor);
    text-shadow: 0 0 12px var(--amber-phosphor), 0 0 24px rgba(224,122,58,0.3);
}

.subtitle {
    font-family: 'Overpass', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.15em;
    color: var(--khaki-dust);
    margin-top: 6px;
    text-transform: uppercase;
}

/* --- Status Indicators --- */
.indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.4);
    box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3);
}

.indicator-small {
    width: 8px;
    height: 8px;
}

.indicator-green {
    background: radial-gradient(circle at 40% 40%, #6aba5a, var(--signal-green));
    box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 6px rgba(74,122,58,0.5);
    animation: glow-green 2s ease-in-out infinite;
}

.indicator-amber {
    background: radial-gradient(circle at 40% 40%, #e8b830, var(--alert-amber));
    box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 6px rgba(212,160,32,0.5);
    animation: glow-amber 3s ease-in-out infinite;
}

.indicator-red {
    background: radial-gradient(circle at 40% 40%, #e05040, #a03020);
    box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 4px rgba(180,50,30,0.3);
}

@keyframes glow-green {
    0%, 100% { box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 6px rgba(74,122,58,0.5); }
    50% { box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 12px rgba(74,122,58,0.8); }
}

@keyframes glow-amber {
    0%, 100% { box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 6px rgba(212,160,32,0.5); }
    50% { box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 12px rgba(212,160,32,0.8); }
}

/* --- Toggle Panel --- */
.module-toggles {
    grid-column: 1 / -1;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 6px 0;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.toggle-label {
    font-family: 'Overpass', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--khaki-dust);
    text-transform: uppercase;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    display: block;
    width: 44px;
    height: 22px;
    background: linear-gradient(180deg, #1a1208 0%, #2d1e14 100%);
    border-radius: 11px;
    border: 1px solid rgba(139,109,79,0.4);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(160,128,80,0.1);
    position: relative;
    transition: background 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b0986a 0%, var(--burnished-brass) 50%, #7a6040 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-track {
    background: linear-gradient(180deg, #2a3a1a 0%, #1a2a10 100%);
    border-color: rgba(74,122,58,0.5);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
    transform: translateX(22px);
}

/* --- Timer Module --- */
.module-timer {
    grid-column: 1 / -1;
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--smoked-acrylic);
    border-radius: 3px;
    padding: 16px 20px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.6), inset 0 0 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(26,18,8,0.8);
}

.timer-group {
    text-align: center;
}

.timer-label {
    font-family: 'Overpass', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--deactivated-gray);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.timer-colon {
    font-family: 'Share Tech Mono', monospace;
    font-size: 32px;
    color: var(--amber-phosphor);
    text-shadow: 0 0 8px var(--amber-phosphor);
    padding: 0 2px;
    align-self: flex-end;
    margin-bottom: 4px;
}

.seven-seg-group {
    display: flex;
    gap: 3px;
}

/* Seven Segment Display */
.seven-seg {
    position: relative;
    width: 24px;
    height: 40px;
}

.seven-seg .seg {
    position: absolute;
    background: var(--amber-phosphor);
    box-shadow: 0 0 4px var(--amber-phosphor), 0 0 8px rgba(224,122,58,0.3);
    transition: opacity 0.15s ease;
}

.seven-seg .seg.off {
    background: rgba(61,43,31,0.5);
    box-shadow: none;
    opacity: 0.15;
}

/* Horizontal segments */
.seven-seg .seg-a, .seven-seg .seg-d, .seven-seg .seg-g {
    width: 16px;
    height: 3px;
    left: 4px;
    border-radius: 1px;
}
.seven-seg .seg-a { top: 0; }
.seven-seg .seg-g { top: 18px; }
.seven-seg .seg-d { top: 37px; }

/* Vertical segments */
.seven-seg .seg-b, .seven-seg .seg-c, .seven-seg .seg-e, .seven-seg .seg-f {
    width: 3px;
    height: 16px;
    border-radius: 1px;
}
.seven-seg .seg-f { top: 2px; left: 1px; }
.seven-seg .seg-b { top: 2px; right: 1px; left: auto; }
.seven-seg .seg-e { top: 20px; left: 1px; }
.seven-seg .seg-c { top: 20px; right: 1px; left: auto; }

.timer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.meta-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--deactivated-gray);
}

/* --- Chart Modules --- */
.module-chart {
    grid-column: 1 / 7;
}

.module-chart-2 {
    grid-column: 7 / -1;
}

.chart-screen {
    background: var(--smoked-acrylic);
    border-radius: 3px;
    padding: 8px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.6), inset 0 0 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(26,18,8,0.8);
    position: relative;
}

.strip-chart {
    width: 100%;
    height: 160px;
    display: block;
    filter: drop-shadow(0 0 3px var(--amber-phosphor));
}

#strip-chart-2 .strip-chart,
.module-chart-2 .strip-chart {
    filter: drop-shadow(0 0 3px var(--signal-green));
}

.chart-readout {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 4px 0;
}

.readout-label {
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--deactivated-gray);
}

.readout-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--amber-phosphor);
    text-shadow: 0 0 6px rgba(224,122,58,0.4);
}

/* --- Card Flip Modules --- */
.module-flip {
    grid-column: 1 / 5;
}

.module-flip-2 {
    grid-column: 5 / 9;
}

.module-flip-3 {
    grid-column: 9 / -1;
}

.flip-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.flip-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.flip-switch {
    display: block;
    width: 32px;
    height: 18px;
    background: linear-gradient(180deg, #1a1208 0%, #2d1e14 100%);
    border-radius: 9px;
    border: 1px solid rgba(139,109,79,0.4);
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.5);
    position: relative;
}

.flip-switch-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b0986a 0%, var(--burnished-brass) 50%, #7a6040 100%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}

.flip-checkbox:checked ~ .flip-switch .flip-switch-handle {
    transform: translateX(14px);
}

.flip-switch-label {
    font-family: 'Overpass', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--deactivated-gray);
}

.card-container {
    perspective: 1200px;
    min-height: 220px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

.flip-checkbox:checked ~ .flip-switch ~ .flip-switch-label {
    color: var(--terracotta);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 2px;
}

.card-front {
    background: linear-gradient(135deg, #4a3828 0%, #3a2818 100%);
    border: 1px solid rgba(139,109,79,0.2);
}

.card-back {
    background: linear-gradient(135deg, #4a4030 0%, #3a3020 100%);
    border: 1px solid rgba(139,109,79,0.2);
    transform: rotateY(180deg);
}

/* JS controls flip via class */
.card-inner.flipped {
    transform: rotateY(180deg) translateZ(-20px);
}

/* --- Instrument Panel (Card Front) --- */
.instrument-panel {
    padding: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Dial Cluster */
.dial-cluster {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.dial {
    text-align: center;
}

.dial-face {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #2a2015 0%, var(--smoked-acrylic) 100%);
    border: 2px solid var(--burnished-brass);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6), 0 1px 0 rgba(160,128,80,0.2);
    position: relative;
}

.dial-tick {
    position: absolute;
    width: 1px;
    height: 8px;
    background: var(--khaki-dust);
    top: 4px;
    left: 50%;
    transform-origin: 0 36px;
    transform: translateX(-0.5px) rotate(var(--rotation));
    opacity: 0.6;
}

.dial-needle {
    position: absolute;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, var(--terracotta), #e05040);
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-1px) rotate(0deg);
    transition: transform 0.5s ease;
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(192,96,48,0.5);
}

.dial-label {
    font-family: 'Overpass', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--khaki-dust);
    margin-top: 6px;
    text-transform: uppercase;
}

/* Indicator Row */
.indicator-row {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.lamp-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.lamp {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.4);
}

.lamp-green {
    background: radial-gradient(circle at 40% 40%, #6aba5a, var(--signal-green));
    box-shadow: 0 0 6px rgba(74,122,58,0.6);
}

.lamp-amber {
    background: radial-gradient(circle at 40% 40%, #e8b830, var(--alert-amber));
    box-shadow: 0 0 6px rgba(212,160,32,0.6);
}

.lamp-red {
    background: radial-gradient(circle at 40% 40%, #e05040, #a03020);
    box-shadow: 0 0 4px rgba(180,50,30,0.4);
}

.lamp-label {
    font-family: 'Overpass', sans-serif;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--deactivated-gray);
}

/* Signal Readout */
.signal-readout {
    background: var(--smoked-acrylic);
    padding: 6px 12px;
    border-radius: 2px;
    text-align: center;
    border: 1px solid rgba(26,18,8,0.8);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.5);
}

.readout-mono {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--amber-phosphor);
    text-shadow: 0 0 6px rgba(224,122,58,0.4);
}

/* Bar Meter Group */
.bar-meter-group {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: flex-end;
    height: 120px;
    padding: 8px;
    background: var(--smoked-acrylic);
    border-radius: 2px;
    border: 1px solid rgba(26,18,8,0.8);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.5);
}

.bar-meter {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
    height: 100%;
    position: relative;
}

.bar-meter-fill {
    width: 14px;
    position: absolute;
    bottom: 16px;
    background: linear-gradient(to top, var(--signal-green), var(--alert-amber), var(--terracotta));
    border-radius: 1px;
    transition: height 0.3s ease;
    height: 20%;
    box-shadow: 0 0 4px rgba(74,122,58,0.3);
}

.bar-meter-label {
    position: absolute;
    bottom: 0;
    font-family: 'Overpass', sans-serif;
    font-size: 7px;
    font-weight: 600;
    color: var(--deactivated-gray);
    letter-spacing: 0.05em;
}

/* Coordinate Display */
.coordinate-display {
    background: var(--smoked-acrylic);
    padding: 12px;
    border-radius: 2px;
    border: 1px solid rgba(26,18,8,0.8);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.5);
}

.coord-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(139,109,79,0.1);
}

.coord-row:last-child {
    border-bottom: none;
}

.coord-label {
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--deactivated-gray);
    min-width: 36px;
}

.coord-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--amber-phosphor);
    text-shadow: 0 0 6px rgba(224,122,58,0.4);
}

/* --- Maintenance Panel (Card Back) --- */
.maintenance-panel {
    padding: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wiring-diagram {
    flex: 1;
}

.wiring-svg {
    width: 100%;
    height: auto;
}

.calibration-notes {
    border-top: 1px dashed rgba(139,109,79,0.3);
    padding-top: 8px;
}

.handwritten {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 11px;
    color: var(--khaki-dust);
    opacity: 0.8;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

/* --- Log Module --- */
.module-log {
    grid-column: 1 / -1;
}

.log-paper {
    background: #E8DFC4;
    border-radius: 2px;
    padding: 8px 24px;
    position: relative;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.15);
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--burnished-brass) #E8DFC4;
}

.paper-perforation {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    background: repeating-radial-gradient(circle, transparent 0, transparent 3px, #E8DFC4 3px, #E8DFC4 5px);
    background-size: 12px 12px;
}

.paper-perforation-left {
    left: 0;
    border-right: 1px dashed rgba(139,109,79,0.2);
}

.paper-perforation-right {
    right: 0;
    border-left: 1px dashed rgba(139,109,79,0.2);
}

.log-content {
    position: relative;
}

.log-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.05em;
    line-height: 2;
    color: var(--deep-walnut);
    border-bottom: 1px solid transparent;
}

.log-line:nth-child(odd) {
    background: #F0E8D0;
}

.log-line:nth-child(even) {
    background: transparent;
}

.log-timestamp {
    color: var(--deactivated-gray);
    margin-right: 12px;
}

.log-text {
    color: var(--deep-walnut);
}

.log-line.warning .log-text {
    color: var(--terracotta);
}

/* --- Footer --- */
.module-footer {
    grid-column: 1 / -1;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--deactivated-gray);
}

/* --- Coffee Stain Decorations --- */
.coffee-stain {
    position: fixed;
    pointer-events: none;
    z-index: 2;
}

.stain-1 {
    top: 15%;
    right: 5%;
}

.stain-2 {
    bottom: 25%;
    left: 3%;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .module-chart,
    .module-chart-2 {
        grid-column: 1 / -1;
    }

    .module-flip,
    .module-flip-2,
    .module-flip-3 {
        grid-column: 1 / -1;
    }

    .card-container {
        min-height: 240px;
    }

    .card-inner {
        min-height: 240px;
    }
}

@media (max-width: 600px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 6px;
    }

    .module-header,
    .module-toggles,
    .module-timer,
    .module-chart,
    .module-chart-2,
    .module-flip,
    .module-flip-2,
    .module-flip-3,
    .module-log,
    .module-footer {
        grid-column: 1 / -1;
    }

    .toggle-row {
        gap: 12px;
    }

    .mission-title h1 {
        font-size: 28px;
    }

    .timer-colon {
        font-size: 20px;
    }

    .seven-seg {
        width: 16px;
        height: 28px;
    }

    .seven-seg .seg-a, .seven-seg .seg-d, .seven-seg .seg-g {
        width: 10px;
        height: 2px;
        left: 3px;
    }
    .seven-seg .seg-g { top: 12px; }
    .seven-seg .seg-d { top: 25px; }

    .seven-seg .seg-b, .seven-seg .seg-c, .seven-seg .seg-e, .seven-seg .seg-f {
        width: 2px;
        height: 10px;
    }
    .seven-seg .seg-e { top: 14px; }
    .seven-seg .seg-c { top: 14px; }

    .header-content {
        flex-direction: column;
        gap: 8px;
    }

    .status-indicators-left,
    .status-indicators-right {
        flex-direction: row;
    }
}

/* --- CRT Scanline Effect (subtle) --- */
.chart-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
    border-radius: 3px;
}

/* --- Noise Texture Overlay --- */
.module-bezel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    pointer-events: none;
    border-radius: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}