/**
 * DEFCON Level, Maps & Specialty Pages
 * Conflict map interactive components, cyber threat map page, weather maps page, share page additions, and system announcement banner.
 *
 * Part of the Defcon site CSS (builds on engine base theme).
 * Load order managed by config/site.php → site_css array.
 */

/* ================================================================
   COMMANDS PAGE - Map Visualization
   ================================================================ */

.command-map-container {
    margin: var(--space-6) 0;
    text-align: center;
}

.command-map-container a {
    display: block;
    transition: opacity 0.3s ease;
}

.command-map-container a:hover {
    opacity: 0.9;
}

.command-map-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.command-map-caption {
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .command-map-container {
        margin: var(--space-4) 0;
    }

    .command-map-img {
        border-radius: 6px;
    }
}

/* ================================================================
   HISTORY PAGE - Related Pages Navigation & Cross Links
   ================================================================ */

/* Page Header Enhancements */
.page-header__eyebrow {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.page-header__actions {
    margin-top: var(--space-4);
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* Related Pages Navigation (Top) */
.related-pages-nav {
    margin: var(--space-6) 0;
    padding: var(--space-5);
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.related-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}

.related-page-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border: 1px solid var(--border-subtle);
}

.related-page-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: rgba(14, 165, 233, 0.06);
}

.related-page-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.related-page-content {
    flex: 1;
    min-width: 0;
}

.related-page-content h3 {
    margin: 0 0 2px 0;
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.3;
}

.related-page-content p {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.4;
}

.related-page-arrow {
    color: var(--accent-primary);
    font-size: var(--text-lg);
    flex-shrink: 0;
}

/* Cross Link Section (Bottom) */
.cross-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.cross-link-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.cross-link-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  background: rgba(14, 165, 233, 0.06);
}

.cross-link-icon {
    font-size: 3rem;
    margin-bottom: var(--space-3);
}

.cross-link-card h3 {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--text-lg);
    font-weight: 700;
}

.cross-link-card p {
    margin: 0 0 var(--space-3) 0;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.cross-link-cta {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .related-pages-grid {
        grid-template-columns: 1fr;
    }

    .page-header__actions {
        flex-direction: column;
        width: 100%;
    }

    .page-header__actions .btn {
        width: 100%;
    }

    .cross-link-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   LEVELS PAGE - Detailed Explanation Cards
   ================================================================ */

.levels-explanation {
    display: grid;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.level-explanation-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-5);
    border-left: 4px solid var(--accent-primary);
    transition: all 0.2s ease;
}

.level-explanation-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: rgba(14, 165, 233, 0.06);
}

.level-explanation-item h3 {
    margin: 0 0 var(--space-2) 0;
    color: var(--accent-primary);
    font-size: var(--text-lg);
    font-weight: 700;
}

.level-explanation-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .levels-explanation {
        gap: var(--space-4);
    }

    .level-explanation-item {
        padding: var(--space-4);
    }
}

/* ================================================================
   CONFLICT MAP - Interactive Components
   Styles for the Leaflet-powered conflict map page.
   Depends on CSS variables defined in :root above.
   ================================================================ */

/* --- Stats Bar --- */
.map-stats-bar {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: var(--space-4);
    border: 1px solid var(--border-subtle);
}

.map-stats-bar__item {
    text-align: center;
    min-width: 100px;
}

.map-stats-bar__number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.map-stats-bar__label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.map-stats-bar__item--expandable {
    cursor: pointer;
    transition: color 0.2s;
}

.map-stats-bar__item--expandable:hover .map-stats-bar__number {
    color: var(--accent-hover);
}

.map-stats-bar__expand-hint {
    font-size: 0.75em;
    opacity: 0.6;
    transition: transform 0.2s;
    display: inline-block;
}

.map-stats-bar__item--expandable.is-expanded .map-stats-bar__expand-hint {
    transform: rotate(180deg);
}

/* Type breakdown panel (slides down from stats bar) */
.map-type-breakdown {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-top: calc(-1 * var(--space-4));
    margin-bottom: var(--space-4);
    padding: var(--space-4) var(--space-5);
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
    to   { opacity: 1; max-height: 200px; }
}

