:root {
    --bg-primary: #1a1a1e;
    --bg-deep: #111114;
    --paper-white: #e8e4dc;
    --carbon-gray: #b0aaa0;
    --dispatch-red: #c4392d;
    --boundary: #4a4a4a;
    --fluorescent: #d4cfb8;
    --manila: #3d3520;
    --contour: #2a2a2e;
    --inactive: #6b6560;
}

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

body {
    background: var(--bg-primary);
    color: var(--carbon-gray);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Contour Background */
#contour-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.contour {
    fill: none;
    stroke: var(--contour);
    stroke-width: 0.5;
    opacity: 0.06;
}

/* Sections */
.section {
    position: relative;
    z-index: 1;
    padding: 80px;
}

.deep-bg {
    background: var(--bg-deep);
}

/* Dispatch Header */
#dispatch-header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 15vh;
}

.manila-tab {
    background: var(--manila);
    display: inline-block;
    padding: 12px 32px 16px;
    clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
    margin-left: 12%;
    margin-bottom: 0;
}

.domain-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.08em;
    color: var(--paper-white);
    text-transform: uppercase;
}

.desk-edge {
    width: 100%;
    height: 1px;
    background: var(--boundary);
    margin-top: 40vh;
}

.dispatch-terminal {
    margin-top: 24px;
    margin-left: 8%;
}

.dispatch-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dispatch-red);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--dispatch-red);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Boundary Lines */
.boundary-line {
    position: relative;
    z-index: 2;
}

.boundary-line.horizontal {
    width: 100%;
    height: 2px;
    border-top: 2px dashed var(--boundary);
}

.boundary-line.vertical {
    width: 2px;
    min-height: 100%;
    border-left: 2px dashed var(--boundary);
}

/* Precinct Map */
#precinct-map {
    padding: 60px 40px;
}

.precinct-grid {
    display: grid;
    grid-template-columns: 68% 2px 1fr;
    min-height: 180vh;
}

.main-column {
    padding: 40px;
}

/* Evidence Blocks */
.evidence-block {
    position: relative;
    padding: 24px 24px 24px 32px;
    margin-bottom: 40px;
    border: 1px solid transparent;
}

.evidence-pin {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dispatch-red);
    transition: box-shadow 0.3s ease;
}

.evidence-pin::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 16px;
    height: 1px;
    background: var(--dispatch-red);
    opacity: 0.4;
}

.evidence-block:hover .evidence-pin {
    box-shadow: 0 0 4px rgba(196, 57, 45, 0.4);
}

.case-header {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.08em;
    color: var(--paper-white);
    margin-bottom: 16px;
}

.report-text {
    color: var(--carbon-gray);
    margin-bottom: 12px;
    text-shadow: 0.5px 0.5px 0px rgba(176, 170, 160, 0.15);
}

.small-text {
    font-size: 0.85rem;
}

/* Evidence Sidebar */
.evidence-sidebar {
    padding: 40px 20px;
    overflow-y: auto;
    max-height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--inactive);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--boundary);
}

.log-entry {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--inactive);
    line-height: 2;
    white-space: nowrap;
}

.log-entry.alert {
    color: var(--dispatch-red);
}

/* Boundary Zone / Corridor */
#boundary-zone {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corridor {
    max-width: 100%;
    transition: max-width 0.8s ease;
    margin: 0 auto;
    padding: 40px;
}

.corridor.narrow {
    max-width: 50%;
}

/* Evidence Floor */
#evidence-floor {
    padding: 60px 40px;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    max-width: 900px;
    margin: 0 auto 60px;
}

.grid-cell {
    width: 100%;
    padding: 20px 12px;
    border: 1px solid #333338;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--inactive);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.grid-cell:hover {
    color: var(--paper-white);
    border-color: var(--dispatch-red);
}

.end-file {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--inactive);
    margin-left: 8%;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 40px 20px;
    }

    .precinct-grid {
        grid-template-columns: 1fr;
    }

    .boundary-line.vertical {
        display: none;
    }

    .evidence-sidebar {
        position: static;
        max-height: none;
        border-top: 2px dashed var(--boundary);
        padding-top: 20px;
    }

    .evidence-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .corridor.narrow {
        max-width: 90%;
    }

    .manila-tab {
        margin-left: 5%;
    }
}
