/* Base */
:root {
  color-scheme: dark;

  /* ===== Dark Ops Terminal Theme ===== */
  --bg-main: #070b14;
  --bg-surface: #0b1220;
  --bg-panel: #0f1b2d;
  --bg-panel-2: #0c1626;

  --text-1: #e6f1ff;
  --text-2: #a8c0d8;
  --text-3: #7f9bb6;

  --accent: #2de2e6;
  --accent-2: #4cc9f0;
  --accent-dim: rgba(45, 226, 230, 0.18);

  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(45, 226, 230, 0.35);

  --shadow-lg: 0 18px 60px rgba(0, 0, 0, 0.65);
  --shadow-md: 0 10px 35px rgba(0, 0, 0, 0.55);

  --glow-soft: 0 0 12px rgba(45, 226, 230, 0.18);
  --glow-strong: 0 0 20px rgba(45, 226, 230, 0.32);

  --radius: 14px;

}

* {
  box-sizing: border-box;
}

html, body {
  /* Sticky footer layout */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
  color: var(--text-1);

  /* Dark Ops Terminal background */
  background:
    radial-gradient(circle at 20% 0%, rgba(45, 226, 230, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(76, 201, 240, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 120%, rgba(45, 226, 230, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-main) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018),
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px
    );
  background-attachment: fixed;

}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;

  background: linear-gradient(180deg, rgba(15, 27, 45, 0.92), rgba(12, 22, 38, 0.92));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(45, 226, 230, 0.12);
}

.topbar h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.6px;
  color: var(--text-1);
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px;
}

/* App root grows to push footer to bottom */
#app {
  flex: 1 0 auto;
}

/* Card */
.card {
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.card h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: var(--glow-soft);
}

.card p {
  line-height: 1.55;
  color: var(--text-2);
}

/* Buttons */

/* =========================
   Primary Action Button
   Continue / Submit
   ========================= */

button.primary {
  background: linear-gradient(
    180deg,
    rgba(45, 226, 230, 0.95),
    rgba(45, 226, 230, 0.80)
  );
  color: #041018;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(45, 226, 230, 0.65);
  box-shadow:
    0 6px 18px rgba(45, 226, 230, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

button.primary:hover {
  background: linear-gradient(
    180deg,
    rgba(45, 226, 230, 1),
    rgba(45, 226, 230, 0.85)
  );
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(45, 226, 230, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.45);
}

button.primary:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(45, 226, 230, 0.30),
    inset 0 2px 4px rgba(0,0,0,0.25);
}

button:focus-visible {
  outline: 3px solid rgba(45, 226, 230, 0.55);
  outline-offset: 3px;
}

button.primary:disabled {
  background: rgba(120, 140, 160, 0.55);
  border-color: rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.85);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}


button {
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.35);
  color: var(--text-1);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

button:hover {
  background: rgba(17, 24, 39, 0.55);
  border-color: rgba(45, 226, 230, 0.28);
  box-shadow: var(--glow-soft);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.secondary {
  background: rgba(12, 22, 38, 0.55);
  border-color: rgba(255,255,255,0.10);
}

button.secondary:hover {
  background: rgba(12, 22, 38, 0.75);
  border-color: rgba(45, 226, 230, 0.22);
  box-shadow: var(--glow-soft);
}

/* Actions row */
.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Grid (mission map) */
.grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

/* Module layout (glossary sidebar) */
.module-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.module-main {
  min-width: 0;
}

.module-sidebar {
  position: sticky;
  top: 16px;
}

.module-sidebar h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

@media (max-width: 720px) {
  .module-layout {
    grid-template-columns: 1fr;
  }
  .module-sidebar {
    position: static;
  }
}


/* Wide stage for scene-based beats (Module 01 hub/doc flow) */
.module-stage-wide {
  display: grid;
  justify-items: center;
}

.module-stage-wide .scene {
  width: min(1120px, 92vw);
}

.module-stage-wide .module-sidebar {
  max-width: 520px;
  width: min(520px, 92vw);
  margin: 0 auto;
}
.module-layout-wide {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: center;
}


/* Choices */
.choices {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

/* Beat images */
.beat-media {
  margin: 12px 0 10px;
}

.beat-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(45, 226, 230, 0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

/* Checkbox list items, prevents overlap on wrap */
.list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 22, 38, 0.55);
  line-height: 1.35;
}

.list-item input {
  margin-top: 3px;
}

/* DnD order list */
.dnd-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.dnd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 22, 38, 0.55);
  cursor: grab;
}

.dnd-item.dragging {
  opacity: 0.6;
}

.dnd-handle {
  opacity: 0.85;
  user-select: none;
}

/* Match UI */
.match-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 860px) {
  .match-grid {
    grid-template-columns: 1fr;
  }
}

.match-col-title {
  font-weight: 800;
  margin-bottom: 8px;
  opacity: 0.9;
}

.match-left-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.match-left {
  padding: 10px 12px;
  border: 1px solid #243041;
  border-radius: 10px;
  background: #0b1220;
}

.match-dropzone {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed #334155;
  background: rgba(17, 24, 39, 0.5);
  display: flex;
  align-items: center;
}

.match-dropzone.over {
  background: rgba(31, 41, 55, 0.9);
}

.match-dropzone.filled {
  border-style: solid;
}

.match-drop-hint {
  opacity: 0.75;
}

.match-bank {
  display: grid;
  gap: 10px;
}

.match-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 22, 38, 0.55);
  cursor: grab;
}

.match-card.dragging {
  opacity: 0.6;
}

/* Feedback */
.feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(45, 226, 230, 0.25);
  background: rgba(45, 226, 230, 0.06);
  color: var(--text-2);
}

.feedback[data-state="bad"] {
  border-color: #7f1d1d;
  background: rgba(127, 29, 29, 0.25);
}

/* Mission Map tile states */
.tile {
  background: linear-gradient(180deg, rgba(15, 27, 45, 0.70), rgba(12, 22, 38, 0.70));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  color: var(--text-1);
  cursor: pointer;
  text-align: left;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.tile:hover {
  border-color: rgba(45, 226, 230, 0.28);
  box-shadow: var(--glow-soft);
  transform: translateY(-1px);
}

.tile .tile-meta {
  margin-top: 8px;
  font-size: 0.9em;
  opacity: 0.85;
}

.tile .tile-stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.85em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #0f172a;
  opacity: 0.95;
}

.tile.completed {
  border-color: rgba(45, 226, 230, 0.35);
  background: linear-gradient(180deg, rgba(11, 33, 48, 0.78), rgba(10, 24, 40, 0.78));
}

.tile.completed:hover {
  background: #12301d;
}

.tile.completed .tile-stamp {
  border-color: #166534;
  background: #052e16;
}

.tile.locked {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(11, 18, 32, 0.50);
  border-color: rgba(255,255,255,0.08);
}

.tile.locked:hover {
  background: #111827;
}

.tile.locked .tile-stamp {
  border-color: #334155;
  background: #0b1220;
}

/* Glossary chips */
.glossary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.glossary-chip {
  border: 1px solid rgba(45, 226, 230, 0.22);
  background: rgba(45, 226, 230, 0.10);
  color: var(--accent);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.glossary-chip:hover {
  background: rgba(45, 226, 230, 0.16);
  border-color: rgba(45, 226, 230, 0.30);
  box-shadow: var(--glow-soft);
}

/* Modal overlay (fixed, centered, global) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 10000;
}

.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #243041;
}

.modal-title {
  font-weight: 800;
}

.modal-close {
  border: 1px solid #334155;
  background: #111827;
  color: #e6edf3;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.modal-close:hover {
  background: #1f2937;
}

.modal-body {
  padding: 16px;
}

.video-modal-wrap {
  width: 100%;
}

.video-modal-player {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.modal-term {
  font-weight: 800;
  margin-bottom: 10px;
}

.modal-def {
  line-height: 1.45;
  opacity: 0.95;
}

/* Certificate */
.tile.certificate {
  border-style: dashed;
}

.cert-controls {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.cert-label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.cert-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.55);
  color: var(--text-1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.cert-actions {
  display: grid;
  gap: 10px;
}

/* Certificate canvas */
.certificate {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.78) 0%, rgba(15, 23, 42, 0.78) 100%);
  padding: 22px;
  display: flex;
  justify-content: center;
  box-shadow: 0 18px 70px rgba(0,0,0,0.55);
}

