:root {
    color-scheme: dark;
    --bg: #07080d;
    --bg-alt: #10111a;
    --panel: rgba(15, 17, 25, 0.92);
    --panel-alt: rgba(31, 24, 52, 0.88);
    --ops-panel: rgba(12, 14, 22, 0.96);
    --ink: #f6f7fb;
    --muted: #aab0c5;
    --accent: #6a1b9a;
    --accent-light: #9c4dcc;
    --accent-strong: #c18bff;
    --success: #57c189;
    --warn: #ffb164;
    --error: #ff7f94;
    --critical: #ff5c7a;
    --high: #ff9b5e;
    --info: #7eb8ff;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    --glow: 0 0 80px rgba(106, 27, 154, 0.22);
    --radius-lg: 26px;
    --radius-md: 18px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --font-sans: "DM Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
    --page-gutter: clamp(1.25rem, 3vw, 2rem);
    --content-width: min(1320px, calc(100vw - (var(--page-gutter) * 2)));
    --soc-cyan: #45e6d4;
    --soc-cyan-dim: rgba(69, 230, 212, 0.55);
    --soc-screen: #04070b;
    --soc-bezel: #141c28;
    --soc-chrome: #0c121a;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(156, 77, 204, 0.2), transparent 36%),
        radial-gradient(circle at 88% 8%, rgba(106, 27, 154, 0.16), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(30, 60, 120, 0.12), transparent 40%),
        linear-gradient(180deg, #0d0f15 0%, var(--bg) 55%, #090a0f 100%);
}

body.ttsim-app::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 20%, transparent 75%);
}

body.ttsim-app::before {
    content: "";
    position: fixed;
    inset: auto;
    z-index: -1;
    border-radius: 999px;
    filter: blur(100px);
    opacity: 0.4;
    top: 5rem;
    right: 6rem;
    width: 20rem;
    height: 20rem;
    background: rgba(106, 27, 154, 0.45);
    animation: float-orb 18s var(--ease-out) infinite alternate;
}

@keyframes float-orb {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-1.5rem, 1rem) scale(1.08); }
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
.button-link,
.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.82rem 1.18rem;
    border-radius: 999px;
    border: 1px solid rgba(193, 139, 255, 0.22);
    background: linear-gradient(135deg, var(--accent) 0%, #4d1680 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(40, 9, 74, 0.34);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

button:hover,
.button-link:hover,
.nav-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(40, 9, 74, 0.42);
    text-decoration: none;
}

button:active,
.button-link:active,
.nav-pill:active {
    transform: translateY(0);
}

button:focus-visible,
.button-link:focus-visible,
.nav-pill:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
}

.button-link.secondary,
button.secondary,
.nav-pill.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    border-color: var(--border);
    box-shadow: none;
}

.messages,
.page-shell,
.site-footer {
    width: var(--content-width);
    margin: 0 auto;
}