.map-type-breakdown__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-3);
}

.map-type-breakdown__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: border-color 0.2s, background 0.2s;
}

.map-type-breakdown__item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
  background: rgba(14, 165, 233, 0.06);
}

.map-type-breakdown__icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.map-type-breakdown__count {
    font-weight: 700;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.map-type-breakdown__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Embedded Map (iframe) --- */
.map-embed {
    margin: var(--space-5) 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.map-embed__iframe {
    display: block;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    border: 0;
}

.map-embed__actions {
    display: flex;
    justify-content: flex-end;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
}

.map-embed__fullscreen {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    text-decoration: none;
    padding: var(--space-1) var(--space-3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.map-embed__fullscreen:hover {
    background: var(--bg-tertiary);
    text-decoration: none;
}

@media (max-width: 768px) {
    .map-embed__iframe {
        height: 50vh;
        min-height: 350px;
    }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE MAP-AS-BUTTON (S859, 2026-05-26)
   ════════════════════════════════════════════════════════════════
   At <=768px the embedded Leaflet iframe is unusable: tap targets
   under 44px, pan-vs-page-scroll conflict, popups clipped at viewport
   edges. Hide the iframe; the existing CTA card / wrapper anchor
   becomes a clean button -> /global-assets-map (dedicated full-screen
   map page with navbar visible + ads + mobile-tuned layout).

   Affects:
   - /current-level: .map-embed--clickable.map-preview-card wrapper
     (iframe hidden, anchor restyled as CTA button)
   - /global-conflict-map: #live-map.map-embed--interactive iframe
     hidden; the .map-embed-cta card just above it (already linking
     to /global-assets-map) gets prominence treatment

   Desktop and tablet (>=769px) untouched. User-decided 2026-05-26:
   tablets keep the inline preview since they have more screen room.
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .map-embed--clickable.map-preview-card .map-embed__iframe,
    .map-embed--clickable.map-preview-card .map-embed__badge {
        display: none;
    }

    .map-embed--clickable.map-preview-card {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 120px;
        padding: 24px 20px;
        background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(139, 92, 246, 0.12));
        border: 2px solid var(--accent-primary);
        border-radius: 12px;
        text-align: center;
    }

    .map-embed--clickable.map-preview-card .map-embed__overlay {
        position: static;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        opacity: 1;
        padding: 0;
    }

    .map-embed--clickable.map-preview-card .map-embed__overlay-text {
        background: none;
        border: none;
        padding: 0;
        color: var(--accent-primary);
        font-size: 1.05rem;
        font-weight: 700;
    }

    #live-map.map-embed--interactive {
        display: none;
    }

    .map-embed-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 20px 18px;
        border-width: 2px;
        border-color: var(--accent-primary);
        background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(139, 92, 246, 0.12));
    }

    .map-embed-cta__icon {
        font-size: 1.5rem;
        color: var(--accent-primary);
    }

    .map-embed-cta__text strong {
        font-size: 1.1rem;
        color: var(--accent-primary);
        display: block;
        margin-bottom: 4px;
    }

    .map-embed-cta__text span {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .map-embed-cta__arrow {
        align-self: flex-end;
        font-size: 1.25rem;
        color: var(--accent-primary);
    }
}

/* --- Map Embed Click-through --- */
.map-embed--clickable {
    display: block;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.map-embed--clickable .map-embed__iframe {
    pointer-events: none;
}

.map-embed__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.25s;
}

.map-embed--clickable:hover .map-embed__overlay {
    opacity: 1;
}

.map-embed__overlay-text {
    padding: 12px 28px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: 8px;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.map-embed__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    pointer-events: none;
    transition: opacity 0.25s;
}

.map-embed--clickable:hover .map-embed__badge {
    opacity: 0;
}

/* --- Map CTA Card --- */
.map-embed-cta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-4) 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
}

.map-embed-cta:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    text-decoration: none;
  background: rgba(14, 165, 233, 0.06);
}

.map-embed-cta__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--accent-primary);
    color: #fff;
    font-size: 1.2rem;
}

