:root {
  --violet: #0f5c48;
  --primary-hover: #0a4436;
  --tenant-primary-soft: #e3f2ec;
  --primary-soft: var(--tenant-primary-soft);
  --lime: #2d9b73;
  --background-light: #f4eee2;
  --surface-light: #fffaf2;
  --text-light: #18324b;
  --background-dark: #101915;
  --surface-dark: #17231e;
  --text-dark: #edf5f1;
  --line-light: #d9e1dc;
  --light-cta: #17324d;
  --light-cta-hover: #0f263b;
  --light-accent-warm: #e5b34a;
  --light-accent-coral: #e9785b;
  --light-accent-aqua: #6fa7a6;
  --light-accent-teal: #2f7c72;
  --surface-soft-light: #f7efe1;
  --surface-mint-light: #e7f0ec;
  --surface-peach-light: #fbe8df;
  --puzzle-light-1: #233f63;
  --puzzle-light-2: #e9785b;
  --puzzle-light-3: #6fa7a6;
  --puzzle-light-4: #e5b34a;
  --course-puzzle-art-light: url("/academy-assets/assets/course-nav-puzzle-light.png");
  --good: #238b68;
  --warn: #c58a32;
  --danger: #c85d62;
  --paper: var(--background-light);
  --card: var(--surface-light);
  --ink: var(--text-light);
  --muted: #68736e;
  --line: var(--line-light);
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: var(--background-dark);
  --card: var(--surface-dark);
  --ink: var(--text-dark);
  --muted: #9aa9a1;
  --line: color-mix(in srgb, var(--lime) 18%, #38433e);
  --primary-soft: color-mix(in srgb, var(--violet) 24%, var(--surface-dark));
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
:where(button, a, input, textarea, select, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--lime) 78%, white);
  outline-offset: 3px;
}
html {
  background: var(--paper);
  max-width: 100%;
}
body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
textarea {
  font: inherit;
}
.loading,
.access-error {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}
.loading-mark,
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}
.loading p,
.access-error p {
  color: var(--muted);
}
.access-error h1 {
  font-size: clamp(36px, 7vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  margin: 0;
}
.access-error a,
.access-error button {
  color: white;
  background: var(--violet);
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.shell {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
}
.topbar {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 270px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand,
.learner,
.progress-head {
  display: flex;
  align-items: center;
}
.brand {
  gap: 12px;
}
.brand strong,
.program strong {
  display: block;
}
.brand small,
.program small,
.learner small {
  color: var(--muted);
  font-size: 11px;
}
.program {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.program small {
  font-weight: 800;
  letter-spacing: 0.13em;
}
.progress-head {
  gap: 14px;
}
.progress-head strong {
  font-size: 18px;
  color: var(--violet);
}
.learner {
  gap: 9px;
}
.learner-profile {
  position: relative;
}
.profile-trigger {
  padding: 4px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.profile-trigger:hover,
.profile-trigger[aria-expanded="true"] {
  background: color-mix(in srgb, var(--light-accent-aqua) 14%, transparent);
}
.profile-trigger:focus-visible {
  outline: 3px solid var(--light-accent-aqua);
  outline-offset: 2px;
}
.profile-trigger .avatar {
  width: 42px;
  height: 42px;
  background: var(--card);
  font-size: 12px;
}
.profile-trigger-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  max-width: 145px;
}
.profile-trigger-copy b,
.profile-trigger-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-trigger > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.profile-popover[hidden],
.profile-password-form[hidden] {
  display: none !important;
}
.profile-popover {
  position: absolute;
  z-index: 120;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(12, 31, 44, .22);
}
.profile-popover header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 11px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.profile-popover header > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.profile-popover header small,
.profile-popover dt,
.profile-password-form > small {
  color: var(--muted);
  font-size: 10px;
}
.profile-popover header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-popover header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft-light);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.profile-popover-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--light-cta);
  color: white;
  font-weight: 900;
}
.profile-popover dl {
  display: grid;
  gap: 10px;
  margin: 15px 0;
}
.profile-popover dl div {
  display: grid;
  gap: 3px;
}
.profile-popover dt,
.profile-popover dd {
  margin: 0;
}
.profile-popover dd {
  overflow-wrap: anywhere;
  font-weight: 750;
}
.profile-password-toggle {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.profile-password-toggle svg {
  width: 18px;
  height: 18px;
}
.profile-password-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.profile-password-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.profile-password-form input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--background-light);
  color: var(--ink);
  font: inherit;
}
.profile-password-form button[type="submit"] {
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--light-cta);
  color: white;
  font-weight: 900;
  cursor: pointer;
}
.profile-password-status {
  min-height: 18px;
  margin: 0;
  color: var(--success);
  font-size: 11px;
  line-height: 1.4;
}
.profile-adaptive-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 9px 0;
}
.profile-adaptive-actions button {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft-light);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.profile-adaptive-actions p { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--success); font-size: 10px; }

body.learning-profile-open { overflow: hidden; }
.learning-profile-dialog {
  position: fixed;
  z-index: 430;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
.learning-profile-backdrop { position: absolute; inset: 0; background: rgba(7, 25, 35, .68); backdrop-filter: blur(9px); }
.learning-profile-shell {
  position: relative;
  width: min(760px, 100%);
  max-height: min(880px, calc(100dvh - 48px));
  overflow: auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 28px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(4, 18, 27, .35);
}
.learning-profile-shell header { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.learning-profile-shell header h2 { max-width: 620px; margin: 7px 0 0; color: var(--navy); font-size: clamp(27px, 4vw, 44px); line-height: 1.02; }
.learning-profile-shell header button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 25px; cursor: pointer; }
.learning-profile-intro { max-width: 670px; margin: 16px 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.learning-profile-shell form { display: grid; gap: 16px; }
.learning-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.learning-profile-shell label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 850; }
.learning-profile-shell input,
.learning-profile-shell select,
.learning-profile-shell textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--background-light); color: var(--ink); font: inherit; font-weight: 500; }
.learning-profile-shell textarea { min-height: 86px; resize: vertical; line-height: 1.45; }
.learning-profile-other[hidden] { display: none; }
.learning-profile-shell aside { display: flex; gap: 10px; padding: 13px 15px; border-radius: 14px; background: var(--surface-soft-light); color: var(--muted); font-size: 11px; line-height: 1.45; }
.learning-profile-shell aside svg { width: 19px; min-width: 19px; color: var(--success); }
.learning-profile-status { min-height: 18px; margin: 0; color: var(--success); font-size: 12px; font-weight: 750; }
.learning-profile-shell footer { display: flex; justify-content: flex-end; gap: 10px; }
.learning-profile-shell footer button { min-height: 46px; padding: 0 19px; border-radius: 13px; font: inherit; font-weight: 900; cursor: pointer; }
.learning-profile-later { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.learning-profile-save { border: 0; background: var(--light-cta); color: white; }
.learning-profile-shell button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 640px) {
  .learning-profile-dialog { align-items: end; padding: 0; }
  .learning-profile-shell { max-height: calc(100dvh - 18px); padding: 25px 20px max(24px, env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; }
  .learning-profile-grid { grid-template-columns: 1fr; }
  .learning-profile-shell footer { position: sticky; bottom: -24px; margin: 0 -20px -24px; padding: 14px 20px max(16px, env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -12px 28px color-mix(in srgb, var(--card) 82%, transparent); }
  .learning-profile-shell footer button { flex: 1; padding-inline: 10px; }
}
.avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}
.learner div {
  display: flex;
  flex-direction: column;
}
.workspace {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 340px;
  min-height: calc(100vh - 76px);
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  background: color-mix(in srgb, var(--card) 48%, transparent);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 900;
  color: var(--muted);
}
.sidebar h2 {
  font-size: 25px;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 8px 0 22px;
}
.puzzles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.puzzle {
  position: relative;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: 0.18s;
}
.puzzle:hover,
.puzzle.active {
  transform: translateY(-2px);
  border-color: var(--violet);
  box-shadow: 0 9px 26px rgba(98, 85, 231, 0.12);
}
.puzzle.complete {
  background: var(--ink);
  color: #fff;
}
.puzzle b {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.puzzle small {
  display: block;
  font-size: 9px;
  opacity: 0.65;
  margin-top: 4px;
}
.puzzle .count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 9px;
  opacity: 0.65;
}
.puzzle-status {
  display: block;
  margin-top: 7px;
  color: var(--violet);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.25;
}
.puzzle.complete .puzzle-status { color: color-mix(in srgb, var(--lime) 70%, white); }
.puzzle.locked .puzzle-status { color: var(--muted); }
html[data-theme="dark"] .sidebar .puzzle.complete {
  border-color: color-mix(in srgb, var(--good) 50%, var(--line));
  background: color-mix(in srgb, var(--good) 24%, var(--surface-dark));
  color: var(--text-dark);
}
html[data-theme="dark"] .sidebar .puzzle.complete b,
html[data-theme="dark"] .sidebar .puzzle.complete small,
html[data-theme="dark"] .sidebar .puzzle.complete .count {
  color: var(--text-dark);
  opacity: 1;
}
html[data-theme="dark"] .sidebar .puzzle.complete .puzzle-status {
  color: color-mix(in srgb, var(--good) 42%, white);
}
.purchase {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.purchase strong {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}
.purchase p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.main {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 42px clamp(28px, 5vw, 70px);
}
.crumbs {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.crumbs button {
  border: 0;
  background: none;
  color: var(--violet);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
.mission-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 34px;
}
.mission-meta span {
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 900;
}
.tag {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(98, 85, 231, 0.1);
  color: var(--violet);
}
.main h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.058em;
  margin: 14px 0;
}
.objective {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}
.activity {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(24, 32, 43, 0.05);
}
.intro {
  padding: 27px 29px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
}
.symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.intro p {
  font-size: 17px;
  line-height: 1.62;
  margin: 0;
}
.points {
  list-style: none;
  padding: 0 28px 27px;
  margin: 0;
  display: grid;
  gap: 8px;
}
.points li {
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--paper);
  font-size: 13px;
}
.points li:before {
  content: "+";
  color: var(--violet);
  font-weight: 900;
  margin-right: 10px;
}
.examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.example {
  padding: 22px;
  background: var(--card);
  min-height: 115px;
}
.example b {
  display: block;
  margin-bottom: 6px;
}
.example p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.answer {
  padding: 22px 28px;
  border-top: 1px solid var(--line);
}
.answer label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 9px;
}
.answer textarea,
.tutor-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 14px;
  resize: vertical;
  outline: none;
  line-height: 1.55;
}
.answer textarea:focus,
.tutor-form textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(98, 85, 231, 0.12);
}
.answer small {
  display: block;
  text-align: right;
  color: var(--muted);
  margin-top: 6px;
}
.feedback {
  margin-top: 14px;
  padding: 14px 17px;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.5;
}
.feedback.pass {
  color: var(--good);
  background: rgba(23, 132, 91, 0.08);
  border: 1px solid rgba(23, 132, 91, 0.35);
}
.feedback.partial {
  color: var(--warn);
  background: rgba(168, 102, 19, 0.08);
  border: 1px solid rgba(168, 102, 19, 0.35);
}
.feedback.retry {
  color: #9b2f2f;
  background: #fff1f1;
  border: 1px solid #e88989;
}
.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.primary {
  min-width: 205px;
  display: flex;
  justify-content: space-between;
  border: 0;
  border-radius: 12px;
  padding: 14px 17px;
  background: var(--violet);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.primary:disabled {
  opacity: 0.5;
}
.steps {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.steps b {
  font-size: 10px;
  margin-right: auto;
}
.step {
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  font-size: 9px;
  cursor: pointer;
}
.step.active {
  border-color: var(--violet);
  color: var(--violet);
  box-shadow: 0 0 0 3px rgba(98, 85, 231, 0.1);
}
.step.complete {
  background: var(--good);
  border-color: var(--good);
  color: white;
}
.tutor {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--card);
}
.tutor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.tutor-head .brand-mark {
  width: 36px;
  height: 36px;
}
.tutor-head strong {
  display: block;
}
.tutor-head small {
  color: var(--good);
  font-size: 9px;
}
.context {
  padding: 7px 14px 8px;
  background: rgba(98, 85, 231, 0.05);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}
.context .eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 8px;
}
.context b {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.topic-overview {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--card) 88%, var(--primary-soft));
  overflow: hidden;
}
.topic-overview summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 9px 11px;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}
.topic-overview summary::-webkit-details-marker { display: none; }
.topic-overview summary span,
.topic-overview summary small,
.topic-overview summary b { display: block; min-width: 0; }
.topic-overview summary small { color: var(--violet); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.topic-overview summary b { margin-top: 3px; overflow: hidden; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.topic-overview summary > em { color: var(--violet); font-size: 10px; font-style: normal; font-weight: 900; }
.topic-overview summary > i { color: var(--muted); font-size: 13px; font-style: normal; transition: transform .18s ease; }
.topic-overview[open] summary > i { transform: rotate(180deg); }
.topic-overview summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--violet) 30%, transparent); outline-offset: -3px; }
.topic-overview-list {
  max-height: min(42vh, 390px);
  padding: 5px 8px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
}
.topic-overview-list ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.topic-overview-list li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 7px;
  padding: 7px 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
}
.topic-overview-list li.current {
  border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 72%, var(--card));
  color: var(--ink);
}
.topic-overview-list li.completed { color: color-mix(in srgb, var(--good) 76%, var(--ink)); }
.topic-overview-list li.upcoming { color: var(--ink); }
.topic-overview-marker {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: inherit;
  font-size: 7px;
  font-weight: 900;
}
.topic-overview-list li.current .topic-overview-marker { border-color: var(--violet); background: var(--violet); color: white; }
.topic-overview-list li.completed .topic-overview-marker { border-color: var(--good); background: var(--good); color: white; }
.topic-overview-list small,
.topic-overview-list b,
.topic-overview-list p,
.topic-overview-list em { display: block; min-width: 0; }
.topic-overview-list small { color: inherit; font-size: 7px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.topic-overview-list b { margin-top: 2px; font-size: 10px; line-height: 1.25; }
.topic-overview-list p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.topic-overview-list em { margin-top: 4px; color: var(--muted); font-size: 7px; font-style: normal; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.topic-overview-list li.current em { color: var(--violet); }
.topic-overview-list li.completed em { color: var(--good); }
.topic-overview-position { margin: 8px 3px 0; color: var(--muted); font-size: 8px; font-weight: 850; text-align: center; }
.topic-overview-mobile { display: none; }
.chat {
  padding: 18px 15px;
  overflow: auto;
}
.tutor-workspace {
  background: color-mix(in srgb, var(--paper) 72%, var(--card));
}
.tutor-presence {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 8px;
  min-height: 188px;
  margin: 7px 14px 0;
}
.tutor-presence-controls {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.tutor-presence.classic-mode {
  grid-template-columns: 1fr;
  min-height: 0;
}
.tutor-presence.classic-mode .tutor-presence-controls {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
}
.tutor-presence.classic-mode .tutor-presence-status { align-self: stretch; }
.tutor-presence.classic-mode .tutor-voice-settings { grid-column: 1 / -1; }
.tutor-view-switch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.tutor-view-switch button {
  min-height: 23px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}
.tutor-view-switch button.active {
  background: var(--primary-soft);
  color: var(--violet);
}
.tutor-presence-status {
  display: flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}
.tutor-presence-status span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.tutor-presence-status span::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent);
}
.tutor-presence-status[data-state="SUCCESS"] span::before { background: var(--good); }
.tutor-presence-status[data-state="RETRY"] span::before { background: var(--warn); }
.tutor-presence-status[data-state="REDIRECT"] span::before { background: var(--ink); }
.tutor-avatar-shell {
  position: relative;
  min-width: 0;
  min-height: 188px;
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--violet) 20%, var(--line));
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--primary-soft) 86%, white) 0, transparent 58%),
    linear-gradient(155deg, var(--card), color-mix(in srgb, var(--paper) 82%, var(--primary-soft)));
  isolation: isolate;
}
.tutor-avatar-shell::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--violet) 10%, transparent);
  border-radius: 14px;
}
.tutor-avatar-stage {
  position: absolute;
  inset: 0;
}
.tutor-avatar-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .28s ease;
}
.tutor-avatar-stage.ready .tutor-avatar-canvas {
  opacity: 1;
}
.tutor-avatar-placeholder {
  position: absolute;
  left: 50%;
  top: 45%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  transform: translate(-50%, -50%);
  animation: avatarLoading 1.1s ease-in-out infinite alternate;
}
.tutor-avatar-stage.ready .tutor-avatar-placeholder {
  display: none;
}
.tutor-avatar-stage.fallback .tutor-avatar-placeholder {
  width: 104px;
  height: 104px;
  border: 1px solid color-mix(in srgb, white 24%, transparent);
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 38% 42%, var(--lime) 0 4px, transparent 5px),
    radial-gradient(circle at 62% 42%, var(--lime) 0 4px, transparent 5px),
    linear-gradient(145deg, color-mix(in srgb, var(--ink) 88%, var(--violet)), var(--ink));
  box-shadow:
    0 18px 45px color-mix(in srgb, var(--ink) 24%, transparent),
    0 0 36px color-mix(in srgb, var(--lime) 18%, transparent);
  color: transparent;
  animation: none;
}
@keyframes avatarLoading {
  to { opacity: .58; transform: translate(-50%, -50%) scale(.92); }
}
.tutor-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin: 6px 14px 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.tutor-voice-settings {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.tutor-voice-settings > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}
.voice-setting {
  min-width: 0;
  min-height: 22px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.voice-setting span,
.voice-setting b {
  display: inline;
  font-size: 6px;
  line-height: 1.35;
  text-transform: uppercase;
}
.voice-setting b {
  float: right;
  margin-left: 3px;
  color: var(--ink);
  font-size: 9px;
}
.voice-setting[aria-pressed="true"] {
  border-color: var(--violet);
  background: var(--primary-soft);
}
.voice-setting[aria-pressed="true"] b { color: var(--violet); }
.voice-setting:disabled { opacity: .45; cursor: not-allowed; }
.tutor-voice-settings > label {
  display: grid;
  gap: 2px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}
.tutor-voice-settings select {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 7px;
  text-transform: none;
}
.tutor-voice-settings > small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}
.tutor-mode-switch.solo {
  grid-template-columns: 1fr;
}
.tutor-mode-switch button {
  min-height: 27px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.tutor-mode-switch button.active {
  background: var(--ink);
  color: white;
}
html[data-theme="dark"] .tutor-mode-switch button.active {
  border: 1px solid color-mix(in srgb, var(--lime) 38%, var(--line));
  background: color-mix(in srgb, var(--violet) 32%, var(--card));
  color: var(--ink);
  box-shadow: inset 0 1px color-mix(in srgb, white 7%, transparent);
}
.tutor-panel {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 0;
  padding: 7px 14px 14px;
  overflow: visible;
}
.workspace-form,
.tutor-question,
.tutor-response {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.workspace-form label,
.tutor-question > span,
.tutor-response > span {
  display: block;
  margin-bottom: 5px;
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}
.workspace-form textarea {
  width: 100%;
  min-height: 52px;
  max-height: 118px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  resize: none;
  outline: none;
  font: inherit;
  font-size: 12px;
  line-height: 1.55;
}
.workspace-form textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent);
}
.workspace-form button,
.reflection-open {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--violet);
  color: white;
  font-weight: 850;
  cursor: pointer;
}
.workspace-form .input-assist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}
.workspace-form .microphone-button,
.speak-button {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 26px;
  margin: 0;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--violet);
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}
.workspace-form .microphone-button[aria-pressed="true"] {
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent);
}
.workspace-form .microphone-button:disabled,
.speak-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.microphone-status {
  flex: 1;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}
.speak-button {
  margin-top: 10px;
}
.workspace-form button:disabled {
  opacity: .48;
  cursor: wait;
}
.tutor-response,
.tutor-question {
  margin-top: 0;
}
.tutor-response p,
.tutor-question p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.tutor-question p {
  font-size: 12px;
  font-weight: 720;
}
.tutor-response p.empty {
  color: var(--muted);
  font-style: italic;
}
.tutor-response small,
.last-answer {
  display: block;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.feedback-card.sufficient {
  border-color: color-mix(in srgb, var(--good) 45%, var(--line));
  background: color-mix(in srgb, var(--good) 6%, var(--card));
}
.feedback-card.partial,
.feedback-card.relevant {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
}
.tutor-system-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.5;
}
.tutor-system-status.pending {
  background: var(--primary-soft);
  color: var(--violet);
  animation: tutorPulse 1s infinite alternate;
}
.tutor-system-status.error {
  border: 1px solid #e88989;
  background: #fff1f1;
  color: #8c2828;
}
.tutor-history {
  margin-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}
.tutor-history summary {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.tutor-history > div {
  margin-top: 8px;
  overflow: visible;
}
.collapsible-copy:not(.expanded) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.collapsible-copy.expanded {
  display: block;
  max-height: min(34vh, 260px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 8px;
}
.collapsible-copy.expanded::-webkit-scrollbar { width: 7px; }
.collapsible-copy.expanded::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 52%, transparent);
}
.response-expand {
  display: inline-flex;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--violet);
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}
.tutor-check-confirmation {
  margin: 8px 0;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--success) 58%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  color: var(--success);
  font-size: 12px;
  font-weight: 850;
}

.artifact-external-current {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.artifact-external-current h3 { margin: 5px 0 14px; }
.message {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.message span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}
.message.user span {
  background: var(--violet);
}
.message p {
  margin: 0;
  padding: 11px 12px;
  border-radius: 4px 12px 12px;
  background: var(--paper);
  font-size: 11px;
  line-height: 1.55;
}
.tutor-form {
  padding: 14px;
  border-top: 1px solid var(--line);
}
.tutor-form div {
  position: relative;
}
.tutor-form textarea {
  padding-right: 45px;
  resize: none;
  font-size: 11px;
}
.tutor-form button {
  position: absolute;
  right: 7px;
  bottom: 8px;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 9px;
  background: var(--violet);
  color: #fff;
  cursor: pointer;
}
.certificate {
  width: 100%;
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid var(--good);
  border-radius: 14px;
  background: rgba(23, 132, 91, 0.08);
  color: var(--good);
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}
.certificate-name-onboarding {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(55px, 9vw, 110px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
  gap: clamp(35px, 7vw, 90px);
  align-items: center;
}
.certificate-name-onboarding h1,
.program-overview-main h1 {
  margin: 12px 0 20px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: .98;
  letter-spacing: -.055em;
}
.certificate-name-onboarding > section p,
.program-overview-main > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.certificate-name-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 22px 60px color-mix(in srgb, var(--ink) 10%, transparent);
}
.certificate-name-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.certificate-name-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.certificate-name-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-transform: none;
}
.certificate-name-preview {
  margin: 22px 0;
  padding: 20px;
  border-left: 4px solid var(--violet);
  border-radius: 0 14px 14px 0;
  background: var(--primary-soft);
}
.certificate-name-preview span,
.certificate-name-preview strong { display: block; }
.certificate-name-preview span { color: var(--muted); font-size: 11px; }
.certificate-name-preview strong { margin-top: 7px; font-size: 24px; }
.certificate-name-card > button,
.puzzle-completion .primary,
.program-completion .primary {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--violet);
  color: white;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.program-overview-main {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}
