/* =========================================================
   diplomatic.wiki — holographic command center
   Palette: Navy-Metallic (Abyssal #0a0e1c → Holographic Teal #4fd1c5)
   Fonts:   Roboto Slab (display) · IBM Plex Sans (body) · Space Mono (data)
   Compliance lexicon from DESIGN.md: IBM Plex Sans" (400 (Google Fonts; Roboto Slab" (400 (Google Fonts; Space Mono" (400 (Google Fonts; Interactions* Interactions:* Interactions:** IntersectionObserver` navy-to-steel military/institutional authority without falling into overused corporate aesthetic (57%
   ========================================================= */

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

:root {
    --abyssal-navy: #0a0e1c;
    --midnight-steel: #121a2e;
    --gunmetal-depth: #1a2540;
    --steel-edge: #263350;
    --diplomatic-silver: #b8c6d4;
    --muted-slate: #5a6b7d;
    --frost-white: #e8edf4;
    --holo-teal: #4fd1c5;
    --prismatic-violet: #7c6fef;
    --credential-gold: #c9a84c;
    --dispatch-red: #e05252;
    --deep-navy: #0f1525;

    --bar-height: 56px;
    --footer-height: 80px;
    --holo-gradient: linear-gradient(135deg,
        #4fd1c5 0%,
        #7c6fef 40%,
        #c9a84c 70%,
        #4fd1c5 100%);
}

html, body {
    background: var(--abyssal-navy);
    color: var(--diplomatic-silver);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    font-size: clamp(0.875rem, 1.2vw, 1.05rem);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    position: relative;
}

/* ---------- Grid overlay (military coordinate grid) ---------- */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        repeating-linear-gradient(0deg,
            transparent, transparent 79px,
            rgba(38, 51, 80, 0.3) 79px, rgba(38, 51, 80, 0.3) 80px),
        repeating-linear-gradient(90deg,
            transparent, transparent 79px,
            rgba(38, 51, 80, 0.3) 79px, rgba(38, 51, 80, 0.3) 80px);
}

/* ---------- Holographic shimmer keyframes ---------- */
@keyframes holographic-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes skeleton-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.6); opacity: 0.55; }
}

@keyframes contour-flow {
    0%   { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -120; }
}

@keyframes sweep-travel {
    0%   { transform: translateY(-120px); opacity: 0; }
    40%  { opacity: 1; }
    100% { transform: translateY(140px); opacity: 0; }
}

@keyframes fade-rise {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---------- Command Bar ---------- */
.command-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--bar-height);
    background: rgba(10, 14, 28, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--steel-edge);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 50;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    position: relative;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--frost-white);
    font-size: 0.82rem;
}

.mark-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background: var(--gunmetal-depth);
    color: var(--holo-teal);
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
}

.mark-text {
    display: inline-flex;
    align-items: baseline;
}

.mark-dot {
    color: var(--holo-teal);
    margin: 0 1px;
}

.command-meta {
    display: flex;
    align-items: center;
    gap: 28px;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--muted-slate);
    text-transform: uppercase;
}

.classification {
    color: var(--credential-gold);
}

.station {
    color: var(--diplomatic-silver);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--holo-teal);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--holo-teal);
    box-shadow: 0 0 8px rgba(79, 209, 197, 0.7);
    animation: pulse-dot 2.4s ease-in-out infinite;
}

/* ---------- Holographic border utility ---------- */
.holo-border {
    position: relative;
    isolation: isolate;
}

.holo-border::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--holo-gradient);
    background-size: 300% 100%;
    animation: holographic-shift 6s ease infinite;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

.holo-border:hover::before {
    padding: 2px;
    animation-duration: 2s;
}

/* ---------- Strategic Map (Hero) ---------- */
.strategic-map {
    position: relative;
    margin-top: var(--bar-height);
    height: calc(100vh - var(--bar-height));
    min-height: 640px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    overflow: hidden;
    background: var(--abyssal-navy);
    z-index: 2;
}

.mountain-panorama {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    grid-area: 1 / 1 / 3 / 3;
    z-index: 1;
}

.mountain-panorama .contour-lines path {
    animation: contour-flow 8s linear infinite;
}

.mountain-panorama .holo-sweep {
    transform-origin: center;
    animation: sweep-travel 5.5s ease-in-out infinite;
}

.mountain-panorama .stars circle {
    opacity: 0.15;
}