.map-embed-cta__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.map-embed-cta__text strong {
    font-size: var(--text-lg);
    color: var(--text-primary);
}

.map-embed-cta__text span {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.map-embed-cta__arrow {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: var(--accent-primary);
    transition: transform 0.2s;
}

.map-embed-cta:hover .map-embed-cta__arrow {
    transform: translateX(4px);
}

@media (max-width: 480px) {
    .map-embed-cta {
        padding: var(--space-3) var(--space-4);
        gap: var(--space-3);
    }
    .map-embed-cta__icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .map-embed-cta__text strong {
        font-size: var(--text-base);
    }
}

/* Full screen button (below interactive map) */
a.map-fullscreen-btn,
a.map-fullscreen-btn:visited,
a.map-fullscreen-btn:hover {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: var(--space-3) auto var(--space-5);
    padding: 14px 32px;
    background: var(--accent-primary);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, transform 0.1s;
    max-width: 400px;
}
a.map-fullscreen-btn:hover {
    background: #38bdf8;
    transform: translateY(-1px);
}
.map-fullscreen-btn__icon {
    font-size: 1.2rem;
}

/* --- Map Legend --- */
.map-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    font-size: var(--text-sm);
    text-align: center;
}
.map-legend__title,
.prose .map-legend__title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}
.map-legend__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    align-items: center;
}
.map-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.map-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.map-legend__dot--war    { background: #DC2626; }
.map-legend__dot--high   { background: #F97316; }
.map-legend__dot--medium { background: #EAB308; }
.map-legend__dot--low    { background: #3B82F6; }

/* --- Conflict Map page section spacing (scoped to map page) --- */
.prose .content-section,
.prose .conflict-list,
.prose #signals-intelligence,
.prose #cyber-operations {
    margin-top: 1.25rem;
    margin-bottom: 0;
}
.prose .content-section h2,
.prose .conflict-list h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.prose .content-section .content-prose,
.prose .conflict-list .content-prose {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* --- Conflict Cards (below map) --- */
.conflict-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}
.conflict-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    transition: border-color 0.2s;
}
.conflict-card:hover {
    border-color: var(--border-medium);
  background: rgba(14, 165, 233, 0.06);
}
.conflict-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-2);
}
.conflict-card__name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}
.conflict-card__intensity {
    font-size: var(--text-xs);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: capitalize;
}
.conflict-card__description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-2) 0;
    line-height: 1.5;
}
.conflict-card__meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.conflict-card__meta span + span::before {
    content: '·';
    margin: 0 0.4rem;
}

/* Conflict card, title (replaces __name for new layout) */
.conflict-card__title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}

/* Region tag under title */
.conflict-card__region {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Badge row */
.conflict-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: var(--space-2) 0;
}

/* Parties line (e.g. "Russia vs Ukraine") */
.conflict-card__parties {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin: var(--space-1) 0;
}

/* Description excerpt */
.conflict-card__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-2) 0;
    line-height: 1.5;
}

/* Collapsible details panel (parties + description + meta) */
.conflict-card__details {
    margin: var(--space-2) 0;
}
.conflict-card__details-toggle {
    cursor: pointer;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 4px 0;
    list-style: none;
    user-select: none;
}
.conflict-card__details-toggle::-webkit-details-marker { display: none; }
.conflict-card__details-toggle::after {
    content: ' \25BE';
    color: var(--text-muted);
    font-weight: normal;
}
.conflict-card__details[open] .conflict-card__details-toggle::after {
    content: ' \25B4';
}
.conflict-card__details-toggle:hover { color: var(--accent-primary); }
.conflict-card__details-body { padding-top: var(--space-1); }
.conflict-card__details-body > p:first-child { margin-top: 0; }
.conflict-card__details-body > p:last-child { margin-bottom: 0; }

/* Recent alerts list */
.conflict-card__alerts {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}
.conflict-card__alerts-title {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin: 0 0 var(--space-1) 0;
}
.conflict-card__alert-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--text-sm);
    line-height: 1.6;
}
.conflict-card__alert-list li {
    padding: 2px 0;
}
.conflict-card__alert-date {
    color: var(--text-tertiary);
    font-weight: 500;
}
.conflict-card__alert-list a {
    color: var(--accent-primary);
    text-decoration: none;
}
.conflict-card__alert-list a:hover {
    text-decoration: underline;
}

