:root {
  --bg: #060c0a;
  --bg-soft: #0a1410;
  --panel: #0b1511;
  --panel-2: #0f1d17;
  --ink: #d6ffe9;
  --muted: #79b39a;
  --line: #1d3a2d;
  --brand: #2cff88;
  --brand-2: #1bd56e;
  --danger: #ff5f72;
  --scrollbar-track: rgba(6, 16, 13, 0.94);
  --scrollbar-thumb: linear-gradient(180deg, rgba(44, 255, 136, 0.72), rgba(27, 213, 110, 0.42));
  --scrollbar-thumb-hover: linear-gradient(180deg, rgba(133, 255, 196, 0.92), rgba(44, 255, 136, 0.58));
  --scrollbar-border: rgba(109, 255, 178, 0.32);
  --scrollbar-glow: rgba(44, 255, 136, 0.24);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 255, 136, 0.75) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(4, 12, 10, 0.96), rgba(8, 20, 16, 0.96)),
    repeating-linear-gradient(
      180deg,
      rgba(88, 255, 171, 0.06) 0px,
      rgba(88, 255, 171, 0.06) 2px,
      transparent 2px,
      transparent 6px
    );
  border: 1px solid rgba(32, 77, 57, 0.82);
  border-radius: 999px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35);
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 1px solid var(--scrollbar-border);
  border-radius: 999px;
  box-shadow:
    0 0 12px var(--scrollbar-glow),
    inset 0 0 10px rgba(234, 255, 243, 0.12);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: rgba(7, 18, 14, 0.96);
}

body.site {
  margin: 0;
  color: var(--ink);
  font-family: Consolas, "Lucida Console", Monaco, monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 8%, rgba(44, 255, 136, 0.16), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(27, 213, 110, 0.12), transparent 28%),
    linear-gradient(180deg, #050a08 0%, #07100c 100%);
}

body.site::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(72, 255, 155, 0.04) 0px,
      rgba(72, 255, 155, 0.04) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity: 0.16;
}

.cyber-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cyber-bg-canvas,
.cyber-noise,
.cyber-scanlines,
.cyber-vignette {
  position: absolute;
  inset: 0;
}

.cyber-bg-canvas {
  opacity: 1;
  z-index: 1;
}

.cyber-noise {
  z-index: 2;
  opacity: 0.02;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 0.45px, transparent 0.45px);
  background-size: 3px 3px;
}

.cyber-scanlines {
  z-index: 3;
  opacity: 0.02;
  background: repeating-linear-gradient(
    0deg,
    rgba(120, 255, 189, 0.12) 0px,
    rgba(120, 255, 189, 0.12) 1px,
    transparent 1px,
    transparent 4px
  );
}

.cyber-vignette {
  z-index: 4;
  background:
    radial-gradient(circle at center, rgba(5, 8, 22, 0) 28%, rgba(5, 8, 22, 0.36) 62%, rgba(2, 4, 10, 0.74) 100%),
    linear-gradient(90deg, rgba(2, 4, 10, 0.45) 0%, rgba(2, 4, 10, 0.14) 22%, rgba(2, 4, 10, 0.14) 78%, rgba(2, 4, 10, 0.45) 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 16, 13, 0.94);
  backdrop-filter: blur(4px);
}

.site-header h1 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  text-shadow: 0 0 10px rgba(44, 255, 136, 0.3);
}

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

.site-nav a {
  text-decoration: none;
  color: #9fffc9;
  border: 1px solid #28523f;
  border-radius: 8px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #102118, #0b1812);
}

.site-nav a:hover {
  border-color: #3d8263;
  box-shadow: 0 0 14px rgba(44, 255, 136, 0.22);
}

.header-logout-btn {
  width: auto;
  min-width: 0;
  padding: 6px 10px;
}

.page {
  max-width: 1080px;
  margin: 20px auto;
  padding: 0 16px 24px;
  width: 100%;
  flex: 1;
  position: relative;
  z-index: 10;
}

.site-footer {
  max-width: none;
  margin: auto 0 0 0;
  padding: 0 20px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  background: rgba(8, 16, 13, 0.94);
  backdrop-filter: blur(4px);
  min-height: 44px;
  align-items: center;
}

.header-student-name {
  color: #9ef1c5;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

.site-footer nav {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
  min-height: 100%;
  width: 100%;
  justify-content: flex-end;
}

.site-footer a {
  text-decoration: none;
  color: #8ee6b7;
  font-size: 0.9rem;
  text-align: center;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 0 0 1px rgba(35, 80, 59, 0.2), 0 8px 28px rgba(0, 0, 0, 0.45);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  color: #9ef1c5;
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
  padding: 8px 10px;
  color: var(--ink);
  background: #08120f;
  border: 1px solid #2d5e47;
  border-radius: 8px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #44c887;
  box-shadow: 0 0 0 2px rgba(68, 200, 135, 0.2);
}

button {
  background: linear-gradient(180deg, #1fa962, #16834d);
  border-color: #33c87a;
  color: #eafff3;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

button:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 14px rgba(44, 255, 136, 0.28);
}

button.secondary {
  background: linear-gradient(180deg, #133324, #10271d);
  color: #9ef1c5;
}

.inline {
  display: flex;
  gap: 8px;
}

.inline-centered {
  justify-content: center;
  width: 100%;
  text-align: center;
}

.dashboard-two-col {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
}

.dashboard-two-col > .dashboard-curriculum-card {
  order: 0;
  flex: 1 1 58vw;
  min-width: 540px;
}

.dashboard-two-col > .dashboard-games-card {
  order: 1;
  flex: 0 0 17vw;
  min-width: 190px;
}

.card-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header-row h3 {
  margin: 0;
}

.card-header-action {
  width: auto;
  min-width: 0;
  margin-left: auto;
  padding: 6px 10px;
  flex: 0 0 auto;
}

.dashboard-page {
  max-width: 1280px;
}

.dashboard-panel {
  display: grid;
  gap: 12px;
}

.folder-list {
  list-style: none;
  margin: 10px 0 0;
  padding-left: 0;
}

.folder-list li {
  margin: 6px 0;
}

.dashboard-games-card .folder-list a {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(44, 255, 136, 0.18);
  border-radius: 10px;
  background: rgba(10, 21, 17, 0.62);
  text-decoration: none;
}

.dashboard-games-card .folder-list li + li {
  margin-top: 8px;
}

.student-view-all-link {
  text-decoration: none;
  display: inline-block;
  border: 1px solid #2d5e47;
  border-radius: 8px;
  background: linear-gradient(180deg, #133324, #10271d);
  color: #9ef1c5;
}

.student-live-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.dashboard-live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.student-live-label {
  margin: 0;
  font-weight: 700;
  color: #9ef1c5;
}

#studentPanel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 12px;
  align-items: start;
}

#studentPanel > .card:first-child {
  grid-column: 1 / -1;
}

#studentPanel > .student-curriculum-card {
  grid-column: 1;
  grid-row: 2;
}

#studentPanel > .dashboard-games-card {
  grid-column: 2;
  grid-row: 2;
}

.student-curriculum-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#studentPostedCurriculum {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding-right: 6px;
}