.certificate-inner {
  width: min(1100px, 96vw);
  aspect-ratio: 11 / 8.5; /* Letter landscape */
  min-height: 620px;

  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.18);
  background:
    radial-gradient(circle at 25% 15%, rgba(45,226,230,0.12), transparent 44%),
    radial-gradient(circle at 80% 25%, rgba(76,201,240,0.10), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.00) 35%),
    rgba(17, 24, 39, 0.70);

  padding: clamp(28px, 4.2vw, 56px);
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Paper grain (neutral, non-symbolic) */
.certificate-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  /* Neutral paper grain using fine crosshatch */
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.025),
      rgba(0, 0, 0, 0.025) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.02),
      rgba(0, 0, 0, 0.02) 1px,
      transparent 1px,
      transparent 4px
    );

  opacity: 0.35;
}

/* Inner border frame */
.certificate-inner::after {
  content: "";
  position: absolute;
  inset: clamp(14px, 2.2vw, 24px);
  border-radius: 12px;
  pointer-events: none;

  border: 1px solid rgba(45, 226, 230, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.certificate-inner > * {
  position: relative;
  z-index: 1;
}

.cert-top {
  text-align: center;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-1);
  text-shadow: 0 0 18px rgba(45,226,230,0.18);
}

.cert-sub {
  margin-top: 10px;
  text-align: center;
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(230, 241, 255, 0.92);
  line-height: 1.2;
}

.cert-body {
  margin-top: 22px;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.cert-line {
  opacity: 0.95;
  line-height: 1.55;
  max-width: 72ch;
}

.cert-name {
  margin-top: 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 900;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(7, 11, 20, 0.55);
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}

.cert-footer {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.14);

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.cert-footer-col {
  display: grid;
  gap: 6px;
}

.cert-footer-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cert-footer-value {
  font-weight: 700;
  color: rgba(230, 241, 255, 0.92);
}

/* Seal */
.cert-seal {
  position: absolute;
  right: clamp(18px, 2.6vw, 30px);
  bottom: clamp(18px, 2.6vw, 30px);
  width: clamp(76px, 8.5vw, 104px);
  height: clamp(76px, 8.5vw, 104px);
  border-radius: 999px;

  display: grid;
  place-items: center;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 900;

  color: rgba(4,16,24,0.95);
  background: rgba(255, 210, 92, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.35);

  box-shadow:
    0 18px 44px rgba(0,0,0,0.35),
    0 0 22px rgba(255, 210, 92, 0.18);
  z-index: 2;
}

@media (max-width: 520px) {
  .cert-footer {
    grid-template-columns: 1fr;
  }
}

/* ================= FOOTER ================= */


/* === Footer pin to bottom (Option A) === */
.site-footer {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  margin-top: auto;
  flex: 0 0 auto;
  width: 100%;
}


.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 12px;
}

.site-footer-sep {
  opacity: 0.6;
}

/* Print: make the certificate fill the landscape page cleanly */
@media print {
  /* Force landscape page and predictable margins */
  @page {
    size: letter landscape;
    margin: 0.35in;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    width: 100%;
    height: 100%;
    overflow: hidden !important;
  }

  /* Hide all UI chrome, leave only the certificate */
  .topbar,
  .cert-controls,
  .actions,
  .grid,
  .tile,
  #muteToggle,
  .module-sidebar,
  .site-footer,
  .mission-shell,
  .mission-complete-banner,
  .celebrate-backdrop {
    display: none !important;
  }

  /* If the certificate page has headings above the certificate, hide them */
  .card > h2,
  .card > p {
    display: none !important;
  }

  .container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* Make certificate fill the printable area */
  .certificate {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    background: #fff !important;

    width: 100% !important;
    height: calc(100vh - 0px) !important;
  }

  .certificate-inner {
    background: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    width: 100% !important;
    height: 100% !important;

    /* Comfortable spacing within the full-page frame */
    padding: 0.6in !important;

    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .cert-name {
    border: 1px solid #000 !important;
    background: #fff !important;
  }

  .cert-seal {
    border-color: #000 !important;
    background: #fff !important;
    color: #000 !important;
  }


  /* Print: stronger contrast for readability */
  .cert-top {
    color: #000000 !important;
    text-shadow: none !important;
  }

  .cert-sub {
    color: #000000 !important;
    font-size: 36px !important;
    font-weight: 900 !important;
  }

  .cert-line,
  .cert-footer-label,
  .cert-footer-value {
    color: #111111 !important;
  }

  .cert-footer-label {
    opacity: 1 !important;
  }

  .certificate {
    border: 2px solid #000000 !important;
  }

  .certificate-inner {
    border: 2px solid #000000 !important;
  }

  /* Remove the neon inner frame in print */
  .certificate-inner::after {
    display: none !important;
  }

  /* Keep paper grain subtle in print (requires "Background graphics" enabled) */
  .certificate-inner::before {
    opacity: 0.10 !important;
  }

}



/* ================= DoD-style Mission Map Layout ================= */

.mission-shell {
  max-width: 1160px;
  margin: 18px auto 24px;
  padding: 0 16px;
}

.mission-shell-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.mission-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.2px;
}

.mission-sub {
  margin-top: 6px;
  opacity: 0.85;
  font-size: 13px;
}

.mission-progress {
  background: rgba(45, 226, 230, 0.06);
  border: 1px solid rgba(45, 226, 230, 0.20);
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 140px;
  text-align: right;
  box-shadow: var(--glow-soft);
}

.mission-progress-num {
  font-weight: 800;
  font-size: 14px;
}

.mission-progress-label {
  margin-top: 4px;
  opacity: 0.85;
  font-size: 12px;
}

.dod-board {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
}

.dod-panel {
  background: rgba(15, 27, 45, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  overflow: hidden;
}

.panel-banner {
  padding: 10px 12px;
  background: rgba(45, 226, 230, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.panel-banner-text {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(45, 226, 230, 0.10);
  border: 1px solid rgba(45, 226, 230, 0.22);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  box-shadow: var(--glow-soft);
}

.mission-rail {
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rail-empty {
  opacity: 0.75;
  font-size: 13px;
  padding: 12px;
}

.rail-mission {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: inherit;
  cursor: pointer;
}

.rail-mission:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.26);
}

.rail-icon {
  display: grid;
  place-items: center;
}

.rail-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-actions {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.badge-wall {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* Completed missions, DoD-style (no slots, no placeholders) */
.badge-wall-earned {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 18px;
  justify-items: center;
  align-content: start;
  max-height: 520px;
  overflow: auto;
}

.badge-earned {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
  width: 170px;
}

.badge-art-wrap {
  display: grid;
  place-items: center;
}

.badge-earned img {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28));
  transition: transform 120ms ease, filter 120ms ease;
}

.badge-earned:hover img {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
}

.badge-earned-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.badge-empty-state {
  opacity: 0.7;
  font-size: 13px;
  padding: 24px 12px;
  text-align: center;
  grid-column: 1 / -1;
}

.badge-slot {
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 14px 12px 12px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.badge-slot-earned {
  cursor: pointer;
}

.badge-slot-earned:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.26);
}

.badge-slot-empty {
  opacity: 0.55;
}

.badge-slot-art {
  display: grid;
  place-items: center;
}

.badge-slot-label {
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
  opacity: 0.92;
  min-height: 28px;
}

.badge-art {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.badge-art-img {
  width: 100%;
  height: 100%;
  display: block;
}

.badge-art-fallback {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 900;
  font-size: 12px;
}

.badge-placeholder {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.cert-row {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  justify-content: flex-end;
}

.cert-btn {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(45, 226, 230, 0.10);
  border: 1px solid rgba(45, 226, 230, 0.24);
  color: var(--text-1);
  cursor: pointer;
  box-shadow: var(--glow-soft);
}

.cert-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cert-btn-top {
  margin-top: 10px;
  width: 100%;
  text-align: center;
}


@media (max-width: 980px) {
  .dod-board {
    grid-template-columns: 1fr;
  }

  .mission-rail {
    max-height: 280px;
  }

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

@media (max-width: 520px) {
  .badge-wall {
    grid-template-columns: 1fr;
  }
}



@media (max-width: 980px) {
  .badge-wall-earned {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 420px;
  }
}

@media (max-width: 520px) {
  .badge-wall-earned {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

/* ===================================================================== */
/* ===================== DARK OPS POLISH LAYER ========================= */
/* ===================================================================== */

/* Atmospheric overlays (vignette + scanlines/noise) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background:
    radial-gradient(circle at 50% 18%, rgba(45,226,230,0.14), transparent 42%),
    radial-gradient(circle at 50% 120%, rgba(45,226,230,0.10), transparent 58%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,0.68) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015),
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.008),
      rgba(255,255,255,0.008) 1px,
      transparent 1px,
      transparent 6px
    );

  opacity: 0.28;
}

/* Keep app chrome above overlays */
#app,
.topbar,
.site-footer {
  position: relative;
  z-index: 1;
}
/* HUD corners + sheen on cards */
.card {
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    linear-gradient(var(--accent) 0 0) left 14px top 14px / 18px 2px no-repeat,
    linear-gradient(var(--accent) 0 0) left 14px top 14px / 2px 18px no-repeat,

    linear-gradient(var(--accent) 0 0) right 14px top 14px / 18px 2px no-repeat,
    linear-gradient(var(--accent) 0 0) right 14px top 14px / 2px 18px no-repeat,

    linear-gradient(var(--accent) 0 0) left 14px bottom 14px / 18px 2px no-repeat,
    linear-gradient(var(--accent) 0 0) left 14px bottom 14px / 2px 18px no-repeat,

    linear-gradient(var(--accent) 0 0) right 14px bottom 14px / 18px 2px no-repeat,
    linear-gradient(var(--accent) 0 0) right 14px bottom 14px / 2px 18px no-repeat;

  opacity: 0.26;
  filter: drop-shadow(0 0 10px rgba(45,226,230,0.25));
}

@media (prefers-reduced-motion: no-preference) {
  .card::after {
    content: "";
    position: absolute;
    inset: -22%;
    pointer-events: none;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(45,226,230,0.06),
      transparent
    );
    animation: hudSweep 12s linear infinite;
  }

  @keyframes hudSweep {
    0% { transform: translateX(-30%); opacity: 0.25; }
    50% { transform: translateX(30%); opacity: 0.50; }
    100% { transform: translateX(-30%); opacity: 0.25; }
  }
}

/* Glow hierarchy tuning */
.card h2,
.panel-banner-text {
  text-shadow: 0 0 14px rgba(45,226,230,0.35);
}

button:hover,
.cert-btn:hover {
  box-shadow:
    0 0 18px rgba(45,226,230,0.35),
    0 0 32px rgba(45,226,230,0.18);
}

.badge-earned img {
  filter:
    drop-shadow(0 8px 14px rgba(0,0,0,0.65))
    drop-shadow(0 0 14px rgba(45,226,230,0.25));
}

/* Safety: keep modal overlay fixed and centered above background overlays */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal {
  position: relative;
  z-index: 10001;
}
/* ================= Key Terms hover tooltips ================= */

.module-sidebar {
  overflow: visible;
}

.keyterms-list {
  display: grid;
  gap: 10px;
}

.keyterm {
  position: relative;
  cursor: help;
  outline: none;
}

.keyterm-term {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 1px rgba(45, 226, 230, 0.06) inset;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.keyterm:hover .keyterm-term,
.keyterm:focus .keyterm-term,
.keyterm:focus-within .keyterm-term {
  border-color: rgba(45, 226, 230, 0.25);
  box-shadow:
    0 0 0 1px rgba(45, 226, 230, 0.10) inset,
    0 10px 24px rgba(0, 0, 0, 0.28);
}


.keyterm:hover .keyterm-tooltip,
.keyterm:focus .keyterm-tooltip,
.keyterm:focus-within .keyterm-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.keyterm-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: auto;
  right: 18px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: rgba(15, 18, 28, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}


/* ================= Mission Map: tighten top real estate ================= */
/* Keeps existing theme, only adjusts spacing and header rhythm. */

.mission-shell {
  margin: 8px auto 18px;
  padding: 0 16px;
}

.mission-shell-head {
  align-items: center;
  margin-bottom: 8px;
}

.mission-title {
  font-size: 24px;
  line-height: 1.1;
}

.mission-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.82;
}

.mission-progress {
  padding: 8px 12px;
}

.mission-progress-num {
  font-size: 14px;
}

.mission-progress-label {
  margin-top: 2px;
}

.cert-btn-top {
  margin-top: 8px;
}

.dod-board {
  margin-top: 0;
}

.panel-banner {
  padding: 8px 12px;
}

.mission-rail {
  padding: 10px 12px;
}

.badge-wall-earned {
  padding: 14px 16px;
}

/* =========================================================
   GLOBAL OVERFLOW GUARD
   Prevents 1–2px hover overflows from creating scrollbars
   ========================================================= */

html,
body {
  overflow-x: hidden;
}

/* =========================================================
   KEY TERM TOOLTIP FIX
   Keeps tooltip inside sidebar / viewport
   ========================================================= */

.keyterm-tooltip {
  position: absolute;

  /* Anchor tooltip inward instead of spilling right */
  right: 0;
  left: auto;
  top: calc(100% + 10px);

  /* Constrain width to viewport */
  width: 300px;
  max-width: min(360px, calc(100vw - 32px));

  padding: 10px 12px;
  border-radius: 12px;
  z-index: 50;

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;

  background: rgba(15, 18, 28, 0.98);
  color: rgba(230, 241, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.40);

  font-size: 13px;
  line-height: 18px;
}

/* Tooltip visible state (kept explicit to avoid layout jitter) */
.keyterm:hover .keyterm-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   MISSION PROGRESS BAR
   Move to bottom and force single-line layout
   ========================================================= */

/* Container positioning */
.mission-progress {
  position: absolute;
  bottom: 16px;
  right: 16px;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px 14px;
  border-radius: 14px;

  background: rgba(15, 18, 28, 0.85);
  backdrop-filter: blur(2px);

  white-space: nowrap;
}

/* Prevent header layout from reserving space */
.mission-shell-head {
  position: relative;
}

/* Number */
.mission-progress-num {
  font-weight: 700;
  font-size: 16px;
}

/* Label */
.mission-progress-label {
  font-size: 13px;
  opacity: 0.85;
}

/* Certificate button inline */
.cert-btn-top {
  margin: 0;
  padding: 6px 12px;
  height: auto;
  font-size: 13px;
  border-radius: 10px;
}

/* =========================================================
   Mission progress number – exact font match
   ========================================================= */

.mission-progress-bottom {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* Force the number to NOT stand out */
.mission-progress-bottom .mission-progress-num {
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;      /* normal, not semi-bold */
  letter-spacing: inherit;
  opacity: 0.9;
}

/* =========================================================
   Mission progress spacing refinement
   ========================================================= */

/* Reduce overall gap slightly */
.mission-progress-bottom {
  gap: 8px;
}

/* Tighten spacing specifically between number and label */
.mission-progress-bottom .mission-progress-num {
  margin-right: 2px;
}

/* Keep space before the button comfortable */
.mission-progress-bottom .cert-btn-top {
  margin-left: 6px;
}

/* ================= Document-style Question Frames (Module beats) ================= */

.doc-stage {
  position: relative;
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.doc-stage-inner {
  width: min(980px, 96vw);
  display: grid;
  gap: 12px;
  justify-items: center;
}

@media (prefers-reduced-motion: no-preference) {
  .doc-stage-zoom .doc-window,
  .doc-stage-zoom .hub-panel {
    animation: docZoomIn 420ms ease both;
  }

  @keyframes docZoomIn {
    from { transform: scale(0.92); opacity: 0.0; }
    to { transform: scale(1.0); opacity: 1.0; }
  }
}

.doc-bg {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
}

/* Hub "desk" vibe */
.doc-bg-desk {
  background:
    radial-gradient(circle at 25% 20%, rgba(45,226,230,0.10), transparent 46%),
    radial-gradient(circle at 78% 8%, rgba(76,201,240,0.10), transparent 42%),
    radial-gradient(circle at 70% 85%, rgba(45,226,230,0.07), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,0.30), rgba(0,0,0,0.65)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 8px, transparent 8px, transparent 16px);
}

/* Notepad background */
.doc-bg-notepad {
  background:
    radial-gradient(circle at 25% 20%, rgba(45,226,230,0.08), transparent 46%),
    linear-gradient(180deg, rgba(0,0,0,0.32), rgba(0,0,0,0.70)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.055), rgba(255,255,255,0.055) 1px, transparent 1px, transparent 28px);
}

/* Email background */
.doc-bg-email {
  background:
    radial-gradient(circle at 75% 18%, rgba(76,201,240,0.09), transparent 46%),
    linear-gradient(180deg, rgba(0,0,0,0.34), rgba(0,0,0,0.72)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.030), rgba(255,255,255,0.030) 1px, transparent 1px, transparent 40px);
}

/* Checklist background */
.doc-bg-checklist {
  background:
    radial-gradient(circle at 20% 25%, rgba(45,226,230,0.07), transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,0.30), rgba(0,0,0,0.70)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.028), rgba(255,255,255,0.028) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.020), rgba(255,255,255,0.020) 1px, transparent 1px, transparent 18px);
}

.doc-ribbon {
  width: min(980px, 96vw);
  display: flex;
  justify-content: flex-start;
}

.doc-ribbon-text {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.30);
  color: rgba(255, 230, 230, 0.95);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.doc-window {
  width: min(980px, 96vw);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.doc-window-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.00));
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.doc-window-title {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.doc-window-controls {
  display: flex;
  gap: 8px;
  opacity: 0.9;
}

.doc-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
}

.doc-window-body {
  background: rgba(255,255,255,0.92);
  color: #0b1220;
  padding: 16px;
}

.doc-content h2 {
  margin-top: 0;
  color: #0b1220;
  text-shadow: none;
  font-size: 18px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.doc-content p {
  color: rgba(17, 24, 39, 0.88);
}

.doc-content .beat-image {
  border-color: rgba(0,0,0,0.10);
}

.doc-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.doc-choice-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.doc-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.85);
}