/* Action links row */
.conflict-card__actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}
.conflict-card__link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--accent-primary);
    text-decoration: none;
}
.conflict-card__link:hover {
    text-decoration: underline;
}
.conflict-card__link--secondary {
    color: var(--text-secondary);
}
.conflict-card__link--secondary:hover {
    color: var(--text-primary);
}

/* Intensity modifiers, left border accent */
.conflict-card--war {
    border-left: 3px solid var(--danger, #dc2626);
}
.conflict-card--high {
    border-left: 3px solid var(--warning, #f59e0b);
}
.conflict-card--medium {
    border-left: 3px solid var(--info, #3b82f6);
}
.conflict-card--low {
    border-left: 3px solid var(--border-medium, #64748b);
}

/* Badge base (shared by all badge-- modifiers) */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-transform: capitalize;
    line-height: 1.4;
}

/* Badge variants for conflict cards */
.badge--critical {
    background: rgba(220, 38, 38, 0.15);
    color: var(--danger, #dc2626);
    border: 1px solid rgba(220, 38, 38, 0.3);
}
.badge--high {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning, #f59e0b);
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge--nuclear {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* --- Signal Intelligence Dashboard --- */

/* Dashboard header: title + count */
.signal-dashboard__header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.signal-dashboard__header h2 {
    margin-bottom: 0;
}
.signal-dashboard__count {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-muted);
    font-weight: 400;
}

/* Category tab bar */
.signal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
}
.signal-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-elevated, rgba(255,255,255,0.05));
    border: 1px solid var(--border-subtle);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}
.signal-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
    background: var(--bg-card);
}
.signal-tab--active {
    color: #fff;
    background: var(--accent-primary, #0ea5e9);
    border-color: var(--accent-primary, #0ea5e9);
}
.signal-tab--active:hover {
    background: var(--accent-hover, #0284c7);
    border-color: var(--accent-hover, #0284c7);
    color: #fff;
}
.signal-tab__icon {
    font-size: 0.9rem;
    line-height: 1;
}
.signal-tab__count {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.15);
    min-width: 1.3rem;
    text-align: center;
}
.signal-tab--active .signal-tab__count {
    background: rgba(255,255,255,0.25);
}

/* Empty state */
.signal-dashboard__empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-size: var(--text-sm, 0.875rem);
}

/* Signal card grid */
.signal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3, 0.75rem);
}

.signal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-primary, #0ea5e9);
    border-radius: var(--radius-md);
    padding: var(--space-4, 1rem);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease;
}
.signal-card:hover {
    border-color: var(--border-medium);
  background: rgba(14, 165, 233, 0.06);
}
.signal-card--critical {
    border-left-color: var(--danger, #dc2626);
}
.signal-card--high {
    border-left-color: var(--warning, #f59e0b);
}
.signal-card--elevated {
    border-left-color: var(--info, #3b82f6);
}

/* Meta bar: region · command, date (full width, above seal+title row) */
.signal-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.signal-card__region {
    font-weight: 700;
    color: var(--accent-primary, #0ea5e9);
}
.signal-card__command {
    color: var(--text-muted);
    font-weight: 500;
}
.signal-card__command::before {
    content: '\00B7';
    margin-right: 0.4rem;
    color: var(--text-muted);
}
.signal-card__date {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
    text-transform: none;
    letter-spacing: normal;
    font-size: var(--text-xs);
}

/* Body: seal + content side by side, grows to fill card */
.signal-card__body {
    display: flex;
    gap: var(--space-3, 0.75rem);
    align-items: flex-start;
    flex: 1;
}

.signal-card__seal {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-top: 0.1rem;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}
.signal-card__seal:hover {
    opacity: 1;
}
.signal-card__seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.signal-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.signal-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
}
.signal-card__title a {
    color: inherit;
    text-decoration: none;
}
.signal-card__title a:hover {
    color: var(--accent-primary, #0ea5e9);
}

/* Category tags on card */
.signal-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.3rem 0 0;
}
.signal-tag {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-primary, #0ea5e9);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.signal-card__excerpt {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0.4rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action pinned to bottom of card */
.signal-card__action {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 500;
    color: var(--accent-primary, #0ea5e9);
    text-decoration: none;
    margin-top: auto;
    padding-top: 0.5rem;
}
.signal-card:has(.signal-card__seal) .signal-card__action {
    padding-left: calc(40px + var(--space-3, 0.75rem));
}
.signal-card__action:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    .signal-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Leaflet Overrides (dark theme) --- */
.leaflet-container {
    background: var(--bg-elevated) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
    background: var(--bg-card) !important;
}

.leaflet-bar a {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

.leaflet-bar a:hover {
    background: var(--bg-elevated) !important;
}

.leaflet-control-attribution {
    background: rgba(var(--bg-base-rgb, 15, 23, 42), 0.85) !important;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.leaflet-control-attribution a {
    color: var(--text-muted);
}

.leaflet-popup-content {
    margin: 0.75rem 1rem;
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* --- Map Popup (JS generates .conflict-popup, aliased here) --- */
.conflict-popup h4,
.map-popup h4 {
    margin: 0 0 var(--space-2);
    color: var(--accent-primary);
    font-size: 1rem;
}

.conflict-popup p,
.map-popup p {
    margin: var(--space-1) 0;
    font-size: var(--text-sm);
}

.conflict-popup-actions,
.map-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.conflict-popup-link,
.map-popup__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.2rem var(--space-2);
    border-radius: 6px;
    border: 1px solid rgba(96, 165, 250, 0.6);
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: none;
    cursor: pointer;
}

.conflict-popup-link:hover,
.conflict-popup-link:focus,
.map-popup__link:hover {
    border-color: rgba(147, 197, 253, 0.9);
    background: rgba(59, 130, 246, 0.2);
    text-decoration: none;
}

.map-popup__context {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- War Marker Pulse Animation --- */
@keyframes map-marker-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.map-marker-pulse {
    animation: map-marker-pulse 2s ease-out infinite;
    border-radius: 50%;
}

/* --- Alert Priority Badges (inside alerts panel) --- */
.map-alert-priority {
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
    text-transform: uppercase;
    font-weight: 600;
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
}

.map-alert-priority--high,
.map-alert-priority--critical {
    background: rgba(248, 113, 113, 0.2);
    color: #fecaca;
}

.map-alert-priority--elevated {
    background: rgba(251, 191, 36, 0.2);
    color: #fde68a;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .map-stats-bar {
        padding: var(--space-4);
    }

    .map-stats-bar__number {
        font-size: 1.5rem;
    }

    .leaflet-popup-content-wrapper {
        max-width: min(86vw, 360px);
    }

    .leaflet-popup-content {
        max-height: 45vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* SEO CTA Blocks */
.seo-cta-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.seo-cta-block h3 {
  margin: 0 0 var(--space-2);
}

.seo-cta-block p {
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
}

.seo-cta-block__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.seo-snapshot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-4) var(--space-6);
  margin: var(--space-4) 0;
}

.seo-snapshot__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seo-snapshot__value {
  font-size: var(--text-3xl);
  font-weight: 800;
  display: block;
}

/* ================================================================
   CYBER THREAT MAP PAGE
   Styles for the cyber map page with 4 embedded threat maps.
   ================================================================ */

/* Action Buttons Row */
.cyber-map-actions {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

/* Quick Navigation Pills */
.cyber-map-nav {
    margin-bottom: var(--space-8);
}

.cyber-map-nav__grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

.cyber-map-nav__item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.cyber-map-nav__item:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Cyber Tools Grid */
.cyber-tools-grid {
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-6);
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--space-6);
}

.cyber-tools-grid__title {
    margin-bottom: var(--space-2);
}

.cyber-tools-grid__desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.cyber-tools-grid__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.cyber-tools-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-4);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: var(--transition);
}

.cyber-tools-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
  background: rgba(14, 165, 233, 0.06);
}

.cyber-tools-card__title {
    color: var(--text-primary);
    font-weight: 600;
}

.cyber-tools-card__desc {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Map Cards */
.cyber-map-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    border: 1px solid var(--border-subtle);
    scroll-margin-top: 80px;
}

.cyber-map-card__title {
    margin-bottom: var(--space-2);
}

.cyber-map-card__desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.cyber-map-card__frame {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 8px;
    background: #0a0a0a;
}

.cyber-map-card__frame--interactive {
    touch-action: auto;
}

.cyber-map-card__iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    pointer-events: auto;
}

.cyber-map-card__actions {
    margin-top: var(--space-4);
    text-align: center;
}

/* Related Links Grid */
.cyber-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.cyber-related-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-4);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: var(--transition);
}

