/* Global layout — Google / Material-style tokens app-wide (Workspace + all courses) */
:root {
  /* Page canvas: cool grey-blue (M3 / Workspace-style, cf. Google product shells) */
  --color-bg: #f0f4f9;
  --color-panel: #ffffff;
  --color-elevated: #ffffff;
  --color-text: #202124;
  --color-muted: #5f6368;
  --color-border: #dadce0;
  --color-accent-start: #1a73e8;
  --color-accent-end: #174ea6;
  --color-accent: #1a73e8;
  --ui-primary: #1a73e8;
  --ui-primary-hover: #1557b0;
  --ui-on-primary: #ffffff;
  /* Light elevation — contrast against canvas, not heavy drop shadow */
  --shadow-soft: 0 1px 2px rgba(60, 64, 67, 0.06), 0 2px 6px 2px rgba(60, 64, 67, 0.04);
  --radius-surface: 24px;
  --radius-surface-lg: 28px;
  --radius-pill: 9999px;
  --nav-bg: #ffffff;
  --panel-bg: #ffffff;
  --panel-alt: #e8eef6;
  --text-primary: #202124;
  --text-muted: #5f6368;
  --accent: #1a73e8;
  --accent-dark: #174ea6;
  --border-soft: #dadce0;
  --journey-complete: #1e8e3e;
  --journey-complete-mid: rgba(30, 142, 62, 0.45);
  --journey-complete-soft: rgba(30, 142, 62, 0.14);
  --journey-complete-bloom: rgba(30, 142, 62, 0.22);
  --journey-active: #1a73e8;
  --journey-active-soft: rgba(26, 115, 232, 0.14);
  --journey-active-ring: rgba(26, 115, 232, 0.45);
  --journey-spine: #dadce0;
  --journey-locked-ring: #bdc1c6;
  --ux-success: var(--journey-complete);
  --ux-success-dim: var(--journey-complete-soft);
  --ux-accent: var(--journey-active);
  --ux-accent-dim: var(--journey-active-soft);
  --ux-accent-glow: var(--journey-active-ring);
  --ux-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

/* Legacy dark marketing hero/header/footer removed — the app now uses the
   Google Workspace light theme defined in :root above. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 1.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

/* App shell — layout for all app entrypoints */
.app-shell {
  margin: 0;
  min-height: 100vh;
  display: block;
  position: relative;
  overflow-x: hidden;
}

/* Login / auth_callback: light chrome only when there is no app sidebar */
.app-shell:not(.bambu-dash):not(:has(> aside.bambu-nav)) {
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--text-primary);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 6vw;
  border-bottom: 1px solid rgba(15, 16, 20, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.1rem;
}

.app-brand {
  letter-spacing: 0.02em;
}

.app-sub {
  color: #5b5e70;
  font-weight: 700;
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-user {
  color: #5b5e70;
  font-weight: 600;
}

.app-signout {
  border: 1px solid rgba(15, 16, 20, 0.14);
  background: #0f1014;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
}

.app-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem 4rem;
}

.app-panel {
  width: min(520px, 92vw);
  background: #ffffff;
  border: 1px solid rgba(15, 16, 20, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  padding: 2.25rem 2.5rem;
}

.app-panel h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
}

.app-muted {
  margin: 0 0 1.25rem;
  color: #5b5e70;
  font-weight: 600;
}

.app-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.app-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 700;
}

.app-form input {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 16, 20, 0.12);
  font: inherit;
  background: #fafbff;
}

.app-primary {
  background: linear-gradient(120deg, var(--color-accent-start), var(--color-accent-end));
  color: #050505;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
}

.app-message {
  min-height: 1.2rem;
  margin: 0.25rem 0 0;
  color: #5b5e70;
}

.app-message[data-state="error"] {
  color: #c0392b;
}

.app-message[data-state="ok"] {
  color: #0b8f55;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.app-link {
  border: 1px solid rgba(15, 16, 20, 0.12);
  background: #f5f6ff;
  color: #0f1014;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.65rem 1.1rem;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.app-link:hover,
.app-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 560px) {
  .app-panel {
    padding: 1.85rem 1.6rem;
  }
}

.info-icon {
  border: 1px solid rgba(15, 16, 20, 0.2);
  background: rgba(15, 16, 20, 0.08);
  color: #0f1014;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.info-icon:hover,
.info-icon:focus-visible {
  background: rgba(26, 115, 232, 0.12);
  border-color: rgba(26, 115, 232, 0.5);
  color: var(--color-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #0c0d13;
  color: #f8f8ff;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  white-space: normal;
  max-width: 260px;
  text-align: left;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
}

.info-icon:hover::after,
.info-icon:focus-visible::after {
  opacity: 1;
}


/* App login screen (app.bambu.academy) */
.app-shell.login-view {
  background: #fff;
  color: #111;
}

.app-shell.login-view .app-main {
  padding: 24px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.app-shell.login-view .app-panel[hidden],
.app-shell.login-view .login-panel[hidden] {
  display: none !important;
}

.app-shell.login-view .app-panel {
  width: min(460px, 95vw);
}

.app-shell.login-view .app-header {
  display: none;
}

.login-panel {
  background: transparent;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 12px;
  min-height: auto;
  position: relative;
  overflow: hidden;
}

.login-panel::before,
.login-panel::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border: 1px solid #d0d0d0;
  transform: rotate(40deg);
  opacity: 0.7;
}

.login-panel::before {
  bottom: -120px;
  left: -120px;
}

.login-panel::after {
  top: -120px;
  right: -120px;
}

.login-hero {
  text-align: center;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.login-info-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #feefe3;
  color: #b85c00;
  border: 1px solid #f9ab00;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  z-index: 1;
}

.login-info-pill:hover {
  background: #f9ab00;
  color: #3c1e00;
  border-color: #e37400;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(227, 116, 0, 0.22);
}

.login-info-pill:focus-visible {
  outline: 2px solid #e37400;
  outline-offset: 3px;
}

.login-info-pill__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.login-title {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #111;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-password-wrap[hidden] {
  display: none !important;
}

.login-button--no-invite {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  padding: 12px 14px;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 999px;
  font-size: 16px;
  background: #f8f8f8;
  color: #111;
  text-align: center;
}

.login-input:focus {
  outline: 2px solid #111;
  background: #fff;
}

.login-button {
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 3px solid #111;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  color: #111;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

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

.login-hint {
  margin: 10px 0 0;
  color: #8a8a8a;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dashboard — layout only; colors from :root (Material) */
.bambu-dash,
body.app-shell:has(> aside.bambu-nav) {
  display: block;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--text-primary);
}

/* Main column “stage” behind unit + path (does not affect .lesson-journey-* connectors) */
.bambu-dash .bambu-shell,
body.app-shell:has(> aside.bambu-nav) .bambu-shell {
  background: radial-gradient(ellipse 120% 90% at 12% -10%, rgba(26, 115, 232, 0.045) 0%, transparent 50%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(26, 115, 232, 0.03) 0%, transparent 45%);
}

.bambu-ui {
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
}

.bambu-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--nav-bg);
  border-right: 1px solid var(--border-soft);
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 64, 67, 0.22) transparent;
  color: #3c4043;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.04);
}

.bambu-nav::-webkit-scrollbar {
  width: 6px;
}

.bambu-nav::-webkit-scrollbar-track {
  background: transparent;
}

.bambu-nav::-webkit-scrollbar-thumb {
  background: rgba(60, 64, 67, 0.22);
  border-radius: 3px;
}

.bambu-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(60, 64, 67, 0.35);
}

.bambu-brand {
  display: grid;
  gap: 2px;
  text-transform: none;
  letter-spacing: 0;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  text-decoration: none;
  color: inherit;
}

a.bambu-brand:hover .bambu-brand__title {
  color: #1967d2;
}

.bambu-brand__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: #202124;
}

.bambu-brand__sub {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-weight: 400;
}

.bambu-menu {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.bambu-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #3c4043;
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 24px 0 0 24px;
  font-weight: 500;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  transition: border 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.bambu-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(26, 115, 232, 0.45);
}

.bambu-tab__icon {
  width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  border-radius: 12px;
  background: #e8eef6;
  border: 1px solid #dadce0;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.bambu-tab__icon::before,
.bambu-tab__icon::after {
  display: none !important;
  content: none !important;
}

.bambu-tab__icon img {
  width: 24px;
  height: 24px;
  min-height: 24px;
  object-fit: contain;
  object-position: center;
  display: block !important;
  visibility: visible !important;
  opacity: 0.92 !important;
  position: relative;
  z-index: 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* PNGs were authored for dark chrome — silhouette them for light rail contrast */
  filter: brightness(0) saturate(100%) !important;
  -webkit-filter: brightness(0) saturate(100%) !important;
  background: none !important;
}

.bambu-tab.active .bambu-tab__icon img {
  opacity: 1 !important;
}

.bambu-tab:not(.active):hover .bambu-tab__icon img {
  opacity: 0.96 !important;
}

.bambu-tab__icon svg {
  width: 24px;
  height: 24px;
  fill: #3c4043;
  stroke: #3c4043;
}

.bambu-tab.active .bambu-tab__icon svg {
  fill: #1967d2;
  stroke: #1967d2;
}

.bambu-tab.active {
  border-color: transparent;
  background: #e8f0fe;
  color: #1967d2;
  box-shadow: inset 3px 0 0 0 #1a73e8;
}

.bambu-tab.active .bambu-tab__icon {
  background: #d2e3fc;
  border-color: #aecbfa;
}

.bambu-tab:not(.active):hover .bambu-tab__icon {
  background: #e8eaed;
  border-color: #dadce0;
}

.bambu-nav__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.bambu-nav__footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bambu-nav__footer .bambu-tab--teacher {
  width: 100%;
  text-decoration: none;
  box-sizing: border-box;
}

.bambu-nav__footer .bambu-tab--teacher[hidden] {
  display: none !important;
}

.bambu-nav__footer-actions .bambu-upgrade {
  flex: 1;
  min-width: 0;
}

.bambu-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #f1f3f4;
  color: #5f6368;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.bambu-avatar.active {
  outline: 2px solid rgba(26, 115, 232, 0.35);
  outline-offset: 2px;
}

.bambu-nav__footer .bambu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  flex-shrink: 0;
}

.bambu-upgrade {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-alt);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.bambu-upgrade__icon {
  display: inline-flex;
}

.bambu-upgrade__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bambu-signout {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  color: #5f6368;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  font-size: 14px;
  margin-top: 16px;
  font-weight: 500;
}

.bambu-signout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(26, 115, 232, 0.45);
}

.bambu-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  width: calc(100% - 280px);
  max-width: 1180px;
  margin-left: 280px;
  margin-right: auto;
  padding: 32px 32px 40px;
  min-height: 100vh;
  box-sizing: border-box;
}

.bambu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--color-panel);
  border: none;
  border-radius: var(--radius-surface-lg);
  box-shadow: var(--shadow-soft);
  gap: 16px;
}

.bambu-hero h1 {
  margin: 6px 0 4px;
  font-size: 26px;
}

.bambu-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--text-muted);
}

.bambu-sub {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.bambu-userline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bambu-userline img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  object-fit: cover;
}

.bambu-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bambu-pill {
  background: var(--ui-primary);
  color: var(--ui-on-primary);
  border: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.bambu-stats {
  display: flex;
  gap: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.bambu-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bambu-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}

.bambu-card {
  background: var(--color-panel);
  border-radius: var(--radius-surface-lg);
  border: none;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.bambu-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bambu-card__head h2 {
  margin: 0;
  font-size: 18px;
}

.bambu-tag {
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.bambu-path__track {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bambu-card--path {
  min-height: 300px;
  display: grid;
  gap: 14px;
}

.bambu-card--actions {
  display: grid;
  gap: 14px;
  align-content: start;
}

.bambu-card--quests {
  display: grid;
  gap: 14px;
}

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

.bambu-action {
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.bambu-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.bambu-muted {
  margin: 0;
  color: var(--text-muted);
}

.bambu-node {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  border: 2px dashed var(--journey-locked-ring);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.bambu-node.active {
  border-style: solid;
  border-color: var(--ui-primary);
  background: #e8f0fe;
  color: #1967d2;
}

.bambu-node:focus-visible {
  outline: 2px solid rgba(26, 115, 232, 0.35);
  outline-offset: 3px;
}

.bambu-quest p {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text-muted);
}

.bambu-quest {
  cursor: pointer;
}

.bambu-quest:hover {
  transform: translateY(-1px);
}

.bambu-meter {
  background: #132836;
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bambu-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}

.bambu-link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

/* Academy home */
.academy-shell {
  --academy-page-scroll: 0;
  display: grid;
  gap: 22px;
  padding-top: 12px;
}

/* Course catalogue (learn home) */
.course-catalogue {
  padding: 20px 22px 22px;
  border-radius: var(--radius-surface-lg);
  border: none;
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
}

.course-catalogue__head {
  margin-bottom: 14px;
}

.course-catalogue__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3c4043;
}

.course-catalogue__hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: #3c4043;
  font-weight: 500;
  line-height: 1.4;
}

.course-catalogue__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.course-catalogue__track:empty {
  min-height: 0;
}

.course-catalogue-empty {
  padding: 22px 20px;
  border-radius: var(--radius-surface);
  background: #f8f9fa;
  border: 1px dashed var(--border-soft, #dadce0);
  max-width: 560px;
}

.course-catalogue-empty__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #202124);
}

.course-catalogue-empty__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted, #5f6368);
}

/* Explore page — responsive grid catalogue (not the horizontal learn strip) */
.explore-page .explore-catalogue .course-catalogue__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
  overflow-x: visible;
  padding-bottom: 8px;
  scroll-snap-type: none;
}

.explore-page .explore-shell {
  padding-bottom: 32px;
}

.explore-loading {
  margin: 0;
  padding: 12px 0;
  color: var(--color-muted);
}

.course-catalogue-card {
  flex: 0 0 min(260px, 78vw);
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-surface);
  border: none;
  background: var(--panel-alt);
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.course-catalogue-card:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.06), 0 1px 3px rgba(60, 64, 67, 0.04);
  transform: translateY(-1px);
}

.course-catalogue-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(26, 115, 232, 0.45);
}

.course-catalogue-card--active {
  border-color: #1a73e8;
  background: #e8f0fe;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.2);
}

.course-catalogue-card__thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f0fe, #fce8e6);
  flex-shrink: 0;
}

.course-catalogue-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-catalogue-card__body {
  min-width: 0;
}

.course-catalogue-card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  line-height: 1.2;
  color: var(--text-primary);
}

.course-catalogue-card__meta {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.course-catalogue-card__progress {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #e8eaed;
  overflow: hidden;
}

.course-catalogue-card__progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #1a73e8;
  transition: width 0.4s var(--ux-ease-out, ease-out);
}

.course-catalogue-card__cta {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a73e8;
}

.academy-no-course {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-muted);
}

.academy-no-course p {
  margin: 0 0 8px;
  font-size: 16px;
}

.academy-panel {
  background: var(--color-panel);
  border: none;
  border-radius: var(--radius-surface-lg);
  padding: 26px 28px 32px;
  box-shadow: var(--shadow-soft);
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.academy-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 70% at 18% 0%,
    rgba(26, 115, 232, 0.04),
    transparent 52%
  );
  pointer-events: none;
  border-radius: inherit;
}

.academy-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #3c4043;
  font-weight: 600;
  margin-bottom: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.academy-panel__section {
  font-size: 14px;
  margin-left: 8px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  color: #5f6368;
}

.academy-panel__suite {
  font-size: 14px;
  opacity: 1;
  font-weight: 400;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  color: #80868b;
}

.academy-back {
  background: transparent;
  border: none;
  color: #5f6368;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 10px;
}

.academy-back:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(26, 115, 232, 0.45);
}

.academy-panel__title-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.academy-panel__title {
  text-align: center;
  font-size: clamp(2rem, 4.8vw, 2.55rem);
  font-weight: 500;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-shadow: none;
}

.academy-panel--lesson {
  min-height: auto;
  padding: 22px 28px 26px;
}

.academy-panel__lesson-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5f6368;
  text-align: center;
  position: relative;
  z-index: 1;
}

.academy-panel__title--lesson {
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 600;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.academy-panel--lesson .academy-panel__header {
  margin-bottom: 10px;
}

.academy-panel--lesson + .lesson-viewer {
  padding-top: 20px;
}

.academy-panel__progress {
  width: min(420px, 100%);
  display: grid;
  gap: 8px;
}

.academy-progress-meta {
  display: flex;
  justify-content: center;
}

.academy-progress-meta__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3c4043;
  text-shadow: none;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
}

.academy-progress-hint {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #3c4043;
  text-align: center;
  line-height: 1.35;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
}

@keyframes academy-progress-reward {
  0% {
    filter: brightness(1.08);
    box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.35);
  }
  100% {
    filter: brightness(1);
    box-shadow: none;
  }
}

.academy-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8eaed;
  border: 1px solid #dadce0;
  overflow: hidden;
  box-shadow: none;
  transition: box-shadow 0.35s ease;
}

.academy-shell[data-academy-scrolled] .academy-progress-bar {
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.2);
}

@keyframes academy-progress-shimmer {
  0% {
    background-position: 160% 0;
  }
  100% {
    background-position: -160% 0;
  }
}

.academy-progress-bar__fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  overflow: hidden;
  background: #1a73e8;
  box-shadow: none;
  transition: width 0.85s var(--ux-ease-out), filter 0.4s ease;
  filter: none;
}

.academy-progress-bar__fill::after {
  content: none;
}

.academy-progress-bar--reward .academy-progress-bar__fill {
  animation: academy-progress-reward 0.72s ease-out;
}

.academy-lessons__header {
  margin-bottom: 12px;
}

.academy-lessons__header h2 {
  margin: 0;
  font-size: 12px;
  color: #3c4043;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
}

.academy-lessons__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.academy-lessons {
  display: grid;
  gap: 14px;
  padding: 22px 24px 26px;
  background: var(--color-panel);
  border: none;
  border-radius: var(--radius-surface-lg);
  box-shadow: var(--shadow-soft);
}

