/*
 * AstroShield global styles
 * ---------------------------------------------------------------------------
 * Emphasises readability, dark-mode accessibility, and responsive layouting
 * for the twin visualisation canvases (Leaflet + Three.js).
 */

:root {
    --bg-deep-space: #05070f;
    --bg-panel: rgba(13, 21, 40, 0.88);
    --bg-glow: rgba(46, 229, 255, 0.18);
    --accent-primary: #2ee5ff;
    --accent-secondary: #6dfdcb;
    --accent-warning: #ff4d4d;
    --accent-success: #6effa9;
    --text-primary: #f5f9ff;
    --text-secondary: rgba(245, 249, 255, 0.72);
    --border-color: rgba(46, 229, 255, 0.22);
    --font-heading: "Orbitron", sans-serif;
    --font-body: "Rubik", sans-serif;
    --shadow-strong: 0 18px 48px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 12% 4%, rgba(24, 38, 78, 0.78), transparent 55%),
        radial-gradient(circle at 82% 16%, rgba(30, 72, 128, 0.42), transparent 52%),
        linear-gradient(165deg, rgba(5, 11, 24, 0.94) 0%, #05070f 58%, #03040a 100%);
    color: var(--text-primary);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    align-items: stretch;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 45vw;
    max-width: 520px;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    filter: blur(110px);
    opacity: 0.38;
    z-index: 0;
}

body::before {
    background: radial-gradient(circle, rgba(46, 229, 255, 0.32), rgba(46, 229, 255, 0));
    top: -18vh;
    left: -12vw;
}

body::after {
    background: radial-gradient(circle, rgba(109, 253, 203, 0.28), rgba(109, 253, 203, 0));
    bottom: -22vh;
    right: -15vw;
}