.program-puzzle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}
.program-puzzle-grid .puzzle { min-height: 180px; }
.puzzle-completion,
.program-completion {
  max-width: 820px;
  margin-top: 28px;
  padding: 26px;
  border: 1px solid color-mix(in srgb, var(--good) 48%, var(--line));
  border-radius: 20px;
  background: color-mix(in srgb, var(--good) 8%, var(--card));
}
.puzzle-completion h3,
.program-completion h3 { margin: 8px 0; font-size: 25px; }
.puzzle-completion p,
.program-completion p { color: var(--muted); line-height: 1.55; }
.puzzle-completion .access-note { color: var(--warn); font-weight: 800; }
.full-course-access { margin-top: 18px; padding: 20px; border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--warn) 7%, var(--card)); }
.purchase-full-course { margin-top: 4px; }
.purchase-full-course:disabled { cursor: wait; opacity: .72; }
.purchase-next-note { margin: 10px 0 0; font-size: 12px; }
.purchase-error { min-height: 20px; margin: 8px 0 0; color: var(--bad) !important; font-weight: 750; }
.program-completion {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
}
.program-completion img { width: 150px; height: 150px; object-fit: contain; border-radius: 20px; }
.certificate-view-shell {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
  display: grid;
  place-items: center;
  background: var(--paper);
}
.credential-view { width: min(1180px, 100%); }
.official-certificate {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 297 / 210;
  min-height: 0;
  overflow: hidden;
  padding: clamp(25px, 4.4vw, 54px) clamp(28px, 5.2vw, 64px) clamp(22px, 3.7vw, 46px);
  border: 1px solid #d9dedb;
  border-radius: 12px;
  background: #fbf8f0;
  color: #17324d;
  box-shadow: 0 30px 90px rgba(23, 50, 77, .16), inset 10px 0 #17324d, inset -10px 0 #2f7c72;
  text-align: center;
}
.credential-brand { display: flex; justify-content: space-between; gap: 28px; text-align: left; }
[dir="rtl"] .credential-brand { text-align: right; }
.credential-brand div strong, .credential-brand div small { display: block; }
.credential-brand div strong { font-size: clamp(10px, 1.35vw, 16px); }
.credential-brand div small { margin-top: 4px; color: #68747e; font-size: clamp(6px, .76vw, 9px); }
.credential-brand > span { color: #2f7c72; font-size: clamp(6px, .78vw, 9px); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.credential-award { margin: clamp(9px, 1.55vw, 19px) auto 0; }
.credential-award > span, .credential-proof > strong { display: block; color: #2f7c72; font-size: clamp(6px, .7vw, 9px); font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.credential-award h1 { margin: 3px 0 2px; font-size: clamp(25px, 3.8vw, 46px); letter-spacing: -.045em; line-height: .95; }
.credential-award small { color: #68747e; font-size: clamp(6px, .78vw, 9px); }
.credential-award h2 { margin: 2px auto; max-width: 84%; font-size: clamp(18px, 2.65vw, 32px); line-height: 1.05; overflow-wrap: anywhere; }
.credential-award > i { display: block; width: 50%; height: 1px; margin: 5px auto 4px; background: #6fa7a6; }
.credential-award h3 { margin: 2px 0 3px; font-size: clamp(8px, 1.15vw, 14px); letter-spacing: .04em; }
.credential-level { display: block; color: #2f7c72; font-size: clamp(6px, .7vw, 9px); letter-spacing: .04em; }
.credential-proof { margin-top: clamp(8px, 1.2vw, 14px); }
.credential-proof > p { margin: 0 auto 9px; color: #68747e; font-size: clamp(7px, .82vw, 10.5px); }
.credential-puzzles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 68%; margin: 0 auto 8px; }
.credential-puzzle { display: grid; grid-template-columns: 9px auto 1fr; align-items: center; gap: 4px; min-width: 0; padding: 5px 7px; border-radius: 6px; background: #fffdf8; font-size: clamp(6px, .66vw, 8.5px); text-align: left; }
[dir="rtl"] .credential-puzzle { text-align: right; }
.credential-puzzle i { width: 7px; height: 7px; border-radius: 2px; }
.credential-puzzle.navy i, .credential-competency-detail.navy b { background: #17324d; }
.credential-puzzle.coral i, .credential-competency-detail.coral b { background: #e9785b; }
.credential-puzzle.aqua i, .credential-competency-detail.aqua b { background: #6fa7a6; }
.credential-puzzle.gold i, .credential-competency-detail.gold b { background: #e5b34a; }
.credential-competency-detail.teal b { background: #2f7c72; }
.credential-puzzle b { font-size: inherit; }
.credential-puzzle em { min-width: 0; overflow: hidden; font-size: inherit; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.credential-proof ul { display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); grid-template-columns: 1fr 1fr; gap: 6px 28px; margin: 9px 0 0; padding: 0; list-style: none; text-align: left; }
[dir="rtl"] .credential-proof ul { text-align: right; }
.credential-competency-detail { display: grid; grid-template-columns: 23px 1fr; align-items: start; gap: 8px; min-width: 0; color: #17324d; font-size: clamp(7px, .82vw, 10.5px); line-height: 1.25; }
.credential-competency-detail b { display: grid; place-items: center; width: 23px; height: 20px; border-radius: 5px; color: white; font-size: clamp(5px, .58vw, 7.5px); }
.credential-competency-detail.gold b { color: #17324d; }
.credential-competency-detail span { min-width: 0; }
.certificate-signatures { display: flex; justify-content: flex-end; align-items: end; gap: 14px; margin-top: 7px; font-size: 7px; }
.certificate-signatures span { min-width: 160px; padding-top: 7px; border-top: 1px solid #d9dedb; }
.certificate-signatures b,
.certificate-signatures small { display: block; }
.certificate-signatures small { margin-top: 3px; color: #68747e; }
.credential-metadata { position: absolute; inset-inline: clamp(28px, 5.2vw, 64px); bottom: clamp(24px, 3.2vw, 40px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 0; padding-top: 8px; border-top: 1px solid #d9dedb; text-align: left; }
[dir="rtl"] .credential-metadata { text-align: right; }
.credential-metadata span { min-width: 0; padding: 0 9px; border-inline-start: 1px solid #d9dedb; }
.credential-metadata span:nth-child(4n + 1) { border-inline-start: 0; }
.credential-metadata small, .credential-metadata b { display: block; overflow-wrap: anywhere; }
.credential-metadata small { color: #68747e; font-size: clamp(5px, .54vw, 6.5px); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.credential-metadata b { margin-top: 3px; font-size: clamp(5.5px, .63vw, 7.5px); }
.credential-verify { display: block; margin-top: 7px; color: #2f7c72; font-size: 7px; font-weight: 850; text-decoration: none; }
.credential-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.credential-actions a, .credential-actions button { padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 12px; font-weight: 850; text-decoration: none; cursor: pointer; }
.credential-actions a { border-color: var(--light-primary, #17324d); background: var(--light-primary, #17324d); color: white; }
.hidden {
  display: none !important;
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  .tutor {
    display: none;
  }
  .topbar {
    grid-template-columns: 235px 1fr auto;
  }
  .sidebar {
    padding-inline: 17px;
  }
}
@media (max-width: 760px) {
  .desktop-course-navigation { display: none; }
  .topbar {
    height: 66px;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 0 12px;
  }
  .topbar .brand small { display: none; }
  .topbar .progress-head { min-width: 0; gap: 0; }
  .program,
  .progress-head > span,
  .progress-head > strong,
  .progress-head .learner {
    display: none;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .sidebar h2,
  .purchase {
    display: none;
  }
  .puzzles {
    grid-template-columns: repeat(4, 1fr);
  }
  .puzzle {
    min-height: 72px;
    padding: 10px;
  }
  .puzzle b {
    font-size: 9px;
    margin-top: 16px;
  }
  .puzzle small,
  .puzzle .count {
    display: none;
  }
  .main {
    padding: 28px 18px 80px;
  }
  .main h1 {
    font-size: 40px;
  }
  .intro {
    padding: 22px 19px;
    grid-template-columns: 35px 1fr;
    gap: 12px;
  }
  .symbol {
    width: 35px;
    height: 35px;
  }
  .intro p {
    font-size: 15px;
  }
  .examples {
    grid-template-columns: 1fr;
  }
  .actions .primary {
    width: 100%;
  }
  .certificate-name-onboarding { display: block; padding-block: 38px; }
  .certificate-name-card { margin-top: 28px; }
  .program-puzzle-grid { grid-template-columns: 1fr 1fr; }
  .program-completion { display: block; }
  .program-completion img { margin-bottom: 18px; }
  .certificate-view-shell { padding: 14px; }
  .official-certificate { padding: 24px 28px 20px; }
}

/* First-run orientation: an editorial learning welcome, not another dashboard. */
.academy-orientation-shell { min-height: 100vh; background: radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--light-accent-aqua) 18%, transparent), transparent 30%), var(--paper); color: var(--ink); }
.orientation-topbar { min-height: 86px; padding: 16px clamp(22px,4vw,64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, transparent); position: sticky; top: 0; z-index: 10; }
.orientation-top-actions { display: flex; align-items: center; gap: 12px; }
.orientation-top-actions > .language-switcher { display: none; }
.orientation-top-actions > button { display: none; border: 0; background: transparent; color: var(--muted); font-weight: 800; }
.academy-orientation { width: min(1220px, calc(100% - 40px)); margin: auto; padding: 70px 0 90px; }
.orientation-hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 58px; min-height: 610px; }
.orientation-hero h1 { font-size: clamp(48px,6vw,82px); line-height: .96; letter-spacing: -.055em; margin: 18px 0 24px; max-width: 760px; }
.orientation-hero p { font-size: clamp(18px,2vw,24px); line-height: 1.5; color: var(--muted); max-width: 680px; }
.orientation-hero figure { margin: 0; text-align: center; }
.orientation-hero figure img { width: 100%; height: auto; max-height: 560px; object-fit: contain; filter: drop-shadow(0 28px 28px rgba(23,50,77,.18)); }
.orientation-hero figcaption { color: var(--muted); font-weight: 800; }
.orientation-issuer { display: flex; align-items: center; gap: 13px; margin: 28px 0; }
.orientation-issuer > svg { width: 28px; height: 28px; color: var(--light-accent-teal); }
.orientation-issuer span { display: grid; gap: 2px; }
.orientation-issuer small { color: var(--muted); }
.orientation-start, .orientation-workbook > a { display: inline-flex; align-items: center; justify-content: center; gap: 22px; border: 0; border-radius: 14px; background: var(--light-cta); color: white; font: inherit; font-weight: 900; text-decoration: none; padding: 17px 24px; box-shadow: 7px 7px 0 var(--light-accent-warm); cursor: pointer; }
.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading h2, .orientation-workbook h2 { font-size: clamp(32px,4vw,52px); line-height: 1.05; letter-spacing: -.04em; margin: 10px 0 14px; }
.section-heading p { color: var(--muted); font-size: 18px; }
.orientation-puzzles, .orientation-expect { padding: 85px 0; }
.orientation-puzzles > div:last-child, .orientation-expect-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.orientation-puzzles article, .orientation-expect-grid article { position: relative; min-height: 260px; border: 1px solid var(--line); border-radius: 24px; padding: 28px; background: var(--card); box-shadow: 0 16px 38px rgba(23,50,77,.08); }
.orientation-puzzles article { border-top: 10px solid var(--puzzle-light-1); }
.orientation-puzzles article:nth-child(2) { border-top-color: var(--puzzle-light-2); }.orientation-puzzles article:nth-child(3) { border-top-color: var(--puzzle-light-3); }.orientation-puzzles article:nth-child(4) { border-top-color: var(--puzzle-light-4); }
.orientation-puzzles article > span { font-weight: 900; color: var(--muted); }.orientation-puzzles h3, .orientation-expect h3 { font-size: 24px; margin: 30px 0 10px; }.orientation-puzzles p, .orientation-expect p { color: var(--muted); line-height: 1.6; }
.orientation-expect-grid article > svg { color: var(--light-accent-teal); width: 30px; height: 30px; }
.orientation-expect-grid .your-turn-card { border: 2px solid var(--light-accent-warm); background: color-mix(in srgb, var(--card) 90%, var(--light-accent-warm)); }
.orientation-experience-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.orientation-experience-list li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--card) 88%, var(--puzzle-light-aqua)); color: var(--muted); font-size: .78rem; font-weight: 800; }
.orientation-experience-list svg { width: 14px; height: 14px; color: var(--light-accent-teal); }
.your-turn-card > span { display: block; margin-top: 22px; padding: 12px; border-radius: 10px; background: var(--light-cta); color: white; font-weight: 900; }
.orientation-workbook { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 38px; border-radius: 28px; background: var(--light-cta); color: white; }
.orientation-workbook p, .orientation-workbook small { color: rgba(255,255,255,.78); }.orientation-workbook h2 { margin: 8px 0 10px; }.orientation-workbook > a { background: white; color: var(--light-cta); box-shadow: 6px 6px 0 var(--light-accent-warm); }.workbook-icon { width: 74px; height: 74px; border-radius: 20px; display: grid; place-items: center; background: var(--light-accent-warm); color: var(--light-cta); }.workbook-icon svg { width: 34px; height: 34px; }
.orientation-final { padding-top: 90px; text-align: center; }.orientation-final p { font-size: 20px; color: var(--muted); margin-bottom: 28px; }
.workbook-companion-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid color-mix(in srgb, var(--lime) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 82%, var(--primary-soft));
  color: var(--ink);
  font: inherit;
  font-size: .78rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.workbook-companion-button:hover { border-color: var(--lime); background: color-mix(in srgb, var(--primary-soft) 72%, var(--card)); }
.workbook-companion-button svg { width: 16px; height: 16px; color: var(--lime); }
.awaiting-learner-input .your-turn-callout { display: grid; gap: 3px; padding: 13px 14px; border-left: 4px solid var(--light-accent-warm); background: color-mix(in srgb, var(--card) 85%, var(--light-accent-warm)); }
.awaiting-learner-input .workspace-form { border: 2px solid var(--light-accent-warm); box-shadow: 0 0 0 5px color-mix(in srgb, var(--light-accent-warm) 16%, transparent); animation: your-turn-pulse 1.5s ease-out 1; }
.awaiting-learner-input .workspace-form textarea { min-height: 118px; font-size: 16px; line-height: 1.45; }
@keyframes your-turn-pulse { 0%,100% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--light-accent-warm) 16%, transparent); } 45% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--light-accent-warm) 25%, transparent); } }
.tutorial-your-turn { display: grid; gap: 14px; width: min(360px,100%); }.tutorial-your-turn > span { display: flex; gap: 10px; align-items: center; font-size: 20px; }.tutorial-your-turn > div { min-height: 90px; border: 2px solid var(--light-accent-warm); border-radius: 16px; padding: 16px; color: var(--muted); background: var(--card); }.tutorial-your-turn > strong { justify-self: end; padding: 11px 16px; border-radius: 10px; background: var(--light-cta); color: white; }
html[data-theme="dark"] .academy-orientation-shell { background: radial-gradient(circle at 82% 8%, rgba(45,155,115,.14), transparent 30%), var(--background-dark); } html[data-theme="dark"] .academy-orientation-shell .orientation-topbar { background: color-mix(in srgb, var(--surface-dark) 94%, transparent); }
html[data-theme="dark"] .orientation-start, html[data-theme="dark"] .orientation-workbook { background: var(--primary); }.orientation-workbook > a { background: var(--card); }
@media (max-width: 980px) { .orientation-hero { grid-template-columns: 1fr; padding-top: 30px; }.orientation-hero figure { order: -1; }.orientation-hero figure img { max-height: 360px; }.orientation-puzzles > div:last-child, .orientation-expect-grid { grid-template-columns: repeat(2,1fr); }.orientation-workbook { grid-template-columns: auto 1fr; }.orientation-workbook > a { grid-column: 1/-1; } }
@media (max-width: 620px) { .academy-orientation { width: min(100% - 28px,1220px); padding-top: 34px; }.orientation-topbar { padding: 12px 14px; }.orientation-top-actions > button { display: none; }.orientation-hero { min-height: 0; gap: 20px; }.orientation-hero h1 { font-size: 44px; }.orientation-puzzles, .orientation-expect { padding: 58px 0; }.orientation-puzzles > div:last-child, .orientation-expect-grid { grid-template-columns: 1fr; }.orientation-puzzles article, .orientation-expect-grid article { min-height: 0; }.orientation-workbook { grid-template-columns: 1fr; padding: 26px; }.orientation-workbook > a { grid-column: auto; }.awaiting-learner-input .workspace-form { position: sticky; bottom: 10px; z-index: 3; } }

@media (max-width: 620px) {
  .certificate-view-shell { align-items: start; }
  .credential-view { width: 100%; }
  .official-certificate { aspect-ratio: auto; padding: 30px 25px; box-shadow: 0 18px 55px rgba(23, 50, 77, .15), inset 7px 0 #17324d, inset -7px 0 #2f7c72; }
  .credential-brand { align-items: start; }
  .credential-brand > span { max-width: 46%; text-align: right; }
  [dir="rtl"] .credential-brand > span { text-align: left; }
  .credential-award { margin-top: 30px; }
  .credential-award h1 { font-size: 38px; }
  .credential-award h2 { max-width: 100%; font-size: 28px; }
  .credential-proof > p { font-size: 10px; line-height: 1.4; }
  .credential-puzzles { grid-template-columns: 1fr 1fr; width: 100%; }
  .credential-puzzle { font-size: 8px; }
  .credential-proof ul { grid-auto-flow: row; grid-template: none; gap: 8px; }
  .credential-competency-detail { font-size: 10px; }
  .credential-competency-detail b { font-size: 7px; }
  .credential-metadata { grid-template-columns: 1fr 1fr; gap: 12px 0; }
  .credential-metadata { position: static; margin-top: 18px; }
  .credential-metadata span:nth-child(odd) { border-inline-start: 0; }
  .credential-metadata small { font-size: 7px; }
  .credential-metadata b { font-size: 8px; }
  .credential-actions { justify-content: stretch; }
  .credential-actions a, .credential-actions button { width: 100%; text-align: center; }
}

/* Governance responsibility layer and post-certificate progression */
.governance-shell { min-height: 100vh; background: var(--paper); color: var(--ink); }
.governance-page, .next-journey { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.governance-page { padding: 48px 0 80px; }
.governance-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 40px; align-items: center; padding: 42px; border: 1px solid var(--line); border-radius: 32px; background: var(--card); box-shadow: 0 24px 70px rgba(23, 50, 77, .08); }
.governance-hero h1 { max-width: 780px; margin: 8px 0 14px; font-size: clamp(2.6rem, 5vw, 5.6rem); line-height: .96; letter-spacing: -.055em; }
.governance-hero p { max-width: 700px; color: var(--muted); font-size: 1.2rem; line-height: 1.55; }
.governance-puzzle { padding: 18px; border-radius: 24px; background: var(--surface-soft-light); }
.governance-cap { padding: 18px; border-radius: 16px 16px 8px 8px; background: var(--light-cta); color: white; font-weight: 900; text-align: center; }
.governance-four { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.governance-four span { min-height: 92px; display: grid; place-items: center; padding: 14px; border-radius: 14px; background: var(--surface-light); border: 1px solid var(--line); font-weight: 850; }
.governance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; align-items: start; }
.governance-card, .guest-faculty-slot { border: 1px solid var(--line); border-radius: 24px; background: var(--card); padding: 26px; }
.governance-card.complete { border-color: var(--good); box-shadow: inset 0 4px 0 var(--good); }
.governance-card h2 { margin: 8px 0 12px; font-size: 1.45rem; }
.governance-card > p, .guest-faculty-slot p { color: var(--muted); line-height: 1.55; }
.governance-card form { display: grid; gap: 13px; margin-top: 20px; }
.governance-card label { display: grid; gap: 6px; font-size: .8rem; font-weight: 800; }
.governance-card textarea, .governance-card select, .hub-application-form textarea, .hub-application-form input, .hub-application-form select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); padding: 12px; font: inherit; }
.governance-card textarea { min-height: 90px; resize: vertical; }
.governance-card button, .continuation-action button, .hub-application-form button { border: 0; border-radius: 12px; padding: 13px 16px; background: var(--light-cta); color: white; font-weight: 900; cursor: pointer; }
.governance-card fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; }
.governance-check { display: flex !important; align-items: center; gap: 7px !important; }
.legal-version { display: grid; gap: 4px; padding: 13px; border-left: 4px solid var(--warn); border-radius: 10px; background: var(--surface-soft-light); }
.guest-faculty-slot { margin-top: 24px; border-style: dashed; }
.governance-tutor { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; margin-top: 24px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface-mint-light); }
.governance-tutor h2 { margin: 7px 0; }
.governance-tutor p { color: var(--muted); line-height: 1.5; }
.governance-tutor form { display: grid; gap: 10px; }
.governance-tutor textarea { min-height: 96px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink); padding: 13px; font: inherit; resize: vertical; }
.governance-tutor button { border: 0; border-radius: 12px; padding: 13px 16px; background: var(--light-cta); color: white; font-weight: 900; }
.governance-tutor-reply { grid-column: 1 / -1; padding: 16px; border-radius: 14px; background: var(--card); line-height: 1.55; white-space: pre-wrap; }
.guest-faculty-slot > div { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.faculty-placeholder { width: 76px; aspect-ratio: 1; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--light-cta); color: white; font-weight: 900; }
.guest-faculty-slot h2, .guest-faculty-slot p { margin: 2px 0; }
.guest-faculty-slot small { display: block; margin-top: 5px; color: var(--muted); }
.governance-feedback { position: sticky; top: 12px; z-index: 4; margin: 16px auto; padding: 12px 18px; border-radius: 999px; background: var(--good); color: white; text-align: center; }
.governance-certificate-note { text-align: center; margin-top: 28px; font-weight: 800; }
.next-journey { margin-top: 40px; padding: 42px; border: 1px solid var(--line); border-radius: 30px; background: var(--card); }
.next-journey-head { max-width: 850px; }
.next-journey-head h2 { margin: 8px 0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.04em; }
.next-journey-head p, .next-journey-head small { color: var(--muted); line-height: 1.55; }
.next-path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.next-path-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.next-path-card h3 { min-height: 76px; margin: 14px 0 8px; font-size: 1.35rem; }
.next-path-card h4 { margin: 0 0 10px; color: var(--primary); }
.next-path-card p, .next-path-card li, .next-path-card small { color: var(--muted); line-height: 1.5; }
.path-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--light-cta); color: white; font-weight: 900; }
.path-state { position: absolute; top: 24px; right: 24px; font-size: .65rem; font-weight: 900; letter-spacing: .08em; }
.continuation-action { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; }
.continuation-action label, .hub-consent { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.continuation-action input, .hub-consent input { margin-top: 3px; flex: 0 0 auto; }
.continuation-status { color: var(--good) !important; font-weight: 700; }
.hub-requirement { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface-soft-light); }
.hub-requirement > strong { color: var(--warn); font-size: .72rem; letter-spacing: .1em; }
.hub-requirement a { color: var(--primary); font-weight: 900; }
.hub-application-form { display: grid; gap: 12px; }
.hub-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hub-application-form label { display: grid; gap: 5px; font-size: .75rem; font-weight: 800; }
.hub-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.hub-areas legend { padding: 0 5px; font-size: .72rem; font-weight: 900; }
.hub-areas label { display: flex; align-items: center; gap: 6px; }
.hub-application-status { display: grid; gap: 7px; padding: 18px; border-radius: 14px; background: var(--surface-mint-light); }
.next-journey-footnote { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: .85rem; }
html[data-theme="dark"] .governance-shell, html[data-theme="dark"] .governance-page { background: var(--background-dark); }
html[data-theme="dark"] .governance-hero, html[data-theme="dark"] .governance-card, html[data-theme="dark"] .guest-faculty-slot, html[data-theme="dark"] .next-journey { background: var(--surface-dark); }
html[data-theme="dark"] .governance-tutor { background: color-mix(in srgb, var(--surface-dark) 80%, var(--primary)); }
html[data-theme="dark"] .governance-puzzle, html[data-theme="dark"] .legal-version, html[data-theme="dark"] .hub-requirement, html[data-theme="dark"] .next-path-card { background: color-mix(in srgb, var(--surface-dark) 84%, black); }
html[data-theme="dark"] .governance-four span { background: var(--surface-dark); }

@media (max-width: 980px) {
  .governance-hero { grid-template-columns: 1fr; }
  .governance-grid, .next-path-grid, .governance-tutor { grid-template-columns: 1fr; }
  .next-path-card h3 { min-height: 0; }
}
@media (max-width: 620px) {
  .governance-page, .next-journey { width: min(100% - 20px, 1240px); }
  .governance-page { padding-top: 18px; }
  .governance-hero, .governance-card, .guest-faculty-slot, .next-journey { padding: 20px; border-radius: 20px; }
  .governance-hero h1 { font-size: 2.6rem; }
  .governance-card fieldset, .hub-form-grid, .hub-areas { grid-template-columns: 1fr; }
  .guest-faculty-slot > div { align-items: flex-start; }
}
@media (max-width: 470px) {
  .puzzles {
    grid-template-columns: 1fr 1fr;
  }
  .learner div {
    display: none;
  }
  .station-navigation button {
    min-width: 0;
    flex: 1;
  }
  .certificate-name-fields,
  .program-puzzle-grid { grid-template-columns: 1fr; }
}

/* Mission Renderer V2 */
.mission-v2 .main {
  max-width: 1040px;
  min-width: 0;
}
.mission-v2 .workspace,
.mission-v2 .sidebar { min-width: 0; }
.mission-v2 .puzzle.locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: saturate(0.2);
}
.mission-main h1 {
  max-width: 760px;
}
.mission-journey {
  display: grid;
  grid-template-columns: repeat(9, minmax(82px, 1fr));
  gap: 0;
  margin: 30px 0 24px;
  overflow-x: auto;
  padding: 8px 2px 16px;
}
.journey-stop {
  position: relative;
  min-width: 70px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: default;
  user-select: none;
  pointer-events: none;
  font: inherit;
  text-align: center;
}
.journey-stop.clickable {
  pointer-events: auto;
  cursor: pointer;
  border-radius: 12px;
  transition: transform .18s ease, color .18s ease, background .18s ease;
}
.journey-stop.clickable:hover {
  z-index: 2;
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--good) 8%, transparent);
  color: var(--ink);
}
.journey-stop.clickable:focus-visible {
  z-index: 2;
  outline: 3px solid color-mix(in srgb, var(--good) 48%, transparent);
  outline-offset: 3px;
}
.journey-stop.completed.clickable:hover span {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--good) 14%, transparent);
}
.journey-stop::before {
  content: "";
  position: absolute;
  top: 13px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.journey-stop:first-child::before {
  display: none;
}
.journey-stop span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  font-size: 10px;
  font-weight: 900;
}
.journey-stop small {
  display: block;
  min-height: 20px;
  padding: 0 4px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: normal;
}
.journey-stop.completed::before,
.journey-stop.completed span {
  border-color: var(--good);
  background: var(--good);
  color: white;
}
.journey-stop.active span {
  border-color: var(--violet);
  background: var(--violet);
  color: white;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--violet) 12%, transparent);
}
.journey-stop.locked {
  opacity: 0.42;
}
.variant-switch {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 13px;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.variant-switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.variant-switch:disabled { opacity: .65; cursor: wait; }
.station-navigation {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.station-navigation button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 150px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}
.station-navigation .station-forward {
  border-color: var(--violet);
  background: var(--violet);
  color: white;
}
.station-navigation button:disabled {
  border-color: var(--line);
  background: color-mix(in srgb, var(--paper) 78%, var(--card));
  color: var(--muted);
  cursor: not-allowed;
  opacity: .52;
}
.desktop-course-navigation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.desktop-course-navigation button {
  display: inline-flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: .78rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.desktop-course-navigation button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--light-accent-teal) 58%, var(--line));
  box-shadow: 0 10px 24px rgba(23, 50, 77, .1);
}
.desktop-course-navigation button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.desktop-course-navigation button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.desktop-course-navigation .desktop-course-navigation-primary {
  border-color: var(--light-cta);
  background: var(--light-cta);
  color: #fff;
}
.desktop-course-navigation button:disabled {
  cursor: not-allowed;
  opacity: .42;
  transform: none;
  box-shadow: none;
}
.assessment-action {
  margin-top: 20px;
}
.step-stage {
  position: relative;
  scroll-margin-top: 94px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 20px 55px rgba(24, 32, 43, 0.07);
}
.step-stage::after {
  content: "";
  position: absolute;
  right: -110px;
  top: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--primary-soft);
  opacity: 0.8;
  pointer-events: none;
}
.step-kicker {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.step-kicker span {
  color: var(--violet);
  font-weight: 900;
}
.step-stage h2 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 14px 0 26px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.step-stage h2:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--violet) 70%, white);
  outline-offset: 7px;
  border-radius: 4px;
}
.learning-listen {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -10px 0 24px;
}
.learning-listen-button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid color-mix(in srgb, var(--violet) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--violet) 8%, var(--card));
  color: var(--violet);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.learning-listen-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--violet);
  background: color-mix(in srgb, var(--violet) 14%, var(--card));
}
.learning-listen-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--violet) 34%, transparent);
  outline-offset: 3px;
}
.learning-listen-button:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.learning-listen-hint {
  color: var(--muted);
  font-size: 11px;
}
html[data-theme="dark"] .learning-listen-button {
  border-color: color-mix(in srgb, var(--lime) 45%, var(--line));
  background: color-mix(in srgb, var(--lime) 8%, var(--card));
  color: color-mix(in srgb, var(--lime) 78%, var(--ink));
}
.learning-copy,
.question {
  position: relative;
  z-index: 1;
}
.learning-copy .lead,
.question > p {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.65;
}
.learning-copy section {
  max-width: 760px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.content-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 820px;
  margin-top: 28px;
}
.learning-copy .content-sections section {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 78%, var(--card));
}
.section-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}
.learning-copy h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.learning-video {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(210px, .75fr);
  gap: 18px;
  width: 100%;
  max-width: 820px;
  margin: 28px 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--violet) 24%, var(--line));
  border-radius: 22px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--card) 96%, transparent), color-mix(in srgb, var(--violet) 7%, var(--paper)));
  box-shadow: 0 18px 45px color-mix(in srgb, var(--ink) 8%, transparent);
}
.learning-video-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 15px;
  background: #09131f;
}
.learning-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #09131f;
}
.learning-video figcaption {
  align-self: center;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.learning-video figcaption > span {
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}
.learning-video figcaption strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}
.learning-video figcaption p,
.learning-video figcaption small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.learning-video figcaption small {
  font-size: 11px;
}
html[data-theme="dark"] .learning-video {
  border-color: color-mix(in srgb, var(--lime) 28%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--card) 97%, transparent), color-mix(in srgb, var(--lime) 7%, var(--paper)));
}
html[data-theme="dark"] .learning-video figcaption > span {
  color: color-mix(in srgb, var(--lime) 82%, var(--ink));
}
.learning-copy section p,
.example-callout p {
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 720px) {
  .learning-video {
    grid-template-columns: 1fr;
    padding: 10px;
    border-radius: 17px;
  }
  .learning-video figcaption {
    padding: 4px 5px 7px;
  }
}
.concept-sketch {
  --sketch-accent: var(--violet);
  --sketch-soft: color-mix(in srgb, var(--violet) 9%, var(--card));
  position: relative;
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--violet) 22%, var(--line));
  border-radius: 14px;
  background: linear-gradient(145deg, var(--sketch-soft), color-mix(in srgb, var(--card) 94%, transparent));
  color: var(--ink);
}
.concept-sketch figcaption {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .11em;
  line-height: 1.35;
  text-transform: uppercase;
}
.sketch-node {
  border: 1px solid color-mix(in srgb, var(--sketch-accent) 28%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--card) 92%, var(--sketch-accent));
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.sketch-hierarchy {
  display: grid;
  gap: 5px;
}
.sketch-hierarchy .sketch-node {
  width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 14px;
  overflow-wrap: anywhere;
}
.sketch-hierarchy .sketch-node:nth-child(2) { width: 88%; }
.sketch-hierarchy .sketch-node:nth-child(3) { width: 76%; }
.sketch-hierarchy .sketch-node:nth-child(4) { width: 64%; }
.sketch-hierarchy-arrow {
  display: block;
  height: 14px;
  color: var(--sketch-accent);
  font-size: 14px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}
