
:root {
    --nexus-silver: #C8D7E8;
    --nexus-blue: #568BC7;
    --nexus-navy: #14243B;
    --nexus-black: #080D16;
    --nexus-border: rgba(200, 215, 232, 0.19);
    --nexus-panel: rgba(8, 13, 22, 0.80);
}

html {
    scroll-behavior: smooth;
}

body.nexus-page {
    margin: 0;
    min-height: 100vh;
    color: var(--nexus-silver);
    background: var(--nexus-black);
    font-family: Georgia, "Times New Roman", serif;
}

/* Fixed Background */

.nexus-background {
    position: fixed;
    inset: 0;
    z-index: 0;

    background-image:
        linear-gradient(
            180deg,
            rgba(8, 13, 22, 0.30),
            rgba(8, 13, 22, 0.78)
        ),
        url("../images/nexus-council-bg.png");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

.nexus-vignette {
    position: fixed;
    inset: 0;
    z-index: 1;

    background: radial-gradient(
        ellipse at center,
        transparent 10%,
        rgba(3, 6, 12, 0.60) 100%
    );

    pointer-events: none;
}

/* Main Layout */

.nexus-content {
    position: relative;
    z-index: 2;
    isolation: isolate;

    width: min(100% - 36px, 920px);
    margin: 0 auto;
    padding: 28px 0 24px;
    box-sizing: border-box;
}

/* Navigation */

.nexus-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;

    padding-bottom: 18px;
    border-bottom: 1px solid var(--nexus-border);
}

.nexus-back-link {
    color: #A9BED5;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.25s ease;
}

.nexus-back-link:hover {
    color: white;
}

.nexus-classification {
    color: #91A8C4;
    font-family: Arial, sans-serif;
    font-size: 0.63rem;
    letter-spacing: 0.14em;
}

/* Hero */

.nexus-hero {
    padding: 94px 12px 76px;
    text-align: center;
}

.nexus-eyebrow {
    color: #91A8C4;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    line-height: 1.8;
}

.nexus-hero h1 {
    margin: 22px 0;
    color: var(--nexus-silver);
    font-size: clamp(2.8rem, 8vw, 5rem);
    font-weight: normal;
    line-height: 1.08;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
}

.nexus-divider {
    width: 100px;
    height: 1px;
    margin: 0 auto;
    background: var(--nexus-blue);
}

.nexus-subtitle {
    max-width: 560px;
    margin: 23px auto 0;
    color: #C0CBDA;
    font-size: 1.04rem;
    line-height: 1.85;
}

/* Floating Panels */

.nexus-panel {
    margin-bottom: 24px;
    padding: clamp(24px, 5vw, 42px);

    background: var(--nexus-panel);
    border: 1px solid var(--nexus-border);
    border-left: 2px solid rgba(86, 139, 199, 0.75);

    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nexus-panel-index {
    display: block;
    margin-bottom: 18px;

    color: #91A8C4;
    font-family: Arial, sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.16em;
}

.nexus-panel h2 {
    margin: 0 0 20px;
    color: var(--nexus-silver);
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    font-weight: normal;
    line-height: 1.35;
}

.nexus-panel p {
    color: #C0CBDA;
    font-size: 1rem;
    line-height: 1.95;
}

.nexus-panel p + p {
    margin-top: 17px;
}

/* Magic Categories */

.nexus-detail-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.nexus-detail-line span {
    padding: 10px 13px;
    color: #B6CCE5;
    background: rgba(20, 36, 59, 0.72);
    border: 1px solid rgba(86, 139, 199, 0.30);

    font-family: Arial, sans-serif;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
}

/* Academy Status */

.nexus-status {
    display: inline-block;
    margin-top: 12px;
    padding: 9px 13px;

    color: #B6CCE5;
    border: 1px solid rgba(86, 139, 199, 0.42);

    font-family: Arial, sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
}

/* Restricted Records Card */

.nexus-restricted {
    display: flex;
    align-items: center;
    gap: 18px;

    width: 100%;
    margin-top: 34px;
    padding: 25px;

    color: var(--nexus-silver);
    text-align: left;
    font-family: inherit;

    background: rgba(7, 12, 22, 0.91);
    border: 1px solid rgba(86, 139, 199, 0.45);
    border-left: 3px solid var(--nexus-blue);

    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.nexus-restricted:hover {
    background: rgba(20, 36, 59, 0.95);
    border-color: var(--nexus-blue);
    transform: translateY(-2px);
}

.nexus-restricted:focus-visible {
    outline: 2px solid var(--nexus-silver);
    outline-offset: 4px;
}

.restricted-symbol {
    display: grid;
    place-items: center;
    flex-shrink: 0;

    width: 48px;
    height: 48px;

    color: var(--nexus-blue);
    background: rgba(20, 36, 59, 0.8);
    border: 1px solid rgba(86, 139, 199, 0.35);
    font-size: 1.5rem;
}

.restricted-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.restricted-label {
    color: #91A8C4;
    font-family: Arial, sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    line-height: 1.7;
}

.restricted-title {
    font-size: 1.4rem;
}

.restricted-description {
    color: #A9B9CC;
    font-size: 0.86rem;
    line-height: 1.6;
}

.restricted-lock {
    flex-shrink: 0;
    color: #91A8C4;
    font-size: 1.5rem;
}

/* Footer */

.nexus-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 32px;
    padding: 22px 2px 10px;
    border-top: 1px solid var(--nexus-border);

    color: #91A8C4;
    font-family: Arial, sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
}

/* =====================================
   SEPARATE SECURITY ALARM
   Deliberately NOT styled like the page
===================================== */

.security-alarm {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    overflow: auto;
    padding: 22px;
    box-sizing: border-box;

    color: #F3F3F3;
    background: #050506;
    font-family: "Courier New", monospace;
}

.security-alarm.is-active {
    display: flex;
    animation: alarm-screen-in 0.15s linear both;
}

.alarm-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;

    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(255, 255, 255, 0.025) 4px
    );
}