#app {
    width: min(1280px, 96%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.app-nav {
    position: sticky;
    top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 1.5rem;
    border-radius: 20px;
    background: rgba(14, 24, 45, 0.94);
    border: 1px solid rgba(46, 229, 255, 0.26);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    z-index: 20;
}

.app-nav__brand {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

.app-nav__links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.app-nav__link {
    position: relative;
    font-family: var(--font-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.78rem;
    padding: 0.45rem 0.75rem;
    transition: color 0.18s ease;
}

.app-nav__link::after {
    content: "";
    position: absolute;
    inset: auto 0 -0.35rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
    opacity: 0.85;
}

.app-nav__link:hover,
.app-nav__link:focus-visible {
    color: var(--accent-primary);
}

.app-nav__link:hover::after,
.app-nav__link:focus-visible::after,
.app-nav__link.is-active::after {
    transform: scaleX(1);
}

.app-nav__link.is-active {
    color: var(--accent-primary);
}

.landing-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.6rem 1.8rem;
    border-radius: 24px;
    background: rgba(9, 16, 30, 0.9);
    border: 1px solid rgba(46, 229, 255, 0.24);
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.landing-hero::after {
    content: "";
    position: absolute;
    inset: auto -15% -35% auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(46, 229, 255, 0.32), rgba(46, 229, 255, 0));
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
}

.landing-hero__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.landing-hero__copy h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 4vw, 3.1rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.landing-hero__copy p {
    margin: 0;
    color: rgba(245, 249, 255, 0.76);
    font-size: 1.05rem;
    line-height: 1.6;
}

.landing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.landing-hero__actions a {
    min-width: 200px;
    font-size: 0.8rem;
}

.landing-hero__callout {
    position: relative;
    z-index: 1;
    align-self: center;
    justify-self: center;
    display: flex;
    justify-content: center;
}

.callout-card {
    background: rgba(11, 20, 38, 0.92);
    border: 1px solid rgba(46, 229, 255, 0.22);
    border-radius: 20px;
    max-width: 320px;
    padding: 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
}

.callout-card h2 {
    margin: 0;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1rem;
    color: var(--accent-secondary);
}

.callout-card ul {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: rgba(245, 249, 255, 0.76);
    font-size: 0.95rem;
    line-height: 1.6;
}

.landing-grid {
    display: grid;
    gap: 2rem;
}

.info-section {
    background: rgba(9, 16, 30, 0.88);
    border: 1px solid rgba(46, 229, 255, 0.24);
    border-radius: 22px;
    padding: 1.8rem 2rem;
    box-shadow: var(--shadow-soft);
}

.info-section h2 {
    margin: 0 0 1.25rem;
    font-family: var(--font-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

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

.feature-card {
    background: rgba(11, 22, 42, 0.92);
    border: 1px solid rgba(46, 229, 255, 0.16);
    border-radius: 18px;
    padding: 1.4rem 1.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
}

.feature-card h3 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.feature-card p {
    margin: 0;
    color: rgba(245, 249, 255, 0.72);
    line-height: 1.55;
    font-size: 0.96rem;
}

.feature-card__link {
    margin-top: auto;
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--accent-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.feature-card__link:hover,
.feature-card__link:focus-visible {
    color: var(--accent-secondary);
}


.pillars-section {
    background: rgba(9, 16, 30, 0.88);
    border: 1px solid rgba(46, 229, 255, 0.24);
    border-radius: 22px;
    padding: 1.8rem 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.pillars-section h2 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

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

.pillar-card {
    background: rgba(11, 22, 42, 0.9);
    border: 1px solid rgba(46, 229, 255, 0.16);
    border-radius: 18px;
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
}

.pillar-card header h3 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: var(--accent-secondary);
}

.pillar-card__summary {
    margin: 0.35rem 0 0;
    color: rgba(245, 249, 255, 0.75);
    font-size: 0.92rem;
    line-height: 1.5;
}

.pillar-card ul {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    color: rgba(245, 249, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pillar-card ul li::marker {
    color: var(--accent-primary);
}

.orbital-layout {
    display: grid;
    grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
}

.orbital-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

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

.orbital-summary__item {
    background: rgba(9, 16, 30, 0.85);
    border: 1px solid rgba(46, 229, 255, 0.18);
    border-radius: 14px;
    padding: 0.55rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.orbital-summary__item .label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.orbital-summary__item strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.app-footer {
    text-align: center;
    padding: 1.2rem 0 0.5rem;
    color: rgba(245, 249, 255, 0.6);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.45rem 1.7rem;
    border-radius: 22px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-strong);
}

.page-header h1 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.page-header .subtitle {
    margin-top: 0.45rem;
    max-width: 38rem;
    color: var(--text-secondary);
}

.page-header .actions {
    display: flex;
    gap: 0.75rem;
}

.mission-control-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

button,
.primary-button,
.ghost-button {
    cursor: pointer;
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.85rem 1.6rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

select {
    width: 100%;
    background: rgba(9, 16, 30, 0.9);
    border: 1px solid rgba(46, 229, 255, 0.24);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent-primary) 50%),
        linear-gradient(135deg, var(--accent-primary) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1rem + 2px), calc(100% - 15px) calc(1rem + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(46, 229, 255, 0.25);
}

.primary-button {
    background: linear-gradient(130deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-deep-space);
    box-shadow: 0 10px 26px rgba(46, 229, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ghost-button {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ghost-button[aria-pressed="true"] {
    background: rgba(46, 229, 255, 0.16);
    color: var(--bg-deep-space);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 2px rgba(46, 229, 255, 0.25);
}

.auto-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(46, 229, 255, 0.32);
    background: rgba(46, 229, 255, 0.12);
    color: var(--accent-primary);
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.auto-status::before {
    content: "";
    display: inline-block;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: var(--accent-secondary);
    box-shadow: 0 0 0 0 rgba(109, 253, 203, 0.45);
    animation: auto-status-pulse 2.4s ease-out infinite;
}

.auto-status.is-busy {
    background: rgba(46, 229, 255, 0.24);
    border-color: rgba(46, 229, 255, 0.46);
    color: var(--text-primary);
}

.auto-status.is-busy::before {
    background: var(--accent-primary);
    animation-duration: 1.4s;
    box-shadow: 0 0 0 0 rgba(46, 229, 255, 0.55);
}

@keyframes auto-status-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(109, 253, 203, 0.45);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(109, 253, 203, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(109, 253, 203, 0);
    }
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(46, 229, 255, 0.4);
}

.mission-layout {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
}

#controls-panel {
    background: var(--bg-panel);
    border-radius: 22px;
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.45rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: var(--shadow-soft);
}

#controls-panel h2 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 1.15rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.neo-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    padding-bottom: 1.1rem;
}

.neo-link {
    grid-column: 1 / -1;
    justify-self: flex-start;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(46, 229, 255, 0.3);
    color: var(--accent-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.65rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.neo-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(46, 229, 255, 0.22);
}

.neo-summary__item {
    background: rgba(9, 16, 30, 0.85);
    border: 1px solid rgba(46, 229, 255, 0.18);
    border-radius: 14px;
    padding: 0.55rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.neo-summary__item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.neo-summary__item strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.neo-summary__badge {
    align-self: flex-start;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
}

.neo-summary__badge.hazard {
    background: rgba(255, 77, 77, 0.18);
    border: 1px solid var(--accent-warning);
    color: var(--accent-warning);
}

.neo-summary__badge.monitored {
    background: rgba(110, 255, 169, 0.18);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

.neo-summary__badge::after {
    content: attr(data-source);
    position: absolute;
    inset: auto auto -1.8rem 0;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.slider-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.slider-row label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.slider-row output {
    font-size: 0.9rem;
    color: var(--accent-secondary);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.info-card {
    background: rgba(15, 28, 56, 0.65);
    border: 1px solid rgba(46, 229, 255, 0.12);
    border-radius: 16px;
    padding: 0.75rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-card h4 {
    margin: 0;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    letter-spacing: 0.06em;
}

.info-card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tooltip-trigger {
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: underline dotted;
}

.tooltip {
    position: absolute;
    inset: auto 0 0 auto;
    transform: translateY(100%) translateX(-10%);
    background: #0d162c;
    border-radius: 12px;
    padding: 0.75rem;
    width: 220px;
    border: 1px solid rgba(46, 229, 255, 0.2);
    box-shadow: var(--shadow-soft);
    font-size: 0.78rem;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 15;
}

.tooltip.visible {
    opacity: 1;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

#defense-countdown {
    font-family: var(--font-heading);
    letter-spacing: 0.12em;
    color: var(--accent-warning);
    text-transform: uppercase;
}

#visualisation-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
}

.viz-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.15rem;
}

.panel {
    background: var(--bg-panel);
    border-radius: 22px;
    border: 1px solid var(--border-color);
    padding: 1.05rem;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.panel h2 {
    margin: 0 0 0.75rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#map {
    height: min(62vh, 520px);
    border-radius: 18px;
    overflow: hidden;
}

#orbital-canvas {
    height: clamp(220px, 36vh, 320px);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

.orbital-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(9, 16, 30, 0.72);
    border: 1px solid rgba(46, 229, 255, 0.18);
}

.orbital-legend__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.orbital-legend__swatch {
    width: 18px;
    height: 4px;
    border-radius: 999px;
}

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

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

.environment-card {
    background: rgba(9, 16, 30, 0.82);
    border-radius: 14px;
    border: 1px solid rgba(46, 229, 255, 0.16);
    padding: 0.75rem;
}

.environment-card h3 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.environment-card p {
    margin: 0.4rem 0 0;
    font-size: clamp(1.1rem, 2.4vw, 1.6rem);
    color: var(--accent-primary);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.metric-card {
    background: rgba(9, 16, 30, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(46, 229, 255, 0.14);
    padding: 0.85rem;
}

.metric-card h3 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-card p {
    margin: 0.35rem 0 0;
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    color: var(--accent-primary);
    font-weight: 600;
}

#tsunami-warning {
    margin-top: 1.2rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: radial-gradient(circle at top left, rgba(255, 77, 77, 0.88), rgba(128, 0, 0, 0.75));
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-heading);
    display: none;
}

#tsunami-warning.visible {
    display: block;
    animation: pulseWarning 1.2s infinite ease-in-out;
}

.defense-message {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    text-transform: uppercase;
}

.defense-message.visible {
    display: inline-flex;
}

.defense-message__label {
    font-size: clamp(0.75rem, 2vw, 0.88rem);
}

.defense-message__percent {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    letter-spacing: 0.06em;
}

.defense-message__detail {
    flex-basis: 100%;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    opacity: 0.72;
    text-transform: none;
}

.defense-success {
    background: rgba(110, 255, 169, 0.18);
    border: 1px solid rgba(110, 255, 169, 0.45);
    color: var(--accent-success);
}

.defense-success .defense-message__percent {
    background: rgba(110, 255, 169, 0.24);
    color: var(--bg-panel);
}

.defense-failure {
    background: rgba(255, 77, 77, 0.18);
    border: 1px solid rgba(255, 77, 77, 0.45);
    color: var(--accent-warning);
}

.defense-failure .defense-message__percent {
    background: rgba(255, 77, 77, 0.24);
    color: var(--bg-panel);
}

footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@keyframes pulseWarning {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 18px rgba(255, 77, 77, 0.45);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 32px rgba(255, 77, 77, 0.65);
    }
}

@media (max-width: 1100px) {
    .mission-layout {
        grid-template-columns: 1fr;
    }

    .orbital-layout {
        grid-template-columns: 1fr;
    }

    .app-nav {
        position: static;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.1rem;
    }

    .page-header .actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    body {
        padding: 1rem 0;
    }

    #app {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .app-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .app-nav__links {
        flex-wrap: wrap;
        gap: 0.6rem;
        width: 100%;
    }

    .app-nav__link {
        padding: 0.35rem 0.55rem;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        padding: 1.35rem 1.4rem;
    }

    .landing-hero__actions {
        width: 100%;
    }

    .page-header,
    #controls-panel,
    .panel,
    .info-section,
    .pillars-section {
        padding: 1.2rem;
    }

    button {
        width: 100%;
    }
}