.lesson-card {
  position: relative;
  background: #fff;
  border: none;
  border-radius: var(--radius-surface);
  padding: 18px 22px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.06), 0 1px 3px rgba(60, 64, 67, 0.04);
  transition:
    transform 0.22s var(--ux-ease-out),
    box-shadow 0.22s var(--ux-ease-out),
    border-color 0.22s ease,
    filter 0.22s ease;
}

.lesson-card:not(.lesson-card--locked):not(.lesson-card--current):hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.08), 0 4px 12px 2px rgba(60, 64, 67, 0.04);
}

/* Simple layout: one line for learn/practice */
.lesson-card--simple {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: center;
}

.lesson-card--simple .lesson-card__content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-card--simple .lesson-card__title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: #202124;
  margin: 0;
}

.lesson-card--simple .lesson-card__copy-inline {
  color: #3c4043;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

/* Detailed layout: multi-line for finale/project */
.lesson-card--detailed {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: start;
}

.lesson-card--detailed .lesson-card__title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: #202124;
  margin: 0;
}

.lesson-card--detailed .lesson-card__copy {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: #3c4043;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.52;
}

.lesson-card--detailed .lesson-card__actions {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.lesson-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lesson-card__title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: #202124;
}

.lesson-card__actions .lesson-pill:not(.lesson-pill--locked) {
  filter: none;
}

.lesson-pill {
  border: 1px solid #dadce0;
  background: var(--panel-alt);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: capitalize;
  font-size: 13px;
  color: #3c4043;
  text-shadow: none;
  overflow: visible;
  isolation: isolate;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  position: relative;
}

.lesson-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(26, 115, 232, 0.45);
}

.lesson-pill::before {
  content: none;
}

.lesson-pill:not(.lesson-pill--locked):hover {
  filter: none;
  transform: none;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.lesson-pill:not(.lesson-pill--locked):hover::before {
  transform: none;
}

.lesson-pill:not(.lesson-pill--locked):active {
  transform: none;
  transition-duration: 0.08s;
  filter: none;
  box-shadow: none;
}

.lesson-pill__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.28s var(--ux-ease-out);
}

.lesson-pill:not(.lesson-pill--locked):hover .lesson-pill__icon {
  transform: none;
}

.lesson-pill:not(.lesson-pill--locked)::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 1px;
  margin-right: -1px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.lesson-pill:not(.lesson-pill--locked):hover::after {
  transform: rotate(-45deg);
  opacity: 1;
}

.lesson-pill--learn {
  background: #e8f0fe;
  border-color: #aecbfa;
  color: #1967d2;
}

.lesson-pill--practice {
  background: #fef7e0;
  border-color: #fdd663;
  color: #b06000;
}

.lesson-pill--project {
  background: #e6f4ea;
  border-color: #81c995;
  color: #137333;
}

.lesson-pill--finale {
  background: #fce8e6;
  border-color: #f9ab9e;
  color: #c5221f;
}

@keyframes lesson-check-pop {
  0% {
    transform: scale(0.35) rotate(-12deg);
    opacity: 0;
  }
  70% {
    transform: scale(1.08) rotate(4deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.lesson-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8f0fe;
  border: 1px solid #aecbfa;
  color: #1a73e8;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: none;
  animation: lesson-check-pop 0.55s var(--ux-ease-out) both;
  animation-delay: var(--check-delay, 0ms);
}

/* =============================================================================
   FREEZE ZONE — Lesson path connectors (.lesson-journey-*) and journey
   keyframes below. Do not change hues/timing here when tuning global theme;
   path colors come from --journey-* on :root.
   ============================================================================= */

@keyframes journey-node-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.25);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
  }
}

@keyframes journey-node-ripple {
  0% {
    transform: scale(0.88);
    opacity: 0.45;
  }
  55% {
    opacity: 0.12;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes journey-row-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes journey-complete-node-flow {
  0% {
    background-position: 50% 120%;
  }
  100% {
    background-position: 50% -120%;
  }
}

@keyframes journey-path-flow {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  14% {
    opacity: 0.72;
  }
  86% {
    opacity: 0.72;
  }
  100% {
    transform: translateY(280%);
    opacity: 0;
  }
}

@keyframes journey-spine-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* Lesson journey — vertical rail + nodes (not a single center spine) */
.lesson-journey-row {
  --journey-reveal: 1;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0 10px;
  align-items: stretch;
  position: relative;
  animation: journey-row-enter 0.7s var(--ux-ease-out) backwards;
  animation-delay: calc(var(--journey-i, 0) * 0.065s);
}

.lesson-journey-row--current {
  z-index: 2;
}

.lesson-journey-row:nth-child(odd) .lesson-journey-rail {
  --rail-shift: 5px;
}

.lesson-journey-row:nth-child(even) .lesson-journey-rail {
  --rail-shift: -5px;
}

.lesson-journey-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 4px 0 2px;
  transform: translateX(
    calc(var(--rail-shift, 0px) + (1 - var(--journey-reveal, 1)) * 12px)
  );
  transition: transform 0.5s var(--ux-ease-out);
  will-change: transform;
}

.lesson-journey-cap {
  flex: 0 0 auto;
}

.lesson-journey-cap--start {
  height: 8px;
}

.lesson-journey-cap--end {
  flex: 1 1 10px;
  min-height: 10px;
}

.lesson-journey-connector {
  flex: 1 1 22px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 14px;
}

.lesson-journey-row:nth-child(odd) .lesson-journey-connector__track {
  transform: rotate(3deg);
}

.lesson-journey-row:nth-child(even) .lesson-journey-connector__track {
  transform: rotate(-3deg);
}

.lesson-journey-connector__track {
  position: relative;
  width: 5px;
  flex: 1 1 auto;
  min-height: 18px;
  border-radius: 999px;
  background: var(--journey-spine);
  overflow: hidden;
  box-shadow: none;
}

.lesson-journey-connector__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  border-radius: inherit;
  background: #1a73e8;
  box-shadow: none;
  transition:
    height 0.78s var(--ux-ease-out),
    opacity 0.35s ease;
  transition-delay: var(--path-delay, 0ms);
}

/* Completed segments — Google blue (not green); wobbly capsule reads as playful path */
.lesson-journey-connector--complete .lesson-journey-connector__track {
  overflow: hidden;
  opacity: 1;
  background: #d2e3fc;
  box-shadow: none;
}

.lesson-journey-connector--complete .lesson-journey-connector__fill {
  height: 100%;
  overflow: hidden;
  background: #1a73e8;
  box-shadow: none;
}

.lesson-journey-connector--complete .lesson-journey-connector__fill::after {
  content: none;
}

.lesson-journey-connector--frozen .lesson-journey-connector__track {
  opacity: 0.45;
  background: #f1f3f4;
  box-shadow: inset 0 0 0 1px #e8eaed;
}

.lesson-journey-connector--frozen .lesson-journey-connector__fill {
  opacity: 0;
  height: 0 !important;
}

.lesson-journey-connector--active:not(.lesson-journey-connector--complete)
  .lesson-journey-connector__track {
  background: #e8f0fe;
  box-shadow: inset 0 0 0 1px #aecbfa;
  animation: journey-spine-pulse 1.85s ease-in-out infinite;
}

.lesson-journey-node {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin: 4px 0;
  transition: box-shadow 0.3s ease;
}

.lesson-journey-node--complete {
  position: relative;
  width: 14px;
  height: 14px;
  background: #1a73e8;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.35);
}

.lesson-journey-node--complete::after {
  content: none;
}

.lesson-journey-node--current {
  position: relative;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid #1a73e8;
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.2);
  animation: journey-node-pulse 3.2s ease-in-out infinite;
}

.lesson-journey-node--current::before {
  content: none;
}

.lesson-journey-node--locked {
  width: 12px;
  height: 12px;
  border: 1px dashed #dadce0;
  background: #f1f3f4;
  opacity: 0.85;
  filter: none;
  box-shadow: none;
}

.lesson-journey-node--upcoming {
  border: 2px solid #dadce0;
  background: #fff;
  opacity: 0.9;
}

.lesson-journey-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Horizontal bridge: visually stitches node column to the card */
.lesson-journey-main::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 11px;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, #dadce0 0%, #e8eaed 100%);
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.lesson-journey-row:has(.lesson-journey-node--complete) .lesson-journey-main::before {
  background: linear-gradient(90deg, #1a73e8 0%, #aecbfa 100%);
  box-shadow: none;
  opacity: 1;
}

.lesson-journey-row--current .lesson-journey-main::before {
  height: 2px;
  opacity: 1;
  background: linear-gradient(90deg, #1a73e8 0%, #aecbfa 100%);
  box-shadow: none;
}

.lesson-journey-row:has(.lesson-journey-node--locked) .lesson-journey-main::before {
  opacity: 0.5;
  box-shadow: none;
  background: linear-gradient(90deg, #e8eaed 0%, #f1f3f4 100%);
}

.lesson-journey-row--current .lesson-journey-main::after {
  content: none;
}

.lesson-journey-main .lesson-card {
  width: 100%;
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .lesson-journey-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0 8px;
  }

  .lesson-journey-main::before {
    left: -8px;
    width: 9px;
  }

  .lesson-journey-node--current {
    width: 16px;
    height: 16px;
  }
}

/* Locked lesson styles */
.lesson-card--locked {
  opacity: 0.72;
  position: relative;
  pointer-events: none;
  filter: none;
  background: #f1f3f4;
  box-shadow: none;
  border-color: #e8eaed;
}

.lesson-card--locked:hover {
  transform: none;
  box-shadow: none;
}

.lesson-card--locked .lesson-card__title,
.lesson-card--locked .lesson-card__copy,
.lesson-card--locked .lesson-card__copy-inline {
  color: #80868b;
}

.lesson-card__lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-surface);
  z-index: 10;
  pointer-events: none;
}

.lesson-card__lock-icon {
  width: 44px;
  height: 44px;
  color: #5f6368;
  filter: none;
}

.lesson-pill--locked {
  opacity: 1;
  cursor: not-allowed !important;
  background: var(--panel-alt) !important;
  border-color: #dadce0 !important;
  color: #80868b !important;
  box-shadow: none !important;
  border-radius: var(--radius-pill) !important;
}

.lesson-pill--locked::before {
  display: none !important;
}

.lesson-pill--locked:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Completed lesson styles */
.lesson-card--completed {
  border: none;
  background: #fff;
  box-shadow:
    inset 3px 0 0 0 #1a73e8,
    0 1px 2px rgba(60, 64, 67, 0.06),
    0 1px 3px rgba(60, 64, 67, 0.04);
}

.lesson-card--completed .lesson-card__title {
  color: #202124;
  font-weight: 600;
}

.lesson-card--completed .lesson-card__copy,
.lesson-card--completed .lesson-card__copy-inline {
  color: #3c4043;
  font-weight: 500;
}

/* Current lesson */
.lesson-card--current {
  isolation: isolate;
  overflow: visible;
  transform: none;
  padding-top: 18px;
  padding-bottom: 18px;
  border-radius: var(--radius-surface);
  border: 1px solid #aecbfa;
  background: #fff;
  filter: none;
  box-shadow:
    0 0 0 1px rgba(26, 115, 232, 0.12),
    0 2px 8px rgba(26, 115, 232, 0.08);
}

.lesson-card--current::before {
  display: none;
}

.lesson-card--current::after {
  display: none;
}

.lesson-card--current > *:not(.lesson-card__lock-overlay) {
  position: relative;
  z-index: 1;
}

.lesson-card--current .lesson-card__lock-overlay {
  z-index: 20;
  border-radius: var(--radius-surface);
}

.lesson-card--current .lesson-card__copy-inline,
.lesson-card--current .lesson-card__copy {
  color: #3c4043;
  font-weight: 500;
}

.lesson-card--current .lesson-card__title {
  color: #1967d2;
  font-weight: 600;
}

.lesson-card--current:not(.lesson-card--locked):hover {
  transform: translateY(-1px);
  border-color: #8ab4f8;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(26, 115, 232, 0.25),
    0 4px 12px rgba(26, 115, 232, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .academy-progress-bar__fill::after {
    animation: none !important;
  }

  .lesson-card:not(.lesson-card--locked):not(.lesson-card--current) {
    transition: none !important;
  }

  .lesson-journey-row {
    animation: none !important;
  }

  .lesson-journey-rail {
    transform: translateX(var(--rail-shift, 0px)) !important;
    transition: none !important;
  }

  .lesson-journey-connector__fill {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .lesson-check {
    animation: none !important;
  }

  .lesson-journey-connector--active:not(.lesson-journey-connector--complete)
    .lesson-journey-connector__track {
    animation: none !important;
    opacity: 0.85;
  }

  .lesson-journey-node--current {
    animation: none !important;
    transform: none !important;
  }

  .lesson-journey-node--current::before {
    animation: none !important;
    opacity: 0 !important;
    transform: none !important;
  }

  .academy-progress-bar__fill::after {
    animation: none !important;
    opacity: 0 !important;
  }

  .lesson-journey-connector--complete .lesson-journey-connector__fill::after {
    animation: none !important;
    display: none !important;
  }

  .lesson-journey-node--complete::after {
    animation: none !important;
    opacity: 0.4 !important;
  }

  .lesson-journey-node--locked {
    filter: none !important;
    opacity: 0.5 !important;
  }

  .academy-progress-bar__fill {
    transition-duration: 0.01ms !important;
    filter: none !important;
  }

  .academy-progress-bar--reward .academy-progress-bar__fill {
    animation: none !important;
  }

  .lesson-card:not(.lesson-card--locked):hover,
  .lesson-pill:not(.lesson-pill--locked):hover {
    transform: none !important;
  }

  .lesson-card--current {
    transform: none !important;
  }

  .lesson-card--current:not(.lesson-card--locked):hover {
    transform: translateY(-2px) !important;
  }

}

/* Leaderboards */
.leaderboard-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  box-sizing: border-box;
}

.leaderboard-panel {
  background: linear-gradient(
    155deg,
    rgba(18, 32, 28, 0.95) 0%,
    rgba(12, 20, 18, 0.93) 48%,
    rgba(10, 16, 14, 0.92) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 26px 24px 30px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 24px 52px rgba(0, 0, 0, 0.42);
}

.leaderboard-panel__head {
  margin-bottom: 16px;
}

.leaderboard-panel__kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.leaderboard-panel__title {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 4.2vw, 2rem);
  font-weight: 800;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color: var(--text-primary, #e8e9ed);
}

.leaderboard-panel__lede {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.52);
}

.leaderboard-panel__status {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  min-height: 1.4em;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 12px 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-row--self {
  border-color: rgba(110, 176, 242, 0.42);
  background: rgba(110, 176, 242, 0.09);
}

.leaderboard-row__rank {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}

.leaderboard-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leaderboard-row__name {
  font-size: 15px;
  font-weight: 600;
  color: rgba(240, 242, 248, 0.96);
}

.leaderboard-row__you {
  font-weight: 600;
  color: #6eb0f2;
}

.leaderboard-row__tier {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.leaderboard-row__xp {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #6eb0f2;
  white-space: nowrap;
}

/* WIP */
.wip-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.wip-card {
  text-align: center;
  max-width: 380px;
  padding: 32px 28px 36px;
  color: #3c4043;
  background: var(--color-panel);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.wip-kicker {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.wip-title {
  margin: 0 0 12px;
  font-size: 1.75rem;
  color: var(--text-primary);
}

.wip-robot {
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.wip-robot img {
  width: 180px;
  height: auto;
  object-fit: contain;
}

.wip-copy {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.wip-copy a {
  color: var(--color-accent);
  font-weight: 600;
}

.wip-copy a:hover,
.wip-copy a:focus-visible {
  text-decoration: underline;
}

/* Profile */
.bambu-profile {
  background: var(--color-bg);
  color: var(--text-primary);
}

.profile-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  color: var(--text-primary);
}

.bambu-profile #profileName,
.profile-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary, #f2f3f6);
}

.profile-hero {
  position: relative;
  color: var(--text-primary);
  border-radius: 22px;
  padding: 26px 24px 28px;
  background: var(--color-panel);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.profile-hero__glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent 70%);
  pointer-events: none;
}

.profile-hero__content {
  position: relative;
  display: grid;
  gap: 24px;
}

.profile-badge {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-badge__text {
  min-width: 0;
}

.profile-avatar-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--panel-alt);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 0;
  object-fit: cover;
  background: var(--panel-alt);
}

.profile-avatar-fallback {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  user-select: none;
}

.profile-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--text-muted, rgba(255, 255, 255, 0.52));
}

.profile-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-muted, rgba(255, 255, 255, 0.55));
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-stats dd {
  margin: 0;
}

.profile-stat {
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.profile-stat__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-stat__value {
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 0;
}

@media (min-width: 600px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-grid .profile-card--cta {
    grid-column: 1 / -1;
  }
}

.profile-card--focus {
  display: grid;
  gap: 12px;
  align-content: start;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--color-panel);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 20px 22px 22px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.profile-card__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-card p,
.profile-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #3c4043;
}

