/* ============================================
   political.bar — Retro-Futuristic Observatory
   ============================================ */

/* Colors from DESIGN.md:
   #f0e6d0 - parchment/cream (primary text on dark)
   #7acea2 - green accent
   #a65d3f - copper/terracotta
   #1c1f22 - near-black (primary bg)
   #1a2a2e - dark teal
   #c9a96e - gold accent
   #d4cabb - warm gray
   #e8e0d4 - light parchment
*/

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1c1f22;
    color: #f0e6d0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
}

/* HUD Frame */
#hud-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#hud-top-bar, #hud-bottom-bar {
    position: absolute;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 8px 20px;
    background: rgba(28, 31, 34, 0.85);
    border-bottom: 1px solid rgba(122, 206, 162, 0.2);
}

#hud-top-bar { top: 0; }
#hud-bottom-bar {
    bottom: 0;
    top: auto;
    border-bottom: none;
    border-top: 1px solid rgba(122, 206, 162, 0.2);
}

.hud-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #7acea2;
    text-transform: uppercase;
}

.hud-status {
    animation: statusPulse 3s ease-in-out infinite;
}

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

/* Observatory */
#observatory {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#observatory.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#observatory-title {
    position: relative;
    z-index: 2;
    text-align: center;
}

#observatory-title h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 8rem);
    letter-spacing: 0.06em;
    line-height: 1.05;
    color: #f0e6d0;
    text-transform: uppercase;
}

#observatory-title h1 .accent {
    color: #7acea2;
}

#observatory-title .subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    letter-spacing: 0.3em;
    color: #c9a96e;
    margin-top: 12px;
    text-transform: uppercase;
}

#observatory-title .tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    color: #d4cabb;
    margin-top: 8px;
    letter-spacing: 0.02em;
}

#enter-btn {
    margin-top: 40px;
    padding: 14px 48px;
    background: transparent;
    border: 1px solid #7acea2;
    color: #7acea2;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    pointer-events: auto;
}

#enter-btn:hover {
    background: rgba(122, 206, 162, 0.1);
    box-shadow: 0 0 30px rgba(122, 206, 162, 0.15);
}

/* Terminal */
#terminal {
    position: fixed;
    top: 32px;
    left: 0;
    width: 100%;
    height: calc(100% - 64px);
    z-index: 50;
    transition: opacity 0.6s ease;
}

#terminal.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Column System */
#columns {
    display: flex;
    width: 100%;
    height: 100%;
}

.column {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 0 0 60px;
    overflow: hidden;
    border-right: 1px solid rgba(122, 206, 162, 0.12);
    cursor: pointer;
}

.column.expanded {
    flex: 1 1 auto;
    cursor: default;
}

.column-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(26, 42, 46, 0.8);
    border-bottom: 1px solid rgba(122, 206, 162, 0.2);
    min-height: 48px;
}

.column-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #7acea2;
    text-transform: uppercase;
    white-space: nowrap;
}

.column:not(.expanded) .column-label {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: rotate(180deg) translateX(50%) translateY(50%);
}

.column:not(.expanded) .column-tab {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.column:not(.expanded) .column-index {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.column-index {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(201, 169, 110, 0.6);
    letter-spacing: 0.1em;
}

.column-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
    background: rgba(28, 31, 34, 0.95);
}

.column:not(.expanded) .column-content {
    display: none;
}

.column.expanded .column-content {
    opacity: 1;
}

/* Scrollbar styling */
.column-content::-webkit-scrollbar {
    width: 4px;
}
.column-content::-webkit-scrollbar-track {
    background: rgba(26, 42, 46, 0.3);
}
.column-content::-webkit-scrollbar-thumb {
    background: rgba(122, 206, 162, 0.3);
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.2);
}

.panel-header h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.02em;
    color: #f0e6d0;
}

.data-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #c9a96e;
    text-transform: uppercase;
    padding: 4px 8px;
    border: 1px solid rgba(201, 169, 110, 0.3);
}

/* Section Viz Canvases */
.section-viz {
    width: 100%;
    height: 120px;
    margin-bottom: 16px;
    opacity: 0.7;
}

/* Data Blocks */
.data-block {
    margin-bottom: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(240, 230, 208, 0.06);
}

.data-key {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #d4cabb;
}

.data-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #7acea2;
    letter-spacing: 0.05em;
}

/* Briefing Items */
.briefing-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.briefing-item {
    display: flex;
    gap: 16px;
    padding: 12px 8px;
    border-left: 2px solid rgba(122, 206, 162, 0.2);
    transition: border-color 0.3s, background 0.3s;
}

.briefing-item:hover {
    border-left-color: #7acea2;
    background: rgba(122, 206, 162, 0.03);
}

.item-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #c9a96e;
    min-width: 40px;
    flex-shrink: 0;
}

.item-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #e8e0d4;
    line-height: 1.5;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.analysis-card {
    padding: 16px;
    background: rgba(26, 42, 46, 0.5);
    border: 1px solid rgba(122, 206, 162, 0.1);
}

.analysis-card h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #d4cabb;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.meter {
    height: 4px;
    background: rgba(240, 230, 208, 0.1);
    margin-bottom: 8px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: #7acea2;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.meter-fill.opposition { background: #a65d3f; }
.meter-fill.swing { background: #c9a96e; }
.meter-fill.sentiment { background: #7acea2; }

.meter-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #7acea2;
    letter-spacing: 0.05em;
}

/* Dossier List */
.dossier-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dossier-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(26, 42, 46, 0.3);
    border: 1px solid rgba(122, 206, 162, 0.08);
    transition: border-color 0.3s;
}

.dossier-entry:hover {
    border-color: rgba(122, 206, 162, 0.3);
}

.dossier-classification {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #c9a96e;
    padding: 3px 8px;
    border: 1px solid rgba(201, 169, 110, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.dossier-info h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 15px;
    color: #f0e6d0;
    margin-bottom: 4px;
}

.dossier-info p {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #d4cabb;
    line-height: 1.5;
}

.dossier-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dossier-status.active {
    color: #7acea2;
    border: 1px solid rgba(122, 206, 162, 0.4);
}
.dossier-status.monitoring {
    color: #c9a96e;
    border: 1px solid rgba(201, 169, 110, 0.4);
}
.dossier-status.archived {
    color: #a65d3f;
    border: 1px solid rgba(166, 93, 63, 0.4);
}

/* Signal Feed */
.signal-feed {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.signal-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 8px;
    border-left: 2px solid rgba(201, 169, 110, 0.15);
    transition: all 0.3s ease;
}

.signal-item:hover {
    border-left-color: #c9a96e;
    background: rgba(201, 169, 110, 0.03);
}

.signal-item:first-child {
    border-left-color: #7acea2;
    animation: signalNew 2s ease-in-out infinite;
}

@keyframes signalNew {
    0%, 100% { background: rgba(122, 206, 162, 0.04); }
    50% { background: rgba(122, 206, 162, 0.08); }
}

.signal-source {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #1c1f22;
    background: #c9a96e;
    padding: 2px 6px;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.signal-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #e8e0d4;
    line-height: 1.4;
    flex: 1;
}

.signal-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(212, 202, 187, 0.5);
    flex-shrink: 0;
    min-width: 30px;
    text-align: right;
}

/* Scanline Overlay */
#scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* Responsive */
@media (max-width: 768px) {
    .column {
        flex: 0 0 40px;
    }
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    .dossier-entry {
        flex-direction: column;
    }
}