.presentation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 120px 120px;
  align-items: center;
  justify-items: stretch;
  width: 100%;
  gap: 12px;
}

.curriculum-presentation-row {
  grid-template-columns: minmax(0, 1fr) 48px 100px 100px 100px;
}

.curriculum-archive-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid rgba(44, 255, 136, 0.4);
  border-radius: 14px;
  color: #eafff3;
  background: #07110a;
  box-shadow: 0 0 36px rgba(0, 255, 156, 0.2);
}

.curriculum-archive-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
}

.curriculum-archive-panel {
  padding: 20px;
}

.curriculum-archive-panel h2,
.curriculum-archive-panel p {
  margin: 0;
}

.archived-presentation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(44, 255, 136, 0.12);
}

.archived-presentation-row .archive-toggle-btn {
  width: 110px;
  min-width: 110px;
  padding: 6px 10px;
}

.presentation-row > span,
.presentation-title-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-curriculum-card .presentation-row > span,
.dashboard-curriculum-card .presentation-title-link {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}

.presentation-row > span {
  justify-self: stretch;
  text-align: left;
}

.presentation-row button {
  width: 100px;
  min-width: 100px;
  padding: 6px 10px;
  margin: 0;
}

.presentation-row .icon-btn {
  width: 42px;
  min-width: 42px;
  padding: 6px;
  line-height: 1;
  font-size: 1.05rem;
}

.download-btn[aria-busy="true"] {
  cursor: wait;
  opacity: 0.78;
}

.download-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: download-spinner-turn 0.7s linear infinite;
}

@keyframes download-spinner-turn {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .download-spinner {
    animation-duration: 1.5s;
  }
}

.game-row {
  grid-template-columns: minmax(0, 1fr) 120px;
  justify-items: stretch;
}

.game-row > span {
  justify-self: start;
  text-align: left;
}

.game-title-link {
  width: auto;
  text-align: left;
}

.game-post-btn {
  justify-self: end;
}

.student-presentation-row {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.game-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.game-row button {
  width: 100px;
  min-width: 100px;
  margin: 0;
}

body.pdf-export-mode .site-header,
body.pdf-export-mode #teacherControls,
body.pdf-export-mode #teacherInteractionControls,
body.pdf-export-mode #studentInteractionPanel,
body.pdf-export-mode #studentHomeOverlayBtn,
body.pdf-export-mode #teacherLiveTopbar,
body.pdf-export-mode #startInteractionBtn,
body.pdf-export-mode #interactionLiveControls {
  display: none !important;
}

body.capture-mode .site-header,
body.capture-mode #teacherControls,
body.capture-mode #teacherInteractionControls,
body.capture-mode #studentInteractionPanel,
body.capture-mode #studentHomeOverlayBtn,
body.capture-mode #teacherLiveTopbar,
body.capture-mode #startInteractionBtn,
body.capture-mode #interactionLiveControls {
  display: none !important;
}

body.capture-mode {
  overflow: hidden;
}

body.capture-mode .presentation-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding-top: 18px;
}

body.pdf-export-mode .presentation-shell {
  max-width: 1200px;
  margin: 0 auto;
}