.sketch-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}
.sketch-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 64px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--sketch-accent) 28%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--card) 92%, var(--sketch-accent));
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sketch-flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  right: -9px;
  top: 50%;
  transform: translate(50%, -50%);
  padding: 2px;
  background: var(--card);
  color: var(--sketch-accent);
  font-size: 15px;
  font-weight: 900;
}
.sketch-step-number { color: var(--sketch-accent); font-size: 11px; font-weight: 900; }
.sketch-icon { flex: 0 0 auto; width: 18px; height: 18px; color: var(--sketch-accent); stroke: currentColor; }
.sketch-return {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--sketch-accent) 8%, var(--card));
  color: var(--sketch-accent);
  font-size: 12px;
  font-weight: 800;
}
.concept-sketch-compare .sketch-structure,
.concept-sketch-decision .sketch-structure,
.concept-sketch-verification .sketch-structure,
.concept-sketch-boundary .sketch-structure {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.concept-sketch-decision .sketch-structure > div,
.concept-sketch-verification .sketch-structure > div,
.concept-sketch-boundary .sketch-structure > div {
  border-top: 3px solid var(--sketch-accent);
}
.concept-sketch-loop {
  border-style: dashed;
}
.sketch-token-source {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.sketch-token-source i { color: var(--sketch-accent); font-style: normal; }
.sketch-tokens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.sketch-tokens span {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--sketch-accent) 38%, var(--line));
  border-radius: 7px;
  background: var(--card);
  color: var(--sketch-accent);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.sketch-context > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 9px;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--sketch-accent);
  color: var(--card);
  font-size: 13px;
}
.sketch-context > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.sketch-context span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  overflow-wrap: anywhere;
}
.sketch-layers {
  display: grid;
  grid-template-columns: minmax(105px, .75fr) minmax(220px, 2fr) minmax(105px, .75fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.sketch-layers > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.sketch-layers i {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 64px;
  padding: 11px 8px;
  border: 1px solid color-mix(in srgb, var(--sketch-accent) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--sketch-accent) 7%, var(--card));
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  text-align: center;
  overflow-wrap: anywhere;
}
.sketch-layers i span { color: var(--sketch-accent); font-size: 11px; font-weight: 900; }
.sketch-layers i:nth-child(2) {
  border-color: color-mix(in srgb, var(--sketch-accent) 40%, var(--line));
  background: color-mix(in srgb, var(--sketch-accent) 11%, var(--card));
}
.sketch-layers i:nth-child(3) {
  border-color: color-mix(in srgb, var(--sketch-accent) 52%, var(--line));
  background: color-mix(in srgb, var(--sketch-accent) 15%, var(--card));
}
.sketch-endpoint {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 64px;
  padding: 10px;
  border: 1px dashed color-mix(in srgb, var(--sketch-accent) 42%, var(--line));
  border-radius: 11px;
  background: var(--card);
  text-align: center;
  overflow-wrap: anywhere;
}
.sketch-note {
  display: block;
  margin-top: 8px;
  color: var(--sketch-accent);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}
.concept-sketch-structure {
  max-width: 760px;
  margin-top: 20px;
}
.sketch-structure {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.sketch-structure > div {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: start;
  gap: 9px;
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.sketch-structure p { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.sketch-structure b,
.sketch-structure small { display: block; }
.sketch-structure b { font-size: 13px; line-height: 1.35; }
.sketch-structure small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
html[data-theme="dark"] .concept-sketch {
  --sketch-accent: color-mix(in srgb, var(--lime) 78%, var(--ink));
  --sketch-soft: color-mix(in srgb, var(--lime) 7%, var(--card));
  box-shadow: inset 0 1px color-mix(in srgb, white 5%, transparent);
}
.learning-copy blockquote {
  max-width: 760px;
  margin: 26px 0 0;
  padding: 19px 22px;
  border: 0;
  border-left: 4px solid var(--violet);
  border-radius: 0 14px 14px 0;
  background: var(--primary-soft);
  color: var(--ink);
  font-weight: 750;
  line-height: 1.55;
}
.learning-copy blockquote span {
  display: block;
  margin-bottom: 5px;
  color: var(--violet);
  font-size: 9px;
  letter-spacing: 0.13em;
}
html[data-theme="dark"] .learning-copy blockquote {
  border-left-color: var(--lime);
  background: color-mix(in srgb, var(--violet) 18%, var(--card));
  color: var(--ink);
  box-shadow: inset 0 1px color-mix(in srgb, white 7%, transparent);
}
html[data-theme="dark"] .learning-copy blockquote span {
  color: color-mix(in srgb, var(--lime) 76%, var(--ink));
}
.tutor-hint,
.exam-notice {
  max-width: 760px;
  margin: 18px 0 0;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--violet) 34%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--violet) 8%, var(--card));
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
html[data-theme="dark"] .tutor-hint,
html[data-theme="dark"] .exam-notice {
  border-color: color-mix(in srgb, var(--lime) 42%, var(--line));
  background: color-mix(in srgb, var(--lime) 10%, var(--card));
  color: var(--ink);
  box-shadow: inset 3px 0 color-mix(in srgb, var(--lime) 72%, var(--ink));
}
.comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 26px;
}
.comparison article,
.example-callout {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.comparison p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.choices {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.choices label {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
  transition: 0.18s ease;
}
.choices label:hover,
.choices label:has(input:checked) {
  border-color: var(--violet);
  background: var(--primary-soft);
  transform: translateX(3px);
}
.multiple-choice-section > span,
.understanding-heading > span {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.multiple-choice-section > p {
  max-width: 760px;
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
}
.understanding-questions {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.understanding-heading h3 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 32px);
}
.understanding-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.understanding-question {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.understanding-question label {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-weight: 800;
  line-height: 1.5;
}
.understanding-question label > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
}
.understanding-question textarea {
  width: 100%;
  min-height: 118px;
  margin-top: 13px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}
.understanding-question textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(98, 85, 231, 0.12);
}
.understanding-question small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  text-align: right;
}
.assessment-legal-notice {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.question .answer {
  max-width: 760px;
  margin-top: 22px;
  padding: 0;
  border: 0;
}
.feedback p {
  margin: 4px 0;
}
.feedback small {
  display: block;
  margin-top: 6px;
}
.context > small {
  display: block;
  margin-top: 5px;
  color: var(--violet);
}
.step-stage.tutor-required {
  border-color: color-mix(in srgb, var(--violet) 45%, var(--line));
  background: linear-gradient(145deg, var(--card), var(--primary-soft));
}
.tutor-dialogue-activity {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.tutor-dialogue-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 900;
}
.tutor-dialogue-prompt {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.tutor-dialogue-guidance {
  max-width: 640px;
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.6;
}
#inline-tutor-form {
  padding: 8px;
  border: 2px solid var(--violet);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--violet) 14%, transparent);
}
#inline-tutor-form textarea {
  width: 100%;
  min-height: 108px;
  padding: 14px;
  border: 0;
  background: transparent;
  resize: vertical;
  outline: none;
  line-height: 1.55;
}
#inline-tutor-form button {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-left: auto;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--violet);
  color: white;
  font-weight: 850;
  cursor: pointer;
}
.tutor-dialogue-activity > small {
  display: block;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
}
.step-stage.reflection-active {
  border-color: color-mix(in srgb, var(--violet) 35%, var(--line));
  box-shadow: 0 24px 70px color-mix(in srgb, var(--violet) 12%, transparent);
}
.reflection-panel {
  margin-top: 30px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid color-mix(in srgb, var(--violet) 30%, var(--line));
  border-radius: 24px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary-soft) 70%, var(--card)), var(--card));
}
.reflection-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 12px;
}
.reflection-label span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  font-weight: 900;
  letter-spacing: 0;
}
.reflection-panel h3 {
  max-width: 780px;
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
}
.reflection-panel > p,
.reflection-panel > small {
  color: var(--muted);
}
.reflection-gaps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--lime) 23%, var(--card));
}
.reflection-panel #inline-tutor-form {
  margin-top: 20px;
}
.reflection-open {
  margin: 20px 0 12px;
}
.message.pending {
  opacity: .65;
}
.message.pending p::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: tutorPulse 1s infinite alternate;
}
.message.error p {
  border: 1px solid #e88989;
  background: #fff1f1;
  color: #8c2828;
}
@keyframes tutorPulse {
  to { transform: scale(1.8); opacity: .35; }
}
.tutor-close,
.tutor-toggle {
  display: none;
}
.tutor-head .tutor-close {
  margin-left: auto;
}

@media (max-width: 1100px) {
  .mission-v2 .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .mission-v2 .tutor-toggle {
    display: block;
    margin: 18px 0 0 auto;
    border: 1px solid var(--violet);
    border-radius: 12px;
    padding: 11px 14px;
    background: var(--card);
    color: var(--violet);
    font-weight: 800;
  }
  .mission-v2 .tutor {
    display: none;
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    width: min(390px, 92vw);
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -20px 0 60px rgba(24, 32, 43, 0.2);
    overflow-y: auto;
  }
  .mission-v2 .tutor.open {
    display: flex;
    transform: translateX(0);
  }
  .mission-v2 .tutor-close {
    display: block;
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
  }
}

@media (max-width: 760px) {
  .concept-sketch { padding: 14px; }
  .sketch-flow {
    grid-template-columns: 1fr;
  }
  .sketch-flow-step:not(:last-child)::after {
    content: "↓";
    right: 50%;
    top: auto;
    bottom: -9px;
    transform: translate(50%, 50%);
  }
  .sketch-context > div { grid-template-columns: 1fr; }
  .sketch-layers { grid-template-columns: 1fr; }
  .sketch-layers > div { grid-template-columns: 1fr; }
  .sketch-structure { grid-template-columns: 1fr; }
  .sketch-hierarchy .sketch-node:nth-child(2) { width: 91%; }
  .sketch-hierarchy .sketch-node:nth-child(3) { width: 82%; }
  .sketch-hierarchy .sketch-node:nth-child(4) { width: 73%; }
  .mission-v2 .workspace {
    display: flex;
    flex-direction: column;
  }
  .mission-v2 .main {
    order: 1;
  }
  .mission-v2 .sidebar {
    order: 2;
  }
  .mission-v2 .topic-overview-sidebar { display: none; }
  .mission-v2 .topic-overview-mobile { display: block; margin: 20px 0 0; }
  .mission-v2 .topic-overview-list { max-height: min(52dvh, 420px); }
  .mission-v2 .mission-journey {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 20px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
  }
  .mission-v2 .mission-journey .journey-stop {
    flex: 0 0 82px;
  }
  .step-stage {
    padding: 24px 20px;
    border-radius: 20px;
  }
  .learning-copy .lead,
  .question > p,
  .multiple-choice-section > p {
    font-size: 16px;
  }
  .understanding-questions { margin-top: 26px; padding-top: 24px; }
  .understanding-question { padding: 15px; }
  .understanding-question label { grid-template-columns: 28px minmax(0, 1fr); }
  .comparison {
    grid-template-columns: 1fr;
  }
  .content-sections {
    grid-template-columns: 1fr;
  }
  .mission-v2 .tutor {
    width: 100vw;
    max-width: none;
  }
  .tutor-presence {
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 180px;
  }
  .tutor-avatar-shell {
    min-height: 180px;
  }
}

@media (max-height: 900px) and (min-width: 1101px) {
  .tutor-presence {
    min-height: 170px;
    margin-top: 4px;
  }
  .tutor-avatar-shell {
    min-height: 170px;
  }
  .tutor-presence-controls { gap: 3px; padding: 5px; }
  .tutor-head {
    padding-block: 5px;
  }
  .tutor-head .brand-mark { width: 30px; height: 30px; }
  .tutor-view-switch button { min-height: 20px; }
  .tutor-presence-status { min-height: 22px; }
  .voice-setting { min-height: 19px; }
  .tutor-voice-settings > label { margin-top: 1px; }
  .tutor-voice-settings select { padding-block: 1px; }
  .context { padding-block: 5px; }
  .tutor-mode-switch { margin-top: 3px; }
  .tutor-mode-switch button { min-height: 24px; }
  .tutor-panel { gap: 4px; padding: 5px 14px 8px; }
  .workspace-form,
  .tutor-question,
  .tutor-response { padding: 6px 8px; }
  .workspace-form textarea { min-height: 40px; }
  .tutor-response p,
  .tutor-question p { line-height: 1.45; }
  .speak-button { margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .tutor-avatar-placeholder,
  .tutor-avatar-canvas {
    animation: none;
    transition: none;
  }
}

/* Welcome, account access and Emerald theme */
.theme-control {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.theme-control button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.theme-control button[aria-pressed="true"] {
  background: var(--violet);
  color: white;
}
.theme-control .logout-button {
  margin-left: 2px;
  color: var(--ink);
}
.welcome-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--lime) 14%, transparent), transparent 34%),
    var(--paper);
}
.welcome-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 75%, transparent);
  backdrop-filter: blur(18px);
}
.welcome-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, .72fr) minmax(330px, .78fr);
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  width: min(1500px, 100%);
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: clamp(36px, 7vh, 90px) clamp(20px, 5vw, 72px);
}
.welcome-copy h1 {
  max-width: 720px;
  margin: 13px 0 24px;
  font-size: clamp(52px, 6.5vw, 100px);
  line-height: .9;
  letter-spacing: -.07em;
}
.welcome-copy > p {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.75;
}
.welcome-promise {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}
.welcome-promise span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 75%, transparent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
}
.welcome-visual {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(420px, 100%);
  margin: 0 auto;
}
.welcome-puzzle-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(410px, 112%);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--lime) 28%, var(--line));
  border-radius: 38%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--lime) 22%, transparent) 0, transparent 62%),
    color-mix(in srgb, var(--card) 22%, transparent);
  box-shadow:
    0 38px 90px color-mix(in srgb, var(--violet) 19%, transparent),
    inset 0 1px color-mix(in srgb, white 28%, transparent);
}
.welcome-puzzle-stage img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 24px color-mix(in srgb, var(--ink) 19%, transparent));
  animation: welcomePuzzleFloat 7.5s ease-in-out infinite;
}
.welcome-puzzle-stage .puzzle-art {
  grid-area: 1 / 1;
}
.welcome-puzzle-stage .puzzle-art-dark {
  display: none;
}
html[data-theme="dark"] .welcome-puzzle-stage .puzzle-art-light {
  display: none;
}
html[data-theme="dark"] .welcome-puzzle-stage .puzzle-art-dark {
  display: block;
}
.welcome-visual figcaption {
  position: relative;
  z-index: 1;
  width: min(410px, 112%);
  margin-top: -28px;
  padding: 18px 20px 16px;
  border: 1px solid color-mix(in srgb, var(--lime) 24%, var(--line));
  border-radius: 20px;
  background: color-mix(in srgb, var(--card) 91%, transparent);
  box-shadow: 0 22px 60px color-mix(in srgb, var(--ink) 11%, transparent);
  backdrop-filter: blur(18px);
}
.welcome-visual figcaption > span {
  color: var(--violet);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .15em;
}
.welcome-visual figcaption > strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1;
  letter-spacing: -.045em;
}
.welcome-visual figcaption ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 14px 0 0;
  padding: 13px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.welcome-visual figcaption li {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
}
.welcome-visual figcaption li b {
  display: block;
  margin-bottom: 3px;
  color: var(--violet);
  font-size: 7px;
  letter-spacing: .12em;
}
html[data-theme="dark"] .welcome-puzzle-stage {
  background:
    radial-gradient(circle, color-mix(in srgb, var(--lime) 26%, transparent) 0, transparent 62%),
    color-mix(in srgb, var(--card) 46%, transparent);
  box-shadow:
    0 38px 100px color-mix(in srgb, var(--lime) 14%, transparent),
    inset 0 1px color-mix(in srgb, white 12%, transparent);
}
html[data-theme="dark"] .welcome-puzzle-stage img {
  filter: brightness(1.04) saturate(.92) drop-shadow(0 30px 28px rgba(0, 0, 0, .34));
}
@keyframes welcomePuzzleFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.4deg); }
  50% { transform: translate3d(0, -8px, 0) rotate(.4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-puzzle-stage img { animation: none; }
}
.login-card,
.denied-card {
  padding: clamp(26px, 3vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: 0 30px 90px color-mix(in srgb, var(--ink) 10%, transparent);
}
.login-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -.045em;
}
.login-card > p,
.welcome-form > p,
.activation-note p,
.denied-card p {
  color: var(--muted);
  line-height: 1.6;
}
.welcome-form {
  display: grid;
  gap: 15px;
  margin-top: 26px;
}
.welcome-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}
.welcome-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  font: inherit;
  letter-spacing: 0;
}
.welcome-form input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 14%, transparent);
}
.welcome-form > button[type="submit"],
.denied-card > button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--violet);
  color: white;
  font-weight: 850;
  cursor: pointer;
}
.welcome-form > button[type="submit"]:hover,
.denied-card > button:hover { background: var(--primary-hover); }
.welcome-form button:disabled { opacity: .55; cursor: wait; }
.text-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--violet);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.activation-note {
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.activation-note p { margin: 5px 0 0; }
.auth-error,
.auth-notice {
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
}
.auth-error { border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line)); color: var(--danger); }
.auth-notice { border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line)); color: var(--good); }
.denied-card {
  width: min(720px, calc(100% - 40px));
  margin: clamp(80px, 14vh, 160px) auto;
  text-align: center;
}
.denied-card h1 { font-size: clamp(38px, 6vw, 72px); line-height: .98; letter-spacing: -.06em; }
.denied-card > button { display: inline-flex; margin-top: 20px; }
html[data-theme="dark"] .feedback.retry,
html[data-theme="dark"] .tutor-system-status.error,
html[data-theme="dark"] .message.error p {
  background: color-mix(in srgb, var(--danger) 12%, var(--card));
  color: #f0a2a6;
}

@media (max-width: 1180px) {
  .welcome-grid {
    grid-template-columns: minmax(0, 1fr) minmax(290px, .72fr);
    align-items: start;
  }
  .welcome-copy { align-self: center; }
  .welcome-visual { align-self: center; }
  .login-card {
    grid-column: 1 / -1;
    width: min(600px, 100%);
    margin: 0 auto;
  }
}
@media (max-width: 760px) {
  .welcome-shell { min-height: 100dvh; overflow: visible; }
  .welcome-head { min-height: 70px; }
  .welcome-grid {
    display: flex;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding-block: 22px 70px;
  }
  .login-card { order: 1; width: 100%; margin: 0; }
  .welcome-copy { order: 2; margin-top: 38px; }
  .welcome-visual { order: 3; }
  .welcome-copy h1 { font-size: clamp(48px, 16vw, 72px); }
  .welcome-copy > p { font-size: 15px; }
  .welcome-promise { margin-bottom: 28px; }
  .welcome-visual { width: min(340px, 100%); margin-bottom: 34px; }
  .welcome-puzzle-stage { width: min(300px, 88%); }
  .welcome-visual figcaption { margin-top: -24px; padding-inline: 15px; }
  .welcome-visual figcaption ol { gap: 2px; }
  .welcome-visual figcaption li { font-size: 7px; }
  .login-card { border-radius: 22px; }
  .topbar .theme-control { margin-left: auto; }

  /* Account activation is an action, not a marketing page. Keep the form
     directly below its explanation on phones; the puzzle remains available
     afterwards as supporting artwork. */
  .activation-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .activation-grid .welcome-copy { order: 1; }
  .activation-grid .login-card {
    order: 2;
    width: 100%;
    margin: 24px 0 34px;
  }
  .activation-grid .welcome-visual {
    order: 3;
    margin-bottom: 0;
  }
}

/* Light Mode: warm editorial learning atmosphere */
html:not([data-theme="dark"]) {
  --paper: var(--background-light);
  --card: var(--surface-light);
  --ink: var(--text-light);
  --muted: #5f6e76;
  --line: color-mix(in srgb, var(--light-cta) 13%, #f8f1e7);
}
html:not([data-theme="dark"]) body {
  background:
    radial-gradient(circle at 10% 4%, color-mix(in srgb, var(--light-accent-warm) 16%, transparent), transparent 30%),
    radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--light-accent-aqua) 15%, transparent), transparent 34%),
    var(--paper);
}
html:not([data-theme="dark"]) :where(button, a, input, textarea, select, summary):focus-visible {
  outline-color: color-mix(in srgb, var(--light-accent-aqua) 75%, var(--light-cta));
}
html:not([data-theme="dark"]) .brand-mark,
html:not([data-theme="dark"]) .loading-mark {
  border: 2px solid var(--light-cta);
  background: var(--light-accent-warm);
  color: var(--light-cta);
  box-shadow: 4px 5px 0 var(--light-cta);
}
html:not([data-theme="dark"]) .welcome-shell {
  background:
    radial-gradient(circle at 8% 18%, color-mix(in srgb, var(--light-accent-warm) 15%, transparent), transparent 30%),
    radial-gradient(circle at 68% 16%, color-mix(in srgb, var(--light-accent-aqua) 19%, transparent), transparent 34%),
    linear-gradient(135deg, var(--surface-soft-light), var(--paper) 52%, color-mix(in srgb, var(--surface-mint-light) 72%, white));
}
html:not([data-theme="dark"]) .welcome-head,
html:not([data-theme="dark"]) .topbar {
  border-color: color-mix(in srgb, var(--light-cta) 10%, transparent);
  background: color-mix(in srgb, var(--surface-light) 92%, transparent);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--light-cta) 5%, transparent);
}
html:not([data-theme="dark"]) .welcome-copy h1,
html:not([data-theme="dark"]) .mission-main h1,
html:not([data-theme="dark"]) .step-stage h2,
html:not([data-theme="dark"]) .login-card h2,
html:not([data-theme="dark"]) .sidebar h2 {
  color: var(--light-cta);
}
html:not([data-theme="dark"]) .eyebrow,
html:not([data-theme="dark"]) .section-eyebrow,
html:not([data-theme="dark"]) .step-kicker span,
html:not([data-theme="dark"]) .workspace-form label,
html:not([data-theme="dark"]) .tutor-question > span,
html:not([data-theme="dark"]) .tutor-response > span {
  color: var(--light-accent-teal);
}
html:not([data-theme="dark"]) .welcome-promise span {
  border-color: color-mix(in srgb, var(--light-accent-aqua) 32%, var(--line));
  background: color-mix(in srgb, #fffdf9 88%, transparent);
  color: var(--light-cta);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--light-cta) 5%, transparent);
}
html:not([data-theme="dark"]) .welcome-puzzle-stage {
  border-color: color-mix(in srgb, var(--light-accent-warm) 38%, var(--line));
  background:
    radial-gradient(circle at 30% 28%, color-mix(in srgb, var(--light-accent-coral) 20%, transparent), transparent 40%),
    radial-gradient(circle at 72% 68%, color-mix(in srgb, var(--light-accent-aqua) 22%, transparent), transparent 45%),
    color-mix(in srgb, #fffdf9 72%, transparent);
  box-shadow:
    0 34px 80px color-mix(in srgb, var(--light-accent-coral) 14%, transparent),
    inset 0 1px white;
}
html:not([data-theme="dark"]) .welcome-puzzle-stage img {
  filter: saturate(.94) drop-shadow(0 24px 22px color-mix(in srgb, var(--light-cta) 15%, transparent));
}
html:not([data-theme="dark"]) .welcome-visual figcaption {
  border-color: color-mix(in srgb, var(--light-accent-aqua) 28%, var(--line));
  background: color-mix(in srgb, #fffdf9 94%, transparent);
  box-shadow: 0 20px 54px color-mix(in srgb, var(--light-cta) 10%, transparent);
}
html:not([data-theme="dark"]) .welcome-visual figcaption > span,
html:not([data-theme="dark"]) .welcome-visual figcaption li b {
  color: var(--light-accent-teal);
}
html:not([data-theme="dark"]) .login-card,
html:not([data-theme="dark"]) .denied-card {
  border-color: color-mix(in srgb, var(--light-accent-warm) 30%, var(--line));
  background: color-mix(in srgb, #fffdf9 95%, var(--surface-soft-light));
  box-shadow: 0 30px 80px color-mix(in srgb, var(--light-cta) 11%, transparent);
}
html:not([data-theme="dark"]) .welcome-form input {
  border-color: color-mix(in srgb, var(--light-cta) 15%, var(--surface-soft-light));
  background: white;
}
html:not([data-theme="dark"]) .welcome-form > button[type="submit"],
html:not([data-theme="dark"]) .denied-card > button,
html:not([data-theme="dark"]) .station-navigation .station-forward,
html:not([data-theme="dark"]) .actions .primary,
html:not([data-theme="dark"]) .workspace-form > button[type="submit"],
html:not([data-theme="dark"]) .reflection-open,
html:not([data-theme="dark"]) #inline-tutor-form button {
  border-color: var(--light-cta);
  background: var(--light-cta);
  color: white;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--light-cta) 16%, transparent);
}
html:not([data-theme="dark"]) .welcome-form > button[type="submit"]:hover,
html:not([data-theme="dark"]) .denied-card > button:hover,
html:not([data-theme="dark"]) .station-navigation .station-forward:hover,
html:not([data-theme="dark"]) .workspace-form > button[type="submit"]:hover {
  background: var(--light-cta-hover);
}
html:not([data-theme="dark"]) .text-button,
html:not([data-theme="dark"]) .learning-listen-button,
html:not([data-theme="dark"]) .workspace-form .microphone-button,
html:not([data-theme="dark"]) .speak-button {
  color: var(--light-accent-teal);
}
html:not([data-theme="dark"]) .theme-control {
  border-color: color-mix(in srgb, var(--light-cta) 13%, transparent);
  background: #fffdf9;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--light-cta) 7%, transparent);
}
html:not([data-theme="dark"]) .theme-control button[aria-pressed="true"] {
  background: var(--light-cta);
}
html:not([data-theme="dark"]) .progress-head strong {
  color: var(--light-accent-teal);
}
html:not([data-theme="dark"]) .workspace {
  background:
    radial-gradient(circle at 68% 5%, color-mix(in srgb, var(--light-accent-warm) 12%, transparent), transparent 31%),
    radial-gradient(circle at 26% 84%, color-mix(in srgb, var(--light-accent-coral) 6%, transparent), transparent 28%),
    var(--paper);
}
html:not([data-theme="dark"]) .sidebar {
  border-color: color-mix(in srgb, var(--light-cta) 11%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-soft-light) 94%, white), color-mix(in srgb, var(--surface-light) 80%, var(--surface-mint-light)));
}
html:not([data-theme="dark"]) .puzzle {
  --puzzle-color: var(--light-accent-teal);
  --puzzle-soft: var(--surface-mint-light);
  border-color: color-mix(in srgb, var(--puzzle-color) 22%, var(--line));
  background: linear-gradient(150deg, color-mix(in srgb, var(--puzzle-soft) 78%, white), white);
  color: var(--light-cta);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--puzzle-color) 8%, transparent);
}
html:not([data-theme="dark"]) .puzzle:nth-child(1) { --puzzle-color: var(--puzzle-light-1); --puzzle-soft: var(--surface-peach-light); }
html:not([data-theme="dark"]) .puzzle:nth-child(2) { --puzzle-color: var(--puzzle-light-2); --puzzle-soft: #eaf7f6; }
html:not([data-theme="dark"]) .puzzle:nth-child(3) { --puzzle-color: var(--puzzle-light-3); --puzzle-soft: var(--surface-mint-light); }
html:not([data-theme="dark"]) .puzzle:nth-child(4) { --puzzle-color: var(--puzzle-light-4); --puzzle-soft: #fff5dc; }
html:not([data-theme="dark"]) .puzzle:hover,
html:not([data-theme="dark"]) .puzzle.active {
  border-color: var(--puzzle-color);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--puzzle-color) 17%, transparent);
}
html:not([data-theme="dark"]) .puzzle-status {
  color: color-mix(in srgb, var(--puzzle-color) 72%, var(--light-cta));
}
html:not([data-theme="dark"]) .mission-v2 .puzzle.locked {
  opacity: .7;
  filter: none;
}
html:not([data-theme="dark"]) .puzzle.complete {
  background: linear-gradient(145deg, var(--light-cta), color-mix(in srgb, var(--light-cta) 72%, var(--puzzle-color)));
  color: white;
}
html:not([data-theme="dark"]) .mission-meta .tag {
  background: color-mix(in srgb, var(--light-accent-coral) 14%, white);
  color: color-mix(in srgb, var(--light-accent-coral) 68%, var(--light-cta));
}
html:not([data-theme="dark"]) .journey-stop.active span {
  border-color: var(--light-cta);
  background: var(--light-cta);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--light-accent-aqua) 18%, transparent);
}
html:not([data-theme="dark"]) .journey-stop.completed::before,
html:not([data-theme="dark"]) .journey-stop.completed span {
  border-color: var(--light-accent-teal);
  background: var(--light-accent-teal);
}
html:not([data-theme="dark"]) .step-stage {
  border-color: color-mix(in srgb, var(--light-cta) 11%, var(--line));
  background: linear-gradient(145deg, #fffdf9, color-mix(in srgb, var(--surface-soft-light) 46%, white));
  box-shadow: 0 24px 64px color-mix(in srgb, var(--light-cta) 9%, transparent);
}
html:not([data-theme="dark"]) .step-stage::after {
  background: linear-gradient(145deg, color-mix(in srgb, var(--light-accent-aqua) 25%, white), color-mix(in srgb, var(--light-accent-warm) 22%, white));
}
html:not([data-theme="dark"]) .learning-copy .content-sections section {
  border-color: color-mix(in srgb, var(--light-cta) 10%, var(--line));
  background: color-mix(in srgb, var(--surface-soft-light) 54%, white);
}
html:not([data-theme="dark"]) .learning-copy .content-sections section:nth-child(2n) {
  background: color-mix(in srgb, var(--surface-mint-light) 68%, white);
}
html:not([data-theme="dark"]) .learning-copy .content-sections section:nth-child(3n) {
  background: color-mix(in srgb, var(--surface-peach-light) 72%, white);
}
html:not([data-theme="dark"]) .concept-sketch {
  --sketch-accent: var(--light-accent-teal);
  --sketch-soft: color-mix(in srgb, var(--light-accent-aqua) 14%, white);
  border-color: color-mix(in srgb, var(--light-accent-aqua) 34%, var(--line));
  background: linear-gradient(145deg, var(--sketch-soft), #fffdf9);
}
html:not([data-theme="dark"]) .learning-copy blockquote {
  border-color: color-mix(in srgb, var(--light-accent-warm) 42%, var(--line));
  background: color-mix(in srgb, var(--light-accent-warm) 17%, white);
  color: var(--light-cta);
  box-shadow: inset 4px 0 var(--light-accent-warm);
}
html:not([data-theme="dark"]) .tutor {
  border-color: color-mix(in srgb, var(--light-accent-aqua) 25%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-mint-light) 74%, white), color-mix(in srgb, var(--surface-soft-light) 56%, white));
}
html:not([data-theme="dark"]) .tutor-workspace {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-mint-light) 68%, white), color-mix(in srgb, var(--surface-soft-light) 58%, white));
}
html:not([data-theme="dark"]) .tutor-avatar-shell {
  border-color: color-mix(in srgb, var(--light-accent-aqua) 40%, var(--line));
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--light-accent-aqua) 24%, white) 0, transparent 58%),
    linear-gradient(155deg, #fffdf9, var(--surface-mint-light));
}
html:not([data-theme="dark"]) .tutor-view-switch,
html:not([data-theme="dark"]) .tutor-voice-settings,
html:not([data-theme="dark"]) .tutor-presence-controls,
html:not([data-theme="dark"]) .tutor-presence-status,
html:not([data-theme="dark"]) .tutor-mode-switch,
html:not([data-theme="dark"]) .workspace-form,
html:not([data-theme="dark"]) .tutor-question,
html:not([data-theme="dark"]) .tutor-response {
  border-color: color-mix(in srgb, var(--light-accent-aqua) 24%, var(--line));
  background: #fffdf9;
}
html:not([data-theme="dark"]) .context {
  border-color: color-mix(in srgb, var(--light-accent-warm) 28%, var(--line));
  background: color-mix(in srgb, var(--light-accent-warm) 13%, white);
}
html:not([data-theme="dark"]) .tutor-view-switch button.active,
html:not([data-theme="dark"]) .voice-setting[aria-pressed="true"] {
  background: color-mix(in srgb, var(--light-accent-aqua) 18%, white);
  color: var(--light-accent-teal);
}
html:not([data-theme="dark"]) .tutor-mode-switch button.active {
  background: var(--light-cta);
  color: white;
}
html:not([data-theme="dark"]) .workspace-form textarea,
html:not([data-theme="dark"]) .answer textarea,
html:not([data-theme="dark"]) .tutor-voice-settings select {
  border-color: color-mix(in srgb, var(--light-cta) 14%, var(--line));
  background: white;
}