.profile-card a:not(.profile-cta) {
  font-size: inherit;
  line-height: inherit;
  color: var(--ui-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.profile-card a:not(.profile-cta):hover {
  color: var(--accent-dark);
}

.profile-card a.profile-cta {
  text-decoration: none;
  color: var(--ui-on-primary);
}

.profile-card a.profile-cta:hover {
  color: var(--ui-on-primary);
}

.profile-card--cta {
  justify-content: flex-start;
}

.profile-cta {
  align-self: flex-start;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  color: var(--ui-on-primary);
  background: var(--ui-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, color 0.15s ease;
}

.profile-cta:hover {
  background: var(--ui-primary-hover);
  color: var(--ui-on-primary);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-tags span {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.profile-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.profile-list li {
  position: relative;
  padding-left: 14px;
}

.profile-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.bambu-profile .bambu-pill {
  background: var(--ui-primary);
  color: var(--ui-on-primary);
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
}

.bambu-profile .bambu-pill:hover {
  background: var(--ui-primary-hover);
}

@media (max-width: 980px) {
  .bambu-profile .bambu-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
}
.bambu-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--color-panel);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 40;
}

.bambu-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile: sidebar becomes off-canvas drawer (toggle in .bambu-mobile-bar) */
.bambu-nav-backdrop {
  display: none;
}

.bambu-mobile-bar {
  display: none;
}

@media (max-width: 980px) {
  .bambu-dash {
    /* drawer layout */
  }

  .bambu-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(32, 33, 36, 0.45);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.bambu-nav-drawer-open .bambu-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .bambu-mobile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 14px;
    margin: 0 0 2px;
  }

  .bambu-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(232, 233, 237, 0.95);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition:
      background 0.15s ease,
      border-color 0.15s ease;
  }

  .bambu-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .bambu-nav-toggle:focus-visible {
    outline: 2px solid rgba(110, 176, 242, 0.65);
    outline-offset: 2px;
  }

  .bambu-nav-toggle__icon {
    flex-shrink: 0;
  }

  .bambu-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: min(288px, 86vw);
    height: 100vh;
    max-height: none;
    max-width: none;
    padding: 22px 18px 22px;
    z-index: 1002;
    flex-direction: column;
    transform: translate3d(-102%, 0, 0);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.bambu-nav-drawer-open .bambu-nav {
    transform: translate3d(0, 0, 0);
    box-shadow: 16px 0 48px rgba(0, 0, 0, 0.45);
  }

  .bambu-menu {
    grid-template-columns: 1fr;
  }

  .bambu-shell {
    margin-left: 0;
    padding: 22px 18px 30px;
  }

  .app-shell:has(.bambu-nav) {
    padding-left: 0;
  }

  .academy-panel__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .lesson-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) and (prefers-reduced-motion: reduce) {
  .bambu-nav {
    transition: none;
  }

  .bambu-nav-backdrop {
    transition: none;
  }
}

@media (max-width: 640px) {
  .app-shell.login-view .app-main {
    padding: 20px 14px;
  }

.login-panel::before,
.login-panel::after {
  width: 180px;
  height: 180px;
  opacity: 0.5;
}

.login-title {
  font-size: 30px;
}

.login-input {
  padding: 12px 14px;
  font-size: 15px;
}

.login-button {
  padding: 12px 14px;
  font-size: 18px;
}
}

/* Demo lesson */
.demo-shell {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 5vw;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
}

.demo-wrap {
  width: min(1080px, 92vw);
  background: var(--color-panel);
  border-radius: 22px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 2.5rem 2.75rem 2.3rem;
  position: relative;
}

.demo-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.demo-close {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.5rem;
  background: var(--panel-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
}

.demo-progress {
  flex: 1;
  display: grid;
  gap: 0.5rem;
}

.demo-progress__track {
  height: 16px;
  background: var(--panel-alt);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-soft);
}

.demo-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1a73e8, #174ea6);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.demo-progress__label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.demo-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 2rem;
  min-height: 360px;
}

.demo-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.demo-content {
  min-height: 260px;
}

.demo-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: #e8f0fe;
  border: 1px solid #dadce0;
  margin-bottom: 1.4rem;
}

.demo-hero.is-hidden {
  display: none;
}

.demo-hero img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

.demo-hero__kicker {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.demo-hero__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1967d2;
}

.demo-body p {
  margin: 0 0 1rem;
  color: #3c4043;
  font-size: 1.05rem;
  line-height: 1.5;
}

.demo-body {
  min-height: 160px;
}

.demo-editor {
  background: var(--color-panel);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  min-height: 260px;
  box-shadow: var(--shadow-soft);
}

.demo-editor.is-hidden {
  display: none;
}

.demo-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: var(--panel-alt);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}

.demo-dots {
  display: inline-flex;
  gap: 0.4rem;
}

.demo-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  background: #d94c4c;
}

.demo-dots span:nth-child(2) {
  background: #e0b33f;
}

.demo-dots span:nth-child(3) {
  background: #48b36c;
}

.demo-editor__body {
  display: grid;
  grid-template-columns: 46px 1fr;
  min-height: 220px;
  font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.demo-lines {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.6rem;
  color: #80868b;
  font-size: 0.85rem;
  border-right: 1px solid var(--border-soft);
  background: #f8f9fa;
}

.demo-lines span {
  display: block;
}

#demoEditor {
  width: 100%;
  background: transparent;
  border: none;
  resize: none;
  color: #202124;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  min-height: 220px;
  line-height: 1.6;
}

.demo-editor__hint {
  margin: 0;
  padding: 0.6rem 1rem 0.9rem;
  color: #1967d2;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-soft);
  background: #fafafa;
}

.demo-editor.has-error {
  border-color: rgba(255, 123, 123, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 123, 123, 0.2);
}

.demo-actions {
  margin-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.demo-preview {
  margin-top: 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--color-panel);
  overflow: hidden;
  min-height: 260px;
  box-shadow: var(--shadow-soft);
}

.demo-preview.is-hidden {
  display: none;
}

.demo-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--panel-alt);
  border-bottom: 1px solid var(--border-soft);
}

.demo-preview__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.demo-preview__close {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--panel-alt);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  border: 1px solid var(--border-soft);
}

.demo-preview__status {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e8f0fe;
  color: #1967d2;
}

.demo-preview__status[data-state="success"] {
  background: #e6f4ea;
  color: #137333;
}

.demo-preview__status[data-state="error"] {
  background: #fce8e6;
  color: #c5221f;
}

.demo-preview__body {
  padding: 1rem 1.2rem;
  color: #3c4043;
  min-height: 140px;
}

.demo-preview__hint {
  margin: 0;
  padding: 0.6rem 1rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  background: #fafafa;
}

.demo-preview__body h2,
.demo-preview__body h3,
.demo-preview__body h4 {
  margin: 0 0 0.6rem;
}

.demo-preview__body p {
  margin: 0 0 0.6rem;
  color: #3c4043;
}

.demo-actions__right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.demo-primary,
.demo-secondary {
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-weight: 500;
  font-size: 1rem;
  background: #fff;
  color: #1a73e8;
  border: 1px solid #dadce0;
}

.demo-primary {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
  box-shadow: none;
}

.demo-secondary:hover,
.demo-primary:hover {
  transform: translateY(-1px);
}

.demo-secondary.is-hidden {
  display: none;
}

.demo-finish {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(32, 33, 36, 0.45);
  border-radius: 22px;
  padding: 2rem;
}

.demo-finish.is-hidden {
  display: none;
}

.demo-finish__card {
  max-width: 560px;
  text-align: center;
  background: var(--color-panel);
  border-radius: 20px;
  padding: 2.2rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.demo-finish__card h2 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.demo-finish__card p {
  margin: 0 0 1.4rem;
  color: var(--text-muted);
}

.demo-finish__panda {
  display: flex;
  justify-content: center;
  margin: 0 auto 1.4rem;
}

.demo-finish__panda img {
  width: min(220px, 60vw);
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.45));
}

.demo-finish__stats {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.demo-finish__stats div {
  background: var(--panel-alt);
  padding: 0.85rem 1rem;
  border-radius: 14px;
  text-align: left;
  border: 1px solid var(--border-soft);
}

.demo-finish__label {
  display: block;
  color: rgba(179, 208, 223, 0.7);
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-wrap.is-hidden {
  display: none;
}

.demo-finish.confetti::before,
.demo-finish.confetti::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 210, 86, 0.45) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(123, 215, 255, 0.45) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(120, 255, 174, 0.45) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(255, 120, 180, 0.45) 0 3px, transparent 4px);
  background-size: 140px 140px, 180px 180px, 220px 220px, 160px 160px;
  animation: confetti-fall 1.6s ease-out 1;
  opacity: 0.35;
}

.demo-finish.confetti::after {
  animation-delay: -2.5s;
  opacity: 0.2;
}

@keyframes confetti-fall {
  0% {
    background-position: 0 -120px, 30px -200px, 60px -260px, 90px -180px;
  }
  100% {
    background-position: 0 120px, 30px 200px, 60px 260px, 90px 180px;
  }
}

.demo-wrap.celebrate::before,
.demo-wrap.celebrate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(123, 215, 255, 0.5) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(120, 255, 174, 0.5) 0 3px, transparent 4px);
  background-size: 160px 160px, 200px 200px;
  animation: confetti-fall 1.1s ease-out 1;
  opacity: 0.25;
}

.demo-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(18px);
  background: rgba(9, 18, 23, 0.95);
  color: #e9f5fb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.demo-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.demo-toast[data-state="success"] {
  border-color: rgba(120, 255, 174, 0.3);
  box-shadow: 0 12px 30px rgba(25, 61, 44, 0.35);
}

.demo-toast[data-state="error"] {
  border-color: rgba(255, 120, 120, 0.35);
  box-shadow: 0 12px 30px rgba(70, 24, 24, 0.35);
}

.demo-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 12, 0.65);
  z-index: 70;
}

.demo-modal.is-hidden {
  display: none;
}

.demo-modal__card {
  width: min(420px, 90vw);
  background: rgba(12, 20, 25, 0.96);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.demo-modal__card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
}

.demo-modal__card p {
  margin: 0 0 1.2rem;
  color: rgba(218, 232, 240, 0.78);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .demo-panel {
    grid-template-columns: 1fr;
  }
  .demo-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .demo-actions__right {
    justify-content: space-between;
  }
}

/* Author-friendly callouts (admin courses / sections / lessons / editor) */
.admin-author-banner {
  margin: 0 0 8px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(123, 189, 241, 0.22);
  background: rgba(60, 110, 160, 0.12);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(228, 236, 244, 0.92);
}

.admin-author-banner__title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(186, 220, 255, 0.95);
}

.admin-author-banner p {
  margin: 0 0 8px;
}

.admin-author-banner p:last-child {
  margin-bottom: 0;
}

.admin-author-banner strong {
  color: var(--color-text);
  font-weight: 600;
}

.admin-lesson-type-legend {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(220, 230, 240, 0.78);
}

.admin-lesson-type-legend dt {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 6px;
}

.admin-lesson-type-legend dt:first-child {
  margin-top: 0;
}

.admin-lesson-type-legend dd {
  margin: 2px 0 0;
  padding-left: 0;
}

.admin-link-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.admin-link-btn {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: rgba(140, 200, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.admin-link-btn:hover {
  color: #fff;
}

.admin-link-btn--emph {
  color: rgba(160, 240, 190, 0.95);
}

.admin-link-btn--danger {
  color: rgba(255, 150, 150, 0.9);
}

/* Admin Dashboard (homepage) */
.admin-dashboard {
  padding: 28px 6vw 48px;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.admin-dashboard__hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.admin-dashboard__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.admin-dashboard__lede {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

.admin-dashboard__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.admin-dashboard__toolbar .bambu-btn {
  min-height: 40px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.admin-stat-card {
  position: relative;
  background: linear-gradient(
    165deg,
    rgba(28, 32, 42, 0.95) 0%,
    rgba(18, 21, 28, 0.92) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.22s ease;
  overflow: hidden;
}

a.admin-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 176, 242, 0.35);
  box-shadow:
    0 0 0 1px rgba(110, 176, 242, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.38);
}

.admin-stat-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-stat-card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.admin-stat-card__arrow {
  font-size: 18px;
  color: rgba(110, 176, 242, 0.65);
  line-height: 1;
  transition: transform 0.2s ease;
}

a.admin-stat-card:hover .admin-stat-card__arrow {
  transform: translateX(3px);
}

.admin-stat-card__value {
  font-size: clamp(2.25rem, 5vw, 2.75rem);
  font-weight: 800;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color: #f2f5fa;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.admin-stat-card__value--loading {
  color: rgba(255, 255, 255, 0.2);
  animation: admin-stat-pulse 1.2s ease-in-out infinite;
}

@keyframes admin-stat-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.85;
  }
}

.admin-stat-card__hint {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.35;
}

.admin-dashboard__section-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.admin-dashboard__section-head {
  margin-bottom: 16px;
}

.admin-dashboard__section-desc {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
  max-width: 520px;
}

.admin-dashboard__workflow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 10px 8px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.admin-workflow-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

a.admin-workflow-step:hover {
  border-color: rgba(110, 176, 242, 0.25);
  background: rgba(110, 176, 242, 0.06);
}

.admin-workflow-step__num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(110, 176, 242, 0.18);
  color: rgba(190, 220, 255, 0.95);
}

.admin-workflow-step__title {
  font-size: 16px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.92);
}

.admin-workflow-step__desc {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

.admin-workflow-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 20px;
  font-weight: 300;
  user-select: none;
}

.admin-dashboard__quick {
  margin-top: 8px;
}

.admin-dashboard__quick h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.4);
}

.admin-dashboard__quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.admin-action-card {
  background: linear-gradient(
    165deg,
    rgba(34, 40, 54, 0.9) 0%,
    rgba(22, 26, 34, 0.92) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px 22px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 18px;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.admin-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(110, 176, 242, 0.28);
}

.admin-action-card--secondary {
  background: rgba(255, 255, 255, 0.03);
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 20px;
}

.admin-action-card--secondary .admin-action-card__icon {
  width: 36px;
  height: 36px;
}

.admin-action-card__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(110, 176, 242, 0.12);
  color: rgba(160, 205, 255, 0.95);
  stroke-width: 2;
  box-sizing: border-box;
}

.admin-action-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-action-card__title {
  font-size: 17px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.02em;
}

.admin-action-card__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
  margin: 0;
}

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

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

  .admin-dashboard__workflow {
    grid-template-columns: 1fr;
  }

  .admin-workflow-chevron {
    display: none;
  }

  .admin-dashboard__quick-grid {
    grid-template-columns: 1fr;
  }

  .admin-dashboard__browse {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-dashboard {
    padding: 20px 4vw 40px;
    gap: 28px;
  }
}

/* Course Management */
.admin-btn,
.bambu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}

a.bambu-btn {
  text-decoration: none;
  box-sizing: border-box;
}