.doc-radio input {
  margin-top: 3px;
}

/* ================= Hub Screen ================= */

.hub-panel {
  width: min(980px, 96vw);
  background: rgba(15, 23, 42, 0.90);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
}

.hub-head {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.hub-title {
  font-weight: 900;
  font-size: 18px;
}

.hub-sub {
  opacity: 0.85;
  font-size: 13px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 860px) {
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .hub-grid { grid-template-columns: 1fr; }
}

.hub-doc {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.12);
  text-align: left;
}

.hub-doc:hover {
  border-color: rgba(45,226,230,0.30);
  box-shadow: 0 0 18px rgba(45,226,230,0.18);
}

.hub-doc:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hub-doc-art {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
}

.hub-doc-sheet {
  width: 42px;
  height: 50px;
  background: rgba(255,255,255,0.90);
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 10px 18px rgba(0,0,0,0.30);
  transform: rotate(-4deg);
}

.hub-doc-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.92);
  color: #062410;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.55);
}

.hub-doc-badge:empty {
  display: none;
}

.hub-doc-label {
  font-weight: 900;
}

.hub-doc-hint {
  margin-top: 4px;
  opacity: 0.85;
  font-size: 12px;
}

.hub-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}


/* =========================
   Module flow zoom
   ========================= */
.module-stage {
  transition: transform 320ms ease, opacity 320ms ease;
  transform-origin: 50% 35%;
}