.strategic-content {
    grid-area: 2 / 1 / 3 / 2;
    align-self: end;
    padding: 40px 56px;
    z-index: 3;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 720px;
    animation: fade-rise 900ms 400ms both ease-out;
}

.breadcrumb-coords {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Mono', monospace;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    color: var(--holo-teal);
    text-transform: uppercase;
}

.breadcrumb-coords .sep {
    color: var(--muted-slate);
}

.hero-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--frost-white);
}

.hero-title .title-line {
    display: block;
}

.hero-title em {
    font-style: normal;
    font-weight: 400;
    background: var(--holo-gradient);
    background-size: 300% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    animation: holographic-shift 8s ease infinite;
}

.hero-summary {
    max-width: 520px;
    color: var(--diplomatic-silver);
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--steel-edge);
}

.meta-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 110px;
}

.meta-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--muted-slate);
    text-transform: uppercase;
}

.meta-value {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    color: var(--frost-white);
}

.map-hud {
    grid-area: 1 / 2 / 2 / 3;
    justify-self: end;
    align-self: start;
    padding: 40px 56px;
    z-index: 3;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fade-rise 900ms 600ms both ease-out;
}

.hud-block {
    min-width: 200px;
    padding: 14px 18px;
    background: rgba(18, 26, 46, 0.7);
    border: 1px solid var(--steel-edge);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    backdrop-filter: blur(6px);
}

.hud-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--muted-slate);
    text-transform: uppercase;
}

.hud-value {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: var(--frost-white);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

.hud-sparkline {
    width: 80px;
    height: 24px;
}

/* ---------- Intelligence Grid ---------- */
.intelligence-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--steel-edge);
    border-top: 2px solid var(--steel-edge);
    border-bottom: 2px solid var(--steel-edge);
}

.intel-panel {
    position: relative;
    min-height: 45vh;
    background: var(--midnight-steel);
    overflow: hidden;
    transition: background 300ms ease, box-shadow 300ms ease;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
}

.intel-panel:hover {
    background: var(--gunmetal-depth);
    box-shadow: 0 0 30px rgba(79, 209, 197, 0.08), inset 0 0 0 1px var(--holo-teal);
}

.panel-skeleton {
    position: absolute;
    inset: 0;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 1;
    transition: opacity 400ms ease;
    pointer-events: none;
    z-index: 2;
}

.intel-panel.panel-ready .panel-skeleton {
    opacity: 0;
}

.skel-block {
    background: linear-gradient(90deg,
        var(--midnight-steel) 25%,
        var(--gunmetal-depth) 50%,
        var(--midnight-steel) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s linear infinite;
    border-radius: 2px;
}

.skel-title { height: 24px; width: 55%; }
.skel-line { height: 12px; width: 100%; }
.skel-line.short { width: 72%; }
.skel-chart { height: 90px; width: 100%; margin-top: 12px; }
.skel-bars { height: 90px; width: 100%; margin-top: 12px; }
.skel-ring { height: 120px; width: 120px; border-radius: 50%; margin-top: 12px; align-self: center; }

.panel-body {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 400ms ease, transform 400ms ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.intel-panel.panel-ready .panel-body {
    opacity: 1;
    transform: translateY(0);
}

.panel-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 2px;
    background: var(--abyssal-navy);
}

.panel-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--holo-teal);
    text-transform: uppercase;
}

.panel-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--frost-white);
    justify-self: center;
}

.panel-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--muted-slate);
    text-transform: uppercase;
}

.state-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--holo-teal);
    animation: pulse-dot 2.2s ease-in-out infinite;
}

.state-dot.dot-violet { background: var(--prismatic-violet); }
.state-dot.dot-gold { background: var(--credential-gold); }

.panel-description {
    color: var(--diplomatic-silver);
    font-size: 0.92rem;
    line-height: 1.55;
}

.panel-chart {
    width: 100%;
    height: 90px;
    margin-top: 4px;
}

.panel-chart.bars rect {
    transition: fill 300ms ease;
}

.intel-panel:hover .panel-chart.bars rect {
    fill: var(--holo-teal);
}

.ring-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0;
}

.ring-chart {
    width: 130px;
    height: 130px;
}

.ring-progress {
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-meta-list {
    list-style: none;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--steel-edge);
}

.panel-meta-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mkey { color: var(--muted-slate); }
.mval { color: var(--frost-white); }
.mval.up { color: var(--holo-teal); }
.mval.down { color: var(--dispatch-red); }
.mval.warn { color: var(--credential-gold); }