.alarm-frame {
    position: relative;
    width: min(100%, 620px);
    padding: clamp(22px, 5vw, 42px);
    box-sizing: border-box;

    background: #0B0B0D;
    border: 2px solid #C62828;
    box-shadow:
        0 0 0 7px rgba(198, 40, 40, 0.08),
        0 0 42px rgba(198, 40, 40, 0.18);
}

.alarm-topline,
.alarm-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.alarm-live {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #FF4545;
    font-size: 0.73rem;
    font-weight: bold;
    letter-spacing: 0.13em;
}

.alarm-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #FF2929;
    box-shadow: 0 0 12px rgba(255, 41, 41, 0.8);
    animation: alarm-blink 0.8s steps(2, start) infinite;
}

.alarm-code {
    color: #8B8B91;
    font-size: 0.68rem;
}

.alarm-icon {
    display: grid;
    place-items: center;

    width: 54px;
    height: 54px;
    margin: 42px 0 24px;

    color: #FF3939;
    border: 2px solid #C62828;
    font-family: Arial, sans-serif;
    font-size: 2rem;
    font-weight: bold;
}

.alarm-overline {
    margin: 0 0 17px;
    color: #C62828;
    font-size: 0.68rem;
    line-height: 1.8;
    letter-spacing: 0.08em;
}

.alarm-frame h2 {
    margin: 0;
    color: #F4F4F4;
    font-family: "Courier New", monospace;
    font-size: clamp(1.8rem, 7vw, 3.15rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.alarm-rule {
    height: 3px;
    width: 100%;
    margin: 27px 0 22px;
    background: #C62828;
}

.alarm-message {
    color: #D2D2D5;
    font-size: 0.9rem;
    line-height: 1.8;
}

.alarm-data {
    margin-top: 28px;
    border-top: 1px solid #343438;
}

.alarm-data-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;

    padding: 14px 0;
    border-bottom: 1px solid #343438;

    font-size: 0.67rem;
    line-height: 1.6;
}

.alarm-data-row span {
    color: #909097;
}

.alarm-data-row strong {
    color: #FF4545;
    text-align: right;
    font-size: 0.67rem;
}

.alarm-bottom {
    margin-top: 27px;
    color: #A4A4AA;
    font-size: 0.62rem;
    letter-spacing: 0.07em;
}

.alarm-countdown {
    color: #FF4545;
    font-weight: bold;
}

@keyframes alarm-screen-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes alarm-blink {
    to { opacity: 0.2; }
}

/* Mobile */

@media (max-width: 600px) {
    .nexus-content {
        width: min(100% - 24px, 920px);
        padding-top: 18px;
    }

    .nexus-hero {
        padding: 76px 6px 58px;
    }

    .nexus-eyebrow {
        font-size: 0.61rem;
        letter-spacing: 0.14em;
    }

    .nexus-panel {
        padding: 25px 21px;
    }

    .nexus-panel p {
        font-size: 0.95rem;
    }

    .nexus-restricted {
        gap: 12px;
        padding: 18px 14px;
    }

    .restricted-symbol {
        width: 38px;
        height: 38px;
    }

    .restricted-title {
        font-size: 1.15rem;
    }

    .restricted-label {
        font-size: 0.55rem;
    }

    .restricted-description {
        font-size: 0.79rem;
    }

    .nexus-footer {
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.8;
    }

    .security-alarm {
        padding: 12px;
    }

    .alarm-frame {
        padding: 22px 18px;
    }

    .alarm-data-row {
        font-size: 0.59rem;
    }

    .alarm-data-row strong {
        font-size: 0.59rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