.module-stage.zoom-out {
  transform: scale(0.92);
  opacity: 0.4;
}

.module-stage.zoom-in {
  transform: scale(1);
  opacity: 1;
}

/* =========================
   Hub (document picker)
   ========================= */
.hub-stage {
  display: grid;
  gap: 14px;
}

.hub-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hub-banner-left {
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

.hub-subtitle {
  opacity: 0.85;
}

.hub-laptop {
  border-radius: 18px;
  padding: 18px 18px 22px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

.hub-screen {
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(30,70,110,0.55), rgba(12,26,42,0.55));
}

.hub-screen-title {
  text-align: center;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 12px;
}

.hub-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hub-doc {
  position: relative;
  border-radius: 14px;
  padding: 14px 12px 12px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.hub-doc:hover {
  border-color: rgba(125, 220, 255, 0.30);
  background: rgba(0,0,0,0.26);
}

.hub-doc-icon {
  width: 54px;
  height: 54px;
  margin: 2px auto 10px auto;
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
}

.hub-doc-label {
  font-weight: 700;
  margin-bottom: 6px;
}

.hub-doc-hint {
  font-size: 12px;
  opacity: 0.82;
}

.hub-doc-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(80, 220, 140, 0.20);
  border: 1px solid rgba(80, 220, 140, 0.35);
  font-weight: 900;
}

/* =========================
   Artifact shell, question internals
   ========================= */
.artifact-shell {
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
}

/* When an artifact is rendered inside a laptop-screen safe area, force it to fit */
.scene-safe .artifact-shell {
  margin-top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.artifact-top {
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.artifact-ribbon {
  padding: 10px 12px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.06);
}

.artifact-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.artifact-title {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.artifact-icons {
  margin-left: auto;
  display: flex;
  gap: 8px;
  opacity: 0.6;
}

.artifact-icons .ico {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

.artifact-body {
  padding: 14px;
}

.scene-safe .artifact-body {
  /* Allow internal scrolling without the artifact leaking outside the laptop screen */
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.scene-safe .artifact-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.q-prompt {
  font-weight: 700;
  margin-bottom: 12px;
  white-space: pre-line;
}


.q-options {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.choice {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: inherit;
}

.choice.selected {
  border-color: rgba(125, 220, 255, 0.40);
  background: rgba(125, 220, 255, 0.12);
}

.q-multi {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.check input {
  margin-top: 2px;
}

.q-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.14);
}

.roster-table th,
.roster-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-align: left;
}

/* Tighter table spacing when rendered inside a laptop scene */
.scene-safe .roster-table th,
.scene-safe .roster-table td {
  padding: 6px 8px;
}

.scene-safe .q-prompt {
  margin-bottom: 10px;
  font-size: 1.05em;
}

.roster-table th {
  font-weight: 800;
  opacity: 0.9;
}



/* ================= MODULE 01 SCENES (DoD-style backgrounds) ================= */

.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow-lg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Allow font sizing based on the scene container (cqi units). */
  container-type: inline-size;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.22) 72%, rgba(0,0,0,0.36) 100%);
}


/* Scene layers */
.scene .scene-top { z-index: 5; }
.scene .scene-hub-hotspots { z-index: 3; }
.scene .scene-ribbon { z-index: 4; }
.scene .scene-window-title { z-index: 4; }
.scene .scene-safe { z-index: 3; }

/* Default safe area for laptop screen content (tuned for 1920x1080 scene art) */
.scene-safe {
  position: absolute;
  left: 19%;
  top: 28%;
  width: 62%;
  height: 50%;
  /* Keep everything visually inside the laptop screen. */
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;

  /* Responsive typography that scales with the laptop screen area. */
  font-size: clamp(10px, 1.15cqi, 13px);
  line-height: 1.35;
}


.scene-m01-hub { background-image: url("/images/scenes/module01-hub.png?v=1"); }
.scene-m01-notes { background-image: url("/images/scenes/module01-notes.png?v=1"); }
.scene-m01-roster { background-image: url("/images/scenes/module01-roster.png?v=1"); }

/*
  IMPORTANT:
  For laptop-screen overlays, background cropping causes the "screen" area to drift
  as the browser size changes. Stretching the scene art to the container keeps the
  overlay aligned consistently across viewport sizes.
*/
.scene-m01-hub,
.scene-m01-notes,
.scene-m01-roster {
  background-size: 100% 100%;
  background-position: center;
}

.scene .scene-top {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scene-top-left {
  background: rgba(10, 18, 32, 0.70);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--text-1);
}

.scene-top-right button.primary {
  padding: 10px 14px;
}

.scene-hub-hotspots {
  position: absolute;
  left: 27.5%;
  top: 32.5%;
  width: 45%;
  height: 34%;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 22px;
}

.scene-hub-hotspots .hub-doc {
  flex: 1;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 18, 32, 0.10);
  backdrop-filter: blur(2px);
  padding: 12px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.scene-hub-hotspots .hub-doc:hover {
  background: rgba(10, 18, 32, 0.28);
  border-color: rgba(45,226,230,0.35);
  transform: translateY(-1px);
}

.scene-hub-hotspots .hub-doc-icon {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  position: relative;
}

.scene-hub-hotspots .hub-doc-icon::after {
  content: "";
  position: absolute;
  inset: 14px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.14);
}