body.pdf-export-mode .presentation-stage {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.pdf-slide-page {
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 24px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-slide-frame .slide-card {
  max-width: 100%;
}

.pdf-slide-frame {
  flex: 1 1 auto;
}

.pdf-page-label {
  margin-top: 10px;
  text-align: right;
  font-size: 12px;
  color: #555;
}

.pdf-page-footer {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #ddd;
  text-align: center;
  font-size: 11px;
  color: #666;
}

@media print {
  body.pdf-export-mode {
    background: #fff;
  }

  body.pdf-export-mode .presentation-shell {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  body.pdf-export-mode .presentation-stage {
    margin: 0;
  }

  .pdf-slide-page {
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
    min-height: 95vh;
    page-break-after: always;
    break-after: page;
  }

  .pdf-slide-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .pdf-page-footer {
    margin-top: auto;
    padding-top: 8px;
    font-size: 10px;
    border-top: 1px solid #cfcfcf;
  }
}

.presentation-title-link {
  width: 100%;
  color: #d6ffe9;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.presentation-title-link:hover,
.presentation-title-link:focus-visible {
  text-decoration: underline;
}

.phishy-page {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  align-content: start;
}

.phishy-page-title {
  margin: 0;
  padding: 0;
  width: fit-content;
  justify-self: center;
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.phishy-grid {
  display: grid;
  gap: 18px;
  margin-top: 0;
}

.phishy-game-board {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.phishy-roster-card,
.phishy-metrics-card {
  height: 100%;
}

.phishy-advance-row {
  margin-top: 18px;
}

.phishy-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.checkbox-row {
  display: flex;
  align-items: end;
}

.phishy-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.phishy-stat-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(87, 255, 168, 0.25);
  border-radius: 14px;
  background: rgba(6, 18, 24, 0.7);
}

.phishy-stat-card strong {
  font-size: 1.4rem;
}

.phishy-progress-wrap {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.phishy-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.phishy-progress-track {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(87, 255, 168, 0.18);
}

.phishy-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #19c37d 0%, #57ffa8 100%);
  box-shadow: 0 0 16px rgba(87, 255, 168, 0.35);
}

.phishy-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.phishy-techniques-fieldset {
  margin-top: 16px;
  border: 1px solid rgba(87, 255, 168, 0.22);
  border-radius: 14px;
  padding: 14px;
}

.phishy-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.phishy-checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phishy-email {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(87, 255, 168, 0.22);
  border-radius: 14px;
  background: rgba(4, 14, 22, 0.78);
}

.phishy-email-body {
  white-space: normal;
  line-height: 1.5;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.phishy-email-meta {
  display: grid;
  gap: 8px;
}

.phishy-results-block + .phishy-results-block {
  margin-top: 16px;
}

.danger {
  border-color: rgba(255, 95, 114, 0.7);
  color: #ffe5e9;
}

button.danger {
  background: linear-gradient(180deg, #571d28, #381018);
  border-color: rgba(255, 95, 114, 0.6);
}

.cybersim-page {
  max-width: 1180px;
}

.cybersim-title {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.cybersim-teacher {
  display: grid;
  gap: 12px;
}

.cybersim-teacher-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.cybersim-teacher-metrics div,
.cybersim-overview-pill {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 20, 16, 0.85);
}

.cybersim-teacher-metrics strong {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cybersim-teacher-metrics span {
  font-size: 1.6rem;
  color: #f2fff8;
}

.cybersim-btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cybersim-status-copy {
  font-size: 1.1rem;
}

.cybersim-alert-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.cybersim-alert-card,
.cybersim-validation-banner {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 95, 114, 0.45);
  background: rgba(67, 18, 26, 0.6);
}

.cybersim-alert-card.medium {
  border-color: rgba(255, 214, 92, 0.5);
  background: rgba(63, 47, 8, 0.55);
}

.cybersim-assignment-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.cybersim-assignment-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.cybersim-assignment-column h4 {
  margin: 0;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cybersim-member-card,
.cybersim-member-chip,
.cybersim-empty,
.cybersim-system-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(44, 255, 136, 0.2);
  background: rgba(7, 16, 13, 0.82);
}

.cybersim-member-card strong,
.cybersim-member-chip strong {
  font-size: 1.3rem;
}

.cybersim-member-card.disconnected {
  border-color: rgba(255, 95, 114, 0.45);
}

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

.cybersim-recruit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cybersim-recruit-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.cybersim-recruit-column h4 {
  margin: 0;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cybersim-roster-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(44, 255, 136, 0.2);
  border-radius: 14px;
  background: rgba(7, 16, 13, 0.82);
}

.cybersim-roster-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cybersim-roster-copy strong {
  font-size: 1.05rem;
}

.cybersim-roster-toggle {
  width: auto;
  min-width: 170px;
}

.cybersim-roster-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cybersim-auth-star {
  width: 44px;
  min-width: 44px;
  padding: 8px;
  font-size: 1.1rem;
  line-height: 1;
}

.cybersim-auth-star.active {
  background: linear-gradient(180deg, #1fa962, #16834d);
  color: #f2fff8;
}

.cybersim-role-actions {
  display: grid;
  gap: 8px;
}

.cybersim-role-actions button {
  font-size: 1rem;
}

.cybersim-validation-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 95, 114, 0.5);
  background: rgba(62, 18, 25, 0.58);
}

.cybersim-validation-panel.ready {
  border-color: rgba(44, 255, 136, 0.35);
  background: rgba(10, 33, 22, 0.56);
}

.cybersim-validation-panel strong {
  font-size: 1.4rem;
}

.cybersim-validation-list {
  display: grid;
  gap: 8px;
  font-size: 1.05rem;
}

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

.cybersim-system-card strong {
  font-size: 1rem;
}

.cybersim-system-card span {
  font-size: 1.8rem;
}

.cybersim-manage-team {
  display: grid;
}

.cybersim-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cybersim-panel-header h3 {
  margin-bottom: 0;
}

.cybersim-station,
.cybersim-visitor {
  display: grid;
}

.cybersim-station-shell {
  display: grid;
  gap: 12px;
}

.cybersim-station-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cybersim-station-panel,
.cybersim-visitor-card {
  min-height: 60vh;
  padding: 24px;
  border: 1px solid rgba(44, 255, 136, 0.32);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(44, 255, 136, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(8, 18, 14, 0.96), rgba(10, 22, 17, 0.96));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.cybersim-station-panel h3,
.cybersim-visitor-card h3 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cybersim-station-panel p,
.cybersim-visitor-card p,
.cybersim-assign-row span,
.cybersim-badge-card span {
  font-size: clamp(1rem, 1.8vw, 1.45rem);
  line-height: 1.4;
}

.cybersim-code {
  margin: 14px 0;
  padding: 18px 20px;
  font-size: clamp(2.6rem, 9vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  color: #f6fff9;
  border: 1px solid rgba(44, 255, 136, 0.38);
  border-radius: 16px;
  background: rgba(6, 12, 10, 0.9);
}

.cybersim-assign-list,
.cybersim-badge-list {
  display: grid;
  gap: 12px;
}

.cybersim-assign-row,
.cybersim-badge-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(44, 255, 136, 0.18);
  border-radius: 14px;
  background: rgba(7, 16, 13, 0.78);
}

.cybersim-badge-card {
  grid-template-columns: minmax(0, 1fr);
}

.cybersim-badge-card strong {
  font-size: 1.3rem;
}

.cybersim-auth-panel button,
.cybersim-visitor-card button,
.cybersim-station-panel button,
.cybersim-station-panel input,
.cybersim-station-panel select,
#cybersimJoin button,
#cybersimJoin input,
#cybersimJoin select {
  font-size: 1.1rem;
}

@media (max-width: 820px) {
  .phishy-game-board {
    grid-template-columns: 1fr;
  }

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

  .cybersim-assignment-grid,
  .cybersim-system-grid {
    grid-template-columns: 1fr;
  }

  .cybersim-station-overview,
  .cybersim-assign-row {
    grid-template-columns: 1fr;
  }

  .cybersim-station-panel,
  .cybersim-visitor-card {
    min-height: auto;
  }
}

.closure-cta {
  margin: 0;
  font-size: 1.2em;
}

.class-code-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.class-code-label {
  margin: 0;
  font-size: 1rem;
}

.class-code-value {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #39ff14;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.35);
  cursor: pointer;
}

.class-count-pill {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid rgba(44, 255, 136, 0.2);
  border-radius: 12px;
  background: rgba(10, 21, 17, 0.62);
  text-align: center;
}

.class-count-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.class-count-pill strong {
  font-size: 1.3rem;
  color: #f2fff8;
}

.class-code-refresh {
  margin-left: auto;
  width: auto;
  min-width: 0;
  padding: 6px 10px;
  flex: 0 0 auto;
}

.class-code-modal {
  width: 80vw;
  height: 80vh;
  max-width: none;
  max-height: none;
  border: 1px solid #2f6b50;
  border-radius: 14px;
  background: #07120d;
  color: #d8ffe9;
  display: none;
  grid-template-rows: 1fr auto;
  gap: 10px;
  align-items: center;
  justify-items: center;
}

.class-code-modal[open] {
  display: grid;
}

.class-code-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.class-code-modal-value {
  font-size: min(22vw, 22vh);
  line-height: 1;
  letter-spacing: 0.08em;
  color: #39ff14;
  text-shadow: 0 0 18px rgba(57, 255, 20, 0.45);
  user-select: all;
}

.folder-modal {
  width: min(460px, 92vw);
  border: 1px solid #2f6b50;
  border-radius: 12px;
  background: linear-gradient(180deg, #07120d, #091b14);
  color: #d8ffe9;
  padding: 0;
}

.folder-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.folder-modal-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.folder-modal-panel h3 {
  margin: 0;
  color: #56ff9f;
  text-shadow: 0 0 10px rgba(86, 255, 159, 0.25);
}

.folder-modal-actions {
  display: flex;
  gap: 8px;
}

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

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

.pill {
  display: inline-block;
  border: 1px solid #346a50;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.85rem;
  color: #adffd3;
  background: #10251b;
}

.rule-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.register-form {
  max-width: 32ch;
  margin: 0 auto;
}

.register-form input,
.register-form select,
.register-form button {
  width: 100%;
  min-width: 25ch;
}

.signin-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.signin-logo {
  width: min(380px, 92%);
  height: auto;
}

.signin-logo-wrap + h2 {
  margin-top: 0;
}

.rule-pill {
  display: inline-block;
  border: 1px solid #4e3d3d;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.82rem;
  color: #ffb8c1;
  background: #2a1519;
}

.rule-pill.ok {
  border-color: #2fa66a;
  color: #b9ffd8;
  background: #123223;
  box-shadow: 0 0 10px rgba(47, 166, 106, 0.25);
}

input.match-ok {
  border-color: #2fa66a;
  box-shadow: 0 0 0 2px rgba(47, 166, 106, 0.2);
}

ul.flat {
  margin: 8px 0 0;
  padding-left: 18px;
}

a {
  color: #7cffbb;
}

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

  #studentPanel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  #studentPanel > .card:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  #studentPanel > .card,
  #studentPanel > .dashboard-games-card {
    width: 100%;
    max-width: none;
    order: 1;
    grid-column: auto;
    grid-row: auto;
  }

  #studentPanel > .student-curriculum-card {
    width: 100%;
    max-width: none;
    order: 2;
    grid-column: auto;
    grid-row: auto;
  }

  #studentPanel > .dashboard-live-card {
    width: 100%;
    max-width: none;
    order: 0;
  }

  .student-live-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }

  .student-live-label {
    width: 100%;
  }

  .dashboard-live-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-live-actions button {
    width: 100%;
  }

  .dashboard-two-col {
    flex-wrap: wrap;
  }

  .dashboard-two-col > .card {
    flex: 1 1 100%;
    min-width: 0;
  }

  .presentation-shell {
    width: 100vw;
    max-width: 100vw;
    margin: 6px 0 12px;
    margin-left: calc(50% - 50vw);
    padding: 0 2px;
  }

  .presentation-stage,
  body.teacher-view .presentation-stage,
  body.present-mode .presentation-stage,
  .presentation-shell.wide-slide-mode .presentation-stage,
  body.teacher-view .presentation-shell.wide-slide-mode .presentation-stage,
  body.present-mode .presentation-shell.wide-slide-mode .presentation-stage,
  .presentation-shell.allow-wide-slide .presentation-stage,
  body.teacher-view .presentation-shell.allow-wide-slide .presentation-stage,
  body.present-mode .presentation-shell.allow-wide-slide .presentation-stage {
    width: 100%;
    max-width: none;
  }

  body.presentation-page .presentation-stage {
    aspect-ratio: 16 / 9;
    min-height: 0;
    padding: 6px 4px;
    overflow: auto;
    border-radius: 10px;
  }

  body.presentation-page .slide-track,
  body.presentation-page .slide-card {
    min-height: 100%;
  }

  body.presentation-page .site-header {
    padding: 10px 12px;
  }
}

@media (max-width: 720px) {
  .page {
    margin-top: 14px;
    padding: 0 12px 20px;
  }

  .page.dashboard-page {
    max-width: none;
  }

  .site-footer {
    padding: 10px 12px;
    min-height: 56px;
  }

  .site-footer nav {
    justify-content: space-between;
    gap: 8px;
  }

  .site-footer nav a {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.82rem;
  }

  .class-code-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .class-code-refresh {
    margin-left: 0;
  }

  .dashboard-two-col {
    display: flex;
    flex-direction: column;
  }

  .dashboard-teacher-panel,
  .dashboard-student-panel {
    gap: 10px;
  }

  .dashboard-live-card {
    order: 0;
  }

  .dashboard-teacher-panel .dashboard-two-col > .dashboard-games-card {
    order: 0;
  }

  .dashboard-teacher-panel .dashboard-two-col > .dashboard-curriculum-card {
    order: 1;
  }

  .student-live-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .dashboard-live-actions {
    justify-content: flex-end;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
  }

  .site-header h1 {
    font-size: 1rem;
    line-height: 1.25;
    text-align: center;
  }

  .header-student-name {
    display: inline-block;
    margin-top: 2px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .site-nav a,
  .site-nav .header-logout-btn {
    width: 100%;
    text-align: center;
  }

  .card-header-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .card-header-action {
    margin-left: 0;
  }

  .folder-list li {
    margin: 8px 0;
  }

  .presentation-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .game-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .presentation-row,
  .student-presentation-row {
    width: 100%;
    max-width: none;
  }

  .presentation-row button:not(.icon-btn) {
    display: none;
  }

  .presentation-row .icon-btn {
    width: 44px;
    min-width: 44px;
    justify-self: end;
  }

  .presentation-row > span,
  .presentation-title-link {
    font-size: 0.96rem;
  }

  #studentPostedCurriculum {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .phishy-page,
  .cybersim-page {
    gap: 10px;
  }

  .phishy-page-title,
  .cybersim-title {
    font-size: clamp(1.7rem, 7vw, 2.3rem);
    line-height: 1.05;
    text-align: center;
  }

  .phishy-grid,
  .cybersim-teacher,
  .cybersim-station,
  .cybersim-visitor {
    gap: 10px;
  }

  .phishy-game-board,
  .phishy-subgrid,
  .phishy-checkbox-grid,
  .cybersim-station-overview,
  .cybersim-assignment-grid,
  .cybersim-system-grid {
    gap: 10px;
  }

  .phishy-btn-row,
  .cybersim-btn-row {
    gap: 8px;
  }

  .phishy-btn-row button,
  .cybersim-btn-row button {
    width: 100%;
  }

  .phishy-progress-header,
  .cybersim-panel-header {
    grid-template-columns: 1fr;
    display: grid;
    gap: 6px;
    align-items: start;
  }

  .phishy-progress-header span,
  .cybersim-panel-header button {
    justify-self: start;
  }

  .phishy-stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .phishy-stat-card,
  .phishy-email,
  .cybersim-member-card,
  .cybersim-member-chip,
  .cybersim-empty,
  .cybersim-system-card,
  .cybersim-alert-card,
  .cybersim-validation-banner {
    padding: 12px;
  }

  .phishy-email-body,
  .cybersim-station-panel p,
  .cybersim-visitor-card p {
    line-height: 1.45;
  }

  .cybersim-status-copy {
    font-size: 1rem;
    line-height: 1.4;
  }

  .cybersim-teacher-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cybersim-teacher-metrics span {
    font-size: 1.25rem;
  }

  .cybersim-assignment-column h4 {
    font-size: 1.05rem;
  }

  .cybersim-member-card strong,
  .cybersim-member-chip strong,
  .cybersim-badge-card strong {
    font-size: 1.05rem;
  }

  .cybersim-roster-row {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
  }

  .cybersim-recruit-grid {
    grid-template-columns: 1fr;
  }

  .cybersim-roster-actions {
    justify-content: stretch;
  }

  .cybersim-roster-toggle {
    width: 100%;
    min-width: 0;
  }

  .cybersim-auth-star {
    width: 100%;
    min-width: 0;
  }

  .cybersim-station-panel,
  .cybersim-visitor-card,
  #cybersimJoin.card,
  #studentPromptCard,
  #studentComposeCard {
    padding: 16px;
    border-radius: 14px;
  }

  .cybersim-station-panel h3,
  .cybersim-visitor-card h3 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    margin-bottom: 10px;
  }

  .cybersim-station-panel p,
  .cybersim-visitor-card p,
  .cybersim-assign-row span,
  .cybersim-badge-card span {
    font-size: 0.98rem;
  }

  .cybersim-code {
    margin: 10px 0;
    padding: 14px 12px;
    font-size: clamp(1.9rem, 12vw, 3rem);
    letter-spacing: 0.08em;
    word-break: break-word;
  }

  .cybersim-assign-row,
  .cybersim-badge-card {
    gap: 8px;
    padding: 10px;
  }

  #cybersimJoin h3,
  #studentPromptCard h3,
  #studentComposeCard h3 {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  .site-footer nav a {
    font-size: 0.78rem;
  }

  .phishy-subgrid,
  .phishy-checkbox-grid,
  .grid-2,
  .cybersim-teacher-metrics {
    grid-template-columns: 1fr;
  }

  .student-live-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .dashboard-live-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-live-actions button {
    width: 100%;
  }

  .phishy-email-meta,
  .cybersim-alert-stack,
  .cybersim-validation-list {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cyber-bg-canvas {
    opacity: 0.45;
  }
}

body.presentation-page {
  overflow: hidden;
}

.presentation-page .site-header {
  position: relative;
}

body.present-mode .site-header {
  display: none;
}

body.present-mode .teacher-live-topbar {
  top: 10px;
  right: 14px;
}

body.present-mode .presentation-shell {
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 10px 14px 12px;
  grid-template-rows: minmax(0, 1fr) 72px;
  gap: 8px;
  justify-items: center;
}

body.present-mode .presentation-controls {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  padding: 8px 12px;
  align-content: center;
  width: auto;
  justify-self: center;
  grid-template-columns: auto auto auto;
}

body.present-mode .presentation-controls button {
  height: 44px;
}

body.present-mode .presentation-stage {
  width: min(1200px, 100%);
  justify-self: center;
  align-self: center;
  height: auto;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

body.teacher-view .presentation-shell {
  min-height: calc(100vh - 90px);
  grid-template-rows: minmax(0, 1fr) 72px;
  gap: 8px;
  justify-items: center;
}

body.teacher-view .presentation-controls {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  padding: 8px 12px;
  align-content: center;
  width: auto;
  justify-self: center;
  grid-template-columns: auto auto auto;
}

body.teacher-view .presentation-controls button {
  height: 44px;
}

body.teacher-view .presentation-stage {
  width: min(1200px, 100%);
  justify-self: center;
  align-self: center;
  height: auto;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

body.teacher-view .presentation-shell.wide-slide-mode .presentation-stage {
  width: min(1518px, 100%);
}

body.teacher-view .presentation-shell.allow-wide-slide {
  max-width: 1900px;
}

body.teacher-view .presentation-shell.allow-wide-slide .presentation-stage {
  width: min(1840px, 100%);
}

body.teacher-view .slide-track,
body.teacher-view .slide-card {
  height: auto;
}

body.present-mode .presentation-shell.wide-slide-mode .presentation-stage {
  width: min(1518px, 100%);
}

body.present-mode .presentation-shell.allow-wide-slide .presentation-stage {
  width: min(1840px, 100%);
}

body.present-mode .slide-track,
body.present-mode .slide-card {
  height: auto;
}

.presentation-shell {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1200px;
  margin: 12px auto 18px;
  padding: 0 16px;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  gap: 12px;
  position: relative;
  overflow: visible;
  z-index: 10;
}

.presentation-shell.allow-wide-slide {
  max-width: 1900px;
}

body.signin-page .page {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.signin-page .page > .card {
  width: min(760px, 100%);
}

.teacher-live-topbar {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-home-overlay-btn {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 45;
  text-decoration: none;
  border: 1px solid #4ed493;
  border-radius: 8px;
  padding: 8px 12px;
  color: #eafff3;
  background: linear-gradient(180deg, #183a29, #10281d);
  box-shadow: 0 0 14px rgba(58, 233, 133, 0.25);
}

.live-session-overlay {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: #39ff14;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.35);
}

.live-end-btn {
  width: auto;
  min-width: 0;
  padding: 8px 12px;
  white-space: nowrap;
}

#studentInteractionPanel h3 {
  margin-top: 0;
}

#studentInteractionPanel .inline,
#teacherInteractionControls.inline {
  align-items: center;
}

#teacherInteractionControls p {
  margin: 0;
}

.scenario-answer-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 12px;
}

.scenario-answer-row {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 10px;
  align-items: center;
  border: 1px solid #2d684c;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(8, 27, 18, 0.85), rgba(12, 36, 24, 0.62));
}

.scenario-answer-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.scenario-answer-select {
  width: 100%;
}

.scenario-submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}

.scenario-submit-row button {
  width: auto;
  min-width: 180px;
}

.student-answer-submit-message {
  color: #ffb3b3;
  font-size: 0.95rem;
  min-height: 1.2em;
}

.student-answer-submit-message.success {
  color: #9fe0b0;
}

.budget-interaction-grid,
.budget-student-grid {
  display: flex;
  gap: 0;
  width: min(90vw, 1780px);
  align-items: center;
}

.budget-scenario-card,
.budget-student-scenario,
.budget-controls-card,
.budget-student-controls {
  width: 100%;
  text-align: left;
}

.budget-scenario-card,
.budget-student-scenario {
  flex: 0 0 60%;
  max-width: 60%;
}

.budget-controls-card,
.budget-student-controls {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.slide-card.physical-controls-budget-slide {
  gap: 8px;
  padding-top: 4px;
}

.slide-card.physical-controls-budget-slide .slide-top-content {
  gap: 2px;
}

.slide-card.physical-controls-budget-slide .budget-scenario-card,
.slide-card.physical-controls-budget-slide .budget-student-scenario,
.slide-card.physical-controls-budget-slide .budget-controls-card,
.slide-card.physical-controls-budget-slide .budget-student-controls {
  padding-top: 2px;
  padding-bottom: 6px;
}

.budget-scenario-card p,
.budget-student-scenario p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.budget-scenario-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #2d684c;
  box-shadow: 0 0 18px rgba(44, 255, 136, 0.14);
}

.budget-concern-block {
  margin-top: 12px;
}

.budget-concern-block h4,
.budget-student-scenario h4 {
  margin: 0 0 8px;
  color: #9ef7c9;
  font-size: 1rem;
}

.budget-scenario-closure {
  margin-top: 12px;
  color: #aef8d0;
  font-weight: 600;
}

.budget-controls-header,
.budget-student-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.budget-controls-header h3 {
  margin: 0;
}

.budget-pill-display {
  border: 1px solid #2d684c;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(7, 21, 14, 0.92);
  color: #cffff0;
  box-shadow: inset 0 0 8px rgba(44, 255, 136, 0.1);
}

.budget-pill-display strong {
  color: #39ff14;
}

.budget-pill-display.over-budget strong {
  color: #ff8b97;
}

.budget-control-list,
.budget-control-pill-grid {
  display: grid;
  gap: 10px;
}

.budget-control-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #2d684c;
  border-radius: 12px;
  background: rgba(6, 23, 15, 0.78);
}

