:root {
    --navy-950: #061522;
    --navy-900: #0a1e2d;
    --navy-850: #102b40;
    --navy-800: #17384f;
    --navy-700: #24516d;
    --gold: #f0b90b;
    --gold-soft: rgba(240, 185, 11, 0.12);
    --white: #f6f8fb;
    --text: #d6e1eb;
    --muted: #8ea3b5;
    --line: rgba(164, 204, 232, 0.18);
    --success: #55d68b;
    --danger: #ff7b7b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.30), 0 0 32px rgba(24, 86, 125, 0.10);
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(
            circle at 70% 20%,
            rgba(18, 58, 83, 0.25),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--navy-950),
            var(--navy-900)
        );
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.6;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 100px;
    padding: 1rem clamp(1.5rem, 5vw, 4rem);
    border-bottom: 1px solid var(--line);
    background: rgba(3, 17, 29, 0.92);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    text-decoration: none;
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 13px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.02)
        );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.brand-mark span {
    color: var(--white);
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.08em;
}

.brand-mark i {
    position: absolute;
    bottom: 7px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid var(--gold);
}

.brand-copy {
    display: grid;
}

.brand-copy strong {
    color: var(--white);
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.brand-copy small,
.portal-label {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portal-label {
    color: var(--text);
}

.app-shell {
    width: min(1180px, calc(100% - 3rem));
    min-height: calc(100vh - 190px);
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 6rem) 0;
}

.screen {
    animation: screen-in 420ms ease both;
}

@keyframes screen-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow,
.panel-label,
.section-label,
.parallel-label {
    margin: 0 0 0.75rem;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1rem;
    color: var(--white);
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.03;
    letter-spacing: -0.055em;
}

h2 {
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

h3 {
    color: var(--white);
}

.hero-layout,
.dashboard-heading,
.case-workspace,
.completion-grid {
    display: grid;
    gap: 2rem;
}

.hero-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.65fr);
    align-items: center;
    min-height: 620px;
}

.hero-description {
    max-width: 720px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions,
.completion-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.primary-button,
.secondary-button,
.case-button,
.text-button {
    border-radius: 10px;
    font-weight: 800;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        color 180ms ease;
}

.primary-button,
.secondary-button,
.case-button {
    min-height: 50px;
    padding: 0.8rem 1.2rem;
}

.primary-button {
    border: 1px solid var(--gold);
    color: #171100;
    background: var(--gold);
}

.primary-button:hover,
.secondary-button:hover,
.case-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.secondary-button,
.case-button {
    border: 1px solid var(--line);
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.text-button {
    padding: 0.4rem 0;
    border: 0;
    color: var(--muted);
    background: transparent;
}

.text-button:hover {
    color: var(--white);
}

.assignment-card,
.progress-card,
.incident-card,
.content-panel,
.case-profile,
.completion-card {
    border: 1px solid var(--line);
    background:
        linear-gradient(
            145deg,
            rgba(16, 40, 59, 0.95),
            rgba(7, 28, 43, 0.94)
        );
    box-shadow: var(--shadow);
}

.assignment-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.assignment-details {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.assignment-details > div,
.case-profile dl > div,
.completion-card dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
}

.assignment-details span,
.case-profile dt,
.completion-card dt {
    color: var(--muted);
}

.assignment-details strong,
.case-profile dd,
.completion-card dd {
    margin: 0;
    color: var(--white);
    text-align: right;
}

.assignment-status {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 0 16px rgba(240, 185, 11, 0.8);
}

.dashboard-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    margin-bottom: 2.4rem;
}

.dashboard-heading > div:first-child p:last-child {
    color: var(--muted);
}

.progress-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 270px;
    padding: 1.25rem;
    border-radius: var(--radius-md);
}

.progress-ring {
    --progress-degrees: 0deg;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    border-radius: 999px;
    background:
        radial-gradient(
            circle,
            var(--navy-850) 56%,
            transparent 58%
        ),
        conic-gradient(
            var(--gold) 0 var(--progress-degrees),
            rgba(255, 255, 255, 0.08)
            var(--progress-degrees) 360deg
        );
    transition: background 500ms ease;
}