.scene-hub-hotspots .hub-doc-label {
  margin-top: 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scene-hub-hotspots .hub-doc-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(45, 226, 230, 0.85);
  color: #041018;
  font-weight: 900;
}

.scene-hub-hotspots .hub-doc.done {
  opacity: 0.85;
}

.scene-ribbon {
  position: absolute;
  left: 22px;
  top: 22px;
  max-width: 70%;
  background: rgba(120, 35, 45, 0.90);
  border: 1px solid rgba(0,0,0,0.20);
  color: rgba(255,255,255,0.95);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scene-window-title {
  position: absolute;
  top: 88px;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(5, 20, 35, 0.92);
  font-size: 18px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

.scene-safe .q-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

/* Scene window: use light UI inside laptop window */
.scene-m01-notes .scene-safe,
.scene-m01-roster .scene-safe {
  left: 18.8%;
  top: 29.5%;
  width: 62.4%;
  height: 52%;

  color: rgba(10, 18, 28, 0.95);
}

.scene-m01-notes .scene-safe .q-card,
.scene-m01-roster .scene-safe .q-card {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

.scene-m01-notes .scene-safe .q-card * ,
.scene-m01-roster .scene-safe .q-card * {
  color: rgba(10, 18, 28, 0.95);
}

.scene-m01-notes .scene-safe .opt,
.scene-m01-roster .scene-safe .opt,
.scene-m01-notes .scene-safe .check,
.scene-m01-roster .scene-safe .check {
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(0,0,0,0.12);
}

.scene-m01-notes .scene-safe input,
.scene-m01-roster .scene-safe input {
  accent-color: #2de2e6;
}

.scene-m01-notes .scene-safe .q-actions .btn,
.scene-m01-roster .scene-safe .q-actions .btn {
  background: rgba(20, 30, 45, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
}

.scene-m01-notes .scene-safe .q-actions .btn.primary,
.scene-m01-roster .scene-safe .q-actions .btn.primary {
  background: rgba(45, 226, 230, 0.90);
  color: rgba(4,16,24,0.95);
}



/* Tighter layout for Module 01 Personnel Roster scene */
.scene-m01-roster .scene-safe .roster-table {
  margin-bottom: 8px;
  font-size: 0.95em;
}

.scene-m01-roster .scene-safe .roster-table th,
.scene-m01-roster .scene-safe .roster-table td {
  padding: 4px 6px;
}

.scene-m01-roster .scene-safe .q-prompt {
  margin-bottom: 6px;
  font-size: 1em;
  line-height: 1.25;
}

.scene-m01-roster .scene-safe .q-multi {
  gap: 6px;
  margin-bottom: 8px;
}

.scene-m01-roster .scene-safe .check {
  padding: 6px 8px;
  gap: 8px;
  border-radius: 10px;
}

.scene-m01-roster .scene-safe .check span {
  line-height: 1.2;
}

.scene-m01-roster .scene-safe .q-actions {
  margin-top: 8px;
  gap: 8px;
}

.scene-m01-roster .scene-safe .q-actions button {
  padding: 8px 10px;
}

/* =========================
   Correct feedback screen, remove Close button
   ========================= */

/* Hide Close button only on Correct screens */
.feedback.correct .close-btn,
.feedback.correct button[aria-label="Close"],
.feedback.correct .modal-close {
  display: none !important;
}

/* =========================
   Mission Complete screen, remove Retry button
   ========================= */

/* Hide Retry only on Mission Complete */
.mission-complete .retry-btn,
.mission-complete button.retry,
.mission-complete button[data-action="retry"] {
  display: none !important;
}

/* =========================
   Correct modal, remove Close button (exact fix)
   ========================= */

/* Hide Close button only when the modal title is "Correct" */
.modal:has(.modal-title:contains("Correct")) .modal-close,
.modal:has(h1:contains("Correct")) .modal-close,
.modal:has(h2:contains("Correct")) .modal-close,
.modal:has(.header-title:contains("Correct")) .modal-close {
  display: none !important;
}

/* Narrow the content area inside the laptop for Personnel Roster */
.scene.scene-m01-roster .scene-safe {
  width: 48% !important;
  left: 26% !important; /* centers it because (100 - 48) / 2 = 26 */
}

/* Optional: tighten internal spacing a bit more */
.scene.scene-m01-roster .q-multi {
  gap: 8px !important;
}
.scene.scene-m01-roster .check {
  padding: 8px 10px !important;
}

/* Narrow the content area inside the laptop for Meeting Notes */
.scene.scene-m01-notes .scene-safe {
  width: 48% !important;
  left: 26% !important;
}

/* Optional: tighten spacing for answers in Meeting Notes */
.scene.scene-m01-notes .q-multi {
  gap: 8px !important;
}

.scene.scene-m01-notes .check {
  padding: 8px 10px !important;
}

/* Reduce font size and line height for roster + notes */
.scene.scene-m01-roster,
.scene.scene-m01-notes {
  font-size: 13px;
  line-height: 1.25;
}

/* Reduce spacing between answer options */
.scene.scene-m01-roster .q-multi,
.scene.scene-m01-notes .q-multi {
  gap: 6px !important;
}

/* Make each answer box more compact */
.scene.scene-m01-roster .check,
.scene.scene-m01-notes .check {
  padding: 6px 8px !important;
  min-height: unset;
}

.scene.scene-m01-roster .check input,
.scene.scene-m01-notes .check input {
  margin-right: 6px;
}

.scene.scene-m01-roster .q-prompt,
.scene.scene-m01-notes .q-prompt {
  margin-bottom: 8px;
}

/* ================================
   COMPACT LAYOUT: ROSTER + NOTES
   Reduce width, font size, padding,
   and vertical spacing
   ================================ */

/* Narrow content area inside laptop */
.scene.scene-m01-roster .scene-safe,
.scene.scene-m01-notes .scene-safe {
  width: 48% !important;
  left: 26% !important;
}

/* Reduce overall font size and line height */
.scene.scene-m01-roster,
.scene.scene-m01-notes {
  font-size: 13px;
  line-height: 1.25;
}

/* Tighten spacing between answer options */
.scene.scene-m01-roster .q-multi,
.scene.scene-m01-notes .q-multi {
  gap: 6px !important;
}

/* Make answer boxes more compact */
.scene.scene-m01-roster .check,
.scene.scene-m01-notes .check {
  padding: 6px 8px !important;
  min-height: unset;
}

/* Reduce checkbox to text spacing */
.scene.scene-m01-roster .check input,
.scene.scene-m01-notes .check input {
  margin-right: 6px;
}

/* Reduce space below the question prompt */
.scene.scene-m01-roster .q-prompt,
.scene.scene-m01-notes .q-prompt {
  margin-bottom: 8px;
}

/* =================================================
   COMPACT ANSWER SPACING
   Personnel Roster + Meeting Notes ONLY
   ================================================= */

/* Reduce space BETWEEN answer boxes */
.scene.scene-m01-roster .q-multi,
.scene.scene-m01-notes .q-multi {
  gap: 5px !important;
}

/* Reduce space INSIDE each answer box */
.scene.scene-m01-roster .check,
.scene.scene-m01-notes .check {
  padding: 5px 8px !important;
  line-height: 1.2;
  min-height: unset;
}

/* Remove extra margins inside the answer box */
.scene.scene-m01-roster .check label,
.scene.scene-m01-notes .check label,
.scene.scene-m01-roster .check p,
.scene.scene-m01-notes .check p {
  margin: 0 !important;
}

/* Slightly smaller text for answers only */
.scene.scene-m01-roster .check,
.scene.scene-m01-notes .check {
  font-size: 12.5px;
}

.scene.scene-m01-roster .q-title {
  position: relative !important;
  top: 0 !important;
  margin-bottom: 6px !important;
}

/* Hub screen: move Continue below the document tiles */
.scene.scene-m01-hub {
  position: relative;
}

/* Let the top prompt live in normal flow */
.scene.scene-m01-hub .scene-top {
  position: static !important;
}

/* Reposition the Continue button itself */
.scene.scene-m01-hub #hubContinue {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  top: 74% !important;
  z-index: 20;
}

/* Small windows: shrink scene typography/spacing so content doesn't get pushed below the laptop screen */
@media (max-width: 980px) {
  /* Shrink all laptop-window content first (preferred) */
  .scene .scene-safe {
    font-size: 11px !important;
    line-height: 1.22;
  }

  .scene .artifact-body { padding: 10px; }
  .scene .q-prompt { margin-bottom: 8px; }
  .scene .q-options,
  .scene .q-multi { gap: 6px; margin-bottom: 10px; }

  .scene .choice,
  .scene .check { padding: 6px 8px; border-radius: 10px; }

  .scene .q-actions { margin-top: 10px; gap: 8px; }

  /* Safety net: if something is still too tall, allow internal scroll */
  .scene .scene-safe { overflow: auto !important; padding-bottom: 12px; }

  /* Keep Submit visible inside the laptop window while scrolling */
  .scene .q-actions {
    position: sticky;
    bottom: 8px;
    z-index: 50;
  }
}

/* Even smaller: shrink a bit more */
@media (max-width: 760px) {
  .scene .scene-safe {
    font-size: 10px !important;
    line-height: 1.18;
  }
  .scene .artifact-body { padding: 8px; }
  .scene .choice,
  .scene .check { padding: 5px 7px; }
}

/* Compact banner-style module title */
.module-layout-wide h2 {
  margin: 0;
  padding: 6px 0;
  line-height: 1.1;
  font-weight: 600;
}

/* Hide Key Terms sidebar on Module 01 hub scene */
.scene.scene-m01-hub + aside.card.module-sidebar,
.scene.scene-m01-hub ~ aside.card.module-sidebar {
  display: none !important;
}

/* Move Submit button to bottom-right of the question area */
.scene .q-actions {
  display: flex !important;
  justify-content: flex-end !important;
}



/* =========================
   Sound toggle (top right)
   ========================= */
.icon-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-1);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.icon-btn:hover {
  opacity: 1;
  border-color: rgba(45,226,230,0.35);
  box-shadow: 0 0 12px rgba(45,226,230,0.25);
}

.icon-btn:focus-visible {
  outline: 2px solid rgba(45,226,230,0.55);
  outline-offset: 2px;
}



/* =========================
   Certificate button prominence
   ========================= */

.mission-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cert-btn.cert-btn-top {
  white-space: nowrap;
}

.cert-btn.cert-ready {
  background: linear-gradient(180deg, rgba(255, 210, 92, 0.95), rgba(255, 210, 92, 0.78));
  color: #141007;
  border: 1px solid rgba(255, 210, 92, 0.65);
  box-shadow:
    0 10px 28px rgba(255, 210, 92, 0.28),
    0 0 18px rgba(45, 226, 230, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.35);
  font-weight: 800;
}

.cert-btn.cert-ready:hover {
  box-shadow:
    0 14px 34px rgba(255, 210, 92, 0.34),
    0 0 22px rgba(45, 226, 230, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.45);
  transform: translateY(-1px);
}

.mission-complete-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 210, 92, 0.25);
  background: rgba(255, 210, 92, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.mission-complete-banner .banner-fireworks {
  opacity: 0.9;
}

/* =========================
   Celebration overlay
   ========================= */

.celebrate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.celebrate-modal {
  width: min(560px, 92vw);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10, 16, 26, 0.95);
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
  padding: 18px;
}

.celebrate-fireworks {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  margin-bottom: 10px;
  animation: celebratePop 1.1s ease-in-out 2;
}

@keyframes celebratePop {
  0% { transform: scale(0.98); opacity: 0.85; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1.0); opacity: 0.95; }
}