.budget-control-name,
.budget-control-pill-label {
  color: #d9ffea;
  font-weight: 600;
}

.budget-control-cost,
.budget-control-pill-cost {
  color: #9df7c7;
  white-space: nowrap;
}

.budget-control-pill {
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2d684c;
  background: linear-gradient(145deg, rgba(8, 27, 18, 0.88), rgba(12, 36, 24, 0.66));
  color: #d9ffea;
  text-align: left;
  box-shadow: inset 0 0 10px rgba(54, 176, 106, 0.15), 0 0 12px rgba(6, 27, 17, 0.35);
}

.budget-control-pill:hover:not(:disabled),
.budget-control-pill:focus-visible:not(:disabled) {
  border-color: #52e29a;
  box-shadow: 0 0 18px rgba(44, 255, 136, 0.2), inset 0 0 10px rgba(54, 176, 106, 0.18);
}

.budget-control-pill.selected {
  border-color: #74ffb5;
  background: linear-gradient(145deg, rgba(17, 55, 36, 0.94), rgba(16, 48, 31, 0.84));
  box-shadow: 0 0 20px rgba(44, 255, 136, 0.26), inset 0 0 12px rgba(110, 255, 181, 0.22);
}

.budget-control-pill:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.mixed-situation-text {
  margin: 0 0 12px !important;
  text-align: left;
}