.cyber-related-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
  background: rgba(14, 165, 233, 0.06);
}

.cyber-related-card__title {
    color: var(--text-primary);
    font-weight: 600;
}

.cyber-related-card__desc {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Cyber Map Responsive */
@media (min-width: 1200px) {
    .cyber-map-card__frame {
        height: 700px;
    }
}

@media (min-width: 1600px) {
    .cyber-map-card__frame {
        height: 800px;
    }
}

@media (max-width: 768px) {
    .cyber-map-actions {
        flex-direction: column;
    }

    .cyber-map-actions .btn {
        width: 100%;
    }

    .cyber-map-card {
        padding: var(--space-4);
    }

    .cyber-map-card__frame {
        height: 450px;
    }

    .cyber-tools-grid__cards {
        grid-template-columns: 1fr;
    }

    .cyber-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cyber-map-card__frame {
        height: 350px;
    }
}


/* CISA KEV List, replaces broken Digital Attack Map iframe (S269) */
.cisa-kev-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin: var(--space-4) 0;
}

.cisa-kev-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: var(--space-3) var(--space-4);
}

.cisa-kev-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-1);
}

.cisa-kev-item__cve {
    font-family: var(--font-mono, monospace);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-primary);
}

.cisa-kev-item__date {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.cisa-kev-item__title {
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.cisa-kev-item__meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.cisa-kev-item__ransomware {
    color: #ef4444;
    font-weight: 600;
}

/* ==========================================================================
   WEATHER MAPS PAGE
   Moved from weather-maps.php inline <style>, Session 43
   ========================================================================== */

/* Quick Navigation */
.quick-nav {
    margin-bottom: 3rem;
}

.quick-nav-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.quick-nav-item {
    background: var(--bg-card, #1e1e2f);
    border: 1px solid var(--border-subtle, #2a2a4a);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-nav-item:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--accent-primary, #0ea5e9);
    color: var(--accent-primary, #0ea5e9);
}

/* Map Cards */
.map-card {
    background: var(--bg-card, #1e1e2f);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border-subtle, #2a2a4a);
}

.map-card h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary, #e0e0e0);
}

.map-description {
    color: var(--text-secondary, #a0a0b0);
    margin-bottom: 1.5rem;
}

.map-frame-wrapper {
    position: relative;
    width: 100%;
    height: 720px;
    overflow: hidden;
    border-radius: 8px;
    background: #0a0a0a;
}

.map-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Map Actions (Full View links) */
.map-actions {
    margin-top: 1.5rem;
    text-align: center;
}

/* Earthquake Section */
.earthquake-card {
    background: var(--bg-tertiary, #16213e);
    border: 2px dashed var(--border-subtle, #2a2a4a);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
}

.earthquake-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary, #e0e0e0);
}

.earthquake-card p {
    color: var(--text-secondary, #a0a0b0);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.earthquake-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Additional Resources */
.additional-resources {
    margin: 3rem 0;
}

.additional-resources h2 {
    margin-bottom: 1.5rem;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.resource-card {
    background: var(--bg-card, #1e1e2f);
    border: 1px solid var(--border-subtle, #2a2a4a);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.resource-card:hover {
    border-color: var(--accent-primary, #0ea5e9);
    transform: translateY(-2px);
  background: rgba(14, 165, 233, 0.06);
}

.resource-icon {
    font-size: 2rem;
}

.resource-title {
    color: var(--text-primary, #e0e0e0);
    font-weight: 600;
}

.resource-desc {
    color: var(--text-muted, #707080);
    font-size: 0.85rem;
}

/* Related Links */
.related-links {
    margin: 3rem 0;
}

.link-icon {
    font-size: 1.5rem;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.link-card {
    background: var(--bg-card, #1e1e2f);
    border: 1px solid var(--border-subtle, #2a2a4a);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.link-card:hover {
    border-color: var(--accent-primary, #0ea5e9);
    transform: translateY(-2px);
  background: rgba(14, 165, 233, 0.06);
}

.link-title {
    color: var(--text-primary, #e0e0e0);
    font-weight: 600;
}

.link-desc {
    color: var(--text-muted, #707080);
    font-size: 0.85rem;
}

/* Weather Maps, Responsive */
@media (min-width: 1200px) {
    .map-frame-wrapper {
        height: 820px;
    }
}

@media (min-width: 1600px) {
    .map-frame-wrapper {
        height: 900px;
    }
}

@media (max-width: 768px) {
    .map-card {
        padding: 1rem;
    }

    .map-frame-wrapper {
        height: 500px;
    }

    .quick-nav-grid {
        justify-content: flex-start;
    }

    .earthquake-card {
        padding: 1.5rem;
    }

    .earthquake-links {
        flex-direction: column;
    }

    .earthquake-links .btn {
        width: 100%;
    }

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

@media (max-width: 480px) {
    .map-frame-wrapper {
        height: 420px;
    }
}


/* ==========================================================================
   SHARE PAGE
   Moved from share.php inline <style>, Session 43
   ========================================================================== */

.share-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.share-link-card {
  background: var(--bg-card, var(--bg-tertiary));
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: var(--space-4);
}

.share-link-card h3 {
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
  color: var(--text-primary);
}

.copy-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: var(--space-3) var(--space-5);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  font-size: var(--text-sm);
  transition: opacity 0.3s;
}

.copy-toast--hide {
  opacity: 0;
}

@media (max-width: 768px) {
  .share-links-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   SYSTEM ANNOUNCEMENT BANNER
   ================================================================ */
.system-announcement {
  padding: 0.75rem 0;
  font-size: var(--text-sm);
  text-align: center;
  position: relative;
  z-index: 90;
}

.system-announcement--info {
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.15), rgba(0, 100, 200, 0.1));
  border-bottom: 1px solid rgba(0, 150, 255, 0.3);
  color: var(--text-primary, #e0e0e0);
}

.system-announcement--warning {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(200, 120, 0, 0.1));
  border-bottom: 1px solid rgba(255, 170, 0, 0.3);
  color: var(--text-primary, #e0e0e0);
}

.system-announcement--error {
  background: linear-gradient(135deg, rgba(255, 50, 50, 0.15), rgba(200, 30, 30, 0.1));
  border-bottom: 1px solid rgba(255, 50, 50, 0.3);
  color: var(--text-primary, #e0e0e0);
}

.system-announcement--success {
  background: linear-gradient(135deg, rgba(0, 200, 100, 0.15), rgba(0, 150, 80, 0.1));
  border-bottom: 1px solid rgba(0, 200, 100, 0.3);
  color: var(--text-primary, #e0e0e0);
}

.system-announcement__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.system-announcement__title {
  font-weight: 700;
}

.system-announcement__cta {
  color: var(--accent-primary, #0ea5e9);
  text-decoration: underline;
  font-weight: 600;
}

.system-announcement__close {
  background: none;
  border: none;
  color: var(--text-muted, #707080);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  margin-left: 0.5rem;
}

.system-announcement__close:hover {
  color: var(--text-primary, #e0e0e0);
}

/* ================================================================
   MAP TOOL SINGLE PAGES (weather sub-pages, cyber sub-pages)
   BEM: .map-panel, .map-panel__canvas, .map-panel__iframe
   ================================================================ */

.map-panel {
  position: relative;
  margin: var(--space-6) 0;
}

.map-panel__canvas {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a14;
}

.map-panel__canvas--tall {
  height: clamp(520px, 75vh, 960px);
}

.map-panel__iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  display: block;
}

/* Immersive (fallback fullscreen) mode */
.map-panel__canvas--immersive {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  border-radius: 0;
}

body.map-immersive-open {
  overflow: hidden;
}

/* Immersive close button */
.map-immersive-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10000;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.map-immersive-close:hover {
  background: rgba(0, 0, 0, 0.85);
}

.map-panel__canvas--immersive .map-immersive-close {
  display: flex;
}

@media (max-width: 640px) {
  .map-panel__canvas--tall {
    height: clamp(360px, 60vh, 520px);
  }
}

/* ================================================================
   CONFLICT MAP, Reference Sections (FAQ, Sources, Related Tools)
   Visually distinct from conflict cards above. Clean, informative.
   ================================================================ */

/* Shared wrapper: subtle card background with top accent border */
.conflict-map-reference {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-top: 2px solid var(--accent-primary, #0ea5e9);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-5, 1.25rem) var(--space-5, 1.25rem);
    margin-top: var(--space-5, 1.25rem);
}
.conflict-map-reference h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-3, 0.75rem) 0;
    letter-spacing: -0.01em;
}

/* --- FAQ on conflict map page --- */
.conflict-map-reference .faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.conflict-map-reference .faq-item {
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.conflict-map-reference .faq-item__toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--text-primary);
    transition: background 0.15s ease;
}
.conflict-map-reference .faq-item__toggle:hover {
    background: rgba(255,255,255,0.03);
}
.conflict-map-reference .faq-item__toggle h3 {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-primary);
    line-height: 1.4;
}
.conflict-map-reference .faq-item__indicator {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 300;
    color: var(--accent-primary, #0ea5e9);
    transition: transform 0.2s ease;
}
.conflict-map-reference .faq-item__toggle[aria-expanded="true"] .faq-item__indicator {
    transform: rotate(45deg);
}
.conflict-map-reference .faq-item .collapsible-section--collapsed {
    display: none;
}
.conflict-map-reference .faq-item__toggle[aria-expanded="true"] + div {
    display: block;
}
.conflict-map-reference .faq-item div[itemprop="acceptedAnswer"] {
    padding: 0 1rem 0.75rem 2.85rem;
}
.conflict-map-reference .faq-item div[itemprop="acceptedAnswer"] p {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- Data Sources on conflict map page --- */
.conflict-map-reference.sources-section p {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}
.conflict-map-reference.sources-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.35rem 1.5rem;
}
.conflict-map-reference.sources-section li {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary);
    padding: 0.3rem 0;
    padding-left: 1.1rem;
    position: relative;
    line-height: 1.4;
}
.conflict-map-reference.sources-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary, #0ea5e9);
}
.conflict-map-reference.sources-section small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* --- Related Tools grid on conflict map page --- */
.conflict-map-reference .related-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
}
.conflict-map-reference .related-page-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s ease, transform 0.15s ease;
}
.conflict-map-reference .related-page-card:hover {
    border-color: var(--accent-primary, #0ea5e9);
    transform: translateY(-2px);
    background: rgba(14, 165, 233, 0.06);
}
.conflict-map-reference .related-page-card h3 {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    margin: 0 0 0.15rem 0;
    line-height: 1.3;
}
.conflict-map-reference .related-page-card p {
    font-size: var(--text-lg);
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

/* --- Collapsible toggle (tension zones, other conflicts) --- */
.collapsible-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6rem 1rem;
    margin-top: 0.5rem;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--accent-primary, #0ea5e9);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.collapsible-toggle:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary, #0ea5e9);
}

/* --- Mobile adjustments for reference sections --- */
@media (max-width: 640px) {
    .conflict-map-reference {
        padding: var(--space-4, 1rem);
    }
    .conflict-map-reference.sources-section ul {
        grid-template-columns: 1fr;
    }
    .conflict-map-reference .related-pages-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 360px) {
    .conflict-map-reference .related-pages-grid {
        grid-template-columns: 1fr;
    }
}