.admin-btn--primary,
.bambu-btn--primary {
  background: linear-gradient(165deg, #455a73 0%, var(--ui-primary) 100%);
  color: var(--ui-on-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px rgba(110, 168, 232, 0.12);
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease,
    background 0.2s ease,
    filter 0.2s ease;
}

.admin-btn--primary:hover:not(:disabled),
.bambu-btn--primary:hover:not(:disabled) {
  background: linear-gradient(165deg, #516a86 0%, var(--ui-primary-hover) 100%);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(110, 168, 232, 0.28),
    0 0 28px rgba(110, 168, 232, 0.22),
    0 10px 28px rgba(0, 0, 0, 0.4);
  filter: brightness(1.03);
}

.admin-btn--primary:active:not(:disabled),
.bambu-btn--primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.admin-btn--secondary,
.bambu-btn--secondary {
  background: var(--color-panel);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-btn--secondary:hover:not(:disabled),
.bambu-btn--secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.admin-btn--danger {
  background: #ff4757;
  color: white;
}

.admin-btn--danger:hover {
  background: #ff3838;
  transform: translateY(-1px);
}

.admin-btn:disabled,
.bambu-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
  pointer-events: none;
}

/* —— Lesson content editor (admin) —— */
.lesson-editor {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 6vw 48px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lesson-editor__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px 24px;
  padding: 20px 22px;
  background: linear-gradient(
    165deg,
    rgba(28, 32, 42, 0.92) 0%,
    rgba(18, 21, 28, 0.88) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}

.lesson-editor__meta-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 6px;
}

.lesson-editor__meta-value {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.lesson-editor__type-badge {
  display: inline-block;
  margin-top: 2px;
}

.lesson-editor__submissions {
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.lesson-editor__submissions h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

.lesson-editor__submissions > p {
  margin: 0 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
}

.lesson-editor__blocks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lesson-editor__empty {
  text-align: center;
  padding: 48px 24px 56px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.lesson-editor__empty-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.lesson-editor__empty-desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.lesson-editor-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lesson-editor-skeleton__card {
  height: 120px;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: lesson-editor-shimmer 1.1s ease-in-out infinite;
}

@keyframes lesson-editor-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.content-block {
  position: relative;
  border-radius: 14px;
  padding: 0;
  background: linear-gradient(
    165deg,
    rgba(30, 34, 44, 0.95) 0%,
    rgba(20, 23, 30, 0.92) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.content-block:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.content-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 14px 0 0 14px;
}

.content-block--accent-text::before {
  background: rgba(110, 176, 242, 0.65);
}
.content-block--accent-heading::before {
  background: rgba(168, 109, 255, 0.7);
}
.content-block--accent-code::before {
  background: rgba(77, 212, 168, 0.65);
}
.content-block--accent-media::before {
  background: rgba(255, 184, 108, 0.75);
}
.content-block--accent-interactive::before {
  background: rgba(110, 176, 242, 0.55);
}
.content-block--accent-simulation::before {
  background: rgba(0, 137, 123, 0.55);
}
.content-block--accent-quiz::before {
  background: rgba(255, 120, 154, 0.65);
}
.content-block--accent-struct::before {
  background: rgba(255, 255, 255, 0.25);
}

.content-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px 20px;
}

.content-block__index {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.28);
  min-width: 1.75rem;
}

.content-block__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.content-block__drag-handle {
  width: 22px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  cursor: grab;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22) 0 2px,
    transparent 2px 5px
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  touch-action: none;
}

.content-block__drag-handle:active {
  cursor: grabbing;
}

.content-block--dragging {
  opacity: 0.55;
}

.content-block.is-drag-over {
  outline: 2px dashed rgba(110, 176, 242, 0.85);
  outline-offset: 3px;
}

.lesson-editor__blocks--dnd {
  gap: 18px;
}

.content-block__badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}

.content-block__actions .admin-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.content-block__preview-wrap {
  padding: 0 18px 18px 20px;
}

.content-block-preview {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 52px;
  max-height: 200px;
  overflow: auto;
}

.content-block-preview--plain {
  white-space: pre-wrap;
  word-break: break-word;
}

.content-block-preview h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.content-block-preview pre {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(200, 220, 245, 0.9);
  white-space: pre-wrap;
  word-break: break-word;
}

.content-block-preview img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

.content-block-preview--interactive {
  border-color: rgba(110, 176, 242, 0.15);
  background: rgba(110, 176, 242, 0.06);
}

.content-block-preview--pagebreak {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  border-style: dashed;
}

.lesson-editor-type-intro {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.48);
}

.lesson-editor-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 4px 0 8px;
}

@media (min-width: 540px) {
  .lesson-editor-type-grid {
    gap: 16px;
  }
}

.lesson-editor-type-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px 18px 18px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.lesson-editor-type-card:hover {
  background: rgba(110, 176, 242, 0.12);
  border-color: rgba(110, 176, 242, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.lesson-editor-type-card:focus {
  outline: none;
  border-color: rgba(110, 176, 242, 0.65);
  box-shadow: 0 0 0 2px rgba(110, 176, 242, 0.25);
}

.lesson-editor-type-card__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.94);
}

.lesson-editor-type-card__desc {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

.admin-modal--lesson-editor .admin-modal__content {
  max-width: min(720px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
}

.admin-modal--lesson-editor .admin-modal__body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.lesson-editor-textarea {
  min-height: 120px;
  line-height: 1.5;
  resize: vertical;
}

.lesson-editor-textarea--code {
  min-height: 200px;
  font-family: ui-monospace, "SF Mono", Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  tab-size: 2;
}

.lesson-editor-foot {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lesson-editor-foot p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.42);
}

.lesson-editor-foot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#lessonEditorToast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.lesson-editor-toast {
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(28, 36, 48, 0.95);
  border: 1px solid rgba(77, 212, 168, 0.45);
  color: rgba(240, 250, 245, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.lesson-editor-toast--show {
  opacity: 1;
  transform: translateY(0);
}

.lesson-editor-toast--neutral {
  border-color: rgba(110, 176, 242, 0.4);
  color: rgba(230, 240, 255, 0.98);
}

@media (prefers-reduced-motion: reduce) {
  .lesson-editor-skeleton__card {
    animation: none;
    background: rgba(255, 255, 255, 0.05);
  }
}

/* Filters */
.admin-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.admin-filters__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-filter-select,
.admin-filter-search {
  padding: 10px 14px;
  background: var(--color-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 14px;
  font-family: inherit;
  min-width: 180px;
  transition: border-color 0.2s;
}

.admin-filter-select:focus,
.admin-filter-search:focus {
  outline: none;
  border-color: var(--color-accent-start);
}

.admin-filter-search {
  min-width: 250px;
}

/* Table */
.admin-table-container {
  background: var(--color-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table th {
  padding: 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-muted);
}

.admin-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* Badges */
.admin-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-badge--published {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.admin-badge--draft {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-muted);
}

.admin-badge--coding {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.admin-badge--productivity {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.admin-badge--design {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.admin-badge--other {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-muted);
}

.admin-badge--test {
  background: rgba(147, 112, 219, 0.15);
  color: #b794f6;
  border: 1px solid rgba(147, 112, 219, 0.35);
}

/* Row action buttons (tables, block editor) — not the admin homepage */
.admin-inline-actions {
  display: flex;
  gap: 8px;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.admin-action-btn--danger {
  color: #ff6b6b;
}

.admin-action-btn--danger:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
}

/* Reorder Controls */
.admin-reorder-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.admin-reorder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-reorder-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.admin-reorder-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.admin-order-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  min-width: 20px;
  text-align: center;
}

/* Modal */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.admin-modal__content {
  position: relative;
  background: var(--color-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.admin-modal__content--small {
  max-width: 400px;
}

.admin-modal__content--wide {
  max-width: 720px;
}

.admin-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-modal__header h2 {
  font-size: 24px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  margin: 0;
  color: var(--color-text);
}

.admin-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.admin-modal__body {
  padding: 24px;
}

/* Form */
.admin-form {
  padding: 24px;
}

.admin-form__group {
  margin-bottom: 20px;
}

.admin-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-form__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.admin-form__input,
.admin-form__textarea,
.admin-form__select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.admin-form__input:focus,
.admin-form__textarea:focus,
.admin-form__select:focus {
  outline: none;
  border-color: var(--color-accent-start);
}

.admin-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.admin-form__help {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 6px;
}

.admin-form__checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
}

.admin-form__checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-accent-start);
}

.admin-form__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .admin-filters {
    flex-direction: column;
  }
  
  .admin-filter-select,
  .admin-filter-search {
    min-width: 100%;
  }
  
  .admin-table-container {
    overflow-x: auto;
  }
  
  .admin-table {
    min-width: 800px;
  }
  
  .admin-form__row {
    grid-template-columns: 1fr;
  }
  
  .admin-modal__content {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }
}


/* Admin portal — readable text on light bambu shell */
body.admin-portal .admin-dashboard__eyebrow {
  color: var(--color-muted);
}

body.admin-portal .admin-dashboard__lede {
  color: var(--color-text);
}

body.admin-portal .admin-dashboard__section-title,
body.admin-portal .admin-dashboard__quick h2 {
  color: var(--color-text);
}

body.admin-portal .admin-dashboard__section-desc {
  color: var(--color-muted);
}

body.admin-portal .admin-author-banner {
  background: #e8f0fe;
  border-color: rgba(26, 115, 232, 0.28);
  color: var(--color-text);
}

body.admin-portal .admin-author-banner__title {
  color: #1967d2;
}

body.admin-portal .admin-dashboard__workflow {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
}

body.admin-portal .admin-workflow-step {
  background: #f8fafc;
  border: 1px solid var(--color-border);
}

body.admin-portal .admin-workflow-step__num {
  background: #e8f0fe;
  color: #1967d2;
}

body.admin-portal .admin-workflow-step__title {
  color: var(--color-text);
}

body.admin-portal .admin-workflow-step__desc {
  color: var(--color-muted);
}

body.admin-portal .admin-workflow-chevron {
  color: var(--color-muted);
}

body.admin-portal .admin-action-card--secondary {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
}

body.admin-portal .admin-action-card__title {
  color: var(--color-text);
}

body.admin-portal .admin-action-card__desc {
  color: var(--color-muted);
}

body.admin-portal .lesson-editor__meta {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
}

body.admin-portal .lesson-editor__meta-label {
  color: var(--color-muted);
}

body.admin-portal .lesson-editor__meta-value {
  color: var(--color-text);
}

body.admin-portal .lesson-editor-foot p,
body.admin-portal .lesson-editor-type-intro {
  color: var(--color-muted);
}

body.admin-portal .lesson-editor__empty {
  border-color: var(--color-border);
  background: var(--color-panel);
}

body.admin-portal .lesson-editor__empty-title {
  color: var(--color-text);
}

body.admin-portal .lesson-editor__empty-desc {
  color: var(--color-muted);
}

body.admin-portal .lesson-editor-type-card {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

body.admin-portal .lesson-editor-type-card__title {
  color: var(--color-text);
}

body.admin-portal .lesson-editor-type-card__desc {
  color: var(--color-muted);
}

body.admin-portal .lesson-editor-type-card:hover {
  background: #e8f0fe;
  border-color: rgba(26, 115, 232, 0.35);
  box-shadow: var(--shadow-soft);
}

body.admin-portal .admin-form__label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

body.admin-portal .admin-form__label-row .admin-form__label {
  margin-bottom: 0;
  flex: 1;
}

.admin-json-help-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.admin-json-help-btn:hover {
  background: #e8f0fe;
  border-color: rgba(26, 115, 232, 0.45);
  color: #1967d2;
}

.admin-modal__content--json-help {
  max-width: min(560px, calc(100vw - 32px));
}

.admin-json-help-body .admin-json-help-intro {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
}

.admin-json-help-template {
  margin: 0 0 12px;
  padding: 14px 16px;
  max-height: 240px;
  overflow: auto;
  border-radius: 10px;
  background: #f1f3f4;
  border: 1px solid var(--color-border);
  font-family: ui-monospace, "SF Mono", Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: #202124;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Lesson Viewer — aligned with academy “unit” chrome */
.lesson-viewer {
  padding: 0 max(16px, 5vw) 48px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.lesson-viewer:has(.lesson-moment--simulation),
.lesson-viewer.lesson-viewer--simulation {
  max-width: min(1320px, calc(100vw - 32px));
}

body.app-shell.lesson-immersive .bambu-nav,
body.app-shell.lesson-immersive .bambu-nav-backdrop {
  display: none !important;
}

body.app-shell.lesson-immersive .bambu-mobile-bar {
  display: none !important;
}

body.app-shell.lesson-immersive .bambu-shell {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 18px clamp(12px, 3vw, 36px) 48px;
}

body.app-shell.lesson-immersive .academy-shell {
  max-width: none;
}

body.app-shell.lesson-immersive .academy-panel--lesson .academy-back {
  display: none;
}

body.app-shell.lesson-immersive .lesson-viewer {
  max-width: min(1440px, 100%);
  padding-left: max(12px, 2vw);
  padding-right: max(12px, 2vw);
}

body.app-shell.lesson-immersive .lesson-viewer.lesson-viewer--simulation,
body.app-shell.lesson-immersive .lesson-viewer:has(.lesson-moment--simulation) {
  max-width: min(1680px, 100%);
}

.lesson-exit-fab {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1200;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(60, 64, 67, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 12px rgba(60, 64, 67, 0.14);
  font-size: 28px;
  line-height: 1;
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  font-weight: 300;
  font-family: inherit;
}

.lesson-exit-fab:hover {
  background: #fff;
  color: #202124;
  border-color: rgba(60, 64, 67, 0.28);
}

.lesson-exit-fab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(26, 115, 232, 0.45);
}

.lesson-exit-modal[hidden] {
  display: none !important;
}

.lesson-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lesson-exit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.42);
  cursor: pointer;
}

.lesson-exit-modal__dialog {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  background: var(--color-panel, #fff);
  border-radius: 16px;
  padding: 22px 24px 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
}

.lesson-exit-modal__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #202124);
}

.lesson-exit-modal__text {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted, #5f6368);
}

.lesson-exit-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lesson-viewer__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 22px 24px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    165deg,
    rgba(22, 28, 26, 0.92) 0%,
    rgba(12, 16, 15, 0.88) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 40px rgba(0, 0, 0, 0.25);
}

.lesson-viewer__header-main {
  flex: 1;
  min-width: min(100%, 280px);
}

.lesson-viewer__header-actions {
  flex-shrink: 0;
  align-self: center;
}

.lesson-viewer__intent {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
  max-width: 36rem;
}

.lesson-viewer__complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 600;
  border-radius: 10px;
}

.lesson-viewer__complete-btn[hidden] {
  display: none !important;
}

.lesson-viewer__complete-btn--done {
  background: rgba(46, 213, 115, 0.18) !important;
  color: #8fffc9 !important;
  border: 1px solid rgba(88, 188, 122, 0.45) !important;
}

.lesson-viewer__header .admin-btn--primary {
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
}

.lesson-viewer__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lesson-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.lesson-badge--learn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.lesson-badge--practice {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.lesson-badge--project {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.lesson-badge--finale {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.lesson-badge--test {
  background: rgba(147, 112, 219, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(147, 112, 219, 0.35);
}

.lesson-duration {
  font-size: 14px;
  color: var(--color-muted);
  font-weight: 500;
}

.lesson-finale-hint {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-muted);
}

.lesson-finale-hint[hidden] {
  display: none !important;
}

.project-submission-panel {
  margin-top: 32px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--color-panel, rgba(255, 255, 255, 0.03));
}

.project-submission-panel--in-reading {
  margin-top: 28px;
  padding-top: 28px;
  margin-left: -4px;
  margin-right: -4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.project-submission-panel--in-reading[hidden] {
  display: none !important;
}

.project-submission-panel__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.project-submission-panel__hint {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--color-muted);
}

.project-submission-panel__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--color-text);
  font-family: ui-monospace, monospace;
  font-size: 14px;
  resize: vertical;
  min-height: 160px;
}

.project-submission-panel__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.project-submission-panel__status {
  font-size: 14px;
  color: var(--color-muted);
}

.lesson-reading {
  --lesson-reading-pad-y: clamp(28px, 4vw, 44px);
  --lesson-reading-pad-x: clamp(22px, 3.5vw, 40px);
  position: relative;
  border-radius: 20px;
  padding: var(--lesson-reading-pad-y) var(--lesson-reading-pad-x);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.015) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 50px rgba(0, 0, 0, 0.18);
}

/* Simulation pages: drop the inner “card” chrome so the UI mock can use the full lesson width */
.lesson-reading--simulation {
  --lesson-reading-pad-x: 0px;
  padding: var(--lesson-reading-pad-y) 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.lesson-reading--simulation .lesson-page-nav,
.lesson-reading--simulation .project-submission-panel--in-reading {
  margin-left: clamp(16px, 3.5vw, 40px);
  margin-right: clamp(16px, 3.5vw, 40px);
}

.lesson-reading--simulation .lesson-moment--simulation {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
}

.lesson-content {
  position: relative;
  line-height: 1.75;
  color: var(--color-text);
  font-size: 17px;
}

.lesson-content__state {
  text-align: center;
  padding: 56px 24px;
  font-size: 16px;
}

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

.lesson-content__state--error {
  color: #ff8a8a;
}

.lesson-flow {
  animation: lesson-flow-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lesson-flow-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lesson-flow > .lesson-block--text,
.lesson-flow > .lesson-block--heading {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.lesson-block {
  margin-bottom: 0;
}

.lesson-flow > .lesson-block {
  margin-bottom: 1.75rem;
}

.lesson-flow > .lesson-block:last-child {
  margin-bottom: 0;
}

.lesson-block--text {
  font-size: 17px;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.88);
}

.lesson-block--text p {
  margin-bottom: 1.1em;
}

.lesson-block--text p:last-child {
  margin-bottom: 0;
}

.lesson-block--heading {
  margin-top: 2.35rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color: var(--color-text);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.18;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lesson-flow > .lesson-block--heading:first-child {
  margin-top: 0;
}

.lesson-block--code {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}

.lesson-block--code pre {
  margin: 0;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
}

.lesson-block--code code {
  color: var(--color-text);
}

.lesson-block--image {
  margin: 32px 0;
  text-align: center;
}

.lesson-image-caption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-muted);
  font-style: italic;
}

.lesson-block--video {
  margin: 32px 0;
}

.lesson-video-title {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-muted);
  text-align: center;
}

.lesson-block--exercise,
.lesson-block--project {
  background: var(--color-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

.lesson-block--exercise h3,
.lesson-block--project h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

.lesson-block--exercise h4,
.lesson-block--project h4 {
  margin-top: 20px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.lesson-block--exercise ul,
.lesson-block--project ul {
  margin: 12px 0;
  padding-left: 24px;
}

.lesson-block--exercise li,
.lesson-block--project li {
  margin-bottom: 8px;
}

.lesson-block--quiz {
  background: var(--color-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

.lesson-block--quiz h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

.lesson-block--simulation {
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

/* Classic (non-immersive) simulation embed: the mock renders its own product
   chrome, so the wrapper is just a clean window that clips it to tidy corners. */
.lesson-block--simulation.sim-window {
  display: flex;
  flex-direction: column;
}

.lesson-block--simulation .interaction-simulation-mount {
  flex: 1 1 auto;
  min-height: 0;
}

.lesson-moment {
  --lm-accent: #5ac8fa;
  margin: 2.25rem 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    165deg,
    rgba(18, 22, 28, 0.97) 0%,
    rgba(12, 14, 18, 0.94) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 18px 44px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.lesson-moment--practice {
  --lm-accent: #5ac8fa;
}

.lesson-moment--scenario {
  --lm-accent: #b388ff;
}

.lesson-moment--simulation {
  --lm-accent: #6ee7b7;
}

.lesson-moment--checkpoint {
  --lm-accent: #ffd166;
}

.lesson-moment--blitz {
  --lm-accent: #f9ab00;
}

.lesson-moment__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.lesson-moment__mark {
  width: 4px;
  align-self: stretch;
  min-height: 2.75rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lm-accent), rgba(255, 255, 255, 0.15));
  flex-shrink: 0;
}

.lesson-moment__head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lesson-moment__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.lesson-moment__meta {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.48);
  max-width: 40rem;
}

.lesson-moment__shell {
  padding: 20px 18px 22px;
}

.lesson-moment .interactive-exercise {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.lesson-moment .interactive-exercise--workspace {
  background: transparent;
}

.lesson-moment .lesson-block--quiz {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.lesson-moment .lesson-block--simulation {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 14px;
  box-shadow: none;
  overflow: hidden;
}

/* Full-width canvas for classroom simulation (not a tiny inset widget) */
.lesson-moment--simulation {
  margin-left: calc(-1 * var(--lesson-reading-pad-x));
  margin-right: calc(-1 * var(--lesson-reading-pad-x));
  width: calc(100% + 2 * var(--lesson-reading-pad-x));
  max-width: calc(100vw - 2 * max(16px, 5vw));
  margin-top: 0.25rem;
  margin-bottom: 2.75rem;
}

.lesson-moment--simulation .lesson-moment__shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 0 0;
}

.interaction-sim-brief {
  margin: 0 max(16px, 4vw);
  padding: 16px 18px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, rgba(20, 26, 24, 0.94) 0%, rgba(12, 16, 15, 0.9) 100%);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 8px 28px rgba(0, 0, 0, 0.28);
  max-width: 44rem;
  align-self: flex-start;
}

.interaction-sim-brief__label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(110, 231, 183, 0.92);
}

.interaction-sim-brief__title {
  margin: 0 0 12px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.interaction-sim-brief__body {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}

.interaction-sim-brief__body p {
  margin: 0 0 10px;
}

.interaction-sim-brief__body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .interaction-sim-brief {
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .lesson-moment--simulation {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }

  .lesson-viewer:has(.lesson-moment--simulation),
  .lesson-viewer.lesson-viewer--simulation {
    max-width: 100%;
  }
}

.lesson-moment .exercise-title {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  margin-bottom: 6px;
}

.lesson-moment .exercise-instruction {
  margin-bottom: 18px;
}

.lesson-quiz-prompt {
  margin: 0 0 1.25rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.94);
}

.lesson-cta-check {
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 10px;
  padding: 14px 22px !important;
  box-shadow: 0 4px 14px rgba(90, 200, 250, 0.22);
}

.lesson-flow .lesson-block--quiz,
.lesson-flow .lesson-block--exercise,
.lesson-flow .lesson-block--project {
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  font-family: inherit;
}

.quiz-option__glyph {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.quiz-option__label {
  flex: 1;
  min-width: 0;
}

.quiz-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option--correct {
  border-color: rgba(88, 188, 122, 0.65) !important;
  background: rgba(88, 188, 122, 0.12) !important;
}

.quiz-option--correct .quiz-option__glyph {
  border-color: rgba(88, 188, 122, 0.9);
  background: rgba(88, 188, 122, 0.25);
}

.quiz-option--miss {
  border-color: rgba(255, 120, 120, 0.55) !important;
  background: rgba(255, 90, 90, 0.1) !important;
}

.quiz-option--miss .quiz-option__glyph {
  border-color: rgba(255, 140, 140, 0.75);
}

.quiz-explanation {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.22);
}

.quiz-explanation__title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 220, 150, 0.9);
  margin-bottom: 8px;
}

.quiz-explanation__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.quiz-explanation-toggle {
  display: inline-flex;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Lesson Builder blocks: text styles ---- */
.lesson-text--lead {
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
}

.lesson-text--small {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.lesson-text--quote {
  border-left: 3px solid rgba(255, 209, 102, 0.6);
  padding-left: 1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
}

.lesson-text--muted { color: rgba(255, 255, 255, 0.62); }
.lesson-text--strong { font-weight: 600; }
.lesson-text--center,
.lesson-heading--center { text-align: center; }

h1.lesson-block--heading { font-size: clamp(1.9rem, 3vw, 2.4rem); }

h3.lesson-block--heading,
h4.lesson-block--heading {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 1.6rem;
}

.lesson-block--image.lesson-image--small img { max-width: 360px; }
.lesson-block--image.lesson-image--medium img { max-width: 620px; }
.lesson-block--image.lesson-image--full img { max-width: 100%; }

/* ---- Callout ---- */
.lesson-flow > .lesson-callout,
.lesson-flow > .lesson-example,
.lesson-flow > .lesson-recap,
.lesson-flow > .lesson-completion,
.lesson-flow > .lesson-divider {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.lesson-callout {
  padding: 16px 18px 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left-width: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.lesson-callout__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lesson-callout__body { font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); }
.lesson-callout__body p { margin: 0 0 0.6em; }
.lesson-callout__body p:last-child { margin-bottom: 0; }

.lesson-callout--tip { border-color: rgba(88, 188, 122, 0.45); background: rgba(88, 188, 122, 0.08); }
.lesson-callout--tip .lesson-callout__title { color: rgba(140, 220, 170, 0.95); }
.lesson-callout--info { border-color: rgba(120, 170, 255, 0.45); background: rgba(120, 170, 255, 0.08); }
.lesson-callout--info .lesson-callout__title { color: rgba(160, 195, 255, 0.95); }
.lesson-callout--warning { border-color: rgba(255, 176, 76, 0.5); background: rgba(255, 176, 76, 0.09); }
.lesson-callout--warning .lesson-callout__title { color: rgba(255, 200, 120, 0.95); }
.lesson-callout--success { border-color: rgba(79, 209, 139, 0.6); background: rgba(79, 209, 139, 0.12); }
.lesson-callout--success .lesson-callout__title { color: rgba(140, 230, 180, 0.95); }

/* ---- Example ---- */
.lesson-example {
  border-radius: 14px;
  border: 1px solid rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.06);
  padding: 14px 18px 16px;
}

.lesson-example__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 220, 150, 0.9);
}

.lesson-example__title { margin: 6px 0 0; font-size: 17px; font-weight: 700; }
.lesson-example__body { margin-top: 8px; font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, 0.88); }
.lesson-example__body p { margin: 0 0 0.6em; }
.lesson-example__body p:last-child { margin-bottom: 0; }

/* ---- Structure blocks ---- */
.lesson-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.lesson-recap,
.lesson-checkpoint,
.lesson-completion {
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.lesson-struct__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.lesson-struct__title {
  margin: 0 0 10px;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lesson-struct__body { font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, 0.85); }
.lesson-struct__body p { margin: 0 0 0.6em; }
.lesson-struct__body p:last-child { margin-bottom: 0; }

.lesson-recap__list { margin: 0; padding-left: 1.25rem; line-height: 1.7; color: rgba(255, 255, 255, 0.88); }
.lesson-recap__list li { margin-bottom: 4px; }
.lesson-recap__list li p { margin: 0; }

.lesson-checkpoint {
  border-color: rgba(120, 170, 255, 0.4);
  background: rgba(120, 170, 255, 0.07);
}

.lesson-completion {
  text-align: center;
  border-color: rgba(88, 188, 122, 0.45);
  background: linear-gradient(180deg, rgba(88, 188, 122, 0.14), rgba(88, 188, 122, 0.04));
}

/* ---- Question types ---- */
.quiz-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.quiz-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

.quiz-actions .admin-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.quiz-actions .admin-btn--primary {
  background: #4fd18b;
  border-color: #4fd18b;
  color: #06251a;
}

.quiz-actions .admin-btn:disabled { opacity: 0.5; cursor: default; }

.quiz-feedback {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.quiz-feedback[data-state="success"] { color: rgba(88, 188, 122, 0.95); }
.quiz-feedback[data-state="error"] { color: rgba(255, 140, 140, 0.95); }

.quiz-option--check .quiz-option__glyph { border-radius: 6px; }

.quiz-option--picked {
  border-color: rgba(120, 170, 255, 0.6);
  background: rgba(120, 170, 255, 0.1);
}

.quiz-option--picked .quiz-option__glyph {
  border-color: rgba(120, 170, 255, 0.9);
  background: rgba(120, 170, 255, 0.35);
}

.quiz-option--prior-miss { opacity: 0.55; }

.quiz-match { display: flex; flex-direction: column; gap: 10px; }

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

.quiz-match__left {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
}

.quiz-match__select,
.quiz-text-input,
.quiz-blank-input,
.lesson-sheet__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}

.quiz-match__select option { color: #111; }

.quiz-match__select:focus,
.quiz-text-input:focus,
.quiz-blank-input:focus,
.lesson-sheet__input:focus {
  outline: none;
  border-color: rgba(79, 209, 139, 0.8);
  box-shadow: 0 0 0 3px rgba(79, 209, 139, 0.2);
}

.quiz-blank-input {
  display: inline-block;
  width: auto;
  min-width: 9ch;
  max-width: 100%;
  padding: 4px 10px;
  margin: 0 4px;
  font-size: inherit;
  vertical-align: baseline;
}

.quiz-blank-input--standalone { display: block; width: 100%; margin-top: 12px; padding: 12px 14px; }
.quiz-blank-gap { display: inline-block; min-width: 3ch; border-bottom: 2px solid rgba(255, 255, 255, 0.4); }

.quiz-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: order; }

.quiz-order__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  counter-increment: order;
}

.quiz-order__item::before {
  content: counter(order);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.quiz-order__label { flex: 1; min-width: 0; font-size: 15px; }
.quiz-order__controls { display: flex; gap: 4px; }

.quiz-order__btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.quiz-order__btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.quiz-order__btn:disabled { opacity: 0.4; cursor: default; }

.lesson-block--quiz-correct .quiz-order__item,
.lesson-block--quiz-correct .quiz-match__left { border-color: rgba(88, 188, 122, 0.55); }

/* ---- Spreadsheet exercise ---- */
.lesson-sheet__scroll { overflow-x: auto; margin-top: 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14); }

.lesson-sheet__grid {
  border-collapse: collapse;
  width: 100%;
  min-width: 320px;
  font-size: 14px;
  font-family: 'Menlo', 'Monaco', monospace;
  background: rgba(255, 255, 255, 0.02);
}

.lesson-sheet__grid th {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lesson-sheet__grid thead th:first-child { width: 36px; }
.lesson-sheet__grid tbody th { width: 36px; }

.lesson-sheet__cell {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  min-width: 90px;
  white-space: nowrap;
}

.lesson-sheet__cell--target { padding: 4px; background: rgba(79, 209, 139, 0.08); }
.lesson-sheet__input { padding: 8px 10px; border-radius: 6px; font-family: inherit; }
.lesson-sheet--complete .lesson-sheet__cell--target { background: rgba(88, 188, 122, 0.18); }
.lesson-sheet__hint { margin: 12px 0 0; font-size: 14px; color: rgba(255, 220, 150, 0.9); }

@keyframes lesson-sheet-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.lesson-sheet--shake { animation: lesson-sheet-shake 0.4s ease; }

@media (max-width: 640px) {
  .quiz-match__row { grid-template-columns: 1fr; gap: 6px; }
}

/* Blitz — random subset quiz */
.lesson-block--blitz {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.lesson-blitz-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-blitz-status__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lesson-blitz-status__count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.lesson-blitz-streak {
  font-size: 12px;
  font-weight: 700;
  color: #f9ab00;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(249, 171, 0, 0.14);
  border: 1px solid rgba(249, 171, 0, 0.35);
  animation: blitz-streak-pop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.lesson-blitz-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.lesson-blitz-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a73e8, #34a853);
  transition: width 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.lesson-blitz-enter {
  animation: blitz-question-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes blitz-question-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blitz-streak-pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes blitz-option-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes blitz-feedback-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blitz-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes blitz-complete-pop {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  70% {
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes blitz-continue-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(26, 115, 232, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0);
  }
}

.lesson-blitz-shake {
  animation: blitz-shake 0.45s ease;
}

.lesson-blitz-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  animation: blitz-feedback-in 0.35s ease both;
}

.lesson-blitz-feedback--correct {
  background: rgba(52, 168, 83, 0.14);
  border: 1px solid rgba(52, 168, 83, 0.35);
  color: #137333;
}

.lesson-blitz-feedback--miss {
  background: rgba(234, 67, 53, 0.1);
  border: 1px solid rgba(234, 67, 53, 0.28);
  color: #c5221f;
}

.lesson-blitz-feedback__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  flex-shrink: 0;
}

.lesson-blitz-feedback--correct .lesson-blitz-feedback__icon {
  background: #e6f4ea;
  color: #137333;
}

.lesson-blitz-feedback--miss .lesson-blitz-feedback__icon {
  background: #fce8e6;
  color: #c5221f;
}

.quiz-options--blitz .quiz-option--pop {
  animation: blitz-option-pop 0.4s ease;
}

.quiz-option--prior-miss {
  cursor: not-allowed !important;
  transform: none !important;
}

.quiz-option--prior-miss:hover:not(:disabled) {
  transform: none !important;
}

.quiz-option--prior-miss .quiz-option__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #ffb0b0;
  border-color: rgba(255, 120, 120, 0.55) !important;
  background: rgba(255, 90, 90, 0.14) !important;
}

.lesson-blitz-done__review-note {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.lesson-block--blitz-review .lesson-blitz-status__count {
  color: #e37400;
}

.lesson-blitz-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 12px 8px 4px;
  animation: blitz-complete-pop 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.lesson-blitz-complete__score {
  margin-bottom: 4px;
}

.lesson-blitz-complete__ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 700;
  color: #137333;
  background: linear-gradient(145deg, #e6f4ea 0%, #ceead6 100%);
  border: 3px solid #34a853;
  box-shadow: 0 8px 24px rgba(52, 168, 83, 0.22);
}

.lesson-blitz-question {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vh, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}

.quiz-options--blitz {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.quiz-options--blitz .quiz-option {
  padding: 12px 14px;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.quiz-options--blitz .quiz-option__glyph {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.lesson-page-nav__btn--ready:not(:disabled) {
  animation: blitz-continue-pulse 1.6s ease-out 2;
}

.lesson-page-nav__btn--pulse:not(:disabled) {
  animation: blitz-continue-pulse 0.85s ease-out 1;
}

.lesson-page-nav__btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.lesson-page-nav__btn--ready:not(:disabled) .lesson-page-nav__btn-arrow {
  transform: translateX(2px);
}

.lesson-blitz-done__title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.lesson-blitz-done__score {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.lesson-blitz-done__score strong {
  color: rgba(255, 255, 255, 0.95);
}

.lesson-blitz-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

.lesson-moment--blitz .lesson-block--blitz {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.lesson-moment--blitz .quiz-explanation {
  margin-top: 4px;
}

.blitz-builder__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

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

.blitz-bulk-panel {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.12);
}

.blitz-bulk-panel[hidden] {
  display: none !important;
}

.blitz-bulk-panel__input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.blitz-bulk-panel__format {
  margin: 10px 0 12px;
}

.blitz-bulk-panel__format summary {
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.blitz-bulk-panel__example {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.blitz-bulk-panel__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.blitz-questions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blitz-question-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

.blitz-question-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.blitz-question-card__title {
  flex: 1;
  min-width: 120px;
}

.admin-btn--small {
  padding: 6px 10px;
  font-size: 12px;
}

.lesson-navigation {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.lesson-navigation__btn[hidden] {
  display: none !important;
}

.lesson-page-nav {
  margin-top: 36px;
  padding: 22px 20px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lesson-page-nav__track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.lesson-page-nav__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a73e8, #34a853);
  transition: width 0.35s ease;
}

.lesson-page-nav__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.lesson-page-info {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lesson-page-nav__buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}

.lesson-page-finish__message {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.lesson-page-finish__message[data-state="success"] {
  color: #8fffc9;
}

.lesson-page-finish__message[data-state="pending"] {
  color: rgba(255, 255, 255, 0.55);
}

.lesson-page-finish__message[data-state="error"] {
  color: #ffb0b0;
}

.lesson-page-finish__message[data-state="muted"] {
  color: rgba(255, 255, 255, 0.45);
}

.lesson-page-nav__btn {
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.lesson-page-nav__btn--continue {
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
}

.lesson-page-nav__btn--continue:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
}

.lesson-page-nav .admin-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text);
}

.lesson-page-nav .admin-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Interactive Exercise Styles - Duolingo-like */
.interactive-exercise {
  margin: 40px 0;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px;
}

.exercise-title {
  font-size: 24px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  margin: 0 0 8px;
  color: var(--color-text);
}

.exercise-instruction {
  font-size: 16px;
  color: var(--color-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.exercise-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.exercise-editor-wrapper {
  transition: all 0.3s;
}

.exercise-editor-wrapper.has-error {
  animation: shake 0.4s;
}

.exercise-editor-wrapper.exercise-complete {
  opacity: 0.8;
}

.exercise-editor {
  background: rgba(16, 18, 22, 0.95);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  min-height: 280px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.exercise-editor-wrapper.has-error .exercise-editor {
  border-color: rgba(255, 123, 123, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 123, 123, 0.15);
}

.exercise-editor-wrapper.exercise-complete .exercise-editor {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.exercise-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.exercise-dots {
  display: inline-flex;
  gap: 0.4rem;
}

.exercise-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  background: #d94c4c;
}

.exercise-dots span:nth-child(2) {
  background: #e0b33f;
}

.exercise-dots span:nth-child(3) {
  background: #48b36c;
}

.exercise-filename {
  font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
}

.exercise-editor__body {
  display: grid;
  grid-template-columns: 46px 1fr;
  min-height: 220px;
  font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.exercise-lines {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.6rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.exercise-lines span {
  display: block;
}

.exercise-textarea {
  width: 100%;
  background: transparent;
  border: none;
  resize: none;
  color: #eaf7ed;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  min-height: 220px;
  line-height: 1.6;
  font-family: inherit;
}

.exercise-textarea:read-only {
  opacity: 0.7;
  cursor: not-allowed;
}

.exercise-hint {
  margin: 0;
  padding: 0.6rem 1rem 0.9rem;
  color: rgba(123, 189, 241, 0.85);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.exercise-preview-wrapper {
  display: flex;
  flex-direction: column;
}

.exercise-preview {
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 18, 22, 0.9);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.exercise-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: rgba(220, 232, 238, 0.8);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.exercise-preview__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.exercise-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--color-muted);
  font-size: 14px;
}

.exercise-status {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(90, 127, 146, 0.35);
  color: #e7f4fb;
}

.exercise-status[data-state="success"] {
  background: rgba(88, 188, 122, 0.25);
  color: #a7f1c2;
}

.exercise-status[data-state="error"] {
  background: rgba(222, 90, 90, 0.28);
  color: #ffb0b0;
}

.exercise-preview__body {
  padding: 1rem 1.2rem;
  color: #e8f4f9;
  min-height: 140px;
}

.exercise-preview__body h2,
.exercise-preview__body h3,
.exercise-preview__body h4 {
  margin: 0 0 0.6rem;
}

.exercise-preview__body p {
  margin: 0 0 0.6rem;
  color: rgba(224, 237, 244, 0.9);
}

.exercise-preview__hint {
  display: none; /* No longer needed - side-by-side view */
}

.exercise-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.exercise-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s;
}

.exercise-help-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.exercise-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  background: var(--ui-primary);
  color: var(--ui-on-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: none;
  flex: 1;
  justify-content: center;
  max-width: 200px;
  margin-left: auto;
}

.exercise-check-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--ui-primary-hover);
}

.exercise-check-btn:active:not(:disabled) {
  transform: translateY(0);
}

.exercise-check-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  background: rgba(255, 255, 255, 0.06);
}

.exercise-success {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 14px;
  margin-top: 16px;
  animation: slideIn 0.3s ease-out;
}

/* Interactive exercise — Workspace scenario (mock app chrome + choices) */
.interactive-exercise--workspace {
  background: linear-gradient(165deg, rgba(20, 28, 36, 0.98), rgba(14, 18, 24, 0.99));
}

.workspace-scenario {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 14, 20, 0.95);
  margin-bottom: 8px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.workspace-scenario--shake {
  animation: shake 0.45s ease-in-out;
}

.workspace-scenario--complete {
  border-color: rgba(88, 188, 122, 0.45);
  box-shadow: 0 0 0 1px rgba(88, 188, 122, 0.12);
}

.workspace-scenario__chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-scenario__chrome--gmail {
  border-top: 3px solid #ea4335;
}

.workspace-scenario__chrome--drive {
  border-top: 3px solid #1a73e8;
}

.workspace-scenario__chrome--classroom {
  border-top: 3px solid #1e8e3e;
}

.workspace-scenario__chrome--calendar {
  border-top: 3px solid #4285f4;
}

.workspace-scenario__chrome--neutral {
  border-top: 3px solid rgba(123, 189, 241, 0.85);
}

.workspace-scenario__chrome-dots {
  display: inline-flex;
  gap: 6px;
}

.workspace-scenario__chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.workspace-scenario__chrome-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.workspace-scenario__app-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.workspace-scenario__app-sub {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.workspace-scenario__search-pill {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.workspace-scenario__body {
  padding: 20px 18px 22px;
}

.workspace-scenario__prompt {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(230, 240, 248, 0.92);
}

.workspace-scenario__choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace-scenario__choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  margin: 0;
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(240, 248, 255, 0.94);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.workspace-scenario__choice-index {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace-scenario__choice-label {
  flex: 1;
  min-width: 0;
}

.workspace-scenario__choice:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(179, 136, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.workspace-scenario__choice:disabled {
  cursor: default;
  opacity: 0.85;
}

.workspace-scenario__choice--correct {
  border-color: rgba(88, 188, 122, 0.65) !important;
  background: rgba(88, 188, 122, 0.14) !important;
}

.workspace-scenario__choice--correct .workspace-scenario__choice-index {
  background: rgba(88, 188, 122, 0.28);
  border-color: rgba(88, 188, 122, 0.45);
}

.workspace-scenario__empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.workspace-scenario__actions {
  flex-wrap: wrap;
}

.workspace-scenario__actions .workspace-scenario__tap-hint {
  margin: 0 0 0 auto;
  font-size: 0.85rem;
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .workspace-scenario__chrome {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .workspace-scenario__search-pill {
    justify-self: center;
  }

  .workspace-scenario__actions .workspace-scenario__tap-hint {
    width: 100%;
    margin: 8px 0 0;
    text-align: center;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Exercise Toast */
.exercise-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 18px;
  border-radius: 999px;
  background: #202124;
  color: #fff;
  border: 1px solid #3c4043;
  box-shadow: 0 12px 30px rgba(60, 64, 67, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 100060;
  font-size: 14px;
  font-weight: 500;
  max-width: min(92vw, 520px);
  text-align: center;
  line-height: 1.4;
}

.exercise-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.exercise-toast[data-state="success"] {
  background: #1e8e3e;
  border-color: #137333;
  color: #fff;
}

.exercise-toast[data-state="error"] {
  background: #c5221f;
  border-color: #9e1a18;
  color: #fff;
}

.exercise-toast[data-state="neutral"] {
  background: #202124;
  border-color: #3c4043;
  color: #fff;
}

body.lesson-immersive .exercise-toast {
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

/* Celebration Animation */
.lesson-content.celebrate::before,
.lesson-content.celebrate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(123, 215, 255, 0.5) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(120, 255, 174, 0.5) 0 3px, transparent 4px);
  background-size: 160px 160px, 200px 200px;
  animation: confetti-fall 1.1s ease-out 1;
  opacity: 0.25;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  50% {
    opacity: 0.25;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .interactive-exercise {
    padding: 24px;
  }
  
  .exercise-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .exercise-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .exercise-check-btn {
    max-width: 100%;
    margin-left: 0;
  }
  
  .exercise-editor__body {
    grid-template-columns: 36px 1fr;
  }
  
  .exercise-lines {
    font-size: 0.75rem;
    padding: 0.85rem 0.4rem;
  }
}

@media (max-width: 768px) {
  .lesson-viewer {
    padding: 24px 4vw;
  }
  
  .lesson-viewer__header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .lesson-navigation {
    flex-direction: column;
  }

  .lesson-navigation__btn {
    width: 100%;
  }

  .lesson-page-nav__row {
    flex-direction: column;
    align-items: stretch;
  }

  .lesson-page-nav__buttons {
    margin-left: 0;
    width: 100%;
    flex-direction: column;
  }

  .lesson-page-nav__btn {
    width: 100%;
    justify-content: center;
  }
}

/* Course Selection Modal */
.course-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.course-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.course-modal__content {
  position: relative;
  background: linear-gradient(
    165deg,
    rgba(18, 32, 28, 0.98) 0%,
    rgba(10, 18, 16, 0.98) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 72px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.course-modal__header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.course-modal__header h2 {
  font-size: 28px;
  font-weight: 800;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  margin: 0;
  color: var(--color-text);
}

.course-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px;
}

.course-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(168, 109, 255, 0.3);
}

.course-card__thumbnail {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a4a63, #1a3d4f);
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card__content {
  padding: 20px;
}

.course-card__title {
  font-size: 20px;
  font-weight: 700;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color: var(--color-text);
  margin: 0 0 12px;
}

.course-card__description {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card__category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(168, 109, 255, 0.2);
  color: var(--color-accent-start);
  text-transform: capitalize;
}

/* Section Selector */
.academy-panel__header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.academy-panel__section-select {
  padding: 8px 12px;
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  min-width: 200px;
}

.academy-panel__section-select:hover {
  background: #fff;
  border-color: #dadce0;
}

.academy-panel__section-select:focus {
  outline: none;
  border-color: var(--color-accent-start);
}

@media (max-width: 768px) {
  .course-modal__grid {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  
  .academy-panel__section-select {
    min-width: 150px;
    font-size: 14px;
  }
}

/* -------------------------------------------------------------------------- */
/* Interaction simulation — Classroom-style mock (learner lesson viewer)     */
/* -------------------------------------------------------------------------- */
.classroom-sim {
  position: relative;
  --cs-rail: #f8f9fa;
  --cs-border: #dadce0;
  --cs-blue: #1a73e8;
  --cs-text: #202124;
  --cs-muted: #5f6368;
  --cs-rail-col: clamp(196px, 21vw, 252px);
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
  color: var(--cs-text);
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--cs-border);
  overflow: hidden;
  box-shadow:
    0 4px 28px rgba(60, 64, 67, 0.14),
    0 1px 3px rgba(60, 64, 67, 0.1);
  margin: 0;
}

/* Fills the mount (16:9). Rail ≈ 252/1920 of row width when wide enough. */
.classroom-sim.classroom-sim--locked-1920 {
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 0;
  --cs-rail-col: 252px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  box-sizing: border-box;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__shell {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__rail {
  min-height: 0;
  overflow: visible;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__rail-top {
  flex-shrink: 0;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__rail-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__rail-section-label,
.classroom-sim.classroom-sim--locked-1920 .classroom-sim__rail-section > .classroom-sim__nav-item {
  flex-shrink: 0;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__class-links {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(95, 99, 104, 0.45) transparent;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__class-links::-webkit-scrollbar {
  width: 6px;
}

.classroom-sim.classroom-sim--locked-1920 .classroom-sim__class-links::-webkit-scrollbar-thumb {
  background: rgba(95, 99, 104, 0.35);
  border-radius: 999px;
}

/* Lesson embed: checklist sits outside — slim icon rail, full width for cards */
.classroom-sim.classroom-sim--external-checklist .classroom-sim__panel {
  min-height: 0;
}

/* Fluid lesson embed — fills mount, reflows like real Classroom */
.classroom-sim.classroom-sim--embed-lesson {
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 0;
  --cs-rail-col: 252px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  box-sizing: border-box;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist {
  --cs-rail-col: 72px;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

/* Rail always overlays — never steals width from the class grid when expanded */
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__rail {
  position: absolute;
  z-index: 30;
  left: 0;
  top: 0;
  bottom: 0;
  width: 72px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__rail {
  width: min(260px, 82%);
  max-width: 280px;
  box-shadow: 4px 0 18px rgba(60, 64, 67, 0.18);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(95, 99, 104, 0.45) transparent;
  -webkit-overflow-scrolling: touch;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__rail::-webkit-scrollbar {
  width: 6px;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__rail::-webkit-scrollbar-thumb {
  background: rgba(95, 99, 104, 0.35);
  border-radius: 999px;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__rail-top {
  flex-shrink: 0;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__rail-section {
  flex: 0 0 auto;
  min-height: 0;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__class-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: none;
  overflow: visible;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__main {
  grid-column: 1;
  min-width: 0;
  /* room for collapsed icon strip only — stays fixed when menu expands */
  padding-left: 80px;
  box-sizing: border-box;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__rail-section-label,
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__nav-item > span,
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__class-link-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__nav-item,
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__class-link {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

/* Enrolled classes hidden in collapsed strip, shown in expanded overlay */
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist .classroom-sim__class-links {
  display: none;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded
  .classroom-sim__rail-section-label,
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded
  .classroom-sim__nav-item
  > span,
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded
  .classroom-sim__class-link-text {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
}

.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__nav-item,
.classroom-sim.classroom-sim--embed-lesson.classroom-sim--external-checklist.classroom-sim--rail-expanded .classroom-sim__class-link {
  justify-content: flex-start;
  padding-left: 10px;
  padding-right: 10px;
}

.classroom-sim__rail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 25;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(32, 33, 36, 0.28);
  cursor: default;
}

.classroom-sim__hamburger.is-active {
  background: rgba(26, 115, 232, 0.1);
  color: var(--cs-blue);
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__shell {
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 16px 16px;
  container-type: inline-size;
  container-name: sim-main;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__panel {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__todo {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__filter {
  margin: 8px 12px 4px;
  padding: 7px 12px;
  font-size: 13px;
  border-width: 1px;
  flex-shrink: 0;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__todo-tabs {
  flex-shrink: 0;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__section {
  padding: 4px 12px 8px;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: min-content;
  align-items: start;
  align-content: start;
  gap: 16px 20px;
  padding: 16px 20px 20px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__class-card {
  height: auto;
  align-self: start;
  display: flex;
  flex-direction: column;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__class-card-head {
  flex: 0 0 auto;
  min-height: 112px;
  height: 112px;
  max-height: 112px;
  padding: 16px 14px 20px;
  box-sizing: border-box;
}

.classroom-sim.classroom-sim--embed-lesson .classroom-sim__class-card-body {
  flex: 0 0 auto;
}

@container sim-main (max-width: 520px) {
  .classroom-sim.classroom-sim--embed-lesson .classroom-sim__home {
    grid-template-columns: 1fr;
  }
}

.classroom-sim--complete .classroom-sim__panel {
  opacity: 0.92;
}

.interaction-simulation-mount {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.interaction-simulation-mount:has(.classroom-sim--locked-1920):not(:has(.browser-sim)),
.interaction-simulation-mount:has(.google-sim--locked-1920):not(:has(.browser-sim)) {
  aspect-ratio: 16 / 9;
}

.interaction-simulation-mount:has(.browser-sim) {
  aspect-ratio: unset;
}

/* Immersive lesson: keep practice area within the viewport (no full-page scroll). */
body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation):not(.lesson-stage__main) {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  max-height: calc(100dvh - clamp(140px, 20vh, 210px));
  min-height: 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

body.app-shell.lesson-immersive .lesson-stage .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) {
  max-height: none;
  padding-bottom: 0;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-viewer__header {
  flex-shrink: 0;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-reading {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-flow {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-moment--simulation {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-moment--simulation .lesson-moment__head {
  flex-shrink: 0;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-moment--simulation .lesson-moment__shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .interaction-sim-brief {
  flex-shrink: 0;
  max-height: min(220px, 30dvh);
  overflow-y: auto;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-block--simulation {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .interaction-simulation-mount:not(.interaction-simulation-mount--embed) {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  align-self: stretch;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .interaction-simulation-mount--embed,
body.classroom-student-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .interaction-simulation-mount--embed {
  flex: 1 1 auto;
  min-height: min(420px, 52dvh);
  min-width: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: unset;
  align-self: stretch;
  background: #fff;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .browser-sim__page-mount.interaction-simulation-mount--embed,
body.classroom-student-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .browser-sim__page-mount.interaction-simulation-mount--embed {
  min-height: 0;
  background: transparent;
}

body.app-shell.lesson-immersive
  .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation)
  .interaction-simulation-mount
  > .classroom-sim,
body.app-shell.lesson-immersive
  .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation)
  .interaction-simulation-mount
  > .browser-sim {
  flex: 1 1 auto;
  min-height: 0;
}

body.app-shell.lesson-immersive .lesson-viewer:is(:has(.lesson-reading--simulation), .lesson-viewer--simulation) .lesson-navigation {
  flex-shrink: 0;
  margin-top: 4px;
}

.classroom-sim__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 10px 16px;
  border-bottom: 1px solid var(--cs-border);
  background: #fff;
  min-height: 52px;
}

.classroom-sim__topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.classroom-sim__icon-btn {
  border: none;
  background: transparent;
  color: var(--cs-muted);
  padding: 6px;
  border-radius: 999px;
  cursor: default;
  line-height: 0;
}

.classroom-sim__icon-btn--action {
  cursor: pointer;
}

.classroom-sim__icon-btn--action:hover {
  background: rgba(60, 64, 67, 0.08);
}

.classroom-sim__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.classroom-sim__brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.classroom-sim__brand-mark svg {
  width: 30px;
  height: 30px;
  display: block;
}

.classroom-sim__brand-text {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 21px;
  font-weight: 400;
  color: #5f6368;
  letter-spacing: -0.01em;
}

.classroom-sim__crumb-sep {
  color: var(--cs-muted);
  font-size: 18px;
  margin: 0 2px;
}

.classroom-sim__crumb {
  font-size: 20px;
  color: var(--cs-text);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.classroom-sim__topbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.classroom-sim__join {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.classroom-sim__join-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(32, 33, 36, 0.42);
  cursor: pointer;
}

.classroom-sim__join-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 100%;
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  padding: 28px 28px 16px;
  box-shadow: 0 12px 40px rgba(32, 33, 36, 0.22);
}

.classroom-sim__join-title {
  margin: 0 0 22px;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #202124;
}

.classroom-sim__join-panel {
  background: #e8eef4;
  border-radius: 16px;
  padding: 22px 20px 24px;
}

.classroom-sim__join-panel-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 500;
  color: #202124;
}

.classroom-sim__join-panel-copy {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #3c4043;
}

.classroom-sim__join-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid #80868b;
  border-radius: 8px;
  background: #fff;
  font: 16px/1.4 "Roboto", "Segoe UI", system-ui, sans-serif;
  color: #202124;
}

.classroom-sim__join-input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: inset 0 0 0 1px #1a73e8;
}

.classroom-sim__join-input.is-error {
  border-color: #d93025;
}

.classroom-sim__join-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #d93025;
}

.classroom-sim__join-help {
  margin: 22px 4px 0;
}

.classroom-sim__join-help-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #202124;
}

.classroom-sim__join-help ul {
  margin: 0;
  padding-left: 22px;
  color: #3c4043;
  font-size: 14px;
  line-height: 1.65;
}

.classroom-sim__join-help li + li {
  margin-top: 4px;
}

.classroom-sim__join-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 28px;
}

.classroom-sim__join-textbtn {
  border: 0;
  background: none;
  padding: 10px 12px;
  border-radius: 6px;
  font: 500 14px/1.2 "Roboto", "Segoe UI", system-ui, sans-serif;
  color: #1a73e8;
  cursor: pointer;
}

.classroom-sim__join-textbtn:hover {
  background: rgba(26, 115, 232, 0.08);
}

.classroom-sim__join-textbtn--join:disabled {
  color: #80868b;
  cursor: default;
}

.classroom-sim__join-textbtn--join:disabled:hover {
  background: none;
}

.classroom-sim__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.classroom-sim__shell {
  display: grid;
  grid-template-columns: var(--cs-rail-col) minmax(0, 1fr);
  min-height: clamp(360px, 46vh, 580px);
  background: #f0f4f9;
  align-items: stretch;
}

.classroom-sim__shell > * {
  min-height: 0;
}

.classroom-sim__rail {
  background: var(--cs-rail);
  border-right: 1px solid var(--cs-border);
  padding: 14px 8px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.classroom-sim__rail-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.classroom-sim__rail-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-muted);
  padding: 8px 12px 4px;
}

.classroom-sim__nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--cs-text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.classroom-sim__nav-item svg {
  flex-shrink: 0;
  color: var(--cs-muted);
}

.classroom-sim__nav-item:hover {
  background: rgba(32, 33, 36, 0.04);
}

.classroom-sim__nav-item.is-active {
  background: #e8f0fe;
  color: var(--cs-blue);
}

.classroom-sim__nav-item.is-active svg {
  color: var(--cs-blue);
}

.classroom-sim__class-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(280px, 36vh);
  overflow-y: auto;
  padding-right: 2px;
}

.classroom-sim__class-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.classroom-sim__class-link:hover {
  background: rgba(32, 33, 36, 0.06);
}

.classroom-sim__class-link.is-active {
  background: #e8f0fe;
}

.classroom-sim__class-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.classroom-sim__class-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.classroom-sim__class-link-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.classroom-sim__class-link-sub {
  font-size: 12px;
  color: var(--cs-muted);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.classroom-sim__main {
  padding: 18px 22px 22px;
  background: #f0f4f9;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.classroom-sim__block-title {
  margin: 0 0 10px;
  font-family: "Barlow Condensed", "Barlow", "Roboto", system-ui, sans-serif;
  font-size: clamp(1.35rem, 2.1vw, 1.62rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--cs-text);
}

.classroom-sim__block-instruction {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--cs-muted);
  line-height: 1.78;
  max-width: 40rem;
}

.classroom-sim__panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--cs-border);
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.08);
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.classroom-sim__home {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px 20px;
  padding: 22px 24px 24px;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
}

.classroom-sim__class-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--cs-border);
  cursor: pointer;
  text-align: left;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.classroom-sim__class-card:hover {
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.12);
  transform: translateY(-1px);
}

.classroom-sim__class-card--find-match {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
}

.classroom-sim__class-card--find-dim {
  opacity: 0.38;
  pointer-events: none;
}

.classroom-sim__find {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef7e0;
  border: 1px solid #f9e076;
}

.classroom-sim__find-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.classroom-sim__find-label {
  font-size: 13px;
  font-weight: 600;
  color: #3c4043;
  white-space: nowrap;
}

.classroom-sim__find-input {
  flex: 1 1 180px;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.classroom-sim__find-input:focus {
  outline: 2px solid #1a73e8;
  border-color: #1a73e8;
}

.classroom-sim__find-meta {
  font-size: 12px;
  color: #5f6368;
  min-width: 4.5rem;
}

.classroom-sim__find-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #5f6368;
  padding: 4px 8px;
}

.classroom-sim__find-kbd,
.classroom-sim__find-callout {
  margin: 8px 0 0;
  font-size: 12px;
  color: #5f6368;
}

.sim-kbd,
kbd.sim-kbd {
  display: inline-block;
  min-width: 1.35em;
  padding: 1px 6px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 0 #dadce0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #3c4043;
}

.sim-kbd-plus,
.sim-kbd-or {
  margin: 0 3px;
  font-size: 11px;
  color: #5f6368;
}

.classroom-sim__find-callout {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(26, 115, 232, 0.08);
  border: 1px solid rgba(26, 115, 232, 0.2);
}

.classroom-sim__class-card-head {
  position: relative;
  min-height: 96px;
  padding: 18px 16px 24px;
  background: var(--card-accent, #5f6368);
  color: #fff;
}

.classroom-sim__class-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.classroom-sim__class-card-sub {
  margin: 8px 0 0;
  font-size: 13px;
  opacity: 0.92;
}

.classroom-sim__class-card-avatar {
  position: absolute;
  right: 16px;
  bottom: -20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.classroom-sim__class-card-body {
  padding: 28px 14px 14px;
  background: #fff;
}

.classroom-sim__class-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}

.classroom-sim__footer-ico {
  line-height: 0;
  opacity: 0.75;
}

.classroom-sim__placeholder {
  padding: 48px 32px;
  text-align: center;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.classroom-sim__placeholder-art {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8f0fe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.classroom-sim__placeholder-art svg {
  width: 34px;
  height: 34px;
}

.classroom-sim__placeholder-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
}

.classroom-sim__placeholder-desc {
  margin: 0;
  font-size: 14px;
  color: var(--cs-muted);
  line-height: 1.5;
}

.classroom-sim__todo {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 0 16px;
}

.classroom-sim__section {
  padding: 8px 24px 16px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.classroom-sim__assign-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.classroom-sim__todo-tabs {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 0 24px;
  border-bottom: 1px solid var(--cs-border);
}

.classroom-sim__tab {
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--cs-muted);
  padding: 14px 4px;
  margin-bottom: -1px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.classroom-sim__tab.is-active {
  color: var(--cs-blue);
  border-bottom-color: var(--cs-blue);
}

.classroom-sim__filter {
  margin: 16px 24px 8px;
  padding: 12px 16px;
  border: 2px solid var(--cs-blue);
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: var(--cs-text);
  background: #fff;
}

.classroom-sim__filter--chrome {
  user-select: none;
  cursor: default;
}

.classroom-sim__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.classroom-sim__section-title {
  font-size: 16px;
  font-weight: 500;
}

.classroom-sim__section-count {
  font-size: 14px;
  color: var(--cs-blue);
  font-weight: 500;
}

.classroom-sim__assign-li {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e8eaed;
}

.classroom-sim__assign-row {
  display: flex;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  margin: 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
}

.classroom-sim__assign-li:last-child {
  border-bottom: none;
}

.classroom-sim__assign-row:hover:not(:disabled) {
  background: #f8f9fa;
}

.classroom-sim__assign-row:disabled {
  cursor: default;
  opacity: 0.85;
}

.classroom-sim__progress {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
}

.classroom-sim__progress-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cs-muted);
  margin-bottom: 8px;
}

.classroom-sim__progress-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.classroom-sim__progress-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--cs-text);
}

.classroom-sim__progress-step.is-done {
  color: #137333;
}

.classroom-sim__progress-step.is-locked {
  color: var(--cs-muted);
  opacity: 0.65;
}

.classroom-sim__progress-step.is-active {
  font-weight: 500;
}

.classroom-sim__progress-step.is-redo.is-active .classroom-sim__progress-label::after {
  content: ' · practice again';
  font-weight: 500;
  color: #b06000;
}

.classroom-sim__progress-idx {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: #e8eaed;
  color: #3c4043;
}

.classroom-sim__progress-step.is-done .classroom-sim__progress-idx {
  background: #ceead6;
  color: #137333;
}

.classroom-sim__progress-step.is-active .classroom-sim__progress-idx {
  background: #e8f0fe;
  color: #1967d2;
}

.classroom-sim__assignment-detail {
  padding: 16px 24px 28px;
  flex: 1 1 auto;
  min-height: 0;
}

.classroom-sim__detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px 28px;
  align-items: start;
}

.classroom-sim__detail-main {
  min-width: 0;
}

.classroom-sim__detail-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.classroom-sim__detail-ico {
  flex-shrink: 0;
}

.classroom-sim__detail-hero-text {
  min-width: 0;
  flex: 1;
}

.classroom-sim__detail-teacher-line {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--cs-muted);
  line-height: 1.4;
}

.classroom-sim__detail-points-due {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.classroom-sim__detail-points {
  font-size: 13px;
  color: var(--cs-text);
  font-weight: 500;
}

.classroom-sim__detail-points-slot {
  flex: 1;
  min-width: 8px;
}

.classroom-sim__detail-due-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--cs-text);
  white-space: nowrap;
}

.classroom-sim__detail-due-pill--urgent {
  color: #d93025;
}

.classroom-sim__detail-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  padding: 10px 12px;
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 24px;
}

.classroom-sim__attach-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #fce8e6;
}

.classroom-sim__attach-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.classroom-sim__attach-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--cs-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.classroom-sim__attach-kind {
  font-size: 12px;
  color: var(--cs-muted);
}

.classroom-sim__detail-class-comments {
  padding-top: 8px;
  border-top: 1px solid var(--cs-border);
}

.classroom-sim__detail-comments-label {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cs-text);
}

.classroom-sim__detail-faux-link {
  border: none;
  background: none;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--cs-blue);
  font-family: inherit;
  cursor: default;
  text-align: left;
  opacity: 0.75;
}

.classroom-sim__detail-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.classroom-sim__your-work {
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px 16px;
}

.classroom-sim__your-work-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.classroom-sim__your-work-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--cs-text);
}

.classroom-sim__work-status {
  font-size: 14px;
  line-height: 1.3;
  text-align: right;
}

.classroom-sim__work-status--assigned {
  color: var(--cs-text);
  font-weight: 400;
}

.classroom-sim__work-status--missing {
  color: #d93025;
  font-weight: 700;
}

.classroom-sim__work-status--returned {
  color: var(--cs-muted);
  font-weight: 500;
}

.classroom-sim__work-status--turned-in {
  color: #137333;
  font-weight: 600;
}

.classroom-sim__your-work-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.classroom-sim__btn-add-create {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid var(--cs-blue);
  border-radius: 4px;
  background: #fff;
  color: var(--cs-blue);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.classroom-sim__btn-add-create:hover {
  background: rgba(26, 115, 232, 0.06);
}

.classroom-sim__btn-add-create--added {
  border-color: #137333;
  color: #137333;
  background: rgba(19, 115, 51, 0.06);
}

.classroom-sim__your-work-attach-hint {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--cs-muted);
}

.classroom-sim__hand-in--block {
  width: 100%;
  box-sizing: border-box;
}

.classroom-sim__your-work-done-msg {
  margin: 0;
  font-size: 14px;
  color: #137333;
  font-weight: 500;
  line-height: 1.4;
}

.classroom-sim__private-comments {
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
}

.classroom-sim__private-comments-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cs-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.classroom-sim__private-comments-icon {
  display: inline-flex;
}

.classroom-sim__detail-back {
  border: none;
  background: none;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0 12px;
  font-family: inherit;
}

.classroom-sim__detail-back:hover:not(:disabled) {
  text-decoration: underline;
}

.classroom-sim__detail-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.classroom-sim__detail-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 500;
  color: var(--cs-text);
}

.classroom-sim__detail-meta {
  margin: 0;
  font-size: 13px;
  color: var(--cs-muted);
}

.classroom-sim__detail-posted {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--cs-muted);
}

.classroom-sim__detail-due {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-muted);
}

.classroom-sim__detail-due--urgent {
  color: #d93025;
}

.classroom-sim__detail-actions {
  padding-top: 8px;
}

.classroom-sim__hand-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 4px;
  background: #1a73e8;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.classroom-sim__hand-in:hover:not(:disabled) {
  background: #1557b0;
}

.classroom-sim__hand-in:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Wrong-click feedback (goal-focused nav) — red ring from pointer */
.sim-wrong-click,
.classroom-sim__block-ripple {
  position: fixed;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  border-radius: 50%;
  border: 3px solid rgba(217, 48, 37, 0.92);
  background: rgba(217, 48, 37, 0.14);
  pointer-events: none;
  z-index: 100050;
  box-sizing: border-box;
  transform: scale(0.3);
  opacity: 1;
}

.sim-wrong-click--animate,
.classroom-sim__block-ripple--animate {
  animation: classroom-sim-block-ripple 0.95s ease-out forwards;
}

@keyframes classroom-sim-block-ripple {
  to {
    transform: scale(20);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sim-wrong-click--animate,
  .classroom-sim__block-ripple--animate {
    animation-duration: 0.25s;
    animation-timing-function: ease-in;
  }
}

/* Gentle nudge when the learner seems stuck (goal-focused mode). */
.classroom-sim__hint-pulse {
  animation: classroom-sim-hint-pulse 1.6s ease-in-out infinite;
  position: relative;
  z-index: 3;
  overflow: visible;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.55);
}

.classroom-sim__nav-item.classroom-sim__hint-pulse,
.classroom-sim__class-link.classroom-sim__hint-pulse,
.classroom-sim__tab.classroom-sim__hint-pulse,
.classroom-sim__assign-row.classroom-sim__hint-pulse,
.classroom-sim__class-card.classroom-sim__hint-pulse {
  overflow: visible;
}

.classroom-sim__hint-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: classroom-sim-hint-ring 1.6s ease-in-out infinite;
}

@keyframes classroom-sim-hint-pulse {
  0%,
  100% {
    background-color: rgba(26, 115, 232, 0.08);
  }
  50% {
    background-color: rgba(26, 115, 232, 0.2);
  }
}

@keyframes classroom-sim-hint-ring {
  0%,
  100% {
    box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.55);
  }
  50% {
    box-shadow:
      inset 0 0 0 3px rgba(26, 115, 232, 0.95),
      inset 0 0 16px rgba(26, 115, 232, 0.22);
  }
}

.classroom-sim__nav-item.is-active.classroom-sim__hint-pulse,
.classroom-sim__class-link.is-active.classroom-sim__hint-pulse {
  animation: classroom-sim-hint-pulse-active 1.6s ease-in-out infinite;
}

.classroom-sim__nav-item.is-active.classroom-sim__hint-pulse::before,
.classroom-sim__class-link.is-active.classroom-sim__hint-pulse::before {
  animation: classroom-sim-hint-ring-active 1.6s ease-in-out infinite;
}

@keyframes classroom-sim-hint-pulse-active {
  0%,
  100% {
    background-color: #e8f0fe;
  }
  50% {
    background-color: #d2e3fc;
  }
}

@keyframes classroom-sim-hint-ring-active {
  0%,
  100% {
    box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.75);
  }
  50% {
    box-shadow:
      inset 0 0 0 3px rgba(26, 115, 232, 1),
      inset 0 0 18px rgba(26, 115, 232, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .classroom-sim__hint-pulse,
  .classroom-sim__hint-pulse::before,
  .classroom-sim__nav-item.is-active.classroom-sim__hint-pulse,
  .classroom-sim__class-link.is-active.classroom-sim__hint-pulse {
    animation: none;
  }

  .classroom-sim__hint-pulse {
    background-color: rgba(26, 115, 232, 0.14);
    box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.75);
  }

  .classroom-sim__hint-pulse::before {
    box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.75);
  }
}

/* “Mark as Done?” confirmation (no attachment) — Classroom-style */
.classroom-sim-mark-done-dialog {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  font-family: "Roboto", "Segoe UI", system-ui, sans-serif;
}

.classroom-sim-mark-done-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.48);
}

.classroom-sim-mark-done-dialog__panel {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  padding: 22px 24px 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.classroom-sim-mark-done-dialog__title {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #202124;
  line-height: 1.35;
}

.classroom-sim-mark-done-dialog__text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #3c4043;
}

.classroom-sim-mark-done-dialog__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.classroom-sim-mark-done-dialog__btn {
  border: none;
  background: none;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: #1a73e8;
  cursor: pointer;
  border-radius: 4px;
}

.classroom-sim-mark-done-dialog__btn:hover {
  background: rgba(26, 115, 232, 0.08);
}

.classroom-sim-mark-done-dialog__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.45);
}

.classroom-sim-mark-done-dialog__btn--strong {
  color: #1a73e8;
}

.classroom-sim__detail-status {
  margin: 0;
  font-size: 14px;
  color: #137333;
  font-weight: 500;
}

.classroom-sim__assign-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.classroom-sim__assign-icon--teal {
  background: #e0f7f5;
  color: #00796b;
}
.classroom-sim__assign-icon--gray {
  background: #f1f3f4;
  color: #5f6368;
}
.classroom-sim__assign-icon--blue {
  background: #e8f0fe;
  color: #1967d2;
}
.classroom-sim__assign-icon--purple {
  background: #f3e8fd;
  color: #8430ce;
}
.classroom-sim__assign-icon--pink {
  background: #fce8e6;
  color: #c5221f;
}

.classroom-sim__assign-ico {
  width: 22px;
  height: 22px;
}

.classroom-sim__assign-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--cs-text);
}

.classroom-sim__assign-meta {
  font-size: 13px;
  color: var(--cs-muted);
  margin-top: 4px;
}

.classroom-sim__assign-posted {
  font-size: 12px;
  color: var(--cs-muted);
  margin-top: 6px;
}

.classroom-sim__assign-due-wrap {
  margin-top: 6px;
}

.classroom-sim__due {
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-muted);
}

.classroom-sim__due--urgent {
  color: #d93025;
}

.classroom-sim__assign-empty {
  padding: 24px;
  text-align: center;
  color: var(--cs-muted);
}

.classroom-sim__view-all {
  padding: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--cs-blue);
  cursor: default;
}

.classroom-sim__done-banner {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #e6f4ea;
  border: 1px solid #ceead6;
  color: #137333;
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 720px) and (min-width: 561px) {
  .classroom-sim:not(.classroom-sim--locked-1920) {
    --cs-rail-col: clamp(168px, 22vw, 204px);
  }
}

@media (max-width: 560px) {
  .interaction-simulation-mount:not(:has(.classroom-sim--locked-1920)) {
    min-height: 380px;
  }

  .classroom-sim:not(.classroom-sim--locked-1920) .classroom-sim__shell {
    grid-template-columns: 1fr;
    min-height: clamp(380px, 58vh, 520px);
  }

  .classroom-sim:not(.classroom-sim--locked-1920) .classroom-sim__panel {
    min-height: 260px;
  }

  .classroom-sim:not(.classroom-sim--locked-1920) .classroom-sim__rail {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--cs-border);
  }

  .classroom-sim:not(.classroom-sim--locked-1920) .classroom-sim__class-links {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
  }

  .classroom-sim:not(.classroom-sim--locked-1920) .classroom-sim__todo-tabs {
    justify-content: center;
    padding: 0 12px;
  }

  .classroom-sim:not(.classroom-sim--locked-1920) .classroom-sim__detail-layout {
    grid-template-columns: 1fr;
  }
}

/* Classroom simulation builder (admin sections + lesson editor) */
.sim-builder {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.sim-builder__lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-muted);
}

.sim-builder__toolbar {
  margin-bottom: 16px;
}

.sim-builder__inherit {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(26, 115, 232, 0.08);
  border: 1px solid rgba(26, 115, 232, 0.2);
}

.sim-builder__fieldset {
  margin: 0 0 20px;
  padding: 0;
  border: none;
}

.sim-builder__legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}

.sim-builder__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.sim-builder__row {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.sim-builder__row--class {
  grid-template-columns: 1fr 1fr auto 7.2rem auto auto auto;
}

.sim-builder__class-code {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sim-builder__row--assignment {
  grid-template-columns: 1.4fr auto 1fr auto auto;
}

.sim-builder__row--step {
  grid-template-columns: auto 1.1fr 1fr 1fr 1fr 1fr auto auto;
}

.sim-builder__class-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 600;
}

.sim-builder__step-num {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.7;
  min-width: 1.2rem;
  text-align: center;
}

.sim-builder__remove {
  min-width: 36px;
  padding: 6px 10px;
  line-height: 1;
}

.sim-builder__add {
  margin-top: 4px;
}

.sim-builder__checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.sim-builder__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.sim-builder__check--inline {
  white-space: nowrap;
}

.sim-builder__goal-mode {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-form__radio-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.admin-form__radio-label input {
  margin-top: 3px;
}

.sim-builder__single-goal {
  margin-top: 8px;
}

.sim-builder__focused {
  margin-top: 8px;
}

.sim-builder-advanced summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--color-muted);
  user-select: none;
}

@media (max-width: 640px) {
  .sim-builder__row--class,
  .sim-builder__row--assignment,
  .sim-builder__row--step {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* Interaction simulation — Google homepage launcher (dark theme)              */
/* -------------------------------------------------------------------------- */
.google-sim {
  --gs-bg: #202124;
  --gs-surface: #303134;
  --gs-border: #3c4043;
  --gs-text: #e8eaed;
  --gs-muted: #9aa0a6;
  --gs-link: #bdc1c6;
  position: relative;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  color: var(--gs-text);
  background: var(--gs-bg);
  overflow: hidden;
  box-sizing: border-box;
}

.google-sim--locked-1920 {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  border-radius: 18px;
  border: 1px solid var(--gs-border);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.25);
}

.google-sim--embed {
  min-height: min(72vh, 640px);
  border-radius: 14px;
}

.google-sim__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  flex-shrink: 0;
}

.google-sim__nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.google-sim__link {
  color: var(--gs-link);
  font-size: 13px;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.google-sim__link:hover {
  text-decoration: underline;
}

.google-sim__waffle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gs-link);
  cursor: pointer;
}

.google-sim__waffle:hover,
.google-sim__waffle.is-active {
  background: rgba(232, 234, 237, 0.08);
}

.google-sim__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #8ab4f8;
  color: #202124;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.google-sim__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 48px;
  min-height: 0;
}

.google-sim__checklist {
  width: min(100%, 720px);
  margin-bottom: 20px;
}

.google-sim__checklist .classroom-sim__goal {
  background: rgba(48, 49, 52, 0.92);
  border-color: var(--gs-border);
  color: var(--gs-text);
}

.google-sim__logo {
  margin: 0 0 28px;
  font-family: "Poppins", "Roboto", Arial, sans-serif;
  font-size: clamp(56px, 9vw, 92px);
  font-weight: 500;
  letter-spacing: -3px;
  line-height: 1;
}

.google-sim__logo-g { color: #4285f4; }
.google-sim__logo-o1 { color: #ea4335; }
.google-sim__logo-o2 { color: #fbbc05; }
.google-sim__logo-g2 { color: #4285f4; }
.google-sim__logo-l { color: #34a853; }
.google-sim__logo-e { color: #ea4335; }

.google-sim__search-wrap {
  width: min(100%, 584px);
}

.google-sim__search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--gs-surface);
  border: 1px solid transparent;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.google-sim__search-ico {
  width: 20px;
  height: 20px;
  color: var(--gs-muted);
  flex-shrink: 0;
}

.google-sim__search-input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: var(--gs-text);
  font-size: 16px;
  outline: none;
  min-width: 0;
}

.google-sim__search-input::placeholder {
  color: var(--gs-muted);
}

.google-sim__search-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gs-muted);
}

.google-sim__search-tools svg {
  width: 22px;
  height: 22px;
}

.google-sim__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.google-sim__btn {
  border: 0;
  border-radius: 4px;
  background: var(--gs-surface);
  color: var(--gs-text);
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
}

.google-sim__btn:hover {
  background: #3c4043;
  border: 1px solid var(--gs-border);
  padding: 9px 15px;
}

.google-sim__footer {
  flex-shrink: 0;
  background: #171717;
  border-top: 1px solid var(--gs-border);
  color: var(--gs-muted);
  font-size: 14px;
}

.google-sim__footer-row {
  padding: 12px 24px;
}

.google-sim__footer-row--top {
  border-bottom: 1px solid var(--gs-border);
}

.google-sim__footer-row--bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.google-sim__footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.google-sim__footer-links a {
  color: var(--gs-muted);
  text-decoration: none;
}

.google-sim__footer-links a:hover {
  text-decoration: underline;
}

.google-sim__footer-center {
  text-align: center;
  color: var(--gs-text);
  font-size: 13px;
}

.google-sim__apps-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.15);
  cursor: default;
  z-index: 20;
}

.google-sim__apps-panel {
  position: absolute;
  top: 56px;
  right: 16px;
  width: min(calc(100% - 32px), 360px);
  max-height: calc(100% - 72px);
  overflow: auto;
  padding: 18px 16px 20px;
  border-radius: 28px;
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  z-index: 30;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.google-sim__apps-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.google-sim__apps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 6px;
}

.google-sim__apps-title {
  font-size: 15px;
  color: var(--gs-text);
}

.google-sim__apps-edit {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gs-muted);
}

.google-sim__apps-edit svg {
  width: 18px;
  height: 18px;
}

.google-sim__apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 4px;
}

.google-sim__app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--gs-text);
  cursor: pointer;
  min-width: 0;
}

.google-sim__app:hover {
  background: rgba(232, 234, 237, 0.08);
}

.google-sim__app--target:hover {
  background: rgba(15, 157, 88, 0.18);
}

.google-sim__hint-pulse {
  animation: classroom-sim-hint-pulse 1.4s ease-in-out infinite;
}

.sim-coach {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  overflow: visible;
}

.sim-coach__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sim-coach__rect {
  fill: none;
  stroke: #1a73e8;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 7px rgba(26, 115, 232, 0.45));
}

.sim-coach__cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  transform-origin: 3px 3px;
  will-change: transform;
}

.sim-coach__dot {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1a73e8;
  box-shadow:
    0 0 0 5px rgba(26, 115, 232, 0.2),
    0 0 14px rgba(26, 115, 232, 0.55);
}

.sim-coach__pointer {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  fill: #1a73e8;
  stroke: #fff;
  stroke-width: 1.15;
  filter: drop-shadow(0 2px 4px rgba(26, 115, 232, 0.35));
}

@media (prefers-reduced-motion: reduce) {
  .sim-coach__rect {
    stroke-dashoffset: 0;
  }
}

.classroom-sim--preview .classroom-sim__class-card--static {
  cursor: default;
  pointer-events: none;
}

.classroom-sim--preview .classroom-sim__hamburger {
  opacity: 0.45;
}

.classroom-sim__main--preview {
  padding-top: 8px;
}

.sim-builder__row--google-step {
  grid-template-columns: auto 1fr 1fr auto;
}

.sim-builder__row--bookmark,
.sim-builder__row--browser-page {
  grid-template-columns: 1fr 1fr auto;
  margin-bottom: 8px;
}

.sim-builder__row--browser-page {
  grid-template-columns: 1fr 1fr 1.4fr;
}

.sim-builder--browser .sim-builder__nested .sim-builder {
  padding: 4px 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.sim-builder--browser .sim-builder__nested .sim-builder__lead {
  display: none;
}

.sim-builder__step-static-label {
  font-size: 13px;
  color: var(--color-muted, #5f6368);
  align-self: center;
}

.google-sim__app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--app-bg, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.14s ease;
}

/* Multi-color glyphs render full-size and carry their own color */
.google-sim__app-icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.google-sim__app:hover .google-sim__app-icon {
  transform: scale(1.06);
}

.google-sim__app-letter {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.google-sim__app-label {
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  color: var(--gs-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .google-sim__footer-row--bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .google-sim__footer-center {
    text-align: left;
  }

  .google-sim__nav--left {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Settings — passkeys & security keys                                         */
/* -------------------------------------------------------------------------- */
.bambu-settings .settings-grid {
  max-width: 720px;
}

.settings-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.settings-banner--staff {
  background: rgba(26, 115, 232, 0.12);
  border: 1px solid rgba(26, 115, 232, 0.28);
  color: #e8eaed;
}

.settings-banner--required {
  background: rgba(234, 67, 53, 0.12);
  border: 1px solid rgba(234, 67, 53, 0.35);
  color: #fce8e6;
}

.settings-passkeys__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-passkeys__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.settings-passkeys__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--color-muted, #9aa0a6);
}

.settings-passkey-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-passkey-empty {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  color: var(--color-muted, #9aa0a6);
}

.settings-passkey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-passkey-item__name {
  display: block;
  font-weight: 600;
  font-size: 14px;
}

.settings-passkey-item__meta {
  display: block;
  font-size: 12px;
  color: var(--color-muted, #9aa0a6);
  margin-top: 2px;
}

.settings-passkey-item__locked {
  font-size: 12px;
  color: var(--color-muted, #9aa0a6);
  white-space: nowrap;
}

.settings-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
}

.settings-btn--primary {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
}

.settings-btn--primary:hover {
  background: #1765cc;
}

.settings-btn--ghost {
  padding: 6px 12px;
  font-size: 13px;
}

.settings-status {
  margin: 12px 0 0;
  font-size: 13px;
  min-height: 1.2em;
}

.settings-status[data-tone="error"] {
  color: #f28b82;
}

.settings-status[data-tone="success"] {
  color: #81c995;
}

.bambu-tab--compact {
  width: 40px;
  min-width: 40px;
  padding: 8px;
  justify-content: center;
}

.passkey-required-open {
  overflow: hidden;
}

.passkey-required-dialog {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.passkey-required-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.passkey-required-dialog__panel {
  position: relative;
  width: min(100%, 440px);
  padding: 24px;
  border-radius: 18px;
  background: #303134;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  color: #e8eaed;
}

.passkey-required-dialog__title {
  margin: 0 0 12px;
  font-size: 20px;
}

.passkey-required-dialog__lead,
.passkey-required-dialog__text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #bdc1c6;
}

.passkey-required-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.passkey-required-dialog__btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: transparent;
  color: #e8eaed;
  font-size: 14px;
  padding: 12px 18px;
  cursor: pointer;
}

.passkey-required-dialog__btn--primary {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
  font-weight: 600;
}

.login-link-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-link-btn:hover {
  color: #1557b0;
}

.login-staff-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #e8f0fe;
  border: 1px solid #c6dafc;
  color: #174ea6;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #5f6368;
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dadce0;
}

.login-button--passkey {
  width: 100%;
  margin-top: 0;
  background: #fff;
  border: 1px solid #dadce0;
  color: #1a73e8;
  font-size: 16px;
  font-weight: 500;
}

.login-button--passkey:hover {
  background: #f1f3f4;
  transform: none;
  box-shadow: none;
}

.login-input--totp {
  letter-spacing: 0.35em;
  font-size: 22px;
  font-weight: 600;
}

.login-step-label {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f6368;
}

.login-mfa-lead {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.45;
  color: #3c4043;
  max-width: 360px;
}

.login-button--mfa {
  width: 100%;
  margin-bottom: 10px;
}

.login-button--ghost {
  width: 100%;
  background: transparent;
  border: 1px solid #dadce0;
  color: #1a73e8;
}

.login-button--ghost:hover {
  background: #f1f3f4;
}

.passkey-required-dialog__text--muted {
  font-size: 13px;
  opacity: 0.85;
}

.settings-modal__input--totp {
  letter-spacing: 0.35em;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.settings-totp-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.settings-totp-qr {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.settings-modal__text--secret code {
  word-break: break-all;
  font-size: 13px;
}

.settings-modal-open {
  overflow: hidden;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.settings-modal[hidden] {
  display: none;
}

.settings-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.settings-modal__panel {
  position: relative;
  width: min(100%, 420px);
  padding: 24px;
  border-radius: 18px;
  background: #303134;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  color: #e8eaed;
}

.settings-modal__step {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa0a6;
}

.settings-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
}

.settings-modal__text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #bdc1c6;
}

.settings-modal__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.settings-modal__input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #e8eaed;
  font-size: 15px;
}

.settings-modal__input:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 1px;
}

.settings-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-modal__wait {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(26, 115, 232, 0.12);
  border: 1px solid rgba(26, 115, 232, 0.28);
  font-size: 14px;
  text-align: center;
}

/* -------------------------------------------------------------------------- */
/* Interaction simulation — practice browser chrome                            */
/* -------------------------------------------------------------------------- */
.browser-sim {
  --bs-chrome: #dee1e6;
  --bs-toolbar: #f1f3f4;
  --bs-bar: #e8eaed;
  --bs-text: #202124;
  --bs-muted: #5f6368;
  --bs-line: #dadce0;
  --bs-star: #5f6368;
  --bs-star-on: #f9ab00;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  background: var(--bs-chrome);
  color: var(--bs-text);
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

.browser-sim--embed {
  border-radius: 0;
}

.browser-sim__chrome {
  flex-shrink: 0;
  background: var(--bs-chrome);
}

.browser-sim__titlebar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px 0;
}

.browser-sim__traffic {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 10px;
}

.browser-sim__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c4c7c5;
}

.browser-sim__dot--close { background: #ff5f57; }
.browser-sim__dot--min { background: #febc2e; }
.browser-sim__dot--max { background: #28c840; }

.browser-sim__tabs {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  flex: 1 1 auto;
  gap: 2px;
}

.browser-sim__tab {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px 8px 0 0;
  background: var(--bs-toolbar);
  font-size: 12px;
  font-weight: 500;
}

.browser-sim__tab-favicon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #1a73e8;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.browser-sim__tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-sim__tab-new {
  width: 28px;
  height: 28px;
  margin: 0 0 2px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-muted);
  font-size: 18px;
  line-height: 1;
}

.browser-sim__toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bs-toolbar);
}

.browser-sim__nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: var(--bs-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.browser-sim__nav-btn[aria-disabled="true"] {
  opacity: 0.38;
}

.browser-sim__nav-btn svg {
  width: 18px;
  height: 18px;
}

.browser-sim__omnibox {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
  border-radius: 17px;
  background: #fff;
  border: 1px solid var(--bs-line);
}

.browser-sim__lock,
.browser-sim__star svg {
  width: 16px;
  height: 16px;
  display: block;
}

.browser-sim__lock {
  color: var(--bs-muted);
  flex-shrink: 0;
}

.browser-sim__url {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--bs-text);
}

.browser-sim__star {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--bs-star);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.browser-sim__star:hover,
.browser-sim__star:focus-visible {
  background: rgba(32, 33, 36, 0.08);
}

.browser-sim__star.is-saved {
  color: var(--bs-star-on);
}

.browser-sim__bookmarks {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 2px 10px 6px;
  background: var(--bs-toolbar);
  border-bottom: 1px solid var(--bs-line);
  overflow-x: auto;
}

.browser-sim__bookmarks-empty {
  font-size: 12px;
  color: var(--bs-muted);
  padding: 4px 2px;
}

.browser-sim__bookmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  height: 26px;
  padding: 0 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--bs-text);
  font-size: 12px;
  cursor: pointer;
}

.browser-sim__bookmark:hover,
.browser-sim__bookmark.is-current {
  background: rgba(32, 33, 36, 0.08);
}

.browser-sim__bookmark-icon {
  width: 12px;
  height: 12px;
  color: var(--bs-muted);
  flex-shrink: 0;
}

.browser-sim__bookmark-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.browser-sim__bookmark-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-sim__page {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.browser-sim__page-mount {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  aspect-ratio: unset;
}

.browser-sim__page-mount.interaction-simulation-mount,
.browser-sim__page-mount.interaction-simulation-mount--embed {
  min-height: 0;
  background: transparent;
  aspect-ratio: unset;
}

.browser-sim__page .classroom-sim,
.browser-sim__page .classroom-sim--embed-lesson,
.browser-sim__page .classroom-sim--workspace,
.browser-sim__page .google-sim,
.browser-sim__page .google-sim--embed,
.browser-sim__page .google-sim--workspace {
  border-radius: 0;
  border: none;
  box-shadow: none;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
}

.browser-sim__inner-checklist-sink {
  display: none;
}

@media (max-width: 720px) {
  .browser-sim__traffic,
  .browser-sim__tab-new {
    display: none;
  }

  .browser-sim__tab {
    max-width: none;
    flex: 1 1 auto;
  }
}

/* ===========================================================================
   NESTED SIMULATIONS
   A stack of simulations, each mounted inside the previous one's nest host.
   Layout is pure DOM containment + flexbox — there is no z-index stacking.

   ⚠️  NEW SIMULATIONS: add your root class to the generic child reset below so
       you fill a parent layer correctly at any depth. See the contract at the
       top of static/js/simulation-registry.js.
   =========================================================================== */

.sim-nest {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  width: 100%;
}

.sim-nest__sinks {
  display: none !important;
}

/* --- Generic child-fills-parent reset -------------------------------------
   Any simulation root that lands inside a nest host loses its own framing and
   stretches, so only the OUTERMOST layer draws a window. Replaces the old
   per-pair list that only knew about browser→classroom and browser→google. */
.browser-sim__page-mount > .classroom-sim,
.browser-sim__page-mount > .google-sim,
.browser-sim__page-mount > .browser-sim,
.google-sim__app-mount > .classroom-sim,
.google-sim__app-mount > .google-sim,
.google-sim__app-mount > .browser-sim {
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin: 0;
  min-height: 0;
  height: 100%;
  width: 100%;
  flex: 1 1 auto;
  max-width: none;
  aspect-ratio: unset;
}

/* --- Google homepage acting as a nest host --------------------------------- */
.google-sim--app-host {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  width: 100%;
  background: #fff;
}

.google-sim__app-mount {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  aspect-ratio: unset;
}

.google-sim__app-mount.interaction-simulation-mount,
.google-sim__app-mount.interaction-simulation-mount--embed {
  min-height: 0;
  background: transparent;
  aspect-ratio: unset;
}

/* --- Merged cross-layer checklist ------------------------------------------
   Inherits .classroom-sim__progress styling; adds the layer chip that tells a
   learner which app a step happens in when several are on screen at once. */
.sim-nest__step-layer {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
  opacity: 0.85;
}

.sim-nest__progress .classroom-sim__progress-copy .sim-nest__step-layer {
  margin-left: 0;
  margin-top: 4px;
}

.sim-nest__step.is-done .sim-nest__step-layer {
  opacity: 0.55;
}

/* The active step's layer chip is the main wayfinding cue — keep it legible. */
.sim-nest__step.is-active .sim-nest__step-layer {
  opacity: 1;
  background: rgba(255, 255, 255, 0.22);
}

@media (prefers-contrast: more) {
  .sim-nest__step-layer {
    opacity: 1;
    border-color: currentColor;
  }
}