/* Light Mode course navigation: one assembled four-part puzzle */
html:not([data-theme="dark"]) .sidebar .puzzles {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
}
html:not([data-theme="dark"]) .sidebar .puzzles::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -15%;
  background-image: var(--course-puzzle-art-light);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 16px 16px color-mix(in srgb, var(--light-cta) 18%, transparent));
  pointer-events: none;
}
html:not([data-theme="dark"]) .sidebar .puzzle {
  z-index: 1;
  min-height: 0;
  padding: 18px 14px 15px 17px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--light-cta);
  box-shadow: none;
  overflow: visible;
}
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(1) {
  grid-area: 1 / 1;
  color: white;
}
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(2) { grid-area: 2 / 1; }
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(3) { grid-area: 2 / 2; }
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(4) { grid-area: 1 / 2; }
html:not([data-theme="dark"]) .sidebar .puzzle:hover,
html:not([data-theme="dark"]) .sidebar .puzzle.active {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: none;
}
html:not([data-theme="dark"]) .sidebar .puzzle:focus-visible {
  border-radius: 14px;
  outline-color: white;
  outline-offset: -4px;
}
html:not([data-theme="dark"]) .sidebar .puzzle b {
  margin-top: 13px;
  font-size: 13px;
  line-height: 1.05;
  letter-spacing: .02em;
}
html:not([data-theme="dark"]) .sidebar .puzzle small {
  display: none;
}
html:not([data-theme="dark"]) .sidebar .puzzle .eyebrow,
html:not([data-theme="dark"]) .sidebar .puzzle-status,
html:not([data-theme="dark"]) .sidebar .puzzle .count {
  color: currentColor;
}
html:not([data-theme="dark"]) .sidebar .puzzle-status {
  width: fit-content;
  min-height: 15px;
  margin-top: 4px;
  padding: 3px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, white 76%, transparent);
  color: var(--light-cta);
  letter-spacing: .06em;
}
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(1) .puzzle-status {
  background: color-mix(in srgb, var(--light-accent-warm) 88%, white);
  color: var(--light-cta);
}
html:not([data-theme="dark"]) .sidebar .puzzle .count {
  right: 12px;
  bottom: 10px;
  font-weight: 850;
  opacity: .82;
}
html:not([data-theme="dark"]) .sidebar .puzzle.complete,
html:not([data-theme="dark"]) .sidebar .puzzle.locked {
  background: transparent;
  filter: none;
  opacity: 1;
}
html:not([data-theme="dark"]) .mission-v2 .sidebar .puzzle.locked { opacity: 1; }
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(1),
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(1).complete,
html:not([data-theme="dark"]) .sidebar .puzzle:nth-child(1).locked {
  color: white;
}
html:not([data-theme="dark"]) .sidebar .puzzle.locked > :not(.puzzle-status) {
  opacity: .58;
}
html:not([data-theme="dark"]) .sidebar .puzzle.active .puzzle-status {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--light-cta) 80%, transparent);
}