.mixed-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.mixed-question-text {
  margin: 0;
  text-align: left;
  color: #d9ffea;
  font-size: 1rem;
  line-height: 1.4;
}

.inline-rank-control-list {
  display: grid;
  gap: 10px;
}

.inline-rank-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #2d684c;
  border-radius: 12px;
  background: rgba(6, 23, 15, 0.78);
}

.inline-rank-control-row .rank-control-name {
  text-align: left;
}

.inline-rank-control-row .rank-control-select,
.mixed-question-row .mixed-single-select {
  width: auto;
  min-width: 140px;
  max-width: 220px;
  margin-left: auto;
}

@media (max-width: 980px) {
  .budget-interaction-grid,
  .budget-student-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.presentation-shell.wide-slide-mode {
  max-width: 1500px;
}

.presentation-shell {
  position: relative;
}

.interaction-top-controls-anchor {
  position: absolute;
  top: 0;
  right: 10px;
  transform: translateY(calc(-100% - 6px));
  z-index: 46;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.present-mode .interaction-top-controls-anchor {
  top: 8px;
  right: 10px;
  transform: none;
}

.presentation-stage {
  margin: 0;
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-color: #2d684c;
  box-shadow: 0 0 22px rgba(44, 255, 136, 0.18), inset 0 0 35px rgba(14, 58, 38, 0.2);
}

.presentation-stage.allow-overflow-slide {
  overflow-y: auto;
  overflow-x: visible;
}

.start-interaction-btn {
  width: auto;
  min-width: 0;
  padding: 6px 10px;
}

.interaction-live-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

#teacherSubmittedStat {
  min-width: 180px;
  text-align: center;
}

.presentation-stage.image-slide-mode {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  overflow: hidden;
  width: min(100%, 1200px);
  height: auto;
  aspect-ratio: 16 / 9;
}

body.teacher-view .presentation-stage.image-slide-mode,
body.present-mode .presentation-stage.image-slide-mode {
  overflow: hidden;
  height: auto;
}

body.teacher-view:not(.present-mode) .presentation-stage.image-slide-mode {
  width: min(1200px, 100%, calc(177.78dvh - 391.12px));
  max-height: calc(100dvh - 220px);
}

body.present-mode .presentation-stage.image-slide-mode {
  width: min(1200px, 100%, calc(177.78dvh - 213.34px));
  max-height: calc(100dvh - 120px);
}

body.teacher-view .presentation-stage.image-slide-mode .slide-track,
body.teacher-view .presentation-stage.image-slide-mode .slide-card.image-only,
body.present-mode .presentation-stage.image-slide-mode .slide-track,
body.present-mode .presentation-stage.image-slide-mode .slide-card.image-only {
  height: 100%;
  min-height: 0;
}

.slide-track {
  height: 100%;
}

.slide-card {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  position: relative;
  overflow: hidden;
  justify-items: center;
  text-align: center;
  align-content: start;
  padding: 8px 6px 10px;
}

.slide-top-content {
  width: min(1040px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.slide-wide-content {
  width: 100%;
  display: grid;
  justify-items: center;
}

.slide-card.risk-overview-slide {
  height: auto;
  min-height: 100%;
  overflow: visible;
  gap: 10px;
}

.slide-card.risk-overview-slide .slide-top-content {
  width: min(1040px, 100%);
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.slide-card.risk-overview-slide .slide-wide-content {
  width: min(90vw, 1780px);
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.slide-card.physical-controls-interaction-slide .slide-top-content {
  width: min(90vw, 1780px);
}

.slide-card.detection-tradeoffs-slide .slide-top-content,
.slide-card.detection-tradeoffs-slide .intro-sections {
  width: min(100vw, 2136px);
}

.slide-card.detection-tradeoffs-slide .intro-sections {
  grid-template-columns: 1fr;
}

.slide-card.detection-tradeoffs-slide .intro-sections .threat-panel-card h3 {
  display: none;
}

.slide-card.detection-tradeoffs-slide .intro-sections .threat-panel-card,
.slide-card.detection-tradeoffs-slide .intro-sections .slide-list {
  width: min(96%, 1880px);
  margin: 0 auto;
}

.slide-card.physical-spaces-review-slide .slide-top-content,
.slide-card.physical-spaces-review-slide .intro-sections {
  width: min(85vw, 1680px);
}

.slide-card.physical-spaces-review-slide .intro-sections {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.slide-card.physical-spaces-review-slide .threat-panel-card,
.slide-card.physical-spaces-review-slide .slide-list {
  width: 100%;
}

.slide-card.physical-spaces-review-slide .slide-list {
  font-size: clamp(1rem, 1.15vw, 1.22rem);
}

.slide-card.physical-spaces-review-slide .threat-panel-card h3 {
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
}

.slide-card.image-only {
  display: block;
  position: relative;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.slide-image-only {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.slide-image-only.image-fit-safe {
  max-height: 100%;
}

.slide-track img.previewable-image {
  cursor: zoom-in;
}

.inline-slide-image {
  width: auto;
  max-width: min(98%, 1200px);
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.inline-slide-image.fit-activity-overview {
  max-height: 64vh;
}

.slide-kicker {
  margin: 0;
  color: #6df7aa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.slide-card h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
  color: #53ff9d;
  text-shadow: 0 0 14px rgba(83, 255, 157, 0.24);
}

.slide-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.slide-list {
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
  display: grid;
  gap: 10px;
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  width: min(1040px, 100%);
}

.spectrum-grid,
.threat-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(1040px, 100%);
}

.intro-sections {
  grid-template-columns: 1fr;
}

.intro-sections.risk-overview-grid {
  width: 100%;
  grid-template-columns: minmax(260px, 30vw) minmax(420px, 50vw);
  justify-content: center;
  align-items: start;
}

.intro-sections.defense-overview-grid {
  width: 100%;
  grid-template-columns: minmax(520px, 60%) minmax(320px, 40%);
  justify-content: center;
  align-items: start;
}

.intro-sections .threat-panel-card h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.intro-sections .threat-panel-card p {
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
}

.intro-sections.risk-overview-grid .slide-list {
  width: 100%;
  text-align: left;
  gap: 8px;
  font-size: clamp(0.94rem, 1.1vw, 1.06rem);
}

.vocab-pill-list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: flex-start;
}

.vocab-pill-list li {
  margin: 0;
}

.vocab-term {
  position: relative;
  display: inline-block;
  border-bottom: 1px dashed rgba(117, 255, 178, 0.7);
  color: #cffff0;
  cursor: help;
}

.vocab-pill {
  border: 1px solid #2d684c;
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(145deg, rgba(8, 27, 18, 0.92), rgba(12, 36, 24, 0.8));
  box-shadow: inset 0 0 9px rgba(54, 176, 106, 0.2), 0 0 12px rgba(6, 27, 17, 0.35);
}

.vocab-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 34vw);
  padding: 10px 12px;
  border: 1px solid #44c985;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(4, 18, 12, 0.96), rgba(9, 33, 22, 0.95));
  color: #dcffe9;
  font-size: 0.9rem;
  line-height: 1.35;
  box-shadow: 0 0 18px rgba(67, 233, 148, 0.26), inset 0 0 12px rgba(20, 88, 57, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  z-index: 40;
  pointer-events: none;
}

.vocab-term:hover .vocab-tooltip,
.vocab-term:focus .vocab-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.table-term-tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dashed rgba(117, 255, 178, 0.7);
  cursor: help;
}

.table-hover-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 34vw);
  padding: 10px 12px;
  border: 1px solid #44c985;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(4, 18, 12, 0.96), rgba(9, 33, 22, 0.95));
  color: #dcffe9;
  font-size: 0.88rem;
  line-height: 1.35;
  box-shadow: 0 0 18px rgba(67, 233, 148, 0.26), inset 0 0 12px rgba(20, 88, 57, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  z-index: 45;
  pointer-events: none;
}

.table-term-tooltip:hover .table-hover-tooltip,
.table-term-tooltip:focus .table-hover-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.spectrum-card,
.threat-panel-card,
.scenario-card {
  border: 1px solid #2d684c;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(8, 27, 18, 0.85), rgba(12, 36, 24, 0.62));
  box-shadow: inset 0 0 12px rgba(54, 176, 106, 0.18), 0 0 16px rgba(6, 27, 17, 0.45);
}

.spectrum-card h3,
.threat-panel-card h3,
.scenario-card h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  color: #8dffc2;
}

.spectrum-card p,
.threat-panel-card p,
.scenario-card p {
  margin: 0;
  font-size: 1.04rem;
  color: #d3ffe6;
}

.mission-note {
  margin: 2px 0 0;
  color: #9cf2c9;
  width: min(1040px, 100%);
  font-size: 1.05rem;
}

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

.case-link-grid {
  grid-template-columns: 1fr;
  width: min(1440px, 100%);
}

/* Give wide interaction slides (including slide 15) ~10% more content width. */
.presentation-shell.wide-slide-mode .case-link-grid {
  width: min(1584px, 100%);
}

.case-link-card h3 {
  font-size: 2.2rem;
  line-height: 1.1;
}

.case-link-card p {
  font-size: 2rem;
  word-break: break-word;
}

.case-link-card {
  width: 100%;
}

/* Tighten title-to-content spacing on wide interaction slides (e.g., slide 15). */
.presentation-shell.wide-slide-mode .slide-card {
  gap: 8px;
}

.presentation-shell.wide-slide-mode .slide-card header {
  margin-bottom: 0;
}

.presentation-shell.wide-slide-mode .slide-card h2 {
  margin: 0 0 2px;
}

.tactic-scenario-card p {
  font-size: 1.6rem;
}

.slide-card.physical-attack-identification-compact .tactic-scenario-card p {
  font-size: 1.296rem;
}

body[data-current-slide-class="physical-attack-identification-compact"] #studentInteractionPanel .scenario-answer-text {
  font-size: 0.77rem;
}

.slide-card.physical-attack-identification-compact {
  gap: 5px;
  padding: 4px 4px 6px;
}

.slide-card.physical-attack-identification-compact h2 {
  margin: 0 0 2px;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
}

.slide-card.physical-attack-identification-compact .case-link-grid {
  gap: 8px;
}

.slide-card.physical-attack-identification-compact .tactic-scenario-card {
  padding: 10px 12px;
}

.slide-card.firewall-challenge-slide {
  width: min(100%, 1518px);
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(420px, 0.65fr) minmax(260px, 0.35fr);
  grid-template-areas:
    "header header"
    "rulebook scenarios";
  align-items: start;
  gap: 12px 16px;
  justify-content: center;
}

.slide-card.firewall-challenge-slide header {
  grid-area: header;
}

.slide-card.firewall-challenge-slide .intro-sections {
  grid-area: rulebook;
  width: 100%;
  grid-template-columns: 1fr;
  align-self: start;
}

.slide-card.firewall-challenge-slide .case-link-grid {
  grid-area: scenarios;
  width: 100%;
  grid-template-columns: 1fr;
  align-self: start;
  justify-items: start;
}

.slide-card.firewall-challenge-slide .threat-panel-card,
.slide-card.firewall-challenge-slide .slide-list {
  width: 100%;
  text-align: left;
}

.slide-card.firewall-challenge-slide .case-link-card {
  width: min(100%, 520px);
  max-width: 520px;
  text-align: left;
}

.slide-card.firewall-challenge-slide .case-link-card p {
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.slide-card.firewall-challenge-slide .slide-list {
  font-size: 1rem;
}

.slide-card.firewall-challenge-slide .tactic-scenario-card p {
  font-size: 1.18rem;
}

.attack-type-card h3 {
  font-size: 1.35rem;
}

.attack-type-card p {
  font-size: 1.12rem;
}

.attack-type-answer {
  margin-top: 10px !important;
  color: #8dffc2;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: min(1040px, 100%);
}

.hacker-table-grid {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.hacker-table-card {
  border: 1px solid #2d684c;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(8, 27, 18, 0.85), rgba(12, 36, 24, 0.62));
  box-shadow: inset 0 0 12px rgba(54, 176, 106, 0.18), 0 0 16px rgba(6, 27, 17, 0.45);
}

.hacker-table-card h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  color: #8dffc2;
}

.hacker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.hacker-table th,
.hacker-table td {
  border: 1px solid #2d684c;
  padding: 7px 8px;
  text-align: center;
  vertical-align: middle;
}

.hacker-table th {
  color: #65ffab;
  background: rgba(13, 44, 30, 0.7);
}

.tactic-chip {
  border: 1px solid #3e7f5f;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.96rem;
  color: #c7ffe3;
  background: #103121;
}

.presentation-controls {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.slide-jump-btn {
  width: auto;
  min-width: 130px;
  justify-self: center;
  background: linear-gradient(180deg, #183a29, #10281d);
  border-color: #4ed493;
  box-shadow: 0 0 14px rgba(58, 233, 133, 0.25);
}

.slide-jump-modal {
  border: 1px solid #3b7d5d;
  border-radius: 14px;
  background: #081610;
  color: #d5ffea;
  width: min(760px, 95vw);
  padding: 0;
}

#teacherResultsDialog.slide-jump-modal {
  width: 80vw;
  max-width: none;
}

.slide-jump-modal::backdrop {
  background: rgba(2, 7, 5, 0.76);
}

.slide-jump-panel {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.slide-jump-panel h2 {
  margin: 0;
  color: #65ffab;
  letter-spacing: 0.05em;
}

.results-dialog-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 12px;
  min-height: 44px;
}

.results-dialog-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  grid-column: 1;
}

.results-dialog-title-wrap h2 {
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

#teacherResultsItemMeta {
  white-space: nowrap;
  font-size: 0.96rem;
  line-height: 1;
  display: flex;
  align-items: center;
  grid-column: 2;
  justify-self: start;
}

.results-dialog-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 3;
  justify-self: end;
}

.results-dialog-nav-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 72px;
  padding: 0 12px;
}

.slide-jump-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.slide-jump-option {
  padding: 10px 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #132c20, #0c1e16);
}

.slide-jump-option.active {
  border-color: #5affac;
  box-shadow: 0 0 12px rgba(89, 255, 171, 0.28);
}

.results-grid {
  display: grid;
  gap: 10px;
}

.results-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border: 1px solid #2d684c;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(8, 27, 18, 0.85), rgba(12, 36, 24, 0.62));
}