/* ---------- Briefing Dossier ---------- */
.briefing-dossier {
    position: relative;
    z-index: 2;
    background: var(--abyssal-navy);
    border-bottom: 1px solid var(--steel-edge);
    padding: 48px 0 32px;
}

.dossier-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 0 56px 24px;
    flex-wrap: wrap;
}

.dossier-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--credential-gold);
    text-transform: uppercase;
}

.dossier-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--frost-white);
}

.dossier-meta {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--holo-teal);
    text-transform: uppercase;
}

.dossier-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-top: 1px solid var(--steel-edge);
    border-bottom: 1px solid var(--steel-edge);
}

.dossier-track::-webkit-scrollbar {
    height: 4px;
}
.dossier-track::-webkit-scrollbar-track {
    background: var(--steel-edge);
}
.dossier-track::-webkit-scrollbar-thumb {
    background: var(--holo-teal);
}

.dossier-page {
    flex: 0 0 100vw;
    min-width: 100vw;
    scroll-snap-align: start;
    padding: 48px 72px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(18, 26, 46, 0.4) 0%, rgba(10, 14, 28, 0.85) 100%);
}

.page-visual {
    position: relative;
    background: var(--midnight-steel);
    border: 1px solid var(--steel-edge);
    padding: 18px;
    aspect-ratio: 5 / 4;
    max-height: 440px;
}

.page-visual::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--holo-teal);
    box-shadow: 0 0 10px rgba(79, 209, 197, 0.8);
}

.viz-svg {
    width: 100%;
    height: 100%;
}

.page-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 560px;
}

.page-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--holo-teal);
    text-transform: uppercase;
}

.page-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--frost-white);
    line-height: 1.05;
}

.page-text p {
    color: var(--diplomatic-silver);
}

.page-coords {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--steel-edge);
    font-family: 'Space Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    color: var(--muted-slate);
    text-transform: uppercase;
}

.dossier-dots {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 28px 0 4px;
}

.dossier-dot {
    appearance: none;
    border: 1px solid var(--steel-edge);
    background: transparent;
    width: 40px;
    height: 14px;
    padding: 0;
    cursor: pointer;
    position: relative;
    isolation: isolate;
}

.dossier-dot span {
    position: absolute;
    inset: 2px;
    background: var(--midnight-steel);
    transition: background 300ms ease;
}

.dossier-dot.active {
    border: none;
    padding: 1px;
    background: var(--holo-gradient);
    background-size: 300% 100%;
    animation: holographic-shift 6s ease infinite;
}

.dossier-dot.active span {
    background: var(--abyssal-navy);
}

.dossier-dot:hover span {
    background: var(--gunmetal-depth);
}

/* ---------- Signal Footer ---------- */
.signal-footer {
    position: relative;
    z-index: 2;
    height: var(--footer-height);
    background: var(--abyssal-navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 0 28px;
}

.holo-line {
    height: 1px;
    background: var(--holo-gradient);
    background-size: 300% 100%;
    animation: holographic-shift 6s ease infinite;
    opacity: 0.9;
}

.footer-mono {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--muted-slate);
    text-transform: uppercase;
    flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .command-bar {
        padding: 0 18px;
    }
    .command-meta {
        gap: 18px;
    }
    .command-meta .station {
        display: none;
    }
    .strategic-content {
        padding: 28px 32px;
        max-width: 100%;
    }
    .map-hud {
        padding: 28px 32px;
    }
    .intelligence-grid {
        grid-template-columns: 1fr;
    }
    .intel-panel {
        min-height: auto;
    }
    .dossier-page {
        grid-template-columns: 1fr;
        padding: 36px 40px;
        gap: 28px;
    }
    .page-visual {
        max-height: 320px;
    }
}

@media (max-width: 640px) {
    .strategic-map {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: 560px;
    }
    .map-hud {
        grid-area: 1 / 1 / 2 / 2;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px 24px;
        gap: 10px;
    }
    .hud-block { min-width: 140px; flex: 1; }
    .strategic-content {
        grid-area: 2 / 1 / 3 / 2;
        padding: 24px;
    }
    .hero-meta { gap: 16px; }
    .meta-block { min-width: 90px; }
    .command-meta .classification { display: none; }
    .dossier-head { padding: 0 24px 20px; }
    .dossier-page { padding: 28px 24px; }
    .footer-mono { font-size: 0.66rem; }
}