/* First-start Academy tutorial */
body.tutorial-open {
  overflow: hidden;
}
.academy-tutorial {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--ink);
}
.tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #07110d 72%, transparent);
  backdrop-filter: blur(12px);
}
.tutorial-shell {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 56px);
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 32px;
  background: var(--card);
  box-shadow: 0 32px 90px rgba(3, 14, 9, .34);
}
.tutorial-shell > header,
.tutorial-shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.tutorial-shell > header strong,
.tutorial-shell > header span,
.tutorial-copy aside span,
.tutorial-copy aside b {
  display: block;
}
.tutorial-shell > header strong {
  margin-top: 5px;
  font-size: 20px;
  letter-spacing: -.02em;
}
.tutorial-count {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.tutorial-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tutorial-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.tutorial-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 22px 0;
}
.tutorial-progress span {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}
.tutorial-progress span.done,
.tutorial-progress span.active {
  background: var(--violet);
}
.tutorial-progress span.active {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 12%, transparent);
}
.tutorial-card {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, .96fr);
  align-items: stretch;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
}
.tutorial-copy,
.tutorial-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 5vw, 54px);
}
.tutorial-copy h2 {
  max-width: 500px;
  margin: 13px 0 18px;
  font-size: clamp(36px, 4.3vw, 54px);
  line-height: .98;
  letter-spacing: -.055em;
}
.tutorial-copy > p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.tutorial-copy aside {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  align-items: start;
  margin-top: 24px;
  padding: 15px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--violet) 10%, var(--card));
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
.tutorial-copy aside svg {
  width: 28px;
  height: 28px;
  color: var(--violet);
}
.tutorial-visual {
  position: relative;
  gap: 18px;
  border-left: 1px solid var(--line);
  background: radial-gradient(circle at 70% 25%, color-mix(in srgb, var(--violet) 17%, transparent), transparent 43%), var(--card);
}
.tutorial-visual :where(article, .tutorial-tutor-visual, .tutorial-journey span) {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  box-shadow: 0 14px 35px rgba(5, 19, 13, .08);
}
.tutorial-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.tutorial-journey span {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 112px;
  padding: 12px 6px;
  border-radius: 18px;
  color: var(--muted);
  font-size: 10px;
}
.tutorial-journey span:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 37px;
  right: -9px;
  width: 10px;
  border-top: 2px solid var(--line);
}
.tutorial-journey span.done,
.tutorial-journey span.active {
  border-color: color-mix(in srgb, var(--violet) 55%, var(--line));
  color: var(--ink);
}
.tutorial-journey span.active {
  transform: translateY(-5px);
  background: color-mix(in srgb, var(--violet) 11%, var(--card));
}
.tutorial-journey svg {
  width: 24px;
  height: 24px;
  color: var(--violet);
}
.tutorial-nav-sketch {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.tutorial-nav-sketch span,
.tutorial-nav-sketch strong {
  padding: 11px 14px;
  border-radius: 999px;
  font-size: 11px;
}
.tutorial-nav-sketch span { border: 1px solid var(--line); }
.tutorial-nav-sketch strong { background: var(--violet); color: white; }
.tutorial-tutor-visual {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: 24px;
}
.tutorial-bot {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--violet) 18%, var(--card));
  color: var(--violet);
}
.tutorial-bot svg { width: 42px; height: 42px; }
.tutorial-tutor-visual div span,
.tutorial-tutor-visual div strong {
  display: block;
}
.tutorial-tutor-visual div span { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.tutorial-tutor-visual div strong { font-size: 18px; }
.tutorial-mode-panels,
.tutorial-voice-visual {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.tutorial-mode-panels article,
.tutorial-voice-visual article {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 160px;
  padding: 18px 12px;
  border-radius: 22px;
  text-align: center;
}
.tutorial-mode-panels article:first-child,
.tutorial-voice-visual article:last-child {
  border-color: color-mix(in srgb, var(--violet) 50%, var(--line));
}
.tutorial-mode-panels svg,
.tutorial-voice-visual svg {
  width: 34px;
  height: 34px;
  color: var(--violet);
}
.tutorial-mode-panels article span,
.tutorial-voice-visual article span:not(.voice-icons) {
  color: var(--muted);
  font-size: 11px;
}
.voice-icons { display: flex; gap: 8px; }
.tutorial-shell > footer {
  margin-top: 22px;
}
.tutorial-shell > footer button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.tutorial-shell > footer button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.tutorial-shell > footer .tutorial-next,
.tutorial-shell > footer .tutorial-finish {
  border-color: transparent;
  background: var(--violet);
  color: white;
}
.tutorial-help-button {
  font-weight: 900;
}
html:not([data-theme="dark"]) .tutorial-shell {
  background: #fffaf0;
  border-color: color-mix(in srgb, var(--light-cta) 13%, transparent);
  color: var(--light-cta);
}
html:not([data-theme="dark"]) .tutorial-card {
  border-color: color-mix(in srgb, var(--light-cta) 12%, transparent);
  background: #fffdf8;
}
html:not([data-theme="dark"]) .tutorial-visual {
  border-left-color: color-mix(in srgb, var(--light-cta) 12%, transparent);
  background: radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--light-accent-warm) 28%, transparent), transparent 45%), var(--surface-soft-light);
}
html:not([data-theme="dark"]) .tutorial-progress span.done,
html:not([data-theme="dark"]) .tutorial-progress span.active,
html:not([data-theme="dark"]) .tutorial-nav-sketch strong,
html:not([data-theme="dark"]) .tutorial-shell > footer .tutorial-next,
html:not([data-theme="dark"]) .tutorial-shell > footer .tutorial-finish {
  background: var(--light-cta);
}
html:not([data-theme="dark"]) .tutorial-journey span.active,
html:not([data-theme="dark"]) .tutorial-copy aside,
html:not([data-theme="dark"]) .tutorial-bot {
  background: color-mix(in srgb, var(--light-accent-warm) 19%, white);
}
html:not([data-theme="dark"]) .tutorial-journey svg,
html:not([data-theme="dark"]) .tutorial-bot,
html:not([data-theme="dark"]) .tutorial-copy aside svg,
html:not([data-theme="dark"]) .tutorial-mode-panels svg,
html:not([data-theme="dark"]) .tutorial-voice-visual svg {
  color: var(--light-accent-teal);
}
html[data-theme="dark"] .academy-tutorial .tutorial-backdrop {
  background: color-mix(in srgb, #06100c 84%, transparent);
}
html[data-theme="dark"] .tutorial-shell {
  background: #14231d;
  border-color: #2b4e40;
}
html[data-theme="dark"] .tutorial-card,
html[data-theme="dark"] .tutorial-visual {
  background: #101c17;
  border-color: #29463a;
}
html[data-theme="dark"] .tutorial-visual {
  background: radial-gradient(circle at 76% 22%, rgba(31, 173, 126, .18), transparent 45%), #101c17;
}

@media (max-width: 760px) {
  .academy-tutorial { align-items: end; padding: 0; }
  .tutorial-shell {
    width: 100%;
    max-height: 100dvh;
    padding: 20px 18px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    border-radius: 26px 26px 0 0;
  }
  .tutorial-shell > header strong { font-size: 17px; }
  .tutorial-progress { margin: 16px 0; }
  .tutorial-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .tutorial-copy,
  .tutorial-visual { padding: 24px; }
  .tutorial-copy h2 { margin-block: 10px 13px; font-size: 34px; }
  .tutorial-copy > p { font-size: 15px; line-height: 1.55; }
  .tutorial-visual { min-height: 200px; border-top: 1px solid var(--line); border-left: 0; }
  .tutorial-journey span { min-height: 80px; padding-inline: 3px; }
  .tutorial-journey span b { font-size: 8px; }
  .tutorial-shell > footer { margin-top: 16px; }
  .tutorial-shell > footer button { padding-inline: 16px; }
  .tutorial-finish { flex: 1; }
}

@media (max-width: 430px) {
  .tutorial-count { padding: 7px 10px; }
  .tutorial-shell > header .eyebrow { font-size: 8px; }
  .tutorial-mode-panels,
  .tutorial-voice-visual { gap: 7px; }
  .tutorial-mode-panels article,
  .tutorial-voice-visual article { min-height: 135px; padding-inline: 8px; }
  .tutorial-mode-panels article b,
  .tutorial-voice-visual article b { font-size: 11px; }
}

/* Program completion, certificate and personal closing call */
.completion-shell {
  min-height: 100vh;
  background: var(--paper);
}
.completion-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
}
.completion-page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 80px;
}
.completion-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  align-items: center;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--card);
  box-shadow: 0 30px 80px rgba(10, 31, 23, .1);
}
.completion-hero::after {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--lime) 13%, transparent);
  pointer-events: none;
}
.completion-hero-copy {
  position: relative;
  z-index: 1;
  padding: clamp(42px, 6vw, 76px);
}
.completion-hero h1 {
  max-width: 680px;
  margin: 16px 0 20px;
  font-size: clamp(56px, 7vw, 92px);
  line-height: .92;
  letter-spacing: -.065em;
}
.completion-hero-copy > p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}
.completion-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 570px;
  margin: 34px 0 28px;
}
.completion-parts span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 800;
}
.completion-parts b {
  color: var(--violet);
  font-size: 10px;
}
.completion-parts svg {
  width: 16px;
  margin-left: auto;
  color: var(--good);
}
.completion-result {
  display: block;
  max-width: 600px;
  font-size: 16px;
}
.completion-puzzle {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 45px;
  text-align: center;
}
.completion-puzzle img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 28px 30px rgba(9, 30, 22, .18));
}
.completion-puzzle-dark { display: none !important; }
.completion-puzzle figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.completion-certificate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
}
.completion-certificate-mark,
.call-status-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--violet) 13%, var(--paper));
  color: var(--violet);
}
.completion-certificate-mark svg { width: 38px; height: 38px; }
.completion-certificate h2,
.completion-call-card h2 {
  margin: 7px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -.045em;
}
.completion-certificate p { margin: 0; color: var(--muted); }
.completion-certificate dl,
.completion-call-status dl {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 30px;
  margin: 20px 0 0;
}
.completion-certificate dl div,
.completion-call-status dl div { display: grid; gap: 4px; }
.completion-certificate dt,
.completion-call-status dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.completion-certificate dd,
.completion-call-status dd { margin: 0; font-size: 12px; font-weight: 800; }
.completion-download,
.completion-call-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--violet);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.completion-download svg { width: 18px; }
.completion-call-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr);
  gap: clamp(30px, 6vw, 76px);
  align-items: start;
  margin-top: 24px;
  padding: clamp(36px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
}
.completion-call-copy > p,
.completion-call-status > p {
  max-width: 570px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.call-request-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--lime) 10%, var(--paper));
  font-size: 12px;
  line-height: 1.55;
}
.call-request-note svg { color: var(--violet); }
.call-request-note b { display: block; margin-bottom: 3px; }
.completion-call-form,
.completion-call-form label {
  display: grid;
  gap: 8px;
}
.completion-call-form label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.completion-call-form label > small {
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none;
}
.call-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.completion-call-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  color-scheme: light dark;
}
.completion-call-form > label { margin-top: 16px; }
.completion-privacy {
  margin: 14px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.completion-call-error { min-height: 18px; margin: 0 0 8px; color: var(--danger); font-size: 12px; font-weight: 800; }
.completion-call-form button { justify-self: start; }
.completion-call-form button:disabled { opacity: .55; cursor: wait; }
.completion-call-status {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}
.completion-call-status > :not(.call-status-icon) { grid-column: 2; }
.completion-call-status .call-status-icon { grid-row: 1 / span 4; }
.completion-back {
  display: block;
  margin: 28px auto 0;
  padding: 12px 18px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
html:not([data-theme="dark"]) .completion-shell { background: var(--background-light); }
html:not([data-theme="dark"]) .completion-hero,
html:not([data-theme="dark"]) .completion-certificate,
html:not([data-theme="dark"]) .completion-call-card { border-color: color-mix(in srgb, var(--light-cta) 12%, transparent); background: #fffaf2; }
html:not([data-theme="dark"]) .completion-hero h1,
html:not([data-theme="dark"]) .completion-certificate h2,
html:not([data-theme="dark"]) .completion-call-card h2 { color: var(--light-cta); }
html:not([data-theme="dark"]) .completion-download,
html:not([data-theme="dark"]) .completion-call-form button { background: var(--light-cta); }
html:not([data-theme="dark"]) .completion-parts span,
html:not([data-theme="dark"]) .completion-call-form input { background: #fffdf8; }
html[data-theme="dark"] .completion-puzzle-light { display: none !important; }
html[data-theme="dark"] .completion-puzzle-dark { display: block !important; }
html[data-theme="dark"] .completion-hero,
html[data-theme="dark"] .completion-certificate,
html[data-theme="dark"] .completion-call-card { border-color: #2a493d; background: #14231d; }
html[data-theme="dark"] .completion-hero::after { background: rgba(36, 171, 124, .12); }
html[data-theme="dark"] .completion-call-form input { background: #101c17; }

@media (max-width: 900px) {
  .completion-page { width: min(100% - 28px, 760px); padding-top: 28px; }
  .completion-hero { grid-template-columns: 1fr; min-height: 0; }
  .completion-puzzle { padding-top: 0; }
  .completion-puzzle img { max-width: 380px; }
  .completion-certificate { grid-template-columns: auto 1fr; }
  .completion-download { grid-column: 1 / -1; width: 100%; }
  .completion-call-card { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .completion-page { width: min(100% - 20px, 520px); padding-bottom: 50px; }
  .completion-hero { border-radius: 24px; }
  .completion-hero-copy { padding: 34px 24px; }
  .completion-hero h1 { font-size: 48px; }
  .completion-hero-copy > p { font-size: 17px; }
  .completion-parts { grid-template-columns: 1fr; }
  .completion-puzzle { padding: 0 24px 30px; }
  .completion-certificate,
  .completion-call-card { padding: 26px 22px; border-radius: 22px; }
  .completion-certificate { grid-template-columns: 1fr; }
  .completion-certificate-mark { width: 58px; height: 58px; }
  .completion-certificate dl { display: grid; }
  .call-form-grid { grid-template-columns: 1fr; }
  .completion-call-status { display: block; }
  .completion-call-status .call-status-icon { margin-bottom: 20px; }
}

/* Artifact Challenges: real work products with a visible, auditable process. */
.artifact-challenge { display: grid; gap: 22px; margin-top: 24px; }
.artifact-brief,
.artifact-criteria,
.artifact-process-form,
.artifact-upload,
.artifact-reflection { border: 1px solid color-mix(in srgb, var(--line) 82%, transparent); border-radius: 24px; background: color-mix(in srgb, var(--card) 94%, var(--primary-soft)); padding: 24px; }
.artifact-brief { display: flex; gap: 18px; align-items: flex-start; background: linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 72%, var(--card)), var(--card)); }
.artifact-brief p { margin: 8px 0 12px; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; }
.artifact-mark { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 15px; color: #fff; background: var(--primary); box-shadow: 0 12px 25px color-mix(in srgb, var(--primary) 20%, transparent); }
.artifact-formats { display: inline-flex; padding: 7px 11px; border-radius: 999px; color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 78%, transparent); font-size: .78rem; font-weight: 800; letter-spacing: .03em; }
.artifact-criteria h3,
.artifact-upload h3,
.artifact-reflection h3 { margin: 4px 0 14px; }
.artifact-criteria ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.artifact-criteria li { display: flex; gap: 9px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--card) 82%, var(--primary-soft)); line-height: 1.4; }
.artifact-criteria li span { color: var(--primary); font-weight: 900; }
.artifact-workflow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.artifact-workflow li { min-height: 94px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.artifact-workflow li > span { display: grid; place-items: center; width: 27px; height: 27px; margin-bottom: 9px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 900; }
.artifact-workflow li b { display: block; font-size: .76rem; line-height: 1.25; }
.artifact-workflow li.done { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); }
.artifact-workflow li.done > span { color: #fff; background: var(--primary); }
.artifact-process-form { display: grid; gap: 18px; }
.artifact-process-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.artifact-field { display: grid; gap: 8px; }
.artifact-field label { font-weight: 750; line-height: 1.35; }
.artifact-field label span { display: block; margin-bottom: 5px; color: var(--primary); font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.artifact-field textarea,
.artifact-reflection textarea { width: 100%; min-height: 94px; resize: vertical; border: 1px solid var(--line); border-radius: 15px; background: var(--card); color: var(--ink); padding: 14px 15px; font: inherit; line-height: 1.5; }
.artifact-save-row,
.artifact-upload-controls { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.artifact-save-row span,
#artifact-upload-status { color: var(--muted); font-size: .82rem; }
.artifact-upload { display: grid; gap: 18px; }
.artifact-upload > div:first-child p { margin: 0; color: var(--muted); }
.artifact-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.artifact-file-link,
.artifact-file-empty { display: flex; gap: 10px; align-items: center; min-height: 76px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--card); text-decoration: none; }
.artifact-file-link { flex-direction: column; align-items: flex-start; }
.artifact-file-link span { color: var(--primary); font-size: .75rem; font-weight: 900; }
.artifact-file-link small,
.artifact-file-empty small { display: block; color: var(--muted); font-weight: 500; }
.artifact-file-empty > span { color: var(--muted); }
.artifact-inspection { display: grid; gap: 3px; padding: 12px 14px; border-left: 3px solid var(--primary); border-radius: 10px; background: color-mix(in srgb, var(--primary-soft) 68%, var(--card)); }
.artifact-inspection span { color: var(--primary); font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.artifact-inspection small { color: var(--muted); }
.artifact-visual-review { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.artifact-upload-controls label { display: grid; gap: 6px; font-size: .78rem; font-weight: 800; }
.artifact-upload-controls input,
.artifact-upload-controls select { max-width: 320px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); padding: 10px; }
.artifact-reflection { display: grid; gap: 12px; }
.artifact-reflection .primary { justify-self: end; }
.artifact-reflection .feedback { margin: 4px 0 0; }
.station-blocked-reason { margin: 18px 0 -4px; padding: 11px 14px; border-left: 3px solid var(--accent, #c98c3f); border-radius: 10px; background: color-mix(in srgb, var(--accent-soft, #f8ead7) 72%, var(--card)); color: var(--ink); font-size: .84rem; }
html[data-theme="dark"] .artifact-brief,
html[data-theme="dark"] .artifact-criteria,
html[data-theme="dark"] .artifact-process-form,
html[data-theme="dark"] .artifact-upload,
html[data-theme="dark"] .artifact-reflection { background: color-mix(in srgb, var(--surface-dark, #17231e) 90%, var(--primary)); }

.artifact-ai-workspace { display: grid; gap: 16px; padding: 24px; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--line)); border-radius: 24px; background: linear-gradient(145deg, color-mix(in srgb, var(--primary-soft) 52%, var(--card)), var(--card)); box-shadow: 0 20px 48px color-mix(in srgb, var(--primary) 10%, transparent); }
.artifact-ai-workspace.locked { border-style: dashed; box-shadow: none; opacity: .78; }
.artifact-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.artifact-workspace-head h3 { margin: 5px 0 0; max-width: 34ch; }
.workspace-lock { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: var(--primary); font-weight: 900; }
.artifact-approved-instruction { padding: 15px 17px; border-left: 4px solid var(--primary); border-radius: 13px; background: color-mix(in srgb, var(--card) 82%, var(--primary-soft)); }
.artifact-approved-instruction summary { color: var(--primary); font-size: .7rem; font-weight: 900; letter-spacing: .12em; cursor: pointer; }
.artifact-approved-instruction summary::marker { color: var(--primary); }
.artifact-approved-instruction p { margin: 7px 0 0; white-space: pre-wrap; line-height: 1.5; }
.artifact-chat-simulation { display: grid; gap: 12px; padding: 16px; border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--card) 94%, var(--primary-soft)); }
.artifact-chat-simulation > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.artifact-chat-simulation h4 { margin: 5px 0 0; font-size: 1rem; }
.simulation-badge { color: var(--primary); font-size: .68rem; font-weight: 900; letter-spacing: .13em; }
.simulation-skip { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); padding: 8px 12px; font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; }
.simulation-skip:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 32%, transparent); outline-offset: 2px; }
.simulation-disclosure { display: flex; gap: 8px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.simulation-disclosure span { color: var(--primary); font-weight: 900; }
.simulation-window { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 520px; overflow: hidden; border: 1px solid color-mix(in srgb, #10263d 58%, var(--line)); border-radius: 20px; background: #fff; color: #162434; box-shadow: 0 20px 44px rgba(12, 28, 42, .14); }
.simulation-sidebar { display: grid; align-content: start; gap: 18px; padding: 18px 12px; border-right: 1px solid rgba(16,38,61,.1); background: #f7f7f5; }
.simulation-sidebar > b { padding: 2px 8px; font-size: .88rem; }
.simulation-new-task { padding: 9px 10px; color: inherit; font-size: .72rem; font-weight: 800; }
.simulation-sidebar nav { display: grid; gap: 5px; }
.simulation-sidebar nav span { padding: 9px 10px; border-radius: 9px; color: #52606c; font-size: .68rem; line-height: 1.3; }
.simulation-sidebar nav .active { background: #e7e7e3; color: #142233; font-weight: 800; }
.simulation-main { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; background: #fff; }
.simulation-window-bar { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 10px 16px; border-bottom: 1px solid rgba(16,38,61,.1); background: #fff; }
.simulation-window-bar b { font-size: .76rem; }
.simulation-window-bar span { margin-left: auto; padding: 3px 7px; border: 1px solid rgba(16,38,61,.14); border-radius: 999px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.simulation-transcript { display: grid; align-content: start; gap: 22px; min-height: 350px; max-height: 560px; overflow-y: auto; padding: 30px clamp(20px, 5vw, 56px); scrollbar-gutter: stable; }
.simulation-placeholder { align-self: center; justify-self: center; color: #697887; font-size: .82rem; }
.simulation-message { width: min(92%, 650px); padding: 4px 0; border: 0; background: transparent; box-shadow: none; }
.simulation-message.user { justify-self: end; width: min(78%, 560px); padding: 11px 15px; border-radius: 22px; background: #ececea; }
.simulation-message.evaluation { width: min(92%, 650px); padding: 16px 18px; border: 1px solid #b9d9cd; border-radius: 18px; background: #edf8f3; }
.simulation-message.evaluation.partial, .simulation-message.evaluation.retry { border-color: #e3bd79; background: #fff8eb; }
.simulation-message b { display: block; margin-bottom: 4px; color: #186d57; font-size: .64rem; letter-spacing: .1em; }
.simulation-message p { margin: 0; white-space: pre-wrap; font-size: .82rem; line-height: 1.48; }
.simulation-composer { display: flex; align-items: flex-end; gap: 10px; margin: 0 clamp(16px, 4vw, 46px) 18px; padding: 10px 10px 10px 16px; border: 1px solid rgba(16,38,61,.14); border-radius: 26px; background: #f4f4f2; box-shadow: 0 8px 22px rgba(12,28,42,.08); }
.simulation-composer textarea { flex: 1; min-height: 32px; max-height: 140px; resize: vertical; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; line-height: 1.4; }
.simulation-composer p { flex: 1; margin: 0; color: #6f777e; font-size: .76rem; }
.simulation-composer button { display: grid; place-items: center; flex: 0 0 auto; min-width: 34px; height: 34px; border: 0; border-radius: 50%; padding: 0 10px; background: #142233; color: #fff; font: inherit; font-weight: 850; cursor: pointer; }
.simulation-composer-start button { width: auto; border-radius: 18px; }
.simulation-file-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px 12px; margin-top: 14px; padding: 13px; border: 1px solid rgba(16,38,61,.14); border-radius: 15px; background: #f7f7f5; }
.simulation-file-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #d85835; color: #fff; font-weight: 900; }
.simulation-file-copy { min-width: 0; }
.simulation-file-copy b { overflow-wrap: anywhere; color: #162434; font-size: .78rem; letter-spacing: 0; }
.simulation-file-copy small { display: block; margin-top: 4px; color: #697887; font-size: .68rem; }
.simulation-file-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.simulation-file-actions a { text-decoration: none; }
.simulation-file-actions .primary, .simulation-file-actions .secondary { min-height: 34px; padding: 7px 10px; font-size: .7rem; }
#artifact-workspace-status { margin: -8px clamp(16px, 4vw, 46px) 14px; color: #697887; font-size: .75rem; }
.artifact-workspace-conversation { display: grid; gap: 10px; }
.artifact-workspace-message { max-width: 86%; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.artifact-workspace-message.user { justify-self: end; background: color-mix(in srgb, var(--primary-soft) 76%, var(--card)); }
.artifact-workspace-message p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.45; }
.artifact-workspace-message b { color: var(--primary); font-size: .76rem; }
.workspace-empty, .workspace-locked-copy, .workspace-fallback { margin: 0; color: var(--muted); }
.artifact-generated-file { display: grid; gap: 12px; padding: 16px; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--line)); border-radius: 16px; background: var(--card); }
.artifact-generated-file > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.artifact-generated-file small { display: block; color: var(--muted); }
.artifact-generated-file a { text-decoration: none; }
.artifact-revision-label { display: grid; gap: 8px; font-weight: 800; }
.artifact-revision-label textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 15px; background: var(--card); color: var(--ink); padding: 14px 15px; font: inherit; line-height: 1.5; }
.artifact-generate { justify-self: start; }
#artifact-workspace-status { margin: 0; color: var(--muted); }
.artifact-preview-overlay { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: 24px; background: rgba(8, 18, 24, .76); backdrop-filter: blur(8px); }
.artifact-preview-dialog { width: min(1120px, 96vw); max-height: 92vh; overflow: auto; padding: 22px; border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.artifact-preview-dialog header { position: sticky; top: -22px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: -22px -22px 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: var(--card); }
.artifact-preview-dialog header h3 { margin: 4px 0 0; }
.artifact-preview-dialog header button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 1.6rem; cursor: pointer; }
.artifact-preview-slides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.artifact-preview-slides figure { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--card) 92%, var(--primary-soft)); }
.artifact-preview-slides img { display: block; width: 100%; border-radius: 9px; }
.artifact-preview-slides figcaption { padding-top: 8px; color: var(--muted); font-size: .78rem; }
html[data-theme="dark"] .artifact-ai-workspace { background: linear-gradient(145deg, color-mix(in srgb, #17231e 88%, var(--primary)), #17231e); }
html[data-theme="dark"] .artifact-chat-simulation { background: color-mix(in srgb, #14251f 92%, var(--primary)); }
html[data-theme="dark"] .simulation-window { border-color: #395449; background: #0f1c18; color: #edf5f1; }
html[data-theme="dark"] .simulation-main { background: #0f1c18; }
html[data-theme="dark"] .simulation-sidebar { border-color: #314b40; background: #101c18; }
html[data-theme="dark"] .simulation-sidebar nav span { color: #a8b8b0; }
html[data-theme="dark"] .simulation-sidebar nav .active { color: #edf5f1; background: #20372e; }
html[data-theme="dark"] .simulation-window-bar { border-color: #395449; background: #172a23; }
html[data-theme="dark"] .simulation-window-bar span { border-color: #47665a; }
html[data-theme="dark"] .simulation-placeholder { color: #9cadA5; }
html[data-theme="dark"] .simulation-message.user { background: #153b31; }
html[data-theme="dark"] .simulation-message.evaluation { border-color: #385447; background: #153b31; }
html[data-theme="dark"] .simulation-message.evaluation.partial,
html[data-theme="dark"] .simulation-message.evaluation.retry { border-color: #765c31; background: #332a18; }
html[data-theme="dark"] .simulation-message b { color: #65c6a7; }
html[data-theme="dark"] .simulation-composer { border-color: #395449; background: #192a24; }
html[data-theme="dark"] .simulation-composer button { background: #65c6a7; color: #0c1914; }
html[data-theme="dark"] .simulation-file-card { border-color: #385447; background: #172a23; }
html[data-theme="dark"] .simulation-file-copy b { color: #edf5f1; }

@media (max-width: 900px) {
  .artifact-workflow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .artifact-criteria ul,
  .artifact-process-grid,
  .artifact-files { grid-template-columns: 1fr; }
  .artifact-preview-slides { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .artifact-brief,
  .artifact-criteria,
  .artifact-process-form,
  .artifact-upload,
  .artifact-reflection { padding: 18px; border-radius: 18px; }
  .artifact-brief { flex-direction: column; }
  .artifact-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .artifact-upload-controls { align-items: stretch; }
  .artifact-upload-controls > * { width: 100%; max-width: none; }
  .artifact-reflection .primary { justify-self: stretch; }
  .artifact-ai-workspace { padding: 18px; border-radius: 18px; }
  .artifact-chat-simulation > header { align-items: flex-start; }
  .simulation-window { grid-template-columns: 1fr; }
  .simulation-sidebar { display: none; }
  .simulation-main,
  .simulation-window-bar,
  .simulation-transcript,
  .simulation-composer { min-width: 0; max-width: 100%; }
  .simulation-window-bar { overflow: hidden; }
  .simulation-window-bar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .simulation-window-bar span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .simulation-transcript { padding: 20px 16px; }
  .simulation-transcript { max-height: 280px; padding: 12px; }
  .simulation-message { width: 94%; }
  .simulation-composer { margin-inline: 12px; }
  .simulation-composer textarea { min-width: 0; width: 100%; }
  .simulation-file-actions { display: grid; }
  .simulation-file-actions .primary, .simulation-file-actions .secondary { width: 100%; }
  .artifact-generated-file > div { align-items: stretch; }
  .artifact-generated-file .primary, .artifact-generated-file .secondary { width: 100%; }
  .artifact-generate { justify-self: stretch; }
}

/* Agent Simulation Challenge: a guided specification workshop, not a technical agent builder. */
.agent-workshop { display: grid; gap: 22px; margin-top: 24px; }
.agent-workshop-brief,
.agent-workshop-card,
.agent-specification,
.agent-codex-notice { border: 1px solid color-mix(in srgb, var(--line) 82%, transparent); border-radius: 24px; background: color-mix(in srgb, var(--card) 94%, var(--primary-soft)); padding: 24px; }
.agent-workshop-brief { display: flex; gap: 18px; align-items: flex-start; background: linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 78%, var(--card)), var(--card)); }
.agent-workshop-brief p { margin: 8px 0 10px; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; }
.agent-workshop-brief small { display: block; max-width: 78ch; color: var(--muted); line-height: 1.5; }
.agent-workshop-mark { display: grid; place-items: center; flex: 0 0 50px; width: 50px; height: 50px; border-radius: 16px; color: #fff; background: var(--primary); box-shadow: 0 13px 28px color-mix(in srgb, var(--primary) 22%, transparent); font-size: 1.4rem; }
.agentic-distinction { padding: 24px; border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line)); border-radius: 24px; background: linear-gradient(145deg, color-mix(in srgb, var(--card) 94%, transparent), color-mix(in srgb, var(--primary-soft) 62%, var(--card))); }
.agentic-distinction h3 { max-width: 30ch; margin: 0 0 10px; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.15; }
.agentic-distinction > p { max-width: 82ch; margin: 0; color: var(--muted); line-height: 1.68; }
.agentic-distinction-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.agentic-distinction-compare article { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--card) 92%, transparent); }
.agentic-distinction-compare b { display: block; margin-bottom: 7px; color: var(--primary); font-size: .77rem; letter-spacing: .1em; }
.agentic-distinction-compare p { margin: 0; color: var(--muted); line-height: 1.55; }
.agentic-distinction blockquote { margin: 18px 0 0; }
.agent-stage-track { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.agent-stage-track li { min-width: 0; min-height: 78px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.agent-stage-track li span { display: grid; place-items: center; width: 25px; height: 25px; margin-bottom: 8px; border-radius: 50%; color: var(--muted); background: var(--primary-soft); font-size: .7rem; font-weight: 900; }
.agent-stage-track li b { display: block; overflow-wrap: anywhere; font-size: .68rem; line-height: 1.25; }
.agent-stage-track li.done { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); }
.agent-stage-track li.done span { color: #fff; background: var(--primary); }
.agent-workshop-form { display: grid; gap: 18px; }
.agent-workshop-card { display: grid; gap: 10px; }
.agent-workshop-card h3 { margin: 0 0 4px; }
.agent-workshop-card label { margin-top: 4px; font-size: .83rem; font-weight: 800; }
.agent-workshop-card textarea { width: 100%; min-height: 86px; resize: vertical; border: 1px solid var(--line); border-radius: 15px; background: var(--card); color: var(--ink); padding: 14px 15px; font: inherit; line-height: 1.5; }
.agent-workshop-card textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 32%, transparent); outline-offset: 2px; border-color: var(--primary); }
.agent-workshop-card textarea.agent-field-invalid { border-color: var(--danger, #a52a2a); background: color-mix(in srgb, var(--danger, #a52a2a) 5%, var(--card)); }
.agent-field-error { display: block; margin-top: -3px; color: var(--danger, #a52a2a); font-size: .78rem; font-weight: 750; line-height: 1.4; }
.agent-workshop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.agent-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.agent-action-row > span { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.agent-goal-result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; margin-top: 8px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--primary-soft) 72%, var(--card)); scroll-margin-block: 120px; }
.agent-goal-result:focus-visible { outline: 4px solid color-mix(in srgb, var(--primary) 32%, transparent); outline-offset: 3px; }
.agent-goal-result > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 900; }
.agent-goal-result b { display: block; margin-bottom: 4px; }
.agent-goal-result p { margin: 0; line-height: 1.55; }
.agent-goal-result small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
.agent-goal-result.needs-work { border-color: color-mix(in srgb, var(--warning, #c6801d) 55%, var(--line)); background: color-mix(in srgb, #f4c56d 15%, var(--card)); }
.agent-goal-result.needs-work > span { background: var(--warning, #b66f0f); }
.agent-final-actions { justify-content: flex-end; padding: 4px; }
.agent-final-actions > span { margin-right: auto; order: -1; }
.agent-final-actions .agent-evaluate-status { flex: 1 1 100%; order: 3; min-height: 1.2em; margin: 0; color: var(--muted); text-align: right; }
.agent-final-actions .agent-evaluate-status.error { color: var(--danger, #a52a2a); font-weight: 750; }
.agent-evaluation-result { margin-top: 14px; scroll-margin-block: 110px; outline: none; }
.agent-evaluation-result:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.workshop-locked { opacity: .72; }
.agent-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 8px; margin-top: 8px; }
.agent-flow-step { position: relative; display: flex; gap: 8px; align-items: center; min-height: 68px; padding: 12px; border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line)); border-radius: 14px; background: var(--card); }
.agent-flow-step:not(:last-child)::after { content: "→"; position: absolute; z-index: 2; right: -9px; color: var(--primary); font-weight: 900; }
.agent-flow-step span { flex: 0 0 auto; color: var(--primary); font-size: .68rem; font-weight: 900; }
.agent-flow-step b { font-size: .78rem; line-height: 1.25; }
.agent-flow-template { opacity: .72; }
.agent-simulation-moment { border-color: color-mix(in srgb, var(--accent, var(--primary)) 42%, var(--line)); background: color-mix(in srgb, var(--primary-soft) 58%, var(--card)); }
.agent-simulation-moment p { margin: 0; font-weight: 700; line-height: 1.5; }
.agent-specification { display: grid; gap: 14px; border-color: color-mix(in srgb, var(--primary) 58%, var(--line)); box-shadow: 0 20px 50px color-mix(in srgb, var(--primary) 10%, transparent); }
.agent-specification h3 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.2rem); }
.agent-specification dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.agent-specification dl > div { padding: 15px; border-radius: 14px; background: var(--card); }
.agent-specification dt { margin-bottom: 6px; color: var(--primary); font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.agent-specification dd { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.agent-specification ol { margin: 0; padding-left: 20px; }
.agent-spec-notice,
.agent-codex-notice { padding: 15px 17px; border-left: 4px solid var(--primary); border-radius: 13px; background: color-mix(in srgb, var(--primary-soft) 65%, var(--card)); }
.agent-codex-notice p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
html[data-theme="dark"] .agent-workshop-brief,
html[data-theme="dark"] .agent-workshop-card,
html[data-theme="dark"] .agent-specification,
html[data-theme="dark"] .agent-codex-notice { background: color-mix(in srgb, var(--surface-dark, #17231e) 90%, var(--primary)); }
.tutor-goal-summary { display: grid; gap: 8px; margin: 10px 14px 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--primary-soft) 68%, var(--card)); }
.tutor-goal-summary > span { color: var(--primary); font-size: .78rem; font-weight: 900; line-height: 1.35; }
.tutor-goal-summary button { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.tutor-goal-summary.needs-work { border-color: color-mix(in srgb, var(--warning, #c6801d) 50%, var(--line)); }
.tutor-goal-summary.needs-work > span { color: var(--warning, #a55f00); }

@media (max-width: 1050px) {
  .agent-stage-track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .agent-workshop-grid,
  .agent-specification dl { grid-template-columns: 1fr; }
  .agent-workshop-brief { flex-direction: column; }
  .agentic-distinction { padding: 19px; border-radius: 20px; }
  .agentic-distinction-compare { grid-template-columns: 1fr; }
  .agent-stage-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-flow { grid-template-columns: 1fr; }
  .agent-flow-step:not(:last-child)::after { content: "↓"; right: 50%; bottom: -13px; top: auto; }
  .agent-final-actions { align-items: stretch; }
  .agent-final-actions > * { width: 100%; }
}
.header-controls { display: flex; align-items: center; gap: 10px; min-width: 0; }
.language-switcher { display: flex; align-items: center; gap: 7px; padding: 4px 5px 4px 10px; border: 1px solid color-mix(in srgb, var(--primary) 46%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--primary-soft) 55%, var(--card)); box-shadow: 0 7px 20px color-mix(in srgb, var(--primary) 11%, transparent); color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.language-switcher > svg { width: 16px; height: 16px; flex: 0 0 auto; stroke-width: 2.3; }
.language-switcher:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 17%, transparent), 0 9px 22px color-mix(in srgb, var(--primary) 14%, transparent); transform: translateY(-1px); }
.language-switcher select { max-width: 150px; min-height: 38px; border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line)); border-radius: 999px; background: var(--card); color: var(--ink); padding: 0 28px 0 12px; font: inherit; font-weight: 850; letter-spacing: 0; text-transform: none; cursor: pointer; }
html[dir="rtl"] .workspace, html[dir="rtl"] .welcome-grid, html[dir="rtl"] .program-overview-main, html[dir="rtl"] .completion-page { direction: rtl; }
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select { text-align: right; }
html[dir="rtl"] .agent-flow, html[dir="rtl"] .journey-line { direction: rtl; }
html[data-locale="ja-JP"] .content-sections p, html[data-locale="zh-CN"] .content-sections p { line-break: strict; word-break: normal; }
html[data-locale="ru"] button, html[data-locale="ru"] .puzzle b { overflow-wrap: anywhere; }
html[data-locale="th-TH"] .content-sections p { line-break: auto; overflow-wrap: anywhere; }
html[data-locale="el-GR"] button, html[data-locale="tr-TR"] button,
html[data-locale="el-GR"] .puzzle b, html[data-locale="tr-TR"] .puzzle b { overflow-wrap: anywhere; }
html[data-locale="ur-PK"] .content-card, html[data-locale="ur-PK"] .tutor-panel,
html[data-locale="ur-PK"] .topic-overview-panel { text-align: right; }

@media (max-width: 760px) {
  .header-controls { gap: 5px; }
  .language-switcher { padding-left: 5px; }
  .language-switcher > svg { display: none; }
  .language-switcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .language-switcher select { max-width: 112px; min-height: 34px; font-size: 10px; }
}
.artifact-challenge-v2 .artifact-process-form {
  display: grid;
  gap: 18px;
}

.artifact-challenge-v2 .artifact-workflow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.artifact-challenge-v2 .artifact-final-pass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--success, #16866b);
  border-radius: 999px;
  color: var(--success, #16866b);
  font-weight: 800;
}

.artifact-challenge-v2 .artifact-upload {
  padding: 20px 24px;
}

.artifact-challenge-v2 .artifact-upload > summary {
  cursor: pointer;
  font-weight: 800;
}

/* Tutor interaction architecture: settings above, presence right, dialogue large. */
.tutor-header-settings { position: relative; }
.tutor-header-settings > summary {
  display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  list-style: none; cursor: pointer; font-size: 11px; font-weight: 850; white-space: nowrap;
}
.tutor-header-settings > summary::-webkit-details-marker { display: none; }
.tutor-header-settings > summary svg { width: 16px; height: 16px; color: var(--violet); }
.tutor-header-settings > summary small { color: var(--good); font-size: 9px; font-weight: 850; }
.tutor-header-popover {
  position: absolute; z-index: 90; top: calc(100% + 9px); right: 0; width: min(310px, calc(100vw - 28px));
  padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card);
  box-shadow: 0 20px 55px rgba(20,35,48,.18);
}
.tutor-header-popover .tutor-view-switch { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.tutor-header-popover .tutor-voice-settings { padding: 0; }
.tutor-header-popover .tutor-voice-settings > div { gap: 7px; }
.tutor-header-popover .voice-setting { min-height: 38px; padding: 7px 9px; font-size: 9px; }
.tutor-header-popover .tutor-voice-settings > label { margin-top: 9px; font-size: 9px; }
.tutor-header-popover .tutor-voice-settings select { min-height: 36px; padding: 7px 9px; font-size: 10px; }

.tutor-workspace .tutor-presence {
  display: grid; grid-template-columns: 1fr; gap: 7px; min-height: 250px; padding: 8px 14px 10px;
}
.tutor-workspace .tutor-avatar-shell { min-height: 215px; border-radius: 18px; }
.tutor-workspace .tutor-avatar-stage { min-height: 215px; }
.tutor-workspace .tutor-avatar-stage.canonical-companion {
  background: url("/academy-assets/assets/mobile-tutor-companion.png") center / contain no-repeat;
}
.tutor-workspace .tutor-avatar-stage.canonical-companion > * { display: none !important; }
.tutor-workspace .tutor-presence-status {
  justify-self: center; min-width: 112px; min-height: 28px; padding: 5px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); color: var(--muted); text-align: center; font-size: 10px; font-weight: 850;
}
.tutor-classic-presence { display: grid; place-items: center; align-content: center; gap: 10px; min-height: 205px; }
.tutor-actions, .tutor-your-turn { display: grid; gap: 8px; padding: 10px 14px; }
.tutor-actions button, .tutor-your-turn button, .tutor-history-button {
  min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 11px; font-weight: 850; cursor: pointer;
}
.tutor-actions button.primary, .tutor-your-turn button.primary { border-color: var(--violet); background: var(--violet); color: white; }
.tutor-your-turn > span { color: var(--violet); font-size: 10px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.tutor-history-button { display: flex; justify-content: space-between; align-items: center; margin: 2px 14px 14px; color: var(--muted); background: transparent; }
.tutor-history-button span { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--violet); }

@media (min-width: 761px) {
  .mission-v2 .tutor-workspace .tutor-avatar-stage.canonical-companion {
    inset: 10px;
    min-height: 0;
    border-radius: 15px;
    background: url("/academy-assets/assets/mobile-tutor-companion.png") center / contain no-repeat;
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }
  .mission-v2 .tutor-workspace .tutor-avatar-stage.canonical-companion.ready {
    animation: tutorCompanionIdle 4.4s ease-in-out infinite;
  }
  .mission-v2 .tutor-workspace .canonical-tutor-shell {
    animation: tutorCompanionGlow 4.8s ease-in-out infinite;
    transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
  }
  .mission-v2 .tutor-workspace .canonical-tutor-shell:hover {
    border-color: color-mix(in srgb, var(--lime) 34%, var(--line));
    box-shadow: 0 16px 34px color-mix(in srgb, var(--lime) 14%, transparent);
    transform: translateY(-2px);
  }
}

@keyframes tutorCompanionIdle {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -4px, 0) scale(1.004); }
}
@keyframes tutorCompanionGlow {
  0%, 100% { box-shadow: 0 12px 28px rgba(23, 50, 77, .07); }
  50% { box-shadow: 0 15px 34px color-mix(in srgb, var(--lime) 11%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .mission-v2 .tutor-workspace .tutor-avatar-stage.canonical-companion.ready,
  .mission-v2 .tutor-workspace .canonical-tutor-shell {
    animation: none;
    transition: none;
    transform: none !important;
  }
}

.tutor-dialog-backdrop {
  position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 24px;
  background: rgba(10,24,34,.52); backdrop-filter: blur(8px);
}
.tutor-dialog-backdrop[hidden] { display: none; }
.tutor-dialog {
  display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: min(980px, 74vw); max-height: min(88dvh, 860px);
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 95px rgba(8,23,34,.34);
}
.tutor-dialog > header { display: flex; justify-content: space-between; gap: 24px; padding: 22px 26px 18px; border-bottom: 1px solid var(--line); background: var(--card); }
.tutor-dialog > header h2 { margin: 4px 0; font-size: clamp(24px,3vw,36px); line-height: 1.1; }
.tutor-dialog > header p { margin: 0; color: var(--muted); font-size: 14px; }
.tutor-dialog > header > button { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 24px; cursor: pointer; }
.tutor-dialog-body { display: grid; align-content: start; gap: 16px; min-height: 180px; padding: 24px 26px; overflow-y: auto; overscroll-behavior: contain; }
.tutor-dialog .tutor-question, .tutor-dialog .tutor-response { padding: 18px 20px; border-radius: 16px; }
.tutor-dialog .tutor-question p, .tutor-dialog .tutor-response p { font-size: 16px; line-height: 1.65; }
.tutor-dialog .collapsible-copy { max-height: none; overflow: visible; }
.tutor-dialog .response-expand { display: none; }
.tutor-dialog-form { position: relative; margin: 0 26px 24px; padding: 16px 18px; border-radius: 18px; box-shadow: 0 8px 30px rgba(14,31,43,.08); }
.tutor-dialog-form textarea { min-height: 118px; max-height: 260px; padding: 13px 14px; font-size: 15px; line-height: 1.6; resize: none; }
.tutor-dialog-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; }
.tutor-dialog-composer-actions .input-assist { margin: 0; }
.tutor-dialog-composer-actions > button { min-width: 118px; min-height: 42px; margin: 0; justify-content: center; }
.tutor-dialog-history { display: grid; gap: 14px; }
.tutor-dialog-history .message { max-width: 76%; }
.tutor-dialog-history .message.user { justify-self: end; }
.tutor-history-empty { color: var(--muted); }
html[data-theme="dark"] .tutor-dialog { background: var(--background-dark); }
html[data-theme="dark"] .tutor-dialog > header, html[data-theme="dark"] .tutor-dialog-form { background: var(--surface-dark); }

/* Mobile co-work desk. Hidden at desktop widths so the established desktop
   learning layout and tutor column remain unchanged. */
.mobile-desk-tools,
.mobile-workspace-navigation { display: none; }
.mobile-tutor-sheet,
.mobile-top-settings { display: none; }
.mobile-focus-view,
.mobile-journey-button { display: none; }
.mobile-learning-board { display: contents; }
.mobile-board-progress { display: none; }

@media (max-width: 1360px) {
  .tutor-header-settings > summary span { display: none; }
  .tutor-header-settings > summary small { max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 1101px) and (max-width: 1500px) {
  .mission-v2 .topbar {
    grid-template-columns: 220px minmax(110px, 1fr) auto;
    gap: 12px;
    padding-inline: 16px;
  }
  .mission-v2 .topbar > *,
  .mission-v2 .brand > div,
  .mission-v2 .program,
  .mission-v2 .progress-head,
  .mission-v2 .header-controls { min-width: 0; }
  .mission-v2 .topbar .brand small,
  .mission-v2 .language-switcher span,
  .mission-v2 .profile-trigger-copy,
  .mission-v2 .profile-trigger > svg,
  .mission-v2 .tutor-header-settings > summary span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .mission-v2 .brand strong,
  .mission-v2 .program strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mission-v2 .program { padding-left: 14px; }
  .mission-v2 .progress-head { gap: 8px; }
  .mission-v2 .header-controls { gap: 5px; }
  .mission-v2 .language-switcher select {
    width: 104px;
    max-width: 104px;
    padding-inline: 10px 24px;
  }
  .mission-v2 .workbook-companion-button {
    width: auto;
    min-width: max-content;
    padding: 0 11px;
    font-size: .72rem;
  }
  .mission-v2 .profile-trigger { padding: 2px; }
  .mission-v2 .profile-trigger .avatar {
    width: 38px;
    height: 38px;
  }
}
@media (max-width: 1100px) {
  .tutor-dialog { width: min(900px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); }
  .tutor-workspace .tutor-presence { min-height: 270px; }
}
@media (max-width: 760px) {
  .mission-v2 { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .mission-v2 .topbar {
    min-height: 72px;
    height: auto;
    padding: 9px 12px;
    border-bottom-color: color-mix(in srgb, var(--line) 72%, transparent);
  }
  .mission-v2 .topbar .brand { min-width: 0; gap: 9px; }
  .mission-v2 .topbar .brand-mark { width: 40px; height: 40px; flex: 0 0 40px; }
  .mission-v2 .topbar .brand strong { max-width: 142px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
  .mission-v2 .header-controls { gap: 6px; }
  .mission-v2 .workbook-companion-button { display: none; }
  .mission-v2 .language-switcher select { width: 88px; max-width: 88px; }
  .mission-v2 .theme-control { gap: 2px; padding: 3px; }
  .mission-v2 .theme-control :is(.tutorial-help-button, .logout-button) { display: none; }

  .mission-v2 .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: start;
    gap: 12px;
    padding: 12px;
    background: color-mix(in srgb, var(--surface-soft-light) 72%, var(--paper));
  }
  html[data-theme="dark"] .mission-v2 .workspace { background: var(--background-dark); }
  .mission-v2 .sidebar { display: none; }
  .mission-v2 .main {
    grid-column: 1;
    order: initial;
    min-width: 0;
    padding: 0;
  }
  .mission-v2 .crumbs,
  .mission-v2 .mission-main > h1,
  .mission-v2 .objective,
  .mission-v2 .topic-overview-mobile { display: none; }
  .mission-v2 .mission-meta { margin: 0 0 8px; padding-inline: 8px; }
  .mission-v2 .mission-meta span { font-size: 8px; }
  .mission-v2 .mission-journey {
    margin: 0 0 10px;
    padding: 4px 5px 8px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    scrollbar-width: none;
  }
  .mission-v2 .mission-journey::-webkit-scrollbar { display: none; }
  .mission-v2 .mission-journey .journey-stop { flex-basis: 66px; min-width: 66px; }
  .mission-v2 .mission-journey .journey-stop small { font-size: 7px; }
  .mission-v2 .step-stage {
    max-height: calc(100dvh - 244px);
    min-height: min(470px, calc(100dvh - 244px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 20px 24px;
    border: 1px solid color-mix(in srgb, var(--light-cta) 28%, var(--line));
    border-radius: 24px;
    box-shadow: 0 14px 34px rgba(24, 50, 75, .11), inset 0 0 0 4px color-mix(in srgb, var(--card) 70%, transparent);
    scrollbar-gutter: stable;
  }
  .mission-v2 .step-stage h2 { font-size: clamp(1.7rem, 6vw, 2.35rem); line-height: 1.02; }
  .mission-v2 .step-kicker { font-size: .68rem; }
  .mission-v2 .station-navigation {
    position: sticky;
    bottom: 84px;
    z-index: 5;
    gap: 9px;
    margin: 10px 0;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    box-shadow: 0 10px 25px rgba(17, 39, 57, .1);
    backdrop-filter: blur(14px);
  }
  .mission-v2 .station-navigation button { min-height: 44px; padding: 10px 13px; }
  .mission-v2 .tutor-toggle { display: none; }

  .mission-v2 .tutor {
    position: sticky;
    inset: auto;
    top: 84px;
    grid-column: 2;
    display: flex;
    width: auto;
    height: auto;
    max-height: calc(100dvh - 174px);
    transform: none;
    overflow: hidden auto;
    border: 1px solid color-mix(in srgb, var(--light-accent-teal) 30%, var(--line));
    border-radius: 24px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    box-shadow: 0 14px 34px rgba(24, 50, 75, .09);
  }
  .mission-v2 .tutor-head { display: none; }
  .mission-v2 .tutor-workspace .tutor-presence { min-height: 0; padding: 9px; }
  .mission-v2 .tutor-workspace .tutor-avatar-shell,
  .mission-v2 .tutor-workspace .tutor-avatar-stage { min-height: 140px; }
  .mission-v2 .tutor-avatar-shell { border-radius: 18px; }
  .mission-v2 .tutor-workspace .tutor-presence-status { min-width: 0; width: 100%; }
  .mission-v2 .tutor .context { padding: 10px; }
  .mission-v2 .tutor .context b { font-size: .69rem; line-height: 1.35; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) { padding: 9px; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) button { min-height: 40px; padding: 8px; font-size: .7rem; }
  .mission-v2 .tutor-history-button { display: none; }

  .mobile-desk-tools {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 10px;
    margin: 12px 0 4px;
  }
  .mobile-workbook-card,
  .mobile-takeaway-card {
    min-width: 0;
    min-height: 138px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 12px 25px rgba(24, 50, 75, .08);
  }
  .mobile-workbook-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: space-between;
    gap: 8px;
    padding: 16px;
    text-align: start;
    cursor: pointer;
  }
  .mobile-workbook-card > span { display: grid; gap: 4px; }
  .mobile-workbook-card small,
  .mobile-takeaway-card small { color: var(--light-accent-teal); font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
  .mobile-workbook-card strong { font-size: .84rem; line-height: 1.25; }
  .mobile-workbook-card > i { color: var(--light-accent-teal); }
  .mobile-workbook-card em { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: .72rem; font-style: normal; font-weight: 850; color: var(--light-accent-teal); }
  .mobile-takeaway-card { position: relative; display: grid; align-content: start; padding: 16px; background: color-mix(in srgb, var(--light-accent-warm) 18%, var(--card)); }
  .mobile-takeaway-card > i { position: absolute; top: 13px; right: 13px; width: 20px; color: var(--light-accent-warm); }
  .mobile-takeaway-card > span { display: grid; gap: 8px; padding-right: 14px; }
  .mobile-takeaway-card strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; font-size: .76rem; line-height: 1.42; }

  .mobile-workspace-navigation {
    position: fixed;
    z-index: 80;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    min-height: 64px;
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    box-shadow: 0 18px 45px rgba(12, 31, 44, .18);
    backdrop-filter: blur(16px);
  }
  .mobile-workspace-navigation button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    border: 0;
    border-radius: 16px;
    background: transparent !important;
    color: var(--muted);
    font: inherit;
    font-size: .58rem;
    font-weight: 800;
    cursor: pointer;
  }
  .mobile-workspace-navigation button svg { width: 19px; height: 19px; }
  .mobile-workspace-navigation button span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-workspace-navigation button.active { background: var(--light-cta); color: white; }

  .tutor-header-settings > summary small { display: none; }
  .tutor-header-settings > summary { width: 36px; min-height: 36px; justify-content: center; padding: 0; }
  .tutor-dialog-backdrop { padding: 0; }
  .tutor-dialog { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .tutor-dialog > header { padding: 16px 18px; }
  .tutor-dialog > header h2 { font-size: 24px; }
  .tutor-dialog-body { padding: 18px; }
  .tutor-dialog-form { margin: 0 14px 14px; padding: 13px; }
  .tutor-dialog-form textarea { min-height: 112px; }
  .tutor-dialog-history .message { max-width: 90%; }
}

@media (max-width: 540px) {
  .mission-v2 .topbar .brand strong { max-width: 92px; font-size: .78rem; }
  .mission-v2 .language-switcher select { width: 74px; max-width: 74px; padding-inline: 8px 22px; }
  .mission-v2 .workspace { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; padding: 10px; }
  .mission-v2 .main {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }
  .mission-v2 .mission-journey { margin-bottom: 7px; }
  .mission-v2 .step-stage { max-height: 51dvh; min-height: min(390px, 51dvh); padding: 18px 15px 20px; border-radius: 20px; }
  .mission-v2 .step-stage h2 { font-size: clamp(1.28rem, 6.2vw, 1.65rem); }
  .mission-v2 .step-stage :is(p, li, label, input, textarea, button) { font-size: .82rem; }
  .mission-v2 .tutor {
    position: sticky;
    top: 82px;
    grid-column: 2;
    display: flex;
    max-height: calc(100dvh - 166px);
    margin-top: 0;
  }
  .mission-v2 .tutor-workspace .tutor-avatar-shell,
  .mission-v2 .tutor-workspace .tutor-avatar-stage { min-height: 104px; }
  .mission-v2 .tutor-workspace .tutor-presence-status { position: static; width: 100%; transform: none; font-size: .61rem; }
  .mission-v2 .tutor .context { padding: 8px; }
  .mission-v2 .tutor .context b { font-size: .61rem; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) { padding: 8px; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) button:not(.primary) { display: none; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) button { font-size: .61rem; line-height: 1.2; }
  .mobile-desk-tools { grid-template-columns: 1fr 1fr; }
  .mobile-workbook-card,
  .mobile-takeaway-card { min-height: 126px; padding: 13px; }
}

/* Mobile desk composition — the approved filled mockup is the source of
   truth. Content is fitted into its board/tutor/workbook/note/chat zones;
   desktop and tablet keep the established Academy structure above. */
@media (max-width: 540px) {
  .mission-v2 {
    min-height: 100dvh;
    padding-bottom: 0;
    background: #f4eee2;
  }
  .mission-v2 .topbar {
    grid-template-columns: minmax(108px, 1fr) auto;
    gap: 7px;
    min-height: 76px;
    padding: 10px 12px 8px;
    border-bottom: 0;
    background: rgba(255, 250, 242, .93);
    box-shadow: none;
  }
  .mission-v2 .topbar .brand { gap: 8px; }
  .mission-v2 .topbar .brand-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border: 2px solid #17324d;
    border-radius: 14px;
    background: #e5b34a;
    color: #17324d;
    box-shadow: 0 5px 0 #17324d;
  }
  .mission-v2 .topbar .brand small,
  .mission-v2 .topbar .program,
  .mission-v2 .progress-head > span,
  .mission-v2 .progress-head > strong,
  .mission-v2 .progress-head > .learner { display: none; }
  .mission-v2 .topbar .brand strong { max-width: 108px; font-size: .76rem; }
  .mission-v2 .progress-head { justify-content: flex-end; gap: 0; min-width: 0; }
  .mission-v2 .header-controls { justify-content: flex-end; gap: 5px; }
  .mission-v2 .language-switcher select,
  .mission-v2 .tutor-header-settings > summary,
  .mission-v2 .theme-control,
  .mission-v2 .mobile-top-settings {
    width: 39px;
    min-width: 39px;
    min-height: 39px;
    border-color: rgba(24, 50, 75, .13);
    border-radius: 50%;
    background: rgba(255, 250, 242, .94);
    box-shadow: 0 6px 16px rgba(24, 50, 75, .08);
  }
  .mission-v2 .language-switcher select { width: 68px; max-width: 68px; min-width: 68px; padding-inline: 7px 20px; border-radius: 18px; font-size: .56rem; }
  .mission-v2 .tutor-header-settings > summary { width: 39px; min-height: 39px; }
  .mission-v2 .mobile-top-settings { display: grid; place-items: center; padding: 0; color: #17324d; }
  .mission-v2 .mobile-top-settings svg { width: 18px; height: 18px; }
  .mission-v2 .theme-control { display: grid; place-items: center; padding: 0; overflow: hidden; }
  .mission-v2 .theme-control > button { display: none; }
  .mission-v2 .theme-control > button[data-theme-choice="light"] { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 50%; }

  .mission-v2 .workspace {
    grid-template-columns: minmax(0, 1fr) 104px;
    grid-template-rows: 348px 132px;
    gap: 8px;
    min-height: calc(100dvh - 76px);
    padding: 10px 12px 278px;
    background-color: #f4eee2;
    background-image: url("/academy-assets/assets/mobile-desk-background.webp");
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
  }
  html[data-theme="dark"] .mission-v2 .workspace {
    background-color: var(--background-dark);
    background-image: none;
  }
  .mission-v2 .main {
    display: contents;
  }
  .mission-v2 .crumbs { display: none; }
  .mission-v2 .mobile-learning-board {
    position: relative;
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 6px;
    min-width: 0;
    height: 348px;
    min-height: 0;
    padding: 13px 11px 11px;
    overflow: hidden;
    border: 1px solid rgba(23, 50, 77, .35);
    border-radius: 22px;
    background: rgba(255, 252, 246, .95);
    box-shadow: 0 12px 28px rgba(24, 50, 75, .14), inset 0 0 0 4px rgba(255, 255, 255, .62);
  }
  html[data-theme="dark"] .mission-v2 .mobile-learning-board { background: rgba(23, 35, 30, .96); }
  .mission-v2 .mobile-learning-board > .mission-meta {
    display: flex;
    margin: 0;
    padding: 0 3px;
  }
  .mission-v2 .mobile-learning-board > h1,
  .mission-v2 .mobile-learning-board > .objective,
  .mission-v2 .mobile-learning-board > .mission-journey { display: none; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile {
    position: absolute;
    z-index: 18;
    top: 11px;
    right: 10px;
    display: block;
    margin: 0;
    border: 0;
    background: transparent !important;
  }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile > summary {
    display: grid;
    width: 31px;
    min-height: 31px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(23, 50, 77, .12);
    border-radius: 50%;
    background: rgba(255, 252, 246, .96);
    box-shadow: 0 5px 12px rgba(24, 50, 75, .08);
  }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile > summary :is(span, em) { display: none; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile > summary svg { display: block; width: 15px; height: 15px; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile[open] {
    position: absolute;
    z-index: 20;
    inset: 47px 10px 10px;
    max-height: none;
    overflow: auto;
    background: var(--card);
    box-shadow: 0 16px 35px rgba(24, 50, 75, .18);
  }
  .mission-v2 .mobile-journey-button {
    position: absolute;
    z-index: 22;
    top: 2.1dvh;
    right: 2.1vw;
    display: grid;
    width: 7.8vw;
    height: 7.8vw;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #17324d;
  }
  .mission-v2 .mobile-journey-button svg { width: 4vw; height: 4vw; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile[open] > summary { position: absolute; top: 8px; right: 8px; z-index: 2; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile[open] > .topic-overview-list { height: 100%; padding-top: 42px; overflow: auto; }
  .mission-v2 .mobile-learning-board > .step-stage {
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    padding: 2px 5px 4px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scrollbar-gutter: auto;
  }
  .mission-v2 .step-stage::after { display: none; }
  .mission-v2 .step-stage h2 {
    margin: 5px 0 7px;
    font-size: clamp(1.2rem, 5.9vw, 1.55rem);
    line-height: 1.04;
  }
  .mission-v2 .step-stage :is(p, li, label, input, textarea, button) {
    font-size: .78rem;
    line-height: 1.5;
  }
  .mission-v2 .step-stage .learning-copy .lead { font-size: .82rem; }
  .mission-v2 .step-stage .learning-copy { max-height: 112px; overflow: hidden; }
  .mission-v2 .step-stage .learning-copy > :not(.lead):not(:first-child) { display: none; }
  .mission-v2 .mobile-desk-teaser > p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #526672;
    font-size: clamp(.63rem, 2.85vw, .76rem);
    line-height: 1.52;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
  }
  .mission-v2 .learning-listen { order: 5; margin: auto 0 0; }
  .mission-v2 .learning-listen-button { min-height: 36px; padding: 8px 11px; }

  .mission-v2 .mobile-board-progress {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-height: 44px;
    padding: 2px 2px 0;
    overflow: hidden;
  }
  .mission-v2 .mobile-board-progress .journey-stop {
    position: relative;
    display: grid;
    flex: 1 1 20%;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    color: var(--muted);
  }
  .mission-v2 .mobile-board-progress .journey-stop:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 10px;
    left: calc(50% + 10px);
    width: calc(100% - 20px);
    height: 2px;
    background: var(--line);
  }
  .mission-v2 .mobile-board-progress .journey-stop > span:not(.sr-only) {
    z-index: 1;
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);
    font-size: 9px;
  }
  .mission-v2 .mobile-board-progress .journey-stop.completed > span:not(.sr-only),
  .mission-v2 .mobile-board-progress .journey-stop.active > span:not(.sr-only) {
    border-color: var(--light-accent-teal);
    background: var(--light-accent-teal);
    color: white;
  }
  .mission-v2 .mobile-board-progress .journey-stop.completed:not(:last-child)::after { background: var(--light-accent-teal); }
  .mission-v2 .mobile-board-progress .journey-stop small {
    width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 6px;
    font-weight: 750;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mission-v2 .mobile-board-progress .journey-stop:nth-child(n+6) { display: none; }
  .mission-v2 .mobile-learning-board > .feedback { max-height: 74px; margin: 0; overflow: auto; padding: 9px 11px; }
  .mission-v2 .mobile-learning-board > .feedback p { margin: 3px 0 0; font-size: .7rem; line-height: 1.35; }
  .mission-v2 .mobile-learning-board > .actions { margin: 0; }
  .mission-v2 .mobile-learning-board > .station-blocked-reason { margin: 0; font-size: .68rem; }
  .mission-v2 .mobile-learning-board > .station-navigation {
    position: static;
    z-index: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .mission-v2 .mobile-learning-board > .station-navigation button {
    width: 100%;
    min-width: 0;
    min-height: 39px;
    padding: 8px 10px;
    gap: 5px;
    font-size: .72rem;
  }
  .mission-v2 .mobile-learning-board > .station-navigation #station-back { display: none; }
  .mission-v2 .mobile-learning-board > .station-navigation #station-next { width: 48%; justify-self: end; }

  .mission-v2 .tutor {
    position: relative;
    top: auto;
    grid-column: 2;
    align-self: start;
    width: 104px;
    grid-row: 1;
    height: 348px;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    border-color: rgba(47, 124, 114, .34);
    border-radius: 22px;
    background: rgba(255, 250, 242, .94);
    box-shadow: 0 12px 28px rgba(24, 50, 75, .12);
  }
  .mission-v2 .tutor-head {
    display: flex;
    align-items: flex-start;
    padding: 12px 9px 3px;
    border: 0;
  }
  .mission-v2 .tutor-head .brand-mark,
  .mission-v2 .tutor-head .tutor-close { display: none; }
  .mission-v2 .tutor-head strong { font-size: .59rem; letter-spacing: .12em; text-transform: uppercase; }
  .mission-v2 .tutor-head small { color: var(--light-accent-teal); font-size: .51rem; }
  .mission-v2 .tutor-workspace .tutor-presence { padding: 10px 7px 6px; }
  .mission-v2 .tutor-workspace .tutor-avatar-shell,
  .mission-v2 .tutor-workspace .tutor-avatar-stage { min-height: 156px; }
  .mission-v2 .tutor-workspace .tutor-avatar-shell { min-height: 156px; background: #fffaf2; }
  .mission-v2 .tutor-avatar-stage { background: url("/academy-assets/assets/mobile-tutor-companion.png") center 42% / 172% auto no-repeat; }
  .mission-v2 .tutor-avatar-stage > * { display: none !important; }
  .mission-v2 .tutor-avatar-shell { border-radius: 18px; }
  .mission-v2 .tutor .context { padding: 9px 7px; }
  .mission-v2 .tutor .context span { font-size: .52rem; }
  .mission-v2 .tutor .context b { font-size: .58rem; line-height: 1.3; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) { margin-top: auto; padding: 8px 7px 10px; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) button {
    min-height: 39px;
    padding: 7px 5px;
    font-size: .58rem;
  }

  .mobile-desk-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    width: calc(100vw - 24px);
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 12px;
    margin: 8px 0 0;
  }
  .mobile-workbook-card,
  .mobile-takeaway-card {
    min-height: 132px;
    border-color: rgba(24, 50, 75, .18);
    border-radius: 8px 22px 22px 8px;
    background: rgba(255, 252, 246, .95);
    box-shadow: 0 14px 26px rgba(67, 45, 25, .12);
  }
  .mobile-workbook-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-content: space-between;
    padding: 13px 12px;
    border-left: 5px double rgba(197, 138, 50, .7);
  }
  .mobile-workbook-card em {
    position: absolute;
    right: 12px;
    bottom: 31px;
    left: 12px;
    align-self: end;
    min-height: 29px;
    padding: 7px 9px;
    border: 1px solid rgba(47, 124, 114, .25);
    border-radius: 10px;
    background: rgba(255, 255, 255, .48);
  }
  .mobile-takeaway-card {
    border-radius: 14px 14px 22px 14px;
    background: rgba(255, 242, 195, .92);
    transform: rotate(-1deg);
  }
  .mobile-workbook-card strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .72rem;
  }
  .mobile-takeaway-card strong { font-size: .7rem; -webkit-line-clamp: 5; }

  .mobile-workspace-navigation {
    left: 28px;
    right: 28px;
    bottom: calc(212px + env(safe-area-inset-bottom));
    min-height: 67px;
    border-radius: 24px 24px 14px 14px;
    background: rgba(255, 252, 246, .96);
  }

  .mobile-tutor-sheet {
    position: fixed;
    z-index: 76;
    right: 10px;
    bottom: 0;
    left: 10px;
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: start;
    gap: 8px;
    height: 238px;
    padding: 8px 15px calc(12px + env(safe-area-inset-bottom));
    overflow: hidden;
    border: 1px solid rgba(23, 50, 77, .18);
    border-radius: 25px 25px 0 0;
    background: rgba(255, 252, 247, .98);
    box-shadow: 0 -16px 42px rgba(31, 35, 35, .2);
    transition: transform .24s ease;
  }
  .mobile-tutor-sheet.collapsed { transform: translateY(calc(100% - 48px)); }
  .mobile-tutor-sheet-handle { width: 34px; height: 4px; margin: 0 auto; border-radius: 999px; background: rgba(23, 50, 77, .18); }
  .mobile-tutor-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-tutor-sheet > header > div { display: flex; align-items: center; gap: 8px; }
  .mobile-tutor-sheet > header strong { font-size: .82rem; color: #17324d; }
  .mobile-tutor-sheet > header small { display: flex; align-items: center; gap: 4px; color: #61717b; font-size: .58rem; }
  .mobile-tutor-sheet > header small i { width: 6px; height: 6px; border-radius: 50%; background: #239b77; }
  .mobile-tutor-sheet > header button { width: 30px; height: 30px; border: 1px solid rgba(23, 50, 77, .12); border-radius: 50%; background: #fffaf2; color: #17324d; }
  .mobile-tutor-sheet-thread { display: grid; align-content: start; gap: 7px; min-height: 0; overflow: hidden auto; }
  .mobile-tutor-message { max-width: 76%; margin: 0 0 0 auto; padding: 8px 10px; border: 1px solid rgba(47, 124, 114, .16); border-radius: 13px 13px 4px 13px; background: #edf6f2; color: #334b57; font-size: .65rem; line-height: 1.35; }
  .mobile-tutor-answer { display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: end; gap: 7px; }
  .mobile-tutor-answer img { width: 35px; height: 35px; object-fit: cover; object-position: center 35%; border-radius: 10px; }
  .mobile-tutor-answer p { max-height: 52px; margin: 0; padding: 8px 10px; overflow: hidden; border: 1px solid rgba(23, 50, 77, .1); border-radius: 13px 13px 13px 4px; background: #fff; color: #334b57; font-size: .65rem; line-height: 1.35; }
  .mobile-tutor-composer { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 7px; margin-left: 42px; padding: 5px 5px 5px 10px; border: 1px solid rgba(23, 50, 77, .14); border-radius: 14px; background: #fff; }
  .mobile-tutor-composer textarea { min-width: 0; height: 28px; min-height: 28px; padding: 6px 0; resize: none; overflow: hidden; border: 0; outline: 0; background: transparent; color: #17324d; font: inherit; font-size: .66rem; }
  .mobile-tutor-composer button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; background: #238b78; color: white; font-size: .8rem; }
}

/* Approved mobile master template, August 2026.
   The supplied filled mockup defines the geometry. The clean raster shell
   supplies the physical desk, board, tutor, workbook, note, dock and sheet;
   live Academy controls are fitted into those fixed zones. */
@media (max-width: 540px) {
  html,
  body { width: 100%; }
  html:has(.mission-v2),
  body:has(.mission-v2) { height: 100%; overflow: hidden; }
  body { background: #f7efe5; }
  .mission-v2 {
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 640px;
    overflow: hidden;
    padding: 0;
    background: #f7efe5 url("/academy-assets/assets/mobile-approved-master-shell.png") center / 100% 100% no-repeat;
    color: #17324d;
  }
  html[data-theme="dark"] .mission-v2 {
    background: #f7efe5 url("/academy-assets/assets/mobile-approved-master-shell.png") center / 100% 100% no-repeat;
    color: #17324d;
  }

  .mission-v2 .topbar {
    position: absolute;
    z-index: 50;
    inset: 0 0 auto;
    display: block;
    width: 100%;
    height: 12.8dvh;
    min-height: 82px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .mission-v2 .topbar .brand {
    position: absolute;
    top: 5.1dvh;
    left: 3.25vw;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 41vw;
    min-width: 0;
  }
  .mission-v2 .topbar .brand-mark {
    width: 12.4vw;
    height: 12.4vw;
    flex: 0 0 12.4vw;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #17324d;
    font-size: clamp(.8rem, 4.6vw, 1.1rem);
  }
  .mission-v2 .topbar .brand strong {
    max-width: 26vw;
    color: #17324d;
    font-size: clamp(.62rem, 3.05vw, .84rem);
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mission-v2 .topbar .brand small,
  .mission-v2 .topbar .program,
  .mission-v2 .progress-head > span,
  .mission-v2 .progress-head > strong,
  .mission-v2 .progress-head > .learner { display: none; }
  .mission-v2 .progress-head {
    position: absolute;
    inset: 0;
    display: block;
  }
  .mission-v2 .header-controls {
    position: absolute;
    top: 5.05dvh;
    right: 3.4vw;
    display: grid;
    grid-template-columns: 11.5vw 10.8vw 10.8vw 10.8vw;
    align-items: center;
    gap: 1.5vw;
  }
  .mission-v2 .language-switcher {
    grid-column: 1;
    min-width: 0;
  }
  .mission-v2 .language-switcher label { display: none; }
  .mission-v2 .language-switcher select {
    width: 11.5vw;
    min-width: 0;
    max-width: none;
    min-height: 9.8vw;
    padding: 0 4.2vw 0 1.8vw;
    border: 1px solid rgba(23, 50, 77, .08);
    border-radius: 999px;
    background-color: rgba(255, 252, 247, .78);
    box-shadow: none;
    color: #17324d;
    font-size: clamp(.44rem, 2.15vw, .58rem);
    font-weight: 850;
  }
  .mission-v2 .tutor-header-settings,
  .mission-v2 .mobile-top-settings,
  .mission-v2 .theme-control { margin: 0; }
  .mission-v2 .tutor-header-settings > summary,
  .mission-v2 .mobile-top-settings,
  .mission-v2 .theme-control {
    width: 10.8vw;
    min-width: 10.8vw;
    height: 10.8vw;
    min-height: 10.8vw;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
  }
  .mission-v2 .tutor-header-settings > summary { color: #238b78; }
  .mission-v2 .tutor-header-settings > summary svg,
  .mission-v2 .mobile-top-settings svg { width: 4.8vw; height: 4.8vw; }
  .mission-v2 .theme-control > button[data-theme-choice="light"] {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border: 0;
    background: transparent;
    color: #17324d;
    font-size: clamp(.7rem, 4vw, 1rem);
  }

  .mission-v2 .workspace {
    position: absolute;
    z-index: 10;
    inset: 12.8dvh 0 auto;
    display: grid;
    grid-template-columns: 64.9vw 28.2vw;
    grid-template-rows: 42.9dvh 20.5dvh;
    gap: 1.9vw 2vw;
    width: 100%;
    height: 63.4dvh;
    min-height: 0;
    padding: 0 3.8vw;
    overflow: visible;
    background: transparent !important;
  }
  html:not([data-theme="dark"]) .mission-v2 .workspace,
  html[data-theme="dark"] .mission-v2 .workspace { background: transparent !important; }
  .mission-v2 .sidebar { display: none; }
  .mission-v2 .main { display: contents; }
  .mission-v2 .crumbs,
  .mission-v2 .mission-main > h1,
  .mission-v2 .objective { display: none; }

  .mission-v2 .mobile-learning-board {
    position: relative;
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 42.9dvh;
    min-width: 0;
    min-height: 0;
    padding: 2.8dvh 3.4vw 2.1dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
  }
  html:not([data-theme="dark"]) .mission-v2 .mobile-learning-board,
  html[data-theme="dark"] .mission-v2 .mobile-learning-board { background: transparent !important; }
  .mission-v2 .mobile-learning-board > .mission-meta {
    position: absolute;
    z-index: 2;
    top: 2.45dvh;
    left: 3.6vw;
    display: flex;
    align-items: center;
    gap: 2.2vw;
    margin: 0;
    padding: 0;
  }
  .mission-v2 .mobile-learning-board > .mission-meta span {
    color: #218b78;
    font-size: clamp(.42rem, 2.1vw, .57rem);
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .mission-v2 .mobile-learning-board > .mission-meta .tag {
    padding: .35em .7em;
    border: 0;
    border-radius: 999px;
    background: #fae9e7;
    color: #b86c67;
  }
  .mission-v2 .mobile-learning-board > h1,
  .mission-v2 .mobile-learning-board > .objective,
  .mission-v2 .mobile-learning-board > .mission-journey { display: none; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile {
    position: absolute;
    z-index: 22;
    top: 2.1dvh;
    right: 2.1vw;
    display: block;
    margin: 0;
    border: 0;
    background: transparent;
  }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile > summary {
    display: grid;
    width: 7.8vw;
    min-height: 7.8vw;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
  }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile > summary :is(span, em) { display: none; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile > summary svg { width: 4vw; height: 4vw; }
  .mission-v2 .mobile-learning-board > .topic-overview-mobile[open] {
    inset: 1.8dvh 2vw 7.8dvh;
    max-height: none;
    padding: 1.2dvh 2.4vw;
    overflow: auto;
    border-radius: 4vw;
    background: rgba(255, 252, 247, .98);
    box-shadow: 0 12px 35px rgba(23, 50, 77, .18);
  }
  .mission-v2 .mobile-learning-board > .step-stage {
    position: absolute;
    inset: 5.5dvh 3.4vw 12.1dvh;
    display: block;
    width: auto;
    min-width: 0;
    min-height: 0;
    max-height: none;
    padding: 0;
    overflow: hidden auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scrollbar-width: thin;
  }
  .mission-v2 .step-stage::after,
  .mission-v2 .step-kicker { display: none; }
  .mission-v2 .step-stage h2 {
    margin: 0 0 1.35dvh;
    padding-right: 1vw;
    color: #17324d;
    font-size: clamp(1.14rem, 6.15vw, 1.55rem);
    line-height: 1.03;
    letter-spacing: -.035em;
  }
  .mission-v2 .step-stage :is(p, li, label, input, textarea, button) {
    color: #465a66;
    font-size: clamp(.62rem, 2.9vw, .76rem);
    line-height: 1.48;
  }
  .mission-v2 .step-stage .learning-copy { max-height: none; overflow: visible; }
  .mission-v2 .step-stage .learning-copy .lead {
    margin: 0;
    color: #526672;
    font-size: clamp(.63rem, 2.85vw, .76rem);
    line-height: 1.52;
  }
  .mission-v2 .step-stage .learning-copy > :not(.lead):not(:first-child) { display: none; }
  .mission-v2 .learning-listen {
    position: absolute;
    z-index: 5;
    bottom: 2.15dvh;
    left: 3.6vw;
    width: 34.2vw;
    margin: 0;
  }
  .mission-v2 .learning-listen-button {
    width: 100%;
    min-height: 5.7dvh;
    padding: 0 3vw;
    border: 0;
    background: transparent;
    color: #238b78;
    font-size: clamp(.48rem, 2.4vw, .64rem);
    white-space: nowrap;
  }
  .mission-v2 .mobile-board-progress {
    position: absolute;
    z-index: 4;
    right: 4vw;
    bottom: 7.9dvh;
    left: 4vw;
    display: flex;
    align-items: flex-start;
    min-height: 4.7dvh;
    padding: 0;
    overflow: hidden;
  }
  .mission-v2 .mobile-board-progress .journey-stop { gap: .45dvh; }
  .mission-v2 .mobile-board-progress .journey-stop > span:not(.sr-only) {
    width: 5.5vw;
    height: 5.5vw;
    border: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
  }
  .mission-v2 .mobile-board-progress .journey-stop:not(:last-child)::after { top: 2.7vw; background: transparent; }
  .mission-v2 .mobile-board-progress .journey-stop small {
    color: #78858b;
    font-size: clamp(.36rem, 1.65vw, .45rem);
    line-height: 1.1;
  }
  .mission-v2 .mobile-board-progress .journey-stop:nth-child(n+6) { display: none; }
  .mission-v2 .mobile-learning-board > .feedback {
    position: absolute;
    z-index: 19;
    inset: 5.5dvh 3vw 7.8dvh;
    max-height: none;
    margin: 0;
    padding: 2dvh 3vw;
    overflow: auto;
    border-radius: 3.2vw;
    background: rgba(255, 252, 247, .98);
  }
  .mission-v2 .mobile-learning-board > .feedback p { font-size: .66rem; }
  .mission-v2 .mobile-learning-board > .actions {
    position: absolute;
    z-index: 7;
    right: 3.6vw;
    bottom: 2.15dvh;
    width: 34.2vw;
    margin: 0;
  }
  .mission-v2 .mobile-learning-board > .actions button { width: 100%; min-height: 5.7dvh; }
  .mission-v2 .mobile-learning-board > .station-blocked-reason { display: none; }
  .mission-v2 .mobile-learning-board > .station-navigation {
    position: absolute;
    z-index: 6;
    right: 3.6vw;
    bottom: 2.15dvh;
    display: block;
    width: 34.2vw;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .mission-v2 .mobile-learning-board > .station-navigation button {
    width: 100%;
    min-height: 5.7dvh;
    padding: 0 3vw;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: clamp(.55rem, 2.7vw, .7rem);
    font-weight: 850;
  }
  .mission-v2 .mobile-learning-board > .station-navigation #station-back { display: none; }
  .mission-v2 .mobile-learning-board > .station-navigation #station-next { width: 100%; }

  .mission-v2 .tutor {
    position: relative;
    top: auto;
    grid-column: 2;
    grid-row: 1;
    display: flex;
    width: 100%;
    height: 42.9dvh;
    min-height: 0;
    max-height: none;
    align-self: stretch;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .mission-v2 .tutor-head {
    position: absolute;
    z-index: 3;
    top: 2.4dvh;
    left: 2.8vw;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .mission-v2 .tutor-head .brand-mark,
  .mission-v2 .tutor-head .tutor-close { display: none; }
  .mission-v2 .tutor-head strong {
    color: #218b78;
    font-size: clamp(.42rem, 2.05vw, .55rem);
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .mission-v2 .tutor-head small {
    display: flex;
    align-items: center;
    gap: 1vw;
    margin-top: .4dvh;
    color: #4d6e68;
    font-size: clamp(.39rem, 1.8vw, .49rem);
  }
  .mission-v2 .tutor-workspace { width: 100%; }
  .mission-v2 .tutor-workspace .tutor-presence {
    height: 27.1dvh;
    min-height: 0;
    padding: 0;
    background: transparent !important;
  }
  .mission-v2 .tutor-workspace .tutor-avatar-shell,
  .mission-v2 .tutor-workspace .tutor-avatar-stage {
    width: 100%;
    height: 27.1dvh;
    min-height: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none;
  }
  .mission-v2 .tutor-avatar-stage > *,
  .mission-v2 .tutor-workspace .tutor-presence-status { display: none !important; }
  .mission-v2 .tutor .context {
    position: absolute;
    z-index: 4;
    right: 1.7vw;
    bottom: 6.9dvh;
    left: 1.7vw;
    display: grid;
    gap: .45dvh;
    max-height: 8.6dvh;
    padding: 1.2dvh 2vw;
    overflow: hidden;
    border: 0;
    background: transparent;
  }
  .mission-v2 .tutor .context span {
    color: #218b78;
    font-size: clamp(.36rem, 1.7vw, .45rem);
    letter-spacing: .1em;
  }
  .mission-v2 .tutor .context b {
    display: -webkit-box;
    overflow: hidden;
    color: #41545d;
    font-size: clamp(.42rem, 2vw, .54rem);
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) {
    position: absolute;
    z-index: 5;
    right: 2.1vw;
    bottom: 2.2dvh;
    left: 2.1vw;
    display: block;
    margin: 0;
    padding: 0;
  }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) button {
    width: 100%;
    min-height: 4.8dvh;
    padding: 0 1vw;
    border: 0;
    background: transparent;
    color: #238b78;
    font-size: clamp(.43rem, 2.05vw, .56rem);
  }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) button:not(.primary) { display: none; }
  .mission-v2 .tutor-history-button { display: none; }

  .mobile-desk-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 48.2vw 43vw;
    gap: 2.9vw;
    width: 94.1vw;
    height: 20.5dvh;
    margin: 0;
  }
  .mobile-workbook-card,
  .mobile-takeaway-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 2.1dvh 3vw;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    transform: none;
  }
  .mobile-workbook-card {
    display: block;
    padding-left: 5.4vw;
    text-align: left;
  }
  .mobile-workbook-card > span { display: grid; gap: .5dvh; padding-right: 2vw; }
  .mobile-workbook-card small,
  .mobile-takeaway-card small {
    color: #218b78;
    font-size: clamp(.39rem, 1.9vw, .5rem);
    font-weight: 900;
    letter-spacing: .12em;
  }
  .mobile-workbook-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #17324d;
    font-size: clamp(.62rem, 3.2vw, .84rem);
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .mobile-workbook-card p {
    display: -webkit-box;
    margin: .35dvh 0 0;
    overflow: hidden;
    color: #61717b;
    font-size: clamp(.43rem, 1.95vw, .54rem);
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .mobile-workbook-card > i { display: none; }
  .mobile-workbook-card em {
    position: absolute;
    right: 5vw;
    bottom: 2.2dvh;
    left: 5.4vw;
    min-height: 4.35dvh;
    padding: 0 2.4vw;
    align-items: center;
    border: 0;
    background: transparent;
    color: #238b78;
    font-size: clamp(.45rem, 2.2vw, .58rem);
  }
  .mobile-takeaway-card { padding: 2.3dvh 4.1vw 2dvh; }
  .mobile-takeaway-card > i { display: none; }
  .mobile-takeaway-card > span { display: grid; gap: .8dvh; padding: 0; }
  .mobile-takeaway-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #324553;
    font-size: clamp(.55rem, 2.7vw, .72rem);
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
  }

  .mobile-workspace-navigation {
    position: absolute;
    z-index: 80;
    right: 12.4vw;
    bottom: 17.9dvh;
    left: 12.4vw;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    width: auto;
    min-height: 9.1dvh;
    padding: 1.05dvh 1.8vw;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    backdrop-filter: none;
  }
  .mobile-workspace-navigation button {
    gap: .4dvh;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #46545b;
    font-size: clamp(.38rem, 1.75vw, .47rem);
  }
  .mobile-workspace-navigation button svg { width: 4.8vw; height: 4.8vw; }
  .mobile-workspace-navigation button.active { background: transparent; color: #fff; }

  .mobile-tutor-sheet {
    position: absolute;
    z-index: 76;
    inset: auto 4.8vw 0;
    display: grid;
    grid-template-rows: 1.2dvh auto minmax(0, 1fr);
    gap: .75dvh;
    width: auto;
    height: 20.6dvh;
    padding: .9dvh 4.5vw 1.8dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: transform .24s ease;
  }
  .mobile-tutor-sheet-handle { width: 10.2vw; height: .55dvh; background: transparent; }
  .mobile-tutor-sheet > header {
    min-height: 2.8dvh;
    padding: 0;
  }
  .mobile-tutor-sheet > header strong { color: #17324d; font-size: clamp(.55rem, 2.7vw, .72rem); }
  .mobile-tutor-sheet > header small { color: #61717b; font-size: clamp(.36rem, 1.65vw, .45rem); }
  .mobile-tutor-sheet > header button {
    width: 7vw;
    height: 7vw;
    border: 0;
    background: transparent;
  }
  .mobile-tutor-sheet-launch {
    display: grid;
    grid-template-columns: 9vw minmax(0, 1fr) 8vw;
    align-items: center;
    gap: 1.7vw;
    min-height: 10.8dvh;
    margin: 0 1vw;
    padding: .8dvh 1vw;
    border: 0;
    background: transparent;
    color: #334b57;
    text-align: left;
  }
  .mobile-tutor-sheet-launch img { width: 9vw; height: 9vw; opacity: 0; }
  .mobile-tutor-sheet-launch span {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(.46rem, 2.1vw, .57rem);
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .mobile-tutor-sheet-launch b {
    display: grid;
    width: 8vw;
    height: 8vw;
    place-items: center;
    border-radius: 50%;
    color: #fff;
  }
  .mobile-tutor-sheet-thread {
    display: grid;
    align-content: start;
    gap: .7dvh;
    min-height: 0;
    padding: 0 1vw;
    overflow: hidden auto;
  }
  .mobile-tutor-message {
    max-width: 67%;
    margin: 0 0 0 auto;
    padding: .7dvh 2.1vw;
    border: 0;
    background: rgba(237, 246, 242, .72);
    color: #334b57;
    font-size: clamp(.42rem, 1.95vw, .52rem);
  }
  .mobile-tutor-answer {
    grid-template-columns: 9vw minmax(0, 1fr);
    gap: 1.7vw;
  }
  .mobile-tutor-answer img { opacity: 0; width: 9vw; height: 9vw; }
  .mobile-tutor-answer p {
    max-height: 5.8dvh;
    padding: .75dvh 2.1vw;
    overflow: hidden;
    border: 0;
    background: rgba(255, 255, 255, .7);
    color: #334b57;
    font-size: clamp(.42rem, 1.95vw, .52rem);
  }
  .mobile-tutor-composer {
    grid-template-columns: minmax(0, 1fr) 8vw;
    gap: 1.5vw;
    margin: 0 1vw 0 10.7vw;
    padding: .35dvh .8vw .35dvh 2vw;
    border: 0;
    background: transparent;
  }
  .mobile-tutor-composer textarea {
    height: 4.6dvh;
    min-height: 4.6dvh;
    padding: 1.1dvh 0;
    color: #17324d;
    font-size: clamp(.42rem, 2vw, .54rem);
  }
  .mobile-tutor-composer button {
    width: 8vw;
    height: 8vw;
    border: 0;
    background: transparent;
    color: #fff;
  }

  /* The photographed master shell owns these surfaces. Keep every live
     component layer transparent so the approved board, tutor, desk objects,
     dock and chat sheet remain visible underneath the dynamic content. */
  html:not([data-theme="dark"]) .mission-v2 .topbar,
  html:not([data-theme="dark"]) .mission-v2 .tutor,
  html:not([data-theme="dark"]) .mission-v2 .tutor-workspace,
  html:not([data-theme="dark"]) .mission-v2 .tutor-workspace .tutor-presence,
  html:not([data-theme="dark"]) .mission-v2 .tutor-workspace .tutor-avatar-shell,
  html:not([data-theme="dark"]) .mission-v2 .tutor-workspace .tutor-avatar-stage,
  html[data-theme="dark"] .mission-v2 .topbar,
  html[data-theme="dark"] .mission-v2 .tutor,
  html[data-theme="dark"] .mission-v2 .tutor-workspace,
  html[data-theme="dark"] .mission-v2 .tutor-workspace .tutor-presence,
  html[data-theme="dark"] .mission-v2 .tutor-workspace .tutor-avatar-shell,
  html[data-theme="dark"] .mission-v2 .tutor-workspace .tutor-avatar-stage {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  /* Mobile workspace interaction model: the photographed desk is the
     permanent control surface. Input-heavy work opens in one focused view. */
  .mission-v2 .tutor-header-settings[open] .tutor-header-popover { display: none; }
  .mobile-focus-view {
    position: fixed;
    z-index: 1500;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #fffaf3;
    color: #17324d;
  }
  html[data-theme="dark"] .mobile-focus-view { background: #17231e; color: #edf5f1; }
  .mobile-focus-view > header {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    min-height: 70px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid var(--line, #d9e1dc);
    background: inherit;
  }
  .mobile-focus-view > header strong { overflow: hidden; font-size: .98rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-focus-view > header button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line, #d9e1dc);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.25rem;
  }
  .mobile-knowledge-menu-view {
    justify-content: flex-end;
    background: transparent !important;
    color: #17324d;
  }
  .mobile-knowledge-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(9, 25, 31, .48);
    backdrop-filter: blur(5px);
  }
  .mobile-knowledge-sheet {
    position: relative;
    z-index: 2;
    display: flex;
    max-height: min(84dvh, 760px);
    flex-direction: column;
    padding: 8px 16px max(20px, env(safe-area-inset-bottom));
    overflow: hidden;
    border: 1px solid rgba(23, 50, 77, .12);
    border-radius: 28px 28px 0 0;
    background: #fffaf3;
    box-shadow: 0 -18px 48px rgba(9, 25, 31, .2);
  }
  html[data-theme="dark"] .mobile-knowledge-sheet {
    border-color: rgba(237, 245, 241, .14);
    background: #17231e;
    color: #edf5f1;
  }
  .mobile-knowledge-sheet-handle {
    width: 42px;
    height: 5px;
    margin: 0 auto 8px;
    border-radius: 99px;
    background: rgba(83, 102, 112, .35);
  }
  .mobile-knowledge-sheet > header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: start;
    gap: 12px;
    padding: 4px 2px 14px;
  }
  .mobile-knowledge-sheet > header small {
    color: #27766b;
    font-size: .63rem;
    font-weight: 900;
    letter-spacing: .14em;
  }
  .mobile-knowledge-sheet > header h2 { margin: 4px 0 3px; font-size: 1.5rem; line-height: 1.08; }
  .mobile-knowledge-sheet > header p { margin: 0; color: #61717b; font-size: .78rem; line-height: 1.35; }
  html[data-theme="dark"] .mobile-knowledge-sheet > header p { color: #b7c7c0; }
  .mobile-knowledge-sheet > header button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(23, 50, 77, .15);
    border-radius: 50%;
    background: rgba(255,255,255,.64);
    color: inherit;
    font-size: 1.4rem;
  }
  .mobile-knowledge-card-list {
    display: grid;
    gap: 12px;
    padding: 2px 1px 8px;
    overflow: auto;
    overscroll-behavior: contain;
  }
  .mobile-knowledge-card-list .knowledge-story-launcher.compact {
    width: 100%;
    min-height: 128px;
    margin: 0;
    border-radius: 18px;
  }
  .mobile-knowledge-card-list .knowledge-card-copy { min-height: 128px; }
  /* The tutor is a dedicated mobile workspace. The Academy top bar and the
     four-area navigation stay visible; only the tutor work surface replaces
     the photographed desk below them. */
  :is(.mission-v2, .legacy-mobile-workspace):has(.mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"]) .mobile-workspace-navigation {
    position: fixed;
    z-index: 1602;
    top: 10.6dvh;
    right: 3.4vw;
    bottom: auto;
    left: 3.4vw;
    min-height: 8.2dvh;
    padding: .7dvh 1.4vw;
    border: 1px solid rgba(23, 50, 77, .12);
    border-radius: 22px;
    background: rgba(255, 252, 247, .96) !important;
    box-shadow: 0 8px 24px rgba(23, 50, 77, .08);
    backdrop-filter: blur(16px);
  }
  html[data-theme="dark"] :is(.mission-v2, .legacy-mobile-workspace):has(.mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"]) .mobile-workspace-navigation {
    border-color: rgba(237, 245, 241, .15);
    background: rgba(23, 35, 30, .96) !important;
  }
  :is(.mission-v2, .legacy-mobile-workspace):has(.mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"]) .mobile-workspace-navigation button {
    color: var(--muted, #61717b);
    font-size: clamp(.58rem, 2.55vw, .72rem);
  }
  :is(.mission-v2, .legacy-mobile-workspace):has(.mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"]) .mobile-workspace-navigation button.active {
    background: #17324d;
    color: #fff;
  }
  .mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"] {
    z-index: 1500;
    top: 19.5dvh;
    height: calc(80.5dvh - env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 36px rgba(23, 50, 77, .12);
  }
  .mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"] > header {
    min-height: 56px;
    padding: 7px 14px;
  }
  .mobile-tutor-page {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    min-height: 0;
    flex: 1;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .mobile-tutor-hero {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 80px;
    padding: 8px 12px;
    overflow: hidden;
    border: 1px solid var(--line, #d9e1dc);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(232, 244, 239, .95), rgba(255, 249, 239, .96));
  }
  html[data-theme="dark"] .mobile-tutor-hero { background: linear-gradient(135deg, #21372f, #1a2923); }
  .mobile-tutor-hero > img {
    display: block;
    width: 100%;
    max-width: 64px;
    height: 64px;
    object-fit: contain;
    object-position: center bottom;
  }
  .mobile-tutor-hero > div { display: grid; align-content: center; gap: 5px; min-width: 0; }
  .mobile-tutor-hero .eyebrow { color: var(--lime, #238b78); font-size: .68rem; letter-spacing: .12em; }
  .mobile-tutor-hero strong { font-size: .92rem; line-height: 1.2; }
  .mobile-tutor-hero small { display: grid; gap: 2px; overflow: hidden; color: var(--muted, #61717b); font-size: .72rem; line-height: 1.3; }
  .mobile-tutor-hero small b { color: var(--lime, #238b78); font-size: .61rem; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-tutor-hero small span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .mobile-tutor-split {
    display: grid;
    grid-template-rows: repeat(2, minmax(118px, 1fr));
    gap: 10px;
    min-height: 0;
    overflow: hidden;
  }
  .mobile-tutor-output-card,
  .mobile-tutor-input-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 118px;
    overflow: hidden;
    border: 1px solid var(--line, #d9e1dc);
    border-radius: 20px;
    background: var(--card, #fff);
  }
  html[data-theme="dark"] :is(.mobile-tutor-output-card, .mobile-tutor-input-card) { background: #17231e; }
  :is(.mobile-tutor-output-card, .mobile-tutor-input-card) > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line, #d9e1dc);
  }
  :is(.mobile-tutor-output-card, .mobile-tutor-input-card) > header strong { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-tutor-card-open {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    padding: 13px 42px 13px 14px;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
  }
  .mobile-tutor-card-open > svg { position: absolute; right: 14px; bottom: 14px; width: 18px; height: 18px; color: var(--lime, #238b78); }
  .mobile-tutor-output-preview { display: block; max-height: 4.35em; overflow: hidden; }
  .mobile-tutor-output-preview p { margin: 0; font-size: .9rem; line-height: 1.45; }
  .mobile-tutor-output-preview small { display: none; }
  .mobile-tutor-question-preview { display: -webkit-box; overflow: hidden; color: var(--muted, #61717b); font-size: .9rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .mobile-tutor-question-preview.has-copy { color: inherit; }
  .mobile-tutor-output-scroll { min-height: 0; padding: 13px 14px; overflow: auto; overscroll-behavior: contain; }
  .mobile-tutor-output-scroll p { margin: 0; color: inherit; font-size: .95rem; line-height: 1.48; white-space: pre-wrap; }
  .mobile-tutor-output-scroll small { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line, #d9e1dc); color: var(--muted, #61717b); font-size: .74rem; line-height: 1.4; }
  .mobile-tutor-empty { color: var(--muted, #61717b) !important; }
  .mobile-tutor-detail {
    position: absolute;
    z-index: 6;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line, #d9e1dc);
    border-radius: 22px;
    background: var(--card, #fff);
    box-shadow: 0 16px 42px rgba(23, 50, 77, .14);
  }
  html[data-theme="dark"] .mobile-tutor-detail { background: #17231e; }
  .mobile-tutor-detail > header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line, #d9e1dc);
  }
  .mobile-tutor-detail > header > button:first-child { width: 40px; height: 40px; border: 1px solid var(--line, #d9e1dc); border-radius: 50%; background: transparent; color: inherit; font-size: 1.1rem; }
  .mobile-tutor-detail > header strong { overflow: hidden; font-size: .82rem; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
  .mobile-tutor-detail > header .speak-button { position: static; min-height: 38px; padding: 0 12px; }
  .mobile-tutor-question-detail { grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 12px; padding: 0 14px 14px; }
  .mobile-tutor-question-detail > header { margin: 0 -14px; }
  .mobile-tutor-question-detail > label { color: var(--lime, #238b78); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-tutor-question-detail textarea {
    width: 100%;
    min-height: 220px;
    max-height: none;
    padding: 12px 14px;
    resize: none;
    border: 1px solid var(--line, #d9e1dc);
    border-radius: 15px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.45;
  }
  .mobile-tutor-input-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-tutor-input-actions > button { min-height: 44px; border-radius: 999px; }
  .mobile-tutor-input-actions > button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 132px; margin-left: auto; }
  .mobile-tutor-input-actions svg { width: 18px; height: 18px; }
  .mobile-tutor-history { min-height: 0; padding: 10px; overflow: auto; border: 1px solid var(--line, #d9e1dc); border-radius: 20px; background: var(--card, #fff); }
  .mobile-tutor-history-button { min-height: 38px; border: 0; background: transparent; color: var(--muted, #61717b); font-size: .75rem; font-weight: 800; }
  .mobile-tutor-complete { padding: 16px; border: 1px solid var(--lime, #238b78); border-radius: 18px; background: rgba(35, 139, 120, .09); color: var(--lime, #238b78); font-weight: 900; }
  .mobile-tutor-page > .mobile-desk-navigation-row {
    position: static;
    z-index: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 5px;
    border: 1px solid var(--line, #d9e1dc);
    border-radius: 18px;
    background: var(--card, #fff);
    box-shadow: none;
  }
  .mobile-tutor-page > .mobile-desk-navigation-row button {
    display: grid;
    min-width: 0;
    min-height: 48px;
    padding: 5px 3px;
    place-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 13px;
    font-size: clamp(.55rem, 2.5vw, .68rem);
    line-height: 1.05;
    text-align: center;
  }
  .mobile-tutor-page > .mobile-desk-navigation-row button svg { width: 17px; height: 17px; }
  @media (max-height: 700px) {
    .mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"] { top: 18.5dvh; height: calc(81.5dvh - env(safe-area-inset-bottom)); }
    .mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"] > header { min-height: 48px; }
    .mobile-tutor-hero { min-height: 68px; }
    .mobile-tutor-hero > img { height: 54px; }
    .mobile-tutor-question-detail textarea { min-height: 170px; }
    .mobile-tutor-page > .mobile-desk-navigation-row { min-height: 52px; }
  }
  .mobile-focus-scroll {
    flex: 1;
    min-height: 0;
    padding: 22px 18px calc(34px + env(safe-area-inset-bottom));
    overflow: auto;
    overscroll-behavior: contain;
  }
  .mobile-focus-eyebrow { margin: 0 0 6px; color: var(--lime, #238b78); font-size: .69rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
  .mobile-focus-scroll > h2 { margin: 0 0 8px; font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.08; }
  .mobile-focus-scroll > h2 + p { margin: 0 0 22px; color: var(--muted, #65757f); }
  .mission-v2 .mobile-focus-view .step-stage {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    min-height: 0;
    max-height: none;
    padding: 20px;
    overflow: visible;
    border: 1px solid var(--line, #d9e1dc);
    border-radius: 22px;
    background: var(--card, #fff);
    box-shadow: 0 12px 32px rgba(23, 50, 77, .08);
  }
  html[data-theme="dark"] .mission-v2 .mobile-focus-view .step-stage { background: var(--surface-dark, #17231e); }
  .mission-v2 .mobile-focus-view .step-kicker { display: flex; }
  .mission-v2 .mobile-focus-view .step-stage h2 { margin: 8px 0 18px; font-size: clamp(1.45rem, 7vw, 2rem); }
  .mission-v2 .mobile-focus-view .step-stage :is(p, li, label, input, textarea, button) { font-size: .98rem; line-height: 1.52; }
  .mission-v2 .mobile-focus-view .step-stage .learning-copy > * { display: block; }
  .mission-v2 .mobile-focus-view .step-stage .content-sections { display: grid; }
  .mission-v2 .mobile-full-learning-view .mobile-full-learning-content .learning-copy {
    max-height: none;
    overflow: visible;
  }
  .mission-v2 .mobile-full-learning-view .mobile-full-learning-content .learning-copy > * {
    display: block !important;
  }
  .mission-v2 .mobile-full-learning-view .content-sections,
  .mission-v2 .mobile-full-learning-view .comparison {
    display: grid !important;
    grid-template-columns: 1fr;
  }
  .mission-v2 .mobile-full-learning-view .learning-video {
    display: grid !important;
    grid-template-columns: 1fr;
    max-width: none;
  }
  .mission-v2 .mobile-full-learning-view .learning-video video {
    width: 100%;
  }
  .mission-v2 .mobile-focus-view .learning-listen {
    position: relative;
    inset: auto;
    width: auto;
    margin: 0 0 16px;
  }
  .mission-v2 .mobile-focus-view .learning-listen-button { width: auto; min-height: 44px; padding: 0 16px; border: 1px solid var(--line, #d9e1dc); }
  .mobile-focus-view > .mobile-focus-scroll > .feedback,
  .mobile-focus-view > .mobile-focus-scroll > .actions,
  .mobile-focus-view > .mobile-focus-scroll > .station-navigation,
  .mobile-focus-view > .mobile-focus-scroll > .station-blocked-reason {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: none;
    margin: 16px 0 0;
  }
  .mobile-focus-view > .mobile-focus-scroll > .feedback { padding: 18px; overflow: visible; border-radius: 18px; }
  .mobile-focus-view > .mobile-focus-scroll > .actions button,
  .mobile-focus-view > .mobile-focus-scroll > .station-navigation button,
  .mobile-return-desk { min-height: 50px; border-radius: 999px; }
  .mobile-focus-view > .mobile-focus-scroll > .station-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .mobile-focus-view > .mobile-focus-scroll > .station-navigation #station-back { display: inline-flex; }
  .mobile-return-desk { width: 100%; margin-top: 16px; }
  .mobile-completion-view {
    display: grid;
    align-content: start;
    background:
      radial-gradient(circle at 92% 5%, rgba(35, 139, 120, .11), transparent 28%),
      radial-gradient(circle at 8% 88%, rgba(226, 167, 42, .12), transparent 32%);
  }
  .mobile-completion-view > :is(.puzzle-completion, .program-completion) {
    display: grid;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 22px;
    gap: 14px;
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(23, 50, 77, .1);
  }
  .mobile-completion-view > .program-completion { grid-template-columns: 1fr; }
  .mobile-completion-view > .program-completion img {
    width: min(42vw, 170px);
    height: auto;
    justify-self: center;
  }
  .mobile-completion-view :is(.puzzle-completion, .program-completion) h3 {
    margin: 2px 0;
    font-size: clamp(1.55rem, 7.2vw, 2.05rem);
    line-height: 1.08;
  }
  .mobile-completion-view :is(.puzzle-completion, .program-completion) p {
    margin: 0;
    font-size: .96rem;
    line-height: 1.5;
  }
  .mobile-completion-view .full-course-access {
    display: grid;
    gap: 12px;
    margin-top: 4px;
    padding: 17px;
    border-radius: 18px;
  }
  .mobile-completion-view :is(.puzzle-completion, .program-completion) .primary {
    width: 100%;
    min-height: 54px;
    padding: 12px 18px;
    border-radius: 999px;
    line-height: 1.2;
  }
  .mobile-completion-view .purchase-next-note { font-size: .76rem !important; }
  .mobile-journey-list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
  .mobile-journey-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 15px; border: 1px solid var(--line, #d9e1dc); border-radius: 17px; background: color-mix(in srgb, var(--card, #fff) 92%, transparent); }
  .mobile-journey-list li.current { border-color: var(--lime, #238b78); background: color-mix(in srgb, var(--surface-mint-light, #e7f0ec) 80%, transparent); }
  .mobile-journey-list li > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--surface-mint-light, #e7f0ec); color: var(--lime, #238b78); font-weight: 900; }
  .mobile-journey-list li div { display: grid; gap: 4px; }
  .mobile-journey-list small { color: var(--lime, #238b78); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-journey-list p { margin: 0; color: var(--muted, #65757f); font-size: .85rem; line-height: 1.35; }
  .mobile-journey-list em { color: var(--lime, #238b78); font-size: .75rem; font-style: normal; font-weight: 850; }
  .mobile-settings-view { display: grid; align-content: start; gap: 18px; }
  .mobile-settings-view .tutor-view-switch { width: 100%; }
  .mobile-settings-view .tutor-voice-settings { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line, #d9e1dc); border-radius: 20px; }
  .mobile-settings-view .tutor-voice-settings > div { display: grid; gap: 10px; }
  .mobile-settings-view .voice-setting { min-height: 50px; }
  .mobile-appearance-settings { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line, #d9e1dc); border-radius: 20px; }
  .mobile-appearance-settings > strong { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-appearance-settings .theme-control { display: flex; width: 100%; height: auto; padding: 8px; border: 1px solid var(--line, #d9e1dc); border-radius: 999px; }
  .mobile-appearance-settings .theme-control button { display: grid; min-height: 44px; flex: 1; place-items: center; }
}

.artifact-final-result .artifact-improve-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.artifact-final-result {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 24px;
  background: color-mix(in srgb, var(--card) 94%, var(--primary-soft));
}

html[data-theme="dark"] .artifact-final-result {
  background: color-mix(in srgb, var(--surface-dark, #17231e) 90%, var(--primary));
}

@media (max-width: 760px) {
  .artifact-challenge-v2 .artifact-workflow {
    grid-template-columns: 1fr;
  }
  .artifact-final-result { padding: 18px; border-radius: 18px; }
}
/* Contextual digital workbook */
body.workbook-open { overflow: hidden; }
.workbook-overlay { position: fixed; inset: 0; z-index: 1400; display: grid; justify-items: end; }
.workbook-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, #071611 58%, transparent); backdrop-filter: blur(3px); }
.workbook-drawer { position: relative; width: min(58vw, 900px); height: 100dvh; overflow-y: auto; background: var(--surface-light, #fffaf2); color: var(--text-light, #18324b); box-shadow: -20px 0 70px rgba(12, 34, 32, .25); border-inline-start: 1px solid var(--line, #d9e1dc); }
[data-theme="dark"] .workbook-drawer { background: var(--surface-dark, #17231e); color: var(--text-dark, #edf5f1); }
.workbook-drawer > header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 25px 30px 18px; background: inherit; border-bottom: 1px solid var(--line, #d9e1dc); }
.workbook-drawer { font-size: .94rem; }
.workbook-drawer > header h2 { margin: 4px 0 0; font-size: clamp(1.22rem, 1.55vw, 1.6rem); line-height: 1.15; }
.workbook-close { width: 44px; height: 44px; border: 1px solid var(--line, #d9e1dc); border-radius: 50%; background: transparent; color: inherit; font-size: 1.8rem; cursor: pointer; }
.workbook-loading, .workbook-error { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 36px; }
.workbook-error { color: var(--danger, #c85d62); }
.workbook-toolbar { position: sticky; top: 94px; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; padding: 13px 30px; background: color-mix(in srgb, var(--surface-light, #fffaf2) 92%, transparent); border-bottom: 1px solid var(--line, #d9e1dc); backdrop-filter: blur(12px); }
[data-theme="dark"] .workbook-toolbar { background: color-mix(in srgb, var(--surface-dark, #17231e) 92%, transparent); }
.workbook-toolbar button, .workbook-policy-actions :is(button, a) { min-height: 40px; border: 1px solid var(--line, #d9e1dc); border-radius: 999px; background: transparent; color: inherit; padding: 8px 14px; text-decoration: none; font-weight: 750; cursor: pointer; }
.workbook-toolbar button:last-child { justify-self: end; }
.workbook-toolbar button:disabled { opacity: .38; cursor: default; }
.workbook-overview-list { display: grid; gap: 7px; padding: 14px 30px; border-bottom: 1px solid var(--line, #d9e1dc); background: var(--surface-soft-light, #f7efe1); }
[data-theme="dark"] .workbook-overview-list { background: color-mix(in srgb, var(--surface-dark, #17231e) 78%, #0b1511); }
.workbook-overview-list button { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; text-align: start; padding: 11px 13px; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 14px; cursor: pointer; }
.workbook-overview-list button.current { background: var(--surface-mint-light, #e7f0ec); border-color: var(--lime, #2d9b73); }
[data-theme="dark"] .workbook-overview-list button.current { background: rgba(45, 155, 115, .16); }
.workbook-overview-list button span { grid-row: 1 / 3; font-weight: 900; color: var(--lime, #2d9b73); }
.workbook-overview-list button small { opacity: .75; font-size: .76rem; line-height: 1.35; }
.workbook-page { padding: 24px 30px 56px; display: grid; gap: 18px; max-width: 820px; margin-inline: auto; }
.workbook-page section, .workbook-topic, .workbook-page blockquote { padding: 19px 21px; border: 1px solid var(--line, #d9e1dc); border-radius: 20px; background: color-mix(in srgb, var(--surface-light, #fffaf2) 94%, var(--surface-mint-light, #e7f0ec)); margin: 0; }
[data-theme="dark"] .workbook-page section, [data-theme="dark"] .workbook-topic, [data-theme="dark"] .workbook-page blockquote { background: color-mix(in srgb, var(--surface-dark, #17231e) 90%, #244539); }
.workbook-topic { border-inline-start: 6px solid var(--light-accent-warm, #e5b34a); }
.workbook-topic span, .workbook-page h4 { color: var(--lime, #2d9b73); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 900; }
.workbook-topic h3 { margin: 7px 0; font-size: clamp(1.38rem, 2.2vw, 2rem); line-height: 1.12; letter-spacing: -.02em; }
.workbook-page h4 { margin: 0 0 12px; }
.workbook-page p { line-height: 1.58; font-size: .94rem; }
.workbook-page blockquote { display: grid; gap: 9px; border-inline-start: 6px solid var(--lime, #2d9b73); font-size: .98rem; line-height: 1.5; }
.workbook-page blockquote b { font-size: .72rem; letter-spacing: .1em; }
.workbook-try { background: var(--surface-mint-light, #e7f0ec) !important; }
[data-theme="dark"] .workbook-try { background: rgba(45, 155, 115, .14) !important; }
.workbook-try button, .workbook-writing > button { border: 0; border-radius: 999px; padding: 11px 17px; color: #fff; background: var(--light-cta, var(--violet)); font-weight: 850; cursor: pointer; }
.workbook-writing { display: grid; gap: 10px; }
.workbook-writing label { font-weight: 850; margin-top: 5px; }
.workbook-writing textarea { width: 100%; resize: vertical; padding: 14px; border-radius: 15px; border: 1px solid var(--line, #d9e1dc); background: var(--surface-light, #fffaf2); color: inherit; font: inherit; line-height: 1.5; }
[data-theme="dark"] .workbook-writing textarea { background: #101915; }
.workbook-writing > div { display: flex; justify-content: space-between; gap: 12px; opacity: .76; }
.workbook-writing > button { justify-self: start; margin-top: 4px; }
.workbook-policy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.workbook-policy-actions :is(button, a) { display: inline-flex; align-items: center; gap: 7px; }
.workbook-policy-notice { padding: 14px 16px; border-inline-start: 4px solid var(--light-accent-warm, #e5b34a); opacity: .78; }
.workbook-progress-visual { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px; border-radius: 17px; background: var(--surface-soft-light, #f7efe1); }
[data-theme="dark"] .workbook-progress-visual { background: #101915; }
.workbook-progress-visual span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line, #d9e1dc); font-weight: 900; }
.workbook-progress-visual span.current { background: var(--lime, #2d9b73); color: white; transform: scale(1.08); }
.orientation-workbook > button { border: 0; border-radius: 999px; padding: 13px 18px; background: var(--light-cta, #17324d); color: white; font-weight: 850; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }

@media (max-width: 1000px) { .workbook-drawer { width: min(78vw, 820px); } }
@media (max-width: 680px) {
  .workbook-companion-button { width: 34px; min-height: 34px; padding: 0; }
  .workbook-companion-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .workbook-drawer { width: 100vw; }
  .workbook-drawer > header { padding: 18px; }
  .workbook-toolbar { top: 82px; padding: 10px 14px; }
  .workbook-toolbar button { padding: 7px 9px; font-size: .78rem; }
  .workbook-page { padding: 18px 14px 48px; }
  .workbook-page section, .workbook-topic, .workbook-page blockquote { padding: 16px; border-radius: 17px; }
  .workbook-topic h3 { font-size: clamp(1.25rem, 6vw, 1.6rem); }
}
@media print {
  body.workbook-open > *:not(#academy-workbook-overlay) { display: none !important; }
  .workbook-backdrop, .workbook-close, .workbook-toolbar, .workbook-policy-actions, .workbook-writing > button { display: none !important; }
  .workbook-overlay, .workbook-drawer { position: static; width: 100%; height: auto; box-shadow: none; overflow: visible; }
  body.workbook-print-disabled #academy-workbook-overlay { display: none !important; }
  body.workbook-print-disabled::before { content: "Printing is disabled for this workbook access."; display: block; padding: 40px; font: 18px sans-serif; }
}
.transfer-v2 { display: grid; gap: 1.25rem; }
.transfer-v2 .answer { display: grid; gap: .55rem; }
.transfer-v2 .answer textarea { width: 100%; min-height: 15rem; resize: vertical; }
.transfer-v2-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted, #64736f); }
.transfer-v2-field-error { color: var(--danger, #b9474d); font-weight: 700; }
.transfer-v2-result { border: 1px solid var(--line); border-left-width: .35rem; border-radius: 1rem; padding: 1rem 1.15rem; background: var(--card); }
.transfer-v2-result b { display: block; margin-bottom: .35rem; }
.transfer-v2-result p { margin: 0; }
.transfer-v2-result ul { margin: .65rem 0 0; padding-left: 1.25rem; }
.transfer-v2-result.pass { border-color: var(--success, #238b68); background: color-mix(in srgb, var(--success, #238b68) 9%, var(--card)); }
.transfer-v2-result.partial { border-color: var(--warning, #c58a32); background: color-mix(in srgb, var(--warning, #c58a32) 9%, var(--card)); }
.transfer-v2-result.retry, .transfer-v2-result.error { border-color: var(--danger, #c85d62); background: color-mix(in srgb, var(--danger, #c85d62) 8%, var(--card)); }

/* Mobile desk refinement: compact control dock, larger mission surface and a
   calm horizontal tutor companion. Desktop geometry is intentionally untouched. */
@media (max-width: 540px) {
  .legacy-mobile-workspace {
    --mobile-header-height: 76px;
    --mobile-dock-height: 64px;
  }
  .legacy-mobile-workspace .topbar {
    position: sticky;
    top: 0;
    z-index: 1603;
    grid-template-columns: minmax(116px, 1fr) auto;
    gap: 6px;
    width: 100%;
    height: var(--mobile-header-height);
    padding: 8px 10px;
  }
  .legacy-mobile-workspace .topbar .program,
  .legacy-mobile-workspace .progress-head > span,
  .legacy-mobile-workspace .progress-head > strong,
  .legacy-mobile-workspace .progress-head > .learner { display: none; }
  .legacy-mobile-workspace .topbar .brand { min-width: 0; gap: 7px; }
  .legacy-mobile-workspace .topbar .brand-mark { width: 38px; height: 38px; flex: 0 0 38px; }
  .legacy-mobile-workspace .topbar .brand strong { display: block; max-width: 102px; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
  .legacy-mobile-workspace .topbar .brand small { display: none; }
  .legacy-mobile-workspace .progress-head { min-width: 0; }
  .legacy-mobile-workspace .header-controls { justify-content: flex-end; gap: 5px; }
  .legacy-mobile-workspace .header-controls > .workbook-companion-button,
  .legacy-mobile-workspace .header-controls > .theme-control { display: none; }
  .legacy-mobile-workspace .language-switcher span,
  .legacy-mobile-workspace .tutor-header-settings > summary span,
  .legacy-mobile-workspace .tutor-header-settings > summary small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .legacy-mobile-workspace .language-switcher select { width: 68px; min-width: 68px; max-width: 68px; min-height: 38px; padding: 0 20px 0 7px; font-size: .56rem; }
  .legacy-mobile-workspace .tutor-header-settings > summary,
  .legacy-mobile-workspace .mobile-top-settings,
  .legacy-mobile-workspace .mobile-theme-toggle {
    display: grid;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(23, 50, 77, .12);
    border-radius: 50%;
    background: var(--card, #fff);
    color: var(--ink, #17324d);
  }
  .legacy-mobile-workspace .tutor-header-settings > summary svg,
  .legacy-mobile-workspace .mobile-top-settings svg,
  .legacy-mobile-workspace .mobile-theme-toggle svg { width: 17px; height: 17px; }
  .legacy-mobile-workspace .mobile-workspace-navigation {
    position: fixed;
    z-index: 1602;
    top: var(--mobile-header-height);
    right: 12px;
    bottom: auto;
    left: 12px;
    min-height: var(--mobile-dock-height);
  }
  .legacy-mobile-workspace .mobile-workspace-navigation button.active {
    background: #17324d !important;
    color: #fff !important;
  }
  .legacy-mobile-workspace .workspace { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .legacy-mobile-workspace .mobile-focus-view[data-mobile-workspace-view="TUTOR_CHAT"] {
    top: calc(var(--mobile-header-height) + var(--mobile-dock-height) + 8px);
    height: calc(100dvh - var(--mobile-header-height) - var(--mobile-dock-height) - 8px - env(safe-area-inset-bottom));
  }

  .mission-v2 {
    --mobile-header-height: 11.5dvh;
    --mobile-dock-height: 7.4dvh;
    --mobile-workspace-top: 20.2dvh;
  }

  .mission-v2 .topbar { height: var(--mobile-header-height); min-height: 70px; }
  .mission-v2 .topbar .brand { top: 2.2dvh; }
  .mission-v2 .header-controls {
    top: 2.15dvh;
    grid-template-columns: 12vw 10.6vw 10.6vw 10.6vw;
    gap: 1.25vw;
  }
  .mission-v2 .workbook-companion-button,
  .mission-v2 .header-controls > .theme-control { display: none !important; }
  .mission-v2 .mobile-theme-toggle {
    display: grid;
    width: 10.6vw;
    height: 10.6vw;
    min-width: 38px;
    min-height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(23, 50, 77, .1);
    border-radius: 50%;
    background: rgba(255, 252, 247, .9);
    color: #17324d;
    box-shadow: 0 6px 16px rgba(23, 50, 77, .09);
  }
  .mission-v2 .mobile-theme-toggle svg { width: 4.6vw; height: 4.6vw; }

  .mobile-workspace-navigation {
    position: absolute;
    z-index: 90;
    top: var(--mobile-header-height);
    right: 3.8vw;
    bottom: auto;
    left: 3.8vw;
    min-height: var(--mobile-dock-height);
    padding: .65dvh 1.8vw;
    border: 1px solid rgba(23, 50, 77, .12);
    border-radius: 22px;
    background: rgba(255, 252, 247, .96) !important;
    box-shadow: 0 10px 24px rgba(63, 43, 27, .12);
    backdrop-filter: blur(14px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .mobile-workspace-navigation button {
    min-height: 5.8dvh;
    color: #53636b;
    font-size: clamp(.42rem, 1.95vw, .54rem);
  }
  .mobile-workspace-navigation button svg { width: 4.6vw; height: 4.6vw; }
  .mobile-workspace-navigation button.active {
    border-radius: 16px;
    background: #17324d;
    color: #fff;
  }
  html:not([data-theme="dark"]) .mission-v2 .mobile-workspace-navigation button.active {
    background: #17324d !important;
    color: #fff !important;
  }
  html[data-theme="dark"] .mission-v2 .mobile-workspace-navigation button.active {
    background: #edf5f1 !important;
    color: #17324d !important;
  }

  .mission-v2 .workspace {
    inset: var(--mobile-workspace-top) 0 auto;
    display: block;
    width: 100%;
    height: calc(100dvh - var(--mobile-workspace-top));
    padding: 0 3.1vw;
  }
  .mission-v2 .workspace::after {
    content: "";
    position: absolute;
    z-index: 15;
    /* The approved desk shell still contains the retired tutor sheet and dock.
       Cover that baked-in artwork after the preview cards; live controls sit above. */
    top: 50.8dvh;
    right: -3.1vw;
    bottom: 0;
    left: -3.1vw;
    background: #ead8c3;
    pointer-events: none;
  }
  html[data-theme="dark"] .mission-v2 .workspace::after { background: #17241f; }
  .mission-v2 .main { display: block; }
  .mission-v2 .mobile-learning-board {
    position: absolute;
    top: 0;
    right: 3.1vw;
    left: 3.1vw;
    width: auto;
    height: 34dvh;
    min-height: 238px;
    padding: 2.5dvh 4.2vw 2dvh;
    border: 1px solid rgba(23, 50, 77, .22);
    border-radius: 24px;
    background: rgba(255, 252, 247, .965) !important;
    box-shadow: 0 14px 30px rgba(68, 46, 27, .15), inset 0 0 0 4px rgba(255, 255, 255, .58);
  }
  html:not([data-theme="dark"]) .mission-v2 .mobile-learning-board {
    background: rgba(255, 252, 247, .965) !important;
  }
  html[data-theme="dark"] .mission-v2 .mobile-learning-board {
    border-color: rgba(115, 191, 166, .28);
    background: rgba(22, 35, 30, .97) !important;
    color: #edf5f1;
  }
  .mission-v2 .mobile-learning-board > .mission-meta { top: 2.1dvh; left: 4.2vw; }
  .mission-v2 .mobile-learning-board > .mobile-journey-button {
    top: 1.55dvh;
    right: 3vw;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(23, 50, 77, .12);
    border-radius: 50%;
    background: rgba(255,255,255,.72);
  }
  .mission-v2 .mobile-desk-teaser {
    top: 6.6dvh;
    right: 4.2vw;
    left: 4.2vw;
    max-height: 13.8dvh;
  }
  .mission-v2 .mobile-desk-teaser[data-mobile-expand-content] {
    cursor: pointer;
  }
  .mission-v2 .mobile-desk-teaser[data-mobile-expand-content]:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--lime, #238b78) 72%, white);
    outline-offset: 5px;
    border-radius: 12px;
  }
  .mission-v2 .mobile-desk-teaser h2 {
    margin-bottom: 1dvh;
    font-size: clamp(1.3rem, 6.6vw, 1.78rem);
    line-height: 1.04;
  }
  .mission-v2 .mobile-desk-teaser p {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(.7rem, 3.1vw, .85rem);
    line-height: 1.46;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .mission-v2 .mobile-learning-board.has-law-story .mobile-desk-teaser {
    max-height: 10.6dvh;
  }
  .mission-v2 .mobile-learning-board.has-law-story .mobile-desk-teaser p {
    -webkit-line-clamp: 2;
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law {
    position: absolute;
    z-index: 7;
    top: 17.5dvh;
    right: 4.2vw;
    left: 4.2vw;
    display: grid;
    width: auto;
    height: 4.5dvh;
    min-height: 38px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 2.2vw;
    row-gap: 0;
    margin: 0;
    padding: .45dvh 1.7vw;
    overflow: hidden;
    border: 1px solid rgba(47, 124, 114, .72);
    border-radius: 13px;
    background: linear-gradient(105deg, rgba(255, 250, 240, .98), rgba(237, 245, 239, .98));
    box-shadow: 0 5px 12px rgba(23, 50, 77, .08);
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law .law-story-icons {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    min-height: 34px;
    gap: 0;
    border-radius: 10px;
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law .law-story-icons svg {
    display: none;
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law .law-story-icons svg:first-child {
    display: block;
    width: 17px;
    height: 17px;
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law small {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    font-size: clamp(.38rem, 1.65vw, .46rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law strong {
    grid-column: 2;
    grid-row: 2;
    overflow: hidden;
    font-size: clamp(.6rem, 2.6vw, .72rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law > span:not(.law-story-icons) {
    display: none;
  }
  .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law em {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    padding: .65dvh 2.2vw;
    font-size: clamp(.42rem, 1.8vw, .5rem);
    line-height: 1;
    white-space: nowrap;
  }
  html[data-theme="dark"] .mission-v2 .mobile-learning-board.has-law-story > .knowledge-story-launcher.law {
    border-color: rgba(115, 191, 166, .48);
    background: linear-gradient(105deg, rgba(28, 44, 38, .98), rgba(22, 35, 30, .98));
    color: #edf5f1;
  }
  .mission-v2 .mobile-learning-board.has-roots-story > .knowledge-story-launcher.roots {
    position:absolute;
    z-index:7;
    top:5.15dvh;
    right:3.4vw;
    left:3.4vw;
    width:auto;
    height:6.15dvh;
    min-height:48px;
    grid-template-columns:42px minmax(0,1fr) auto;
    grid-template-rows:auto auto;
    gap:1px 9px;
    margin:0;
    padding:7px 9px;
    border-radius:14px;
    box-shadow:0 6px 14px rgba(23,50,77,.08);
  }
  .mission-v2 .mobile-learning-board.has-roots-story > .knowledge-story-launcher.roots .roots-story-icon {
    grid-row:1/3;
    width:40px;
    height:40px;
  }
  .mission-v2 .mobile-learning-board.has-roots-story > .knowledge-story-launcher.roots .roots-story-icon svg { width:19px;height:19px; }
  .mission-v2 .mobile-learning-board.has-roots-story > .knowledge-story-launcher.roots small { font-size:.42rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
  .mission-v2 .mobile-learning-board.has-roots-story > .knowledge-story-launcher.roots strong { font-size:.84rem; }
  .mission-v2 .mobile-learning-board.has-roots-story > .knowledge-story-launcher.roots>span:not(.roots-story-icon) { display:none; }
  .mission-v2 .mobile-learning-board.has-roots-story > .knowledge-story-launcher.roots em { grid-row:1/3;padding:7px 9px;font-size:.46rem; }
  .mission-v2 .mobile-learning-board.has-roots-story > .step-stage { inset:12.25dvh 3.4vw 12.1dvh;min-height:0; }
  .mission-v2 .mobile-content-expand {
    position: absolute;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 0 2px 10px;
    background: linear-gradient(90deg, transparent, rgba(255, 252, 247, .96) 18%);
    color: var(--lime, #238b78);
    font-size: clamp(.46rem, 2.05vw, .58rem);
    font-style: normal;
    font-weight: 850;
    line-height: 1.2;
  }
  .mission-v2 .mobile-content-expand svg { width: 13px; height: 13px; }
  html[data-theme="dark"] .mission-v2 .mobile-content-expand {
    background: linear-gradient(90deg, transparent, rgba(22, 35, 30, .97) 18%);
    color: color-mix(in srgb, var(--lime, #238b78) 78%, white);
  }
  html[data-theme="dark"] .mission-v2 .mobile-desk-teaser :is(h2, p) { color: #edf5f1; }
  .mission-v2 .mobile-board-progress {
    right: 4.2vw;
    bottom: .7dvh;
    left: 4.2vw;
    height: 5.3dvh;
    min-height: 0;
    padding-top: .45dvh;
    border-top: 1px solid rgba(23, 50, 77, .12);
  }
  .mission-v2 .mobile-board-progress .journey-stop {
    gap: .3dvh;
  }
  .mission-v2 .mobile-board-progress .journey-stop > span:not(.sr-only) {
    width: 4.5vw;
    height: 4.5vw;
    border: 1px solid rgba(23, 50, 77, .24);
    background: rgba(255, 252, 247, .98);
    color: #667780;
    font-size: clamp(.42rem, 1.8vw, .5rem);
  }
  .mission-v2 .mobile-board-progress .journey-stop:not(:last-child)::after {
    top: 2.25vw;
    height: 1px;
    background: rgba(23, 50, 77, .16);
  }
  .mission-v2 .mobile-board-progress .journey-stop.completed > span:not(.sr-only),
  .mission-v2 .mobile-board-progress .journey-stop.active > span:not(.sr-only) {
    border-color: #238b78;
    background: #238b78;
    color: #fff;
  }
  .mission-v2 .mobile-board-progress .journey-stop.completed:not(:last-child)::after {
    background: #238b78;
  }
  .mission-v2 .mobile-board-progress .journey-stop small {
    font-size: clamp(.38rem, 1.75vw, .48rem);
    line-height: 1.05;
  }
  .mission-v2 .learning-listen {
    bottom: 6.35dvh;
    left: 4.2vw;
    width: 34vw;
    min-height: 4.25dvh;
    padding: 0 2.2vw;
    font-size: clamp(.5rem, 2.25vw, .62rem);
  }
  .mission-v2 .mobile-learning-board > .mobile-desk-action {
    position: absolute;
    z-index: 8;
    right: 4.2vw;
    bottom: 6.35dvh;
    width: min(36vw, 148px);
    margin: 0;
  }
  .mission-v2 .mobile-learning-board > .mobile-desk-action button {
    width: 100%;
    min-height: 4.35dvh;
    padding: 0 2.4vw;
    border-radius: 999px;
    font-size: clamp(.5rem, 2.25vw, .64rem);
    box-shadow: 0 8px 18px rgba(23, 50, 77, .18);
  }

  .mobile-desk-tools {
    position: absolute;
    top: 35.2dvh;
    right: auto;
    left: 4.1vw;
    display: grid;
    width: 82.5vw;
    height: 14.2dvh;
    min-height: 96px;
    grid-template-columns: 42vw 37vw;
    gap: 3.5vw;
    margin: 0;
  }
  .mobile-workbook-card,
  .mobile-takeaway-card {
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
  }
  .mobile-workbook-card {
    padding: 1.45dvh 3.2vw 4.25dvh 6.1vw;
    text-align: left;
  }
  .mobile-workbook-card > span { gap: .28dvh; padding: 0; }
  .mobile-workbook-card small { font-size: clamp(.36rem, 1.72vw, .47rem); }
  .mobile-workbook-card strong {
    font-size: clamp(.56rem, 2.7vw, .72rem);
    line-height: 1.12;
    -webkit-line-clamp: 1;
  }
  .mobile-workbook-card p {
    margin-top: .25dvh;
    font-size: clamp(.39rem, 1.75vw, .49rem);
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }
  .mobile-workbook-card em {
    right: 3.1vw;
    bottom: .9dvh;
    left: 6.1vw;
    min-height: 3.1dvh;
    padding: 0;
    font-size: clamp(.4rem, 1.86vw, .52rem);
  }
  .mobile-takeaway-card {
    padding: 2dvh 4.2vw 2.1dvh;
    background: transparent !important;
  }
  .mobile-takeaway-card > span { gap: .65dvh; }
  .mobile-takeaway-card small { font-size: clamp(.36rem, 1.72vw, .47rem); }
  .mobile-takeaway-card strong {
    font-size: clamp(.5rem, 2.35vw, .63rem);
    line-height: 1.28;
    -webkit-line-clamp: 3;
  }

  .mission-v2 .tutor {
    position: absolute;
    z-index: 20;
    top: 55.7dvh;
    right: 3.1vw;
    left: 3.1vw;
    display: grid;
    width: auto;
    height: 9.7dvh;
    min-height: 82px;
    grid-template-columns: 24vw minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(23, 50, 77, .15);
    border-radius: 22px;
    background: rgba(255, 252, 247, .965) !important;
    box-shadow: 0 10px 24px rgba(68, 46, 27, .12) !important;
  }
  html:not([data-theme="dark"]) .mission-v2 .tutor {
    background: rgba(255, 252, 247, .965) !important;
    box-shadow: 0 10px 24px rgba(68, 46, 27, .12) !important;
  }
  html[data-theme="dark"] .mission-v2 .tutor { background: rgba(22, 35, 30, .97) !important; }
  .mission-v2 .tutor-head {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1;
    padding: .65dvh 2.5vw 0 1.2vw;
  }
  .mission-v2 .tutor-head strong { font-size: clamp(.47rem, 2.08vw, .58rem); }
  .mission-v2 .tutor-head small { display: none; }
  .mission-v2 .tutor-workspace .tutor-presence {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  .mission-v2 .tutor-workspace .tutor-avatar-shell,
  .mission-v2 .tutor-workspace .tutor-avatar-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  .mission-v2 .tutor-workspace .tutor-avatar-stage {
    background: url("/academy-assets/assets/mobile-tutor-companion.png") center 32% / 118% auto no-repeat !important;
  }
  html:not([data-theme="dark"]) .mission-v2 .tutor-workspace .tutor-avatar-stage,
  html[data-theme="dark"] .mission-v2 .tutor-workspace .tutor-avatar-stage {
    background: url("/academy-assets/assets/mobile-tutor-companion.png") center 32% / 118% auto no-repeat !important;
  }
  .mission-v2 .tutor .context {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 2;
    max-height: none;
    padding: 0 2.5vw .1dvh 1.2vw;
  }
  .mission-v2 .tutor .context span { display: none; }
  .mission-v2 .tutor .context b { font-size: clamp(.43rem, 1.88vw, .52rem); line-height: 1.1; -webkit-line-clamp: 1; }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 3;
    padding: 0 2.5vw .65dvh 1.2vw;
  }
  .mission-v2 .tutor :is(.tutor-actions, .tutor-your-turn) button {
    min-height: 2.9dvh;
    border-radius: 999px;
    background: #eaf4f0;
    font-size: clamp(.42rem, 1.85vw, .52rem);
  }
  .mission-v2 .tutor-workspace .tutor-presence-status { display: none !important; }

  .mobile-desk-navigation-row {
    position: absolute;
    z-index: 22;
    top: 71.7dvh;
    right: 3.1vw;
    left: 3.1vw;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.8vw;
    min-height: 6.5dvh;
    padding: .7dvh 1.7vw;
    border: 1px solid rgba(23, 50, 77, .13);
    border-radius: 18px;
    background: rgba(255, 252, 247, .96);
    box-shadow: 0 8px 20px rgba(68, 46, 27, .1);
  }
  html[data-theme="dark"] .mobile-desk-navigation-row { background: rgba(22, 35, 30, .97); }
  .mobile-desk-navigation-row button {
    display: grid;
    min-width: 0;
    min-height: 5dvh;
    grid-template-rows: 20px auto;
    place-items: center;
    gap: 2px;
    padding: 4px 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #17324d;
    font-size: clamp(.4rem, 1.75vw, .5rem);
    font-weight: 800;
  }
  html[data-theme="dark"] .mobile-desk-navigation-row button { color: #edf5f1; }
  .mobile-desk-navigation-row button svg { width: 18px; height: 18px; }
  .mobile-desk-navigation-row button:nth-child(2):not(:disabled) { background: #17324d; color: #fff; }
  .mobile-desk-navigation-row button:disabled { opacity: .36; }

  .mobile-tutor-sheet { display: none !important; }

  .tutor-dialog .tutor-response { overflow: visible; }
  .tutor-dialog .tutor-response .speak-button {
    position: static;
    display: inline-flex;
    width: auto;
    margin: 10px 0 0;
    clear: both;
  }
  .tutor-dialog-form .tutor-send-submit {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border-radius: 50%;
  }
  .tutor-dialog-form .tutor-send-submit svg { width: 19px; height: 19px; }
  .tutor-dialog-form button[type="submit"] { transition: transform .12s ease, filter .12s ease; }
  .tutor-dialog-form button[type="submit"]:active { transform: scale(.93); filter: brightness(.9); }
  .tutor-dialog-form button[type="submit"]:disabled { cursor: wait; opacity: .62; }
}

/* Legacy activities share the same focused mobile Tutor workspace. Keep this
   final cascade guard after the photographed-desk rules so the selected app
   remains visibly selected even where the generic dock resets backgrounds. */
@media (max-width: 540px) {
  html:not([data-theme="dark"]) .legacy-mobile-workspace .mobile-workspace-navigation button.active {
    background: #17324d !important;
    color: #fff !important;
  }
  html[data-theme="dark"] .legacy-mobile-workspace .mobile-workspace-navigation button.active {
    background: #edf5f1 !important;
    color: #17324d !important;
  }
}

@media (max-width: 760px) {
  .mission-v2 .language-switcher {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .mission-v2 .language-switcher select {
    border-color: color-mix(in srgb, var(--primary) 56%, var(--line));
    box-shadow: 0 5px 14px color-mix(in srgb, var(--primary) 14%, transparent);
  }
  .progress-head > .learner-profile { display: block; }
  .progress-head .learner-profile .profile-trigger { display: flex; padding: 2px; }
  .profile-trigger-copy,
  .profile-trigger > svg { display: none; }
  .profile-trigger .avatar { width: 38px; height: 38px; }
  .profile-popover {
    position: fixed;
    top: 68px;
    right: 10px;
    max-height: calc(100dvh - 80px);
    overflow: auto;
  }
}