.progress-ring span {
    color: var(--white);
    font-weight: 900;
}

.incident-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.incident-card {
    position: relative;
    display: flex;
    min-height: 320px;
    padding: 1.5rem;
    overflow: hidden;
    border-radius: var(--radius-md);
    flex-direction: column;
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        opacity 220ms ease;
}

.incident-card.available {
    border-top: 4px solid var(--gold);
}

.incident-card.complete {
    border-color: rgba(85, 214, 139, 0.45);
}

.incident-card.locked {
    opacity: 0.52;
}

.incident-card:hover:not(.locked) {
    transform: translateY(-4px);
}

.incident-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.case-number,
.status-badge {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.status-badge {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.available .status-badge {
    color: var(--gold);
    border-color: rgba(240, 185, 11, 0.35);
    background: var(--gold-soft);
}

.complete .status-badge {
    color: var(--success);
    border-color: rgba(85, 214, 139, 0.35);
    background: rgba(85, 214, 139, 0.08);
}

.threat-type {
    margin: 1.5rem 0 0.4rem;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.incident-card h2 {
    margin-bottom: 0.35rem;
}

.incident-card > p:not(.threat-type):not(.incident-analogy) {
    color: var(--muted);
}

.incident-analogy {
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 700;
}

.case-button {
    width: 100%;
    margin-top: auto;
}

.incident-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin: 1.5rem 0 2.5rem;
}

.incident-heading h1 {
    margin-bottom: 0.55rem;
}

.incident-subtitle {
    color: var(--gold);
    font-weight: 800;
}

.threat-summary {
    color: var(--muted);
}

.severity-badge {
    align-self: center;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(240, 185, 11, 0.35);
    border-radius: 999px;
    color: var(--gold);
    background: var(--gold-soft);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.case-workspace {
    grid-template-columns: minmax(240px, 0.35fr) minmax(0, 1fr);
    align-items: start;
}

.case-profile {
    position: sticky;
    top: 126px;
    padding: 1.4rem;
    border-radius: var(--radius-md);
}

.case-profile dl {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.case-profile dl > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
}

.case-profile dd {
    text-align: left;
}


.case-content {
    display: grid;
    gap: 1.2rem;
}

.content-panel {
    padding: clamp(1.4rem, 3vw, 2.2rem);
    border-radius: var(--radius-md);
}

.content-panel p {
    color: var(--muted);
}

.incident-recreation-panel {
    overflow: hidden;
}

.video-instruction {
    margin: -0.35rem 0 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.incident-video-shell {
    overflow: hidden;
    border: 1px solid rgba(240, 185, 11, 0.24);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 18px 40px rgba(0, 0, 0, 0.22);
}

.incident-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #02070b;
    object-fit: contain;
}

.incident-video-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--line);
    background:
        linear-gradient(
            90deg,
            rgba(240, 185, 11, 0.08),
            transparent 38%
        ),
        rgba(4, 17, 27, 0.92);
}

.incident-video-details p {
    margin: 0;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 800;
}

.incident-video-details small {
    color: var(--muted);
    text-align: right;
}

@media (max-width: 720px) {
    .incident-video-details {
        align-items: flex-start;
        flex-direction: column;
    }

    .incident-video-details small {
        text-align: left;
    }
}

.decision-options,
.knowledge-options {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.3rem;
}

.decision-button,
.knowledge-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
    text-align: left;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.decision-button:hover:not(:disabled),
.knowledge-button:hover:not(:disabled) {
    transform: translateX(4px);
    border-color: rgba(240, 185, 11, 0.5);
    background: var(--gold-soft);
}

.answer-letter {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--gold);
    font-weight: 900;
}

.correct-answer {
    border-color: rgba(85, 214, 139, 0.65);
    background: rgba(85, 214, 139, 0.08);
}

.incorrect-answer {
    border-color: rgba(255, 123, 123, 0.65);
    background: rgba(255, 123, 123, 0.08);
}

.decision-feedback {
    margin-top: 1rem;
}