.results-grid-row-single {
  grid-template-columns: 1fr;
  min-height: 58vh;
  align-content: start;
}

.results-scenario-text {
  font-size: 0.98rem;
  line-height: 1.3;
  color: #d3ffe6;
}

.results-bars-col {
  display: grid;
  gap: 8px;
}

.results-bar-row {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 56px;
  align-items: start;
  gap: 8px;
  min-height: 30px;
}

.results-bar-label,
.results-bar-count {
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.results-bar-label {
  text-align: left;
  justify-content: flex-start;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
}

.results-bar-count {
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.results-bar-track {
  height: 12px;
  border: 1px solid #2d684c;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(5, 20, 14, 0.8);
  align-self: center;
}

.results-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1bd56e, #39ff14);
}

.image-preview-modal {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  inset: 0;
  margin: 0;
  box-sizing: border-box;
  background: rgba(6, 22, 15, 0.92);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.image-preview-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.image-preview-panel {
  display: grid;
  justify-items: center;
  align-items: center;
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  padding: 0;
}

.image-preview-img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-out;
}

@media (max-width: 950px) {
  .presentation-shell {
    grid-template-rows: 1fr auto;
  }

  .spectrum-grid,
  .threat-panel-grid,
  .threat-prompts {
    grid-template-columns: 1fr;
  }

  .slide-jump-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .intro-sections.risk-overview-grid {
    width: min(1040px, 100%);
    grid-template-columns: 1fr;
  }

  .intro-sections.defense-overview-grid {
    width: min(1040px, 100%);
    grid-template-columns: 1fr;
  }

  .vocab-tooltip {
    width: min(320px, 78vw);
  }
}

body.student-interaction-mode .presentation-stage {
  display: none;
}

body.student-interaction-mode .presentation-shell {
  height: 100vh;
  grid-template-rows: auto;
  align-content: center;
  justify-items: center;
}

body.student-interaction-mode #teacherControls,
body.student-interaction-mode #teacherLiveControls {
  display: none !important;
}