.celebrate-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.celebrate-text {
  margin: 10px 0 0 0;
  opacity: 0.9;
  text-align: center;
  line-height: 1.45;
}

.celebrate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}


/* =========================
   Reset progress safety
   ========================= */

.reset-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

button.danger {
  border-color: rgba(255, 120, 120, 0.35);
}

button.danger:hover {
  border-color: rgba(255, 120, 120, 0.55);
  box-shadow: 0 0 14px rgba(255, 120, 120, 0.18);
}

button.cancel {
  opacity: 0.9;
}


/* =========================
   Reset button sizing & placement
   ========================= */

.rail-actions-bottom {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: flex-start;
}

.reset-wrap button {
  font-size: 0.75rem;
  padding: 6px 10px;
  min-height: auto;
  line-height: 1.1;
}

.reset-wrap button.confirm {
  font-weight: 600;
}

.reset-wrap button.cancel {
  font-size: 0.72rem;
}

/* Ensure left panel uses column layout so bottom anchoring works */
.dod-panel-left {
  display: flex;
  flex-direction: column;
}


.score-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:12px 0 18px}
.score-tile{background:rgba(15,23,42,.72);border:1px solid rgba(148,163,184,.25);border-radius:14px;padding:14px 16px;box-shadow:0 8px 20px rgba(2,6,23,.18)}
.score-tile-label{font-size:.8rem;letter-spacing:.03em;text-transform:uppercase;opacity:.78}
.score-tile-value{font-size:1.8rem;font-weight:800;line-height:1.1;margin-top:6px}
.score-tile-value-sm{font-size:1.05rem;line-height:1.25}
.score-tile-sub{margin-top:6px;font-size:.9rem;opacity:.82}
.rail-meta{display:block;font-size:.78rem;opacity:.72;margin-top:2px}
.badge-earned-score{font-size:.82rem;opacity:.8;margin-top:4px}
.result-card{max-width:760px}
.result-score-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:18px 0}
.result-score-box{background:#0f172a;border:1px solid rgba(148,163,184,.22);border-radius:12px;padding:14px}
.result-score-label{font-size:.82rem;text-transform:uppercase;letter-spacing:.03em;opacity:.76}
.result-score-value{font-size:2rem;font-weight:800;margin-top:6px}
.result-score-value-sm{font-size:1.2rem;line-height:1.25}
.result-score-sub{margin-top:6px;opacity:.82}


.topbar-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.lang-label{font-size:.95rem;opacity:.95}.lang-select{border-radius:10px;padding:6px 10px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:inherit}@media (max-width:700px){.topbar{gap:10px}.topbar-controls{width:100%;justify-content:flex-end}}


/* Phishing learning callouts */
.learning-callout {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
}

.learning-callout-danger {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(69, 10, 10, 0.35);
}

.learning-callout-neutral {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(15, 23, 42, 0.78);
}

.learning-callout-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.learning-callout-list {
  margin: 0;
  padding-left: 18px;
}

.learning-callout-list li + li {
  margin-top: 8px;
}

.learning-callout-list strong {
  display: block;
  margin-bottom: 2px;
}

.learning-callout-text {
  margin: 0 0 8px;
}

.mission-exit-link-wrap {
  margin: -4px 0 14px;
}

.text-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(148, 163, 184, 0.95);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.text-link:hover,
.text-link:focus-visible {
  color: #67e8f9;
}


/* =====================================================================
   Mission Control dashboard refresh (priority upgrades + cyber grid)
   ===================================================================== */

body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 18% 10%, rgba(45, 226, 230, 0.18) 0%, transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(76, 201, 240, 0.14) 0%, transparent 30%),
    radial-gradient(circle at 50% 78%, rgba(45, 226, 230, 0.08) 0%, transparent 38%),
    linear-gradient(180deg, #081120 0%, #050a12 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto, auto;
  background-attachment: fixed;
}