.feedback-correct,
.feedback-incorrect {
    padding: 1rem;
    border-radius: 10px;
}

.feedback-correct {
    border: 1px solid rgba(85, 214, 139, 0.35);
    color: #c9f5dc;
    background: rgba(85, 214, 139, 0.08);
}

.feedback-incorrect {
    border: 1px solid rgba(255, 123, 123, 0.35);
    color: #ffd3d3;
    background: rgba(255, 123, 123, 0.08);
}


.analysis-sequence {
    display: grid;
    gap: 0.35rem;
    margin: 1.3rem 0;
}

.analysis-sequence p {
    margin: 0;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.82rem;
}

.threat-match,
.security-principle {
    padding: 1.25rem;
    border: 1px solid rgba(240, 185, 11, 0.22);
    border-radius: 10px;
    background: rgba(240, 185, 11, 0.045);
}

.threat-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 1rem;
    margin: 1.2rem 0;
}

.comparison-card {
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.comparison-symbol {
    align-self: center;
    color: var(--gold);
    font-size: 1.7rem;
    font-weight: 900;
}

.knowledge-check .primary-button {
    margin-top: 1.2rem;
}

.completion-shell {
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

.completion-intro {
    max-width: 720px;
    margin: 0 auto 2rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.completion-grid {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: left;
}

.completion-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.identity-card {
    border-top: 4px solid var(--gold);
}

.completion-card dl {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0 0;
}

.mastery-list {
    display: grid;
    gap: 0.9rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.mastery-list li {
    position: relative;
    padding-left: 1.8rem;
    color: var(--white);
    font-weight: 700;
}

.mastery-list li::before {
    position: absolute;
    left: 0;
    color: var(--success);
    content: "✓";
}

.completion-actions {
    justify-content: center;
}

.danger-text {
    color: var(--danger);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem clamp(1.5rem, 5vw, 4rem);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 900px) {
    .hero-layout,
    .dashboard-heading,
    .case-workspace,
    .completion-grid {
        grid-template-columns: 1fr;
    }

    .incident-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .case-profile {
        position: static;
    }

    .incident-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-label {
        display: none;
    }

    .app-shell {
        width: min(100% - 1.5rem, 1180px);
        padding: 2.5rem 0;
    }

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

    .progress-card {
        min-width: 0;
    }

    .threat-comparison {
        grid-template-columns: 1fr;
    }

    .comparison-symbol {
        justify-self: center;
        transform: rotate(90deg);
    }
}

@media print {
    body {
        color: #111;
        background: #fff;
    }

    .site-header,
    .site-footer,
    .completion-actions,
    #welcomeScreen,
    #dashboardScreen,
    #incidentScreen {
        display: none !important;
    }

    #completionScreen {
        display: block !important;
    }

    .completion-card {
        color: #111;
        border: 1px solid #bbb;
        background: #fff;
        box-shadow: none;
    }

    .completion-card h2,
    .completion-card h3,
    .completion-card dd,
    .mastery-list li {
        color: #111;
    }
}


/* =========================================================
   PROJECT IRONGATE 2.1 — BRAND INTEGRATION
========================================================= */

.brand-logo-image {
    width: 62px;
    height: 58px;
    object-fit: cover;
    object-position: center 14%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: #04111c;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 8px 24px rgba(0, 0, 0, 0.28);
}

.brand-copy em {
    display: block;
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.assignment-card,
.progress-card,
.incident-card,
.content-panel,
.case-profile,
.completion-card {
    background:
        linear-gradient(
            145deg,
            rgba(24, 58, 82, 0.97),
            rgba(11, 35, 53, 0.97)
        );
    border-color: rgba(147, 198, 230, 0.19);
}

.content-panel,
.case-profile,
.completion-card {
    box-shadow:
        0 18px 52px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.incident-card.available {
    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.26),
        0 0 26px rgba(240, 185, 11, 0.055);
}

.video-placeholder {
    background:
        radial-gradient(
            circle at center,
            rgba(240, 185, 11, 0.055),
            transparent 46%
        ),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 4px
        ),
        rgba(3, 17, 29, 0.34);
}

.analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.analysis-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.analysis-status {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.10em;
}

.certificate-brand-logo {
    display: block;
    width: min(340px, 76%);
    max-height: 185px;
    margin: 0 auto 0.45rem;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

.certificate-tagline {
    margin-bottom: 1.3rem;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.completion-shell {
    padding: 2.25rem;
    border: 1px solid rgba(240, 185, 11, 0.20);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(240, 185, 11, 0.07),
            transparent 34%
        );
}

@media print {
    @page {
        size: landscape;
        margin: 0.45in;
    }

    .completion-shell {
        max-width: none;
        padding: 0.35in;
        border: 2px solid #d5a100;
        background: #fff;
    }

    .certificate-brand-logo {
        width: 280px;
        max-height: 135px;
        margin-bottom: 0;
    }

    .certificate-tagline {
        color: #9b7200;
    }

    #completionScreen h1 {
        color: #0b2132;
        font-size: 42px;
    }

    .completion-intro {
        color: #334b5c;
    }

    .completion-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }

    .completion-card {
        padding: 1.4rem;
        border: 1px solid #bfc8cf;
        border-radius: 12px;
    }

    .panel-label,
    .eyebrow {
        color: #9b7200;
    }
}


/* =========================================================
   PROJECT IRONGATE 2.2 — POLISH PASS
========================================================= */

.site-header {
    min-height: 76px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.brand-logo-image {
    width: 52px;
    height: 49px;
    border-radius: 10px;
}

.brand-copy strong {
    font-size: 1.18rem;
}

.brand-copy small {
    font-size: 0.66rem;
}

.brand-copy em {
    display: none;
}

.case-profile {
    top: 96px;
}

.certificate-brand-logo {
    width: min(215px, 54%);
    max-height: 112px;
    margin-bottom: 0.2rem;
}

.certificate-tagline {
    margin-bottom: 0.85rem;
    font-size: 0.72rem;
}

.completion-shell > h1 {
    margin-bottom: 0.65rem;
}

@media print {
    @page {
        size: landscape;
        margin: 0.25in;
    }

    html,
    body {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }

    #completionScreen {
        width: 100%;
        margin: 0;
        padding: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .completion-shell {
        width: 100%;
        max-width: none;
        min-height: 0;
        margin: 0;
        padding: 0.18in 0.24in;
        border: 2px solid #d5a100;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .certificate-brand-logo {
        width: 165px;
        max-height: 82px;
        margin: 0 auto 0.02in;
    }

    .certificate-tagline {
        margin-bottom: 0.04in;
        font-size: 8pt;
    }

    #completionScreen .eyebrow {
        margin-bottom: 0.02in;
        font-size: 7.5pt;
    }

    #completionScreen h1 {
        margin-bottom: 0.04in;
        font-size: 27pt;
        line-height: 1;
    }

    .completion-intro {
        max-width: 8.8in;
        margin-bottom: 0.12in;
        font-size: 9.5pt;
        line-height: 1.25;
    }

    .completion-grid {
        grid-template-columns: 1.08fr 0.92fr;
        gap: 0.12in;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .completion-card {
        padding: 0.14in 0.17in;
        border-radius: 8px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .completion-card h2 {
        margin-bottom: 0.08in;
        font-size: 15pt;
    }

    .completion-card dl,
    .mastery-list {
        gap: 0.04in;
        margin-top: 0.06in;
    }

    .completion-card dl > div {
        padding-bottom: 0.035in;
        font-size: 8.5pt;
    }

    .mastery-list li {
        padding-left: 0.18in;
        font-size: 8.5pt;
        line-height: 1.2;
    }

    .completion-actions,
    .site-header,
    .site-footer {
        display: none !important;
    }
}


/* =========================================================
   PROJECT IRONGATE 2.3 — CERTIFICATE + BUTTON HOVER FIX
========================================================= */

/* Restore the gold hover treatment for available/review buttons */
.incident-card.available .case-button:hover:not(:disabled),
.incident-card.complete .case-button:hover:not(:disabled) {
    color: #171100;
    border-color: var(--gold);
    background: var(--gold);
    box-shadow:
        0 10px 24px rgba(240, 185, 11, 0.28),
        0 0 18px rgba(240, 185, 11, 0.16);
    transform: translateY(-2px);
}

.incident-card.available .case-button:active:not(:disabled),
.incident-card.complete .case-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.incident-card.locked .case-button {
    cursor: not-allowed;
    opacity: 0.72;
}

/* Use the complete logo without cropping */
.certificate-brand-logo {
    width: min(250px, 62%);
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border-radius: 0;
}

/* Make the on-screen completion layout feel more like a certificate */
.completion-shell {
    display: flex;
    min-height: 720px;
    flex-direction: column;
    justify-content: center;
}

/* One-page landscape certificate that fills the printable page */
@media print {
    @page {
        size: landscape;
        margin: 0.22in;
    }

    html,
    body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
    }

    #completionScreen {
        display: block !important;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .completion-shell {
        display: flex;
        width: 100%;
        height: 7.45in;
        min-height: 7.45in;
        max-height: 7.45in;
        margin: 0;
        padding: 0.30in 0.42in;
        flex-direction: column;
        justify-content: center;
        border: 2px solid #d5a100;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: none;
        overflow: hidden;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .certificate-brand-logo {
        width: 2.35in;
        height: auto;
        max-height: 1.35in;
        margin: 0 auto 0.04in;
        object-fit: contain;
        object-position: center;
    }

    .certificate-tagline {
        margin: 0 0 0.06in;
        color: #9b7200;
        font-size: 9pt;
        letter-spacing: 0.08em;
    }

    #completionScreen .eyebrow {
        margin: 0 0 0.04in;
        color: #9b7200;
        font-size: 8pt;
    }

    #completionScreen h1 {
        margin: 0 0 0.08in;
        color: #0b2132;
        font-size: 31pt;
        line-height: 1;
    }

    .completion-intro {
        max-width: 9.2in;
        margin: 0 auto 0.18in;
        color: #334b5c;
        font-size: 10.5pt;
        line-height: 1.35;
    }

    .completion-grid {
        width: 100%;
        grid-template-columns: 1.08fr 0.92fr;
        gap: 0.20in;
        margin: 0 auto;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .completion-card {
        min-height: 2.55in;
        padding: 0.24in 0.28in;
        border: 1px solid #bfc8cf;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .completion-card h2 {
        margin: 0 0 0.12in;
        color: #111111;
        font-size: 17pt;
    }

    .completion-card dl,
    .mastery-list {
        gap: 0.08in;
        margin-top: 0.10in;
    }

    .completion-card dl > div {
        padding-bottom: 0.07in;
        font-size: 10pt;
    }

    .mastery-list li {
        padding-left: 0.22in;
        color: #111111;
        font-size: 10pt;
        line-height: 1.35;
    }

    .completion-actions,
    .site-header,
    .site-footer {
        display: none !important;
    }
}


/* =========================================================
   PROJECT IRONGATE 3.0 — CERTIFICATE RELEASE
========================================================= */

/* Preserve the gold dashboard-button hover state. */
.incident-card.available .case-button:hover:not(:disabled),
.incident-card.complete .case-button:hover:not(:disabled) {
    color: #171100 !important;
    border-color: var(--gold) !important;
    background: var(--gold) !important;
    box-shadow:
        0 10px 24px rgba(240, 185, 11, 0.30),
        0 0 20px rgba(240, 185, 11, 0.18) !important;
    transform: translateY(-2px);
}

/* Hidden during normal website use. */
.print-certificate {
    display: none;
}


/* ---------------------------------------------------------
   PRINT-ONLY CERTIFICATE
--------------------------------------------------------- */

@media print {

    @page {
        size: letter landscape;
        margin: 0;
    }

    html,
    body {
        width: 11in !important;
        height: 8.5in !important;
        min-width: 11in !important;
        min-height: 8.5in !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    body > *:not(.print-certificate) {
        display: none !important;
    }

    .print-certificate {
        position: fixed !important;
        inset: 0 !important;
        display: block !important;
        width: 11in !important;
        height: 8.5in !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        color: #102638 !important;
        background: #ffffff !important;
        font-family:
            Arial,
            Helvetica,
            sans-serif !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .print-certificate-frame {
        position: absolute;
        inset: 0.28in;
        display: flex;
        padding: 0.30in 0.55in 0.27in;
        overflow: hidden;
        align-items: center;
        flex-direction: column;
        border: 3px solid #d7a400;
        outline: 1px solid #d7a400;
        outline-offset: -0.10in;
        background:
            radial-gradient(
                circle at 50% 0%,
                rgba(240, 185, 11, 0.09),
                transparent 34%
            ),
            #ffffff;
    }

    .print-certificate-corner {
        position: absolute;
        width: 0.45in;
        height: 0.45in;
        border-color: #d7a400;
        border-style: solid;
    }

    .corner-top-left {
        top: 0.12in;
        left: 0.12in;
        border-width: 2px 0 0 2px;
    }

    .corner-top-right {
        top: 0.12in;
        right: 0.12in;
        border-width: 2px 2px 0 0;
    }

    .corner-bottom-left {
        bottom: 0.12in;
        left: 0.12in;
        border-width: 0 0 2px 2px;
    }

    .corner-bottom-right {
        right: 0.12in;
        bottom: 0.12in;
        border-width: 0 2px 2px 0;
    }

    .print-certificate-brand {
        display: flex;
        align-items: center;
        gap: 0.15in;
        margin: 0;
    }

    .print-certificate-brand img {
        display: block;
        width: 0.82in;
        height: 0.82in;
        object-fit: contain;
        border-radius: 0.08in;
        background: #061522;
    }

    .print-certificate-brand div {
        display: flex;
        flex-direction: column;
        line-height: 1.05;
    }

    .print-certificate-brand strong {
        color: #102638;
        font-size: 19pt;
        letter-spacing: -0.03em;
    }

    .print-certificate-brand span {
        color: #b18100;
        font-size: 8.5pt;
        font-weight: 800;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .print-certificate-brand small {
        margin-top: 0.04in;
        color: #5b6871;
        font-size: 7pt;
        font-weight: 700;
        letter-spacing: 0.06em;
    }

    .print-certificate-academy {
        margin: 0.12in 0 0;
        color: #b18100;
        font-size: 9pt;
        font-weight: 900;
        letter-spacing: 0.20em;
        text-transform: uppercase;
    }

    .print-certificate h1 {
        margin: 0.10in 0 0;
        color: #102638;
        font-family:
            Georgia,
            "Times New Roman",
            serif !important;
        font-size: 34pt;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.01em;
        text-align: center;
    }

    .print-certificate-intro {
        margin: 0.14in 0 0;
        color: #5b6871;
        font-size: 10pt;
        font-style: italic;
    }

    .print-certificate-recipient {
        width: 6.2in;
        margin: 0.04in 0 0.08in;
        padding: 0 0 0.04in;
        border-bottom: 1.5px solid #c8a03b;
        color: #102638;
        font-family:
            Georgia,
            "Times New Roman",
            serif !important;
        font-size: 24pt;
        font-style: italic;
        font-weight: 700;
        text-align: center;
    }

    .print-certificate-statement {
        width: 8.8in;
        margin: 0;
        color: #354b5a;
        font-size: 10.5pt;
        line-height: 1.35;
        text-align: center;
    }

    .print-certificate-modules {
        display: flex;
        width: 9.0in;
        margin: 0.18in 0 0;
        padding: 0.13in 0.16in;
        justify-content: space-between;
        gap: 0.08in;
        border-top: 1px solid #d8dee3;
        border-bottom: 1px solid #d8dee3;
        color: #102638;
        font-size: 8.8pt;
        font-weight: 700;
    }

    .print-certificate-modules span::first-letter {
        color: #188b50;
    }

    .print-certificate-footer {
        display: grid;
        width: 9.0in;
        margin-top: auto;
        grid-template-columns: 1fr 1.1in 1fr;
        align-items: end;
        gap: 0.38in;
    }

    .certificate-line-block {
        display: flex;
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .certificate-line-block strong {
        width: 100%;
        min-height: 0.26in;
        padding-bottom: 0.05in;
        border-bottom: 1px solid #5f6c75;
        color: #102638;
        font-size: 10pt;
    }

    .certificate-line-block span {
        margin-top: 0.05in;
        color: #66747e;
        font-size: 7pt;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .certificate-seal {
        display: flex;
        width: 1.04in;
        height: 1.04in;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        border: 3px double #d7a400;
        border-radius: 50%;
        color: #102638;
        background: #fffaf0;
        text-align: center;
    }

    .certificate-seal img {
        width: 0.37in;
        height: 0.37in;
        object-fit: contain;
        border-radius: 0.04in;
        background: #061522;
    }

    .certificate-seal strong {
        margin-top: 0.02in;
        font-size: 6.5pt;
        line-height: 1;
        text-transform: uppercase;
    }

    .certificate-seal span {
        color: #9b7200;
        font-size: 5.5pt;
        font-weight: 800;
        line-height: 1;
        text-transform: uppercase;
    }
}


/* =========================================================
   PROJECT IRONGATE 3.1 — LEARNER IDENTITY + RESET CONTROLS
========================================================= */

.learner-name-group {
    width: min(430px, 100%);
    margin-top: 1.65rem;
}

.learner-name-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.learner-name-group input {
    width: 100%;
    min-height: 52px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(164, 204, 232, 0.24);
    border-radius: 10px;
    outline: none;
    color: var(--white);
    background: rgba(255, 255, 255, 0.045);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.learner-name-group input::placeholder {
    color: rgba(214, 225, 235, 0.46);
}

.learner-name-group input:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.065);
    box-shadow:
        0 0 0 3px rgba(240, 185, 11, 0.10),
        0 8px 22px rgba(0, 0, 0, 0.18);
}

.form-error {
    min-height: 1.4rem;
    margin: 0.35rem 0 0;
    color: #ff9a9a;
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-learner-name {
    margin: 0 0 0.25rem;
    color: var(--gold);
    font-size: 1rem;
    font-weight: 800;
}

.dashboard-progress-tools {
    display: grid;
    gap: 0.7rem;
    justify-items: stretch;
}

.dashboard-reset-button {
    min-height: 38px;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(255, 123, 123, 0.28);
    border-radius: 8px;
    color: #ff9a9a;
    background: rgba(255, 123, 123, 0.045);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition:
        color 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.dashboard-reset-button:hover {
    color: #ffffff;
    border-color: rgba(255, 123, 123, 0.60);
    background: rgba(255, 123, 123, 0.15);
}

.print-certificate-id {
    margin: -0.02in 0 0.10in;
    color: #66747e;
    font-size: 8pt;
    text-align: center;
}

@media (max-width: 900px) {
    .dashboard-progress-tools {
        width: 100%;
    }
}

@media print {
    .print-certificate-id {
        display: block;
    }
}


/* =========================================================
   PROJECT IRONGATE — FINAL POLISH
========================================================= */

/* Clear keyboard focus for presentation and accessibility. */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(240, 185, 11, 0.45);
    outline-offset: 3px;
}

/* Keep interactive motion consistent without adding new features. */
.primary-button,
.secondary-button,
.case-button,
.dashboard-reset-button,
.decision-button,
.knowledge-button {
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease;
}

/* Preserve the approved gold hover state. */
.incident-card.available .case-button:hover:not(:disabled),
.incident-card.complete .case-button:hover:not(:disabled) {
    color: #171100 !important;
    border-color: var(--gold) !important;
    background: var(--gold) !important;
    box-shadow:
        0 10px 24px rgba(240, 185, 11, 0.30),
        0 0 20px rgba(240, 185, 11, 0.18) !important;
    transform: translateY(-2px);
}

/* Prevent locked cards from implying interactivity. */
.incident-card.locked .case-button:hover {
    transform: none;
    box-shadow: none;
}

/* Respect users who prefer reduced animation. */
@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;
    }
}