body.student-interaction-mode #studentInteractionPanel {
  height: auto;
  max-height: calc(100vh - 40px);
  overflow: auto;
  width: min(1200px, 100%);
  margin: 0;
}

body.student-interaction-mode[data-current-slide-class="physical-controls-budget-slide"] #studentInteractionPanel {
  width: min(90vw, 1780px);
  max-width: min(90vw, 1780px);
}

body.student-interaction-mode[data-current-slide-class="physical-controls-budget-slide"] .budget-student-grid {
  width: 100%;
}

.peer-review-response-input {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.peer-review-privacy-warning {
  padding: 10px 12px;
  border: 1px solid rgba(255, 184, 77, 0.45);
  border-radius: 9px;
  color: #ffd28a;
  background: rgba(92, 55, 4, 0.28);
}

.analysis-disclaimer {
  padding: 8px 10px;
  border-left: 3px solid #00ff9c;
}

.analysis-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.analysis-metric-row span {
  padding: 8px;
  border: 1px solid rgba(44, 255, 136, 0.22);
  border-radius: 8px;
  text-align: center;
}

.analysis-metric-row .analysis-relevance-metric {
  position: relative;
  cursor: help;
  outline: none;
}

.analysis-relevance-metric.relevance-very-low strong { color: #ff6b6b; }
.analysis-relevance-metric.relevance-low strong { color: #ff9f43; }
.analysis-relevance-metric.relevance-medium strong { color: #ffe066; }
.analysis-relevance-metric.relevance-high strong { color: #7bed9f; }
.analysis-relevance-metric.relevance-very-high strong { color: #2cff88; }

.analysis-metric-row .analysis-metric-tooltip {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 8px);
  width: min(260px, 75vw);
  padding: 8px 10px;
  border: 1px solid rgba(44, 255, 136, 0.38);
  border-radius: 8px;
  background: #07130e;
  color: #e8fff2;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.analysis-relevance-metric:hover .analysis-metric-tooltip,
.analysis-relevance-metric:focus .analysis-metric-tooltip {
  opacity: 1;
}

@media (max-width: 700px) {
  .analysis-metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.analysis-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.analysis-theme-grid blockquote {
  margin: 8px 0 0;
  padding-left: 9px;
  border-left: 2px solid rgba(44, 255, 136, 0.35);
  color: #b8d8c7;
}

.analysis-common-understandings {
  margin: 12px 0;
}

.analysis-understanding-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}

.analysis-understanding-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border: 1px solid rgba(44, 255, 136, 0.22);
  border-radius: 8px;
}

.analysis-understanding-cell strong {
  color: #2cff88;
  white-space: nowrap;
}

.analysis-standout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.analysis-standout-card blockquote {
  margin: 10px 0;
  padding-left: 9px;
  border-left: 2px solid rgba(44, 255, 136, 0.35);
  color: #d7eee2;
}

.analysis-student-name {
  margin: 5px 0;
  color: #2cff88;
  font-weight: 700;
}

.analysis-heading-tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted currentColor;
  outline: none;
}

.analysis-heading-tooltip-text {
  position: absolute;
  z-index: 20;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(280px, 75vw);
  padding: 8px 10px;
  border: 1px solid rgba(44, 255, 136, 0.38);
  border-radius: 8px;
  background: #07130e;
  color: #e8fff2;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.analysis-heading-tooltip:hover .analysis-heading-tooltip-text,
.analysis-heading-tooltip:focus .analysis-heading-tooltip-text {
  opacity: 1;
}

@media (max-width: 800px) {
  .analysis-understanding-row { grid-template-columns: 1fr; }
  .analysis-standout-grid { grid-template-columns: 1fr; }
}

.peer-review-compose-footer,
.peer-review-scale-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.peer-review-response-card {
  margin: 16px 0;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(83, 255, 157, 0.45);
  border-radius: 12px;
  background: rgba(5, 30, 20, 0.88);
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.1);
}

.peer-review-response-card p {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.peer-review-rating-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(48px, 1fr));
  gap: 8px;
}

.peer-review-rating-btn {
  min-height: 52px;
  font-size: 1.1rem;
  font-weight: 700;
}

.peer-review-scale-labels {
  color: #9ddbb8;
  font-size: 0.9rem;
}

.peer-review-rating-prompt {
  text-align: center;
}

.peer-review-complete {
  color: #6df7aa;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
}

.peer-review-winners {
  display: grid;
  gap: 12px;
}

.peer-review-winner p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .peer-review-rating-scale {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
  }
}