body::before {
  background:
    radial-gradient(circle at 50% 16%, rgba(45, 226, 230, 0.16), transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(180deg, rgba(6, 11, 20, 0.08), rgba(6, 11, 20, 0.28));
}

body::after {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012), rgba(255,255,255,0.012) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(45,226,230,0.018), rgba(45,226,230,0.018) 1px, transparent 1px, transparent 44px);
  opacity: 0.42;
}

.topbar {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 1px 0 rgba(45, 226, 230, 0.10), 0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 900;
}

.topbar-controls {
  gap: 12px;
}

.lang-select,
.icon-btn {
  min-height: 40px;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.mission-shell-v2 {
  max-width: 1240px;
  margin: 10px auto 24px;
  padding: 0 6px;
}

.mission-shell-v2 .mission-shell-head {
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 16px;
}

.mission-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.92;
}

.mission-kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, rgba(45,226,230,0), rgba(45,226,230,0.75));
}

.mission-shell-v2 .mission-title {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.mission-shell-v2 .mission-sub {
  max-width: 68ch;
  font-size: 14px;
  color: var(--text-2);
}

.mission-shell-v2 .mission-shell-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.mission-shell-v2 .mission-action-btn {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  font-weight: 700;
}

.mission-shell-v2 .btn-symbol {
  font-size: 16px;
  line-height: 1;
}

.mission-shell-v2 .cert-btn-top {
  width: auto;
  min-width: 214px;
}

.score-overview-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 18px;
}

.score-tile-v2 {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13, 22, 38, 0.94), rgba(9, 17, 31, 0.92)),
    rgba(10, 16, 28, 0.95);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 0 1px rgba(45,226,230,0.03);
}

.score-tile-v2::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.08), transparent 40%);
  pointer-events: none;
}

.score-tile-v2:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 40px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(45,226,230,0.10),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.score-tile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(45,226,230,0.18), rgba(45,226,230,0.04));
  border: 1px solid rgba(45,226,230,0.18);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 0 20px rgba(45,226,230,0.10);
}

.metric-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
}

.score-tile-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

.score-tile-eyebrow {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
}

.score-tile-v2 .score-tile-value {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-size: clamp(32px, 2.8vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.score-tile-v2 .score-tile-value-sm {
  font-size: clamp(20px, 1.75vw, 28px);
  line-height: 1.15;
  min-height: 62px;
}

.score-tile-v2 .score-tile-sub {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
}

.score-tile-progress {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.score-tile-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2de2e6, #4cc9f0);
  box-shadow: 0 0 16px rgba(45,226,230,0.35);
}

.score-tile-progress-warm span,
.score-tile-review .metric-icon {
  background: linear-gradient(90deg, #ffd25c, #ff9a6b);
}

.score-tile-review .metric-icon svg {
  color: #ffbe6b;
}

.mission-complete-banner-v2 {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 210, 92, 0.32);
  background:
    linear-gradient(90deg, rgba(255, 210, 92, 0.12), rgba(45,226,230,0.04) 55%, rgba(255, 210, 92, 0.08));
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(255, 210, 92, 0.10);
  justify-content: space-between;
}

.mission-complete-banner-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255, 210, 92, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.mission-complete-banner-copy {
  display: grid;
  gap: 4px;
  text-align: left;
  flex: 1;
}

.mission-complete-banner-copy strong {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-complete-banner-copy span {
  color: rgba(230, 241, 255, 0.88);
}

.mission-banner-btn {
  min-width: 188px;
}

.mission-control-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.mission-intel-column {
  display: grid;
  gap: 16px;
}

.intel-card,
.mission-gallery-panel,
.queue-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(12, 22, 38, 0.88), rgba(8, 15, 28, 0.92));
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.03);
}

.intel-card {
  padding: 18px;
}

.intel-card::before,
.mission-gallery-panel::before,
.queue-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(45,226,230,0.08), transparent 35%);
}

.intel-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.intel-card-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.intel-card h3 {
  margin: 6px 0 0;
  font-size: 20px;
}

.readiness-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.readiness-value {
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 900;
  line-height: 0.95;
}

.readiness-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
}

.readiness-chip {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(45,226,230,0.10);
  border: 1px solid rgba(45,226,230,0.18);
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.risk-gauge {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}

.risk-gauge span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2de2e6 0%, #4cc9f0 52%, #82f8b2 100%);
  box-shadow: 0 0 16px rgba(45,226,230,0.35);
}

.readiness-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.radar-chart-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.radar-chart {
  width: 100%;
  height: auto;
}

.radar-chart-grid polygon,
.radar-chart-grid line {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 1;
}

.radar-chart-area {
  fill: rgba(45,226,230,0.16);
}

.radar-chart-line {
  fill: none;
  stroke: #2de2e6;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 10px rgba(45,226,230,0.35));
}

.radar-chart-labels text {
  fill: rgba(230,241,255,0.78);
  font-size: 11px;
  font-weight: 600;
}

.radar-legend {
  display: grid;
  gap: 8px;
}

.radar-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text-2);
}

.radar-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--legend-color, var(--accent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--legend-color, var(--accent)) 60%, transparent);
}

.radar-legend-label {
  min-width: 0;
}