.site-header-shell {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid rgba(193, 139, 255, 0.1);
    background: rgba(8, 9, 15, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.session-identity-bar {
    width: 100%;
    border-bottom: 1px solid rgba(193, 139, 255, 0.14);
    background: linear-gradient(90deg, rgba(106, 27, 154, 0.22) 0%, rgba(18, 28, 48, 0.55) 100%);
}

.session-identity-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    width: var(--content-width);
    margin: 0 auto;
    padding: 0.5rem var(--page-gutter);
}

.session-identity-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.session-identity-user {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(193, 139, 255, 0.35);
    background: rgba(8, 9, 15, 0.55);
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.session-identity-meta {
    font-size: 0.82rem;
    color: var(--muted);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.65rem 1rem;
    background: var(--accent);
    color: #fff;
    border-radius: 0 0 12px 12px;
    font-weight: 700;
}

.skip-link:focus {
    left: 1rem;
    text-decoration: none;
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
    width: var(--content-width);
    margin: 0 auto;
    padding: 1.35rem var(--page-gutter) 1.25rem;
}

.brand-row {
    max-width: 48rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--ink);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    max-width: 11rem;
    height: 3.35rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.brand-mark img {
    display: block;
    width: auto;
    height: 100%;
    max-height: 3.35rem;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.brand-kicker,
.footer-title,
.eyebrow,
th {
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.brand-kicker,
.footer-title,
.eyebrow {
    font-size: 0.74rem;
    color: var(--accent-strong);
}

.brand-title {
    font-size: 1.95rem;
    line-height: 1;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent-strong) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline,
.subtle {
    margin: 0.55rem 0 0;
    color: var(--muted);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    align-items: center;
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

.logout-form button.nav-pill {
    font: inherit;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(193, 139, 255, 0.22);
    background: rgba(106, 27, 154, 0.15);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 600;
}

.host-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    font-family: var(--font-mono);
}

.messages {
    margin: 0 auto 1rem;
}

.message {
    padding: 0.95rem 1rem 0.95rem 2.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.7rem;
    position: relative;
    line-height: 1.5;
}

.message::before {
    position: absolute;
    left: 1rem;
    top: 0.95rem;
    font-weight: 800;
    font-size: 0.9rem;
}

.message.info::before,
.message:not(.error):not(.success):not(.warning)::before {
    content: "ℹ";
    color: var(--info);
}

.message.error {
    background: rgba(255, 127, 148, 0.12);
    border-color: rgba(255, 127, 148, 0.22);
    border-left: 3px solid var(--error);
}

.message.error::before {
    content: "!";
    color: var(--error);
}

.message.success {
    background: rgba(87, 193, 137, 0.14);
    border-color: rgba(87, 193, 137, 0.22);
    border-left: 3px solid var(--success);
}

.message.success::before {
    content: "✓";
    color: var(--success);
}

.message.warning {
    border-left: 3px solid var(--warn);
}

.message.warning::before {
    content: "⚠";
    color: var(--warn);
}

.page-shell {
    padding-top: 1.35rem;
    padding-bottom: 2.6rem;
}

.page-enter > .panel,
.page-enter > section {
    animation: rise-in 0.55s var(--ease-out) backwards;
}

.page-enter > *:nth-child(1) { animation-delay: 0.04s; }
.page-enter > *:nth-child(2) { animation-delay: 0.1s; }
.page-enter > *:nth-child(3) { animation-delay: 0.16s; }
.page-enter > *:nth-child(4) { animation-delay: 0.22s; }

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 2.8rem;
}

.footer-title {
    margin: 0 0 0.4rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.15rem;
    align-items: center;
}

.panel {
    background: linear-gradient(165deg, rgba(22, 24, 36, 0.94) 0%, rgba(11, 13, 20, 0.98) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.45rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    backdrop-filter: blur(12px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}

.panel:hover {
    border-color: rgba(193, 139, 255, 0.16);
}

.hero-glow {
    border-color: rgba(193, 139, 255, 0.2);
    box-shadow: var(--shadow), var(--glow);
}

.hero-glow:hover {
    border-color: rgba(193, 139, 255, 0.32);
}

.hero-title {
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    max-width: 18ch;
}

.hero-lede {
    font-size: 1.05rem;
    color: #c8cde0;
    max-width: 52ch;
    margin-bottom: 0.25rem;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.15rem;
}

.feature-pills li {
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #d8c4f5;
    border: 1px solid rgba(193, 139, 255, 0.22);
    background: rgba(106, 27, 154, 0.12);
}

h1, h2, h3 {
    letter-spacing: -0.02em;
}

.panel.narrow {
    max-width: 560px;
    margin: 2rem auto;
}

.workspace-hero {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: stretch;
    gap: 1.35rem;
}

.workspace-hero > * {
    min-width: 0;
}

.hero,
.workspace-hero,
.two-column-grid,
.three-column-grid,
.stats-grid,
.metrics-grid {
    display: grid;
    gap: 1rem;
}

.hero {
    grid-template-columns: 1.7fr 1fr;
    align-items: center;
}

.two-column-grid {
    grid-template-columns: 1.1fr 0.9fr;
}

.three-column-grid {
    grid-template-columns: 0.9fr 1.4fr 1fr;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 1rem 0;
}

.stat-card {
    min-width: 0;
    background: linear-gradient(180deg, rgba(41, 28, 72, 0.75) 0%, rgba(21, 20, 34, 0.85) 100%);
    border: 1px solid rgba(193, 139, 255, 0.14);
    border-radius: 20px;
    padding: 1rem;
}

.stat-card-interactive {
    transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.stat-card-interactive:hover {
    transform: translateY(-3px);
    border-color: rgba(193, 139, 255, 0.28);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.stat-card strong,
.host-chip {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
}

.stat-card strong {
    font-size: 1.35rem;
}

.stat-note {
    display: block;
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.wide-panel {
    min-width: 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.cta-row,
.header-actions,
.inline-form-group,
.seat-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.stack-form select {
    color-scheme: dark;
    background: rgba(12, 10, 18, 0.92);
    color: var(--ink);
    border-color: rgba(193, 139, 255, 0.2);
}

.stack-form select option {
    background: #120d1c;
    color: var(--ink);
}

.seat-view-grid,
.seat-view-columns {
    display: grid;
    gap: 1rem;
}

.seat-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seat-view-card {
    min-width: 0;
    padding: 1.15rem;
    border-radius: 22px;
    border: 1px solid rgba(193, 139, 255, 0.18);
    background: linear-gradient(180deg, rgba(29, 21, 49, 0.84) 0%, rgba(12, 10, 18, 0.94) 100%);
}

.seat-view-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.seat-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.seat-metrics dd {
    font-size: 1.02rem;
    font-weight: 700;
}

.seat-assignment-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(193, 139, 255, 0.14);
}

.seat-assignment-form button {
    margin-top: 0.65rem;
}

.seat-assignment-note {
    margin-top: 0.65rem;
}

.seat-view-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.compact-list li {
    padding: 0.72rem 0;
}

.compact-list .subtle,
.seat-focus {
    margin-top: 0.4rem;
}

.workspace-hero h1,
.workspace-hero p,
.stat-note {
    max-width: 100%;
}

.stack-form p,
.stack-form label {
    margin: 0 0 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #d4d9ea;
}

.login-panel {
    box-shadow: var(--shadow), var(--glow);
}

.login-footer {
    margin: 1.25rem 0 0;
    text-align: center;
}

.login-footer a {
    font-weight: 600;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
    width: 100%;
    padding: 0.82rem 0.92rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
    outline: none;
    border-color: rgba(193, 139, 255, 0.44);
    box-shadow: 0 0 0 4px rgba(106, 27, 154, 0.18);
}

.stack-form .helptext,
.stack-form ul {
    color: var(--muted);
}

.stack-form button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.compact-form {
    margin-top: 1rem;
}

.panel-intro {
    color: var(--muted);
    max-width: 58ch;
}

.inline-note {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 177, 100, 0.24);
    background: rgba(255, 177, 100, 0.1);
    color: #ffd9b5;
}

.stack-buttons > form {
    margin-bottom: 0.95rem;
}

.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.org-list {
    display: grid;
    gap: 0.9rem;
}

.org-card {
    padding: 1.1rem;
    border-radius: 22px;
    border: 1px solid rgba(193, 139, 255, 0.14);
    background: linear-gradient(180deg, rgba(29, 21, 49, 0.64) 0%, rgba(16, 17, 27, 0.88) 100%);
}

.org-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.org-card h3 {
    margin-bottom: 0.2rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1rem 0 0;
}

.meta-grid dt {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.meta-grid dd {
    margin: 0.3rem 0 0;
    color: var(--ink);
}

.empty-state {
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px dashed rgba(193, 139, 255, 0.28);
    background: rgba(255, 255, 255, 0.03);
}

.bordered-list li {
    padding: 0.82rem 0;
    border-bottom: 1px solid var(--border);
}

.bordered-list li:last-child {
    border-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.8rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    font-size: 0.76rem;
    color: var(--accent-strong);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.status-pill,
.seat-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.status-pill.active {
    background: rgba(87, 193, 137, 0.14);
    border-color: rgba(87, 193, 137, 0.3);
}

.seat-pill.active {
    background: rgba(106, 27, 154, 0.22);
    border-color: rgba(193, 139, 255, 0.34);
}

.status-pill.stale {
    background: rgba(255, 177, 100, 0.14);
    border-color: rgba(255, 177, 100, 0.26);
}

.status-pill.solo {
    background: rgba(126, 184, 255, 0.14);
    border-color: rgba(126, 184, 255, 0.32);
    color: #c5ddff;
}

.solo-banner.banner-slim {
    border-color: rgba(126, 184, 255, 0.28);
    background: linear-gradient(135deg, rgba(18, 28, 48, 0.95) 0%, rgba(12, 14, 22, 0.98) 100%);
}

.solo-banner p {
    margin: 0.35rem 0 0;
    max-width: 72ch;
}

.kickstart-panel {
    border-color: rgba(87, 193, 137, 0.35);
    background: linear-gradient(135deg, rgba(16, 40, 32, 0.92) 0%, rgba(12, 14, 22, 0.98) 100%);
    box-shadow: var(--shadow), 0 0 60px rgba(87, 193, 137, 0.12);
}

.kickstart-panel h2 {
    margin-bottom: 0.5rem;
}

.kickstart-actions {
    margin-top: 1rem;
}

.kickstart-hint {
    margin: 0.85rem 0 0;
    font-size: 0.88rem;
}

.mitigation-status {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(87, 193, 137, 0.22);
    background: rgba(87, 193, 137, 0.06);
}

.mitigation-explainer {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    max-width: 52ch;
}

.mitigation-grid {
    margin-bottom: 0.75rem;
}

.mitigation-chip-row {
    margin: 0.45rem 0 0;
    font-size: 0.88rem;
}

.solo-create-hint {
    margin: 0.85rem 0 0;
    font-size: 0.88rem;
}

.exercise-create-form .form-actions {
    margin-top: 0.35rem;
}

.detail-chip-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.header-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.note-body {
    margin-top: 0.45rem;
    color: var(--ink);
}

.note-list li {
    padding: 1rem 0;
}

.report-preview {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    background: #090b11;
    color: #d6dcf7;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(193, 139, 255, 0.16);
    max-height: 420px;
    overflow: auto;
}

.top-gap {
    margin-top: 1rem;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.trust-note {
    margin: 0 0 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(87, 193, 137, 0.22);
    background: rgba(87, 193, 137, 0.08);
    color: #c8f0d9;
    font-size: 0.92rem;
}

.how-it-works h2 {
    margin-bottom: 1rem;
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.steps-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(106, 27, 154, 0.28);
    color: var(--accent-strong);
    font-weight: 800;
}

.scenario-teaser-grid,
.exercise-card-grid,
.inject-card-grid {
    display: grid;
    gap: 1rem;
}

.scenario-teaser-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.scenario-teaser-card {
    padding: 1.1rem 1.15rem;
    border-radius: 20px;
    border: 1px solid rgba(193, 139, 255, 0.16);
    background: linear-gradient(180deg, rgba(24, 20, 38, 0.9) 0%, rgba(12, 13, 20, 0.95) 100%);
    transition: transform 0.25s var(--ease-out), border-color 0.25s ease;
}

.scenario-teaser-card:hover {
    transform: translateY(-2px);
    border-color: rgba(193, 139, 255, 0.3);
}

.scenario-teaser-card h3 {
    margin: 0.35rem 0 0.55rem;
    font-size: 1.08rem;
}

.scenario-id {
    margin: 0;
    font-size: 0.72rem;
    color: var(--accent-strong);
    letter-spacing: 0.04em;
}

.exercise-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.exercise-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.15rem;
    border-radius: 22px;
    border: 1px solid rgba(193, 139, 255, 0.14);
    background: linear-gradient(180deg, rgba(22, 24, 34, 0.95) 0%, rgba(11, 12, 18, 0.98) 100%);
    transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.exercise-card:hover {
    transform: translateY(-2px);
    border-color: rgba(193, 139, 255, 0.28);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.exercise-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.exercise-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.exercise-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.exercise-card h3 a:hover {
    color: var(--accent-strong);
}

.exercise-scenario {
    margin: 0;
    font-weight: 600;
    color: var(--accent-strong);
}

.exercise-meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.exercise-card .button-link {
    margin-top: 0.35rem;
    align-self: flex-start;
}

.exercise-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.exercise-card-archived {
    opacity: 0.92;
    border-color: rgba(255, 255, 255, 0.1);
}

.archived-exercises-panel {
    margin-top: 1rem;
}

.archived-banner {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.archived-banner p {
    margin: 0.35rem 0 0;
    max-width: 72ch;
}

.archived-banner a {
    color: var(--accent-strong);
}

button.danger,
.button-link.danger,
.compact-btn.danger {
    background: linear-gradient(135deg, rgba(120, 28, 48, 0.95) 0%, rgba(80, 16, 32, 0.98) 100%);
    border-color: rgba(255, 92, 122, 0.45);
    color: #ffd0d8;
}

button.danger:hover,
.compact-btn.danger:hover {
    border-color: rgba(255, 120, 140, 0.55);
    color: #fff;
}

.compact-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
}

.header-actions .header-manage-form {
    display: inline-flex;
}

.exercise-room .ops-panel {
    background: linear-gradient(180deg, var(--ops-panel) 0%, rgba(8, 9, 14, 0.98) 100%);
}

/* SOC console — exercise room */
body.exercise-room {
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(69, 230, 212, 0.08), transparent 50%),
        radial-gradient(circle at 8% 90%, rgba(106, 27, 154, 0.14), transparent 35%),
        linear-gradient(180deg, #05070c 0%, var(--bg) 45%, #060810 100%);
}

body.exercise-room.ttsim-app::after {
    opacity: 0.22;
    background-size: 32px 32px;
    background-image:
        linear-gradient(rgba(69, 230, 212, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(69, 230, 212, 0.04) 1px, transparent 1px);
}

body.exercise-room.ttsim-app::before {
    background: rgba(69, 230, 212, 0.12);
    opacity: 0.25;
}

.exercise-room .soc-hud.mission-control {
    border-color: rgba(69, 230, 212, 0.2);
    background:
        linear-gradient(180deg, rgba(12, 22, 32, 0.98) 0%, rgba(6, 10, 16, 0.99) 100%);
    box-shadow:
        inset 0 1px 0 rgba(69, 230, 212, 0.12),
        0 12px 40px rgba(0, 0, 0, 0.45);
}

.exercise-room .soc-clock {
    font-family: var(--font-mono);
    color: var(--soc-cyan);
    text-shadow: 0 0 24px rgba(69, 230, 212, 0.35);
}

.exercise-room .ops-metrics .stat-card {
    border-color: rgba(69, 230, 212, 0.12);
    background: linear-gradient(180deg, rgba(10, 18, 26, 0.95) 0%, rgba(6, 8, 12, 0.98) 100%);
}

.exercise-room .ops-metrics .stat-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--soc-cyan-dim);
}

.exercise-room .ops-metrics strong {
    font-family: var(--font-mono);
}

.exercise-room .soc-console-panel {
    padding: 1rem;
    border-color: rgba(69, 230, 212, 0.15);
    background: linear-gradient(180deg, rgba(8, 14, 20, 0.6) 0%, rgba(4, 6, 10, 0.85) 100%);
}

.soc-console {
    border-radius: 12px;
    border: 2px solid var(--soc-bezel);
    background: var(--soc-chrome);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.8),
        0 18px 50px rgba(0, 0, 0, 0.55),
        inset 0 0 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.soc-console-chrome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid rgba(69, 230, 212, 0.15);
    background: linear-gradient(90deg, rgba(20, 32, 44, 0.95) 0%, rgba(10, 16, 24, 0.98) 100%);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.soc-console-chrome.secondary {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(14, 20, 28, 0.95) 0%, rgba(8, 12, 18, 0.98) 100%);
}

.soc-console-led {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 8px var(--success), 0 0 16px rgba(87, 193, 137, 0.5);
    animation: soc-led-pulse 2s ease-in-out infinite;
}

.soc-console-led.dim {
    background: var(--soc-cyan-dim);
    box-shadow: 0 0 6px rgba(69, 230, 212, 0.4);
    animation: none;
}

.soc-console-title {
    font-weight: 700;
    color: var(--soc-cyan);
}

.soc-console-meta {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.68rem;
}

.soc-console-screen {
    position: relative;
    padding: 0.85rem;
    background:
        radial-gradient(ellipse 100% 80% at 50% 0%, rgba(69, 230, 212, 0.06), transparent 55%),
        var(--soc-screen);
    min-height: 4rem;
}

.soc-console-screen.compact {
    padding: 0.65rem 0.85rem;
}

.soc-screen-scan {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.07;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(69, 230, 212, 0.15) 2px,
        rgba(69, 230, 212, 0.15) 3px
    );
}

.soc-console-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

.soc-console-screen > .alert-feed,
.soc-console-screen > .timeline-rail,
.soc-console-screen > .soc-empty {
    position: relative;
    z-index: 1;
}

.exercise-room .alert-feed {
    gap: 0.65rem;
}

.exercise-room .soc-alert {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(69, 230, 212, 0.1);
    border-left-width: 3px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.exercise-room .soc-alert:hover {
    border-color: rgba(69, 230, 212, 0.22);
    box-shadow:
        inset 0 0 0 1px rgba(69, 230, 212, 0.08),
        0 4px 20px rgba(0, 0, 0, 0.35);
}

.exercise-room .soc-alert.severity-critical {
    border-left-color: var(--critical);
    background: linear-gradient(90deg, rgba(255, 92, 122, 0.12) 0%, rgba(0, 0, 0, 0.4) 35%);
    animation: soc-alert-flash 4s ease-in-out infinite;
}

.exercise-room .soc-alert.severity-high {
    border-left-color: var(--high);
    background: linear-gradient(90deg, rgba(255, 155, 94, 0.08) 0%, rgba(0, 0, 0, 0.38) 40%);
}

.exercise-room .soc-alert.severity-warning {
    border-left-color: var(--warn);
}

.exercise-room .soc-alert.severity-info {
    border-left-color: var(--info);
}

.soc-alert-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding-top: 0.15rem;
}

.soc-alert-led {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--muted);
}

.soc-alert.severity-critical .soc-alert-led {
    background: var(--critical);
    box-shadow: 0 0 10px var(--critical);
    animation: soc-led-pulse 1.2s ease-in-out infinite;
}

.soc-alert.severity-high .soc-alert-led {
    background: var(--high);
    box-shadow: 0 0 8px rgba(255, 155, 94, 0.6);
}

.soc-alert.severity-warning .soc-alert-led {
    background: var(--warn);
}

.soc-alert.severity-info .soc-alert-led {
    background: var(--info);
}

.soc-alert-id {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--soc-cyan-dim);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.exercise-room .soc-alert h4 {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 600;
    color: #e8f4f2;
}

.exercise-room .alert-summary {
    font-size: 0.86rem;
    line-height: 1.45;
}

.exercise-room .alert-route,
.exercise-room .timeline-route {
    color: var(--soc-cyan-dim);
}

.exercise-room .soc-timeline .timeline-entry {
    border-bottom-color: rgba(69, 230, 212, 0.08);
    padding: 0.75rem 0;
}

.exercise-room .soc-timeline .timeline-body h4 {
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

.exercise-room .soc-timeline .timeline-marker {
    box-shadow: 0 0 10px currentColor;
}

.exercise-room .soc-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--soc-cyan-dim);
}

.exercise-room .soc-empty strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    color: var(--soc-cyan);
    margin-bottom: 0.5rem;
}

.exercise-room .kind-badge {
    border: 1px solid rgba(69, 230, 212, 0.12);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.exercise-room .soc-ops-rail {
    border-color: rgba(69, 230, 212, 0.14);
    box-shadow: inset 3px 0 0 rgba(69, 230, 212, 0.35);
}

.exercise-room .soc-rail-label {
    color: var(--soc-cyan);
    margin-bottom: 0.15rem;
}

@keyframes soc-led-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@keyframes soc-alert-flash {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 92, 122, 0.08); }
    50% { box-shadow: inset 0 0 24px rgba(255, 92, 122, 0.08); }
}

@media (prefers-reduced-motion: reduce) {
    .soc-console-led,
    .soc-alert.severity-critical .soc-alert-led,
    .exercise-room .soc-alert.severity-critical {
        animation: none;
    }
}

/* Exercise room — compact layout, less scrolling */
.exercise-room .page-shell {
    width: min(1680px, calc(100vw - (var(--page-gutter) * 2)));
    padding-top: 0.85rem;
}

.exercise-room .page-enter > * {
    animation: none;
}

.banner-slim {
    padding: 0.55rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
}

.banner-slim p {
    margin: 0;
    font-size: 0.88rem;
}

.exercise-details-drawer {
    margin-bottom: 0.5rem;
    padding: 0;
    overflow: hidden;
}

.exercise-details-drawer > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    padding: 0.65rem 1rem;
}

.exercise-details-drawer > summary::-webkit-details-marker {
    display: none;
}

.exercise-details-drawer > summary::before {
    content: "▸";
    color: var(--soc-cyan);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.exercise-details-drawer[open] > summary::before {
    transform: rotate(90deg);
}

.exercise-details-title {
    font-weight: 700;
}

.exercise-details-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border);
}

.ops-command-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    margin-bottom: 0.65rem;
    padding: 0.85rem 1rem;
    border-color: rgba(69, 230, 212, 0.22);
}

.command-bar-grid {
    display: grid;
    grid-template-columns: minmax(7rem, 0.75fr) minmax(6rem, 0.55fr) minmax(10rem, 1.1fr) minmax(0, 1.2fr);
    gap: 0.85rem 1rem;
    align-items: start;
}

.command-clock-col .mission-clock {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
}

.command-t-offset {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
}

.command-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.command-action-buttons button,
.command-action-buttons .button-link {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
}

.command-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(69, 230, 212, 0.1);
}