.insight-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.insight-row {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.insight-row strong {
  text-align: right;
}

.insight-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.insight-row-stack {
  align-items: flex-start;
  flex-direction: column;
}

.insight-row-stack p {
  margin: 6px 0 0;
  color: var(--text-2);
  line-height: 1.55;
}

.panel-banner-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.panel-banner-meta {
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-rail-v2 {
  max-height: 400px;
  padding: 14px;
  gap: 12px;
}

.rail-empty-rich {
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-2);
  line-height: 1.6;
}

.rail-mission-v2 {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.rail-mission-v2:hover {
  transform: translateY(-3px);
  border-color: rgba(45,226,230,0.26);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 18px 28px rgba(0,0,0,0.24), 0 0 18px rgba(45,226,230,0.08);
}

.rail-icon-v2 {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, rgba(45,226,230,0.16), rgba(45,226,230,0.03));
  border: 1px solid rgba(45,226,230,0.16);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
}

.rail-copy {
  min-width: 0;
}

.rail-mission-v2 .rail-title {
  font-size: 15px;
  margin-bottom: 4px;
}

.rail-mission-v2 .rail-meta {
  margin-top: 0;
  color: var(--text-3);
}

.rail-launch {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(45,226,230,0.08);
  border: 1px solid rgba(45,226,230,0.16);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mission-gallery-panel {
  min-height: 100%;
}

.badge-wall-earned-v2 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  max-height: 920px;
  padding: 18px;
}

.badge-earned-card {
  position: relative;
  width: 100%;
  padding: 18px 16px 16px;
  border-radius: 18px;
  text-align: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 22px rgba(0,0,0,0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.badge-earned-card:hover {
  transform: translateY(-5px);
  border-color: rgba(45,226,230,0.24);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 22px 34px rgba(0,0,0,0.26), 0 0 24px rgba(45,226,230,0.08);
}

.badge-earned-orb {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  min-height: 110px;
}

.badge-earned-halo {
  position: absolute;
  width: 98px;
  height: 98px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(76,201,240,0.16) 0%, rgba(76,201,240,0.06) 42%, transparent 72%);
  filter: blur(6px);
}

.badge-art-wrap-v2 {
  position: relative;
  width: 102px;
  height: 102px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(45,226,230,0.10), rgba(7, 11, 20, 0.12));
  border: 1px solid rgba(76,201,240,0.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 22px rgba(76,201,240,0.12);
}

.badge-art-wrap-v2 .badge-art {
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45));
}

.badge-earned-card .badge-earned-label {
  margin-top: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.badge-earned-footer {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge,
.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.status-badge {
  background: rgba(130,248,178,0.10);
  border: 1px solid rgba(130,248,178,0.20);
  color: #a9f6c8;
}

.score-chip {
  background: rgba(45,226,230,0.10);
  border: 1px solid rgba(45,226,230,0.16);
  color: var(--accent);
}

.mission-shell-v2 .mission-progress-bottom-v2 {
  position: static;
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(10, 16, 28, 0.80);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 14px 28px rgba(0,0,0,0.20);
}

.mission-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.mission-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2de2e6, #82f8b2);
  box-shadow: 0 0 16px rgba(45,226,230,0.28);
}

.mission-shell-v2 .mission-progress-label,
.mission-shell-v2 .mission-progress-num {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-2);
}

.mission-shell-v2 .mission-progress-num {
  color: var(--text-1);
}

.mission-rail::-webkit-scrollbar,
.badge-wall-earned::-webkit-scrollbar {
  width: 10px;
}

.mission-rail::-webkit-scrollbar-track,
.badge-wall-earned::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}

.mission-rail::-webkit-scrollbar-thumb,
.badge-wall-earned::-webkit-scrollbar-thumb {
  background: rgba(45,226,230,0.28);
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .score-overview-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-control-grid {
    grid-template-columns: 1fr;
  }

  .mission-intel-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .queue-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .mission-shell-v2 {
    padding: 0;
  }

  .mission-shell-v2 .mission-shell-head {
    align-items: stretch;
  }

  .mission-shell-v2 .mission-shell-actions {
    width: 100%;
    justify-content: stretch;
  }

  .mission-shell-v2 .mission-action-btn,
  .mission-shell-v2 .cert-btn-top,
  .mission-banner-btn {
    width: 100%;
    justify-content: center;
  }

  .score-overview-v2,
  .mission-intel-column {
    grid-template-columns: 1fr;
  }

  .panel-banner-split,
  .readiness-row,
  .readiness-foot,
  .mission-complete-banner-v2,
  .mission-shell-v2 .mission-progress-bottom-v2 {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .panel-banner-meta,
  .readiness-chip,
  .mission-shell-v2 .mission-progress-num {
    align-self: flex-start;
  }

  .rail-mission-v2 {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rail-launch {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .badge-wall-earned-v2 {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

/* Fix mission queue title overlapping launch button */

.queue-card .rail-mission,
.queue-card .rail-mission-v2 {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
}

/* mission title area */
.queue-card .rail-copy {
  min-width: 0;
}

/* allow titles to wrap cleanly without breaking words awkwardly */
.queue-card .rail-title {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.25;
  max-width: 100%;
}

/* keep launch button aligned right */
.queue-card .rail-launch {
  justify-self: end;
  white-space: nowrap;
}

/* Fix mission queue title wrapping and button spacing */

.queue-card .rail-mission,
.queue-card .rail-mission-v2 {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 156px;
  align-items: center;
  gap: 18px;
}

/* mission title area */
.queue-card .rail-copy {
  min-width: 0;
  max-width: 100%;
}

/* allow titles to wrap cleanly without breaking words awkwardly */
.queue-card .rail-title {
  display: block;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.2;
  max-width: 100%;
}

/* keep launch button aligned right with a fixed lane */
.queue-card .rail-launch {
  width: 156px;
  justify-self: end;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .queue-card .rail-mission,
  .queue-card .rail-mission-v2 {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
  }

  .queue-card .rail-launch {
    width: auto;
    grid-column: 1 / -1;
    justify-self: flex-start;
  }
}



/* =========================================================
   FINAL OVERRIDES: wider left column + queue wrapping + radar label clipping
   ========================================================= */

.mission-control-grid {
  grid-template-columns: 440px minmax(0, 1fr);
}

/* Open Mission Queue: give text and button their own lanes */
.queue-card .rail-mission,
.queue-card .rail-mission-v2 {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 168px;
  align-items: center;
  gap: 20px;
}

.queue-card .rail-copy {
  min-width: 0;
  max-width: 100%;
}

.queue-card .rail-title {
  display: block;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.2;
  max-width: 100%;
}

.queue-card .rail-launch {
  width: 168px;
  justify-self: end;
  text-align: center;
  white-space: nowrap;
}

/* Radar card: prevent axis labels from clipping at the edges */
.radar-card {
  padding: 18px 22px 22px;
}

.radar-card .radar-chart-wrap {
  padding: 4px 18px 0;
  overflow: visible;
}

.radar-card .radar-chart,
.radar-card svg {
  display: block;
  width: min(100%, 300px);
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.radar-chart-labels text,
.radar-card text {
  font-size: 10px;
  letter-spacing: 0;
}

/* Small polish so labels read cleaner against the dark background */
.radar-chart-labels text {
  paint-order: stroke;
  stroke: rgba(5, 10, 20, 0.65);
  stroke-width: 2px;
}

.radar-chart-grid polygon {
  stroke: rgba(45, 226, 230, 0.22);
  stroke-width: 1.15;
}

.radar-chart-grid line {
  stroke: rgba(255, 255, 255, 0.12);
}

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

  .queue-card .rail-mission,
  .queue-card .rail-mission-v2 {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
  }

  .queue-card .rail-launch {
    width: auto;
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .radar-card .radar-chart,
  .radar-card svg {
    width: min(100%, 280px);
    max-width: 280px;
  }
}

/* ── Auth bar ── */
.auth-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-email {
  font-size: 13px;
  color: var(--text-2);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-login-btn,
.auth-logout-btn,
.auth-register-btn {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 9px;
}

.auth-register-btn {
  background: var(--cyan);
  color: #041018;
  font-weight: 600;
  border: none;
  box-shadow: 0 3px 12px rgba(45,226,230,0.25);
}

.auth-register-btn:hover {
  opacity: 0.88;
}

/* Save progress banner */
#saveProgressBanner strong { color: var(--cyan); }

/* ── Certificate branding ── */
.cert-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45,226,230,0.15);
}

.cert-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cert-brand-name {
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-1);
}

.cert-brand-tagline {
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.8;
}

.cert-footer-col-center {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.cert-footer-shield {
  opacity: 0.7;
}

.cert-footer-col-right {
  text-align: right;
}

.cert-footer-sig {
  font-size: 11px;
  color: var(--cyan);
  opacity: 0.7;
  margin-top: 4px;
  letter-spacing: 0.06em;
}

/* Print adjustments */
@media print {
  .cert-brand-name { color: #0a1628; }
  .cert-brand-tagline { color: #1a6b6e; }
  .cert-footer-sig { color: #1a6b6e; }
}