.command-stats-col {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.command-stat-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--soc-cyan-dim);
}

.command-stat-value {
    font-size: 1.1rem;
}

.command-stat-value.alert-stat {
    color: var(--critical);
}

.command-inject-hint,
.command-wait-hint,
.command-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.command-seat-row {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(69, 230, 212, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.command-seat-user {
    margin-left: auto;
}

.ops-stage {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 11rem);
}

.soc-workspace {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.ops-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    max-height: calc(100vh - 8.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.85rem;
}

.ops-sidebar-title {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}

.ops-center {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    max-height: calc(100vh - 8.5rem);
    min-width: 0;
}

.ops-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(69, 230, 212, 0.14);
    border-bottom: 0;
    background: rgba(8, 12, 18, 0.95);
}

.ops-view-tab {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font: inherit;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.ops-view-tab:hover {
    color: var(--ink);
    border-color: rgba(69, 230, 212, 0.2);
}

.ops-view-tab.active {
    color: var(--soc-cyan);
    border-color: rgba(69, 230, 212, 0.35);
    background: rgba(69, 230, 212, 0.1);
}

.ops-tab-panels {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(69, 230, 212, 0.14);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.ops-tab-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: none;
    flex-direction: column;
}

.ops-tab-panel.active {
    display: flex;
}

.ops-fit-panel {
    min-height: 0;
    overflow: hidden;
}

.ops-fit-console {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.alerts-fit-pane,
.timeline-fit-pane {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.alert-feed-fit {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-content: flex-start;
}

.alert-feed-fit .soc-alert {
    flex: 0 0 auto;
    min-height: auto;
}

.timeline-rail-fit {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-content: flex-start;
}

.timeline-rail-fit .timeline-entry {
    flex: 0 0 auto;
}

.timeline-rail-fit .timeline-entry {
    min-height: 0;
    padding: 0.35rem 0;
    border-bottom-color: rgba(69, 230, 212, 0.08);
    overflow: hidden;
}

.timeline-rail-fit .timeline-body h4,
.timeline-rail-fit .timeline-route {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ops-notes-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0.75rem;
    margin: 0;
    background: transparent;
    border: 0;
}

.note-stream-fit {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.note-stream-fit .note-item {
    flex: 0 0 auto;
}

.note-stream-fit .note-body {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.command-bar-tools {
    margin-left: auto;
    display: inline-flex;
}

.ops-fullscreen-toggle .ops-fs-icon-exit {
    display: none;
}

body.ops-fullscreen .ops-fullscreen-toggle .ops-fs-icon-enter {
    display: none;
}

body.ops-fullscreen .ops-fullscreen-toggle .ops-fs-icon-exit {
    display: inline;
}

/* Fullscreen operations mode */
html.ops-fullscreen,
body.ops-fullscreen {
    overflow: hidden;
    height: 100%;
}

body.ops-fullscreen .site-header-shell,
body.ops-fullscreen .site-footer,
body.ops-fullscreen .ops-stage > .banner-slim,
body.ops-fullscreen .ops-stage > .exercise-details-drawer,
body.ops-fullscreen .gm-drawer,
body.ops-fullscreen .aar-drawer {
    display: none !important;
}

body.ops-fullscreen .messages {
    position: fixed;
    top: 0.65rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    width: min(560px, calc(100vw - 2rem));
    margin: 0;
    pointer-events: none;
}

body.ops-fullscreen .messages .message {
    pointer-events: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body.ops-fullscreen .page-shell {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    height: 100vh;
}

body.ops-fullscreen #ops-stage {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.45rem;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 90% 50% at 50% 0%, rgba(69, 230, 212, 0.1), transparent 55%),
        #05070c;
}

body.ops-fullscreen .ops-command-bar {
    position: static;
    flex: 0 0 auto;
    margin: 0;
    padding: 0.55rem 0.75rem;
}

body.ops-fullscreen .command-bar-grid {
    grid-template-columns: minmax(6rem, 0.5fr) minmax(5rem, 0.4fr) minmax(8rem, 0.9fr) minmax(0, 1fr) auto;
    gap: 0.5rem 0.65rem;
}

body.ops-fullscreen .command-seat-row {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
}

body.ops-fullscreen .command-clock-col .mission-clock {
    font-size: 1.65rem;
}

body.ops-fullscreen .soc-workspace {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    grid-template-columns: minmax(220px, 18vw) minmax(0, 1fr);
}

body.ops-fullscreen .ops-sidebar,
body.ops-fullscreen .ops-center {
    max-height: none;
    height: 100%;
    min-height: 0;
}

body.ops-fullscreen .ops-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

body.ops-fullscreen .ops-center {
    overflow: hidden;
}

body.ops-fullscreen .ops-sidebar-title {
    display: none;
}

body.ops-fullscreen .control-block {
    flex: 0 0 auto;
    margin: 0;
}

body.ops-fullscreen .control-block[data-fs-flex="1"] {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

body.ops-fullscreen .control-block[data-fs-flex="1"] .control-block-body {
    max-height: none;
    overflow: visible;
}

.control-block {
    flex: 0 0 auto;
    position: relative;
    isolation: isolate;
    overflow: visible;
    margin-bottom: 0;
    border: 1px solid rgba(69, 230, 212, 0.1);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.control-block > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.control-block > summary::-webkit-details-marker {
    display: none;
}

.control-count {
    margin-left: 0.35rem;
    color: var(--soc-cyan-dim);
    font-size: 0.75rem;
}

.control-block-body {
    padding: 0 0.65rem 0.65rem;
}

.action-cards-compact {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 0;
}

.action-cards-compact .action-row-form {
    margin: 0;
    flex: 0 0 auto;
}

#response-actions-panel .action-row-form {
    display: block;
    visibility: visible;
}

/* Unified SOC action buttons — sidebar + alert cards */
.exercise-room .ops-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    width: auto;
    max-width: 100%;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(69, 230, 212, 0.32);
    background: rgba(6, 20, 28, 0.92);
    color: #c5efff;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.exercise-room .ops-action-btn:hover {
    border-color: rgba(69, 230, 212, 0.55);
    background: rgba(10, 32, 42, 0.96);
    color: #e4f9ff;
    transform: none;
    box-shadow: 0 0 10px rgba(69, 230, 212, 0.1);
}

.exercise-room .ops-action-btn:active {
    transform: none;
    background: rgba(4, 16, 22, 0.98);
}

.exercise-room .ops-action-btn:focus-visible {
    outline: 2px solid rgba(69, 230, 212, 0.65);
    outline-offset: 2px;
}

.exercise-room .ops-action-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.exercise-room .action-cards-compact .ops-action-btn {
    width: 100%;
}

.exercise-room .action-row-form.action-applied .ops-action-btn {
    border-color: rgba(61, 255, 138, 0.42);
    background: rgba(6, 24, 16, 0.88);
    color: #9dffc0;
    opacity: 1;
}

.exercise-room .ops-action-btn-compact {
    width: auto;
    padding: 0.38rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.exercise-room .inject-action-form {
    margin: 0;
}

.inject-list-compact {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ops-guidance {
    margin-bottom: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(69, 230, 212, 0.28);
    background: rgba(6, 18, 26, 0.92);
}

.ops-guidance-advance,
.ops-guidance-switch {
    border-color: rgba(255, 177, 100, 0.4);
    background: rgba(32, 18, 8, 0.9);
}

.ops-guidance-complete {
    border-color: rgba(61, 255, 138, 0.35);
}

.solo-level-track {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    margin-right: 0.5rem;
}

.solo-level-step {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: var(--muted);
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.solo-level-step.solo-level-done {
    color: #8dffc0;
    opacity: 0.85;
}

.solo-level-step.solo-level-current {
    color: #c5efff;
    border-color: rgba(69, 230, 212, 0.35);
    background: rgba(6, 20, 28, 0.85);
}

.solo-level-code {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.solo-level-connector {
    color: rgba(69, 230, 212, 0.35);
    font-size: 0.7rem;
}

.solo-chair-pill {
    margin-left: auto;
}

.solo-parallel-feed {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.solo-parallel-item {
    font-size: 0.74rem;
    line-height: 1.35;
    color: #b8d4e8;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    border-left: 2px solid rgba(193, 139, 255, 0.45);
    background: rgba(12, 10, 22, 0.6);
}

.solo-chair-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ops-guidance-escalate {
    border-color: rgba(193, 139, 255, 0.45);
    background: rgba(18, 10, 28, 0.92);
}

.ops-guidance-headline {
    margin: 0 0 0.5rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: #d8f4ff;
}

.ops-guidance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ops-guidance-seats {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ops-guidance-seat-link {
    appearance: none;
    border: 1px solid rgba(193, 139, 255, 0.35);
    border-radius: 999px;
    background: rgba(8, 9, 15, 0.7);
    color: #e8d4ff;
    font: inherit;
    font-size: 0.74rem;
    padding: 0.28rem 0.55rem;
    cursor: pointer;
}

.ops-guidance-seat-link:hover {
    border-color: rgba(193, 139, 255, 0.55);
}

.action-playbook {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.playbook-item.playbook-parallel {
    opacity: 0.82;
}

.playbook-item.playbook-parallel .playbook-marker {
    color: #c8a8ff;
}

.playbook-item.playbook-parallel_next {
    border-left: 2px solid rgba(193, 139, 255, 0.55);
    padding-left: 0.35rem;
}

.playbook-item.playbook-parallel_next .playbook-marker {
    color: #e8c4ff;
}

.playbook-title-active {
    color: #e8d4ff;
}

.playbook-item.playbook-parallel_queued,
.playbook-item.playbook-parallel_waiting {
    opacity: 0.72;
}

.playbook-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.playbook-marker {
    flex-shrink: 0;
    width: 1rem;
    color: var(--muted);
}

.playbook-applied .playbook-marker {
    color: #9dffc0;
}

.playbook-available .playbook-title {
    color: #c5efff;
}

.playbook-other_seat .playbook-title {
    color: var(--muted);
}

.playbook-meta {
    margin-left: auto;
    font-size: 0.68rem;
}

.ops-action-feedback {
    margin-bottom: 0.65rem;
    padding: 0.7rem 0.9rem;
    border-color: rgba(61, 255, 138, 0.35);
    background: linear-gradient(90deg, rgba(8, 32, 22, 0.92), rgba(6, 18, 14, 0.88));
    color: #d4ffe6;
    font-size: 0.86rem;
    animation: ops-activity-in 0.45s ease-out;
}

.ops-action-feedback.error {
    border-color: rgba(255, 90, 90, 0.45);
    background: linear-gradient(90deg, rgba(40, 10, 14, 0.92), rgba(22, 8, 10, 0.88));
    color: #ffd4d4;
}

#mitigation-panel-host.action-pulse {
    animation: telemetry-flash 0.75s ease-out;
}

.inject-list-compact .inject-row {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}

.inject-list-compact .inject-row:last-child {
    border-bottom: 0;
}

.inject-row-head {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.inject-row-title {
    margin: 0 0 0.4rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.compact-mitigation {
    margin-bottom: 0.5rem;
}

.mitigation-line {
    margin: 0.35rem 0;
    font-size: 0.8rem;
}

.notes-form-compact textarea {
    min-height: 4rem;
}

.note-stream-compact .note-item {
    padding: 0.55rem 0;
}

.note-stream-compact .note-body {
    font-size: 0.86rem;
}

.gm-drawer,
.aar-drawer {
    margin-top: 0.65rem;
}

.gm-drawer > summary,
.aar-drawer > summary {
    cursor: pointer;
    font-weight: 700;
    padding: 0.75rem 1rem;
}

.gm-drawer-body {
    padding: 0 1rem 1rem;
}

.exercise-room .soc-alert {
    grid-template-columns: 1rem 1fr;
}

.exercise-room .alert-remediation {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.exercise-room .alert-remediation .eyebrow {
    display: none;
}

@media (max-width: 1200px) {
    .soc-workspace {
        grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    }

    .command-bar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-stats-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 800px) {
    .soc-workspace {
        grid-template-columns: 1fr;
    }

    .ops-sidebar,
    .ops-center {
        max-height: none;
    }

    .command-bar-grid {
        grid-template-columns: 1fr;
    }

    .ops-command-bar {
        position: static;
    }

    body.ops-fullscreen .soc-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    body.ops-fullscreen .ops-sidebar {
        max-height: 28vh;
    }
}

.mission-control {
    display: grid;
    grid-template-columns: minmax(10rem, 0.9fr) minmax(8rem, 0.6fr) minmax(0, 1.8fr);
    gap: 1.25rem;
    align-items: start;
    border-color: rgba(193, 139, 255, 0.22);
    background: linear-gradient(135deg, rgba(20, 14, 34, 0.95) 0%, rgba(10, 12, 20, 0.98) 55%, rgba(8, 16, 28, 0.96) 100%);
}

.mission-clock {
    margin: 0.15rem 0 0;
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    color: #fff;
}

.phase-pill {
    display: inline-flex;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.phase-staging {
    background: rgba(126, 184, 255, 0.14);
    border: 1px solid rgba(126, 184, 255, 0.35);
    color: #b9d8ff;
}

.phase-active {
    background: rgba(87, 193, 137, 0.14);
    border: 1px solid rgba(87, 193, 137, 0.35);
    color: #b8f0d0;
    animation: phase-pulse 2.4s ease-in-out infinite;
}

.phase-debrief {
    background: rgba(193, 139, 255, 0.14);
    border: 1px solid rgba(193, 139, 255, 0.32);
    color: #e4ccff;
}

.phase-complete {
    background: rgba(255, 196, 87, 0.16);
    border: 1px solid rgba(255, 196, 87, 0.38);
    color: #ffe8b8;
}

.completion-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    border-color: rgba(255, 196, 87, 0.35);
    background: linear-gradient(135deg, rgba(48, 36, 12, 0.92) 0%, rgba(12, 14, 22, 0.98) 100%);
    box-shadow: var(--shadow), 0 0 48px rgba(255, 196, 87, 0.1);
}

.completion-banner h2 {
    margin: 0.2rem 0 0.45rem;
    font-size: 1.35rem;
}

.completion-banner p {
    margin: 0;
    max-width: 62ch;
}

.completion-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.debrief-hero {
    border-color: rgba(255, 196, 87, 0.32);
    background: linear-gradient(135deg, rgba(40, 32, 14, 0.95) 0%, rgba(12, 14, 22, 0.98) 55%, rgba(16, 28, 40, 0.96) 100%);
    box-shadow: var(--shadow), 0 0 64px rgba(255, 196, 87, 0.12);
}

.debrief-hero h1 {
    margin: 0.25rem 0 0.65rem;
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
}

.debrief-hero-actions {
    margin-top: 1.1rem;
}

.debrief-metrics {
    margin-top: 1rem;
}

.debrief-export-panel {
    margin-top: 1rem;
}

.mission-next-inject .compact-cta {
    display: inline-flex;
    margin-top: 0.65rem;
    font-size: 0.9rem;
    padding: 0.45rem 0.85rem;
}

@keyframes phase-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(87, 193, 137, 0); }
    50% { box-shadow: 0 0 0 6px rgba(87, 193, 137, 0.12); }
}

.mission-next-inject h3 {
    margin: 0.25rem 0 0.45rem;
    font-size: 1.1rem;
}

.inject-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.inject-due {
    color: var(--warn);
}

.ops-metrics .metric-highlight {
    border-color: rgba(255, 92, 122, 0.28);
    background: linear-gradient(180deg, rgba(60, 18, 32, 0.55) 0%, rgba(18, 14, 24, 0.9) 100%);
}

.severity-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.severity-critical .severity-badge,
.severity-badge.severity-critical {
    background: rgba(255, 92, 122, 0.2);
    color: #ffc2ce;
}

.severity-high .severity-badge,
.severity-badge.severity-high {
    background: rgba(255, 155, 94, 0.18);
    color: #ffd4b0;
}

.severity-warning .severity-badge,
.severity-badge.severity-warning {
    background: rgba(255, 177, 100, 0.16);
    color: #ffe2b8;
}

.severity-info .severity-badge,
.severity-badge.severity-info {
    background: rgba(126, 184, 255, 0.16);
    color: #c5ddff;
}

.kind-badge {
    display: inline-flex;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.seat-switcher .seat-pill {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.55rem 0.85rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
}

.seat-pill-code {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-strong);
}

.seat-pill-label {
    font-size: 0.82rem;
    font-weight: 600;
}

.alert-feed {
    display: grid;
    gap: 0.75rem;
}

.alert-card {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--muted);
    background: rgba(255, 255, 255, 0.03);
}

.alert-card.severity-critical { border-left-color: var(--critical); }
.alert-card.severity-high { border-left-color: var(--high); }
.alert-card.severity-warning { border-left-color: var(--warn); }
.alert-card.severity-info { border-left-color: var(--info); }

.alert-card.alert-addressed {
    opacity: 0.62;
    border-left-color: rgba(61, 255, 138, 0.45);
}

.alert-card.alert-addressed .soc-alert-led {
    background: rgba(61, 255, 138, 0.55);
    box-shadow: 0 0 8px rgba(61, 255, 138, 0.35);
}

.alert-contained-badge {
    margin-left: auto;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8dffc0;
    border: 1px solid rgba(61, 255, 138, 0.35);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
}

.alert-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.alert-card h4 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.alert-summary {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.alert-route,
.timeline-route {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(170, 176, 197, 0.85);
}

.challenge-decision-panel {
    margin-bottom: 0.85rem;
    padding: 1rem 1.05rem;
    border: 2px solid rgba(193, 139, 255, 0.55);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(88, 48, 140, 0.34), rgba(36, 20, 58, 0.55));
    box-shadow: 0 0 24px rgba(147, 88, 220, 0.18);
}

.challenge-decision-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8c4ff;
}

.challenge-decision-title {
    margin: 0 0 0.35rem;
    font-size: 1.08rem;
}

.challenge-decision-summary {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.challenge-prompt-prominent {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

.challenge-option-label-prominent {
    font-size: 0.95rem;
}

.challenge-submit-prominent {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.alert-challenge {
    margin-top: 0.85rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(193, 139, 255, 0.35);
    border-radius: 8px;
    background: rgba(88, 48, 140, 0.18);
}

.challenge-prompt {
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.challenge-options {
    display: grid;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
}

.challenge-option-label {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.challenge-option-label:hover {
    border-color: rgba(193, 139, 255, 0.45);
}

.challenge-option-label input {
    margin-top: 0.2rem;
}

.challenge-submit {
    width: 100%;
}

.challenge-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.challenge-badge-correct {
    color: #b8f5c6;
    background: rgba(56, 142, 82, 0.25);
    border: 1px solid rgba(120, 220, 150, 0.35);
}

.challenge-retry-hint,
.challenge-block-hint {
    margin: 0.55rem 0 0;
}

.alert-remediation {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.alert-remediation .eyebrow {
    margin-bottom: 0.5rem;
}

.alert-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.alert-action-form {
    margin: 0;
    display: inline-flex;
}

.alert-remediation-hint {
    margin-top: 0.65rem;
    font-size: 0.85rem;
}

.timeline-rail {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0;
}

.timeline-entry {
    display: grid;
    grid-template-columns: 1.1rem 1fr;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.timeline-entry:last-child {
    border-bottom: 0;
}

.timeline-marker {
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: var(--muted);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.timeline-entry.severity-critical .timeline-marker { background: var(--critical); }
.timeline-entry.severity-high .timeline-marker { background: var(--high); }
.timeline-entry.severity-warning .timeline-marker { background: var(--warn); }
.timeline-entry.severity-info .timeline-marker { background: var(--info); }

.timeline-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.timeline-body h4 {
    margin: 0 0 0.25rem;
    font-size: 0.98rem;
}

.timeline-time,
.alert-time {
    font-size: 0.78rem;
    color: var(--accent-strong);
}

.inject-card {
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.inject-card.severity-critical { border-color: rgba(255, 92, 122, 0.28); }
.inject-card.severity-high { border-color: rgba(255, 155, 94, 0.24); }

.inject-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.inject-card h4 {
    margin: 0 0 0.35rem;
}

.inject-card.released {
    opacity: 0.88;
}

.inject-audience {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.82rem;
}

.action-card {
    padding: 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.compact-empty {
    padding: 1rem;
}

.note-stream .note-item {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.note-time {
    color: var(--muted);
}

.compact-alert-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}

th,
td {
    font-family: var(--font-sans);
}

th {
    font-family: var(--font-sans);
}

.report-preview,
.scenario-id,
.exercise-meta,
.mission-clock {
    font-family: var(--font-mono);
}

@media (max-width: 1100px) {
    .hero,
    .workspace-hero,
    .mission-control,
    .two-column-grid,
    .three-column-grid,
    .metrics-grid,
    .stats-grid,
    .site-footer {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .site-header {
        flex-direction: column;
        align-items: stretch;
    }

    .mission-control {
        row-gap: 1rem;
    }

    .hero,
    .workspace-hero {
        row-gap: 1.55rem;
    }

    .seat-view-grid,
    .seat-view-columns,
    .seat-metrics {
        grid-template-columns: 1fr;
    }

    .site-nav {
        justify-content: flex-start;
    }
}

/* Critical incoming banner */
.ops-critical-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.65rem;
    border: 1px solid rgba(255, 90, 90, 0.55);
    background: linear-gradient(90deg, rgba(48, 8, 12, 0.95), rgba(22, 6, 10, 0.92));
    border-radius: 8px;
    opacity: 0;
    transform: translateY(-0.35rem);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.ops-critical-banner.ops-critical-visible {
    opacity: 1;
    transform: translateY(0);
    animation: critical-banner-pulse 2s ease-in-out infinite;
}

body.ops-critical-active .ops-command-bar {
    box-shadow: 0 0 0 1px rgba(255, 90, 90, 0.35);
}

.ops-critical-icon {
    font-size: 1.35rem;
    color: #ff6b6b;
}

.ops-critical-eyebrow {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff8a8a;
}

.ops-critical-title {
    margin: 0.15rem 0 0;
    font-weight: 600;
    color: #ffe8e8;
}

.ops-critical-body {
    flex: 1;
    min-width: 0;
}

@keyframes critical-banner-pulse {
    0%,
    100% {
        border-color: rgba(255, 90, 90, 0.55);
    }
    50% {
        border-color: rgba(255, 140, 90, 0.85);
    }
}

/* Threat level meter */
.command-risk-meter {
    grid-column: 1 / -1;
    margin-bottom: 0.35rem;
}

.command-risk-track {
    height: 0.35rem;
    border-radius: 999px;
    background: rgba(0, 40, 55, 0.8);
    overflow: hidden;
}

.command-risk-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3dff8a, #ffb347, #ff5a5a);
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.command-risk-fill.risk-surge {
    filter: brightness(1.25);
}

.command-risk-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.command-stat-value.stat-flash {
    animation: stat-flash 0.9s ease-out;
    color: #5ee7ff;
}

@keyframes stat-flash {
    0% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.inject-countdown-urgent {
    color: #ffb347;
}

.inject-countdown-due .mono,
.inject-countdown-due {
    color: #ff6b6b;
    animation: inject-due-blink 1s step-end infinite;
}

@keyframes inject-due-blink {
    50% {
        opacity: 0.5;
    }
}

.command-bar-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.ops-tempo-toggle.active,
.ops-sound-toggle.active {
    border-color: rgba(94, 231, 255, 0.65);
    color: #5ee7ff;
    box-shadow: 0 0 12px rgba(94, 231, 255, 0.2);
}

.ops-shortcut-hint {
    flex: 1 1 100%;
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
}

.seat-pill.seat-switching {
    opacity: 0.55;
    pointer-events: none;
}

.exercise-room .timeline-entry.timeline-new {
    animation: alert-slide-in 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

#ops-stage.telemetry-burst {
    animation: stage-flash 0.6s ease-out;
}

@keyframes stage-flash {
    0%,
    100% {
        filter: none;
    }
    40% {
        filter: brightness(1.08);
    }
}

/* Live operations: activity rail, toasts, AJAX feedback */
.ops-activity-rail {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-color: rgba(0, 212, 255, 0.22);
    background: linear-gradient(90deg, rgba(0, 18, 28, 0.92), rgba(0, 8, 14, 0.88));
}

.ops-activity-live {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--soc-cyan, #5ee7ff);
}

.ops-activity-led {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #3dff8a;
    box-shadow: 0 0 8px #3dff8a;
    animation: ops-live-blink 1.4s ease-in-out infinite;
}

.ops-activity-track {
    flex: 1;
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent);
}

.ops-activity-item {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
}

.ops-activity-item.severity-critical {
    color: #ff8a8a;
}

.ops-activity-item.severity-high {
    color: #ffb347;
}

.ops-activity-item.ops-activity-new {
    animation: ops-activity-in 0.55s ease-out;
}

.ops-toast-stack {
    position: fixed;
    top: 4.5rem;
    right: 1.25rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.ops-toast {
    padding: 0.65rem 0.9rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 0;
    transform: translateX(1.25rem);
    transition: opacity 0.28s ease, transform 0.28s ease;
    border: 1px solid rgba(0, 212, 255, 0.35);
    background: rgba(4, 22, 32, 0.96);
    color: #d8f4ff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.ops-toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.ops-toast-error {
    border-color: rgba(255, 90, 90, 0.5);
    color: #ffd4d4;
}

.ops-toast-success {
    border-color: rgba(61, 255, 138, 0.35);
}

body.ops-fullscreen .ops-toast-stack {
    top: 1rem;
    right: 1rem;
}

#mission-clock.clock-pulse {
    animation: clock-pulse 0.65s ease-out;
}

@keyframes clock-pulse {
    0% {
        color: #fff;
        text-shadow: 0 0 12px rgba(94, 231, 255, 0.9);
        transform: scale(1.04);
    }
    100% {
        transform: scale(1);
        text-shadow: none;
    }
}

#alerts-fit-pane.telemetry-burst,
.soc-console-primary.telemetry-burst {
    animation: telemetry-flash 0.85s ease-out;
}

@keyframes telemetry-flash {
    0%,
    100% {
        box-shadow: inset 0 0 0 0 transparent;
    }
    35% {
        box-shadow: inset 0 0 48px rgba(94, 231, 255, 0.12);
    }
}

.exercise-room .soc-alert.alert-new {
    animation: alert-slide-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes alert-slide-in {
    from {
        opacity: 0;
        transform: translateX(-1.25rem);
        filter: brightness(1.4);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: none;
    }
}

@keyframes ops-live-blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

@keyframes ops-activity-in {
    from {
        opacity: 0;
        transform: translateY(0.35rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ttsim-app::before,
    .phase-active,
    .ops-activity-led,
    #mission-clock.clock-pulse,
    #alerts-fit-pane.telemetry-burst,
    .soc-console-primary.telemetry-burst,
    .exercise-room .soc-alert.alert-new,
    .ops-activity-item.ops-activity-new,
    .ops-critical-banner.ops-critical-visible,
    .command-risk-fill.risk-surge,
    .command-stat-value.stat-flash,
    .inject-countdown-due,
    #ops-stage.telemetry-burst,
    .exercise-room .timeline-entry.timeline-new {
        animation: none;
    }

    .page-enter > .panel,
    .page-enter > section,
    .stat-card-interactive:hover,
    .scenario-teaser-card:hover,
    .exercise-card:hover,
    .panel:hover {
        animation: none;
        transform: none;
    }
}

@media (max-width: 720px) {
    :root {
        --page-gutter: 1rem;
    }

    .messages,
    .page-shell,
    .site-footer {
        width: var(--content-width);
    }

    .brand {
        align-items: flex-start;
    }

    .brand-mark {
        max-width: 9rem;
        height: 2.85rem;
    }

    .brand-title {
        font-size: 1.55rem;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }
}