:root {
  --urdu-font:
    "Jameel Noori Nastaleeq", "Jameel Noori Nastaleeq Regular",
    "Jameel Noori Nastaleeq Kasheeda", "Noto Nastaliq Urdu",
    "Noto Naskh Arabic", serif;
  --bg: #f6f8fc;
  --card: #fff;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe3f0;
  --primary: #2563eb;
  --primary2: #1e40af;
  --dark: #0f172a;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --blueS: #eff6ff;
  --greenS: #ecfdf5;
  --amberS: #fffbeb;
  --redS: #fef2f2;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 26px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.16), transparent 34%),
    radial-gradient(
      circle at 100% 100%,
      rgba(21, 128, 61, 0.12),
      transparent 34%
    ),
    var(--bg);
}
button,
a.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 900;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #e5e7eb;
  color: #111827;
}
button:hover,
a.btn:hover {
  filter: brightness(0.98);
}
.btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}
.btn-dark {
  background: var(--dark) !important;
  color: #fff !important;
}
.btn-green {
  background: #dcfce7 !important;
  color: #166534 !important;
}
.btn-red {
  background: #fee2e2 !important;
  color: #991b1b !important;
}
.btn-ghost {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  color: #334155 !important;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 252, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 245px 1fr auto;
  gap: 14px;
  align-items: center;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 1000;
}
.brand strong {
  display: block;
}
.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}
.course-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}
.course-progress-title {
  font-size: 12px;
  font-weight: 1000;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.course-progress-meta {
  font-size: 12px;
  font-weight: 1000;
  color: #334155;
}
.flow {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: auto;
  padding: 3px 0;
}
.flow-node {
  min-width: 178px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 9px 10px;
  cursor: pointer;
  transition: 0.18s;
}
.flow-node.done {
  background: var(--greenS);
  border-color: #bbf7d0;
}
.flow-node.active {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}
.flow-label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.flow-node small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 1000;
}
.flow-node b {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.flow-node .flow-mini {
  grid-column: 2;
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ff;
  font-size: 10.5px;
  font-weight: 1000;
  color: #475569;
}
.flow-node.done .flow-mini {
  background: #dcfce7;
  color: #166534;
}
.flow-node.active .flow-mini {
  background: #dbeafe;
  color: #1d4ed8;
}
.dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #334155;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 1000;
}
.done .dot {
  background: #22c55e;
  color: #fff;
}
.active .dot {
  background: var(--primary);
  color: #fff;
}
.arrow {
  color: #94a3b8;
  font-weight: 1000;
}
.progress-track {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: 0.25s;
}
.course-dashboard {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}
.course-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.course-dashboard-head strong {
  display: block;
  font-size: 18px;
}
.course-dashboard-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 2px;
}
.game-stats,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.game-stats span,
.badge-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
}
.badge-row {
  margin-top: 12px;
}
.badge-row span {
  background: #fff7ed;
  color: #9a3412;
}
.course-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.course-card {
  width: 100%;
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
}
.course-card.active {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}
.course-card strong {
  font-size: 15px;
}
.course-card span,
.course-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}
.course-card-kicker {
  color: #1d4ed8 !important;
  font-size: 11px;
  text-transform: uppercase;
}
.course-card-progress {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}
.course-card-progress i {
  display: block;
  height: 100%;
  background: #22c55e;
}
.lesson-quiz-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}
.lesson-quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.lesson-quiz-head strong {
  font-size: 15px;
}
.lesson-quiz-head span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 1000;
}
.course-launcher-mode .sir-timeline-banner,
.course-launcher-mode .screen,
.course-launcher-mode .course-completion-fab,
.course-launcher-mode .voice-master-btn,
.course-launcher-mode .chat-fab,
.course-launcher-mode .main-menu-btn {
  display: none !important;
}
.course-active-mode #courseDashboard {
  display: none !important;
}
.course-launcher-mode .sir-rail-section-title,
.course-launcher-mode .sir-rail-steps {
  display: none !important;
}
.course-active-mode .sir-mobile-ad-slot {
  display: none !important;
}
.course-active-mode .sir-rail-section-title,
.course-active-mode .sir-rail-steps {
  display: none !important;
}
.course-active-mode .sir-learning-shell {
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  align-items: start;
}
.course-active-mode .sir-right-rail {
  display: none !important;
}
.course-active-mode .sir-left-rail {
  display: grid !important;
  gap: 12px;
  position: sticky;
  top: 86px;
  max-height: calc(100dvh - 104px);
  overflow: auto;
}
.course-active-mode .sir-modern-main {
  padding-top: 12px;
}
.course-active-mode .screen {
  min-height: auto !important;
  padding-top: 0 !important;
}
.course-active-mode .screen > .wrap > .card {
  margin-top: 0 !important;
}
.course-active-mode .step-layout {
  grid-template-columns: 1fr !important;
}
.course-active-mode .focus-list {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 12px !important;
  scrollbar-width: thin;
}
.course-active-mode .focus-item {
  margin-bottom: 0 !important;
}
.course-join-btn {
  display: inline-flex;
  border: 0;
  margin-top: 2px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
}
.course-mini-section {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.72);
  border: 1px solid #e2e8f0;
}
.course-mini-section summary {
  cursor: pointer;
  font-size: 12px;
  color: #0f172a;
  font-weight: 1000;
  list-style: none;
}
.course-mini-section summary::-webkit-details-marker {
  display: none;
}
.course-mini-section summary::after {
  content: "+";
  float: right;
  color: #2563eb;
}
.course-mini-section[open] summary::after {
  content: "-";
}
.course-mini-section small {
  display: block;
  color: #475569;
}
.landing-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.landing-tabs button {
  border-radius: 10px;
}
.landing-tabs button.active {
  background: #dbeafe;
  color: #1d4ed8;
}
.profile-form {
  display: grid;
  gap: 8px;
}
.profile-form h3 {
  margin: 10px 0 0;
  font-size: 15px;
}
.profile-split {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  gap: 6px;
  align-items: center;
}
.reward-toast {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 12, 28, 0.72);
  color: #0f172a;
  transform: scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
}
.reward-toast.show {
  transform: scale(1);
  opacity: 1;
}
.reward-celebration {
  display: grid;
  gap: 12px;
  width: min(540px, 100%);
  padding: 30px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  text-align: center;
}
.reward-toast strong {
  color: #15803d;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}
.reward-toast p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.55;
}
.reward-toast span {
  justify-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
  font-weight: 900;
}
.lesson-points-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 1000;
}
.focus-card {
  position: relative;
}
.learner-login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.learner-login-head h2,
.learner-login-head p {
  margin-top: 0;
}
.modal-close-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 1000;
  cursor: pointer;
}
.learner-login-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
}
.learner-login-modal.show {
  display: grid;
}
.learner-login-card {
  width: min(430px, 100%);
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.learner-login-card h2 {
  margin: 0 0 6px;
}
.learner-login-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 800;
}
.learner-login-card label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 1000;
}
.learner-login-card input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
.modal-auth-switch {
  margin: 4px 0 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.modal-auth-switch button {
  width: 100%;
}
.modal-auth-field[hidden] {
  display: none !important;
}
.registration-code-grid[hidden] {
  display: none !important;
}
.learner-login-card .modal-auth-alternate {
  margin: 12px 0 4px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.modal-auth-alternate button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #6d28d9;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.landing-auth-actions {
  margin-top: 10px;
}
.landing-auth-actions button {
  flex: 1 1 130px;
}
.landing-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 16px;
}
.landing-login-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.landing-login-card h2,
.course-list-title {
  margin: 0 0 10px;
  font-size: 18px;
}
.landing-login-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 800;
}
.landing-login-card label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 1000;
}
.landing-login-card input {
  width: 100%;
  margin: 6px 0 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.landing-login-card .btn-primary {
  width: 100%;
  margin-top: 12px;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.profile-stats span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.profile-stats strong {
  color: var(--ink);
  font-size: 20px;
}
.course-requirements-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
}
.course-requirements-modal.show {
  display: grid;
}
.course-requirements-card {
  width: min(560px, 100%);
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.requirements-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding-left: 20px;
  color: #334155;
  font-weight: 800;
  line-height: 1.45;
}
@media (max-width: 780px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }
}
.screen {
  display: none;
  min-height: calc(100vh - 82px);
  padding: 20px;
}
.screen.active {
  display: block;
}
.wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.card,
.hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
  padding: clamp(24px, 4vw, 44px);
  position: relative;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  margin: 0;
}
.hero p {
  font-size: 16px;
  line-height: 1.65;
  max-width: 980px;
  opacity: 0.94;
}
.kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 1000;
  color: #93c5fd;
  margin-bottom: 10px;
}
.head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.head h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 0;
}
.head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 960px;
}
.screen > .wrap > .card > .head p {
  display: none !important;
}
.body {
  padding: 22px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.box {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  line-height: 1.55;
}
.box h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.box p {
  margin: 0;
  color: #334155;
}
.blue {
  background: var(--blueS);
  border-color: #bfdbfe;
  color: #1e3a8a;
}
.green {
  background: var(--greenS);
  border-color: #bbf7d0;
  color: #14532d;
}
.amber {
  background: var(--amberS);
  border-color: #fde68a;
  color: #78350f;
}
.red {
  background: var(--redS);
  border-color: #fecaca;
  color: #7f1d1d;
}
.mini-list {
  margin: 8px 0 0;
  padding-left: 20px;
}
.mini-list li {
  margin: 5px 0;
}
.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.step-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.focus-list {
  display: grid;
  gap: 10px;
}
.focus-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 13px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 11px;
  cursor: pointer;
  transition: 0.18s;
}
.focus-item:hover {
  border-color: #93c5fd;
}
.focus-item.active {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}
.focus-item.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.num {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #334155;
  display: grid;
  place-items: center;
  font-weight: 1000;
}
.focus-item.active .num {
  background: var(--primary);
  color: #fff;
}
.focus-item.done .num {
  background: #22c55e;
  color: #fff;
}
.lesson-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #e5e7eb;
  color: #334155;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}
.focus-item.active .lesson-badge {
  background: var(--primary);
  color: #fff;
}
.focus-item.done .lesson-badge {
  background: #22c55e;
  color: #fff;
}
.focus-item h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.focus-item p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  color: var(--muted);
}
.focus-card {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 22px;
  padding: 18px;
  line-height: 1.6;
  min-height: 190px;
}
.focus-card h3 {
  font-size: 24px;
  margin: 0 0 8px;
  color: #1e3a8a;
}
.focus-card p {
  margin: 0 0 10px;
}
.focus-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.help-box {
  margin-top: 14px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #78350f;
  border-radius: 22px;
  padding: 16px;
  line-height: 1.6;
}
.help-box h3 {
  margin: 0 0 8px;
  color: #78350f;
}
.help-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.choice-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.choice-tabs button.active {
  background: var(--primary);
  color: #fff;
}
.choice-panel {
  display: none;
}
.choice-panel.active {
  display: block;
}
.prep-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 14px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 20px;
  padding: 10px;
  margin-bottom: 12px;
}
.family-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
}
.family-tab {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
}
.family-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.family-tab.add {
  background: #0f172a;
  color: #fff;
}
details.section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 10px;
}
details.section summary {
  list-style: none;
  padding: 12px 14px;
  font-weight: 1000;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: #fbfcff;
}
details.section summary::-webkit-details-marker {
  display: none;
}
details.section summary span {
  color: var(--muted);
  font-size: 12px;
}
.content {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 1000;
  color: #334155;
  margin-bottom: 5px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #eaf1ff;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.formgrid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.full {
  grid-column: 1/-1;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 5px;
}
.notice {
  font-size: 12px;
  line-height: 1.45;
  border-radius: 14px;
  padding: 10px;
  background: var(--amberS);
  border: 1px solid #fde68a;
  color: #78350f;
}
.info {
  font-size: 12px;
  line-height: 1.45;
  border-radius: 14px;
  padding: 10px;
  background: var(--blueS);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}
.side {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 12px;
}
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.side-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.bar {
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}
.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: 0.25s;
}
.family-list {
  display: grid;
  gap: 8px;
}
.family-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.family-row strong {
  display: block;
}
.family-row small {
  color: var(--muted);
  font-weight: 800;
}
.preview-panel {
  display: none;
}
.preview-panel.show {
  display: block;
}
.form-preview {
  background: #fff;
  color: #000;
  padding: 14px;
  border: 1px solid #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  line-height: 1.25;
}
.preview-title {
  text-align: center;
  font-weight: 900;
  font-size: 16px;
}
.p-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.p-table td,
.p-table th {
  border: 1px solid #111;
  padding: 5px;
  vertical-align: top;
  word-break: break-word;
}
.photo-box {
  min-height: 70px;
  display: grid;
  place-items: center;
}
.pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 11px;


/* Lesson tools live in the left rail; keep lesson content narrower on desktop. */
@media (min-width: 901px) {
  .course-active-mode .sir-learning-shell {
    grid-template-columns: minmax(280px, 330px) minmax(0, 860px) !important;
    justify-content: center;
  }
  .lesson-side-tools-panel { display: grid; gap: 10px; }
  .lesson-side-tools-panel .lesson-learner-tools { margin: 0; }
}
.lesson-take-quiz-btn {
  width: 100%; border: 0; border-radius: 12px; padding: 11px 14px;
  background: #2563eb; color: #fff; font-weight: 900; cursor: pointer;
}
.lesson-quiz-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.lesson-quiz-modal.show { display: grid; place-items: center; padding: 18px; }
.lesson-quiz-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.58); }
.lesson-quiz-modal-card { position: relative; width: min(900px, 96vw); max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(15,23,42,.28); }
.lesson-quiz-modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; border-bottom: 1px solid #dbe4ef; }
.lesson-quiz-modal-head button { border: 0; background: #eef2ff; width: 34px; height: 34px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.lesson-quiz-modal-body { padding: 14px; }
.lesson-quiz-modal-body .lesson-quiz-card { margin: 0; }
body.lesson-quiz-open { overflow: hidden; }
@media (max-width: 900px) {
  .lesson-side-tools-panel { display: none !important; }
}

  font-size: 12px;
  font-weight: 1000;
  background: #fff;
  color: #334155;
}
.pill.good {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
.pill.warn {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.checklist label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  margin: 8px 0;
}
.checklist input {
  width: auto;
  margin-top: 1px;
}
.issue-panel {
  display: grid;
  gap: 14px;
}
.issue-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 16px;
  line-height: 1.6;
}
.issue-card h3 {
  margin: 0 0 8px;
}
.issue-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.course-finish-panel {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 14px;
  align-items: start;
}

.course-completion-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  min-height: 42px;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.course-completion-fab strong,
.course-completion-fab span {
  display: block;
  line-height: 1.05;
}

.course-completion-fab strong {
  font-size: 13px;
}

.course-completion-fab span {
  margin-top: 2px;
  font-size: 10.5px;
  opacity: 0.92;
}

.course-completion-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 18px 28px;
  background: rgba(15, 23, 42, 0.58);
  overflow: hidden;
}

.course-completion-modal.show {
  display: flex;
}

.course-completion-panel {
  width: min(980px, 100%);
  max-height: calc(100dvh - 124px);
  display: flex;
  flex-direction: column;
  border: 1px solid #bfdbfe;
  border-radius: 24px;
  background: #f8fbff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.course-completion-head {
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dbeafe;
  background: #fff;
}

.course-completion-head strong {
  display: block;
  font-size: 18px;
}
.course-completion-head span {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}
.course-completion-close {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0 !important;
  border-radius: 999px !important;
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.course-completion-body {
  padding: 18px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.onboarding-modal {
  display: none;
  padding: 18px;
  min-height: calc(100vh - 70px);
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.14), transparent 34%),
    radial-gradient(
      circle at 100% 100%,
      rgba(21, 128, 61, 0.1),
      transparent 34%
    );
}

.onboarding-modal.show {
  display: flex;
}

body.intro-active main,
body.intro-active .course-completion-fab,
body.intro-active .course-completion-modal,
body.intro-active .mobile-app-footer,
body.intro-active .mobile-step-peek {
  display: none !important;
}

.onboarding-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 24px;
  border: 1px solid #bfdbfe;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}

.onboarding-body {
  padding: 20px;
}

.onboarding-step {
  display: none;
}
.onboarding-step.active {
  display: block;
}
.onboarding-step h2 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #0f172a;
}
.onboarding-step p {
  margin: 0 0 12px;
  color: #334155;
  line-height: 1.55;
}
.onboarding-step ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #334155;
  line-height: 1.55;
}

.onboarding-video {
  aspect-ratio: 16/9;
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: #e5e7eb;
  margin: 12px 0;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.onboarding-progress {
  font-size: 12px;
  font-weight: 1000;
  color: #475569;
}

.tour-highlight {
  position: relative !important;
  z-index: 185 !important;
  outline: 3px solid #2563eb !important;
  outline-offset: 4px !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.22) !important;
}

.tour-dim {
  position: fixed;
  z-index: 180;
  display: none;
  background: rgba(15, 23, 42, 0.62);
  pointer-events: none;
}

.tour-dim.show {
  display: block;
}

.guided-tour-card {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 210;
  width: min(420px, calc(100vw - 24px));
  display: none;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.guided-tour-card.show {
  display: block;
}
.guided-tour-body {
  padding: 16px;
}
.guided-tour-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #0f172a;
}
.guided-tour-body p {
  margin: 0;
  color: #334155;
  line-height: 1.5;
}
.guided-tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}
.guided-tour-actions span {
  font-size: 12px;
  font-weight: 1000;
  color: #475569;
}
.quiz-card,
.certificate-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
.quiz-card h3,
.certificate-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.quiz-card p,
.certificate-card p {
  margin: 0 0 12px;
  color: #475569;
  line-height: 1.55;
}
.quiz-question {
  border: 1px solid #dbe3f0;
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0;
  background: #fbfdff;
}
.quiz-question strong {
  display: block;
  margin-bottom: 8px;
}
.quiz-question label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}
.quiz-question input {
  width: auto;
  margin-top: 2px;
}
.quiz-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 900;
  display: none;
}
.quiz-result.show {
  display: block;
}
.quiz-result.good {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.quiz-result.warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}
.certificate-card.locked {
  opacity: 0.78;
}
.certificate-paper {
  border: 2px solid #bfdbfe;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  text-align: center;
}
.certificate-paper .cert-kicker {
  font-size: 11px;
  font-weight: 1000;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.certificate-paper h2 {
  margin: 8px 0 6px;
  font-size: 26px;
}
.certificate-name {
  margin: 12px auto;
  padding: 10px;
  border-bottom: 2px solid #2563eb;
  width: min(320px, 100%);
  font-size: 22px;
  font-weight: 1000;
  color: #0f172a;
}
.certificate-seal {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  margin: 14px auto 4px;
  display: grid;
  place-items: center;
  background: #dcfce7;
  color: #166534;
  border: 2px solid #86efac;
  font-size: 30px;
  font-weight: 1000;
}
.volunteer-card {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 18px;
  padding: 14px;
  margin-top: 14px;
}
.volunteer-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #166534;
}
.volunteer-card p {
  margin: 0 0 10px;
  color: #14532d;
  line-height: 1.45;
}
.volunteer-form {
  display: none;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 10px;
}
.volunteer-form.show {
  display: grid;
}
.volunteer-form input {
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 11px 13px;
}
.volunteer-status {
  margin-top: 8px !important;
  font-size: 13px;
  font-weight: 900;
  color: #166534 !important;
}
@media (max-width: 520px) {
  .volunteer-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .course-finish-panel {
    grid-template-columns: 1fr;
  }
}

.link-purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.link-purpose {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  line-height: 1.5;
}
.link-purpose h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #111827;
}
.link-purpose p {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 13px;
}
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.note-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  line-height: 1.5;
  background: #fff;
}
.note-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 24px 28px;
  background: rgba(15, 23, 42, 0.58);
  overflow: hidden;
}
.modal-backdrop.show {
  display: flex;
}
.modal-box {
  width: min(1120px, 100%);
  max-height: calc(100dvh - 124px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
  overflow: hidden;
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.modal-head h2 {
  margin: 0;
  font-size: 24px;
}
.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.modal-body {
  padding: 20px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
  background: #fee2e2;
  color: #991b1b;
}
@media (max-width: 1040px) {
  .link-purpose-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: 1fr;
  }
  .step-layout,
  .prep-layout {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
  }
  .grid,
  .grid.two,
  .link-purpose-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }
  .formgrid,
  .formgrid.two {
    grid-template-columns: 1fr;
  }
  .flow-node {
    min-width: 125px;
  }
}
@media (max-width: 680px) {
  .screen {
    padding: 12px;
  }
  .body {
    padding: 14px;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .actions button,
  .actions a {
    width: 100%;
  }
  .focus-item {
    grid-template-columns: 1fr;
  }
  .num {
    margin-bottom: 4px;
  }
}

.simple-hero {
  padding: clamp(24px, 4vw, 42px);
}
.simple-hero h1 {
  max-width: 900px;
}
.simple-hero p {
  max-width: 760px;
  font-size: 18px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero-actions button {
  font-size: 16px;
  padding: 13px 18px;
}
.simple-links-box {
  background: #fff;
  border-color: #bfdbfe;
}
.link-purpose h4 {
  font-size: 17px;
}
.link-purpose p {
  font-size: 14px;
  color: #334155;
}
.focus-card {
  font-size: 17px;
}
.focus-card h3 {
  font-size: 28px;
}
.note-card p,
.help-box li,
.issue-card li {
  font-size: 15px;
}

/* Substep flow */
.step-layout {
  display: block;
}
.focus-list {
  display: flex;
  gap: 18px;
  align-items: stretch;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 14px;
}
.focus-item {
  position: relative;
  min-width: 210px;
  max-width: 250px;
  grid-template-columns: 36px 1fr;
}
.focus-item:not(:last-child)::after {
  content: "";
  display: none;
}
.focus-card {
  margin-top: 2px;
}

.substep-nav {
  display: none !important;
}

.substep-nav-top {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
}

.substep-count {
  min-width: auto;
  text-align: center;
  font-size: 12px;
  font-weight: 1000;
  color: #475569;
  padding: 0 4px;
}

.substep-icon-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 999px;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  color: #0f172a !important;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.substep-icon-btn.primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.substep-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.substep-icon-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 999px;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  color: #0f172a !important;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.substep-icon-btn.primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.substep-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.substep-count {
  min-width: 104px;
  text-align: center;
  font-size: 12px;
  font-weight: 1000;
  color: #475569;
  padding: 0 4px;
}

@media (max-width: 680px) {
  .substep-nav-top {
    justify-content: flex-end;
    gap: 7px;
  }

  .substep-icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 26px;
  }

  .substep-count {
    font-size: 11px;
  }
}

.question-wrap {
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.question-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.question-row button {
  white-space: nowrap;
  background: #fff !important;
  border: 1px solid #bfdbfe !important;
  color: #1e3a8a !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}
.question-answer {
  display: none;
  margin-top: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 22px;
  padding: 16px;
  line-height: 1.6;
}
.question-answer.show {
  display: block;
}
.question-answer h3 {
  margin: 0 0 8px;
  color: #1e3a8a;
}
.question-answer ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.question-answer .link-purpose-grid {
  margin-top: 10px;
}
.question-answer .link-purpose {
  background: #fff;
}
@media (max-width: 680px) {
  .focus-item {
    min-width: 185px;
    grid-template-columns: 1fr;
  }
  .focus-item:not(:last-child)::after {
    display: none;
  }
}

/* Lesson card polish */
.focus-card {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.focus-card h3 {
  color: #0f172a;
}

.focus-card p {
  color: #334155;
}

.compact-card-actions {
  margin-top: 14px;
}

.step1-help {
  margin-top: 12px;
}

.question-wrap {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
}

.question-row {
  padding-bottom: 0;
}

.question-row button {
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: none;
}

.question-answer {
  background: #fff;
  color: #334155;
  border-color: var(--line);
}

.question-answer h3 {
  color: #0f172a;
}

@media print {
  .topbar,
  .head,
  .actions,
  .side-card:not(.preview-panel),
  .toolbar,
  .family-tabs,
  .no-print,
  .choice-tabs,
  .focus-card,
  .help-box,
  .question-wrap {
    display: none !important;
  }
  .screen {
    display: none !important;
  }
  .screen.print-screen {
    display: block !important;
    padding: 0 !important;
  }
  .card {
    border: 0;
    box-shadow: none;
  }
  .body {
    padding: 0;
  }
  .prep-layout {
    display: block;
  }
  .preview-panel {
    display: block !important;
    box-shadow: none !important;
    border: 0 !important;
  }
  .form-preview {
    border: 0;
  }
}

/* remove repeated description from small substep cards */
.focus-item {
  align-items: center;
  min-height: 82px;
}

.focus-item h3 {
  margin: 0;
  line-height: 1.35;
}

.focus-item p {
  display: none;
}

/* mobile header step overflow fix */
@media (max-width: 680px) {
  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand .logo {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    flex: 0 0 auto;
  }

  .brand strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand span {
    display: none;
  }

  .topbar > div:nth-child(2) {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .flow {
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .flow::-webkit-scrollbar {
    height: 4px;
  }

  .flow::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
  }

  .flow-node {
    min-width: 96px;
    max-width: 96px;
    padding: 7px 8px;
    border-radius: 14px;
    scroll-snap-align: start;
  }

  .flow-node small {
    font-size: 10px;
  }

  .flow-node b {
    font-size: 10.5px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .dot {
    width: 17px;
    height: 17px;
    font-size: 10px;
  }

  .arrow {
    display: none;
  }

  .progress-track {
    height: 5px;
    margin-top: 2px;
  }

  .topbar > button {
    padding: 8px 11px;
    font-size: 12px;
  }
}

/* mobile header: title left, clear button right, steps below */
@media (max-width: 680px) {
  .topbar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand clear"
      "steps steps";
    gap: 8px 10px;
    padding: 8px 10px;
    align-items: center;
  }

  .topbar .brand {
    grid-area: brand;
    min-width: 0;
  }

  .topbar > div:nth-child(2) {
    grid-area: steps;
    width: 100%;
    min-width: 0;
  }

  .topbar > button {
    grid-area: clear;
    justify-self: end;
    align-self: center;
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
  }

  .brand .logo {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    flex: 0 0 auto;
  }

  .brand strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand span {
    display: none;
  }

  .flow {
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .flow::-webkit-scrollbar {
    height: 4px;
  }

  .flow::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
  }

  .flow-node {
    min-width: 96px;
    max-width: 96px;
    padding: 7px 8px;
    border-radius: 14px;
    scroll-snap-align: start;
  }

  .flow-node small {
    font-size: 10px;
  }

  .flow-node b {
    font-size: 10.5px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .dot {
    width: 17px;
    height: 17px;
    font-size: 10px;
  }

  .arrow {
    display: none;
  }

  .progress-track {
    height: 5px;
    margin-top: 2px;
  }
}

/* mobile: remove outer card container to use full width */
@media (max-width: 680px) {
  .screen {
    padding: 8px 8px 14px;
  }

  .wrap {
    width: 100%;
    margin: 0;
  }

  .screen > .wrap > .card {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .screen > .wrap > .card > .head {
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 14px 4px 12px;
  }

  .screen > .wrap > .card > .head h2 {
    font-size: 24px;
    line-height: 1.15;
  }

  .screen > .wrap > .card > .head p,
  .screen > .wrap > .card > .head .kicker {
    display: none;
  }

  .screen > .wrap > .card > .body {
    padding: 14px 0 0;
  }

  .focus-list {
    padding-left: 0;
    padding-right: 0;
  }


  .focus-card {
    border-radius: 20px;
  }
}

/* compact header step cards: number + title in one row */
.flow-node {
  display: flex;
  align-items: center;
}

.flow-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.flow-label b {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-node small {
  display: none;
}

/* compact substep cards: number + title in one row */
.focus-item {
  display: flex;
  align-items: center;
}

.substep-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.substep-label h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

/* mobile compact cards */
@media (max-width: 680px) {
  .flow-node {
    min-width: 96px;
    max-width: 96px;
    min-height: 48px;
  }

  .flow-label {
    gap: 5px;
  }

  .flow-label b {
    font-size: 10.5px;
  }

  .focus-item {
    min-width: 180px;
    min-height: 72px;
    padding: 12px;
  }

  .substep-label {
    gap: 9px;
  }

  .substep-label h3 {
    font-size: 14px;
    line-height: 1.25;
  }

  .num {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
}

/* put step buttons above FAQs */
.screen > .wrap > .card > .body {
  display: flex;
  flex-direction: column;
}

.screen > .wrap > .card > .body > .step-layout {
  order: 1;
}

.screen > .wrap > .card > .body > .actions {
  order: 2;
  margin-top: 14px;
}

.screen > .wrap > .card > .body > .question-wrap {
  order: 3;
  margin-top: 14px;
}

/* align step action buttons to the right */
.screen > .wrap > .card > .body > .actions {
  justify-content: flex-end;
  align-items: center;
}

/* keep only step buttons compact on mobile also */
@media (max-width: 680px) {
  .screen > .wrap > .card > .body > .actions {
    justify-content: flex-end;
    flex-direction: row;
  }

  .screen > .wrap > .card > .body > .actions button,
  .screen > .wrap > .card > .body > .actions a {
    width: auto;
  }
}

.lesson-more-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.lesson-more-actions .btn {
  min-height: 36px !important;
  padding: 8px 11px !important;
  font-size: 12.5px !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.lesson-more-actions .btn.help-mini {
  background: #fff7ed !important;
  color: #9a3412 !important;
  border: 1px solid #fed7aa !important;
}

.lesson-help-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 76px 18px 22px;
  background: rgba(15, 23, 42, 0.62);
  overflow: hidden;
}

.lesson-help-modal.show {
  display: flex;
}

.lesson-help-panel {
  width: min(720px, calc(100vw - 26px));
  max-height: calc(100dvh - 98px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.lesson-help-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.lesson-help-head strong {
  display: block;
  font-size: 20px;
  color: #0f172a;
}

.lesson-help-head span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.lesson-help-close {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0 !important;
}

.lesson-help-body {
  padding: 16px;
  display: grid;
  gap: 14px;
  flex: 0 0 auto;
  overflow: visible;
  min-height: 0;
  overscroll-behavior: contain;
}

.lesson-help-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.lesson-help-section.step-overview-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: visible;
}

.step-overview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 42%) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lesson-help-section.modal-reference-section {
  border-color: #fed7aa;
  background: #fff7ed;
}

.lesson-help-section.modal-reference-section h3 {
  color: #9a3412;
}

.step-overview-visual {
  display: block !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
  margin: 0 !important;
  width: 100%;
  height: clamp(260px, 42vh, 380px);
  min-height: 0;
  aspect-ratio: 4/3;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: #eef4ff;
}

.step-overview-visual.primary-visual-grid,
.step-overview-visual.clean-media-grid {
  display: block !important;
  margin: 0 !important;
}

.step-overview-visual .public-media-card,
.step-overview-visual .media-card-button {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.step-overview-visual .public-media-thumb {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}

.step-overview-visual .public-media-thumb img,
.step-overview-visual .public-media-thumb video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.step-overview-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
  min-height: 0;
}

.step-overview-copy h3 {
  margin: 0 !important;
}

.step-overview-copy p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.step-overview-copy .step-flow-diagram {
  min-height: 0;
  margin-top: 0;
}

@media (max-width: 680px) {
  .lesson-help-modal {
    padding: 72px 10px 84px;
    align-items: flex-start;
  }

  .lesson-help-panel {
    width: 100%;
    max-height: calc(100dvh - 84px);
    border-radius: 20px;
  }

  .lesson-help-head {
    padding: 13px 14px;
  }

  .lesson-help-body {
    padding: 12px;
    gap: 12px;
  }

  .step-overview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
  }

  .step-overview-visual,
  .step-overview-visual .media-card-button {
    min-height: 0 !important;
    height: clamp(145px, 22vh, 190px) !important;
  }
}

.lesson-help-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #0f172a;
}

.lesson-help-section ul,
.lesson-help-section ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.65;
}

.lesson-help-section li {
  margin: 5px 0;
}

.lesson-help-faq {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 8px;
}

.lesson-help-faq summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 1000;
  color: #0f172a;
  list-style: none;
}

.lesson-help-faq summary::-webkit-details-marker {
  display: none;
}

.lesson-help-faq div {
  padding: 0 14px 13px;
  color: #334155;
  line-height: 1.6;
}

.lesson-help-empty {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.step-overview-card {
  display: none !important;
}

.step-flow-diagram {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.step-flow-node {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  position: relative;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: #f0fdf4;
  padding: 12px;
}

.step-flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -11px;
  width: 2px;
  height: 10px;
  background: #86efac;
}

.step-flow-num {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #15803d;
  color: #fff;
  font-weight: 1000;
}

.step-flow-node strong {
  display: block;
  color: #14532d;
  font-size: 15px;
  line-height: 1.25;
}

.step-flow-node span {
  display: block;
  margin-top: 3px;
  color: #334155;
  line-height: 1.45;
}

.inline-help-link {
  color: #1d4ed8;
  font-weight: 1000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-thread {
  display: grid;
  gap: 10px;
  min-height: 260px;
  align-content: end;
}

.chat-bubble {
  max-width: 88%;
  border-radius: 18px;
  padding: 11px 13px;
  line-height: 1.5;
  font-weight: 800;
}

.chat-bubble.bot {
  justify-self: start;
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

.chat-bubble.user {
  justify-self: end;
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #bbf7d0;
}

.chat-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
  max-width: 96%;
}

.chat-choice-grid button {
  justify-content: center;
  text-align: center;
  border-radius: 999px !important;
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
  color: #075e54 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  min-height: 36px !important;
  width: auto !important;
  padding: 8px 11px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

.sir-timeline-banner {
  position: relative;
  display: none;
  cursor: pointer;
  margin: 12px auto 0;
  width: min(1030px, calc(100% - 28px));
  border: 1px solid #bbf7d0;
  border-radius: 18px;
  background: #f0fdf4;
  color: #14532d;
  padding: 10px 13px;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.1);
}

.sir-timeline-message{display:inline-flex!important;align-items:center;gap:0}
.sir-timeline-message>span{margin-left:10px!important}
.sir-timeline-message>i{margin:0 18px;color:#16a34a;font-style:normal;font-weight:1000}
.sir-timeline-count{position:absolute;right:5px;top:-7px;display:grid!important;place-items:center;width:20px;height:20px;margin:0!important;border-radius:999px;background:#2563eb;color:#fff!important;font-size:10px!important;font-weight:1000;z-index:2}
.sir-announcement-list{display:grid;gap:12px}
.sir-announcement-list article{display:grid;gap:7px;padding:15px;border:1px solid #bbf7d0;border-radius:14px;background:#f0fdf4}
.sir-announcement-list article small{color:#15803d;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.sir-announcement-list article strong{font-size:17px;color:#0f172a}
.sir-announcement-list article p{margin:0;color:#334155;line-height:1.55}
.sir-announcement-list article a{justify-self:start;text-decoration:none}

.sir-timeline-banner:focus-visible {
  outline: 3px solid #86efac;
  outline-offset: 3px;
}

.sir-timeline-banner.show {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.sir-timeline-badge {
  display: inline-flex;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 1000;
  padding: 6px 9px;
  white-space: nowrap;
}

.sir-timeline-banner strong {
  display: inline;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}

.sir-timeline-banner span {
  display: inline;
  margin-top: 0;
  margin-left: 16px;
  font-size: 12px;
  font-weight: 800;
  color: #166534;
  white-space: nowrap;
}

.sir-timeline-ticker {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.sir-timeline-track {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  white-space: nowrap;
  animation: sirTimelineTicker 20s linear infinite;
}

.sir-timeline-banner:hover .sir-timeline-track,
.sir-timeline-banner:focus-visible .sir-timeline-track {
  animation-play-state: paused;
}

@keyframes sirTimelineTicker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sir-timeline-track {
    padding-left: 0;
    animation: none;
  }
}

.admin-tools-strip {
  display: none;
  width: min(1030px, calc(100% - 28px));
  margin: 8px auto 0;
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  background: #eef2ff;
  padding: 9px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-tools-strip.show {
  display: flex;
}

.admin-tools-strip strong {
  color: #312e81;
  font-size: 13px;
}

.admin-tools-strip button {
  min-height: 34px !important;
  padding: 8px 11px !important;
  font-size: 12px !important;
}

@media (max-width: 680px) {
  .admin-tools-strip.show {
    width: calc(100% - 20px);
    align-items: stretch;
    flex-direction: column;
  }
}

.desktop-step-btn.running {
  border-color: #22c55e !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.16) inset;
}

.desktop-step-btn.running .desktop-step-no {
  background: #16a34a !important;
  color: #fff !important;
}

@media (max-width: 680px) {
  .sir-timeline-banner {
    width: calc(100% - 20px);
    margin-top: 8px;
    border-radius: 14px;
    padding: 9px 10px;
  }

  .sir-timeline-banner.show {
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
  }
}

.admin-faq-list .chat-choice-grid {
  display: grid;
}

.admin-faq-list .chat-choice-grid button {
  justify-content: flex-start;
  text-align: left;
  border-radius: 14px !important;
}

.chat-name-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chat-name-row input {
  flex: 1 1 180px;
}

.lesson-help-body.chat-mode {
  padding: 0;
  background: #e5ddd5;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%);
  background-size: 28px 28px;
}

.lesson-help-body.chat-mode .lesson-help-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 16px;
}

.lesson-help-body.chat-mode .chat-bubble {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  border: 0;
}

.lesson-help-body.chat-mode .chat-bubble.bot {
  background: #fff;
  color: #111827;
  border-radius: 6px 18px 18px 18px;
}

.lesson-help-body.chat-mode .chat-bubble.user {
  background: #dcf8c6;
  color: #0f172a;
  border-radius: 18px 6px 18px 18px;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 8px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.chat-composer input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 9px 10px;
}

.chat-send-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  border-radius: 999px !important;
  background: #22c55e !important;
  color: #fff !important;
  font-size: 22px !important;
  line-height: 1 !important;
}

.chat-fab {
  position: fixed;
  right: 18px;
  bottom: 72px;
  z-index: 82;
  min-height: 42px;
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  color: #fff !important;
  border: 2px solid #bbf7d0 !important;
  box-shadow:
    0 18px 38px rgba(22, 163, 74, 0.34),
    0 0 0 0 rgba(34, 197, 94, 0.42);
  animation: chatPulse 1.8s ease-in-out infinite;
}

.chat-fab::before {
  content: "?";
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #16a34a;
  font-weight: 1000;
}

.voice-master-btn {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  color: #334155 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08) !important;
  position: relative !important;
}

.voice-master-btn::before {
  content: "";
  width: 0;
  height: 0;
  display: block;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid currentColor;
  margin-left: 3px;
  background: transparent;
}

.voice-master-btn::after {
  content: none;
}

.voice-master-btn.audio-playing {
  color: #fff !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28) !important;
}

.voice-master-btn.audio-playing::before {
  width: 6px;
  height: 18px;
  border: 0;
  margin-left: -8px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 10px 0 0 currentColor;
}

.voice-master-btn.audio-playing::after {
  display: none;
}

.voice-master-icon {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@keyframes chatPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      0 18px 38px rgba(22, 163, 74, 0.34),
      0 0 0 0 rgba(34, 197, 94, 0.36);
  }
  50% {
    transform: translateY(-2px);
    box-shadow:
      0 22px 42px rgba(22, 163, 74, 0.42),
      0 0 0 8px rgba(34, 197, 94, 0);
  }
}

.phone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 680px) {
  .chat-fab {
    right: 12px;
    bottom: 114px;
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
}

.question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  overflow: visible;
  padding: 0;
}

.question-row button {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #b91c1c !important;
  font-size: 14px !important;
  font-weight: 1000 !important;
  text-decoration: none;
  white-space: normal;
  justify-content: flex-start;
}

.question-row button::before {
  content: "?";
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 1000;
}

.question-answer {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 10px 0 0 !important;
  margin-top: 8px !important;
  color: #334155 !important;
  line-height: 1.6;
}

.question-answer h3 {
  color: #b91c1c !important;
  font-size: 16px;
  font-weight: 1000;
  margin: 0 0 8px;
}

.question-answer p,
.question-answer li {
  color: #334155;
  font-size: 14px;
}

.question-answer ul {
  padding-left: 20px;
}

.question-answer .links {
  margin-top: 10px;
}

/* mobile FAQ spacing */
@media (max-width: 680px) {
  .question-row {
    flex-direction: column;
    gap: 10px;
  }

  .question-row button {
    width: 100% !important;
    justify-content: flex-start;
    text-align: left;
  }
}

/* media upload for every step and substep */
.media-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
  padding: 14px;
}

.media-panel h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #0f172a;
}

.media-drop {
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.media-drop input {
  display: none;
}

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

.media-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.media-thumb {
  height: 118px;
  background: #e5e7eb;
  display: grid;
  place-items: center;
  color: #475569;
  font-weight: 1000;
  font-size: 13px;
  text-align: center;
  padding: 8px;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-meta {
  padding: 9px;
}

.media-meta strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-meta small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.media-card-actions {
  display: flex;
  gap: 6px;
  padding: 0 9px 9px;
}

.media-card-actions button,
.media-card-actions a {
  padding: 7px 9px;
  font-size: 12px;
}

/* live news section */
.news-shell {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  padding: 0 20px;
}

.news-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.news-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.news-head h2 {
  margin: 0;
  font-size: 22px;
}

.news-head p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.news-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.news-body {
  padding: 16px 20px 20px;
}

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

.news-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  line-height: 1.5;
}

.news-item h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.news-item h3 a {
  color: #0f172a;
  text-decoration: none;
}

.news-item h3 a:hover {
  color: var(--primary);
}

.news-item p {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.news-item small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-weight: 800;
}

.news-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

  .news-shell {
    padding: 0 12px;
  }

  .news-head {
    flex-direction: column;
  }

  .news-tools {
    justify-content: flex-start;
  }
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.desktop-step-header {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 0;
  scrollbar-width: thin;
}

.desktop-step-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;

  box-shadow: none;
}

.desktop-step-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1e40af;
}

.desktop-step-btn.done {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.desktop-step-no {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #e5e7eb;
  color: #334155;
}

.desktop-step-btn.active .desktop-step-no {
  background: #2563eb;
  color: #fff;
}

.desktop-step-btn.done .desktop-step-no {
  background: #22c55e;
  color: #fff;
}

.focus-item {
  position: relative;
}

.audio-reading-highlight {
  background: #fef3c7 !important;
  color: #78350f !important;
  outline: 3px solid #f59e0b !important;
  outline-offset: 3px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.2) !important;
}

.focus-item.audio-playing {
  border-color: #16a34a !important;
  background: #ecfdf5 !important;
}

.audio-voice-notice {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 10020;
  width: min(520px, calc(100% - 28px));
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #78350f;
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(120, 53, 15, 0.18);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 900;
}

.audio-voice-notice button {
  float: right;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0 !important;
  margin-left: 8px;
  background: #fff7ed !important;
  color: #92400e !important;
  border: 1px solid #fed7aa !important;
}

.floating-lang,
.floating-lang-panel {
  z-index: 9999 !important;
}

.floating-lang-panel.show {
  z-index: 10000 !important;
}

.floating-lang-panel {
  position: fixed !important;
  top: 58px !important;
  right: 18px !important;
}

.topbar {
  z-index: 9000 !important;
  overflow: visible !important;
}

.public-media-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
  padding: 14px;
}

.public-media-panel h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #0f172a;
}

.public-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.public-media-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.public-media-thumb {
  height: 118px;
  background: #e5e7eb;
  display: grid;
  place-items: center;
  color: #475569;
  font-weight: 1000;
  font-size: 13px;
  text-align: center;
  padding: 8px;
}

.public-media-thumb.video-media-thumb {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #dbeafe;
}

.public-media-thumb img,
.public-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-video-play {
  pointer-events: none;
  z-index: 2;
}

.media-load-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 1000;
  text-align: center;
}

.public-media-meta {
  padding: 10px;
}

.public-media-meta strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.public-media-meta p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.public-media-meta a {
  margin-top: 8px;
}

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

@media (max-width: 680px) {
  .desktop-step-header {
    display: none;
  }

  .top-actions {
    grid-area: clear;
    justify-self: end;
  }

  .top-actions .btn-ghost {
    display: none;
  }

  .top-actions a,
  .top-actions button {
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media print {
  .public-media-panel,
  .top-actions a {
    display: none !important;
  }
}

@media print {
  .media-panel,
  .news-shell {
    display: none !important;
  }
}

.clean-media-grid {
  margin-top: 14px;
}

.primary-visual-grid {
  grid-template-columns: 1fr !important;
  margin: 14px 0 !important;
}

.primary-visual-grid .public-media-card {
  max-width: 100%;
  border-radius: 18px !important;
  overflow: hidden;
}

.primary-visual-grid .public-media-thumb {
  min-height: 190px;
  background: #eef4ff;
}

.primary-visual-grid .public-media-thumb img,
.primary-visual-grid .public-media-thumb video {
  object-fit: cover;
}

.lesson-help-section > .primary-visual-grid:first-child {
  margin-top: 0 !important;
}

.visually-hidden {
  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;
}

.lesson-intro-visual-row {
  display: grid;
  grid-template-columns: minmax(280px, 46%) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin: 0 0 14px;
  min-height: 230px;
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  border-bottom: 1px solid #dbe3f0;
  overflow: hidden;
  background: #f8fbff;
}

.lesson-intro-visual-row > p {
  margin: 0 !important;
  padding: 18px 20px !important;
  align-self: center;
  position: relative;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.94),
    rgba(255, 255, 255, 0.98)
  );
  min-height: 100%;
  display: flex;
  align-items: center;
}

.lesson-primary-visual {
  margin: 0 !important;
  width: 100%;
  height: 100%;
  min-height: 100%;
  align-self: stretch;
}

.lesson-primary-visual .media-card-button {
  min-height: 0 !important;
  height: 100% !important;
  width: 100% !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08) !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.lesson-primary-visual .public-media-thumb {
  min-height: 0 !important;
  height: 100% !important;
  width: 100% !important;
  aspect-ratio: auto !important;
}

.lesson-primary-visual .public-media-card {
  border-radius: 16px !important;
}

.lesson-help-section .primary-visual-grid:not(.lesson-primary-visual) {
  max-width: 420px;
}

@media (max-width: 760px) {
  .lesson-intro-visual-row {
    grid-template-columns: minmax(220px, 46%) minmax(0, 1fr);
    min-height: 230px;
  }

  .lesson-primary-visual .public-media-thumb {
    aspect-ratio: auto !important;
  }
}

@media (max-width: 560px) {
  .lesson-intro-visual-row {
    grid-template-columns: minmax(150px, 42%) minmax(0, 1fr);
    align-items: start;
    min-height: 270px;
  }

  .lesson-primary-visual {
    max-width: none;
  }

  .lesson-primary-visual .public-media-thumb {
    aspect-ratio: auto !important;
    max-height: none !important;
  }

  .lesson-intro-visual-row > p {
    align-self: start;
    padding: 14px 13px !important;
    font-size: 14px !important;
    line-height: 1.48 !important;
  }
}

.clean-media-card {
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: 0.18s;
}

.clickable-media-card {
  cursor: pointer;
  display: block;
}

.clickable-media-card:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.14);
}

.youtube-thumb {
  height: 180px;
}

.public-media-meta strong {
  text-align: center;
}

.public-media-meta p {
  text-align: center;
  margin-top: 5px;
}

.substep-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
  margin-bottom: 14px;
}

.substep-title-row h3 {
  margin: 0 !important;
  flex: 1;
  min-width: 0;
}

.substep-title-row .substep-nav-top {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  flex: 0 0 auto;
}

@media (max-width: 680px) {
  .substep-title-row {
    gap: 8px;
    align-items: flex-start;
  }

  .substep-title-row h3 {
    font-size: 20px !important;
    line-height: 1.2;
  }

  .substep-title-row .substep-count {
    display: none;
  }
}

.youtube-card-thumb {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.youtube-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 42px;
  border-radius: 14px;
  background: #ef4444;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 1000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.media-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 22px 28px;
  background: rgba(15, 23, 42, 0.68);
  overflow: hidden;
}

.media-preview-modal.show {
  display: flex;
}

.media-preview-box {
  width: min(980px, 100%);
  max-height: calc(100dvh - 124px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.38);
  overflow: hidden;
}

.media-preview-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.media-preview-head h2 {
  margin: 0;
  font-size: 22px;
}

.media-preview-head p {
  margin: 5px 0 0;
  color: #64748b;
  line-height: 1.45;
}

.media-preview-close {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 22px;
}

.media-preview-body {
  padding: 16px;
  background: #f8fafc;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.media-preview-body img,
.media-preview-body video {
  max-width: 100%;
  width: 100%;
  max-height: calc(100dvh - 230px);
  object-fit: contain;
  border-radius: 18px;
  background: #000;
}

.media-preview-frame {
  width: 100%;
  height: calc(100dvh - 230px);
  min-height: 260px;
  border: 0;
  border-radius: 18px;
  background: #f1f5f9;
}

.media-preview-modal.how-preview-mode .media-preview-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #dbeafe;
  background: #eff6ff;
}

.media-preview-modal.how-preview-mode .media-preview-head h2 {
  display: block;
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.media-preview-modal.how-preview-mode .media-preview-head p {
  display: block;
  margin: 3px 0 0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
}

.media-preview-modal.how-preview-mode .media-preview-body {
  padding-top: 12px;
  background: #fff;
}

.media-preview-step-flow {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 2px 0 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.media-preview-step-dot {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-weight: 1000;
  cursor: pointer;
}

.media-preview-step-dot.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.media-preview-step-media {
  border-radius: 18px;
  overflow: hidden;
  background: #f1f5f9;
}

.media-preview-step-media img,
.media-preview-step-media video,
.media-preview-step-media .media-preview-frame {
  display: block;
}

.media-preview-step-footer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.media-preview-step-title {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
}

.media-preview-nav-btn {
  width: 44px;
  height: 44px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
}

.media-preview-nav-btn:hover {
  background: #dbeafe;
}

.media-preview-fallback {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  background: #f8fafc;
}

@media (max-width: 680px) {
  .media-preview-modal {
    padding: 72px 10px 116px;
    align-items: flex-start;
  }

  .media-preview-box {
    border-radius: 20px;
    max-height: calc(100dvh - 188px);
    display: flex;
    flex-direction: column;
  }

  .media-preview-head {
    padding: 12px 14px;
    flex: 0 0 auto;
  }

  .media-preview-head h2 {
    font-size: 17px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .media-preview-head p {
    font-size: 12px;
  }

  .media-preview-close {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .media-preview-body {
    padding: 12px;
    overflow: auto;
  }

  .media-preview-frame {
    height: auto;
    aspect-ratio: 16/9;
    min-height: 210px;
    max-height: 58vh;
  }

  .media-preview-body img,
  .media-preview-body video {
    max-height: 58vh;
  }

  .media-preview-modal.how-preview-mode {
    padding-top: 72px;
  }

  .media-preview-modal.how-preview-mode .media-preview-box {
    max-height: calc(100dvh - 188px);
  }

  .media-preview-step-flow {
    justify-content: flex-start;
    padding-bottom: 10px;
  }

  .media-preview-step-dot {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .media-preview-step-footer {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .media-preview-step-title {
    font-size: 15px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .media-preview-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}

.media-card-button {
  width: 100%;
  min-height: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  display: grid !important;
  grid-template-rows: auto auto;
  align-content: start !important;
  align-items: start !important;
  justify-content: stretch !important;
  text-align: initial !important;
  overflow: hidden;
  font: inherit;
}

.media-card-button .public-media-meta {
  color: #111827;
}

.media-card-button:hover {
  filter: none;
}

/* compact active substep card */
.focus-card {
  padding: 14px 16px !important;
  min-height: auto !important;
  border-radius: 18px !important;
  line-height: 1.45 !important;
}

.substep-title-row {
  padding-bottom: 8px !important;
  margin-bottom: 10px !important;
  gap: 10px !important;
}

.substep-title-row h3 {
  font-size: 22px !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}

.focus-card > p {
  font-size: 15px !important;
  line-height: 1.55 !important;
  margin: 0 0 10px !important;
}

.substep-nav-top {
  gap: 6px !important;
}

.substep-count {
  font-size: 11px !important;
  white-space: nowrap;
}

.substep-icon-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  font-size: 23px !important;
}

.focus-card .links {
  margin-top: 10px !important;
  gap: 8px !important;
}

.focus-card .links a,
.focus-card .compact-card-actions a,
.focus-card .compact-card-actions button {
  padding: 8px 12px !important;
  font-size: 13px !important;
}

.clean-media-grid {
  margin-top: 10px !important;
  gap: 10px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start !important;
}

.public-media-card {
  border-radius: 16px !important;
}

.public-media-thumb {
  height: auto !important;
  aspect-ratio: 16/10;
}

.youtube-card-thumb,
.youtube-thumb {
  height: auto !important;
  aspect-ratio: 16/10;
}

.public-media-meta {
  padding: 8px 9px !important;
}

.public-media-meta strong {
  font-size: 12.5px !important;
  line-height: 1.25 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0 !important;
}

.public-media-meta p {
  font-size: 11px !important;
  line-height: 1.35 !important;
  margin-top: 4px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.public-media-action {
  display: inline-flex;
  margin-top: 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 1000;
  line-height: 1;
}

@media (max-width: 680px) {
  .clean-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .media-card-button {
    min-height: 0 !important;
  }

  .public-media-meta {
    padding: 7px !important;
  }

  .public-media-meta strong {
    font-size: 11.5px !important;
  }

  .public-media-action {
    margin-top: 6px;
    padding: 5px 7px;
    font-size: 10px;
  }
}

.media-card-button {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08) !important;
  transition:
    transform 0.16s,
    border-color 0.16s,
    box-shadow 0.16s;
}

.media-card-button:hover {
  transform: translateY(-1px);
  border-color: #93c5fd !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14) !important;
}

.youtube-play {
  width: 46px !important;
  height: 34px !important;
  border-radius: 11px !important;
  font-size: 19px !important;
}

/* compact substep selector cards */
.focus-list {
  gap: 10px !important;
  padding-bottom: 8px !important;
  margin-bottom: 10px !important;
}

.focus-item {
  min-width: 178px !important;
  max-width: 210px !important;
  min-height: 58px !important;
  padding: 10px 11px !important;
  border-radius: 15px !important;
}

.focus-item:not(:last-child)::after {
  right: -12px !important;
  font-size: 14px !important;
}

.substep-label {
  gap: 8px !important;
}

.substep-label h3 {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.num {
  width: 25px !important;
  height: 25px !important;
  min-width: 25px !important;
  font-size: 12px !important;
}

@media (max-width: 900px) {
  .clean-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  .focus-card {
    padding: 12px !important;
    border-radius: 16px !important;
  }

  .substep-title-row {
    align-items: center !important;
  }

  .substep-title-row h3 {
    font-size: 18px !important;
  }

  .focus-card > p {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .substep-count {
    display: none !important;
  }

  .substep-icon-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    font-size: 22px !important;
  }

  .focus-list {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .focus-item {
    min-width: 150px !important;
    min-height: 52px !important;
    padding: 9px !important;
  }

  .substep-label h3 {
    font-size: 12px !important;
  }

  .num {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    font-size: 11px !important;
  }

  .public-media-thumb {
    height: auto !important;
    aspect-ratio: 16/10;
  }

  .youtube-card-thumb,
  .youtube-thumb {
    height: auto !important;
    aspect-ratio: 16/10;
  }
}

/* mobile: show only active main step title, others only number */
@media (max-width: 680px) {
  .flow {
    align-items: center;
  }

  .flow-node {
    min-width: 42px !important;
    max-width: 42px !important;
    width: 42px !important;
    min-height: 42px !important;
    padding: 6px !important;
    justify-content: center;
    border-radius: 15px !important;
  }

  .flow-node.active {
    min-width: 138px !important;
    max-width: 160px !important;
    width: auto !important;
    justify-content: flex-start;
  }

  .flow-label {
    justify-content: center;
    gap: 0 !important;
  }

  .flow-node.active .flow-label {
    justify-content: flex-start;
    gap: 6px !important;
  }

  .flow-label b {
    display: none !important;
  }

  .flow-node.active .flow-label b {
    display: block !important;
    font-size: 11px !important;
    white-space: normal !important;
    line-height: 1.15 !important;
    overflow: hidden;
  }

  .flow-node .dot {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    font-size: 12px !important;
    margin: 0 !important;
  }
}

/* desktop/tablet: substeps use a,b,c instead of 1,2,3 */
.substep-letter {
  text-transform: lowercase;
}

/* mobile: show only active substep title, others only letter */
@media (max-width: 680px) {
  .focus-list {
    gap: 8px !important;
    align-items: center;
  }

  .focus-item {
    min-width: 44px !important;
    max-width: 44px !important;
    width: 44px !important;
    min-height: 44px !important;
    padding: 7px !important;
    border-radius: 15px !important;
    justify-content: center;
  }

  .focus-item.active {
    min-width: 150px !important;
    max-width: 190px !important;
    width: auto !important;
    justify-content: flex-start;
  }

  .substep-label {
    justify-content: center;
    gap: 0 !important;
  }

  .focus-item.active .substep-label {
    justify-content: flex-start;
    gap: 7px !important;
  }

  .substep-label h3 {
    display: none !important;
  }

  .focus-item.active .substep-label h3 {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
  }

  .focus-item .num {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    font-size: 12px !important;
    margin: 0 !important;
    text-transform: lowercase;
  }

  .focus-item:not(:last-child)::after {
    display: none !important;
  }
}

/* mobile app-like footer */
.mobile-app-footer,
.mobile-step-peek,
.mobile-step-drawer {
  display: none;
}

.site-credit {
  max-width: 1180px;
  margin: 24px auto 28px;
  padding: 0 22px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.site-credit a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 1000;
}

.site-credit a:hover,
.site-credit a:focus {
  text-decoration: underline;
}

@media (max-width: 680px) {
  body {
    padding-bottom: 94px;
  }

  .site-credit {

    margin: 20px auto 110px;
    padding: 0 16px;
    font-size: 12px;
    line-height: 1.55;
  }

  /* hide header step cards and progress on mobile */
  .topbar > div:nth-child(2) {
    display: none !important;
  }

  .topbar {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "brand clear" !important;
  }

  .mobile-step-peek {
    display: block;
    position: fixed;
    left: 50%;
    bottom: 66px;
    transform: translateX(-50%);
    z-index: 95;
    width: min(260px, 72vw);
    text-align: center;
  }

  .mobile-step-peek-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 8px 13px;
    cursor: pointer;
  }

  .mobile-step-peek-card span {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 1000;
  }

  .mobile-step-peek-card strong {
    font-size: 12px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-step-arrow {
    width: 18px;
    height: 18px;
    margin: -2px auto 0;
    color: var(--primary);
    font-size: 24px;
    line-height: 18px;
    font-weight: 1000;
  }

  .mobile-app-footer {
    display: grid;
    grid-template-columns: 1fr 88px 1fr;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 9px 14px 11px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.12);
  }

  .mobile-foot-btn {
    height: 42px;
    padding: 0 12px !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    border: 1px solid var(--line) !important;
    color: #0f172a !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 22px !important;
    line-height: 1;
  }

  .mobile-foot-btn span {
    font-size: 11px;
    font-weight: 1000;
  }

  .mobile-foot-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
  }

  .mobile-foot-main {
    width: 88px;
    height: 52px;
    margin-top: -18px;
    border-radius: 22px !important;
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 !important;
  }

  .mobile-foot-main-icon {
    font-size: 17px;
    line-height: 1;
  }

  .mobile-foot-main strong {
    font-size: 12px;
  }

  .mobile-step-drawer {
    position: fixed;
    inset: 0;
    z-index: 210;
    background: rgba(15, 23, 42, 0.54);
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
  }

  .mobile-step-drawer.show {
    display: flex;
  }

  .mobile-step-sheet {
    width: 100%;
    max-height: 78vh;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px 28px 20px 20px;
    box-shadow: 0 -24px 70px rgba(15, 23, 42, 0.34);
    overflow: hidden;
  }

  .mobile-step-sheet-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: #fbfcff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-step-sheet-head h3 {
    margin: 0;
    font-size: 21px;
  }

  .mobile-step-sheet-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
  }

  .mobile-sheet-close {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 999px !important;
    background: #fee2e2 !important;
    color: #991b1b !important;
    font-size: 22px !important;
  }

  .mobile-step-flow-list {
    padding: 14px 16px 18px;
    overflow: auto;
    max-height: calc(78vh - 78px);
  }

  .mobile-flow-item {
    position: relative;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 0;
    cursor: pointer;
  }

  .mobile-flow-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 17px;
    top: 46px;
    width: 2px;
    height: 24px;
    background: #cbd5e1;
  }

  .mobile-flow-num {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #e5e7eb;
    color: #334155;
    font-weight: 1000;
    font-size: 13px;
  }

  .mobile-flow-item.active .mobile-flow-num {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.26);
  }

  .mobile-flow-item.done .mobile-flow-num {
    background: #22c55e;
    color: #fff;
  }

  .mobile-flow-text {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 11px 12px;
    background: #fff;
  }

  .mobile-flow-item.active .mobile-flow-text {
    background: #eff6ff;
    border-color: #93c5fd;
  }

  .mobile-flow-text strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
  }

  .mobile-flow-text small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 800;
    font-size: 11px;
  }
}

/* mobile: footer handles navigation, hide normal back/next buttons */
@media (max-width: 680px) {
  .screen > .wrap > .card > .body > .actions {
    display: none !important;
  }

  .focus-card .actions {
    display: flex !important;
  }

  .question-answer .actions,
  .media-preview-body .actions {
    display: flex !important;
  }
}

/* compact mobile footer + previous/next titles */
@media (max-width: 680px) {
  body {
    padding-bottom: 70px !important;
  }

  .mobile-step-peek {
    bottom: 50px !important;
    width: min(210px, 62vw) !important;
  }

  .mobile-step-peek-card {
    padding: 6px 10px !important;
    gap: 6px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14) !important;
  }

  .mobile-step-peek-card span {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    font-size: 11px !important;
  }

  .mobile-step-peek-card strong {
    font-size: 11px !important;
  }

  .mobile-step-arrow {
    height: 13px !important;
    font-size: 18px !important;
    line-height: 13px !important;
  }

  .mobile-app-footer {
    grid-template-columns: 1fr 70px 1fr !important;
    gap: 7px !important;
    padding: 7px 10px 8px !important;
    min-height: 54px !important;
  }

  .mobile-foot-btn {
    height: 36px !important;
    padding: 0 9px !important;
    border-radius: 16px !important;
    gap: 5px !important;
    font-size: 17px !important;
    overflow: hidden;
  }

  .mobile-foot-btn span {
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 82px;
  }

  .mobile-foot-main {
    width: 70px !important;
    height: 46px !important;
    margin-top: -14px !important;
    border-radius: 18px !important;
  }

  .mobile-foot-main-icon {
    font-size: 15px !important;
  }

  .mobile-foot-main strong {
    font-size: 11px !important;
  }
}

@media (max-width: 680px) {
  .mobile-foot-btn {
    justify-content: center !important;
    gap: 6px !important;
  }

  .mobile-foot-arrow {
    font-size: 20px;
    line-height: 1;
    font-weight: 1000;
  }

  .mobile-foot-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    overflow: hidden;
  }

  .mobile-foot-next .mobile-foot-text {
    align-items: flex-end;
  }

  .mobile-foot-text small {
    font-size: 9px;
    line-height: 1;
    color: #64748b;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .mobile-foot-btn:disabled .mobile-foot-text small {
    color: #94a3b8;
  }

  .mobile-foot-text strong {
    font-size: 11px;
    line-height: 1.15;
    max-width: 78px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0f172a;
  }

  .mobile-foot-btn:disabled .mobile-foot-text strong {
    color: #94a3b8;
  }

  .mobile-foot-btn span {
    max-width: none !important;
  }
}

/* compact link buttons inside active substep card */
.focus-card .links {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  margin-top: 10px !important;
  overflow-x: auto;
  padding-bottom: 2px;
}

.focus-card .links a.btn {
  width: auto !important;
  white-space: nowrap !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}

.focus-card .links a.btn:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
}

/* mobile step label above page title */
.mobile-step-name {
  display: none;
}

@media (max-width: 680px) {
  .mobile-step-name {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    margin: 0 0 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    line-height: 1;
    font-weight: 1000;
  }

  .screen > .wrap > .card > .head {
    border-bottom: 0 !important;
    padding-bottom: 6px !important;
  }

  .screen > .wrap > .card > .head h2 {
    margin: 0 !important;
    padding-bottom: 0 !important;
  }

  .screen > .wrap > .card > .head::after {
    display: none !important;
    content: none !important;
  }
}

@media (max-width: 680px) {
  .head {
    border-bottom: 0 !important;
  }

  .screen > .wrap > .card > .head {
    border-bottom: 0 !important;
  }

  .screen > .wrap > .card > .body {
    padding-top: 6px !important;
  }
}

.blo-help {
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px;
}

.blo-help h4 {
  margin: 0 0 7px;
  font-size: 14px;
  color: #0f172a;
}

.blo-help ol,
.blo-help ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.blo-help li {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}

.blo-help strong {
  color: #0f172a;
}

@media (max-width: 680px) {
  .blo-help {
    padding: 10px;
    border-radius: 14px;
  }

  .blo-help li {
    font-size: 12.5px;
    line-height: 1.4;
  }
}

.substep-faqs {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.substep-faq-title {
  font-size: 11px;
  font-weight: 1000;
  color: #475569;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.substep-faq {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  margin-top: 5px;
}

.substep-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 1000;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.substep-faq summary::-webkit-details-marker {
  display: none;
}

.substep-faq summary::before {
  content: "";
  display: none;
}

.official-reference-box {
  margin-top: 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  padding: 12px;
}

details.official-reference-box {
  padding: 0;
  overflow: hidden;
}

.official-reference-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.official-reference-summary::-webkit-details-marker {
  display: none;
}
.official-reference-summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 1000;
}

details.official-reference-box[open] .official-reference-summary::after {
  content: "-";
}

details.official-reference-box .official-reference-list {
  padding: 0 12px 12px;
}

details.official-reference-box:not([open]) .official-reference-list {
  display: none !important;
}

.sir-schedule-section {
  display: grid;
  gap: 10px;
}

.sir-schedule-list {
  display: grid;
  gap: 9px;
}

.sir-schedule-item {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  padding: 11px 12px;
}

.sir-schedule-item span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 1000;
}

.sir-schedule-item strong {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.25;
}

.sir-schedule-item p {
  margin: 5px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.official-reference-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #1e3a8a;
  font-size: 11px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.official-reference-list {
  display: grid;
  gap: 7px;
}

.official-reference {
  display: block;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  background: #fff;
  padding: 9px 10px;
  text-decoration: none;
  color: #0f172a;
}

.official-reference strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.25;
}

.official-reference span {
  display: block;
  margin-top: 3px;
  color: #334155;
  font-size: 11.5px;
  line-height: 1.35;
}

.official-reference:hover {
  border-color: #60a5fa;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.09);
}

.substep-faq div {
  padding: 0 10px 9px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #334155;
}

.how-method-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.how-method-tab {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 1000;
}

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

.how-flow-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.how-flow-step.has-image {
  grid-template-columns: 42px minmax(92px, 22%) minmax(0, 1fr);
}

.how-flow-num {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: #fff;
  font-weight: 1000;
  font-size: 14px;
}

.how-flow-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: #eef4ff;
}

.how-flow-image img,
.how-flow-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.how-flow-media-button {
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.how-flow-media-button:hover {
  filter: brightness(0.98);
}

.how-media-play {
  pointer-events: none;
}

.how-flow-text {
  color: #1e293b;
  line-height: 1.55;
}

/* How-to flow media */
.substep-help-block[open] {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.how-flow-list {
  position: relative;
  gap: 12px !important;
  padding: 4px 0 2px;
}

.how-flow-step {
  position: relative;
  border: 1px solid #bfdbfe !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.07);
  transition: 0.16s ease;
}

.how-flow-step:hover {
  transform: translateY(-1px);
  border-color: #93c5fd !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.12);
}

.how-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -13px;
  width: 2px;
  height: 12px;
  background: #bfdbfe;
}

.how-flow-num {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.how-flow-image {
  border: 1px solid #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.how-flow-text {
  font-weight: 850;
  color: #1e293b;
}

@media (max-width: 680px) {
  .how-flow-step:not(:last-child)::after {
    left: 23px;
  }

  .how-flow-step.has-image .how-flow-image {
    margin-top: 4px;
  }
}

@media (max-width: 680px) {
  .substep-faqs {
    margin-top: 10px;
    padding-top: 8px;
  }

  .how-flow-step,
  .how-flow-step.has-image {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .how-flow-image {
    grid-column: 2;
  }

  .substep-faq summary {
    padding: 7px 9px;
    font-size: 12px;
  }

  .substep-faq div {
    padding: 0 9px 8px;
    font-size: 12px;
  }
}

.substep-help-frame {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.substep-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
}

.substep-resource-links::before {
  content: "Official links";
  width: 100%;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.substep-resource-links a.btn {
  width: auto !important;
  white-space: nowrap !important;
  min-height: 42px !important;
  padding: 9px 13px !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08) !important;
}

.substep-resource-links a.btn::after {
  content: "";
  color: #2563eb;
  font-size: 12px;
  font-weight: 1000;
}

.substep-resource-links a.btn:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1e3a8a !important;
  filter: none !important;
}

html[dir="rtl"] .substep-resource-links::before,
.rtl-lang .substep-resource-links::before {
  text-align: right;
}

.substep-help-block {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  margin-top: 7px;
}

.substep-help-block summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 1000;
  color: #0f172a;
  background: #f8fafc;
}

.substep-help-block summary::-webkit-details-marker {
  display: none;
}

.substep-help-block summary::before {
  content: "";
  display: inline-flex;
  margin-right: 7px;
  font-weight: 1000;
  color: var(--primary);
}

.substep-help-block[open] summary::before {
  content: "";
}

.substep-help-block ol,
.substep-help-block ul {
  margin: 0;
  padding: 0 12px 10px 32px;
}

.substep-help-block li {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}

@media (max-width: 680px) {
  .substep-resource-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .substep-resource-links a.btn {
    font-size: 11.5px !important;
    padding: 7px 9px !important;
  }

  .substep-help-block summary {
    font-size: 12.5px;
    padding: 8px 10px;
  }

  .substep-help-block li {
    font-size: 12.5px;
    line-height: 1.4;
  }
}

/* Urdu RTL fixes */
.rtl-lang {
  direction: rtl;
  text-align: right;
  font-family: var(--urdu-font) !important;
  line-height: 2 !important;
}

.rtl-lang .topbar,
.rtl-lang .mobile-app-footer,
.rtl-lang .substep-title-row,
.rtl-lang .links,
.rtl-lang .substep-resource-links {
  direction: rtl;
}

.rtl-lang .substep-help-block ol,
.rtl-lang .substep-help-block ul,
.rtl-lang .blo-help ol,
.rtl-lang .blo-help ul {
  padding-right: 28px !important;
  padding-left: 10px !important;
}

.rtl-lang .mobile-foot-prev .mobile-foot-text {
  align-items: flex-end;
}

.rtl-lang .mobile-foot-next .mobile-foot-text {
  align-items: flex-start;
}

/* header language switcher */
.floating-lang {
  position: relative;
  z-index: 260;
  display: inline-flex;
  align-items: center;
}

.floating-lang-btn {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #bfdbfe !important;
  background: linear-gradient(135deg, #eff6ff, #ffffff) !important;
  color: #1e3a8a !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18) !important;
}

.floating-lang-btn::before {
  display: none;
}

.floating-lang-panel {
  position: absolute;
  right: 0;
  top: 50px;
  width: 170px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  display: none;
}

.floating-lang-panel.show {
  display: block;
}

.floating-lang-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.floating-lang-head strong {
  font-size: 13px;
  color: #0f172a;
}

.floating-lang-head button {
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: #fee2e2 !important;
  color: #991b1b !important;
  font-size: 17px !important;
}

.floating-lang-option {
  width: 100% !important;
  justify-content: flex-start !important;
  text-align: left !important;
  margin-top: 5px !important;
  padding: 9px 11px !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  color: #0f172a !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 1000 !important;
}

.floating-lang-option.active {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

@media (max-width: 680px) {
  .floating-lang {
    position: relative;
    right: auto;
    top: auto;
  }

  .floating-lang-btn {
    min-width: 46px !important;
    width: 46px !important;
    height: 44px !important;
    padding: 0 !important;
    font-size: 0 !important;
    gap: 0 !important;
  }

  .floating-lang-btn::before {
    width: 31px;
    height: 25px;
    min-width: 31px;
    font-size: 10px;
  }

  .floating-lang-panel {
    width: 155px;
    top: 45px;
  }
}

/* header without logo */
.brand-no-logo {
  gap: 0 !important;
}

.brand-no-logo strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

@media (max-width: 680px) {
  .topbar {

    padding: 8px 10px !important;
  }

  .brand-no-logo strong {
    font-size: 13px !important;
  }

  .brand-no-logo span {
    display: none !important;
  }
}

/* Urdu Nastaleeq typography */
.rtl-lang,
.rtl-lang button,
.rtl-lang input,
.rtl-lang select,
.rtl-lang textarea,
.rtl-lang a,
.rtl-lang .btn {
  font-family: var(--urdu-font) !important;
}

.rtl-lang .head h2,
.rtl-lang .focus-card h3,
.rtl-lang .substep-title-row h3,
.rtl-lang .question-answer h3,
.rtl-lang .mobile-flow-text strong {
  line-height: 1.9 !important;
}

.rtl-lang .focus-card p,
.rtl-lang .focus-card li,
.rtl-lang .substep-help-block li,
.rtl-lang .substep-faq div,
.rtl-lang .question-answer p,
.rtl-lang .question-answer li {
  line-height: 2 !important;
}

.rtl-lang .substep-help-block summary,
.rtl-lang .substep-faq summary,
.rtl-lang .floating-lang-option {
  line-height: 1.8 !important;
}

.rtl-lang .substep-title-row {
  align-items: flex-start !important;
  flex-direction: row-reverse !important;
}

.rtl-lang .substep-nav-top {
  direction: ltr;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.rtl-lang .mobile-foot-arrow {
  transform: scaleX(-1);
}

/* RTL/mixed-language stability */
.rtl-lang .floating-lang {
  left: auto !important;
  right: auto !important;
}

.rtl-lang .floating-lang-panel {
  left: 0 !important;
  right: auto !important;
  text-align: right !important;
}

.rtl-lang .floating-lang-option {
  justify-content: flex-end !important;
  text-align: right !important;
}

.rtl-lang .progress-track,
.rtl-lang .substep-nav-top {
  direction: ltr !important;
}

.rtl-lang .top-actions,
.rtl-lang .mobile-app-footer {
  direction: rtl !important;
}

.rtl-lang .flow-label,
.rtl-lang .substep-label,
.rtl-lang .desktop-step-header {
  direction: rtl !important;
}

.rtl-lang .desktop-step-header {
  justify-content: flex-start !important;
}

.rtl-lang .desktop-step-btn {
  flex-direction: row-reverse !important;
}

.rtl-lang .rtl-lang .focus-item {
  padding-right: 13px !important;
  padding-left: 42px !important;
}

.rtl-lang .rtl-lang .dot,
.rtl-lang .num,
.rtl-lang .substep-count,
.rtl-lang .mobile-flow-num {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-family: Arial, Helvetica, sans-serif !important;
  line-height: 1 !important;
}

.rtl-lang h1,
.rtl-lang h2,
.rtl-lang h3,
.rtl-lang h4,
.rtl-lang p,
.rtl-lang li,
.rtl-lang summary,
.rtl-lang .focus-card,
.rtl-lang .focus-item,
.rtl-lang .question-answer,
.rtl-lang .substep-help-block,
.rtl-lang .substep-faq,
.rtl-lang .mobile-flow-text {
  unicode-bidi: plaintext !important;
  text-align: right !important;
}

.rtl-lang a.btn,
.rtl-lang button {
  unicode-bidi: isolate !important;
}

/* In Urdu mode, page text must be RTL even if first word is English */
.rtl-lang,
.rtl-lang .topbar,
.rtl-lang .head,
.rtl-lang .body,
.rtl-lang .brand,
.rtl-lang .brand strong,
.rtl-lang .brand span,
.rtl-lang .focus-card,
.rtl-lang .focus-card h3,
.rtl-lang .focus-card p,
.rtl-lang .focus-item,
.rtl-lang .focus-item h3,
.rtl-lang .question-wrap,
.rtl-lang .question-row,
.rtl-lang .question-row button,
.rtl-lang .question-answer,
.rtl-lang .substep-help-block,
.rtl-lang .substep-help-block summary,
.rtl-lang .substep-faq,
.rtl-lang .substep-faq summary,
.rtl-lang .substep-faq div,
.rtl-lang .mobile-flow-text,
.rtl-lang .floating-lang-panel,
.rtl-lang .floating-lang-option {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: isolate !important;
}

.rtl-lang .brand {
  justify-content: flex-start !important;
}

.rtl-lang .brand strong,
.rtl-lang .brand span {
  display: block;
  width: 100%;
}

/* Keep letters/numbers/icons normal */
.rtl-lang .dot,
.rtl-lang .num,
.rtl-lang .substep-count,
.rtl-lang .substep-icon-btn,
.rtl-lang .mobile-flow-num,
.rtl-lang .mobile-foot-arrow,
.rtl-lang .notranslate {
  direction: ltr !important;
  text-align: center !important;
  unicode-bidi: isolate !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

@media (max-width: 680px) {
  .rtl-lang .floating-lang {
    left: auto !important;
    right: auto !important;
    top: auto !important;
  }
}

/* Header brand should follow page direction */
.brand {
  min-width: 0;
}

.brand-text {
  min-width: 0;
  max-width: 100%;
}

.brand-main,
.brand-sub {
  unicode-bidi: plaintext !important;
}

.rtl-lang .brand {
  direction: rtl !important;
  text-align: right !important;
  justify-content: flex-start !important;
}

.rtl-lang .brand-text {
  direction: rtl !important;
  text-align: right !important;
}

.rtl-lang .brand-main,
.rtl-lang .brand-sub {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext !important;
  font-family: var(--urdu-font) !important;
}

.rtl-lang .brand-main {
  line-height: 1.8 !important;
}

/* Urdu RTL text override */
html[dir="rtl"] body,
html[dir="rtl"] .topbar,
html[dir="rtl"] .brand,
html[dir="rtl"] .brand-text,
html[dir="rtl"] .brand-main,
html[dir="rtl"] .brand-sub,
html[dir="rtl"] .head,
html[dir="rtl"] .body,
html[dir="rtl"] .focus-card,
html[dir="rtl"] .focus-item,
html[dir="rtl"] .question-wrap,
html[dir="rtl"] .question-answer,
html[dir="rtl"] .substep-help-block,
html[dir="rtl"] .substep-faq,
html[dir="rtl"] .mobile-flow-text {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: isolate !important;
}

html[dir="rtl"] .brand-main,
html[dir="rtl"] .brand-sub {
  font-family: var(--urdu-font) !important;
}

/* Keep only numbers, English controls and icons LTR */
html[dir="rtl"] .dot,
html[dir="rtl"] .num,
html[dir="rtl"] .substep-count,
html[dir="rtl"] .substep-icon-btn,
html[dir="rtl"] .mobile-flow-num,
html[dir="rtl"] .mobile-foot-arrow,
html[dir="rtl"] .notranslate {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: center !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

/* But language panel itself should open/read RTL in Urdu */
html[dir="rtl"] .floating-lang-panel,
html[dir="rtl"] .floating-lang-head,
html[dir="rtl"] .floating-lang-option {
  direction: rtl !important;
  text-align: right !important;
  font-family: var(--urdu-font) !important;
}

html[dir="rtl"] .floating-lang-option {
  justify-content: flex-end !important;
}

/* Urdu needs taller step controls for Nastaleeq letter shapes */
html[dir="rtl"] body,
.rtl-lang {
  font-family: var(--urdu-font) !important;
}

html[dir="rtl"] .flow-node,
.rtl-lang .flow-node {
  min-height: 58px !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

html[dir="rtl"] .flow-node.active,
.rtl-lang .flow-node.active {
  min-height: 64px !important;
}

html[dir="rtl"] .flow-label b,
.rtl-lang .flow-label b {
  line-height: 1.75 !important;
  font-size: 14px !important;
}

html[dir="rtl"] .mobile-flow-text,
.rtl-lang .mobile-flow-text {
  min-height: 64px !important;
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}

html[dir="rtl"] .mobile-flow-text strong,
.rtl-lang .mobile-flow-text strong {
  line-height: 1.9 !important;
}

html[dir="rtl"] .mobile-flow-text small,
.rtl-lang .mobile-flow-text small {
  line-height: 1.5 !important;
}

html[dir="rtl"] .mobile-foot-btn,
.rtl-lang .mobile-foot-btn {
  min-height: 54px !important;
  height: 54px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

html[dir="rtl"] .mobile-foot-main,
.rtl-lang .mobile-foot-main {
  min-height: 62px !important;
  height: 62px !important;
  margin-top: -22px !important;
}

html[dir="rtl"] .mobile-foot-text strong,
.rtl-lang .mobile-foot-text strong {
  line-height: 1.65 !important;
}

html[dir="rtl"] .mobile-foot-text small,
.rtl-lang .mobile-foot-text small {
  line-height: 1.35 !important;
}

html[dir="rtl"] .mobile-step-peek-card,
.rtl-lang .mobile-step-peek-card {
  min-height: 46px !important;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}

@media (max-width: 680px) {
  html[dir="rtl"] body,
  .rtl-lang {
    padding-bottom: 90px !important;
  }

  html[dir="rtl"] .top-actions .btn,
  .rtl-lang .top-actions .btn,
  html[dir="rtl"] .floating-lang-btn,
  .rtl-lang .floating-lang-btn {
    min-height: 44px !important;
    height: 44px !important;
  }

  html[dir="rtl"] .mobile-app-footer,
  .rtl-lang .mobile-app-footer {
    min-height: 72px !important;
    padding-top: 10px !important;
    padding-bottom: 12px !important;
  }

  html[dir="rtl"] .mobile-step-peek,
  .rtl-lang .mobile-step-peek {
    bottom: 66px !important;
  }
}

/* Simple-use layer for low-literacy audiences */
body {
  font-size: 17px;
}

button,
a.btn {
  min-height: 46px;
  padding: 12px 17px;
  font-size: 15px;
}

.brand-main {
  font-size: 17px;
}

.brand-sub {
  font-size: 13px !important;
}

.head h2 {
  max-width: 860px;
  line-height: 1.14;
}

.head p {
  font-size: 17px;
  color: #334155;
}

.screen > .wrap > .card > .body > .easy-guide {
  order: 0;
}

.easy-guide {
  border: 2px solid #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
  border-radius: 22px;
  padding: 0;
  margin: 0 0 16px;
  overflow: hidden;
}

.easy-guide-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.easy-guide-head::-webkit-details-marker {
  display: none;
}

.easy-guide-head::before {
  content: "";
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  background: #15803d;
  box-shadow: inset 0 0 0 6px #dcfce7;
}

.easy-guide-head::after {
  content: "Show";
  margin-left: auto;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #fff;
  color: #166534;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 1000;
}

.easy-guide[open] .easy-guide-head::after {
  content: "Hide";
}

html[dir="rtl"] .easy-guide-head::after,
.rtl-lang .easy-guide-head::after {
  margin-left: 0;
  margin-right: auto;
}

.easy-guide h3 {
  margin: 0;
  font-size: 22px;
  color: #14532d;
  line-height: 1.2;
}

.easy-guide p {
  margin: 3px 0 0;
  color: #166534;
  line-height: 1.35;
}

.easy-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.easy-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 12px;
  min-height: 76px;
}

.easy-item-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  display: grid;
  place-items: center;
  font-weight: 1000;
}

.easy-item strong {
  display: block;
  font-size: 16px;
  color: #14532d;
  line-height: 1.25;
}

.easy-item span {
  display: block;
  margin-top: 3px;
  color: #334155;
  font-size: 14px;
  line-height: 1.35;
}

.focus-list {
  margin-top: 4px;
}

.focus-item {
  min-height: 92px;
  border-width: 2px;
}

.focus-item.active {
  border-color: #2563eb;
}

.substep-label h3 {
  font-size: 16px;
}

.focus-card {
  border-width: 2px;
  padding: 20px;
}

.focus-card::before {
  content: none !important;
  display: none !important;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 1000;
}

.substep-title-row h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  color: #1e3a8a !important;
  border: 1px solid #bfdbfe;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
}

.substep-title-row h3::before {
  content: none !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}

.focus-card p,
.focus-card li {
  font-size: 17px;
  line-height: 1.65;
}

.substep-help-block summary,
.substep-faq summary {
  font-size: 16px;
  padding: 12px 0;
}

.question-wrap {
  display: none !important;
  background: #fff7ed !important;
  border: 1px solid #fed7aa !important;
  border-radius: 20px !important;
  padding: 14px !important;
}

.question-wrap::before {
  content: "Need help? Tap one question.";
  display: block;
  margin-bottom: 10px;
  color: #9a3412;
  font-size: 16px;
  font-weight: 1000;
}

.question-row button {
  min-height: 44px;
  color: #9a3412 !important;
  background: #fff !important;
  border: 1px solid #fed7aa !important;
  border-radius: 999px !important;
  padding: 9px 13px !important;
  text-align: left;
}

.flow-empty,
.empty-course-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.94);
  color: #475569;
}

.flow-empty {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.empty-course-card {
  display: grid;
  gap: 8px;
  max-width: 680px;
  margin: 32px auto;
  padding: 24px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.empty-course-card strong {
  color: #0f172a;
  font-size: 22px;
}

.empty-course-card span {
  font-size: 15px;
}

.question-answer {
  background: #fff !important;
  border: 1px solid #fed7aa !important;
  border-radius: 16px !important;
  padding: 14px !important;
}

.links a.btn {
  border-radius: 14px;
  min-height: 48px;
}

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

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .top-actions {
    grid-area: clear;
  }

  .top-actions .btn {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .screen > .wrap > .card > .head h2 {
    font-size: 26px;
    line-height: 1.16;
  }

  .easy-guide {
    margin: 0 0 14px;
    border-radius: 18px;
  }

  .easy-guide h3 {
    font-size: 20px;
  }

  .easy-item {
    min-height: 0;
  }

  .focus-item {
    min-width: 220px;
    min-height: 82px;
  }

  .focus-card {
    padding: 16px;
  }

  .focus-card h3 {
    font-size: 24px;
  }

  .question-wrap {
    padding: 13px !important;
  }

  .question-row button {
    width: 100% !important;
  }
}

/* FAQ polish */
.substep-faqs {
  margin-top: 12px !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #f8fafc !important;
}

.substep-faq-title {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 0 8px !important;
  padding: 5px 9px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #1e3a8a !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.substep-faq {
  margin: 6px 0 0 !important;
  border: 1px solid #dbe3f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden !important;
}

.substep-faq summary {
  position: relative !important;
  min-height: 0 !important;
  padding: 10px 34px 10px 12px !important;
  color: #0f172a !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  list-style: none !important;
  cursor: pointer !important;
}

.substep-faq summary::before {
  display: none !important;
  content: "" !important;
}

.substep-faq summary::after {
  content: "+" !important;
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  display: grid !important;
  place-items: center !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
}

.substep-faq[open] summary {
  border-bottom: 1px solid var(--line) !important;
  background: #fbfdff !important;
}

.substep-faq[open] summary::after {
  content: "-" !important;
}

.substep-faq div {
  padding: 9px 12px 11px !important;
  color: #334155 !important;
  font-size: 12.5px !important;
  line-height: 1.55 !important;
}

html[dir="rtl"] .substep-faq summary,
.rtl-lang .substep-faq summary {
  padding: 10px 12px 10px 34px !important;
}

html[dir="rtl"] .substep-faq summary::after,
.rtl-lang .substep-faq summary::after {
  right: auto !important;
  left: 12px !important;
}

@media (max-width: 680px) {
  .substep-faqs {
    padding: 10px !important;
    border-radius: 14px !important;
  }

  .substep-faq-title {
    font-size: 10.5px !important;
  }

  .substep-faq summary {
    padding: 9px 32px 9px 10px !important;
    font-size: 12.5px !important;
  }

  .substep-faq div {
    padding: 8px 10px 10px !important;
    font-size: 12px !important;
  }

  .official-reference-box {
    border-radius: 13px !important;
  }

  .official-reference strong {
    font-size: 12px !important;
  }

  .official-reference span {
    font-size: 11px !important;
  }
}

/* Course progress polish */
.flow-node {
  min-width: 178px !important;
  max-width: none !important;
  width: auto !important;
  align-items: center !important;
}

.flow-label {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

.flow-label b {
  display: block !important;
  margin: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
}

.flow-node .flow-mini {
  grid-column: 2 !important;
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
}

@media (max-width: 680px) {
  .flow-node {
    min-width: 52px !important;
    max-width: 52px !important;
    width: 52px !important;
  }

  .flow-node.active {
    min-width: 168px !important;
    max-width: 210px !important;
  }

  .flow-node:not(.active) .flow-mini,
  .flow-node:not(.active) .flow-label b {
    display: none !important;
  }

  .top-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    min-width: 104px !important;
  }

  .floating-lang,
  .floating-lang-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .floating-lang-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    font-size: 0 !important;
    color: #1e3a8a !important;
    line-height: 1 !important;
  }

  .floating-lang-btn::before {
    content: "Aa";
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 20px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: 0;
  }

  .course-completion-fab {
    right: -52px;
    top: 112px;
    bottom: auto;
    transform: rotate(-90deg);
    transform-origin: center;
    min-width: 152px;
    min-height: 34px;
    padding: 8px 10px !important;
    border-radius: 12px 12px 0 0 !important;
    font-size: 11px !important;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
  }

  .course-completion-modal {
    padding: 10px;
  }

  .course-completion-body {
    padding: 12px;
  }
}

@media print {
  body.printing-certificate .topbar,
  body.printing-certificate main,
  body.printing-certificate .course-completion-fab,
  body.printing-certificate .course-completion-head,
  body.printing-certificate .quiz-card,
  body.printing-certificate .certificate-card > h3,
  body.printing-certificate .certificate-card > p,
  body.printing-certificate .certificate-card > label,
  body.printing-certificate .certificate-card > input,
  body.printing-certificate .certificate-card > .actions {
    display: none !important;
  }

  body.printing-certificate .course-completion-modal,
  body.printing-certificate .course-completion-panel,
  body.printing-certificate .course-completion-body,
  body.printing-certificate .course-finish-panel,
  body.printing-certificate .certificate-card,
  body.printing-certificate .certificate-paper {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  body.printing-certificate .certificate-paper {
    border: 2px solid #111 !important;
    padding: 28px !important;
  }
}

/* Compact lesson layout */
.question-wrap.compact-help {
  display: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-top: 14px !important;
}

.question-wrap.compact-help::before {
  display: none !important;
  content: none !important;
}

.question-wrap.compact-help .question-row,
.question-wrap.compact-help .question-answer {
  display: none !important;
}

.question-wrap.compact-help .open-help-btn {
  display: inline-flex !important;
  width: auto !important;
  min-height: 44px;
  background: #fff7ed !important;
  color: #9a3412 !important;
  border: 1px solid #fed7aa !important;
  border-radius: 999px !important;
  padding: 11px 15px !important;
  box-shadow: 0 10px 24px rgba(154, 52, 18, 0.08) !important;
  font-size: 14px !important;
  font-weight: 1000 !important;
}

@media (max-width: 680px) {
  .question-wrap.compact-help .open-help-btn {
    width: 100% !important;
  }
}

/* Urdu should change reading direction, not break the app shell layout */
.rtl-lang {
  direction: ltr !important;
  text-align: initial !important;
}

.rtl-lang .topbar,
.rtl-lang .top-actions,
.rtl-lang .flow,
.rtl-lang .focus-list,
.rtl-lang .substep-title-row,
.rtl-lang .substep-nav,
.rtl-lang .links,
.rtl-lang .inline-official-links .links,
.rtl-lang .lesson-more-actions,
.rtl-lang .mobile-app-footer,
.rtl-lang .mobile-step-peek,
.rtl-lang .course-completion-fab,
.rtl-lang .chat-fab {
  direction: ltr !important;
}

.rtl-lang .topbar,
.rtl-lang .substep-title-row,
.rtl-lang .mobile-app-footer {
  flex-direction: initial !important;
}

.rtl-lang .focus-list,
.rtl-lang .flow {
  flex-direction: row !important;
}

.rtl-lang .substep-nav {
  order: initial !important;
}

.rtl-lang .brand-text,
.rtl-lang .head h2,
.rtl-lang .head p,
.rtl-lang .focus-card > p,
.rtl-lang .substep-help-block li,
.rtl-lang .lesson-help-section,
.rtl-lang .chat-answer {
  direction: rtl !important;
  text-align: right;
}

/* compact floating course percent */
.chat-fab {
  right: 18px !important;
  bottom: 18px !important;
}

.course-completion-fab {
  position: static !important;
  transform: none !important;
  min-width: 58px !important;
  min-height: 38px !important;
  padding: 8px 10px !important;
  right: auto !important;
  bottom: auto !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18) !important;
}

.course-completion-fab span {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 1000 !important;
}

@media (max-width: 680px) {
  .chat-fab {
    right: 12px !important;
    bottom: 114px !important;
  }

  .course-completion-fab {
    position: fixed !important;
    right: -25px !important;
    top: 82px !important;
    bottom: auto !important;
    transform: rotate(-90deg) !important;
    transform-origin: center !important;
    min-width: 70px !important;
    min-height: 30px !important;
    padding: 6px 8px !important;
    border-radius: 10px 10px 0 0 !important;
    font-size: 12px !important;
  }
}

/* keep the course progress strip contained on desktop and mobile */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas: "brand clear" "steps steps" !important;
}

.desktop-step-header {
  grid-area: steps !important;
  grid-column: 1/-1 !important;
}

.course-progress-wrap {
  display: none !important;
}

.course-progress-head {
  min-width: 0;
}

.course-progress-meta {
  white-space: nowrap;
}

.flow {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
}

.flow-node {

  flex: 0 0 auto !important;
}

.top-actions {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1040px) and (min-width: 681px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .brand {
    grid-area: brand;
  }
  .top-actions {
    grid-area: clear;
    justify-self: end;
  }
}

@media (max-width: 680px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "brand clear" !important;
    overflow: visible;
    align-items: center !important;
  }

  .course-progress-wrap {
    display: none !important;
  }

  .topbar > .brand {
    grid-area: brand !important;
    min-width: 0 !important;
  }

  .topbar > .top-actions {
    grid-area: clear !important;
    grid-column: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    justify-self: end !important;
  }

  .top-actions > a.btn-primary {
    min-height: 38px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .voice-master-btn,
  .floating-lang-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
  }

  .desktop-step-header {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .top-actions > a.btn-primary {
    max-width: 74px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .topbar {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@media (max-width: 680px) {
  header.topbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 7px 8px !important;
    min-height: 54px !important;
    overflow: visible !important;
  }

  header.topbar > .brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 176px) !important;
    display: block !important;
  }

  header.topbar .brand-main {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 13px !important;
  }

  header.topbar .brand-sub {
    display: none !important;
  }

  header.topbar > .top-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 176px !important;
    margin-left: auto !important;
    position: relative !important;
    z-index: 400 !important;
  }

  header.topbar > .top-actions > a.btn-primary {
    width: auto !important;
    min-width: 52px !important;
    max-width: 66px !important;
    min-height: 36px !important;
    padding: 8px 9px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  header.topbar .voice-master-btn,
  header.topbar .floating-lang-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
  }

  header.topbar .course-completion-fab {
    display: none !important;
  }

  header.topbar .desktop-step-header {
    display: none !important;
  }

  .chat-fab {
    right: 10px !important;
    bottom: 78px !important;
  }
}

/* Lesson visual layout guard */
.lesson-intro-visual-row .lesson-primary-visual {
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  align-self: stretch !important;
  display: block !important;
}

.lesson-intro-visual-row .lesson-primary-visual .media-card-button {
  display: block !important;
  min-height: 0 !important;
  height: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.lesson-intro-visual-row .lesson-primary-visual .public-media-thumb {
  min-height: 0 !important;
  height: 100% !important;
  width: 100% !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
}

.lesson-intro-visual-row .lesson-primary-visual .public-media-thumb img,
.lesson-intro-visual-row .lesson-primary-visual .public-media-thumb video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.online-submit-guide {
  margin: 16px 0;
  border: 1px solid #bbf7d0;
  border-radius: 18px;
  background: linear-gradient(135deg, #f0fdf4, #eff6ff);
  overflow: hidden;
}

.online-submit-guide summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 1000;
  color: #0f5132;
}

.online-submit-guide summary::-webkit-details-marker {
  display: none;
}

.online-submit-guide summary span {
  display: block;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.online-submit-guide summary::after {
  content: "Open";
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #15803d;
  font-size: 12px;
}

.online-submit-guide[open] summary::after {
  content: "Close";
}

.online-submit-body {
  padding: 0 16px 16px;
}

.online-submit-video {
  width: 100%;
  max-height: 360px;
  border-radius: 16px;
  background: #111827;
  display: block;
  object-fit: contain;
}

.online-submit-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.online-submit-step {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.online-submit-step img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  background: #e5eefb;
}

.online-submit-step strong {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 9px;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.25;
}

.online-submit-step strong span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
}

@media (max-width: 760px) {
  .online-submit-steps {
    grid-template-columns: repeat(5, 150px);
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .online-submit-video {
    max-height: 300px;
  }
}

@media (max-width: 560px) {
  .lesson-intro-visual-row {
    display: grid !important;
    grid-template-columns: minmax(150px, 42%) minmax(0, 1fr) !important;
    gap: 0 !important;
    min-height: 270px !important;
  }

  .lesson-intro-visual-row .lesson-primary-visual {
    margin: 0 !important;
    height: 100% !important;
  }

  .lesson-intro-visual-row .lesson-primary-visual .public-media-thumb {
    aspect-ratio: auto !important;
    height: 100% !important;
    max-height: none !important;
  }
}

/* lesson/substep media below How to do it */
.lesson-uploaded-media {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.lesson-uploaded-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.lesson-uploaded-media[open] .lesson-uploaded-media-head {
  margin-bottom: 10px;
}

.lesson-uploaded-media-head::-webkit-details-marker {
  display: none;
}

.lesson-uploaded-media-head::after {
  content: "+";
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 1000;
}

.lesson-uploaded-media[open] .lesson-uploaded-media-head::after {
  content: "-";
}

.lesson-uploaded-media-head strong {
  font-size: 13px;
  color: #0f172a;
  font-weight: 1000;
}

.lesson-uploaded-media-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 1000;
  margin-left: auto;
}

.lesson-media-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  margin-top: 0 !important;
}

.lesson-media-grid .public-media-thumb {
  height: auto !important;
  aspect-ratio: 16/10;
}

@media (max-width: 680px) {
  .lesson-uploaded-media {
    padding: 10px;
    border-radius: 14px;
  }

  .lesson-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}
.how-method-tab.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.how-method-wrap {
  display: grid;
  gap: 10px;
}

/* Mobile lesson intro */
@media (max-width: 680px) {
  .lesson-intro-visual-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    min-height: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .lesson-intro-visual-row .lesson-primary-visual {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
  }

  .lesson-intro-visual-row .lesson-primary-visual .media-card-button {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
    border-radius: 0 !important;
  }

  .lesson-intro-visual-row .lesson-primary-visual .public-media-thumb {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16/10 !important;
  }

  .lesson-intro-visual-row .lesson-primary-visual .public-media-thumb img,
  .lesson-intro-visual-row .lesson-primary-visual .public-media-thumb video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .lesson-intro-visual-row > p {
    width: 100% !important;
    min-height: 0 !important;
    display: block !important;
    padding: 14px !important;
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    background: #fff !important;
  }
}

/* Desktop lesson intro width */
@media (min-width: 681px) {
  .lesson-intro-visual-row {
    max-width: 980px !important;
    margin: 0 auto 16px !important;
    grid-template-columns: minmax(280px, 42%) minmax(0, 1fr) !important;
    border-radius: 20px !important;
  }

  .lesson-intro-visual-row > p {
    padding: 20px 22px !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
  }
}

/* Desktop how-to flow */
@media (min-width: 901px) {
  .substep-help-block .how-flow-list {
    display: flex !important;
    gap: 16px !important;
    overflow-x: auto !important;
    padding: 6px 4px 12px !important;
    scroll-snap-type: x mandatory;
  }

  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    flex: 0 0 280px !important;
    width: 280px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 10px !important;
    align-content: start !important;
    scroll-snap-align: start;
    border-radius: 20px !important;
    padding: 14px !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::after {
    content: ">" !important;
    position: absolute !important;
    right: -16px !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 999px !important;
    display: grid !important;
    place-items: center !important;
    background: #2563eb !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 1000 !important;
    z-index: 3 !important;
  }

  .substep-help-block .how-flow-num {
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
  }

  .substep-help-block .how-flow-image {
    width: 100% !important;
    aspect-ratio: 16/10 !important;
    grid-column: auto !important;
  }

  .substep-help-block .how-flow-text {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    font-weight: 850 !important;
  }
}
/* Mobile how-to cards */
@media (max-width: 680px) {
  .substep-help-block .how-flow-list {
    display: grid !important;
    gap: 12px !important;
    padding: 4px 0 2px !important;
  }

  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 10px !important;
    border-radius: 18px !important;
    padding: 12px !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::after {
    left: 29px !important;
    bottom: -13px !important;
    width: 2px !important;
    height: 12px !important;
    content: "" !important;
    background: #bfdbfe !important;
  }

  .substep-help-block .how-flow-num {
    width: 34px !important;
    height: 34px !important;
  }

  .substep-help-block .how-flow-image {
    grid-column: 1/-1 !important;
    width: 100% !important;
    aspect-ratio: 16/10 !important;
    margin-top: 2px !important;
  }

  .substep-help-block .how-flow-text {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
}
/* Mobile substep selector */
@media (max-width: 680px) {
  .focus-list {
    gap: 8px !important;
    padding: 2px 0 10px !important;
    margin-bottom: 10px !important;
  }

  .focus-item {
    min-width: 46px !important;
    max-width: 46px !important;
    width: 46px !important;
    min-height: 46px !important;
    padding: 8px !important;
    border-radius: 16px !important;
  }

  .focus-item.active {
    min-width: 190px !important;
    max-width: 230px !important;
    width: auto !important;
  }

  .focus-item .num {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 12px !important;
  }

  .focus-item.active .substep-label {
    gap: 8px !important;
  }

  .focus-item.active .substep-label h3 {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }
}
/* Mobile uploaded media grid */
@media (max-width: 680px) {
  .lesson-uploaded-media {
    margin-top: 12px !important;
    padding: 10px !important;
    border-radius: 16px !important;
  }

  .lesson-media-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .lesson-media-grid .media-card-button {
    border-radius: 16px !important;
  }

  .lesson-media-grid .public-media-thumb {
    aspect-ratio: 16/9 !important;
  }

  .lesson-media-grid .public-media-meta strong {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .lesson-media-grid .public-media-meta p {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
}

/* Mobile how-to image-first cards */
@media (max-width: 680px) {
  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .substep-help-block .how-flow-num {
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    z-index: 3 !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    border: 3px solid #fff !important;
  }

  .substep-help-block .how-flow-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    aspect-ratio: 16/10 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  .substep-help-block .how-flow-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .substep-help-block .how-flow-text {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    font-weight: 1000 !important;
    color: #0f172a !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-align: left !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::after {
    content: "" !important;
    left: 28px !important;
    bottom: -13px !important;
    width: 2px !important;
    height: 12px !important;
    background: #bfdbfe !important;
  }
}

/* Urdu how-to card direction */
@media (max-width: 680px) {
  html[dir="rtl"] .substep-help-block .how-flow-num,
  .rtl-lang .substep-help-block .how-flow-num {
    left: auto !important;
    right: 12px !important;
  }

  html[dir="rtl"] .substep-help-block .how-flow-text,
  .rtl-lang .substep-help-block .how-flow-text {
    text-align: right !important;
    direction: rtl !important;
    font-family: var(--urdu-font) !important;
    line-height: 1.9 !important;
  }
}

/* Desktop horizontal how-to cards */
@media (min-width: 681px) {
  .substep-help-block .how-flow-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 18px !important;
    overflow-x: auto !important;
    padding: 8px 6px 16px !important;
  }

  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    flex: 0 0 300px !important;
    width: 300px !important;
    max-width: 300px !important;
    display: block !important;
    position: relative !important;
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .substep-help-block .how-flow-num {
    position: absolute !important;
    left: 14px !important;
    top: 14px !important;
    z-index: 3 !important;
    border: 3px solid #fff !important;
  }

  .substep-help-block .how-flow-image {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 16/10 !important;
    margin: 0 0 12px !important;
    border-radius: 14px !important;
  }

  .substep-help-block .how-flow-text {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 14.5px !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::after {
    content: ">" !important;
    position: absolute !important;
    right: -18px !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    display: grid !important;
    place-items: center !important;
    background: #2563eb !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 1000 !important;
    z-index: 4 !important;
  }
}
/* How-to number placement */
.substep-help-block .how-flow-step,
.substep-help-block .how-flow-step.has-image {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  grid-template-areas:
    "num text"
    "image image" !important;
  gap: 10px !important;
  align-items: start !important;
  overflow: hidden !important;
}

.substep-help-block .how-flow-num {
  position: static !important;
  grid-area: num !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  z-index: 1 !important;
  margin: 0 !important;
  border: 0 !important;
}

.substep-help-block .how-flow-text {
  grid-area: text !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  text-align: left !important;
}

.substep-help-block .how-flow-image {
  grid-area: image !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  aspect-ratio: 16/10 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

.substep-help-block .how-flow-image img,
.substep-help-block .how-flow-image video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Mobile: keep card clean and full width */
@media (max-width: 680px) {
  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-areas:
      "num text"
      "image image" !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .substep-help-block .how-flow-num {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .substep-help-block .how-flow-text {
    font-size: 15px !important;
    line-height: 1.45 !important;
    font-weight: 1000 !important;
  }

  .substep-help-block .how-flow-image {
    margin-top: 2px !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::after {
    content: "" !important;
    position: absolute !important;
    left: 29px !important;
    right: auto !important;
    top: auto !important;
    bottom: -13px !important;
    width: 2px !important;
    height: 12px !important;
    transform: none !important;
    background: #bfdbfe !important;
  }
}

/* Desktop: still flow cards, but number stays inside card */
@media (min-width: 681px) {
  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    flex: 0 0 300px !important;
    width: 300px !important;
    max-width: 300px !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    grid-template-areas:
      "num text"
      "image image" !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::after {
    content: ">" !important;
    position: absolute !important;
    right: -18px !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    display: grid !important;
    place-items: center !important;
    background: #2563eb !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 1000 !important;
    z-index: 4 !important;
  }
}

/* RTL Urdu support */
html[dir="rtl"] .substep-help-block .how-flow-step,
.rtl-lang .substep-help-block .how-flow-step,
html[dir="rtl"] .substep-help-block .how-flow-step.has-image,
.rtl-lang .substep-help-block .how-flow-step.has-image {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  grid-template-areas:
    "num text"
    "image image" !important;
}

html[dir="rtl"] .substep-help-block .how-flow-text,
.rtl-lang .substep-help-block .how-flow-text {
  text-align: right !important;
  direction: rtl !important;
  font-family: var(--urdu-font) !important;
}

/* How-to method tabs and cards */
.how-method-wrap {
  padding: 0 14px 16px !important;
}

.how-method-note {
  margin: 2px 0 10px !important;
  color: #475569 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  font-weight: 800 !important;
}

.how-method-tabs {
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 0 18px !important;
  padding: 8px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 999px !important;
  background: #f8fbff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9) !important;
}

.how-method-wrap [data-how-panel][hidden] {
  display: none !important;
}

.how-method-wrap .how-method-panel:not(.active) {
  display: none !important;
}

.how-method-wrap .how-method-panel.active {
  display: flex !important;
}

.substep-help-block .how-flow-step,
.substep-help-block .how-flow-step.has-image {
  grid-template-areas:
    "image image"
    "num text" !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  align-content: start !important;
}

.substep-help-block .how-flow-image {
  grid-area: image !important;
  margin: 0 0 12px !important;
}

.substep-help-block .how-flow-num {
  grid-area: num !important;
  align-self: start !important;
  justify-self: start !important;
}

.substep-help-block .how-flow-text {
  grid-area: text !important;
  align-self: start !important;
}

@media (min-width: 681px) {
  .substep-help-block .how-flow-list {
    gap: 46px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 8px 34px 18px 6px !important;
  }

  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    grid-template-areas:
      "image image"
      "num text" !important;
    overflow: visible !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::before {
    content: "" !important;
    position: absolute !important;
    right: -45px !important;
    left: auto !important;
    top: 50% !important;
    width: 44px !important;
    height: 2px !important;
    transform: translateY(-50%) !important;
    background: #93c5fd !important;
    z-index: 2 !important;
    pointer-events: none !important;
  }

  .substep-help-block .how-flow-step:not(:last-child)::after {
    content: ">" !important;
    right: -36px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 26px !important;
    height: 26px !important;
    border: 2px solid #fff !important;
    border-radius: 999px !important;
    display: grid !important;
    place-items: center !important;
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22) !important;
    font-size: 14px !important;
    font-weight: 1000 !important;
    z-index: 3 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 680px) {
  .how-method-wrap {
    padding: 0 10px 14px !important;
  }

  .how-method-tabs {
    width: 100% !important;
    border-radius: 18px !important;
  }

  .how-method-wrap .how-method-panel.active {
    display: grid !important;
  }

  .substep-help-block .how-flow-step,
  .substep-help-block .how-flow-step.has-image {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-areas:
      "image image"
      "num text" !important;
  }
}
.how-flow-step.no-media {
  align-items: center;
}

.how-flow-empty-text {
  color: #7b8794;
  font-size: 0.92em;
  font-style: italic;
}

.media-load-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.media-load-error {
  background: rgba(248, 250, 252, 0.8);
}

.sir-image-box,
.public-media-thumb,
.how-flow-image,
.media-preview-step-media {
  background:
    linear-gradient(90deg, rgba(226,232,240,.55), rgba(248,250,252,.95), rgba(226,232,240,.55));
  background-size: 220% 100%;
  animation: sirImageSkeleton 1.25s linear infinite;
}

.sir-queued-img {
  opacity: 0;
  transition: opacity .22s ease;
}

.sir-queued-img.sir-img-loaded {
  opacity: 1;
}

.sir-image-box:has(.sir-img-loaded),
.public-media-thumb:has(.sir-img-loaded),
.how-flow-image:has(.sir-img-loaded) {
  animation: none;
  background: transparent;
}

@keyframes sirImageSkeleton {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

.media-load-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.media-load-error {
  animation: none !important;
  background: rgba(248, 250, 252, 0.8) !important;
}


.substep-help-block .how-flow-carousel {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 40px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.substep-help-block .how-method-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.substep-help-block .how-flow-carousel.how-method-panel.active {
  display: block !important;
}

.substep-help-block .how-flow-carousel .how-flow-list {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
}

.substep-help-block .how-flow-carousel .how-flow-step,
.substep-help-block .how-flow-carousel .how-flow-step.has-image {
  flex: 0 0 min(300px, 100%) !important;
}

.substep-help-block .how-flow-carousel .how-flow-list::-webkit-scrollbar {
  display: none !important;
}

.how-flow-nav {
  position: absolute !important;
  top: 50% !important;
  z-index: 8 !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #bfdbfe !important;
  background: #2563eb !important;
  color: #fff !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18) !important;
  transform: translateY(-50%) !important;
}

.how-flow-nav:hover {
  background: #1d4ed8 !important;
}

.how-flow-nav.prev {
  left: 4px !important;
}

.how-flow-nav.next {
  right: 4px !important;
}

@media (max-width: 680px) {
  .substep-help-block .how-flow-carousel {
    padding: 0 32px !important;
  }

  .how-flow-nav {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 18px !important;
  }
}
/* PATCH: how-to arrows, overview button, modal height, intro scroll lock */

html.sir-scroll-locked,
body.sir-scroll-locked {
  overflow: hidden !important;
  height: 100dvh !important;
}

/* Lesson title opens overview */
.step-title-overview-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.step-title-overview-trigger::after {
  content: "Overview";
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.step-overview-open-btn {
  margin-top: 12px;
  min-height: 34px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
}

/* Stop onboarding screen from scrolling behind modal */
body.intro-active .onboarding-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10060 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
}

body.intro-active .onboarding-card {
  max-height: calc(100dvh - 36px) !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
}

/* Keep main modals above sticky header */
.lesson-help-modal,
.media-preview-modal {
  z-index: 10050 !important;
}

/* Main step overview / help modal: shorter and cleaner */
.lesson-help-modal {
  align-items: flex-start !important;
  padding: 68px 18px 18px !important;
}

.lesson-help-panel {
  max-height: calc(100dvh - 92px) !important;
  overflow: hidden !important;
}

.lesson-help-body {
  flex: 1 1 auto !important;
  overflow: auto !important;
  min-height: 0 !important;
  overscroll-behavior: contain !important;
}

/* Fix how-to carousel nav buttons */
.substep-help-block .how-flow-carousel {
  position: relative !important;
  padding: 0 42px !important;
  overflow: visible !important;
}

.substep-help-block .how-flow-carousel .how-flow-list {
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding: 6px 0 14px !important;
}

/* Later CSS was clipping arrows because cards had overflow:hidden */
.how-flow-step,
.how-flow-step.has-image,
.substep-help-block .how-flow-step,
.substep-help-block .how-flow-step.has-image {
  overflow: visible !important;
}

.substep-help-block .how-flow-carousel > button.how-flow-nav {
  position: absolute !important;
  top: 50% !important;
  bottom: auto !important;
  z-index: 20 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #bfdbfe !important;
  background: #2563eb !important;
  color: #fff !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22) !important;
  transform: translateY(-50%) !important;
  overflow: hidden !important;
  appearance: none !important;
}

.substep-help-block .how-flow-carousel > button.how-flow-nav.prev {
  left: 4px !important;
}

.substep-help-block .how-flow-carousel > button.how-flow-nav.next {
  right: 4px !important;
}

.substep-help-block .how-flow-step:not(:last-child)::after {
  display: none !important;
}

@media (max-width: 680px) {
  .lesson-help-modal {
    padding: 60px 10px 74px !important;
  }

  .lesson-help-panel {
    max-height: calc(100dvh - 134px) !important;
    border-radius: 20px !important;
  }

  .substep-help-block .how-flow-carousel {
    padding: 0 34px !important;
  }

  .substep-help-block .how-flow-carousel > button.how-flow-nav {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    font-size: 18px !important;
  }

  .step-title-overview-trigger {
    display: flex;
    flex-wrap: wrap;
  }

  .step-title-overview-trigger::after {
    font-size: 11px;
    padding: 5px 9px;
  }
}

/* Admin overview point manager */
.course-overview-panel {
  margin: 14px 0;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: #f8fbff;
  padding: 14px;
}

.course-overview-panel > .manager-row {
  margin-bottom: 12px;
}

.course-overview-panel .manager-item {
  background: #fff;
}

.course-overview-panel {
  margin: 14px 0;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: #f8fbff;
  padding: 14px;
}

.course-overview-panel > .manager-row {
  margin-bottom: 12px;
}

.course-overview-panel .manager-item {
  background: #fff;
}

/* Canonical responsive fixes. Keep this block as the only late override for
   step headers, lesson chips, and the schedule ticker. */
.step-layout,
.focus-card,
.focus-list,
.desktop-step-header,
.screen .head {
  min-width: 0 !important;
  max-width: 100% !important;
}

.substep-label,
.substep-label h3,
.focus-item h3 {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.desktop-step-header {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.desktop-step-btn {
  flex: 1 1 150px !important;
  min-width: 0 !important;
  max-width: 220px !important;
  white-space: normal !important;
}

.step-overview-open-btn,
.step-title-overview-trigger::after {
  display: none !important;
}

.screen .head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.screen .head .kicker,
.screen .head .mobile-step-name,
.screen .head h2 {
  display: none !important;
}

.screen .head .step-title-tools {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: stretch !important;
}

.step-title-tools {
  display: grid !important;
  grid-template-columns: 34px minmax(86px, 0.36fr) minmax(260px, 1.7fr) minmax(86px, 0.36fr) 34px !important;
  gap: 8px !important;
  align-items: stretch !important;
  width: 100% !important;
  margin: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.step-title-nav-btn,
.step-title-overview-btn,
.step-title-side-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 40px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #1e3a8a !important;
  font-size: 13px !important;
  font-weight: 1000 !important;
  line-height: 1.1 !important;
  cursor: pointer !important;
}

.step-title-nav-btn {
  width: 34px !important;
  padding: 0 !important;
  font-size: 21px !important;
}

.step-title-overview-btn,
.step-title-side-btn {
  gap: 6px !important;
  padding: 7px 10px !important;
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: hidden !important;
}

.step-title-side-btn {
  flex-direction: row !important;
  align-items: center !important;
  background: #fff !important;
  color: #1e3a8a !important;
  opacity: 0.82 !important;
}

.step-title-side-btn span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 999px !important;
  background: #dbeafe !important;
  font-size: 11px !important;
  font-weight: 1000 !important;
  color: #2563eb !important;
  white-space: nowrap !important;
}

.step-title-side-btn strong {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.step-title-side-btn.empty {
  visibility: hidden !important;
}

.step-title-overview-no {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  min-height: 22px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  white-space: nowrap !important;
}

.step-title-overview-text {
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.step-title-overview-btn.done {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

.step-title-overview-btn.done .step-title-overview-no {
  background: #22c55e !important;
  color: #fff !important;
}

.step-title-overview-btn.running:not(.done) {
  background: #ecfdf5 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

.step-title-nav-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

.lesson-chip-nav {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 36px !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.lesson-chip-nav .focus-list {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 0 8px !important;
  scrollbar-width: thin !important;
  -webkit-overflow-scrolling: touch;
}

.lesson-chip-nav .focus-item {
  flex: 0 0 auto !important;
}

.lesson-chip-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #2563eb !important;
  font-size: 22px !important;
  font-weight: 1000 !important;
  cursor: pointer !important;
}

.lesson-chip-arrow.primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

.lesson-chip-arrow:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

.sir-timeline-banner.show {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 0 !important;
  gap: 8px !important;
  padding: 5px 10px !important;
  margin-top: 6px !important;
  margin-bottom: 4px !important;
  border-radius: 14px !important;
}

.sir-timeline-banner.show > div:not(.sir-timeline-badge) {
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.sir-timeline-banner.show > div:not(.sir-timeline-badge) strong,
.sir-timeline-banner.show > div:not(.sir-timeline-badge) span {
  display: inline !important;
  white-space: nowrap !important;
  font-size: 12.5px !important;
  line-height: 1.1 !important;
}

.sir-timeline-banner.show > div:not(.sir-timeline-badge) span {
  margin-left: 12px !important;
}

.sir-timeline-badge {
  min-height: 22px !important;
  padding: 4px 9px !important;
  font-size: 11px !important;
}

.screen {
  padding-top: 12px !important;
}

.focus-card {
  padding-top: 14px !important;
}

header.topbar {
  min-height: 64px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

header.topbar .brand-main {
  font-size: 15px !important;
  line-height: 1.1 !important;
}

header.topbar .brand-sub {
  font-size: 12px !important;
  line-height: 1.1 !important;
}

header.topbar > .top-actions {
  gap: 7px !important;
}

header.topbar > .top-actions > a.btn-primary {
  min-height: 36px !important;
  padding: 8px 15px !important;
  font-size: 13px !important;
}

header.topbar .voice-master-btn,
header.topbar .floating-lang-btn {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
}

header.topbar .course-completion-fab {
  min-height: 36px !important;
  padding: 8px 13px !important;
  font-size: 13px !important;
}

@media (max-width: 680px) {
  header.topbar {
    min-height: 46px !important;
    padding: 5px 8px !important;
  }

  header.topbar .brand-main {
    font-size: 12.5px !important;
  }

  header.topbar > .top-actions {
    gap: 4px !important;
    max-width: 166px !important;
  }

  header.topbar > .top-actions > a.btn-primary {
    min-width: 50px !important;
    max-width: 62px !important;
    min-height: 32px !important;
    padding: 7px 8px !important;
    font-size: 10.5px !important;
  }

  header.topbar .voice-master-btn,
  header.topbar .floating-lang-btn {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
  }

  .sir-timeline-banner.show {
    padding: 5px 8px !important;
    margin-top: 5px !important;
    margin-bottom: 4px !important;
    min-height: 32px !important;
  }

  .sir-timeline-badge {
    min-height: 22px !important;
    padding: 4px 8px !important;
    font-size: 10.5px !important;
  }

  .sir-timeline-banner.show > div:not(.sir-timeline-badge) strong,
  .sir-timeline-banner.show > div:not(.sir-timeline-badge) span {
    font-size: 11.5px !important;
  }

  .screen {
    padding-top: 10px !important;
  }

  .screen .head {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .screen .head .kicker,
  .screen .head .mobile-step-name,
  .screen .head h2,
  .screen .head .step-title-tools {
    grid-column: 1 !important;
  }

  .screen .head h2 {
    display: none !important;
  }

  .screen .head .mobile-step-name {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .screen .head .mobile-step-name::-webkit-scrollbar {
    display: none;
  }

  .screen .head .step-title-tools {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) 34px !important;
    justify-content: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    margin: 8px 0 0 !important;
  }

  .screen .head .mobile-step-name {
    display: none !important;
  }

  .step-title-side-btn {
    display: none !important;
  }

  .step-title-overview-btn {
    align-items: center !important;
    flex-direction: row !important;
    padding: 6px 10px !important;
    white-space: normal !important;
  }

  .step-title-overview-text {
    display: block !important;
    line-height: 1.15 !important;
  }

  .focus-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 8px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .focus-list::-webkit-scrollbar {
    display: none;
  }

  .lesson-chip-nav {
    grid-template-columns: 34px minmax(0, 1fr) 34px !important;
    gap: 6px !important;
  }

  .lesson-chip-arrow {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: 20px !important;
  }

  .focus-item {
    flex: 0 0 auto !important;
  }

  .focus-item:not(.active) {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    min-height: 46px !important;
    padding: 8px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 16px !important;
  }

  .focus-item:not(.active) .substep-label {
    display: grid !important;
    place-items: center !important;
  }

  .focus-item:not(.active) .substep-label h3 {
    display: none !important;
  }

  .focus-item.active {
    width: 220px !important;
    min-width: 190px !important;
    max-width: 220px !important;
    min-height: 70px !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .focus-item.active .substep-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .focus-item.active .substep-label h3 {
    display: block !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.2 !important;
    text-align: left !important;
  }

  .sir-timeline-banner {
    padding: 8px 9px !important;
  }

  .sir-timeline-track {
    animation-duration: 16s !important;
  }
}

.lesson-chip-nav {
  grid-template-columns: 36px minmax(0, 1fr) 36px !important;
  max-width: 100%;
}

.lesson-chip-arrow {
  display: inline-flex !important;
}

.lesson-chip-nav .focus-list {
  scroll-snap-type: x mandatory;
  scrollbar-width: none !important;
  padding-inline: max(12px, calc(50% - 120px)) !important;
  scroll-padding-inline: max(12px, calc(50% - 120px));
}

.lesson-chip-nav .focus-list::-webkit-scrollbar {
  display: none !important;
}

.lesson-chip-nav .focus-item {
  scroll-snap-align: center;
}

@media (max-width: 680px) {
  header.topbar .floating-lang-btn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
    overflow: hidden !important;
  }

  .course-active-mode header.topbar > .top-actions {
    display: flex !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: min(56vw, 218px) !important;
    gap: 4px !important;
    overflow: hidden !important;
  }

  .course-active-mode #mainMenuBtn,
  .course-active-mode #courseCompletionFab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 30px !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .course-active-mode #mainMenuBtn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 18px !important;
    white-space: nowrap !important;
  }

  .course-active-mode #courseCompletionFab {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
  }

  .course-active-mode header.topbar > .top-actions > a.btn-primary {
    max-width: 50px !important;
  }

  .course-active-mode header.topbar .voice-master-btn,
  .course-active-mode header.topbar .floating-lang-btn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    font-size: 10.5px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
  }

  .course-active-mode header.topbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) !important;
    overflow-x: clip !important;
  }

  .lesson-chip-nav {
    grid-template-columns: 32px minmax(0, 1fr) 32px !important;
  }

  .lesson-chip-arrow {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 19px !important;
  }

  .lesson-points-chip {
    top: 10px;
    right: 10px;
  }
}

.lesson-rich-text{
  line-height:1.7;
  color:#334155;
}

.lesson-rich-text p{
  margin:.35rem 0;
}

.lesson-rich-text ul,
.lesson-rich-text ol{
  margin:.5rem 0 .5rem 1.2rem;
  padding:0;
}

.lesson-rich-text strong,
.lesson-rich-text b{
  color:#0f172a;
}

.sir-admin-sidebar,
.admin-sidebar,
.sidebar {
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sir-admin-sidebar nav,
.admin-sidebar nav,
.sidebar nav,
.sir-admin-nav {
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.sir-admin-sidebar .sidebar-bottom,
.admin-sidebar .sidebar-bottom,
.sidebar .sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, .25);
  padding-top: 10px;
}

.ccm-inline-media-picker {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.ccm-inline-media-thumb {
  width: 92px;
  min-height: 82px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  font-weight: 1000;
  color: #64748b;
}

.ccm-inline-media-thumb img,
.ccm-inline-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ccm-inline-media-thumb span {
  display: grid;
  place-items: center;
  height: 82px;
  line-height: 1.2;
}

.ccm-inline-media-info {
  min-width: 0;
}

.ccm-inline-media-info input {
  margin-bottom: 8px;
}
/* ===== 20260709 PUBLIC REDESIGN: Udemy + Duolingo hybrid shell ===== */
:root {
  --sir-modern-bg: #f4f7fb;
  --sir-modern-ink: #102033;
  --sir-modern-muted: #64748b;
  --sir-modern-card: rgba(255, 255, 255, 0.94);
  --sir-modern-line: rgba(148, 163, 184, 0.26);
  --sir-modern-orange: #f97316;
  --sir-modern-green: #22c55e;
  --sir-modern-blue: #2563eb;
  --sir-modern-purple: #7c3aed;
  --sir-modern-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.13), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(34, 197, 94, 0.14), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, var(--sir-modern-bg) 52%, #eef4ff 100%) !important;
  color: var(--sir-modern-ink);
}

.topbar {
  grid-template-columns: minmax(210px, 300px) minmax(0, 1fr) auto !important;
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.brand-main {
  letter-spacing: -0.03em;
}

.desktop-step-header {
  display: flex !important;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}
.desktop-step-header::-webkit-scrollbar { display: none; }
.desktop-step-pill {
  min-width: 118px;
  max-width: 170px;
  padding: 8px 10px !important;
  border-radius: 16px !important;
  background: #fff !important;
  border: 1px solid var(--sir-modern-line) !important;
  box-shadow: none !important;
  justify-content: flex-start !important;
}
.desktop-step-pill span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  flex: 0 0 auto;
}
.desktop-step-pill b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.desktop-step-pill.active {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16) !important;
}
.desktop-step-pill.done span {
  background: #22c55e;
  color: #fff;
}

.sir-modern-main {
  width: 100%;
  padding: 18px clamp(12px, 2vw, 24px) 110px;
}
.sir-learning-shell {
  width: min(1680px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(250px, 320px);
  gap: 18px;
  align-items: start;
}
.sir-content-stage {
  min-width: 0;
}
.sir-left-rail,
.sir-right-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  scrollbar-width: thin;
}
.sir-left-rail::-webkit-scrollbar,
.sir-right-rail::-webkit-scrollbar { width: 6px; }
.sir-left-rail::-webkit-scrollbar-thumb,
.sir-right-rail::-webkit-scrollbar-thumb { background: rgba(148,163,184,.5); border-radius: 99px; }

.sir-rail-brand-card,
.sir-rail-continue-card,
.sir-daily-card,
.sir-ad-slot {
  background: var(--sir-modern-card);
  border: 1px solid var(--sir-modern-line);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}
.sir-rail-brand-card {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(34, 197, 94, 0.08)),
    #fff;
}
.sir-rail-kicker,
.sir-daily-card > span,
.sir-card-headline span,
.sir-ad-slot span,
.modern-section-title span,
.modern-hero-card span,
.modern-today-top span {
  display: block;
  color: var(--sir-modern-muted);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}
.sir-rail-brand-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-top: 8px;
}
.sir-rail-brand-card small,
.sir-rail-continue-card small,
.sir-daily-card small,
.sir-ad-slot small {
  display: block;
  color: var(--sir-modern-muted);
  font-weight: 800;
  line-height: 1.45;
}
.sir-learner-status {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, .28);
  display: grid;
  gap: 8px;
}

.sir-learner-status > span {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.2;
}
.sir-learner-status div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.sir-learner-status b {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 1000;
}
.sir-rail-continue-card {
  padding: 16px;
}
.sir-rail-continue-card span {
  color: #16a34a;
  font-weight: 1000;
  font-size: 12px;
}
.sir-rail-continue-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 16px;
  line-height: 1.25;
}
.sir-rail-continue-card button {
  width: 100%;
  margin-top: 12px;
}
.sir-rail-section-title {
  padding: 0 4px;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sir-rail-steps {
  display: grid;
  gap: 10px;
}
.sir-rail-step {
  width: 100%;
  border-radius: 20px !important;
  border: 1px solid var(--sir-modern-line) !important;
  background: rgba(255,255,255,.88) !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas: "num title" "num meta";
  text-align: left;
  padding: 12px !important;
  gap: 2px 10px !important;
  box-shadow: none !important;
}
.sir-rail-step span {
  grid-area: num;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 1000;
}
.sir-rail-step strong {
  grid-area: title;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sir-rail-step small {
  grid-area: meta;
  color: var(--sir-modern-muted);
  font-weight: 900;
}
.sir-rail-step.active {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.14) !important;
}
.sir-rail-step.done span {
  background: #22c55e;
  color: #fff;
}

.sir-ad-slot {
  padding: 14px 16px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(37, 99, 235, 0.08)),
    repeating-linear-gradient(45deg, rgba(148, 163, 184, .10) 0, rgba(148, 163, 184, .10) 8px, transparent 8px, transparent 18px),
    #fff;
}
.sir-ad-slot strong {
  display: block;
  margin: 5px 0;
  font-size: 16px;
}
.sir-ad-slot a {
  width: 100%;
  min-height: inherit;
  color: inherit;
  text-decoration: none;
  display: grid;
  place-items: center;
  gap: 4px;
}
.sir-ad-slot img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 8px;
}
.sir-ad-top img,
.sir-ad-bottom img,
.sir-mobile-ad-slot img {
  max-height: 76px;
}
.sir-ad-has-image {
  background: #fff;
}
.sir-ad-top {
  min-height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.sir-ad-card {
  min-height: 250px;
  align-content: center;
  display: grid;
}
.sir-ad-compact { min-height: 130px; }
.sir-mobile-ad-slot { display: none; }

.sir-daily-card {
  padding: 16px;
}
.sir-streak-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(249,115,22,.15), rgba(255,255,255,.95)),
    #fff;
}
.sir-streak-card strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  letter-spacing: -0.05em;
}
.sir-streak-card strong b { font-size: 38px; }
.sir-streak-card em {
  font-style: normal;
  font-size: 42px;
  filter: drop-shadow(0 10px 18px rgba(249,115,22,.28));
}
.sir-card-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.sir-card-headline strong {
  font-size: 13px;
  color: #0f172a;
}
.sir-goal-bar,
.course-card-progress {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.sir-goal-bar i,
.course-card-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sir-modern-green), #84cc16);
}
.sir-today-task-card strong {
  display: block;
  margin: 8px 0 14px;
  line-height: 1.25;
}
.sir-today-task-card button { width: 100%; }
.sir-week-bars {
  height: 98px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.sir-week-bars span {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 5px;
  align-items: end;
}
.sir-week-bars i {
  width: 100%;
  min-height: 8px;
  border-radius: 999px 999px 8px 8px;
  background: #cbd5e1;
  display: block;
}
.sir-week-bars span.active i {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  box-shadow: 0 10px 22px rgba(34,197,94,.24);
}
.sir-week-bars b {
  font-size: 10px;
  color: var(--sir-modern-muted);
  text-align: center;
}

.course-dashboard,
.screen > .wrap {
  width: 100% !important;
  max-width: none !important;
}
.screen > .wrap > .card,
.course-dashboard {
  border-radius: 30px !important;
}
.screen > .wrap > .card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  box-shadow: var(--sir-modern-shadow) !important;
}
.screen > .wrap > .card > .head {
  background:
    linear-gradient(135deg, rgba(37,99,235,.12), rgba(34,197,94,.08)),
    #fff !important;
  border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}
.screen > .wrap > .card > .head h2 {
  letter-spacing: -0.045em;
}
.step-layout {
  display: grid !important;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}
.focus-list {
  border-radius: 24px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(148,163,184,.24) !important;
  padding: 10px !important;
}
.focus-item {
  border-radius: 18px !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  margin-bottom: 10px !important;
  background: #fff !important;
}
.focus-item.active {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .14) !important;
}
.focus-card {
  border-radius: 28px !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  box-shadow: 0 20px 60px rgba(15,23,42,.10) !important;
}
.focus-card::before {
  background: linear-gradient(90deg, #22c55e, #2563eb, #7c3aed) !important;
}
.question-wrap,
.easy-guide,
.lesson-quiz-card,
.step-quiz-card {
  border-radius: 24px !important;
  box-shadow: 0 14px 36px rgba(15,23,42,.06) !important;
}
.actions button,
.actions .btn,
.course-join-btn,
.btn-primary {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

.modern-dashboard-head {
  margin-bottom: 16px;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}
.modern-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, .7fr) minmax(180px, .55fr);
  gap: 16px;
  margin-bottom: 18px;
}
.modern-hero-card,
.modern-today-card,
.modern-ad-preview,
.modern-login-card,
.modern-course-section,
.modern-week-card {
  background: var(--sir-modern-card);
  border: 1px solid var(--sir-modern-line);
  border-radius: 28px;
  box-shadow: 0 16px 48px rgba(15,23,42,.08);
}
.modern-hero-card {
  padding: clamp(20px, 4vw, 34px);
  background:
    radial-gradient(circle at 94% 12%, rgba(34,197,94,.20), transparent 26%),
    linear-gradient(135deg, #ffffff, #eff6ff);
}
.modern-hero-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: .96;
  letter-spacing: -0.07em;
}
.modern-hero-card p {
  max-width: 650px;
  color: var(--sir-modern-muted);
  font-weight: 800;
  line-height: 1.6;
}
.modern-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.modern-today-card,
.modern-ad-preview {
  padding: 18px;
  display: grid;
  align-content: center;
}
.modern-today-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modern-today-top strong {
  font-size: 18px;
}
.modern-goal-ring {
  --goal: 0%;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  margin: 14px auto;
  display: grid;
  place-items: center;
  background: conic-gradient(#22c55e var(--goal), #e5e7eb 0);
  position: relative;
}
.modern-goal-ring::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: #fff;
}
.modern-goal-ring b,
.modern-goal-ring small {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
}
.modern-goal-ring b {
  font-size: 28px;
  transform: translateY(-8px);
}
.modern-goal-ring small {
  transform: translateY(20px);
  color: var(--sir-modern-muted);
  font-weight: 1000;
}
.modern-ad-preview {
  text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(148,163,184,.10) 0, rgba(148,163,184,.10) 9px, transparent 9px, transparent 18px),
    #fff;
}
.modern-landing-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
}
.modern-login-card,
.modern-course-section {
  padding: 18px;
}
.modern-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.modern-week-card {
  padding: 16px;
  margin-top: 14px;
}
.dashboard-week-bars {
  margin-top: 10px;
}
.modern-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.dashboard-ad-slot {
  min-width: 180px;
  min-height: 56px;
  padding: 8px 12px;
}
.modern-course-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.course-library-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.course-filter-panel {
  display: none;
}

.course-filter-panel button {
  min-height: 34px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
  text-align: left;
  padding: 7px 12px;
}

.course-filter-panel button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.diploma-dashboard-section {
  padding: 18px;
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  background: #fff;
}

.diploma-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.diploma-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.diploma-card span {
  color: #2563eb;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.diploma-card strong {
  color: #0f172a;
  font-size: 16px;
}

.diploma-card p,
.diploma-card small {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.diploma-course-list {
  display: grid;
  gap: 6px;
  padding: 9px;
  border-radius: 10px;
  background: #fff;
}
.diploma-course-list > div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.diploma-course-list > div span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  text-transform: none;
}
.diploma-course-list > div.complete span:first-child {
  color: #0f9a69;
}
.diploma-course-list > div small {
  color: #64748b;
}
.program-enrollment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.diploma-card .program-enrollment-status {
  color: #64748b;
  font-size: 11px;
  letter-spacing: .04em;
}
.diploma-card .program-enrollment-status.awarded {
  color: #07865d;
}
.program-enrollment-actions button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
}
.modern-course-card {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr);
  align-content: start;
  align-items: start;
  border-radius: 14px !important;
  padding: 12px !important;
  gap: 8px !important;
  background: #fff !important;
  min-height: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.modern-course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 56px rgba(15,23,42,.13);
}
.modern-course-topline,
.modern-course-metrics {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.modern-course-metrics {
  flex-wrap: nowrap;
  gap: 4px;
}
.modern-course-card .course-thumb-fallback,
.modern-course-card .course-thumb-media {
  grid-column: 1;
  grid-row: 1 / span 4;
}
.modern-course-card .modern-course-topline,
.modern-course-card h3,
.modern-course-card p,
.modern-course-card .modern-course-metrics,
.modern-course-card .course-tool-chips {
  grid-column: 2;
}
.modern-course-card .course-card-progress,
.modern-course-card > small,
.modern-course-card .course-card-actions {
  grid-column: 1 / -1;
}
.modern-course-metrics span {
  padding: 4px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 1000;
  font-size: 10px;
  white-space: nowrap;
}
.modern-course-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
}
.modern-course-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modern-course-card:not(.active) .modern-course-metrics,
.modern-course-card:not(.active) .course-card-progress,
.modern-course-card:not(.active) > small,
.modern-course-card:not(.active) .modern-course-topline small {
  display: none !important;
}

.modern-course-card.active .course-card-actions button:not(:first-child) {
  display: none !important;
}

.modern-course-card.active .course-card-actions {
  grid-template-columns: minmax(0, 160px);
}
.course-thumb-fallback,
.course-thumb-media {
  width: 100%;
  height: 76px;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc 52%, #dcfce7);
  color: #0f766e;
}
.course-thumb-fallback strong {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  font-size: 26px;
  color: #0f766e;
}
.course-thumb-media img,
.course-thumb-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-card-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.course-card-actions button {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
  white-space: nowrap;
}
.course-mini-section {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 8px;
  background: #f8fafc;
}
.course-mini-section summary {
  cursor: pointer;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.course-tool-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 24px;
  max-height: 24px;
  overflow: hidden;
}
.course-tool-chips span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 11px;
}
.course-loading-shell {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #475569;
}

.sir-app-loader[hidden] {
  display: none !important;
}
.course-loading-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #0f172a;
  color: #fff;
  font-weight: 1000;
  letter-spacing: .04em;
}
.course-requirements-card {
  max-height: min(760px, calc(100vh - 42px));
  display: flex;
  flex-direction: column;
}
.course-requirements-card > .modal-body,
#courseRequirementsBody {
  min-height: 0;
  overflow: auto;
}
.course-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 14px;
  align-items: start;
}
.course-preview-main,
.course-preview-side {
  min-width: 0;
}
.course-preview-accordion {
  display: grid;
  gap: 8px;
}
.course-preview-accordion details,
.course-preview-outline,
.course-tools-panel,
.course-tool-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.course-preview-accordion summary,
.course-preview-outline summary,
.course-tools-panel > summary,
.course-tool-card > summary {
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: #0f172a;
  font-weight: 1000;
  list-style: none;
}
.course-preview-accordion summary::-webkit-details-marker,
.course-preview-outline summary::-webkit-details-marker,
.course-tools-panel summary::-webkit-details-marker,
.course-tool-card summary::-webkit-details-marker {
  display: none;
}
.course-preview-accordion summary::after,
.course-preview-outline summary::after,
.course-tools-panel > summary::after,
.course-tool-card > summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
}
.course-preview-accordion details[open] > summary::after,
.course-preview-outline[open] > summary::after,
.course-tools-panel[open] > summary::after,
.course-tool-card[open] > summary::after {
  content: "-";
}
.course-preview-accordion summary small,
.course-preview-outline summary small,
.course-tools-panel summary small,
.course-tool-card summary small {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
}
.course-preview-accordion .requirements-list,
.course-preview-outline ol,
.course-tools-grid,
.course-tool-card p,
.course-tool-card ul {
  margin: 0;
  padding: 0 12px 12px;
}
.course-tools-grid {
  display: grid;
  gap: 8px;
}
.course-tool-card p {
  color: #64748b;
  line-height: 1.4;
}
.course-tool-card summary em {
  margin-left: 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
}
.course-tool-checks {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}
.course-tool-checks label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}
.course-tool-checks input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.course-tool-checks input:checked + span {
  color: #64748b;
  text-decoration: line-through;
}
.course-countdown-face {
  display: grid;
  gap: 2px;
  margin: 0 12px 12px;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
}
.course-countdown-face strong {
  font-size: 28px;
  line-height: 1;
}
.course-countdown-face span {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.course-tool-date {
  display: grid;
  gap: 6px;
  margin: 0 12px 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}
.course-tool-date input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
}
.course-tool-resources a {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: none;
}
.learner-tools-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}
.learner-tools-panel.compact {
  margin: 12px 0;
  padding: 10px;
}
.learner-tools-head {
  display: grid;
  gap: 3px;
}
.learner-tools-head span {
  color: #2563eb;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}
.learner-tools-head strong {
  color: #0f172a;
  font-size: 14px;
}
.learner-tools-panel.compact .course-tools-panel > summary {
  min-height: 36px;
  padding: 8px 10px;
}
.learner-tools-panel.compact .course-tool-card > summary {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}
.learner-account-rail {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.platform-rail-link.as-button {
  width: 100%;
  border: 1px solid #e2e8f0;
  text-align: left;
  cursor: pointer;
}
.rail-account-workspace {
  max-height: 460px;
  overflow: auto;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.rail-account-workspace .profile-form,
.rail-account-workspace .research-publish-panel {
  display: grid;
  gap: 8px;
}
.rail-account-workspace input,
.rail-account-workspace textarea,
.rail-account-workspace select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
}
.rail-account-workspace textarea {
  min-height: 88px;
}
.research-upload-hint {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: -4px;
}
.course-preview-outline li {
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
}
.course-preview-actions.top-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255,255,255,.96);
  padding: 8px 0;
}

@media (max-width: 1260px) {
  .sir-learning-shell {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  }
  .sir-right-rail {
    display: none;
  }
  .modern-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr);
  }
  .modern-ad-preview { display: none; }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  .desktop-step-header { display: none !important; }
  .sir-modern-main { padding: 12px 10px 120px; }
  .sir-learning-shell {
    display: block;
  }
  .sir-left-rail,
  .sir-right-rail {
    display: none;
  }
  .sir-mobile-ad-slot {
    width: min(100%, 760px);
    margin: 0 auto 12px;
    min-height: 82px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 12px;
    border: 1px dashed rgba(249,115,22,.45);
    border-radius: 22px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 12px 34px rgba(15,23,42,.08);
  }
  .sir-mobile-ad-slot span {
    color: var(--sir-modern-muted);
    font-weight: 1000;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
  }
  .sir-mobile-ad-slot strong { display: block; }
  .sir-mobile-ad-slot small { color: var(--sir-modern-muted); font-weight: 800; }
  .sir-ad-top { display: none; }
  .modern-hero-grid,
  .modern-landing-grid,
  .step-layout {
    grid-template-columns: 1fr !important;
  }
  .modern-section-title {
    display: block;
  }
  .dashboard-ad-slot {
    margin-top: 10px;
  }
  .course-preview-layout {
    grid-template-columns: 1fr;
  }
  .course-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .focus-list {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 78%);
    overflow-x: auto;
    padding-bottom: 12px !important;
  }
  .focus-item { margin-bottom: 0 !important; }
}

@media (max-width: 640px) {
  .modern-hero-card h1 { font-size: 34px; }
  .modern-today-card { grid-template-columns: 1fr; }
  .modern-profile-stats { grid-template-columns: 1fr; }
  .screen > .wrap > .card,
  .course-dashboard,
  .modern-hero-card,
  .modern-today-card,
  .modern-login-card,
  .modern-course-section {
    border-radius: 22px !important;
  }
  .top-actions {
    gap: 6px !important;
  }
  .top-actions .btn-primary,
  .top-actions .voice-master-btn {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
}

/* Course active screen polish: keep navigation and tools in the left rail. */
@media (min-width: 981px) {
  .course-active-mode .sir-learning-shell {
    display: grid !important;
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) !important;
    gap: 18px !important;
    align-items: start !important;
  }

  .course-active-mode .sir-left-rail {
    display: grid !important;
    gap: 12px !important;
    position: sticky !important;
    top: 82px !important;
    max-height: calc(100dvh - 96px) !important;
    overflow: auto !important;
    padding-right: 3px !important;
  }

  .course-active-mode .sir-right-rail {
    display: none !important;
  }

  .course-active-mode .sir-rail-section-title,
  .course-active-mode .sir-rail-steps {
    display: grid !important;
  }
}

.course-active-mode .sir-content-stage,
.course-active-mode .screen,
.course-active-mode .screen > .wrap,
.course-active-mode .screen > .wrap > .card,
.course-active-mode .screen > .wrap > .card > .body,
.course-active-mode .step-layout,
.course-active-mode .focus-card {
  min-width: 0 !important;
  max-width: 100% !important;
}

.course-active-mode .screen > .wrap > .card {
  overflow: clip !important;
}

.course-active-mode .step-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

.course-active-mode .lesson-chip-nav {
  display: none !important;
}

.course-active-mode .lesson-chip-nav .focus-list {
  min-width: 0 !important;
  max-width: 100% !important;
}

.course-active-mode .focus-card {
  width: 100% !important;
  overflow: hidden !important;
  background: #fff !important;
}

.course-active-mode .lesson-intro-visual-row {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 42%) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start !important;
}

.course-active-mode .lesson-rich-text {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

.course-active-mode .substep-help-frame,
.course-active-mode .substep-help-block,
.course-active-mode .how-flow-carousel,
.course-active-mode .how-flow-list,
.course-active-mode .lesson-uploaded-media {
  max-width: 100% !important;
  min-width: 0 !important;
}

.course-active-mode .how-flow-list {
  overflow-x: auto !important;
}

.lesson-complete-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fafc;
}

.lesson-bottom-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.lesson-action-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid #e2e8f0 !important;
}

.lesson-help-actions,
.lesson-progress-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lesson-help-actions {
  min-width: 0;
}

.lesson-progress-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.lesson-bottom-actions > span {
  margin-right: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.lesson-bottom-actions > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lesson-complete-bar span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.lesson-complete-btn {
  background: #2563eb !important;
  color: #fff !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  min-height: 34px !important;
}

.lesson-complete-btn.done {
  background: #dcfce7 !important;
  color: #166534 !important;
  cursor: default !important;
  box-shadow: none !important;
}

.course-active-mode .sir-ad-bottom {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
}

.course-active-mode .screen > .wrap > .card > .body > .actions {
  display: none !important;
}

.course-active-mode .sir-today-task-card {
  display: none !important;
}

.course-active-mode .lesson-chip-nav .focus-list,
.course-active-mode .focus-list {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.course-active-mode .lesson-chip-nav {
  background: transparent !important;
  border: 0 !important;
}

@media (min-width: 981px) {
  .course-active-mode .sir-rail-brand-card,
  .course-active-mode .sir-rail-continue-card,
  .course-active-mode #learnerToolsRailPanel .learner-tools-panel {
    border-radius: 14px !important;
    border: 1px solid #dbeafe !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
  }

  .course-active-mode .sir-rail-steps {
    gap: 8px !important;
  }

  .course-active-mode .sir-rail-step {
    border-radius: 12px !important;
    border: 1px solid #dbeafe !important;
    background: #f8fbff !important;
    padding: 10px !important;
  }

  .course-active-mode .sir-rail-step.active {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    box-shadow: inset 3px 0 0 #2563eb, 0 10px 22px rgba(37, 99, 235, 0.12) !important;
  }

  .course-active-mode #learnerToolsRailPanel {
    display: block !important;
    margin-top: 0 !important;
  }

  .course-active-mode #learnerToolsRailPanel .course-tool-card {
    border-radius: 12px !important;
  }
}

.lesson-next-btn {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  min-height: 34px !important;
}

.lesson-quiz-card.quiz-attention {
  outline: 3px solid rgba(37, 99, 235, .35);
  box-shadow: 0 18px 50px rgba(37, 99, 235, .18) !important;
  animation: quizAttentionPulse 900ms ease-out 1;
}

.lesson-community {
  margin-top: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.community-head,
.community-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.community-head span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.community-head strong {
  display: block;
  font-size: 18px;
}

.community-head small {
  color: #64748b;
  font-weight: 900;
}

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

.community-card {
  min-width: 0;
  border: 1px solid #dbe3f0;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.community-card-head {
  margin-bottom: 8px;
}

.community-card-head button,
.community-actions button,
.community-compose button,
.community-reply button {
  border: 1px solid #dbe3f0;
  background: #f8fafc;
  color: #334155;
  min-height: 0;
  padding: 6px 9px;
  font-size: 12px;
}

.community-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.community-item {
  border: 1px solid #edf2f7;
  border-radius: 14px;
  padding: 10px;
  background: #fbfdff;
}

.community-item > div:first-child,
.community-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.community-item strong {
  font-size: 13px;
}

.community-item small,
.community-empty,
.community-loading {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.community-item p {
  margin: 7px 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.community-replies {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid #dbeafe;
}

.community-reply {
  display: grid;
  gap: 3px;
  color: #475569;
  font-size: 12px;
}

.community-reply button {
  width: max-content;
}

.community-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.community-question-compose {
  grid-template-columns: minmax(130px, .8fr) minmax(0, 1fr) auto;
}

.community-compose input {
  min-height: 34px;
  border-radius: 999px;
  font-size: 13px;
}

.profile-community-panel {
  border-top: 1px solid #e2e8f0;
  margin-top: 14px;
  padding-top: 12px;
}

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

.profile-community-grid > div {
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}

.profile-community-grid p {
  margin: 8px 0 0;
  display: grid;
  gap: 2px;
}

.profile-community-grid span,
.profile-community-grid small {
  color: #64748b;
  font-size: 12px;
}

.btn-primary,
.btn-ghost,
.course-join-btn,
.btn-red,
.btn-amber,
.btn-green {
  min-height: 34px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
}

.course-card-actions {
  align-items: center;
}

.course-card-actions button,
.course-card-actions a {
  min-height: 32px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
}

.platform-rail-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #dbe7f4;
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.platform-rail-link,
.platform-rail-latest a {
  display: grid;
  gap: 2px;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid #dbeafe;
  background: #f8fbff;
}

.platform-rail-link {
  padding: 9px 10px;
  border-radius: 12px;
}

.platform-rail-link strong {
  font-size: 13px;
}

.platform-rail-link span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.platform-rail-latest {
  display: grid;
  gap: 6px;
}

.platform-rail-latest a {
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.25;
}

.sir-learner-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sir-learner-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rail-avatar {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.rail-auth-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.rail-auth-profile strong,
.rail-auth-profile span {
  display: block;
}

.rail-auth-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.rail-auth-actions button {
  flex: 0 0 auto;
}

.recommended-courses {
  display: grid;
  grid-template-columns: minmax(120px, .28fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  background: #fff;
}

.recommended-courses span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.recommended-courses strong {
  display: block;
  font-size: 18px;
}

.recommended-course-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.recommended-course-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  min-width: 0;
}

.recommended-course-card .course-thumb-fallback,
.recommended-course-card .course-thumb-media {
  grid-row: 1 / span 2;
  width: 56px;
  height: 56px;
  min-height: 56px;
}

.recommended-course-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.recommended-course-copy small,
.recommended-course-copy span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.recommended-course-copy strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recommended-course-card .course-card-actions {
  grid-column: 2;
  display: flex;
  gap: 6px;
}

.recommended-course-card .course-card-actions button {
  width: auto;
}

.course-payment-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #f8fbff;
}

@media (max-width: 760px) {
  .community-grid,
  .profile-community-grid,
  .recommended-courses {
    grid-template-columns: 1fr;
  }

  .recommended-course-grid {
    grid-template-columns: 1fr;
  }

  .course-library-shell {
    grid-template-columns: 1fr;
  }

  .community-question-compose,
  .community-compose {
    grid-template-columns: 1fr;
  }
}

@keyframes quizAttentionPulse {
  0% { transform: translateY(0); }
  35% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.coin-burst {
  position: fixed;
  right: 72px;
  top: 86px;
  z-index: 9999;
  pointer-events: none;
}

.coin-burst span {
  position: absolute;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #fff8c7, #facc15 55%, #d97706);
  color: #7c2d12;
  font-size: 10px;
  font-weight: 1000;
  box-shadow: 0 10px 24px rgba(217, 119, 6, .28);
  animation: coinPop 950ms ease-out var(--coin-delay, 0ms) forwards;
}

@keyframes coinPop {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(.55) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--coin-x), var(--coin-y)) scale(1.15) rotate(360deg);
  }
}

.media-preview-modal.how-preview-mode .media-preview-step-footer {
  order: 1;
  border-bottom: 1px solid #dbeafe;
  border-top: 0;
}

.media-preview-modal.how-preview-mode .media-preview-step-media {
  order: 2;
}

.media-preview-modal.how-preview-mode .media-preview-step-flow {
  order: 3;
  border-top: 1px solid #dbeafe;
  border-bottom: 0;
}

@media (max-width: 980px) {
  .course-active-mode .lesson-intro-visual-row {
    grid-template-columns: 1fr !important;
  }

  .lesson-complete-bar,
  .lesson-bottom-actions,
  .lesson-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .lesson-bottom-actions > span {
    margin-right: 0;
  }

  .lesson-complete-btn,
  .lesson-next-btn {
    width: 100%;
  }

  .lesson-progress-actions,
  .lesson-help-actions {
    width: 100%;
  }
}

.ccm-how-media-thumb,
.ccm-inline-media-thumb {
  width: 150px;
  min-width: 150px;
  height: 160px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ccm-how-media-thumb img,
.ccm-inline-media-thumb img,
.ccm-how-media-thumb video,
.ccm-inline-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ccm-how-media-thumb audio,
.ccm-inline-media-thumb audio {
  width: 130px;
}

.ccm-media-thumb-empty {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
}

.ccm-how-media-placeholder {
  color: #94a3b8;
  display: grid;
  gap: 6px;
  place-items: center;
}

.ccm-how-media-placeholder b {
  font-size: 24px;
}

.lesson-explanation-panel {
  display: grid;
  gap: 8px;
}

.lesson-explanation-panel > span,
.practice-exercise-note {
  color: #2563eb;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.practice-exercise-note {
  margin: 6px 0 10px;
}

.practice-fill-input,
.match-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
  color: #0f172a;
  font-weight: 800;
}

.match-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  gap: 10px;
  align-items: center;
}

.match-row > span {
  color: #0f172a;
  font-weight: 900;
}

.game-exercise-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.game-exercise-grid span {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 900;
}

.ccm-how-toolbar,
.ccm-how-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.ccm-quiz-match-row,
.ccm-quiz-game-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important;
}

.how-to-tabs {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dbeafe;
}

.how-to-tab {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
}

.how-to-tab.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

.sir-rail-highlights {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.sir-rail-highlight {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.sir-rail-highlight strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sir-rail-highlight small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.sir-rail-highlight.done {
  border-color: rgba(22, 163, 74, 0.32);
  background: #f0fdf4;
}

.course-advanced-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) repeat(5, minmax(132px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.course-advanced-filters input,
.course-advanced-filters select {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.course-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.course-meta-chips span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
}

@media (max-width: 920px) {
  .course-advanced-filters {
    grid-template-columns: 1fr 1fr;
  }
}

.lesson-learner-tools {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.lesson-tool-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.lesson-tool-head span {
  color: #64748b;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.lesson-tool-head strong {
  color: #0f172a;
}

.lesson-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-tool-actions button,
.lesson-note-box button {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 7px 10px;
  font-weight: 900;
}

.lesson-tool-actions button.active {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.lesson-note-box {
  display: grid;
  gap: 7px;
}

.lesson-note-box span {
  color: #334155;
  font-weight: 900;
}

.lesson-note-box textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

.lesson-note-compose-actions,
.lesson-note-list article > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.lesson-note-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.lesson-note-list article {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe5f1;
  border-radius: 9px;
  background: #fff;
}

.lesson-note-list p {
  margin: 0;
  color: #334155;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lesson-note-list small {
  margin-right: auto;
  color: #64748b;
}

.lesson-note-list button,
.lesson-note-compose-actions button {
  min-height: 30px;
  padding: 5px 8px;
}

.lesson-note-list button.danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.lesson-note-empty {
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
}

.lesson-reminder-chip {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.lesson-worksheet-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-worksheet-links a,
.lesson-worksheet-links span {
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.course-preview-media {
  margin-bottom: 14px;
}

/* Learner notification center */
.learner-notification-bell{position:relative;display:grid;place-items:center;width:42px;height:42px;min-width:42px;padding:0;border:1px solid #d4e2f5;border-radius:50%;background:#fff;color:#183457;font-size:18px;cursor:pointer;box-shadow:0 8px 22px rgba(24,52,87,.08)}
.learner-notification-bell b{position:absolute;right:-4px;top:-5px;display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border:2px solid #fff;border-radius:12px;background:#1769ee;color:#fff;font-size:10px;line-height:1}
.learner-notification-center{position:fixed;inset:0;z-index:10030;display:none}
.learner-notification-center.show{display:block}
.learner-notification-backdrop{position:absolute;inset:0;background:rgba(11,28,52,.38);backdrop-filter:blur(3px)}
.learner-notification-card{position:absolute;top:72px;right:18px;width:min(410px,calc(100vw - 28px));max-height:calc(100vh - 92px);overflow:hidden;display:flex;flex-direction:column;border:1px solid #d8e5f4;border-radius:24px;background:#fff;box-shadow:0 24px 70px rgba(15,41,75,.24)}
.learner-notification-card>header{display:flex;align-items:center;justify-content:space-between;padding:20px 20px 14px;border-bottom:1px solid #e5edf7}
.learner-notification-card>header div{display:grid;gap:2px}.learner-notification-card>header small{color:#657994;font-size:10px;font-weight:900;letter-spacing:.12em}.learner-notification-card>header strong{font-size:22px;color:#142b49}.learner-notification-card>header button{width:34px;height:34px;border:0;border-radius:50%;background:#eef4fb;color:#183457;font-size:22px;cursor:pointer}
.learner-notification-subscribe{margin:14px 14px 4px;padding:13px;display:flex;align-items:center;gap:12px;border:1px solid #bfe6d0;border-radius:16px;background:linear-gradient(135deg,#edfff4,#f3f9ff)}
.learner-notification-subscribe span{display:grid;gap:3px;flex:1}.learner-notification-subscribe b{color:#133b2b;font-size:13px}.learner-notification-subscribe small{color:#5c718a;font-size:11px;line-height:1.35}.learner-notification-subscribe button{border:0;border-radius:999px;padding:9px 13px;background:#14a95b;color:#fff;font-weight:800;cursor:pointer}.learner-notification-subscribe.subscribed{background:#f4fbf7}.learner-notification-subscribe.subscribed button{background:#dff3e8;color:#14743f}
.learner-notification-list{padding:10px 14px 16px;overflow:auto;display:grid;gap:9px}
.learner-notification-list article{display:flex;gap:12px;padding:13px;border:1px solid #e1eaf5;border-radius:16px;background:#fff}.learner-notification-list article.unread{border-color:#a9cbff;background:#f2f7ff}.learner-notification-list article>i{display:grid;place-items:center;width:38px;height:38px;min-width:38px;border-radius:12px;background:#eaf2ff;font-style:normal}.learner-notification-list article div{display:grid;gap:4px}.learner-notification-list article strong{color:#183457;font-size:13px}.learner-notification-list article p{margin:0;color:#536982;font-size:12px;line-height:1.45}.learner-notification-list article time{color:#8998aa;font-size:10px}
.learner-notification-empty{padding:38px 14px;text-align:center;display:grid;place-items:center;gap:7px;color:#61748b}.learner-notification-empty span{font-size:30px}.learner-notification-empty strong{color:#183457}
.learner-push-offer{position:fixed;right:18px;bottom:22px;z-index:10020;display:flex;align-items:center;gap:11px;width:min(450px,calc(100vw - 28px));padding:13px;border:1px solid #b9d3fa;border-radius:18px;background:#fff;box-shadow:0 18px 55px rgba(17,47,86,.22)}
.learner-push-offer>span{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#eaf2ff}.learner-push-offer>div{display:grid;gap:2px;flex:1}.learner-push-offer strong{font-size:13px;color:#173354}.learner-push-offer small{font-size:11px;color:#637890}.learner-push-offer button{border:0;border-radius:999px;padding:9px 13px;background:#1769ee;color:#fff;font-weight:800;cursor:pointer}.learner-push-offer button.dismiss{padding:0;width:28px;height:28px;background:#edf3fa;color:#52677f;font-size:18px}
.learner-push-status:empty{display:none}.learner-push-status{display:block!important;color:#166534!important;font-weight:750}.learner-push-status.error{color:#b91c1c!important}.learner-push-offer .learner-push-status{max-width:230px;overflow-wrap:anywhere}
@media(max-width:600px){.learner-notification-bell{width:34px;height:34px;min-width:34px;font-size:15px}.learner-notification-card{top:8px;right:7px;max-height:calc(100vh - 16px);border-radius:20px}.learner-push-offer{left:10px;right:10px;bottom:74px;width:auto}.learner-push-offer>span{display:none}.learner-push-offer strong{font-size:12px}.learner-push-offer small{font-size:10px}}

.course-preview-media .course-thumb-media,
.course-preview-media .course-thumb-fallback {
  width: 100%;
  min-height: 180px;
  border-radius: 22px;
  overflow: hidden;
}

.course-preview-media .course-thumb-media img,
.course-preview-media .course-thumb-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-dashboard-head + .modern-hero-grid .youtube-play,
.course-dashboard-head + .modern-hero-grid .course-thumb-label,
.modern-course-card .youtube-play,
.modern-course-card .course-thumb-label,
.recommended-course-card .youtube-play,
.recommended-course-card .course-thumb-label {
  display: none !important;
}

#learnerToolsRailPanel {
  margin-top: 14px;
}

#learnerToolsRailPanel .learner-tools-panel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 12px;
}

#learnerToolsRailPanel .learner-tools-head {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

#learnerToolsRailPanel .learner-tools-head span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  font-weight: 900;
}

#learnerToolsRailPanel .learner-tools-head strong {
  font-size: 13px;
  color: #0f172a;
}

#learnerToolsRailPanel .course-tools-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

#learnerToolsRailPanel .course-tools-panel > summary {
  display: none;
}

#learnerToolsRailPanel .course-tools-grid {
  display: grid;
  gap: 10px;
}

#learnerToolsRailPanel .course-tool-card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
  padding: 10px;
}

.mobile-course-tools-tab,
.mobile-course-tools-drawer {
  display: none;
}

@media (max-width: 780px) {
  #learnerToolsRailPanel {
    display: none !important;
  }

  .mobile-course-tools-tab {
    display: flex;
    position: fixed;
    left: 0;
    top: 48%;
    z-index: 9000;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    border: 0;
    border-radius: 0 14px 14px 0;
    padding: 14px 7px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32);
  }

  .mobile-course-tools-tab span {
    transform: rotate(180deg);
  }

  .mobile-course-tools-drawer {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 360px);
    z-index: 9010;
    background: #ffffff;
    box-shadow: 22px 0 60px rgba(15, 23, 42, 0.22);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overflow-y: auto;
    padding: 18px;
  }

  body.mobile-course-tools-open .mobile-course-tools-drawer {
    transform: translateX(0);
  }

  .mobile-course-tools-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  }

  .mobile-course-tools-head span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
    font-weight: 900;
  }

  .mobile-course-tools-head strong {
    display: block;
    margin-top: 3px;
    font-size: 15px;
    color: #0f172a;
  }

  .mobile-course-tools-head button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
  }

  .mobile-course-tools-body .course-tools-panel {
    border: 0;
    padding: 0;
    background: transparent;
  }

  .mobile-course-tools-body .course-tools-panel > summary {
    display: none;
  }

  .mobile-course-tools-body .course-tools-grid {
    display: grid;
    gap: 12px;
  }

  .mobile-course-tools-body .course-tool-card {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #f8fafc;
    padding: 12px;
  }
}

/* Final marketplace cascade overrides. */
.discovery-hero-media{display:grid!important;place-items:center!important;min-height:360px!important;padding:18px!important;background:#0f172a}
.discovery-hero-media>.course-thumb-media,.discovery-hero-media>.inline-course-player,.discovery-hero-media>.course-thumb-fallback{width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:16/9;border-radius:12px!important;overflow:hidden}
.discovery-hero-media .course-thumb-media img,.discovery-hero-media .course-thumb-media video,.discovery-hero-media .inline-course-player iframe,.discovery-hero-media .inline-course-player video{width:100%!important;height:100%!important;min-height:0!important;object-fit:contain!important}
.discovery-hero-dots{bottom:12px!important;gap:6px!important;align-items:center!important;padding:7px 10px!important;border:1px solid rgba(255,255,255,.72)!important;border-radius:999px!important;background:rgba(15,23,42,.7)!important;box-shadow:0 8px 24px rgba(15,23,42,.22)!important;backdrop-filter:blur(10px)}
.discovery-hero-dots button{appearance:none!important;flex:0 0 auto!important;width:8px!important;min-width:8px!important;height:8px!important;min-height:8px!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:rgba(255,255,255,.55)!important;box-shadow:none!important;font-size:0!important}
.discovery-hero-dots button.active{width:24px!important;min-width:24px!important;border-radius:999px!important;background:#a78bfa!important}
.discovery-interest{grid-template-columns:minmax(200px,.52fr) minmax(0,1.48fr)!important;gap:18px!important;padding:16px 18px!important;border-radius:14px!important}
.discovery-interest h2{font-size:clamp(21px,2.4vw,28px)!important}.discovery-interest p{font-size:13px!important;line-height:1.35!important}.discovery-interest-chips{gap:7px!important}.discovery-interest-chips button{min-height:34px!important;padding:7px 11px!important;font-size:12px!important}
.course-details-panel,.course-details-panel.show{pointer-events:none!important;background:transparent!important;backdrop-filter:none!important}.course-details-panel.show{display:block!important}
.course-details-drawer{pointer-events:auto!important;right:auto!important;height:auto!important;max-height:calc(100vh - 24px)!important;border:1px solid #d9e2ef!important;border-radius:16px!important;box-shadow:0 24px 70px rgba(15,23,42,.24)!important;animation-name:courseDetailsPopoverIn!important;overscroll-behavior:contain!important}
.course-detail-media{border-radius:16px 16px 0 0}.course-detail-actions{border-radius:0 0 16px 16px}body.course-details-open{overflow:hidden!important;overscroll-behavior:none!important}
@media(min-width:901px){.course-filter-toolbar{display:grid!important;grid-template-columns:minmax(220px,1.35fr) minmax(0,3.65fr)!important;gap:8px!important;align-items:center!important;padding:8px!important}.course-filter-details{min-width:0!important}.course-filter-details[open] .course-advanced-filters,.course-advanced-filters{display:grid!important;grid-template-columns:repeat(5,minmax(105px,1fr))!important;gap:7px!important;padding:0!important;overflow:visible!important}.course-filter-search{min-height:40px!important}.course-advanced-filters select{min-height:40px!important}}
@media(max-width:900px){.discovery-hero-media{min-height:0!important;padding:10px!important}.discovery-interest{grid-template-columns:1fr!important;gap:10px!important}.discovery-interest-chips{flex-wrap:nowrap!important;overflow-x:auto!important;padding-bottom:3px}.discovery-interest-chips button{flex:0 0 auto!important}}
@media(max-width:640px){.course-details-panel.show{pointer-events:auto!important;background:rgba(15,23,42,.34)!important;backdrop-filter:blur(2px)!important}.course-details-drawer{position:absolute!important;top:auto!important;right:0!important;bottom:0!important;left:0!important;width:100%!important;max-height:86vh!important;border:0!important;border-radius:20px 20px 0 0!important;animation-name:courseDetailsUp!important}}

.course-fixed-tools-panel {
  position: static;
  width: 100%;
  max-height: none;
  overflow: visible;
  z-index: auto;
}

.course-fixed-tools-panel .learner-tools-panel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
  padding: 14px;
}

.course-fixed-tools-panel .learner-tools-head {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.course-fixed-tools-panel .learner-tools-head span,
.mobile-course-tools-head span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #64748b;
  font-weight: 900;
}

.course-fixed-tools-panel .learner-tools-head strong,
.mobile-course-tools-head strong {
  color: #0f172a;
  font-size: 14px;
}

.course-fixed-tools-panel .course-tools-panel,
.mobile-course-tools-body .course-tools-panel {
  border: 0;
  background: transparent;
  padding: 0;
}

.course-fixed-tools-panel .course-tools-panel > summary,
.mobile-course-tools-body .course-tools-panel > summary {
  display: none;
}

.course-tools-empty {
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
}

.course-tools-empty strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.course-tools-empty p {
  margin: 5px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.course-fixed-tools-panel .course-tools-grid,
.mobile-course-tools-body .course-tools-grid {
  display: grid;
  gap: 10px;
}

.course-fixed-tools-panel .course-tool-card,
.mobile-course-tools-body .course-tool-card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #f8fafc;
  padding: 10px;
}

.mobile-course-tools-tab,
.mobile-course-tools-drawer {
  display: none;
}

@media (min-width: 901px) {
  body.course-active-mode .mobile-course-tools-tab,
  body.course-active-mode .mobile-course-tools-drawer {
    display: none !important;
  }

  body.course-active-mode .desktop-step-header {
    display: none !important;
  }

  body.course-active-mode .sir-learning-shell {
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr) minmax(230px, 270px) !important;
    align-items: start !important;
  }

  body.course-active-mode .sir-left-rail {
    display: grid !important;
    gap: 12px !important;
    position: sticky !important;
    top: 82px !important;
    max-height: calc(100dvh - 96px) !important;
    overflow: auto !important;
  }

  body.course-active-mode .sir-rail-section-title,
  body.course-active-mode .sir-rail-steps,
  body.course-active-mode #learnerToolsRailPanel {
    display: grid !important;
  }

  body.course-active-mode .sir-right-rail {
    display: grid !important;
    position: sticky !important;
    top: 82px !important;
    max-height: calc(100dvh - 96px) !important;
    overflow: auto !important;
  }

  body.course-active-mode .lesson-chip-nav {
    display: block !important;
  }

  body.course-active-mode .lesson-chip-nav .focus-list {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(150px, max-content) !important;
    overflow-x: auto !important;
  }
}

/* The lesson quiz is an overlay dialog, never part of document flow. */
body .lesson-quiz-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10050 !important;
  display: none !important;
  place-items: center !important;
  padding: 20px !important;
}

body .lesson-quiz-modal.show { display: grid !important; }
body .lesson-quiz-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.62) !important;
  backdrop-filter: blur(3px);
}
body .lesson-quiz-modal-card {
  position: relative !important;
  width: min(900px, calc(100vw - 32px)) !important;
  max-height: min(88vh, 820px) !important;
  overflow: auto !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34) !important;
}
body.lesson-quiz-open { overflow: hidden !important; }

/* Restored lesson navigation: one compact row with the original green cue. */
body.course-active-mode .lesson-chip-nav {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 38px !important;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 9px !important;
  border: 1px solid rgba(22, 163, 74, 0.28) !important;
  border-left: 4px solid #16a34a !important;
  border-radius: 16px !important;
  background: linear-gradient(90deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.98)) !important;
  overflow: hidden !important;
}
body.course-active-mode .lesson-chip-nav .focus-list {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 2px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity !important;
}
body.course-active-mode .lesson-chip-nav .focus-item {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 220px !important;
  border-color: rgba(22, 163, 74, 0.22) !important;
  scroll-snap-align: start !important;
}
body.course-active-mode .lesson-chip-nav .focus-item.active {
  color: #166534 !important;
  border-color: #22c55e !important;
  background: #dcfce7 !important;
  box-shadow: inset 0 -3px 0 #16a34a !important;
}

/* Rails remain contained and visually reach the bottom of the viewport. */
@media (min-width: 901px) {
  body.course-active-mode .sir-left-rail,
  body.course-active-mode .sir-right-rail {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: calc(100dvh - 96px) !important;
    max-height: calc(100dvh - 96px) !important;
    align-content: start !important;
    padding: 0 6px 18px 0 !important;
  }
  body.course-active-mode .sir-left-rail > *,
  body.course-active-mode .sir-right-rail > * {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }
}

/* Dashboard rails show global learner context; course rails show course context. */
body.course-launcher-mode .sir-course-side-card,
body.course-launcher-mode .sir-right-rail section:has(#sirRightCourseProgress) { display: none !important; }
body.course-active-mode .sir-rail-brand-card .sir-learner-status,
body.course-active-mode .sir-auth-rail-card,
body.course-active-mode .sir-streak-card,
body.course-active-mode .sir-right-rail section:has(#sirTodayGoalText),
body.course-active-mode .sir-right-rail section:has(#sirWeeklyBars) { display: none !important; }

/* Stable two-panel lesson intro, including a placeholder when media is absent. */
body.course-active-mode .lesson-intro-visual-row {
  display: grid !important;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr) !important;
  gap: 0 !important;
  min-height: 250px !important;
  overflow: hidden !important;
  border: 1px solid #dbeafe !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
}
body.course-active-mode .lesson-media-placeholder {
  display: grid !important;
  place-content: center !important;
  justify-items: center !important;
  gap: 7px !important;
  min-height: 250px !important;
  padding: 24px !important;
  text-align: center !important;
  color: #166534 !important;
  background: linear-gradient(145deg, #dcfce7, #eff6ff) !important;
  border-right: 1px solid #dbeafe !important;
}
body.course-active-mode .lesson-media-placeholder > span {
  display: grid; place-items: center; width: 54px; height: 54px;
  border-radius: 50%; background: #16a34a; color: #fff; font-size: 20px;
}
body.course-active-mode .lesson-media-placeholder small { color: #64748b; }
body.course-active-mode .lesson-explanation-panel { min-width: 0 !important; }

@media (max-width: 900px) {
  body.course-active-mode .lesson-chip-nav { display: grid !important; margin: 8px 0 12px !important; }
  body.course-active-mode .lesson-chip-nav .focus-list { display: flex !important; }
  body.course-active-mode .lesson-intro-visual-row {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }
  body.course-active-mode .lesson-media-placeholder { min-height: 170px !important; border-right: 0 !important; border-bottom: 1px solid #dbeafe !important; }
}

@media (max-width: 680px) {
  /* Consolidate mobile controls into the footer; no overlapping edge tabs. */
  body.course-active-mode #courseCompletionFab,
  body.course-active-mode .responsive-right-toggle,
  body.course-active-mode #mobileCourseToolsTab,
  body.course-active-mode > .chat-fab { display: none !important; }

  body.course-active-mode .mobile-app-footer {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 3px !important;
    padding: 6px 5px 8px !important;
  }
  body.course-active-mode .mobile-app-footer > button {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 3px 1px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #334155 !important;
    box-shadow: none !important;
  }
  body.course-active-mode .mobile-foot-extra {
    display: grid !important;
    grid-template-rows: 22px 12px !important;
    place-items: center !important;
    font-weight: 900 !important;
  }
  body.course-active-mode .mobile-foot-extra span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: 15px; }
  body.course-active-mode .mobile-foot-extra small { font-size: 8px; line-height: 1; }
  body.course-active-mode .mobile-foot-btn { display: grid !important; place-items: center !important; }
  body.course-active-mode .mobile-foot-btn .mobile-foot-text { display: none !important; }
  body.course-active-mode .mobile-foot-btn .mobile-foot-arrow { display: block !important; font-size: 24px !important; line-height: 1 !important; }
  body.course-active-mode .mobile-foot-main { display: grid !important; grid-template-rows: 21px 12px !important; place-items: center !important; }
  body.course-active-mode .mobile-foot-main-icon { display: grid !important; place-items: center !important; width: 24px !important; height: 24px !important; border-radius: 8px !important; font-size: 0 !important; }
  body.course-active-mode .mobile-foot-main-icon::after { content: "☰"; font-size: 15px; color: #fff; }
  body.course-active-mode .mobile-foot-main strong { font-size: 8px !important; line-height: 1 !important; }
}

/* Final dashboard isolation after all rail/mobile rules. */
body.course-launcher-mode #learnerToolsRailPanel,
body.course-launcher-mode #lessonSideToolsPanel,
body.course-launcher-mode .lesson-take-quiz-btn,
body.course-launcher-mode #mobileCourseToolsTab,
body.course-launcher-mode #mobileCourseToolsDrawer {
  display: none !important;
  visibility: hidden !important;
}

body.course-launcher-mode #learnerToolsRailPanel,
body.course-launcher-mode #lessonSideToolsPanel,
body.course-launcher-mode .lesson-take-quiz-btn { display: none !important; }

#sirAdRightOne,
#sirAdRightTwo {
  position: relative;
  padding-top: 24px !important;
  border: 1px dashed #94a3b8 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}
#sirAdRightOne::before,
#sirAdRightTwo::before {
  content: "Sponsored";
  position: absolute;
  top: 7px;
  left: 10px;
  color: #64748b;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sir-rail-highlight { grid-template-columns: 24px minmax(0,1fr) !important; align-items: center !important; }
.sir-highlight-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: #dcfce7; color: #166534; }

.lesson-how-primary { overflow: hidden; border-radius: 16px; background: #f8fafc; }
.lesson-how-primary img { display: block; width: 100%; height: 100%; min-height: 220px; max-height: 420px; object-fit: contain; background: #f8fafc; }
.how-flow-image img { display: block !important; width: 100% !important; height: 100% !important; object-fit: contain !important; opacity: 1 !important; visibility: visible !important; }

@media (max-width: 680px) {
  body.course-active-mode .mobile-foot-prev,
  body.course-active-mode .mobile-foot-next,
  body.course-active-mode .mobile-foot-main { position: relative !important; overflow: visible !important; }
  body.course-active-mode .mobile-foot-prev::before,
  body.course-active-mode .mobile-foot-next::before {
    content: attr(data-nav-label);
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 22px;
    max-width: 52px;
    padding: 1px 3px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 7px;
    font-weight: 1000;
    line-height: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.course-active-mode .mobile-foot-prev::after,
  body.course-active-mode .mobile-foot-next::after { margin-top: 9px; }
  body.course-active-mode .mobile-foot-main-icon::after { content: attr(data-step-number) !important; }
  body.course-active-mode #mobileStepsBtn::before {
    content: "Step";
    position: absolute;
    top: 1px;
    color: #1d4ed8;
    font-size: 7px;
    font-weight: 1000;
  }
}

/* Final mobile polish. */
@media (max-width: 680px) {
  .sir-app-loader-card { width: min(280px, 84vw) !important; gap: 9px !important; padding: 20px !important; border-radius: 18px !important; }
  .sir-app-loader-logo { width: 58px !important; height: 58px !important; border-radius: 16px !important; }
  .sir-app-loader-logo img { width: 42px !important; height: 42px !important; }
  .sir-app-loader-card > strong { font-size: 16px !important; }
  .sir-app-loader-card > span,
  .sir-loader-quotes { display: none !important; }

  body.course-active-mode .mobile-foot-prev,
  body.course-active-mode .mobile-foot-next { font-size: 0 !important; }
  body.course-active-mode .mobile-foot-prev > *,
  body.course-active-mode .mobile-foot-next > * { display: none !important; }
  body.course-active-mode .mobile-foot-prev::after { content: "‹"; display: block; font-size: 26px; line-height: 1; color: #1d4ed8; }
  body.course-active-mode .mobile-foot-next::after { content: "›"; display: block; font-size: 26px; line-height: 1; color: #1d4ed8; }

  body.course-active-mode .mobile-step-peek { display: none !important; }
  body.course-active-mode .sir-modern-main { padding-bottom: 68px !important; }
  body.course-active-mode .site-credit { margin-top: 10px !important; margin-bottom: 10px !important; }
  #sirAdBottom { min-height: 0 !important; height: auto !important; max-height: 190px !important; overflow: hidden !important; }

  .lesson-quick-tools { gap: 4px !important; margin-bottom: 4px !important; }
  .lesson-quick-tools button { width: 25px !important; height: 25px !important; border-radius: 8px !important; padding: 0 !important; font-size: 11px !important; box-shadow: none !important; }
  .lesson-quick-tools button.active { border-color: #22c55e !important; background: #dcfce7 !important; box-shadow: 0 0 0 2px rgba(34,197,94,.12) !important; }
}

/* Sponsored placements should read as ads, not lesson cards. */
#sirAdBottom {
  position: relative;
  width: min(970px, calc(100% - 24px)) !important;
  margin: 24px auto !important;
  padding: 22px 16px 14px !important;
  border: 1px dashed #94a3b8 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  opacity: .92;
}
#sirAdBottom::before {
  content: "Sponsored";
  position: absolute;
  top: 6px;
  left: 12px;
  color: #64748b;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#sirAdBottom > * { transform: scale(.92); transform-origin: center; }

@media (max-width: 680px) {
  /* Course footer order: utilities, then Previous - Steps - Next centered. */
  body.course-active-mode .mobile-app-footer { grid-template-columns: repeat(7, minmax(0,1fr)) !important; }
  body.course-active-mode .mobile-foot-home { order: 1; }
  body.course-active-mode .mobile-foot-tools { order: 2; }
  body.course-active-mode .mobile-foot-prev { order: 3; }
  body.course-active-mode .mobile-foot-main { order: 4; }
  body.course-active-mode .mobile-foot-next { order: 5; }
  body.course-active-mode .mobile-foot-progress { order: 6; }
  body.course-active-mode .mobile-foot-help { order: 7; }
  body.course-active-mode .dashboard-foot { display: none !important; }

  /* Dashboard footer has dashboard destinations only. */
  body.course-launcher-mode .mobile-app-footer {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0,1fr)) !important;
    gap: 5px !important;
    padding: 6px 8px 8px !important;
  }
  body.course-launcher-mode .mobile-foot-prev,
  body.course-launcher-mode .mobile-foot-next,
  body.course-launcher-mode .mobile-foot-main,
  body.course-launcher-mode .mobile-foot-tools,
  body.course-launcher-mode .mobile-foot-progress { display: none !important; }
  body.course-launcher-mode .mobile-foot-home,
  body.course-launcher-mode .dashboard-foot,
  body.course-launcher-mode .mobile-foot-help { display: grid !important; }

  /* Final override: footer owns these actions on mobile. */
  body.course-active-mode #courseCompletionFab,
  body.course-active-mode #responsiveRightRailToggle,
  body.course-active-mode #mobileCourseToolsTab,
  body.course-active-mode > button.chat-fab {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  #sirAdBottom {
    width: calc(100% - 20px) !important;
    margin: 20px auto !important;
    padding: 20px 10px 10px !important;
    border-radius: 10px !important;
  }
  #sirAdBottom > * { transform: scale(.84); }
}

/* Desktop checklist uses the same compact readable rows as the drawer. */
body.course-active-mode .lesson-checklist {
  box-sizing: border-box !important;
  display: grid !important;
  align-self: start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  gap: 7px !important;
  padding: 9px !important;
  overflow: visible !important;
}
body.course-active-mode .lesson-checklist label {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 8px !important;
  border-radius: 8px !important;
  background: #fff !important;
  text-align: left !important;
}
body.course-active-mode .lesson-checklist input { width: 16px !important; height: 16px !important; margin: 1px 0 0 !important; }
body.course-active-mode .lesson-checklist label span { display: block !important; min-width: 0 !important; font-size: 11px !important; line-height: 1.35 !important; overflow-wrap: anywhere !important; }

/* Remove the final desktop body/card wrapper around lesson internals. */
body.course-active-mode .screen > .wrap,
body.course-active-mode .screen > .wrap > .card,
body.course-active-mode .screen > .wrap > .card > .body {
  padding-left: 0 !important;
  padding-right: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.lesson-quick-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
}
.lesson-quick-tools button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15,23,42,.07);
}

@media (max-width: 900px) {
  body.course-active-mode #courseCompletionFab {
    top: 42% !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 46px !important;
    font-size: 10px !important;
    border-radius: 11px 0 0 11px !important;
  }
  body.course-active-mode .responsive-right-toggle {
    top: 53% !important;
    width: 34px !important;
    height: 46px !important;
    border-radius: 11px 0 0 11px !important;
  }
  body.course-active-mode .responsive-right-toggle::after { font-size: 15px !important; }
  .lesson-quick-tools { padding-right: 36px; }
  .lesson-quick-tools button { width: 32px; height: 32px; font-size: 14px; }
}

/* Minimal lesson navigation: retain scrolling/arrows without nested boxes. */
body.course-active-mode .lesson-chip-nav {
  padding: 2px 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
body.course-active-mode .lesson-chip-nav .focus-list {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Readable lesson copy without the redundant heading label. */
body.course-active-mode .lesson-explanation-panel {
  display: flex !important;
  align-items: center !important;
  padding: clamp(18px, 3vw, 32px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}
body.course-active-mode .lesson-explanation-panel > span { display: none !important; }
body.course-active-mode .lesson-explanation-panel .lesson-rich-text {
  width: min(100%, 76ch) !important;
  margin: 0 auto !important;
  color: #26364d !important;
  font-size: clamp(16px, 1.45vw, 18px) !important;
  line-height: 1.75 !important;
  letter-spacing: .002em !important;
}

/* Missing media is only a small visual cue, not a fake media panel. */
body.course-active-mode .lesson-media-placeholder {
  min-height: 76px !important;
  height: 76px !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
body.course-active-mode .lesson-media-placeholder > span {
  width: 46px !important;
  height: 46px !important;
  font-size: 16px !important;
  box-shadow: 0 8px 24px rgba(22,163,74,.18);
}
body.course-active-mode .lesson-intro-visual-row:has(.lesson-media-placeholder) {
  display: block !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #fff !important;
}
body.course-active-mode .lesson-intro-visual-row:has(.lesson-media-placeholder) .lesson-explanation-panel {
  padding-top: 12px !important;
}

/* One-question quiz flow and accurate matching connectors. */
.lesson-quiz-modal-body .lesson-quiz-head { display: none !important; }
.lesson-quiz-modal-body [data-quiz-question] { display: none !important; }
.lesson-quiz-modal-body [data-quiz-question].quiz-active { display: block !important; animation: quizQuestionIn .22s ease; }
.lesson-quiz-modal-body .lesson-quiz-card > .actions,
.lesson-quiz-modal-body .lesson-quiz-card > .quiz-result { display: none !important; }
.match-card-game { isolation: isolate; }
.match-card-column { position: relative; z-index: 2; }
.match-lines-svg { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.match-lines-svg line { stroke: #16a34a; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(22,163,74,.25)); }
.match-left.connected::after { display: none !important; }
.lesson-quiz-sequence-result { display: grid; justify-items: center; gap: 10px; margin: 18px 0 4px; padding: 24px; border-radius: 18px; text-align: center; }
.lesson-quiz-sequence-result.ready { background: linear-gradient(145deg,#dcfce7,#eff6ff); color: #166534; }
.lesson-quiz-sequence-result.needs-review { background: linear-gradient(145deg,#fff7ed,#fef2f2); color: #9a3412; }
.lesson-quiz-sequence-result span { font-size: 12px; font-weight: 1000; text-transform: uppercase; letter-spacing: .08em; }
.lesson-quiz-sequence-result strong { font-size: 22px; }
.lesson-quiz-sequence-result p { margin: 0; }
.lesson-quiz-sequence-result button { border: 0; border-radius: 10px; padding: 10px 16px; background: #2563eb; color: #fff; font-weight: 900; }
.quiz-question-head strong { display: block !important; flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; }
@keyframes quizQuestionIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* Keep the four lesson actions in one row through tablet widths. */
@media (max-width: 1020px) {
  body.course-active-mode .lesson-more-actions.lesson-action-row {
    display: flex !important; flex-flow: row nowrap !important; justify-content: center !important; align-items: center !important; gap: 7px !important; overflow-x: auto !important;
  }
  body.course-active-mode .lesson-more-actions .lesson-help-actions,
  body.course-active-mode .lesson-more-actions .lesson-progress-actions {
    display: flex !important; flex-flow: row nowrap !important; flex: 0 0 auto !important; width: auto !important; gap: 7px !important;
  }
  body.course-active-mode .lesson-more-actions button { flex: 0 0 auto !important; width: auto !important; min-width: 42px !important; white-space: nowrap !important; }

  /* Remove the redundant card/body shell that was squeezing lesson content. */
  body.course-active-mode .screen > .wrap { padding-left: 0 !important; padding-right: 0 !important; }
  body.course-active-mode .screen > .wrap > .card { border: 0 !important; box-shadow: none !important; background: transparent !important; }
  body.course-active-mode .screen > .wrap > .card > .body { padding-left: 0 !important; padding-right: 0 !important; background: transparent !important; }
}

/* Progress remains available as a right-side drawer button on phones. */
@media (max-width: 900px) {
  body.course-active-mode .responsive-right-toggle { display: block !important; right: 8px; bottom: 82px; font-size: 0; width: 42px; height: 42px; padding: 0; }
  body.course-active-mode .responsive-right-toggle::after { content: "↗"; font-size: 18px; }
  body.course-active-mode.show-right-rail .sir-right-rail {
    display: grid !important; position: fixed !important; right: 8px; top: 62px; bottom: 72px; width: min(320px, 88vw) !important; height: auto !important; max-height: none !important; z-index: 8985; overflow: auto !important; padding: 12px !important; border-radius: 18px; background: #eefbf6; box-shadow: 0 20px 60px rgba(15,23,42,.28);
  }
}

/* Course mode contains only course-specific rail content. */
body.course-active-mode #platformRailPanel,
body.course-active-mode #learnerAccountRailPanel,
body.course-active-mode .sir-course-side-card { display: none !important; }

/* The step header duplicates the left course-step rail on desktop. */
@media (min-width: 901px) {
  body.course-active-mode .screen > .wrap > .card > .head { display: none !important; }
}

/* Compact lesson row: same visual weight as course steps. */
body.course-active-mode .lesson-chip-nav {
  min-height: 48px !important;
  padding: 5px 7px !important;
  border-radius: 12px !important;
}
body.course-active-mode .lesson-chip-nav .focus-list { gap: 5px !important; }
body.course-active-mode .lesson-chip-nav .focus-item {
  min-height: 36px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

/* Both dashboard and course rails fill the available screen height. */
@media (min-width: 901px) {
  body.course-launcher-mode .sir-left-rail,
  body.course-launcher-mode .sir-right-rail,
  body.course-active-mode .sir-left-rail,
  body.course-active-mode .sir-right-rail {
    height: calc(100dvh - 82px) !important;
    max-height: calc(100dvh - 82px) !important;
    min-height: calc(100dvh - 82px) !important;
    align-content: start !important;
  }
}

.lesson-checklist {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #f0fdf4;
}
.lesson-checklist legend { padding: 0 5px; color: #166534; font-weight: 900; }
.lesson-checklist label { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; font-weight: 750; }
.lesson-checklist input { flex: 0 0 auto; margin-top: 2px; }

.quiz-question-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.quiz-question-timer { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #fff7ed; color: #c2410c; font-weight: 900; }
.quiz-question-submit { margin-top: 10px; border: 0; border-radius: 9px; padding: 8px 12px; background: #2563eb; color: #fff; font-weight: 900; cursor: pointer; }
.quiz-question-submit:disabled { opacity: .58; cursor: default; }
.quiz-question-feedback { margin-top: 7px; color: #166534; font-weight: 800; }
.quiz-question.timed-out { border-color: #fdba74 !important; background: #fff7ed !important; }
.quiz-question.timed-out .quiz-question-feedback { color: #c2410c; }
.quiz-media { margin: 10px 0; overflow: hidden; border: 1px solid #dbeafe; border-radius: 14px; background: #f8fafc; }
.quiz-media img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.quiz-option-media { max-width: 180px; }
.match-card-game { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 12px 0; }

/* Course-first discovery dashboard */
body.course-launcher-mode .sir-left-rail,
body.course-launcher-mode .sir-right-rail { display: none !important; }
body.course-launcher-mode .sir-learning-shell {
  display: block !important;
  width: min(1480px, calc(100% - 28px)) !important;
  max-width: 1480px !important;
  margin: 0 auto !important;
}
body.course-launcher-mode .sir-center-stage { min-width: 0; width: 100%; }
body.course-launcher-mode #courseDashboard { width: 100%; }
.course-discovery-dashboard { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; gap: 34px; padding: 18px 0 44px; }
.course-discovery-dashboard > * { min-width: 0; max-width: 100%; }
.discovery-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid #d5e2f4;
  border-radius: 28px;
  background: linear-gradient(135deg,#f0fdf4 0%,#f8fbff 48%,#eaf2ff 100%);
  box-shadow: 0 22px 60px rgba(15,23,42,.11);
}
.discovery-hero-carousel { position: relative; min-width: 0; }
.discovery-hero-slide[hidden] { display: none !important; }
.discovery-hero-slide.active { animation: discoveryHeroIn .35s ease both; }
@keyframes discoveryHeroIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.discovery-hero-arrow { position: absolute; z-index: 4; top: 50%; display: grid; place-items: center; width: 42px; height: 42px; transform: translateY(-50%); border: 1px solid #d7dce5; border-radius: 50%; background: rgba(255,255,255,.96); color: #111827; font-size: 28px; box-shadow: 0 8px 24px rgba(15,23,42,.15); cursor: pointer; }
.discovery-hero-arrow.prev { left: 14px; }
.discovery-hero-arrow.next { right: 14px; }
.discovery-hero-dots { position: absolute; z-index: 4; bottom: 14px; left: 50%; display: flex; gap: 7px; transform: translateX(-50%); }
.discovery-hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.7); box-shadow: 0 0 0 1px rgba(15,23,42,.2); cursor: pointer; }
.discovery-hero-dots button.active { width: 24px; border-radius: 999px; background: #6d28d9; }
.discovery-hero-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(30px,5vw,72px); }
.discovery-hero-kicker,.discovery-section-head span,.discovery-course-eyebrow span,.discovery-interest>div>span {
  color: #067647; font-size: 12px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase;
}
.discovery-hero h1 { margin: 12px 0; max-width: 720px; color: #0f172a; font-size: clamp(36px,5vw,68px); line-height: .98; letter-spacing: -.045em; }
.discovery-hero p { max-width: 650px; color: #475569; font-size: clamp(16px,1.6vw,20px); line-height: 1.65; }
.discovery-hero-meta,.discovery-course-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 20px; }
.discovery-hero-meta span,.discovery-course-meta span { padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.82); color: #334155; font-size: 12px; font-weight: 800; }
.discovery-hero-actions,.discovery-course-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.discovery-hero-actions button { min-height: 46px; padding-inline: 22px; }
.discovery-hero-media { position: relative; min-width: 0; min-height: 360px; background: #0f172a; }
.discovery-hero-media .course-thumb,.discovery-hero-media img,.discovery-hero-media video,.discovery-hero-media iframe { width: 100%; height: 100%; min-height: 430px; object-fit: contain; border: 0; }
.discovery-trailer-button { position: absolute; right: 22px; bottom: 22px; display: flex; gap: 8px; align-items: center; min-height: 46px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(15,23,42,.88); color: #fff; font-weight: 900; backdrop-filter: blur(12px); }
.discovery-interest { display: grid; grid-template-columns: minmax(220px,.6fr) 1.4fr; gap: 28px; align-items: center; padding: 26px; border: 1px solid #dbeafe; border-radius: 22px; background: #fff; }
.discovery-interest h2,.discovery-section-head h2 { margin: 5px 0 0; color: #0f172a; font-size: clamp(24px,3vw,36px); letter-spacing: -.03em; }
.discovery-interest p { margin: 5px 0 0; color: #64748b; }
.discovery-interest-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.discovery-interest-chips button { border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #334155; padding: 10px 14px; font-weight: 850; cursor: pointer; }
.discovery-interest-chips button:hover,.discovery-interest-chips button.active { border-color: #16a34a; background: #ecfdf3; color: #166534; }
.discovery-section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 16px; }
.discovery-mini-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.discovery-mini-stats span { padding: 7px 10px; border-radius: 999px; background: #eef4ff; color: #1e3a8a; font-size: 12px; font-weight: 850; }
.discovery-card-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px,260px); gap: 14px; overflow-x: auto; padding: 3px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.discovery-course-card { display: grid; overflow: hidden; min-width: 0; border: 1px solid #d9e3f1; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.065); scroll-snap-align: start; }
.discovery-course-card:hover { transform: translateY(-2px); border-color: #93c5fd; box-shadow: 0 16px 34px rgba(37,99,235,.12); }
.discovery-course-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg,#e0f2fe,#dcfce7); }
.discovery-course-media .course-thumb,.discovery-course-media img,.discovery-course-media video,.discovery-course-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.discovery-course-media .course-thumb-media img,
.discovery-course-media .course-thumb-media video { object-fit: contain; background: #0f2747; }
.inline-trailer-button { position: relative; height: 100% !important; min-height: 100% !important; border-radius: 0 !important; background: #0f2747; cursor: pointer; }
.inline-trailer-play { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #fff; background: linear-gradient(180deg,transparent 35%,rgba(15,23,42,.62)); text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.inline-trailer-play b { display: grid; place-items: center; width: 44px; height: 44px; padding-left: 3px; border-radius: 50%; background: #6d28d9; font-size: 17px; box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.inline-trailer-play em { font-size: 12px; font-style: normal; font-weight: 900; }
.inline-course-player { width: 100%; height: 100%; min-height: inherit; background: #000; }
.inline-course-player iframe,.inline-course-player video { display: block; width: 100%; height: 100%; min-height: inherit; border: 0; object-fit: contain; }
.discovery-badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border-radius: 999px; background: #166534; color: #fff; font-size: 11px; font-weight: 900; }
.discovery-course-copy { display: flex; flex-direction: column; padding: 18px; }
.discovery-course-eyebrow { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.discovery-course-eyebrow b { color: #1d4ed8; font-size: 12px; }
.discovery-course-card h3 { margin: 8px 0 5px; color: #0f172a; font-size: 20px; line-height: 1.2; }
.discovery-course-card p { display: -webkit-box; overflow: hidden; margin: 0; color: #64748b; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.discovery-course-actions { margin-top: auto; padding-top: 16px; }
.discovery-course-actions button { flex: 1 1 110px; min-height: 38px; }
.discovery-course-card.compact { grid-template-rows: 140px minmax(0,1fr); border-radius: 12px; }
.discovery-course-card.compact .discovery-course-media { aspect-ratio: auto; height: 140px; }
.discovery-course-card.compact .discovery-course-copy { padding: 13px; }
.discovery-course-card.compact h3 { min-height: 40px; margin-top: 6px; font-size: 17px; }
.discovery-course-card.compact p { min-height: 42px; font-size: 13px; line-height: 1.45; }
.discovery-course-card.compact .discovery-course-eyebrow span,
.discovery-course-card.compact .discovery-course-eyebrow b { font-size: 10px; }
.discovery-course-card.compact .discovery-course-meta { margin: 9px 0 5px; }
.discovery-course-card.compact .discovery-course-meta span { padding: 4px 7px; font-size: 10px; }
.discovery-course-card.compact .discovery-course-actions { gap: 6px; padding-top: 11px; }
.discovery-course-card.compact .discovery-course-actions button { min-height: 34px; padding: 6px 8px; font-size: 11px; }
.discovery-progress { height: 6px; overflow: hidden; margin-top: 12px; border-radius: 99px; background: #e2e8f0; }
.discovery-progress i { display: block; height: 100%; background: linear-gradient(90deg,#16a34a,#22c55e); }
.discovery-categories>div:last-child { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 10px; }
.discovery-categories button { display: grid; gap: 4px; min-height: 78px; padding: 16px; border: 1px solid #d9e3f1; border-radius: 16px; background: #fff; text-align: left; cursor: pointer; }
.discovery-categories button:hover { border-color: #16a34a; background: #f0fdf4; }
.discovery-categories button span { color: #0f172a; font-weight: 900; text-transform: capitalize; }
.discovery-categories button small { color: #64748b; }
.course-filter-toolbar { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr); gap: 10px; padding: 10px; border: 1px solid #dbe4f0; border-radius: 16px; background: #f8fafc; }
.course-filter-search { display: flex; gap: 8px; align-items: center; min-height: 42px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; }
.course-filter-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; }
.course-filter-details>summary { display: none; }
.course-advanced-filters { display: grid; grid-template-columns: repeat(5,minmax(110px,1fr)); gap: 7px; }
.course-advanced-filters select { min-width: 0; min-height: 42px; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; padding: 0 9px; color: #334155; font-weight: 750; }
.discovery-library .modern-course-card-grid { grid-template-columns: repeat(auto-fit,minmax(270px,1fr)) !important; gap: 16px !important; margin-top: 16px; }
.discovery-secondary { display: grid; grid-template-columns: minmax(220px,.4fr) minmax(0,1.6fr); gap: 16px; align-items: stretch; }
.discovery-secondary>div { display: grid; align-content: center; min-height: 110px; padding: 20px; border: 1px solid #dbe4f0; border-radius: 18px; background: #fff; }
.discovery-secondary>div>strong { color: #0f172a; font-size: 28px; }
.discovery-empty { padding: 48px; border: 1px dashed #93c5fd; border-radius: 24px; background: #eff6ff; text-align: center; }

@media (max-width: 900px) {
  body.course-launcher-mode .sir-learning-shell { width: min(100% - 16px,760px) !important; }
  .course-discovery-dashboard { gap: 24px; padding-top: 10px; }
  .discovery-hero { grid-template-columns: 1fr; min-height: 0; border-radius: 22px; }
  .discovery-hero-media { grid-row: 1; min-height: 220px; }
  .discovery-hero-media .course-thumb,.discovery-hero-media img,.discovery-hero-media video,.discovery-hero-media iframe { min-height: 220px; max-height: 330px; }
  .discovery-hero-copy { padding: 26px 22px 30px; }
  .discovery-hero h1 { font-size: clamp(32px,10vw,48px); }
  .discovery-interest { grid-template-columns: 1fr; padding: 20px; }
  .course-filter-toolbar { grid-template-columns: 1fr auto; position: relative; }
  .course-filter-details>summary { display: flex; gap: 7px; align-items: center; justify-content: center; min-height: 42px; padding: 0 12px; border: 1px solid #bfdbfe; border-radius: 11px; background: #eff6ff; color: #1d4ed8; cursor: pointer; list-style: none; }
  .course-filter-details[open] .course-advanced-filters { position: absolute; z-index: 30; top: calc(100% + 7px); right: 0; left: 0; display: grid; grid-template-columns: 1fr 1fr; padding: 12px; border: 1px solid #bfdbfe; border-radius: 14px; background: #fff; box-shadow: 0 18px 44px rgba(15,23,42,.18); }
  .discovery-secondary { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .course-discovery-dashboard { gap: 20px; }
  .discovery-hero-copy { padding: 22px 18px 26px; }
  .discovery-hero-actions { width: 100%; }
  .discovery-hero-actions button { flex: 1 1 130px; padding-inline: 12px; }
  .discovery-card-scroller { grid-auto-columns: minmax(68vw,260px); }
  .discovery-interest-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
  .discovery-interest-chips button { flex: 0 0 auto; }
  .discovery-section-head { align-items: flex-start; }
  .discovery-mini-stats span:not(:first-child) { display: none; }
  .course-filter-details[open] .course-advanced-filters { grid-template-columns: 1fr; }
  .discovery-library .modern-course-card-grid { grid-template-columns: 1fr !important; }
}

/* Marketplace refinement: contained media, clean controls, compact discovery and anchored details. */
.discovery-hero-media {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 18px;
}
.discovery-hero-media > .course-thumb-media,
.discovery-hero-media > .inline-course-player,
.discovery-hero-media > .course-thumb-fallback {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  border-radius: 12px !important;
  overflow: hidden;
}
.discovery-hero-media .course-thumb-media img,
.discovery-hero-media .course-thumb-media video,
.discovery-hero-media .inline-course-player iframe,
.discovery-hero-media .inline-course-player video {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
}
.discovery-hero-dots {
  bottom: 12px;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(15,23,42,.7);
  box-shadow: 0 8px 24px rgba(15,23,42,.22);
  backdrop-filter: blur(10px);
}
.discovery-hero-dots button {
  appearance: none;
  flex: 0 0 auto;
  width: 8px !important;
  min-width: 8px !important;
  height: 8px !important;
  min-height: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.55) !important;
  box-shadow: none !important;
  font-size: 0 !important;
}
.discovery-hero-dots button.active {
  width: 24px !important;
  min-width: 24px !important;
  border-radius: 999px !important;
  background: #a78bfa !important;
}
.discovery-interest {
  grid-template-columns: minmax(200px,.52fr) minmax(0,1.48fr);
  gap: 18px;
  padding: 16px 18px;
  border-radius: 14px;
}
.discovery-interest h2 { font-size: clamp(21px,2.4vw,28px); }
.discovery-interest p { font-size: 13px; line-height: 1.35; }
.discovery-interest-chips { gap: 7px; }
.discovery-interest-chips button { min-height: 34px; padding: 7px 11px; font-size: 12px; }
@media (min-width: 901px) {
  .course-filter-toolbar {
    display: grid !important;
    grid-template-columns: minmax(220px,1.35fr) minmax(0,3.65fr) !important;
    gap: 8px !important;
    align-items: center;
    padding: 8px !important;
  }
  .course-filter-details { min-width: 0; }
  .course-filter-details[open] .course-advanced-filters,
  .course-advanced-filters {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(105px,1fr)) !important;
    gap: 7px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .course-filter-search { min-height: 40px; }
  .course-advanced-filters select { min-height: 40px !important; }
}
.course-details-panel,
.course-details-panel.show {
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
}
.course-details-panel.show { display: block; }
.course-details-drawer {
  pointer-events: auto;
  right: auto;
  width: min(430px,calc(100vw - 24px));
  height: auto;
  max-height: calc(100vh - 24px);
  border: 1px solid #d9e2ef;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15,23,42,.24);
  animation-name: courseDetailsPopoverIn;
  overscroll-behavior: contain;
}
@keyframes courseDetailsPopoverIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.course-detail-media { border-radius: 16px 16px 0 0; }
.course-detail-actions { border-radius: 0 0 16px 16px; }
body.course-details-open { overflow: hidden !important; overscroll-behavior: none; }
.media-preview-box,
.media-preview-body,
.learner-login-card,
.onboarding-card,
.course-completion-panel,
.lesson-help-panel,
.saved-learning-drawer > section,
.phase4-note-modal > section,
.sir-tool-shell,
.sir-tool-platform-shell,
[class*="modal-body"],
[class*="drawer-body"] {
  overscroll-behavior: contain;
}
body:has(.media-preview-modal.show),
body:has(.course-details-panel.show),
body:has(.learner-login-modal.show),
body:has(.onboarding-modal.show),
body:has(.course-completion-modal.show),
body:has(.lesson-help-modal.show),
body:has(.saved-learning-drawer.show),
body:has(.phase4-note-modal.show),
body:has(.sir-tool-modal.open),
body:has(.sir-tool-platform-modal.show) {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
@media (max-width: 900px) {
  .discovery-hero-media { min-height: 0; padding: 10px; }
  .discovery-interest { grid-template-columns: 1fr; gap: 10px; }
  .discovery-interest-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .discovery-interest-chips button { flex: 0 0 auto; }
}
@media (max-width: 640px) {
  .course-details-panel.show { pointer-events: auto; background: rgba(15,23,42,.34); backdrop-filter: blur(2px); }
  .course-details-drawer {
    position: absolute;
    top: auto !important;
    right: 0 !important;
    bottom: 0;
    left: 0 !important;
    width: 100% !important;
    max-height: 86vh;
    border: 0;
    border-radius: 20px 20px 0 0;
    animation-name: courseDetailsUp;
  }
}

/* Marketplace landing header and feature story. Course tools remain inside an active course. */
body.course-launcher-mode { background: #fff; }
body.course-launcher-mode .topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 10px clamp(16px, 3vw, 42px);
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255,255,255,.97);
  box-shadow: 0 3px 16px rgba(15,23,42,.06);
  backdrop-filter: blur(16px);
}
body.course-launcher-mode .brand { flex: 0 0 auto; min-width: 0; }
.launcher-brand-mark { display: none; width: 38px; height: 38px; flex: 0 0 auto; }
body.course-launcher-mode .launcher-brand-mark { display: block; }
body.course-launcher-mode .brand-no-logo { display: flex; gap: 9px; align-items: center; }
body.course-launcher-mode .brand-main { max-width: 210px; color: #111827; font-size: 18px; line-height: 1.05; }
body.course-launcher-mode .brand-sub { display: none; }
.launcher-primary-nav,.launcher-course-search,.launcher-auth-actions { display: none; }
body.course-launcher-mode .launcher-primary-nav { display: flex; gap: 4px; flex: 0 0 auto; }
.launcher-primary-nav button { min-height: 40px; padding: 0 10px; border: 0; background: transparent; color: #334155; font-weight: 750; cursor: pointer; }
.launcher-primary-nav button:hover { color: #6d28d9; }
body.course-launcher-mode .launcher-course-search { display: flex; flex: 1 1 360px; gap: 9px; align-items: center; min-width: 180px; max-width: 540px; min-height: 46px; padding: 0 16px; border: 1px solid #64748b; border-radius: 999px; background: #fff; }
.launcher-course-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #0f172a; font: inherit; }
body.course-launcher-mode .top-actions { margin-left: auto; }
body.course-launcher-mode .launcher-auth-actions { display: flex; gap: 8px; align-items: center; }
.launcher-auth-actions button { min-height: 42px; padding: 0 15px; border-radius: 7px; font-weight: 900; cursor: pointer; }
.launcher-login { border: 1px solid #6d28d9; background: #fff; color: #6d28d9; }
.launcher-signup { border: 1px solid #6d28d9; background: #6d28d9; color: #fff; }
.launcher-auth-guest { display: flex; align-items: center; gap: 10px; }
.launcher-auth-guest .launcher-login-primary { border-color: #6d28d9; background: #6d28d9; color: #fff; box-shadow: 0 5px 14px rgba(109,40,217,.18); }
.launcher-auth-guest>span { color: #64748b; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.launcher-auth-actions .launcher-signup-link { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #6d28d9; font: inherit; font-weight: 900; text-decoration: underline; text-underline-offset: 2px; }
.launcher-auth-actions .launcher-signup-link:hover { color: #4c1d95; }
body.course-launcher-mode #mainMenuBtn,
body.course-launcher-mode #courseNewsLink,
body.course-launcher-mode #voiceMasterBtn,
body.course-launcher-mode #courseCompletionFab,
body.course-launcher-mode #sirSavedLearningButton,
body.course-launcher-mode #learnerNotificationBell,
body.course-launcher-mode #sirGlobalToolsButton { display: none !important; }
body.course-launcher-mode .floating-lang { display: block; }
body.course-launcher-mode .desktop-step-header { display: none !important; }
body.course-launcher-mode .course-discovery-dashboard { padding-top: 24px; }
body.course-launcher-mode .discovery-hero { border-radius: 4px; border-color: #e2e8f0; background: linear-gradient(125deg,#f5f3ff 0%,#fff 52%,#ecfeff 100%); box-shadow: 0 10px 34px rgba(15,23,42,.10); }
body.course-launcher-mode .discovery-hero-kicker,
body.course-launcher-mode .discovery-section-head span,
.landing-section-intro>span { color: #6d28d9; }
body.course-launcher-mode .discovery-hero-actions .btn-primary,
.landing-final-cta .btn-primary { background: #6d28d9; border-color: #6d28d9; }
.landing-features,.landing-how-it-works { display: grid; gap: 24px; scroll-margin-top: 96px; }
.landing-section-intro { max-width: 770px; }
.landing-section-intro>span { font-size: 12px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.landing-section-intro h2 { margin: 7px 0 8px; color: #111827; font-size: clamp(28px,4vw,44px); line-height: 1.08; letter-spacing: -.035em; }
.landing-section-intro p { margin: 0; color: #5b6474; font-size: 17px; line-height: 1.65; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.landing-feature-grid article { display: grid; align-content: start; min-height: 190px; padding: 24px; border: 1px solid #dce3ee; border-radius: 4px; background: #fff; box-shadow: 0 7px 22px rgba(15,23,42,.055); }
.landing-feature-grid i { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border-radius: 50%; background: #f3e8ff; color: #6d28d9; font-size: 13px; font-style: normal; font-weight: 950; }
.landing-feature-grid strong { color: #111827; font-size: 19px; }
.landing-feature-grid p { margin: 8px 0 0; color: #64748b; line-height: 1.55; }
.landing-proof-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #ddd6fe; background: #f5f3ff; }
.landing-proof-strip>div { display: grid; gap: 2px; padding: 22px; border-right: 1px solid #ddd6fe; text-align: center; }
.landing-proof-strip>div:last-child { border-right: 0; }
.landing-proof-strip strong { color: #4c1d95; font-size: clamp(22px,3vw,32px); }
.landing-proof-strip span { color: #6b5b83; font-size: 13px; font-weight: 750; }
.landing-steps-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.landing-steps-grid article { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 15px; padding: 24px 0; border-top: 1px solid #cbd5e1; }
.landing-steps-grid b { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #111827; color: #fff; font-size: 20px; }
.landing-steps-grid strong { color: #111827; font-size: 20px; }
.landing-steps-grid p { margin: 7px 0 0; color: #64748b; line-height: 1.55; }
.landing-final-cta { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: clamp(26px,4vw,48px); background: #111827; color: #fff; }
.landing-final-cta span { color: #c4b5fd; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.landing-final-cta h2 { margin: 6px 0 0; max-width: 700px; color: #fff; font-size: clamp(25px,3vw,38px); }
.landing-final-cta button { flex: 0 0 auto; min-height: 48px; padding: 0 22px; }
.discovery-library { scroll-margin-top: 96px; }
.course-details-panel { position: fixed; inset: 0; z-index: 1400; display: none; background: rgba(15,23,42,.34); backdrop-filter: blur(2px); }
.course-details-panel.show { display: block; }
.course-details-drawer { position: absolute; top: 0; right: 0; width: min(470px,92vw); height: 100%; overflow-y: auto; padding: 22px; background: #fff; box-shadow: -24px 0 70px rgba(15,23,42,.25); animation: courseDetailsIn .25s ease both; }
@keyframes courseDetailsIn { from { transform: translateX(100%); } to { transform: none; } }
.course-details-close { position: sticky; z-index: 3; top: 0; float: right; display: grid; place-items: center; width: 38px; height: 38px; margin: 0 0 -38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #111827; font-size: 26px; box-shadow: 0 5px 16px rgba(15,23,42,.14); cursor: pointer; }
.course-detail-media { height: 230px; overflow: hidden; margin: -22px -22px 22px; background: #0f2747; }
.course-detail-media .course-thumb-media,.course-detail-media img,.course-detail-media video,.course-detail-media iframe,.course-detail-media .inline-course-player { width: 100%; height: 100% !important; min-height: 100% !important; border-radius: 0; object-fit: contain; }
.course-detail-copy>span { color: #6d28d9; font-size: 11px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.course-detail-copy h2 { margin: 7px 48px 8px 0; color: #111827; font-size: 28px; line-height: 1.08; }
.course-detail-copy>p { color: #5b6474; line-height: 1.6; }
.course-detail-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 22px; }
.course-detail-meta b { padding: 6px 9px; border-radius: 999px; background: #f3f4f6; color: #374151; font-size: 11px; }
.course-detail-list { padding: 16px 0; border-top: 1px solid #e5e7eb; }
.course-detail-list h3 { margin: 0 0 9px; color: #111827; font-size: 16px; }
.course-detail-list ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.course-detail-list li { position: relative; padding-left: 20px; color: #5b6474; line-height: 1.45; }
.course-detail-list li::before { content: "✓"; position: absolute; left: 0; color: #16a34a; font-weight: 900; }
.course-detail-actions { position: sticky; bottom: -22px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px -22px -22px; padding: 14px 22px; border-top: 1px solid #e5e7eb; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.course-detail-actions button { min-height: 43px; }
body.course-details-open { overflow: hidden; }
@media (max-width: 1120px) {
  body.course-launcher-mode .launcher-primary-nav { display: none; }
  body.course-launcher-mode .brand-main { max-width: 150px; }
}
@media (max-width: 760px) {
  body.course-launcher-mode .topbar { flex-wrap: wrap; gap: 8px 12px; min-height: 0; padding: 9px 12px; }
  body.course-launcher-mode .brand { order: 1; }
  body.course-launcher-mode .top-actions { order: 2; }
  body.course-launcher-mode .launcher-course-search { order: 3; flex-basis: 100%; max-width: none; min-height: 42px; }
  body.course-launcher-mode .floating-lang { display: none; }
  .launcher-auth-actions button { min-height: 38px; padding: 0 11px; }
  .launcher-auth-guest { gap: 7px; }
  .launcher-auth-guest>span { font-size: 10px; }
  .launcher-auth-actions .launcher-signup-link { min-height: 0; padding: 0; }
  .landing-feature-grid { grid-template-columns: 1fr 1fr; }
  .landing-proof-strip { grid-template-columns: 1fr 1fr; }
  .landing-proof-strip>div:nth-child(2) { border-right: 0; }
  .landing-proof-strip>div:nth-child(-n+2) { border-bottom: 1px solid #ddd6fe; }
  .landing-steps-grid { grid-template-columns: 1fr; gap: 0; }
  .landing-final-cta { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  body.course-launcher-mode .launcher-brand-mark { width: 32px; height: 32px; }
  body.course-launcher-mode .brand-main { max-width: 115px; font-size: 15px; }
  .landing-feature-grid { grid-template-columns: 1fr; }
  .landing-feature-grid article { min-height: 0; }
  .discovery-hero-arrow { width: 36px; height: 36px; }
  .discovery-hero-arrow.prev { left: 7px; }
  .discovery-hero-arrow.next { right: 7px; }
  .course-details-drawer { top: auto; bottom: 0; width: 100%; height: min(86vh,760px); padding: 18px; border-radius: 20px 20px 0 0; animation-name: courseDetailsUp; }
  @keyframes courseDetailsUp { from { transform: translateY(100%); } to { transform: none; } }
  .course-detail-media { height: 190px; margin: -18px -18px 18px; border-radius: 20px 20px 0 0; }
  .course-detail-actions { bottom: -18px; margin: 16px -18px -18px; padding: 12px 18px; }
}
.match-card-column { display: grid; gap: 8px; align-content: start; }
.match-card { position: relative; min-height: 44px; padding: 8px 10px; border: 1px solid #bfdbfe; border-radius: 10px; background: #fff; color: #0f172a; font-weight: 800; cursor: pointer; }
.match-card.selected { border-color: #2563eb; background: #dbeafe; }
.match-card.connected { border-color: #22c55e; background: #dcfce7; color: #166534; }
.match-left.connected::after { content: ""; position: absolute; left: 100%; top: 50%; width: 24px; height: 2px; background: #22c55e; }

/* Dashboard filters stay inside the center column at every desktop width. */
.course-advanced-filters {
  grid-template-columns: minmax(150px, 1.35fr) repeat(2, minmax(130px, 1fr)) !important;
  gap: 7px !important;
  padding: 9px !important;
  overflow: hidden !important;
}
.course-advanced-filters input,
.course-advanced-filters select { min-width: 0 !important; width: 100% !important; min-height: 36px !important; padding: 6px 9px !important; }
@media (max-width: 1150px) { .course-advanced-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .course-advanced-filters { grid-template-columns: 1fr !important; } }

/* Recommended courses use their trailer or main image as the visual focus. */
.recommended-course-card { grid-template-columns: 1fr !important; grid-template-rows: 118px auto auto !important; align-content: start; }
.recommended-course-card .course-thumb-fallback,
.recommended-course-card .course-thumb-media { grid-row: auto !important; width: 100% !important; height: 118px !important; min-height: 118px !important; border-radius: 10px; overflow: hidden; }
.recommended-course-card .course-thumb-media img,
.recommended-course-card .course-thumb-media video { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.recommended-course-card .course-card-actions { grid-column: 1 !important; }

/* Lesson tools remain readable in the narrow desktop rail. */
.lesson-side-tools-panel .lesson-tool-head{display:grid!important;grid-template-columns:1fr;gap:2px!important;align-items:start!important}
.lesson-side-tools-panel .lesson-tool-head strong{max-width:100%;font-size:13px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
.lesson-side-tools-panel .lesson-learner-tools{min-width:0;overflow:hidden}
.lesson-side-tools-panel .lesson-tool-actions{display:grid!important;grid-template-columns:1fr}
.lesson-side-tools-panel .lesson-tool-actions button{width:100%;text-align:left}
.lesson-side-tools-panel,
.lesson-side-tools-panel *{box-sizing:border-box}
.lesson-side-tools-panel{min-width:0;max-width:100%;overflow-x:hidden}
.lesson-side-tools-panel .lesson-learner-tools{width:100%;max-width:100%;padding:12px!important;grid-template-columns:minmax(0,1fr)!important}
.lesson-side-tools-panel .lesson-learner-tools>*{box-sizing:border-box;min-width:0!important;width:100%!important;max-width:100%!important}
.lesson-side-tools-panel .lesson-tool-head>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
.lesson-side-tools-panel .lesson-tool-actions{width:100%;min-width:0}
.lesson-side-tools-panel .lesson-tool-actions button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.lesson-side-tools-panel .lesson-checklist{min-inline-size:0;max-width:100%;margin-inline:0!important;overflow:hidden!important}
.lesson-side-tools-panel .lesson-checklist legend{max-width:calc(100% - 10px);white-space:normal;overflow-wrap:anywhere}
.lesson-side-tools-panel .lesson-reminder-chip,
.lesson-side-tools-panel .lesson-note-box,
.lesson-side-tools-panel .saved-lessons-panel{min-width:0;max-width:100%;overflow-wrap:anywhere}
.lesson-side-tools-panel .lesson-note-box textarea,
.lesson-side-tools-panel .lesson-note-box button{display:block;width:100%;min-width:0;max-width:100%}
.lesson-side-tools-panel .saved-lessons-panel button{min-width:0;max-width:100%}

.lesson-quick-tools button:first-child.active{font-size:0!important;position:relative}
.lesson-quick-tools button:first-child.active::after{content:"🔖✓";font-size:13px;color:#166534}

.saved-lessons-panel{display:grid;gap:7px;padding-top:10px;border-top:1px solid #dbeafe}
.saved-lessons-panel>strong{font-size:12px;color:#0f172a}
.saved-lessons-panel button{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 7px;align-items:center;width:100%;padding:8px;border:1px solid #dbeafe;border-radius:10px;background:#fff;text-align:left;cursor:pointer}
.saved-lessons-panel button b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.saved-lessons-panel button small{grid-column:2;color:#64748b;font-size:10px}

.lesson-reminder-modal{display:none;position:fixed;inset:0;z-index:10050;place-items:center;padding:18px}
.lesson-reminder-modal.show{display:grid}
.lesson-reminder-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(4px)}
.lesson-reminder-card{position:relative;z-index:1;display:grid;gap:14px;width:min(430px,100%);padding:20px;border-radius:20px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.3)}
.lesson-reminder-card>div:first-child{display:flex;justify-content:space-between;align-items:center;color:#2563eb;font-weight:900;text-transform:uppercase;font-size:11px}
.lesson-reminder-card>div:first-child button{width:34px;height:34px;border:0;border-radius:50%;background:#eef2ff;font-size:20px;cursor:pointer}
.lesson-reminder-card label{display:grid;gap:7px;color:#334155;font-weight:800}
.lesson-reminder-card input{min-height:44px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:10px;font:inherit}
.lesson-reminder-card p{margin:0;color:#64748b;font-size:12px;line-height:1.5}
.lesson-reminder-card .actions{display:flex;gap:8px;flex-wrap:wrap}

/* Resume prompt belongs to the pre-lesson launcher, not the active lesson rail. */
body.course-active-mode .sir-rail-continue-card{display:none!important}

/* Responsive rails: preserve a usable center before collapsing navigation. */
.responsive-rail-toggle { display: none; position: fixed; z-index: 8990; border: 0; border-radius: 999px; padding: 9px 12px; background: #0f766e; color: #fff; font-weight: 900; box-shadow: 0 10px 28px rgba(15,118,110,.25); }
@media (min-width: 1021px) and (max-width: 1250px) {
  body.course-active-mode .sir-learning-shell { grid-template-columns: minmax(250px, 285px) minmax(520px, 1fr) !important; gap: 10px !important; }
  body.course-active-mode .sir-right-rail { display: none !important; position: fixed !important; right: 12px; top: 76px; width: min(320px, 88vw) !important; z-index: 8985; background: #eefbf6; padding: 12px !important; border-radius: 18px; box-shadow: 0 20px 60px rgba(15,23,42,.25); }
  body.course-active-mode.show-right-rail .sir-right-rail { display: grid !important; }
  body.course-active-mode .responsive-right-toggle { display: block; right: 12px; bottom: 84px; }
}
@media (min-width: 901px) and (max-width: 1020px) {
  body.course-active-mode .sir-learning-shell { grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; }
  body.course-active-mode .sir-left-rail,
  body.course-active-mode .sir-right-rail { display: none !important; position: fixed !important; top: 70px; bottom: 72px; width: min(320px, 88vw) !important; z-index: 8985; background: #eef6ff; padding: 12px !important; border-radius: 18px; box-shadow: 0 20px 60px rgba(15,23,42,.25); }
  body.course-active-mode .sir-left-rail { left: 10px; }
  body.course-active-mode .sir-right-rail { right: 10px; }
  body.course-active-mode.show-left-rail .sir-left-rail,
  body.course-active-mode.show-right-rail .sir-right-rail { display: grid !important; }
  body.course-active-mode .responsive-left-toggle { display: block; left: 12px; bottom: 84px; }
  body.course-active-mode .responsive-right-toggle { display: block; right: 12px; bottom: 84px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  body.course-active-mode .lesson-intro-visual-row { grid-template-columns: 1fr !important; }
  body.course-active-mode .lesson-primary-visual,
  body.course-active-mode .lesson-media-placeholder { min-height: 190px !important; border-right: 0 !important; border-bottom: 1px solid #dbeafe !important; }
}
@media (min-width: 1251px) {
  body.course-active-mode .sir-learning-shell { gap: 10px !important; grid-template-columns: minmax(240px, 280px) minmax(580px, 1fr) minmax(220px, 255px) !important; }
}

@media (max-width: 900px) {
  /* Compact icon header on phones. */
  #courseNewsLink { width: 36px !important; min-width: 36px !important; height: 36px !important; padding: 0 !important; overflow: hidden; color: transparent !important; position: relative; }
  #courseNewsLink::after { content: "📰"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 17px; }
  header.topbar .floating-lang-btn { color: transparent !important; position: relative; }
  header.topbar .floating-lang-btn::after { content: "🌐" !important; position: absolute !important; inset: 0 !important; display: grid !important; place-items: center !important; color: #1d4ed8 !important; font-size: 17px !important; }

  .lesson-more-actions.lesson-action-row { display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; align-items: center !important; overflow-x: auto !important; }
  .lesson-help-actions, .lesson-progress-actions { display: contents !important; }
  .lesson-more-actions button { flex: 0 0 42px !important; width: 42px !important; min-width: 42px !important; height: 38px !important; padding: 0 !important; overflow: hidden !important; color: transparent !important; position: relative !important; }
  .lesson-more-actions button::after { position: absolute; inset: 0; display: grid; place-items: center; color: #1e3a8a; font-size: 17px; }
  .lesson-help-actions button:first-child::after { content: "?"; }
  .lesson-help-actions .help-mini::after { content: "💬"; }
  .lesson-complete-btn::after { content: "✓"; color: #fff !important; }
  .lesson-next-btn::after { content: "→"; }
  .mobile-course-tools-tab.has-tools { animation: toolsAttention 1.8s ease-in-out infinite; }
}
@keyframes toolsAttention { 0%,100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.08); box-shadow: 0 0 0 8px rgba(37,99,235,.14); } }

/* Final missing-media size override after responsive rules. */
body.course-active-mode .lesson-intro-visual-row:has(.lesson-media-placeholder) .lesson-media-placeholder {
  min-height: 76px !important;
  height: 76px !important;
  border: 0 !important;
}

body.course-active-mode .lesson-intro-visual-row.no-media {
  display: block !important;
  grid-template-columns: 1fr !important;
  min-height: 0 !important;
  border: 0 !important;
  background: #fff !important;
}

.sir-app-loader {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 25% 20%, rgba(219,234,254,.96), transparent 42%), radial-gradient(circle at 80% 75%, rgba(220,252,231,.95), transparent 42%), #f8fafc;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.sir-app-loader.show { opacity: 1; visibility: visible; }
.sir-app-loader-card {
  width: min(430px, 92vw);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px;
  border: 1px solid rgba(191,219,254,.9);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 28px 80px rgba(15,23,42,.16);
  text-align: center;
}
.sir-app-loader-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg,#eff6ff,#dcfce7);
  box-shadow: 0 14px 34px rgba(37,99,235,.16);
  animation: loaderLogoPulse 1.8s ease-in-out infinite;
}
.sir-app-loader-logo img { width: 54px; height: 54px; object-fit: contain; }
.sir-app-loader-logo b { display: none; }
.sir-app-loader-card > strong { font-size: 20px; color: #0f172a; }
.sir-app-loader-card > span { color: #64748b; font-weight: 700; }
.sir-loader-quotes { position: relative; width: 100%; min-height: 44px; margin-top: 2px; color: #166534; font-weight: 850; }
.sir-loader-quotes span { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; animation: loaderQuoteCycle 9s infinite; }
.sir-loader-quotes span:nth-child(2) { animation-delay: 3s; }
.sir-loader-quotes span:nth-child(3) { animation-delay: 6s; }
.sir-app-loader-bar { width: 100%; height: 6px; overflow: hidden; border-radius: 99px; background: #e2e8f0; }
.sir-app-loader-bar i { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2563eb,#16a34a); animation: loaderBarMove 1.25s ease-in-out infinite; }
@keyframes loaderLogoPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes loaderQuoteCycle { 0%,30% { opacity: 1; transform: translateY(0); } 33%,100% { opacity: 0; transform: translateY(-5px); } }
@keyframes loaderBarMove { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }

body.course-launcher-mode #learnerToolsRailPanel,
body.course-launcher-mode #lessonSideToolsPanel,
body.course-launcher-mode .lesson-take-quiz-btn,
body.course-launcher-mode #mobileCourseToolsTab,
body.course-launcher-mode #mobileCourseToolsDrawer {
  display: none !important;
  visibility: hidden !important;
}

@media (max-width: 900px) {
  /* Keep the language glyph clean and reserve enough header width for every icon. */
  body.course-active-mode header.topbar { grid-template-columns: minmax(0, 1fr) auto !important; padding-left: 8px !important; padding-right: 8px !important; }
  body.course-active-mode header.topbar .brand { min-width: 0 !important; overflow: hidden !important; }
  body.course-active-mode header.topbar .brand-text { min-width: 0 !important; }
  body.course-active-mode header.topbar .brand-main { display: block !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  body.course-active-mode header.topbar > .top-actions { flex: 0 0 auto !important; max-width: none !important; overflow: visible !important; }
  header.topbar .floating-lang-btn { text-indent: -9999px !important; overflow: hidden !important; }
  header.topbar .floating-lang-btn::before { content: none !important; display: none !important; }
  header.topbar .floating-lang-btn::after { text-indent: 0 !important; z-index: 1 !important; }

  /* Compact lesson navigator with no empty vertical band. */
  body.course-active-mode .step-layout { gap: 8px !important; }
  body.course-active-mode .lesson-chip-nav {
    min-height: 42px !important;
    height: 42px !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    align-items: center !important;
  }
  body.course-active-mode .lesson-chip-nav .focus-list { height: 38px !important; min-height: 38px !important; padding: 0 !important; align-items: center !important; }
  body.course-active-mode .lesson-chip-nav .focus-item { min-height: 34px !important; height: 34px !important; padding-top: 4px !important; padding-bottom: 4px !important; }
  body.course-active-mode .lesson-chip-arrow { width: 36px !important; height: 36px !important; min-height: 36px !important; }

  /* Four fixed-size action icons, always one row and never horizontally scrollable. */
  body.course-active-mode .lesson-more-actions.lesson-action-row {
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 50px !important;
    padding: 6px !important;
    overflow: hidden !important;
  }
  body.course-active-mode .lesson-more-actions .lesson-help-actions,
  body.course-active-mode .lesson-more-actions .lesson-progress-actions { display: contents !important; }
  body.course-active-mode .lesson-more-actions button {
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    color: transparent !important;
    font-size: 0 !important;
    overflow: hidden !important;
    position: relative !important;
  }
  body.course-active-mode .lesson-more-actions button::after { position: absolute !important; inset: 0 !important; display: grid !important; place-items: center !important; font-size: 17px !important; line-height: 1 !important; color: #1e3a8a !important; }
  body.course-active-mode .lesson-help-actions button:first-child::after { content: "?" !important; }
  body.course-active-mode .lesson-help-actions .help-mini::after { content: "💬" !important; }
  body.course-active-mode .lesson-complete-btn::after { content: "✓" !important; color: #fff !important; }
  body.course-active-mode .lesson-next-btn::after { content: "→" !important; }

  /* Right-edge tabs: completion above, progress below. */
  body.course-active-mode #courseCompletionFab {
    display: grid !important;
    place-items: center !important;
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 37% !important;
    bottom: auto !important;
    z-index: 9002 !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 62px !important;
    padding: 0 !important;
    border-radius: 14px 0 0 14px !important;
    box-shadow: 0 12px 30px rgba(37,99,235,.25) !important;
  }
  body.course-active-mode .responsive-right-toggle {
    display: grid !important;
    place-items: center !important;
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 51% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: 42px !important;
    height: 62px !important;
    padding: 0 !important;
    border-radius: 14px 0 0 14px !important;
  }
}

/* Allow the first and last lesson chips to center, not only middle chips. */
@media (max-width: 900px) {
  body.course-active-mode .lesson-chip-nav .focus-list::before,
  body.course-active-mode .lesson-chip-nav .focus-list::after {
    content: "";
    display: block;
    flex: 0 0 calc(50% - 58px);
    min-width: calc(50% - 58px);
  }

  /* One strict icon row for help, quiz/complete and next actions. */
  body.course-active-mode .lesson-more-actions.lesson-action-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 54px !important;
    padding: 7px !important;
  }
  body.course-active-mode .lesson-more-actions .lesson-help-actions,
  body.course-active-mode .lesson-more-actions .lesson-progress-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
  }
  body.course-active-mode .lesson-more-actions button {
    display: inline-grid !important;
    place-items: center !important;
    margin: 0 !important;
  }

  /* Drawer checklist: readable full-width rows without horizontal overflow. */
  .mobile-course-tools-drawer,
  .mobile-course-tools-body,
  .mobile-lesson-tools,
  .mobile-lesson-tools .lesson-learner-tools { overflow-x: hidden !important; min-width: 0 !important; }
  .mobile-lesson-tools .lesson-checklist {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    padding: 10px !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 12px !important;
    background: #f0fdf4 !important;
  }
  .mobile-lesson-tools .lesson-checklist legend {
    max-width: calc(100% - 12px) !important;
    padding: 0 6px !important;
    font-size: 14px !important;
  }
  .mobile-lesson-tools .lesson-checklist label {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 9px !important;
    border: 1px solid #dcfce7 !important;
    border-radius: 9px !important;
    background: #fff !important;
    text-align: left !important;
  }
  .mobile-lesson-tools .lesson-checklist input {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
  .mobile-lesson-tools .lesson-checklist label span {
    display: block !important;
    min-width: 0 !important;
    color: #14532d !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 900px) {
  body.course-active-mode .sir-learning-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body.course-active-mode .sir-left-rail {
    display: none !important;
  }

  .course-fixed-tools-panel {
    display: none !important;
  }

  .mobile-course-tools-tab {
    display: flex;
    position: fixed;
    left: 0;
    top: 48%;
    z-index: 9000;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    border: 0;
    border-radius: 0 14px 14px 0;
    padding: 14px 7px;
    background: #2563eb;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32);
  }

  .mobile-course-tools-tab span {
    transform: rotate(180deg);
  }

  .mobile-course-tools-drawer {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 370px);
    z-index: 9010;
    background: #ffffff;
    box-shadow: 22px 0 60px rgba(15, 23, 42, 0.25);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overflow-y: auto;
    padding: 18px;
  }

  body.mobile-course-tools-open .mobile-course-tools-drawer {
    transform: translateX(0);
  }

  .mobile-course-tools-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  }

  .mobile-course-tools-head button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
  }
}

/* Phase 3 guided lesson experience */
.guided-lesson-resolving,
.guided-lesson-load-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 240px;
  padding: 28px;
  border: 1px solid #dbe5f2;
  border-radius: 18px;
  background: #fff;
  text-align: left;
}
.guided-lesson-resolving div { display: grid; gap: 4px; }
.guided-lesson-resolving small { color: #64748b; }
.guided-resolving-mark {
  width: 30px;
  height: 30px;
  border: 3px solid #ddd6fe;
  border-top-color: #6d28d9;
  border-radius: 50%;
  animation: guidedResolveSpin .8s linear infinite;
}
@keyframes guidedResolveSpin { to { transform: rotate(360deg); } }
.guided-lesson-load-error { flex-direction: column; color: #334155; text-align: center; }
.guided-lesson-load-error p { max-width: 560px; margin: 0; color: #64748b; }
.guided-lesson-load-error button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #6d28d9;
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.guided-lesson-experience{--guided-blue:#2563eb;--guided-green:#16a34a;display:grid;gap:18px;padding:4px 0 8px}
.guided-experience-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border:1px solid #cfe0ff;border-radius:24px;background:linear-gradient(135deg,#eff6ff,#ecfdf5);box-shadow:0 14px 34px rgba(30,64,175,.08)}
.guided-experience-head span{display:inline-block;margin-bottom:5px;color:#2563eb;font-size:12px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.guided-experience-head h2{margin:0;color:#102a56;font-size:clamp(22px,3vw,32px)}.guided-experience-head p{margin:7px 0 0;color:#58708f;font-weight:700}
.guided-progress-ring{flex:0 0 86px;display:grid;place-items:center;align-content:center;width:86px;height:86px;border-radius:50%;background:radial-gradient(circle at center,#fff 56%,transparent 58%),conic-gradient(#22c55e var(--guided-progress),#dbeafe 0);color:#123463}.guided-progress-ring strong{font-size:20px}.guided-progress-ring small{font-size:10px;font-weight:800;text-transform:uppercase}
.guided-journey{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:7px;padding:8px;border:1px solid #dbe6f5;border-radius:18px;background:#fff}.guided-journey span{display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:7px;border-radius:12px;color:#71819a;font-size:12px;font-weight:800}.guided-journey span b{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#edf2f8;color:#58708f}.guided-journey span.active{background:#eff6ff;color:#1d4ed8}.guided-journey span.active b{background:#2563eb;color:#fff}.guided-journey span.done{background:#ecfdf5;color:#15803d}.guided-journey span.done b{background:#22c55e;color:#fff}
.guided-resume{display:flex;align-items:center;gap:12px;width:100%;padding:13px 16px;border:1px solid #93c5fd;border-radius:15px;background:#eff6ff;color:#1e3a8a;text-align:left}.guided-resume>span:first-child{font-size:25px}.guided-resume small{display:block;margin-top:2px;color:#64748b}
.guided-objectives{border:1px solid #d6e2f2;border-radius:18px;background:#fff;overflow:hidden}.guided-objectives summary{padding:15px 18px;color:#173460;font-weight:900;cursor:pointer}.guided-objectives ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 22px;margin:0;padding:0 20px 18px 42px;color:#405675;line-height:1.5}.guided-objectives li::marker{color:#22c55e}
.guided-block-list{display:grid;gap:14px}.guided-lesson-block{display:grid;grid-template-columns:58px minmax(0,1fr);border:1px solid #d9e4f2;border-radius:22px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.07);overflow:hidden;transition:.2s ease}.guided-lesson-block:hover{transform:translateY(-2px);box-shadow:0 16px 38px rgba(15,23,42,.1)}.guided-lesson-block.needs-attention{outline:4px solid #fbbf24;transform:scale(1.01)}
.guided-block-accent{display:flex;justify-content:center;padding-top:20px;background:#eff6ff;border-right:1px solid #dbeafe}.guided-block-accent span{display:grid;place-items:center;width:35px;height:35px;border-radius:12px;background:#2563eb;color:#fff;font-size:18px;font-weight:900}.guided-block-main{min-width:0;padding:19px 20px}.guided-block-main>header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.guided-block-main>header small{color:#60728d;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.guided-block-main>header h3{margin:5px 0 0;color:#132f58;font-size:21px}.guided-block-main>header>b{flex:0 0 auto;padding:6px 9px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:12px}.guided-block-body{color:#243a58;font-size:17px;line-height:1.75}.guided-block-body>:first-child{margin-top:0}.guided-block-body>:last-child{margin-bottom:0}
.guided-block-main>footer{display:flex;justify-content:flex-end;margin-top:16px;padding-top:14px;border-top:1px solid #e4ebf4}.guided-block-complete{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-weight:900}.guided-block-complete span{font-size:18px}.guided-block-complete.done{border-color:#86efac;background:#dcfce7;color:#15803d}.guided-lesson-block.completed{border-color:#a7e7bd}.guided-lesson-block.completed .guided-block-accent{background:#ecfdf5}.guided-lesson-block.completed .guided-block-accent span{background:#16a34a}
.guided-lesson-block.theme-green{border-left:4px solid #22c55e}.guided-lesson-block.theme-amber{border-left:4px solid #f59e0b}.guided-lesson-block.theme-red{border-left:4px solid #ef4444}.guided-lesson-block.theme-purple{border-left:4px solid #8b5cf6}.guided-lesson-block.theme-neutral{border-left:4px solid #64748b}.guided-lesson-block.theme-amber .guided-block-accent{background:#fffbeb}.guided-lesson-block.theme-red .guided-block-accent{background:#fef2f2}.guided-lesson-block.theme-purple .guided-block-accent{background:#faf5ff}
.guided-block-media{margin:4px 0 16px;border-radius:17px;overflow:hidden;background:#eef3f8}.guided-block-media img,.guided-block-media video{display:block;width:100%;max-height:520px;object-fit:contain}.guided-block-media iframe{display:block;width:100%;aspect-ratio:16/9;border:0}.guided-block-media audio{width:100%;margin:12px 0}.guided-block-media .public-media-card{margin:0}
.guided-expandable{border:1px solid #dbe5f4;border-radius:14px;background:#f8fafc}.guided-expandable summary{padding:13px 15px;font-weight:900;cursor:pointer}.guided-expandable>div{padding:0 15px 15px;color:#334155;line-height:1.65}.guided-reflection{display:grid;gap:9px}.guided-reflection label{font-weight:900;color:#334155}.guided-reflection textarea{min-height:110px;padding:12px;border:1px solid #cbd5e1;border-radius:13px;resize:vertical}.guided-reflection button,.guided-quiz-cta{justify-self:start;padding:10px 14px;border:0;border-radius:12px;background:#2563eb;color:#fff;font-weight:900}.guided-checkpoint{display:flex;align-items:center;gap:10px;padding:14px;border:1px solid #bbf7d0;border-radius:14px;background:#f0fdf4;color:#166534;font-weight:900}.guided-checkpoint input{width:20px;height:20px}.guided-quiz-cta{display:flex;align-items:center;gap:9px}.guided-quiz-cta span{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#fff;color:#2563eb}.guided-flashcards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.guided-flashcards button{min-height:120px;padding:14px;border:1px solid #bfdbfe;border-radius:16px;background:#eff6ff;color:#1e3a8a}.guided-flashcards button strong{display:none}.guided-flashcards button.flipped span{display:none}.guided-flashcards button.flipped strong{display:block}
.guided-experience-footer{position:sticky;bottom:14px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;border:1px solid #bfdbfe;border-radius:17px;background:rgba(255,255,255,.94);box-shadow:0 12px 34px rgba(15,23,42,.14);backdrop-filter:blur(12px)}.guided-experience-footer>div{flex:1;display:grid;gap:7px}.guided-experience-footer strong{color:#173460}.guided-progress-bar{height:7px;border-radius:999px;background:#dbe7f5;overflow:hidden}.guided-progress-bar i{display:block;width:var(--guided-progress);height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#22c55e)}.guided-experience-footer button{padding:10px 14px;border:0;border-radius:12px;background:#2563eb;color:#fff;font-weight:900}.guided-empty{padding:32px;border:1px dashed #b9c9df;border-radius:18px;text-align:center;color:#64748b}
@media(max-width:720px){.guided-lesson-experience{gap:12px}.guided-experience-head{padding:17px;border-radius:19px}.guided-progress-ring{flex-basis:68px;width:68px;height:68px}.guided-progress-ring strong{font-size:16px}.guided-journey{display:flex;overflow-x:auto}.guided-journey span{flex:0 0 auto;padding:7px 11px}.guided-objectives ul{grid-template-columns:1fr}.guided-lesson-block{grid-template-columns:1fr;border-radius:18px}.guided-block-accent{justify-content:flex-start;padding:11px 14px;border-right:0;border-bottom:1px solid #dbeafe}.guided-block-accent span{width:31px;height:31px}.guided-block-main{padding:15px}.guided-block-body{font-size:16px;line-height:1.65}.guided-experience-footer{bottom:64px;align-items:stretch;flex-direction:column}.guided-experience-footer button{width:100%}}
@media(prefers-reduced-motion:reduce){.guided-lesson-block{transition:none}.guided-lesson-block:hover{transform:none}}
.guided-experience-active > .substep-help-frame,
.guided-experience-active > .lesson-more-actions { display: none !important; }

.guided-block-tools{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;margin:-4px 0 12px}.guided-block-tools button{border:1px solid #d6e2f3;background:#fff;color:#38506f;border-radius:999px;min-height:30px;padding:4px 9px;display:inline-flex;align-items:center;gap:5px;font-weight:800}.guided-block-tools button.active{background:#e7f8ed;border-color:#18ad58;color:#08712f;box-shadow:inset 0 0 0 1px #18ad58}.guided-block-tools button span{font-size:11px}.saved-highlight{background:#fff19a;border-radius:3px;padding:0 2px;box-decoration-break:clone}.phase4-note-modal,.saved-learning-drawer{position:fixed;inset:0;z-index:10050;display:none}.phase4-note-modal.show,.saved-learning-drawer.show{display:block}.phase4-note-backdrop,.saved-learning-drawer>div{position:absolute;inset:0;background:rgba(12,28,52,.55);backdrop-filter:blur(3px)}.phase4-note-modal>section{position:relative;width:min(520px,calc(100% - 28px));max-height:82vh;overflow:auto;margin:9vh auto;background:#fff;border-radius:22px;padding:20px;box-shadow:0 24px 70px rgba(12,32,64,.28)}.phase4-note-modal header,.phase4-note-modal footer,.saved-learning-drawer header{display:flex;align-items:center;justify-content:space-between;gap:12px}.phase4-note-modal header div{display:grid}.phase4-note-modal header small,.saved-learning-drawer header small{font-size:11px;letter-spacing:.12em;color:#58708f}.phase4-note-modal header button,.saved-learning-drawer header button{border:0;background:#eef4fb;border-radius:50%;width:36px;height:36px;font-size:22px}.phase4-note-modal textarea{width:100%;margin:18px 0;padding:14px;border:1px solid #cad9eb;border-radius:14px;resize:vertical}.phase4-note-list{display:grid;gap:8px;margin-top:16px}.phase4-note-list article{display:grid;gap:8px;padding:11px;border:1px solid #dbe5f1;border-radius:12px;background:#f8fbff}.phase4-note-list article p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#344b68}.phase4-note-list article div{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.phase4-note-list article small{margin-right:auto;color:#6a7e98}.phase4-note-list article button{min-height:30px;border:1px solid #cad9eb;border-radius:8px;background:#fff;padding:4px 8px;font-weight:800}.phase4-note-list article button.danger{border-color:#fecaca;color:#b91c1c}.saved-learning-button{width:38px;height:38px;border:1px solid #cad9eb;border-radius:50%;background:#fff;color:#175ee5;font-size:20px}.saved-learning-drawer>section{position:absolute;top:0;right:0;width:min(430px,92vw);height:100%;background:#f7faff;padding:18px;overflow:auto;box-shadow:-18px 0 50px rgba(12,32,64,.22)}.saved-learning-body h3{margin:22px 0 10px;font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#526b8a}.saved-learning-body article{display:grid;grid-template-columns:36px 1fr;gap:10px;background:#fff;border:1px solid #dbe5f1;border-radius:14px;padding:12px;margin-bottom:9px}.saved-learning-body article i{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#e9f2ff;color:#165de5;font-style:normal;font-weight:900}.saved-learning-body article div{display:grid;gap:3px}.saved-learning-body article p{margin:0;color:#49617e}.saved-learning-body article small{color:#6a7e98}.saved-learning-empty{padding:40px 20px;text-align:center;color:#657a96}
@media(max-width:620px){.guided-block-tools{position:relative;justify-content:center;flex-wrap:nowrap;overflow-x:auto}.guided-block-tools button{min-width:34px;width:34px;height:34px;padding:0;justify-content:center}.guided-block-tools button span{display:none}.saved-learning-button{width:32px;height:32px;font-size:17px}.phase4-note-modal>section{margin:8vh auto}}
.saved-learning-body .saved-note-manage{justify-self:start;margin-top:5px;min-height:30px;border:1px solid #bfd2eb;border-radius:8px;background:#fff;color:#175ee5;padding:4px 9px;font-weight:800}

/* Phase 5: trackable How-to experience */
.trackable-how{display:grid;gap:16px;margin-top:12px}.trackable-how [hidden]{display:none!important}.trackable-how-tasks,.trackable-how-method-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.trackable-how-tasks button,.trackable-how-method-cards button{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 10px;min-width:0;padding:12px;border:1px solid #cfddf2;border-radius:15px;background:#fff;color:#15233d;text-align:left;cursor:pointer}.trackable-how-tasks button span,.trackable-how-method-cards button span{grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#edf3ff;color:#1760e9;font-weight:900}.trackable-how-tasks button b,.trackable-how-method-cards button b{overflow:hidden;text-overflow:ellipsis}.trackable-how-tasks button.active,.trackable-how-method-cards button.active{border-color:#1769f3;box-shadow:0 0 0 2px #1769f31c;background:#f4f8ff}.trackable-how-method-cards button.complete{border-color:#20af61;background:#f1fff6}.trackable-how-method-cards button.complete span{background:#20af61;color:white}.trackable-how-method-cards small{grid-column:2;color:#62738f}.trackable-how-task{display:grid;gap:14px}.trackable-how-task-head,.trackable-how-method-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.trackable-how-task-head>div>span{color:#1769f3;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.09em}.trackable-how-task-head h3,.trackable-how-method-head h4{margin:3px 0 0;color:#10203a}.trackable-how-task-head>b{padding:8px 11px;border-radius:999px;background:#edf3ff;color:#36567f;font-size:12px}.trackable-how-task-head>b.complete{background:#ddf9e8;color:#157840}.trackable-how-method{display:grid;gap:16px;padding:18px;border:1px solid #d5e1f1;border-radius:20px;background:#fff;box-shadow:0 14px 36px #29477212}.trackable-how-method.complete{border-color:#7edda6}.trackable-how-method-head>div:first-child{display:flex;gap:11px}.trackable-how-method-icon{display:grid;place-items:center;flex:0 0 auto;width:36px;height:36px;border-radius:12px;background:#eaf2ff;color:#1769f3;font-weight:900}.trackable-how-method.complete .trackable-how-method-icon{background:#20af61;color:#fff}.trackable-how-method-head p{margin:5px 0 0;color:#60718b}.trackable-how-meta{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.trackable-how-meta span,.trackable-how-meta b{padding:6px 9px;border-radius:999px;background:#f0f4fa;color:#526782;font-size:11px;text-transform:capitalize}.trackable-how-meta b{background:#fff1c6;color:#7b5700}.trackable-how-materials{border:1px solid #e0e7f1;border-radius:13px;background:#f8fafc}.trackable-how-materials summary{padding:11px 13px;font-weight:800;cursor:pointer}.trackable-how-materials ul{margin:0;padding:0 30px 13px}.trackable-how-progress{display:grid;gap:8px}.trackable-how-progress span{color:#536984;font-size:12px}.trackable-how-progress i{display:block;height:8px;overflow:hidden;border-radius:999px;background:#e9eef5}.trackable-how-progress i:after{content:"";display:block;width:var(--how-progress);height:100%;border-radius:inherit;background:linear-gradient(90deg,#1769f3,#20af61);transition:width .25s ease}.trackable-how-steps{display:grid;gap:12px}.trackable-how-step{display:grid;grid-template-columns:115px minmax(0,1fr);grid-template-areas:"check text" "media media";gap:12px;padding:14px;border:1px solid #dbe4f1;border-radius:16px;background:#fbfcfe}.trackable-how-step.complete{border-color:#91dfb0;background:#f5fff8}.trackable-how-check{grid-area:check;align-self:start;display:grid;justify-items:center;gap:5px;padding:0;border:0;background:transparent;color:#526984;cursor:pointer}.trackable-how-check span{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#e8f0ff;color:#1769f3;font-weight:900}.trackable-how-step.complete .trackable-how-check span{background:#20af61;color:#fff}.trackable-how-check small{font-size:10px;font-weight:800;text-align:center}.trackable-how-instruction{grid-area:text;align-self:center;color:#1e304c;line-height:1.65}.trackable-how-media{grid-area:media;min-width:0}.trackable-how-media .how-flow-media{margin:0;max-width:none}.trackable-how-media img,.trackable-how-media video,.trackable-how-media iframe{max-width:100%;border-radius:13px}.trackable-how-verify{display:grid;gap:8px;padding:14px;border-radius:15px;background:#f4f8ff}.trackable-how-verify label{font-weight:800;color:#1b3153}.trackable-how-verify>div{display:flex;gap:8px}.trackable-how-verify input{flex:1;min-width:0;padding:10px 12px;border:1px solid #c8d8ef;border-radius:10px}.trackable-how-verify button{padding:10px 14px;border:0;border-radius:10px;background:#1769f3;color:#fff;font-weight:800}.trackable-how-verify small{color:#59708e}.trackable-how-verify.incorrect{background:#fff5f2}.trackable-how-verify.incorrect small{color:#bd3e22}.trackable-how-method>footer{padding-top:12px;border-top:1px solid #e2e9f2;color:#53708e}.trackable-how-method.complete>footer{color:#138147}

@media(max-width:700px){.trackable-how-tasks,.trackable-how-method-cards{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:3px}.trackable-how-tasks button,.trackable-how-method-cards button{flex:0 0 78%;scroll-snap-align:center}.trackable-how-task-head,.trackable-how-method-head{display:grid}.trackable-how-meta{justify-content:flex-start}.trackable-how-method{padding:13px;border-radius:17px}.trackable-how-step{grid-template-columns:48px minmax(0,1fr);grid-template-areas:"check text" "media media";padding:11px}.trackable-how-check small{display:none}.trackable-how-check span{width:34px;height:34px}.trackable-how-verify>div{display:grid}.trackable-how-verify button{width:100%}}

.quiz-session-loading,.quiz-session-error{min-height:260px;display:grid;place-content:center;text-align:center;gap:12px;padding:32px;color:#183153}.quiz-session-loading span{width:42px;height:42px;border:4px solid #dbe8ff;border-top-color:#2468ed;border-radius:50%;animation:quizSpin .8s linear infinite;margin:auto}@keyframes quizSpin{to{transform:rotate(360deg)}}
.quiz-session-card{--quiz-accent:#2468ed;max-width:780px;margin:auto;background:#fff;border:1px solid #d7e3f7;border-radius:24px;overflow:hidden;box-shadow:0 20px 54px rgba(22,48,82,.12)}.quiz-session-card.correct{--quiz-accent:#13a65a}.quiz-session-card.incorrect{--quiz-accent:#e85d31}.quiz-session-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px}.quiz-session-top>div:first-child{display:flex;align-items:center;gap:10px}.quiz-session-top small{font-weight:800;color:#62738f}.quiz-session-top strong{text-transform:capitalize;padding:5px 9px;border-radius:999px;background:#edf4ff;color:#1954bc;font-size:12px}.quiz-session-stats{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.quiz-session-stats>span{font-size:12px;font-weight:800;color:#526582;background:#f5f8fc;padding:6px 8px;border-radius:10px}.quiz-session-progress{height:5px;background:#e8eef8}.quiz-session-progress i{display:block;height:100%;background:var(--quiz-accent);transition:width .35s}.quiz-session-card main{padding:24px 28px}.quiz-session-card main.needs-answer{animation:quizShake .25s 2}@keyframes quizShake{50%{transform:translateX(5px)}}.quiz-session-card h2{font-size:clamp(20px,3vw,28px);line-height:1.3;margin:18px 0 22px;color:#10213b}.quiz-session-media{margin:0 auto 18px;border-radius:18px;overflow:hidden;background:#eef4fb;max-height:360px;display:grid;place-items:center}.quiz-session-media img,.quiz-session-media video{display:block;width:100%;max-height:360px;object-fit:contain}.quiz-session-media.video{aspect-ratio:16/9}.quiz-session-media iframe{width:100%;height:100%;border:0}.quiz-session-media.audio{padding:18px}.quiz-session-media audio{width:100%}
.quiz-session-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.quiz-session-option{position:relative;display:flex;min-height:64px;border:2px solid #d9e3f2;border-radius:16px;padding:10px 14px;cursor:pointer;transition:.18s}.quiz-session-option:hover{border-color:#8db5fb;transform:translateY(-1px)}.quiz-session-option:has(input:checked){border-color:#2468ed;background:#edf4ff;box-shadow:0 0 0 3px rgba(36,104,237,.1)}.quiz-session-option input{position:absolute;opacity:0}.quiz-option-marker{width:22px;height:22px;border:2px solid #aebdd1;border-radius:50%;flex:0 0 auto;margin:8px 10px 0 0}.quiz-session-option:has(input:checked) .quiz-option-marker{border:7px solid #2468ed}.quiz-option-content{display:flex;align-items:center;gap:10px;min-width:0}.quiz-option-content .quiz-session-media{width:58px;height:46px;margin:0;border-radius:9px;flex:0 0 auto}.quiz-option-content b{line-height:1.3}.quiz-session-text-answer{display:grid;gap:8px;font-weight:800}.quiz-session-text-answer input{width:100%;font:inherit;font-size:17px;padding:14px 16px;border:2px solid #cedcf0;border-radius:14px}.quiz-session-text-answer input:focus{outline:3px solid rgba(36,104,237,.14);border-color:#2468ed}.quiz-session-order,.quiz-session-match{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quiz-session-order button,.quiz-session-match button{border:2px solid #d8e3f2;background:#fff;border-radius:14px;padding:13px;text-align:left;font-weight:800;color:#19304f}.quiz-session-order button.selected,.quiz-session-match button.selected{border-color:#13a65a;background:#eafaf1}.quiz-session-order button span{display:inline-grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#edf3fb;margin-right:8px}.quiz-session-help{display:block;margin-top:8px;color:#687995}.quiz-session-card>footer{display:flex;justify-content:space-between;gap:12px;padding:18px 28px;border-top:1px solid #e2eaf5}.quiz-session-card>footer button,.quiz-session-feedback button{border:0;border-radius:12px;padding:11px 18px;font-weight:900;cursor:pointer}.quiz-hint-btn{background:#fff5df;color:#8b5900}.quiz-submit-btn,.quiz-session-feedback button{background:#2468ed;color:#fff}.quiz-session-save-state{text-align:center;font-size:11px;color:#7a899d;padding:0 20px 14px}.quiz-session-hint{display:none;margin:14px 0 0;padding:13px;border-radius:13px;background:#fff7dd;color:#6f4d00}.quiz-session-hint.show{display:block}.quiz-session-hint p{margin:5px 0}.quiz-session-timer{--timer-progress:100%;display:grid;place-items:center;min-width:54px;height:42px;border-radius:14px;background:conic-gradient(#2468ed var(--timer-progress),#e8eef8 0);position:relative;color:#153259}.quiz-session-timer:before{content:"";position:absolute;inset:4px;border-radius:11px;background:#fff}.quiz-session-timer{isolation:isolate}.quiz-session-timer:after{content:""}.quiz-session-timer{font-size:13px}.quiz-session-timer>*{position:relative}.quiz-session-timer.urgent{color:#c53f23;animation:quizPulse .8s infinite}@keyframes quizPulse{50%{transform:scale(1.06)}}
.quiz-session-feedback{padding:18px 28px;background:#eef9f3;border-top:1px solid #bfe9d1;display:flex;align-items:center;justify-content:space-between;gap:15px}.quiz-session-feedback.incorrect{background:#fff3ed;border-color:#ffd0bd}.quiz-session-feedback>div{display:flex;gap:12px}.quiz-session-feedback>div>span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#13a65a;color:#fff;font-weight:900}.quiz-session-feedback.incorrect>div>span{background:#e85d31}.quiz-session-feedback p{margin:5px 0;line-height:1.45}.quiz-session-feedback small{color:#5e6d82;font-weight:700}
.quiz-results{max-width:720px;margin:auto;text-align:center;background:#fff;border:1px solid #d7e3f7;border-radius:26px;padding:34px;box-shadow:0 20px 54px rgba(22,48,82,.12)}.quiz-result-burst{width:70px;height:70px;display:grid;place-items:center;margin:auto;border-radius:50%;background:#e9fff2;color:#12a45a;font-size:38px}.quiz-results.review .quiz-result-burst{background:#fff0e9;color:#e85d31}.quiz-results>small{text-transform:uppercase;letter-spacing:.11em;font-weight:900;color:#6d7b90;display:block;margin-top:14px}.quiz-results h2{font-size:58px;margin:6px 0;color:#183153}.quiz-results>p{max-width:520px;margin:0 auto 22px;color:#5c6c82}.quiz-result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.quiz-result-grid span{background:#f4f7fb;border-radius:14px;padding:12px;color:#62728a;font-size:12px}.quiz-result-grid b{display:block;color:#17304f;font-size:20px}.quiz-result-best{margin:15px;font-weight:800;color:#526582}.quiz-results footer{display:flex;justify-content:center;gap:10px}.quiz-results footer button{border:0;border-radius:12px;padding:12px 18px;font-weight:900}.quiz-results .btn-primary{background:#2468ed;color:#fff}.quiz-results .btn-ghost{background:#edf2f8;color:#213957}
@media(max-width:620px){.lesson-quiz-modal-card{width:calc(100% - 18px)}.quiz-session-top{align-items:flex-start;padding:14px}.quiz-session-stats>span{display:none}.quiz-session-card main{padding:18px}.quiz-session-options,.quiz-session-order,.quiz-session-match{grid-template-columns:1fr}.quiz-session-card>footer,.quiz-session-feedback{padding:14px 18px}.quiz-session-feedback{align-items:stretch;flex-direction:column}.quiz-session-feedback button{width:100%}.quiz-result-grid{grid-template-columns:repeat(2,1fr)}.quiz-results{padding:24px 16px}.quiz-results h2{font-size:46px}}
@media(prefers-reduced-motion:reduce){.quiz-session-loading span,.quiz-session-timer.urgent{animation:none!important}.quiz-session-option{transition:none}}
.quiz-session-match-game{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:44px}.quiz-session-match-game .match-column{display:grid;gap:10px;align-content:start;position:relative;z-index:1}.quiz-session-match-game button{border:2px solid #d8e3f2;background:#fff;border-radius:14px;padding:13px;text-align:left;font-weight:800;color:#19304f}.quiz-session-match-game button.active{border-color:#2468ed;background:#edf4ff}.quiz-session-match-game button.paired{border-color:#13a65a;background:#eafaf1}.quiz-session-match-game svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.quiz-session-match-game path{fill:none;stroke:#13a65a;stroke-width:3;stroke-linecap:round}.quiz-session-timer:before,.quiz-session-timer:after{display:none}.quiz-session-timer{background:linear-gradient(#fff,#fff) padding-box,conic-gradient(#2468ed var(--timer-progress),#e8eef8 0) border-box;border:4px solid transparent;position:static}
.quiz-result-badges{margin:18px 0;padding:14px;border-radius:16px;background:#fff8dd}.quiz-result-badges>strong{display:block;margin-bottom:8px}.quiz-result-badges span{display:inline-flex;align-items:center;gap:5px;margin:4px;padding:8px 10px;border-radius:999px;background:#fff;color:#7a5600}.quiz-result-review{text-align:left;margin:16px 0;border:1px solid #dce6f3;border-radius:15px;padding:12px}.quiz-result-review summary{cursor:pointer;font-weight:900}.quiz-result-review ul{list-style:none;padding:0;margin:10px 0 0}.quiz-result-review li{display:flex;gap:10px;padding:10px 0;border-top:1px solid #e7edf5}.quiz-result-review li>span{height:max-content;background:#fff0e9;color:#b6421d;border-radius:999px;padding:4px 7px;font-size:10px;font-weight:900}.quiz-result-review li div{display:grid;gap:4px}.quiz-result-review li small{color:#63738a}.quiz-result-review li button{width:max-content;border:0;background:none;color:#175cd3;padding:0;font-weight:800;cursor:pointer}
@media(max-width:620px){.quiz-session-match-game{gap:18px}.quiz-session-match-game button{padding:10px;font-size:12px}}
.quiz-session-card > footer .quiz-next-icon {
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: #1768ed;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(23,104,237,.24);
}
.quiz-session-order button.selected span { background: #1768ed; color: #fff; }

.sir-tool-launcher{position:fixed;right:18px;bottom:86px;z-index:1100;border:0;border-radius:999px;background:#0f8a7c;color:#fff;padding:11px 16px;font-weight:800;box-shadow:0 12px 30px rgba(15,138,124,.3);cursor:pointer}.sir-tool-launcher span{margin-right:6px}.sir-tool-modal{position:fixed;inset:0;z-index:1500;display:none;background:rgba(12,28,52,.66);backdrop-filter:blur(6px);padding:18px}.sir-tool-modal.open{display:grid;place-items:center}.sir-tool-shell{width:min(1160px,100%);height:min(820px,96vh);display:grid;grid-template-columns:290px minmax(0,1fr);overflow:hidden;border-radius:24px;background:#f6f9ff;box-shadow:0 30px 80px rgba(0,0,0,.3)}.sir-tool-library{min-width:0;overflow:auto;padding:20px;background:linear-gradient(180deg,#eaf3ff,#e9fff7);border-right:1px solid #ceddf2}.sir-tool-library-head,.sir-tool-work-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.sir-tool-library h2,.sir-tool-work-head h2{margin:0;color:#10223c}.sir-tool-close{border:0;background:#fff;border-radius:50%;width:38px;height:38px;font-size:22px;cursor:pointer}.sir-tool-search{width:100%;box-sizing:border-box;margin:16px 0 10px;padding:11px 13px;border:1px solid #bdd0e9;border-radius:12px;background:#fff}.sir-tool-categories{display:flex;gap:6px;overflow:auto;padding-bottom:8px}.sir-tool-categories button{white-space:nowrap;border:1px solid #bdd0e9;border-radius:999px;background:#fff;padding:7px 10px;color:#234;cursor:pointer}.sir-tool-categories button.active{background:#2468ef;color:#fff;border-color:#2468ef}.sir-tool-list{display:grid;gap:8px}.sir-tool-item{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:10px;width:100%;text-align:left;border:1px solid #cfdded;border-radius:14px;background:#fff;padding:10px;cursor:pointer;color:#17243b}.sir-tool-item.active{border-color:#2468ef;box-shadow:inset 3px 0 #2468ef;background:#edf4ff}.sir-tool-item-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#e8f1ff;font-size:19px}.sir-tool-item small{display:block;color:#63748e;margin-top:2px}.sir-tool-work{min-width:0;overflow:auto;padding:24px}.sir-tool-work-head{position:sticky;top:-24px;z-index:2;margin:-24px -24px 18px;padding:20px 24px;background:rgba(246,249,255,.94);border-bottom:1px solid #d7e2f1;backdrop-filter:blur(10px)}.sir-tool-work-head p{margin:4px 0 0;color:#65748c}.sir-tool-badge{display:inline-flex;border-radius:999px;background:#e9f0ff;color:#1f5dcb;padding:5px 9px;font-size:12px;font-weight:800}.sir-tool-body{display:grid;gap:16px}.sir-tool-empty{padding:30px;text-align:center;border:1px dashed #b8c9df;border-radius:16px;color:#64748b;background:#fff}.sir-tool-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sir-tool-actions button,.sir-tool-primary,.sir-tool-entry-add button,.sir-branch-card button{border:1px solid #bcd0e7;border-radius:11px;background:#fff;padding:9px 13px;font-weight:750;cursor:pointer}.sir-tool-primary{background:#2468ef!important;color:#fff!important;border-color:#2468ef!important}.sir-calc{max-width:440px;margin:auto;padding:18px;border-radius:20px;background:#14233d}.sir-calc-display{width:100%;box-sizing:border-box;border:0;border-radius:12px;background:#f8fbff;padding:16px;text-align:right;font-size:28px}.sir-calc-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}.sir-calc-keys button{padding:14px;border:0;border-radius:10px;background:#fff;font-weight:800}.sir-converter{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:end;max-width:700px}.sir-converter label{display:grid;gap:6px;font-weight:700}.sir-converter input,.sir-converter select,.sir-tool-form input,.sir-tool-form select,.sir-tool-form textarea,.sir-tool-entry-add input,.sir-tool-entry-add textarea,.sir-tool-body>input[type=search],.sir-tool-shared-compose textarea{width:100%;box-sizing:border-box;padding:11px;border:1px solid #bed0e6;border-radius:11px;background:#fff}.sir-tool-form,.sir-tool-checklist,.sir-tool-entries,.sir-tool-ordered,.sir-tool-shared-feed{display:grid;gap:10px}.sir-tool-form label{display:grid;gap:6px;font-weight:700}.sir-tool-checklist label{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #d5e1ef;border-radius:12px;background:#fff}.sir-tool-checklist input{width:20px;height:20px}.sir-tool-textarea{width:100%;min-height:330px;box-sizing:border-box;border:1px solid #c8d7e9;border-radius:15px;padding:16px;resize:vertical;font:inherit;line-height:1.55}.sir-tool-entry-add{display:flex;gap:8px}.sir-tool-entry-add input,.sir-tool-entry-add textarea{flex:1}.sir-tool-entries article,.sir-tool-ordered article,.sir-tool-shared-feed article{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #d5e1ef;border-radius:13px;background:#fff}.sir-tool-entries article.done strong{text-decoration:line-through;color:#718096}.sir-tool-entries article>div,.sir-tool-ordered article>div:nth-child(2){flex:1}.sir-tool-entries small,.sir-tool-shared-feed small{color:#718096}.sir-tool-timer{text-align:center;padding:35px;border-radius:20px;background:linear-gradient(135deg,#eef4ff,#e9fff6)}.sir-tool-timer-face{font-size:clamp(44px,8vw,84px);font-weight:900;color:#123}.sir-flashcard{position:relative;min-height:280px;cursor:pointer;perspective:900px}.sir-flashcard>div{position:absolute;inset:0;display:grid;place-content:center;text-align:center;gap:16px;padding:30px;border-radius:20px;background:linear-gradient(135deg,#2468ef,#6845df);color:#fff;backface-visibility:hidden;transition:transform .45s}.sir-flashcard>div:nth-child(2){transform:rotateY(180deg);background:linear-gradient(135deg,#0f9a69,#0b7a8e)}.sir-flashcard.flipped>div:first-child{transform:rotateY(180deg)}.sir-flashcard.flipped>div:nth-child(2){transform:rotateY(0)}.sir-flashcard strong{font-size:clamp(22px,4vw,40px)}#sirGlossaryList{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}#sirGlossaryList article{padding:14px;border:1px solid #d4e0ee;border-radius:13px;background:#fff}#sirGlossaryList p{margin:6px 0}.sir-tool-ordered article>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#2468ef;color:#fff;font-weight:900}.sir-comparison,.sir-data-table{overflow:auto}.sir-comparison table,.sir-data-table table{width:100%;border-collapse:separate;border-spacing:0}.sir-comparison th,.sir-comparison td,.sir-data-table th,.sir-data-table td{padding:10px;border:1px solid #d6e1ee;background:#fff}.sir-comparison input,.sir-data-table input{width:100%;box-sizing:border-box;border:0;padding:7px}.sir-branch-card{padding:24px;border:1px solid #c8d7e9;border-radius:18px;background:linear-gradient(135deg,#fff,#eef6ff)}.sir-branch-card div{display:grid;gap:8px}.sir-interactive-video{width:100%;max-height:520px;border-radius:16px;background:#000}.sir-tool-shared-compose{display:grid;gap:10px;padding:15px;border-radius:15px;background:#fff;border:1px solid #d5e1ef}.sir-tool-shared-feed article{display:block}.sir-tool-shared-feed p{margin:6px 0}.sir-tool-progress{height:7px;border-radius:99px;background:#dae4f1;overflow:hidden}.sir-tool-progress i{display:block;height:100%;background:#18b861}.sir-tool-toast{position:fixed;left:50%;bottom:100px;z-index:1800;transform:translateX(-50%);padding:11px 16px;border-radius:999px;background:#10233f;color:#fff;font-weight:700;box-shadow:0 10px 30px rgba(0,0,0,.25)}
@media(max-width:760px){.sir-tool-launcher{right:10px;bottom:74px;width:42px;height:42px;padding:0}.sir-tool-launcher span{margin:0}.sir-tool-launcher b{display:none}.sir-tool-modal{padding:0}.sir-tool-shell{height:100%;border-radius:0;grid-template-columns:1fr}.sir-tool-library{border:0;padding:14px}.sir-tool-shell.tool-open .sir-tool-library{display:none}.sir-tool-work{display:none;padding:18px}.sir-tool-shell.tool-open .sir-tool-work{display:block}.sir-tool-work-head{top:-18px;margin:-18px -18px 14px;padding:14px 18px}.sir-tool-work-head:before{content:'‹ Tools';color:#2468ef;font-weight:800;cursor:pointer}.sir-converter{grid-template-columns:1fr}.sir-tool-entry-add{flex-direction:column}.sir-tool-textarea{min-height:260px}}
@media(prefers-reduced-motion:reduce){.sir-flashcard>div{transition:none}}

/* Runtime workspace structure */
.sir-global-tools-button{position:fixed;right:18px;bottom:88px;z-index:1100;border:0;border-radius:999px;background:#0f8a7c;color:#fff;padding:11px 16px;font-weight:800;box-shadow:0 12px 30px rgba(15,138,124,.3);cursor:pointer}.sir-global-tools-button span{margin-right:6px}.sir-tool-platform-modal{position:fixed;inset:0;z-index:1500;display:none;padding:18px}.sir-tool-platform-modal.show{display:grid;place-items:center}.sir-tool-platform-backdrop{position:absolute;inset:0;background:rgba(12,28,52,.66);backdrop-filter:blur(6px)}.sir-tool-platform-shell{position:relative;width:min(1160px,100%);height:min(820px,96vh);display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;border-radius:24px;background:#f6f9ff;box-shadow:0 30px 80px rgba(0,0,0,.3)}.sir-tool-platform-shell>header{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;background:#fff;border-bottom:1px solid #d7e2f1}.sir-tool-platform-shell>header h2{margin:2px 0}.sir-tool-platform-shell>header small{font-weight:800;color:#627593}.sir-tool-platform-shell>header button{border:0;border-radius:50%;width:38px;height:38px;background:#eef3f9;font-size:22px;cursor:pointer}.sir-tool-platform-layout{display:grid;grid-template-columns:290px minmax(0,1fr);min-height:0}.sir-tool-platform-layout>aside{overflow:auto;padding:16px;background:linear-gradient(180deg,#eaf3ff,#e9fff7);border-right:1px solid #ceddf2}.sir-tool-platform-layout>aside>input{width:100%;box-sizing:border-box;padding:11px;border:1px solid #bdd0e9;border-radius:12px}.sir-tool-library-group h3{text-transform:capitalize;font-size:12px;letter-spacing:.08em;color:#60728d}.sir-tool-library-group button{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:9px;width:100%;margin:7px 0;padding:10px;text-align:left;border:1px solid #cfdded;border-radius:13px;background:#fff;cursor:pointer}.sir-tool-library-group button.active{border-color:#2468ef;box-shadow:inset 3px 0 #2468ef;background:#edf4ff}.sir-tool-library-group button i{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#e8f1ff;font-style:normal;font-size:19px}.sir-tool-library-group button small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6a7b94}.sir-tool-platform-layout>main{overflow:auto;padding:24px}.sir-tool-welcome,.sir-tool-loading,.sir-tool-error{display:grid;place-content:center;text-align:center;min-height:100%;color:#63748e}.sir-tool-work-card>header{display:flex;justify-content:space-between;gap:16px;margin-bottom:18px}.sir-tool-work-card>header h2{margin:3px 0}.sir-tool-work-card>header p{margin:4px 0;color:#63748e}.sir-tool-work-card>header>span{align-self:start;border-radius:999px;background:#e3edff;color:#1e5fd5;padding:7px 10px;font-weight:800}.sir-tool-work-card>footer{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:14px;border-top:1px solid #d7e2f1;color:#63748e}.sir-tool-work-card>footer button{border:0;border-radius:999px;background:#2468ef;color:#fff;padding:10px 15px;font-weight:800;cursor:pointer}.sir-tool-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.sir-tool-form-grid label{display:grid;gap:6px;font-weight:700}.sir-tool-form-grid input,.sir-calc-display{box-sizing:border-box;width:100%;padding:11px;border:1px solid #bed0e6;border-radius:11px}.sir-calc-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.sir-calc-keys button{padding:13px;border:1px solid #d5e1ef;border-radius:10px;background:#fff;font-weight:800;cursor:pointer}.sir-tool-body output{display:block;margin-top:12px;padding:14px;border-radius:12px;background:#eef5ff;font-size:22px;font-weight:850}.sir-tool-platform-open{overflow:hidden}
@media(max-width:760px){.sir-global-tools-button{right:9px;bottom:74px;width:42px;height:42px;padding:0}.sir-global-tools-button span{margin:0}.sir-global-tools-button b{display:none}.sir-tool-platform-modal{padding:0}.sir-tool-platform-shell{height:100%;border-radius:0}.sir-tool-platform-layout{grid-template-columns:1fr;grid-template-rows:42% 58%}.sir-tool-platform-layout>aside{border-right:0;border-bottom:1px solid #ceddf2;padding:12px}.sir-tool-platform-layout>main{padding:16px}.sir-tool-work-card>header{margin-bottom:12px}}

/* At tablet and compact-desktop widths the right rail becomes a Progress
   drawer. Keep its opener and the global Tools button in separate positions. */
@media (min-width:901px) and (max-width:1250px) {
  body.course-active-mode .sir-global-tools-button {
    right: 12px;
    bottom: 140px;
  }

  body.course-active-mode .responsive-right-toggle {
    right: 12px;
    bottom: 84px;
  }
}

/* Desktop course-header action sizing contract.
   Keep every control on one 40px rhythm while preserving primary pills. */
@media (min-width: 681px) {
  body.course-active-mode header.topbar > .top-actions {
    --sir-header-action-size: 40px;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  body.course-active-mode header.topbar .saved-learning-button,
  body.course-active-mode header.topbar #mainMenuBtn,
  body.course-active-mode header.topbar .learner-notification-bell,
  body.course-active-mode header.topbar #voiceMasterBtn,
  body.course-active-mode header.topbar .floating-lang-btn {
    box-sizing: border-box !important;
    display: inline-grid !important;
    place-items: center !important;
    flex: 0 0 var(--sir-header-action-size) !important;
    width: var(--sir-header-action-size) !important;
    min-width: var(--sir-header-action-size) !important;
    max-width: var(--sir-header-action-size) !important;
    height: var(--sir-header-action-size) !important;
    min-height: var(--sir-header-action-size) !important;
    max-height: var(--sir-header-action-size) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #d4e2f5 !important;
    border-radius: 999px !important;
    line-height: 1 !important;
  }

  body.course-active-mode header.topbar .floating-lang {
    position: relative !important;
    display: block !important;
    flex: 0 0 var(--sir-header-action-size) !important;
    width: var(--sir-header-action-size) !important;
    height: var(--sir-header-action-size) !important;
    margin: 0 !important;
  }

  body.course-active-mode header.topbar #courseNewsLink,
  body.course-active-mode header.topbar #courseCompletionFab {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    height: var(--sir-header-action-size) !important;
    min-height: var(--sir-header-action-size) !important;
    max-height: var(--sir-header-action-size) !important;
    margin: 0 !important;
    padding: 0 15px !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.course-active-mode header.topbar .saved-learning-button {
    font-size: 18px !important;
  }

  body.course-active-mode header.topbar .learner-notification-bell {
    font-size: 17px !important;
  }

  body.course-active-mode header.topbar #mainMenuBtn {
    font-size: 17px !important;
  }

  body.course-active-mode header.topbar .floating-lang-btn {
    font-size: 12px !important;
  }
}

/* Contextual lesson tools: the same tool engine, placed beside the exact
   explanation, practice activity, or quiz stage where the learner needs it. */
.guided-stage-tools{display:grid;gap:12px;margin:18px 0;padding:16px;border:1px solid #cfe0f5;border-radius:18px;background:linear-gradient(135deg,#f4f8ff,#f0fff9)}.guided-stage-tools>header{display:flex;align-items:center;gap:10px}.guided-stage-tools>header>span{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#0f8a7c;color:#fff}.guided-stage-tools>header small,.guided-context-tool small{display:block;color:#60728d;font-size:11px;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.guided-context-tool{margin-top:14px;border:1px solid #cfdced;border-radius:15px;background:#fff;box-shadow:0 7px 18px rgba(31,64,109,.06)}.guided-context-tool.inline{padding:15px}.guided-context-tool.inline>header,.guided-context-tool.workspace{display:flex;align-items:center;justify-content:space-between;gap:14px}.guided-context-tool strong{display:block;color:#142844;font-size:15px}.guided-context-tool p{margin:6px 0 12px;color:#60728d}.guided-context-tool button{border:1px solid #b8cde6;border-radius:999px;background:#fff;color:#185fbf;padding:8px 12px;font-weight:800;cursor:pointer}.guided-context-tool.workspace{padding:14px 15px}.guided-context-tool.workspace p{margin-bottom:0}.guided-context-tool.compact{overflow:hidden}.guided-context-tool.compact>summary{display:flex;align-items:center;gap:10px;padding:13px 15px;cursor:pointer;list-style:none}.guided-context-tool.compact>summary::-webkit-details-marker{display:none}.guided-context-tool.compact>summary>span:first-child{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#e7f1ff;color:#2468ef}.guided-context-tool.compact>p,.guided-context-tool.compact>.guided-context-tool-body{margin-left:15px;margin-right:15px}.guided-context-tool.compact>.guided-context-tool-body{margin-bottom:15px}.guided-context-tool.completed{border-color:#8ed5b6;background:#f5fff9}.guided-context-tool.needs-attention{outline:3px solid rgba(255,174,0,.45)}.guided-context-tool-body{min-width:0;padding-top:10px}.guided-context-tool-body .sir-tool-textarea{min-height:180px}.guided-context-tool-body .sir-tool-timer{padding:20px}.guided-context-tool-body .sir-flashcard{min-height:210px}
.guided-quiz-context-tools{display:grid;gap:10px;margin-bottom:16px;padding:14px;border:1px solid #d6c9f4;border-radius:16px;background:linear-gradient(135deg,#faf7ff,#f2f7ff)}.guided-quiz-context-tools>header{display:flex;align-items:center;gap:10px}.guided-quiz-context-tools>header>span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#6845df;color:#fff}.guided-quiz-context-tools>header small{display:block;color:#70628d;font-size:11px;font-weight:850;letter-spacing:.06em}.guided-quiz-context-tools .guided-context-tool{margin-top:0}
@media(max-width:680px){.guided-context-tool.inline>header,.guided-context-tool.workspace{align-items:flex-start;flex-direction:column}.guided-context-tool.workspace button,.guided-context-tool.inline>header>button{width:100%}}
.guided-flow-stage{display:grid;gap:12px;margin:22px 0}.guided-flow-stage-head{padding:0 4px}.guided-flow-stage-head small{color:#6845df;font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.guided-flow-stage-head h3{margin:3px 0;color:#152844}.guided-flow-stage .guided-stage-tools{margin:0}.guided-context-tool.locked{border-style:dashed;background:#f7f8fb}.guided-context-tool.locked>div>small{color:#9a5b13}

/* Current universal workspace renderer. These selectors intentionally match
   the runtime class names; the earlier rules remain for migrated legacy tools. */
.sir-tool-search-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sir-tool-platform-modal :is(button,input,select,textarea,a):focus-visible{outline:3px solid rgba(36,104,239,.35);outline-offset:2px}
.sir-tool-form-grid :is(input,select,textarea),.sir-tool-document{width:100%;box-sizing:border-box;padding:11px;border:1px solid #bed0e6;border-radius:11px;background:#fff;font:inherit}
.sir-tool-document{min-height:300px;line-height:1.55;resize:vertical}
.sir-tool-entry-list{display:grid;gap:10px}
.sir-tool-entry-list article{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #d5e1ef;border-radius:13px;background:#fff}
.sir-tool-entry-list article.done strong{text-decoration:line-through;color:#718096}
.sir-tool-entry-list article>div{flex:1;min-width:0}
.sir-tool-entry-list article button{border:1px solid #c8d7e9;border-radius:9px;background:#fff;min-width:36px;min-height:36px;cursor:pointer}
.sir-tool-timer output{display:block;margin:0 auto 18px;padding:0!important;background:transparent!important;font-size:clamp(44px,8vw,84px)!important;color:#123}
.guided-tool-save-status{display:block;margin:8px 15px 12px;color:#64748b;font-size:12px}
.guided-context-tool.inline>.guided-tool-save-status{margin-left:0;margin-right:0}
.sir-tool-media :is(img,video){display:block;width:100%;max-height:520px;object-fit:contain;border-radius:14px;background:#0c1628}
@media(max-width:760px){.sir-tool-document{min-height:220px}.sir-tool-platform-layout{grid-template-rows:minmax(180px,38%) minmax(0,62%)}}
.sir-tool-meta,.sir-planner-head,.sir-branch-progress{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#64748b;font-size:13px}
.sir-notes-layout{display:grid;grid-template-columns:minmax(190px,28%) minmax(0,1fr);gap:14px}.sir-notes-layout>aside{display:grid;align-content:start;gap:7px;max-height:540px;overflow:auto}.sir-notes-layout>aside>button{display:grid;gap:3px;text-align:left;border:1px solid #d2dfed;border-radius:10px;background:#fff;padding:9px}.sir-notes-layout>aside>button.active{border-color:#2468ef;background:#edf4ff}.sir-notes-layout>aside small{color:#6a7b91}.sir-notes-layout>main{display:grid;gap:9px}.sir-note-title{width:100%;box-sizing:border-box;border:0;border-bottom:1px solid #cbd9e8;padding:8px 2px;font-size:20px;font-weight:850}
.sir-tool-tabs{display:flex;gap:7px}.sir-tool-tabs button{border:1px solid #c4d4e7;border-radius:999px;background:#fff;padding:7px 11px;text-transform:capitalize}.sir-tool-tabs button.active{background:#2468ef;color:#fff;border-color:#2468ef}
.sir-summary-prompts,.sir-tracker-list,.sir-planner-grid,.sir-annotation-list,.sir-timer-history{display:grid;gap:10px}.sir-summary-prompts label,.sir-tracker-list article,.sir-planner-grid article,.sir-annotation-list article{display:grid;gap:7px;padding:13px;border:1px solid #d5e1ef;border-radius:13px;background:#fff}.sir-summary-prompts textarea,.sir-portfolio-add :is(input,select,textarea){width:100%;box-sizing:border-box;padding:10px;border:1px solid #bed0e6;border-radius:10px;font:inherit}.sir-summary-prompts textarea{min-height:90px}
.sir-tracker-list article header,.sir-annotation-list article{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.sir-tracker-list p{margin:2px 0}.sir-timer-history span{padding:8px 10px;border-radius:9px;background:#fff}
.sir-portfolio-add{display:grid;grid-template-columns:1fr 1fr;gap:9px}.sir-portfolio-add textarea,.sir-portfolio-add button{grid-column:1/-1}.sir-portfolio-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.sir-portfolio-grid>section{padding:13px;border:1px solid #d5e1ef;border-radius:14px;background:#f8fbff}.sir-portfolio-grid article{display:grid;gap:7px;margin-top:8px;padding:10px;border-radius:10px;background:#fff}
.sir-resource-list{display:grid;gap:9px}.sir-resource-list article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #d5e1ef;border-radius:12px;background:#fff}.sir-resource-list p{margin:3px 0}
.sir-project-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;overflow:auto}.sir-project-board>section{min-width:180px;padding:11px;border-radius:13px;background:#edf3fa}.sir-project-board article{display:grid;gap:8px;margin-top:8px;padding:10px;border:1px solid #d4dfed;border-radius:10px;background:#fff}
.sir-rubric,.sir-peer-rubric{display:grid;gap:8px;padding:12px;border:1px solid #d4dfed;border-radius:13px;background:#f8fbff}.sir-rubric article{display:grid;grid-template-columns:1fr auto;gap:4px}.sir-rubric p{grid-column:1/-1;margin:0}.sir-tool-privacy{padding:10px;border-radius:10px;background:#edf8ff;color:#315478}
.sir-assignment-due{padding:10px 12px;border-radius:10px;background:#fff4dd;color:#86540b;font-weight:800}.sir-assignment-feedback{padding:12px;border-radius:12px;background:#f3f8ff}.sir-video-checkpoint{display:grid;gap:7px;padding:12px;border:1px solid #d5e1ef;border-radius:12px;background:#fff}.sir-video-checkpoint.completed{border-color:#8ed5b6;background:#f5fff9}.sir-video-checkpoint textarea{width:100%;box-sizing:border-box;min-height:70px;padding:9px;border:1px solid #c8d7e9;border-radius:9px}
.sir-tool-history{display:grid;gap:6px;margin-top:8px}.sir-tool-history span,.sir-table-formulas span{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:9px;background:#f5f8fc}.sir-table-formulas{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}.sir-table-formulas span{display:grid}.sir-table-formulas b{font-size:20px}.sir-table-formulas small{color:#6b7c92}
.sir-timeline{position:relative;display:grid;gap:0}.sir-timeline:before{content:"";position:absolute;left:17px;top:18px;bottom:18px;width:2px;background:#bcd0e8}.sir-timeline article{position:relative;display:grid;grid-template-columns:36px 1fr;gap:14px;padding:12px 0}.sir-timeline article>span{z-index:1;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#2468ef;color:#fff;font-weight:850}.sir-timeline h3,.sir-timeline p{margin:3px 0}
.sir-process-map{display:flex;align-items:stretch;gap:8px;overflow:auto;padding-bottom:8px}.sir-process-map button{position:relative;display:grid;gap:4px;min-width:150px;text-align:left;padding:12px;border:1px solid #c8d7e9;border-radius:12px;background:#fff}.sir-process-map button.active{border-color:#2468ef;background:#edf4ff}.sir-process-detail{padding:15px;border-radius:14px;background:#f4f8ff}
.sir-mind-map{text-align:center;overflow:auto}.sir-mind-root{display:inline-block;padding:14px 22px;border-radius:999px;background:#6845df;color:#fff;font-weight:850}.sir-mind-map ul{display:flex;justify-content:center;gap:12px;padding:18px 0 0;list-style:none}.sir-mind-map li{display:grid;justify-items:center}.sir-mind-map button{border:1px solid #c9d8e9;border-radius:999px;background:#fff;padding:9px 13px}.sir-mind-map button.visited{background:#e7fff3;border-color:#75caa4}
.sir-simulation-controls{display:grid;gap:10px}.sir-simulation-controls label{display:grid;grid-template-columns:minmax(120px,1fr) 2fr auto;align-items:center;gap:10px}.sir-simulation-outcome{padding:20px;border:1px solid #c8d7e9;border-radius:16px;background:linear-gradient(135deg,#fff,#eef6ff)}
.sir-poll{display:grid;gap:8px;border:0;padding:0}.sir-poll legend{font-size:20px;font-weight:850;margin-bottom:10px}.sir-poll label{display:flex;align-items:center;gap:9px;padding:11px;border:1px solid #d5e1ef;border-radius:11px;background:#fff}.sir-poll-results{display:grid;gap:9px}.sir-poll-results>div{position:relative;display:grid;grid-template-columns:1fr auto;gap:10px;overflow:hidden;padding:10px;border-radius:9px;background:#edf2f8}.sir-poll-results i{position:absolute;left:0;bottom:0;height:3px;background:#2468ef}
.sir-peer-rubric label{display:grid;grid-template-columns:1fr 80px auto;align-items:center;gap:9px}.sir-peer-rubric small{display:block;color:#6b7c93}.sir-annotation-list article p{flex:1;margin:0}.sir-checklist-item textarea{width:calc(100% - 30px);margin:6px 0 4px 30px;box-sizing:border-box;padding:9px;border:1px solid #cbd9e8;border-radius:9px}
.sir-success{color:#087b53}.sir-warning{color:#a45b00}.sir-tool-recommendation{padding:12px;border-radius:11px;background:#ecfff5;color:#116344}
@media(max-width:680px){.sir-notes-layout{grid-template-columns:1fr}.sir-notes-layout>aside{max-height:180px}.sir-portfolio-add{grid-template-columns:1fr}.sir-simulation-controls label,.sir-peer-rubric label{grid-template-columns:1fr}.sir-mind-map ul{justify-content:flex-start}.sir-resource-list article{align-items:flex-start;flex-direction:column}}

/* Flashcards are a visible deck, not a forced spaced-repetition quiz. */
.sir-flashcard-deck-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.sir-flashcard-deck-head strong{display:block;font-size:20px;color:#13243d}.sir-flashcard-deck-head small{display:block;margin-top:3px;color:#64748b}.sir-flashcard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.sir-flashcard-tile{position:relative;min-height:210px;cursor:pointer;perspective:900px}.sir-flashcard-tile>div{position:absolute;inset:0;display:grid;align-content:center;gap:12px;padding:24px;border-radius:18px;color:#fff;backface-visibility:hidden;transition:transform .35s;box-shadow:0 10px 24px rgba(30,70,130,.14)}.sir-flashcard-tile-front{background:linear-gradient(135deg,#2468ef,#6845df)}.sir-flashcard-tile-back{transform:rotateY(180deg);background:linear-gradient(135deg,#0f9a69,#0b7a8e)}.sir-flashcard-tile.flipped .sir-flashcard-tile-front{transform:rotateY(180deg)}.sir-flashcard-tile.flipped .sir-flashcard-tile-back{transform:rotateY(0)}.sir-flashcard-tile strong{font-size:20px;line-height:1.25}.sir-flashcard-tile span{font-size:12px;font-weight:800;opacity:.8}.sir-flashcard-delete{position:absolute;z-index:3;right:9px;top:9px;width:32px;height:32px;border:0;border-radius:50%;background:rgba(255,255,255,.9);color:#a12435;font-size:20px;cursor:pointer}.sir-flashcard-create{display:grid;gap:10px;padding:15px;border:1px solid #d5e1ef;border-radius:14px;background:#f8fbff}

/* Persistent daily study clock: a draggable live-time edge tab. */
.sir-study-clock{position:fixed;right:0;bottom:92px;z-index:1190;color:#13243d;touch-action:none}.sir-study-clock-chip{display:flex;align-items:center;gap:5px;min-width:52px;border:1px solid #b9cbed;background:linear-gradient(135deg,#fff,#f2f6ff);padding:5px 7px;box-shadow:0 7px 20px rgba(23,51,91,.16);cursor:grab;user-select:none}.sir-study-clock.edge-right .sir-study-clock-chip{border-right:0;border-radius:11px 0 0 11px}.sir-study-clock.edge-left .sir-study-clock-chip{border-left:0;border-radius:0 11px 11px 0}.sir-study-clock.dragging .sir-study-clock-chip{cursor:grabbing;box-shadow:0 12px 32px rgba(37,99,235,.3)}.sir-study-clock-live{display:grid;min-width:40px;text-align:center}.sir-study-clock-chip strong{color:#17315a;font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:.01em}.sir-study-clock-state{width:5px;height:5px;border-radius:50%;background:#6845df;box-shadow:0 0 0 2px rgba(104,69,223,.12)}.sir-study-clock.paused .sir-study-clock-state{background:#7b8798;box-shadow:none}.sir-study-clock.target-reached .sir-study-clock-state{background:#0f9a69;box-shadow:0 0 0 2px rgba(15,154,105,.14)}.sir-study-clock-panel{position:absolute;right:0;bottom:45px;display:none;width:280px;box-sizing:border-box;padding:16px;border:1px solid #cbd9ec;border-radius:18px;background:#fff;box-shadow:0 18px 48px rgba(16,37,70,.25);touch-action:auto}.sir-study-clock.edge-left .sir-study-clock-panel{right:auto;left:0}.sir-study-clock.panel-below .sir-study-clock-panel{top:45px;bottom:auto}.sir-study-clock.open .sir-study-clock-panel{display:grid;gap:11px}.sir-study-clock-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.sir-study-clock-panel header small{display:block;color:#6845df;font-size:10px;font-weight:900;letter-spacing:.08em}.sir-study-clock-panel header strong{display:block;margin-top:3px;font-size:30px;font-variant-numeric:tabular-nums}.sir-study-clock-panel header button{border:0;border-radius:50%;width:32px;height:32px;background:#eef3f9;font-size:20px}.sir-study-clock-progress{height:7px;overflow:hidden;border-radius:99px;background:#e4e9f3}.sir-study-clock-progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,#6845df,#2468ef);transition:width .25s}.sir-study-clock-panel p{margin:0;color:#586a83;font-size:13px}.sir-study-clock-actions button{border:0;border-radius:999px;background:#2468ef;color:#fff;padding:8px 14px;font-weight:800}.sir-study-clock-panel label{display:grid;gap:5px;color:#354762;font-size:12px;font-weight:750}.sir-study-clock-panel label input[type=number],.sir-study-clock-panel label input[type=time]{box-sizing:border-box;width:100%;padding:9px;border:1px solid #c7d6e9;border-radius:9px;font:inherit}.sir-study-clock-panel .sir-study-reminder{display:flex;align-items:center;gap:7px}.sir-study-clock-panel>small{color:#728197;font-size:11px}
.sir-study-clock-panel .sir-study-reminder{justify-content:flex-start}.sir-study-clock-panel .sir-study-reminder input{flex:0 0 18px!important;width:18px!important;height:18px!important;margin:0!important}
@media(max-width:680px){.sir-study-clock{bottom:82px}.sir-study-clock-chip{min-width:49px;padding:5px 6px}.sir-study-clock-chip strong{font-size:11px}.sir-study-clock-panel{width:min(280px,calc(100vw - 24px))}.sir-study-clock.edge-right .sir-study-clock-panel{right:4px}.sir-study-clock.edge-left .sir-study-clock-panel{left:4px}.sir-flashcard-grid{grid-template-columns:1fr}.sir-flashcard-tile{min-height:190px}}

/* Final marketplace refinements. Loaded after all legacy course CSS. */
body.course-launcher-mode #courseDashboard {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (min-width: 901px) {
  .discovery-hero-carousel,
  .discovery-hero-slides,
  .discovery-hero-slide,
  .discovery-hero {
    height: 490px !important;
    min-height: 490px !important;
    max-height: 490px !important;
  }
  .discovery-hero-copy { overflow: hidden; }
}
.discovery-hero-media {
  display: grid !important;
  place-items: center !important;
  min-height: 360px !important;
  padding: 0 !important;
  background: #0f172a;
}
.discovery-program-media,
.discovery-program-hero-media {
  display: grid !important;
  place-content: center !important;
  justify-items: center !important;
  gap: 7px !important;
  padding: 20px !important;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 75% 20%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(145deg,#6d28d9,#2563eb) !important;
}
.discovery-program-media.degree,
.discovery-program-hero-media.degree {
  background:
    radial-gradient(circle at 75% 20%, rgba(255,255,255,.3), transparent 28%),
    linear-gradient(145deg,#312e81,#7c3aed 58%,#2563eb) !important;
}
.discovery-program-media > span,
.discovery-program-hero-media > span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 20px;
  color: #fff !important;
  font-size: 27px !important;
  font-weight: 1000;
  background: rgba(255,255,255,.16);
  box-shadow: 0 18px 45px rgba(30,41,99,.28);
}
.discovery-program-media > small,
.discovery-program-media > b,
.discovery-program-hero-media > small,
.discovery-program-hero-media > strong {
  color: #fff !important;
}
.discovery-program-media > small,
.discovery-program-hero-media > strong {
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.discovery-program-media > b,
.discovery-program-hero-media > small {
  font-size: 12px;
  font-weight: 750;
  opacity: .88;
}
.discovery-program-card .discovery-course-eyebrow > span {
  color: #6d28d9;
}
.credential-program-notice {
  position: fixed;
  z-index: 2200;
  right: 18px;
  bottom: 92px;
  max-width: min(360px,calc(100vw - 36px));
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  background: #08785f;
  box-shadow: 0 18px 44px rgba(15,23,42,.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
}
.credential-program-notice.show { opacity: 1; transform: none; }
.credential-program-notice.pending { background: #4338ca; }
.credential-program-notice.error { background: #b42318; }
.credential-path-back {
  width: max-content;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid #d8ccff;
  border-radius: 999px;
  color: #5b21b6;
  font-size: 12px;
  font-weight: 850;
  background: #f5f2ff;
  cursor: pointer;
}
.credential-path-group {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.credential-path-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.credential-path-group > header span {
  color: #172033;
  font-size: 15px;
  font-weight: 950;
}
.credential-path-group > header b {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #5b21b6;
  font-size: 12px;
  background: #eee9ff;
}
.credential-path-group > div {
  display: grid;
  gap: 8px;
}
.credential-path-item {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  color: #172033;
  text-align: left;
  background: #fff;
  cursor: pointer;
}
.credential-path-item:hover { border-color: #8b5cf6; background: #faf8ff; }
.credential-path-item > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 1000;
  background: #6d28d9;
}
.credential-path-item.course > span { background: #2563eb; }
.credential-path-item.complete > span { background: #07865d; }
.credential-path-item > div { min-width: 0; }
.credential-path-item strong,
.credential-path-item small { display: block; }
.credential-path-item strong {
  overflow: hidden;
  color: #172033;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.credential-path-item small {
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
}
.credential-path-item > b {
  color: #5b21b6;
  font-size: 11px;
  white-space: nowrap;
}
.credential-path-empty {
  margin: 0;
  padding: 13px;
  border: 1px dashed #c9d5e5;
  border-radius: 12px;
  color: #667085;
  font-size: 12px;
}
.discovery-hero-media > .course-thumb-media,
.discovery-hero-media > .inline-course-player,
.discovery-hero-media > .course-thumb-fallback {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  overflow: hidden;
}
.discovery-hero-media > .course-thumb-fallback,
.discovery-course-media > .course-thumb-fallback {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
}
.discovery-hero-media > .course-thumb-fallback strong,
.discovery-course-media > .course-thumb-fallback strong { margin: auto !important; }
.discovery-hero-arrow {
  top: 16px !important;
  width: 38px !important;
  height: 38px !important;
  transform: none !important;
  border: 1px solid rgba(255,255,255,.75) !important;
  background: rgba(15,23,42,.78) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.2) !important;
  backdrop-filter: blur(9px);
}
.discovery-hero-arrow.prev { right: 62px !important; left: auto !important; }
.discovery-hero-arrow.next { right: 16px !important; left: auto !important; }
.discovery-hero-arrow svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.discovery-hero-arrow:hover { background: #6d28d9 !important; transform: translateY(-1px) !important; }
.discovery-hero-media .course-thumb-media img,
.discovery-hero-media .course-thumb-media video,
.discovery-hero-media .inline-course-player iframe,
.discovery-hero-media .inline-course-player video {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: cover !important;
}

/* Marketplace artwork should fill its visual frame. Keep `contain` for lesson
   diagrams and learning material, but crop discovery thumbnails consistently. */
.discovery-hero-media > .course-thumb-media,
.discovery-course-media > .course-thumb-media,
.course-detail-media > .course-thumb-media,
.recommended-course-card .course-thumb-media {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  padding: 0 !important;
}
.discovery-hero-media > .course-thumb-media > :is(img,video),
.discovery-course-media > .course-thumb-media > :is(img,video),
.course-detail-media > .course-thumb-media > :is(img,video),
.recommended-course-card .course-thumb-media > :is(img,video) {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  background: transparent !important;
}
.discovery-hero-dots {
  bottom: 12px !important;
  gap: 6px !important;
  align-items: center !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  border-radius: 999px !important;
  background: rgba(15,23,42,.7) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.22) !important;
  backdrop-filter: blur(10px);
}
.discovery-hero-dots button {
  appearance: none !important;
  flex: 0 0 auto !important;
  width: 8px !important;
  min-width: 8px !important;
  height: 8px !important;
  min-height: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.55) !important;
  box-shadow: none !important;
  font-size: 0 !important;
}
.discovery-hero-dots button.active {
  width: 24px !important;
  min-width: 24px !important;
  border-radius: 999px !important;
  background: #a78bfa !important;
}
.discovery-interest {
  grid-template-columns: minmax(200px,.52fr) minmax(0,1.48fr) !important;
  gap: 18px !important;
  padding: 16px 18px !important;
  border-radius: 14px !important;
}
.discovery-personalized {
  overflow: hidden;
  border: 1px solid #dce3f2;
  border-radius: 18px;
  background: linear-gradient(180deg,#fbfbff 0%,#fff 100%);
  box-shadow: 0 10px 30px rgba(15,23,42,.045);
}
.discovery-personalized .discovery-interest {
  border: 0 !important;
  border-bottom: 1px solid #e5e9f3 !important;
  border-radius: 0 !important;
  background: #faf9ff !important;
}
.discovery-personalized .discovery-interest.has-selection {
  grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr) !important;
}
.discovery-personalized-results { padding: 16px 18px 5px; }
.discovery-personalized-results .discovery-section-head { margin-bottom: 11px; }
.discovery-personalized-results .discovery-section-head h2 { font-size: clamp(24px,3vw,33px); }
.discovery-interest h2 { font-size: clamp(21px,2.4vw,28px) !important; }
.discovery-interest p { font-size: 13px !important; line-height: 1.35 !important; }
.discovery-interest-chips {
  gap: 7px !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}
.discovery-interest-chips::-webkit-scrollbar { display: none; width: 0; height: 0; }
.discovery-interest-chips button { min-height: 34px !important; padding: 7px 11px !important; font-size: 12px !important; }
.launcher-course-search,
.course-filter-search { margin-bottom: 0 !important; }
.launcher-course-search input,
.launcher-course-search input:focus,
.course-filter-search input,
.course-filter-search input:focus {
  box-sizing: border-box !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.launcher-course-search:focus-within,
.course-filter-search:focus-within {
  border-color: #6d28d9 !important;
  box-shadow: 0 0 0 3px rgba(109,40,217,.13) !important;
}
.course-details-panel,
.course-details-panel.show {
  pointer-events: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
}
.course-details-panel.show { display: block !important; }
.course-details-drawer {
  pointer-events: auto !important;
  right: auto !important;
  height: auto !important;
  width: min(390px, calc(100vw - 24px)) !important;
  max-height: min(560px, calc(100vh - 24px)) !important;
  padding: 18px !important;
  border: 1px solid #d9d3ef !important;
  border-radius: 16px !important;
  background: #f8f6ff !important;
  box-shadow: 0 24px 70px rgba(15,23,42,.24) !important;
  animation-name: courseDetailsPopoverIn !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y;
}
.course-details-close { width: 34px !important; height: 34px !important; background: #eee9ff !important; color: #40227c !important; box-shadow: none !important; }
.course-detail-copy > span { color: #6d28d9 !important; }
.course-detail-copy h2 { margin: 5px 42px 5px 0 !important; font-size: 23px !important; }
.course-detail-copy > p { margin: 5px 0 10px !important; font-size: 13px !important; line-height: 1.45 !important; }
.course-detail-meta { gap: 5px !important; margin: 8px 0 13px !important; }
.course-detail-meta b { padding: 4px 7px !important; font-size: 10px !important; background: #eee9ff !important; }
.course-detail-list {
  margin: 7px 0 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #ddd7f1 !important;
  border-radius: 10px;
  background: rgba(255,255,255,.78);
}
.course-detail-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 39px;
  padding: 8px 11px;
  color: #251747;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}
.course-detail-list summary::-webkit-details-marker { display: none; }
.course-detail-list summary > span { flex: 1; }
.course-detail-list summary::after { content: "+"; color: #6d28d9; font-size: 18px; line-height: 1; }
.course-detail-list[open] summary::after { content: "−"; }
.course-detail-list summary small { min-width: 22px; padding: 2px 6px; border-radius: 99px; background: #eee9ff; color: #6d28d9; text-align: center; font-size: 10px; }
.course-detail-list ul { gap: 6px !important; padding: 0 11px 10px !important; }
.course-detail-list li { padding-left: 17px !important; font-size: 12px !important; line-height: 1.4 !important; }
.course-detail-actions {
  bottom: -18px !important;
  margin: 12px -18px -18px !important;
  padding: 10px 18px !important;
  border-radius: 0 0 16px 16px;
  background: rgba(248,246,255,.97) !important;
}
.course-detail-actions button { min-height: 37px !important; padding: 7px !important; font-size: 11px !important; }
body.course-details-open { overflow: hidden !important; overscroll-behavior: none !important; }

.inline-trailer-play {
  inset: auto 9px 9px auto !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  text-shadow: none !important;
}
.inline-trailer-play b {
  width: 30px !important;
  height: 30px !important;
  padding-left: 2px !important;
  border: 1px solid rgba(255,255,255,.85);
  background: rgba(109,40,217,.9) !important;
  font-size: 11px !important;
  box-shadow: 0 5px 15px rgba(15,23,42,.3) !important;
  backdrop-filter: blur(7px);
}
.inline-trailer-button.is-hover-previewing iframe,
.inline-trailer-button.is-hover-previewing video { width: 100% !important; height: 100% !important; object-fit: cover !important; border: 0 !important; pointer-events: none; }

.discovery-categories > div:last-child {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 250px)) !important;
  justify-content: start !important;
  gap: 10px !important;
}
.discovery-library > .discovery-categories {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  background: #fafbfe;
}
.discovery-library > .discovery-categories .discovery-section-head { margin-bottom: 9px; }
.discovery-library > .discovery-categories .discovery-section-head span { display: none; }
.discovery-library > .discovery-categories .discovery-section-head h2 { margin: 0; font-size: 18px; }
.discovery-categories button {
  display: grid !important;
  grid-template-columns: 38px minmax(0,1fr) 20px !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 62px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  text-align: left !important;
}
.discovery-categories button i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #eee9ff; color: #6d28d9; font-style: normal; font-weight: 950; }
.discovery-categories button span { display: grid; gap: 2px; min-width: 0; }
.discovery-categories button span b { overflow: hidden; color: #172033; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.discovery-categories button span small { color: #69758b; font-size: 11px; font-weight: 650; }
.discovery-categories button > strong { color: #7c6ba4; font-size: 17px; }
.course-rating-summary { display:flex; align-items:center; gap:5px; width:fit-content; min-height:24px; margin:7px 0 0; padding:0; border:0; background:transparent; cursor:pointer; }
.course-rating-summary>span { color:#f59e0b; font-size:13px; letter-spacing:1px; }
.course-rating-summary>b { color:#8a4b08; font-size:11px; }
.course-rating-summary>small { color:#7b8495; font-size:10px; }
.course-review-section { margin-top:9px; padding-top:12px; border-top:1px solid #ddd7f1; }
.course-review-section>header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.course-review-section>header>div { display:grid; gap:2px; }
.course-review-section>header span,.course-review-list span { color:#f59e0b; letter-spacing:1px; }
.course-review-section>header strong { color:#2f2349; font-size:11px; }
.course-review-section>header button { min-height:31px; padding:5px 9px; font-size:10px; }
.course-review-list { display:grid; gap:7px; margin-top:9px; }
.course-review-list article { padding:9px; border:1px solid #e3def1; border-radius:9px; background:rgba(255,255,255,.76); }
.course-review-list article>div { display:flex; justify-content:space-between; gap:8px; }
.course-review-list article p { margin:5px 0; color:#4f5870; font-size:11px; line-height:1.4; }
.course-review-list article small,.course-review-empty { color:#778196; font-size:10px; }
.course-review-modal,.landing-welcome-modal { position:fixed; z-index:10080; inset:0; display:none; place-items:center; padding:18px; background:rgba(15,23,42,.58); backdrop-filter:blur(8px); }
.course-review-modal.show,.landing-welcome-modal.show { display:grid; }
.course-review-card { position:relative; width:min(440px,100%); padding:24px; border:1px solid #ddd6fe; border-radius:20px; background:#fff; box-shadow:0 28px 90px rgba(15,23,42,.3); }
.course-review-card>span,.landing-welcome-card>span { color:#6d28d9; font-size:11px; font-weight:950; letter-spacing:.11em; }
.course-review-card h2 { margin:7px 38px 6px 0; color:#111827; font-size:24px; }
.course-review-card>p { color:#667085; font-size:13px; line-height:1.5; }
.course-review-close,.landing-welcome-close { position:absolute; top:14px; right:14px; display:grid; place-items:center; width:34px; height:34px; border:0; border-radius:50%; background:#f1edff; color:#5b21b6; font-size:23px; cursor:pointer; }
.course-review-stars { display:flex; justify-content:center; gap:5px; margin:18px 0; }
.course-review-stars button { padding:0; border:0; background:transparent; color:#d7dce5; font-size:36px; cursor:pointer; }
.course-review-stars button.active { color:#f59e0b; }
.course-review-card label { display:grid; gap:6px; color:#344054; font-size:12px; font-weight:800; }
.course-review-card textarea { min-height:100px; padding:11px; border:1px solid #d0d5dd; border-radius:11px; resize:vertical; font:inherit; }
.course-review-locked { padding:11px; border-radius:10px; background:#fff7ed; color:#9a3412; font-size:12px; line-height:1.45; }
.course-review-status { min-height:20px; padding-top:6px; color:#b42318; font-size:11px; }
.course-review-card footer,.landing-welcome-card footer { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
body.course-review-open,body.landing-welcome-open { overflow:hidden!important; }
.landing-welcome-card { position:relative; width:min(720px,100%); overflow:hidden; padding:32px; border:1px solid rgba(255,255,255,.5); border-radius:26px; background:radial-gradient(circle at 90% 10%,#dcfce7 0,transparent 34%),linear-gradient(145deg,#fff 0%,#f6f3ff 100%); box-shadow:0 32px 100px rgba(15,23,42,.36); }
.landing-welcome-card h2 { max-width:580px; margin:9px 44px 8px 0; color:#111827; font-size:clamp(30px,5vw,48px); line-height:1.02; letter-spacing:-.04em; }
.landing-welcome-card>p { color:#657085; font-size:15px; }
.landing-welcome-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:24px 0 8px; }
.landing-welcome-steps article { display:grid; grid-template-columns:38px 1fr; gap:10px; align-items:start; padding:15px; border:1px solid #e3def3; border-radius:14px; background:rgba(255,255,255,.8); }
.landing-welcome-steps b { display:grid; place-items:center; width:38px; height:38px; border-radius:12px; background:#6d28d9; color:#fff; }
.landing-welcome-steps div { display:grid; gap:5px; }
.landing-welcome-steps strong { color:#1d2939; font-size:13px; }
.landing-welcome-steps small { color:#667085; line-height:1.4; }
.landing-feature-grid { gap:14px!important; }
.landing-feature-grid article { position:relative; overflow:hidden; min-height:210px!important; padding:22px!important; border:1px solid #e4def4!important; border-radius:18px!important; background:linear-gradient(145deg,#fff 0%,#faf8ff 100%)!important; box-shadow:0 12px 32px rgba(35,24,70,.07); transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
.landing-feature-grid article::after { content:""; position:absolute; right:-35px; bottom:-45px; width:120px; height:120px; border-radius:50%; background:radial-gradient(circle,#ddd6fe 0%,rgba(221,214,254,0) 70%); }
.landing-feature-grid article:hover { transform:translateY(-4px); border-color:#a78bfa!important; box-shadow:0 20px 42px rgba(109,40,217,.13); }
.landing-feature-grid article i { display:grid!important; place-items:center; width:48px!important; height:48px!important; margin-bottom:15px; border-radius:14px!important; background:linear-gradient(135deg,#6d28d9,#8b5cf6)!important; color:#fff!important; font-size:22px!important; font-style:normal; box-shadow:0 10px 22px rgba(109,40,217,.22); }
.landing-feature-grid article small { color:#7c3aed; font-size:10px; font-weight:950; letter-spacing:.09em; }
.landing-feature-grid article strong { margin-top:7px; font-size:18px; }
.landing-proof-strip > div {
  position: relative;
  overflow: hidden;
  transition: transform .35s ease, background-color .35s ease, box-shadow .35s ease;
}
.landing-proof-strip > div::after {
  content:"";
  position:absolute;
  inset:-40% auto -40% -55%;
  width:34%;
  transform:skewX(-18deg);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);
  pointer-events:none;
}
.landing-proof-strip.is-visible > div {
  animation: landingProofRise .5s cubic-bezier(.2,.75,.25,1) both, landingProofBreathe 4.8s ease-in-out 1.2s infinite;
}
.landing-proof-strip.is-visible > div:nth-child(2) { animation-delay: .08s; }
.landing-proof-strip.is-visible > div:nth-child(3) { animation-delay: .16s; }
.landing-proof-strip.is-visible > div:nth-child(4) { animation-delay: .24s; }
.landing-proof-strip.is-visible strong { animation: landingProofPulse .7s ease both; }
.landing-proof-strip.is-visible > div::after { animation: landingProofShimmer 5.2s ease-in-out 1.1s infinite; }
.media-preview-box,
.media-preview-body,
.learner-login-card,
.onboarding-card,
.course-completion-panel,
.lesson-help-panel,
.saved-learning-drawer > section,
.phase4-note-modal > section,
.sir-tool-shell,
.sir-tool-platform-shell,
[class*="modal-body"],
[class*="drawer-body"] { overscroll-behavior: contain; }
body:has(.media-preview-modal.show),
body:has(.course-details-panel.show:not(.hover-popover)),
body:has(.learner-login-modal.show),
body:has(.onboarding-modal.show),
body:has(.course-completion-modal.show),
body:has(.lesson-help-modal.show),
body:has(.saved-learning-drawer.show),
body:has(.phase4-note-modal.show),
body:has(.sir-tool-modal.open),
body:has(.sir-tool-platform-modal.show) {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
@media (min-width: 901px) {
  .course-filter-toolbar {
    display: grid !important;
    grid-template-columns: minmax(220px,1.35fr) minmax(0,3.65fr) !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 8px !important;
  }
  .course-filter-details { min-width: 0 !important; }
  .course-filter-details[open] .course-advanced-filters,
  .course-advanced-filters {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(105px,1fr)) !important;
    gap: 7px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .course-filter-search { min-height: 40px !important; }
  .course-advanced-filters select { min-height: 40px !important; }
}
@media (max-width: 900px) {
  #sirMobileAdTop { display: none !important; }
  .discovery-hero-carousel,
  .discovery-hero-slides,
  .discovery-hero-slide,
  .discovery-hero {
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
  }
  .discovery-hero {
    grid-template-columns: minmax(0,1.3fr) minmax(190px,.7fr) !important;
    border-radius: 18px !important;
  }
  .discovery-hero-copy {
    padding: 24px 22px 26px !important;
  }
  .discovery-hero h1 {
    margin: 9px 0 !important;
    font-size: clamp(30px,5.2vw,38px) !important;
    line-height: 1.02 !important;
  }
  .discovery-hero p {
    display: -webkit-box;
    margin: 5px 0 !important;
    overflow: hidden;
    font-size: 14px !important;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .discovery-hero-media {
    grid-row: auto !important;
    min-height: 360px !important;
    height: 100% !important;
    padding: 0 !important;
  }
  .discovery-hero-meta { margin: 10px 0 14px !important; }
  .discovery-hero-meta span { padding: 5px 8px !important; font-size: 10px !important; }
  .discovery-hero-actions button { min-height: 39px !important; padding: 8px 13px !important; }
  .discovery-interest { grid-template-columns: 1fr !important; gap: 10px !important; }
  .discovery-personalized .discovery-interest.has-selection { grid-template-columns: 1fr !important; }
  .discovery-interest-chips { flex-wrap: nowrap !important; overflow-x: auto !important; padding-bottom: 3px; }
  .discovery-interest-chips button { flex: 0 0 auto !important; }
  .landing-feature-grid {
    display: flex !important;
    gap: 12px !important;
    margin-inline: -1px;
    padding: 3px 1px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    touch-action: pan-x;
  }
  .landing-feature-grid::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .landing-feature-grid article {
    flex: 0 0 min(320px,82vw);
    display: grid !important;
    grid-template-columns: 44px minmax(0,1fr);
    grid-template-rows: auto auto 1fr;
    align-content: center !important;
    column-gap: 13px;
    min-height: 166px !important;
    padding: 17px !important;
    scroll-snap-align: start;
    animation: landingFeatureArrive .48s cubic-bezier(.2,.75,.25,1) both;
  }
  .landing-feature-grid article:nth-child(2) { animation-delay: .05s; }
  .landing-feature-grid article:nth-child(3) { animation-delay: .1s; }
  .landing-feature-grid article:nth-child(4) { animation-delay: .15s; }
  .landing-feature-grid article:nth-child(5) { animation-delay: .2s; }
  .landing-feature-grid article:nth-child(6) { animation-delay: .25s; }
  .landing-feature-grid article i {
    grid-row: 1 / 4;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    font-size: 18px !important;
  }
  .landing-feature-grid article small,
  .landing-feature-grid article strong,
  .landing-feature-grid article p { grid-column: 2; }
  .landing-feature-grid article strong { margin-top: 5px !important; font-size: 16px !important; }
  .landing-feature-grid article p { margin-top: 5px !important; font-size: 13px; line-height: 1.42; }
}
@media (max-width: 640px) {
  .landing-welcome-card { padding:24px 18px 18px; }
  .landing-welcome-steps { grid-template-columns:1fr; }
  .discovery-hero-carousel,
  .discovery-hero-slides,
  .discovery-hero-slide,
  .discovery-hero {
    height: 540px !important;
    min-height: 540px !important;
    max-height: 540px !important;
  }
  .discovery-hero {
    grid-template-columns: 1fr !important;
    grid-template-rows: 150px minmax(0,1fr) !important;
  }
  .discovery-hero-media {
    grid-row: 1 !important;
    min-height: 150px !important;
    height: 150px !important;
  }
  .discovery-hero-copy {
    justify-content: flex-start !important;
    min-height: 0 !important;
    padding: 18px 18px 58px !important;
    overflow: hidden !important;
  }
  .discovery-hero h1 {
    display: -webkit-box;
    max-height: 3.08em;
    overflow: hidden;
    font-size: clamp(28px,9vw,36px) !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .discovery-hero p {
    display: -webkit-box;
    max-height: 3em;
    overflow: hidden;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .discovery-hero-kicker { font-size: 10px !important; }
  .discovery-hero-arrow {
    display: none !important;
    top: auto !important;
    bottom: 14px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #6d28d9 !important;
    box-shadow: 0 5px 14px rgba(91,33,182,.12) !important;
    backdrop-filter: none;
  }
  .discovery-hero-arrow:hover {
    background: #f5f3ff !important;
    color: #5b21b6 !important;
    transform: none !important;
  }
  .discovery-hero-arrow svg {
    width: 17px;
    height: 17px;
    stroke-width: 2.2;
  }
  .discovery-hero-arrow.prev {
    right: auto !important;
    left: calc(50% - 82px) !important;
  }
  .discovery-hero-arrow.next {
    right: calc(50% - 82px) !important;
    left: auto !important;
  }
  .discovery-hero-dots {
    top: auto !important;
    bottom: 18px !important;
    padding: 7px 10px !important;
    border-color: #ede9fe !important;
    background: #f5f3ff !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }
  .discovery-hero-dots button {
    background: #c4b5fd !important;
  }
  .discovery-hero-dots button.active {
    background: #7c3aed !important;
  }
  .landing-feature-grid article { flex-basis: min(300px,86vw); }
  .course-details-panel.show {
    pointer-events: auto !important;
    background: rgba(15,23,42,.34) !important;
    backdrop-filter: blur(2px) !important;
  }
  .course-details-drawer {
    position: absolute !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 86vh !important;
    border: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    animation-name: courseDetailsUp !important;
  }
}

@keyframes landingFeatureArrive {
  from { opacity: 0; transform: translate3d(18px,8px,0) scale(.985); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}
@keyframes landingProofRise {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes landingProofPulse {
  0% { transform: scale(.75); opacity: .3; }
  65% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes landingProofBreathe {
  0%,100% { background-color:transparent; }
  50% { background-color:rgba(255,255,255,.58); }
}
@keyframes landingProofShimmer {
  0%,70% { left:-55%; opacity:0; }
  78% { opacity:1; }
  96%,100% { left:125%; opacity:0; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-feature-grid article,
  .landing-proof-strip > div,
  .landing-proof-strip strong,
  .landing-proof-strip > div::after { animation: none !important; transition: none !important; }
}

@media (max-width: 680px) {
  body.course-launcher-mode { padding-bottom: 72px !important; }
  body.course-launcher-mode .mobile-step-peek { display: none !important; }
  body.course-launcher-mode .topbar {
    display: grid !important;
    grid-template-columns: 38px minmax(0,1fr) 38px 38px !important;
    grid-template-areas: "brand search auth language" !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 54px !important;
    padding: 6px 8px !important;
  }
  body.course-launcher-mode .brand {
    grid-area: brand !important;
    width: 38px !important;
    min-width: 38px !important;
    margin: 0 !important;
  }
  body.course-launcher-mode .launcher-brand-mark {
    display: block !important;
    width: 36px !important;
    height: 36px !important;
  }
  body.course-launcher-mode .brand-text { display: none !important; }
  body.course-launcher-mode .launcher-course-search {
    grid-area: search !important;
    order: initial !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    gap: 6px !important;
  }
  body.course-launcher-mode .launcher-course-search > span { font-size: 13px !important; }
  body.course-launcher-mode .launcher-course-search input {
    min-width: 0 !important;
    font-size: 11px !important;
  }
  body.course-launcher-mode .top-actions {
    display: contents !important;
    margin: 0 !important;
  }
  body.course-launcher-mode .launcher-auth-actions {
    grid-area: auth !important;
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    width: 38px !important;
    min-width: 38px !important;
  }
  body.course-launcher-mode .launcher-login-primary {
    position: relative !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 11px !important;
    color: transparent !important;
    font-size: 0 !important;
  }
  body.course-launcher-mode .launcher-login-primary::before {
    content: "" !important;
    position: absolute;
    inset: 9px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b21b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='m10 17 5-5-5-5'/%3E%3Cpath d='M15 12H3'/%3E%3C/svg%3E");
  }
  body.course-launcher-mode .floating-lang {
    grid-area: language !important;
    display: block !important;
    width: 38px !important;
    height: 38px !important;
  }
  body.course-launcher-mode .floating-lang-btn {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }
  body.course-launcher-mode .mobile-app-footer {
    right: 10px !important;
    bottom: 8px !important;
    left: 10px !important;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    gap: 1px !important;
    width: auto !important;
    min-height: 54px !important;
    padding: 4px !important;
    border: 1px solid rgba(148,163,184,.28) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.94) !important;
    box-shadow: 0 10px 30px rgba(15,23,42,.14) !important;
    backdrop-filter: blur(16px) saturate(1.35);
  }
  body.course-launcher-mode .mobile-foot-prev,
  body.course-launcher-mode .mobile-foot-next,
  body.course-launcher-mode .mobile-foot-main { display: none !important; }
  body.course-launcher-mode .mobile-foot-home,
  body.course-launcher-mode .mobile-foot-tools,
  body.course-launcher-mode .mobile-foot-progress,
  body.course-launcher-mode .mobile-foot-help,
  body.course-launcher-mode .dashboard-foot { display: grid !important; }
  body.course-launcher-mode .mobile-app-footer > .mobile-foot-extra {
    display: grid !important;
    grid-template-rows: 21px 13px !important;
    place-items: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 3px 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #344054 !important;
    box-shadow: none !important;
  }
  body.course-launcher-mode .mobile-app-footer > .mobile-foot-extra:active {
    background: #f1edff !important;
    color: #5b21b6 !important;
    transform: scale(.97);
  }
  body.course-launcher-mode .mobile-app-footer > .mobile-foot-extra span {
    display: grid !important;
    place-items: center !important;
    width: 20px !important;
    height: 20px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #5b21b6 !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
  }
  body.course-launcher-mode .mobile-app-footer > .mobile-foot-extra small {
    color: #344054 !important;
    font-size: 7.5px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  body.course-launcher-mode .sir-modern-main { padding-bottom: 0 !important; }
  body.course-launcher-mode .course-discovery-dashboard { padding-bottom: 12px !important; }
  body.course-launcher-mode #sirAdBottom {
    margin-top: 12px !important;
    margin-bottom: 8px !important;
  }
  body.course-launcher-mode .site-credit {
    margin-top: 8px !important;
    margin-bottom: 68px !important;
    padding-inline: 16px !important;
  }
  .discovery-library .modern-course-card-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 12px !important;
    margin-top: 16px !important;
    padding: 2px 1px 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    touch-action: pan-x;
  }
  .discovery-library .modern-course-card-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  .discovery-library .modern-course-card-grid > .discovery-course-card {
    flex: 0 0 min(292px,86vw) !important;
    width: min(292px,86vw) !important;
    scroll-snap-align: start;
  }
  .discovery-library .modern-course-card-grid > .flow-empty { flex: 1 0 100%; }
}

/* Keep the page end compact after the final banner while preserving mobile footer room. */
@media (min-width: 981px) {
  .sir-modern-main { padding-bottom: 24px !important; }
}
@media (max-width: 980px) {
  .sir-modern-main { padding-bottom: 94px !important; }
}

.registration-verification {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  background: #f5f3ff;
}
.modal-auth-register-only[hidden] { display: none !important; }
.learner-login-modal[data-auth-mode="register"] .learner-login-card { width: min(620px, 100%); }
.modal-auth-credentials-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
.modal-contact-control { position: relative; }
.registration-verify-line {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 28px;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.learner-login-card .registration-verify-line button {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5b21b6;
  font: inherit;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 2px;
  box-shadow: none;
  cursor: pointer;
}
.learner-login-card .registration-verify-line button:disabled { cursor: default; opacity: .7; }
.modal-password-control { position: relative; }
.learner-login-card .modal-password-control input { padding-right: 68px; }
.learner-login-card .modal-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: auto;
  min-width: 48px;
  min-height: 32px;
  padding: 0 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
  cursor: pointer;
}
.learner-login-card .modal-password-toggle:hover,
.learner-login-card .modal-password-toggle:focus-visible { background: #f5f3ff; }
.modal-contact-control #sendRegistrationCodesBtn.verified {
  color: #15803d;
  opacity: 1;
}
.registration-otp-inline input.verified { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.learner-login-card .modal-auth-primary-row { align-items: center; flex-wrap: nowrap; }
.learner-login-card .modal-auth-primary-row .modal-auth-alternate { margin: 0 0 0 auto; text-align: right; white-space: nowrap; }
.registration-verification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.registration-verification-head div { display: grid; gap: 3px; }
.registration-verification-head small { color: #64748b; line-height: 1.35; }
.registration-code-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.registration-code-grid label { display: grid; gap: 5px; color: #334155; font-size: 12px; font-weight: 850; }
.registration-code-grid input { width: 100%; box-sizing: border-box; }
.sir-timeline-image {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: cover;
  border-radius: 9px;
}
.sir-timeline-banner.show.has-image {
  grid-template-columns: auto 44px minmax(0, 1fr) !important;
}
.sir-announcement-image {
  display: block;
  width: 100%;
  max-height: 280px;
  margin-bottom: 12px;
  object-fit: cover;
  border-radius: 12px;
}
@media (max-width: 560px) {
  .registration-verification-head { align-items: stretch; flex-direction: column; }
  .modal-auth-credentials-row { grid-template-columns: 1fr; }
  .learner-login-card .modal-auth-primary-row { align-items: flex-start; flex-direction: column; }
  .learner-login-card .modal-auth-primary-row .modal-auth-alternate { margin: 0; text-align: left; white-space: nowrap; }
  .learner-login-card .modal-auth-primary-row .modal-auth-alternate button { display: inline; width: auto; }
}

body.course-launcher-mode .launcher-account-menu { position: relative; }
body.course-launcher-mode .launcher-account-trigger {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid #6d28d9;
  border-radius: 11px;
  background: #fff;
  color: #5b21b6;
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}
body.course-launcher-mode .launcher-account-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  gap: 6px;
  min-width: 132px;
  padding: 8px;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15,23,42,.18);
}
body.course-launcher-mode .launcher-account-menu-panel[hidden] { display: none !important; }
body.course-launcher-mode .launcher-account-menu-panel button {
  width: 100%;
  min-height: 36px;
  padding: 0 11px;
  white-space: nowrap;
}

.discovery-course-actions {
  flex-wrap: nowrap;
}
.discovery-course-actions button,
.discovery-course-card.compact .discovery-course-actions button {
  min-width: 0;
  flex: 1 1 0;
}

@media (max-width: 680px) {
  body.course-launcher-mode .launcher-account-trigger {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  body.course-launcher-mode .sir-tool-platform-modal {
    inset: 54px 0 0 !important;
    height: calc(100dvh - 54px);
    min-height: 0;
    padding: 0;
  }
  body.course-launcher-mode .sir-tool-platform-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
  }
  body.course-launcher-mode .sir-tool-platform-shell > header {
    position: relative;
    z-index: 2;
    min-height: 58px;
    box-sizing: border-box;
    padding: 9px 14px;
  }
  body.course-launcher-mode .sir-tool-platform-layout {
    min-height: 0;
    overflow: hidden;
  }

  .account-dashboard-section > .discovery-section-head {
    align-items: center;
    gap: 10px;
  }
  .account-dashboard-section > .discovery-section-head h2 {
    font-size: 25px;
  }
  .account-dashboard-section > .discovery-section-head > button {
    flex: 0 0 auto;
    max-width: 132px;
  }
}

.account-dashboard {
  width: min(820px, 100%);
  margin-inline: auto;
}
.account-dashboard-section {
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.profile-view-card {
  display: grid;
  gap: 18px;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid #d9e3f1;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15,23,42,.07);
}
.profile-view-head {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  gap: 13px;
  align-items: center;
}
.profile-view-head .user-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg,#5b21b6,#2563eb);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 9px 22px rgba(91,33,182,.22);
}
.profile-view-head .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-view-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.profile-view-head > div > strong {
  color: #0f172a;
  font-size: 19px;
}
.profile-view-head > div > span {
  overflow-wrap: anywhere;
  color: #64748b;
  font-size: 13px;
}
.profile-completion {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f5f3ff;
}
.profile-completion > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}
.profile-completion strong {
  color: #4c1d95;
  font-size: 14px;
}
.profile-completion span {
  color: #64748b;
  font-size: 12px;
}
.profile-completion-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ddd6fe;
}
.profile-completion-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#6d28d9,#2563eb);
}
.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.profile-detail-grid > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #f8fafc;
}
.profile-detail-grid span {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.profile-detail-grid strong {
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 13px;
  line-height: 1.35;
}
.profile-view-card > .course-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.profile-view-card > .course-card-actions button {
  width: 100%;
}
.profile-view-card .profile-community-panel {
  margin-top: 0;
  padding-top: 16px;
}
.profile-view-card .profile-community-panel h3 {
  margin: 0 0 10px;
}
.verified-expert-badge{display:inline-flex;margin-left:5px;padding:2px 6px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:9px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.community-answer-status{margin-top:8px;padding:8px 10px;border-radius:10px;background:#f8fafc;color:#64748b;font-size:12px}
.expert-question-inbox{display:grid;gap:12px}
.expert-inbox-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.expert-inbox-head span{color:#6d28d9;font-size:10px;font-weight:900;letter-spacing:.08em}
.expert-inbox-head b{padding:6px 9px;border-radius:999px;background:#ede9fe;color:#5b21b6;font-size:11px}
.expert-inbox-list{display:grid;gap:10px}
.expert-inbox-card{display:grid;gap:8px;padding:12px;border:1px solid #c7d2fe;border-radius:14px;background:#fff}
.expert-inbox-card.answered{border-color:#d1fae5;background:#f0fdf4}
.expert-inbox-card>div:first-child{display:flex;justify-content:space-between;gap:10px;color:#475569;font-size:11px}
.expert-inbox-card h4,.expert-inbox-card p{margin:0}
.expert-inbox-compose{display:grid;gap:8px}

.learner-progress-overview {
  scroll-margin-top: 78px;
}
.learner-progress-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.learner-progress-summary article {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  background: #f8f7ff;
}
.learner-progress-summary strong {
  color: #4c1d95;
  font-size: 24px;
}
.learner-progress-summary span,
.learner-progress-empty span {
  color: #64748b;
  font-size: 12px;
}
.learner-progress-courses {
  display: grid;
  gap: 9px;
}
.learner-progress-courses > article {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(100px,1.2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
}
.learner-progress-courses > article > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.learner-progress-courses > article strong {
  color: #172033;
}
.learner-progress-courses > article span {
  color: #64748b;
  font-size: 12px;
}
.learner-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.learner-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#6d28d9,#2563eb);
}
.learner-progress-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed #c4b5fd;
  border-radius: 14px;
  background: #faf8ff;
}

@media (max-width: 480px) {
  .profile-detail-grid {
    grid-template-columns: 1fr;
  }
  .profile-view-card {
    border-radius: 16px;
  }
  .learner-progress-summary {
    gap: 6px;
  }
  .learner-progress-summary article {
    padding: 10px 8px;
  }
  .learner-progress-summary strong {
    font-size: 20px;
  }
  .learner-progress-courses > article {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .learner-progress-courses > article .learner-progress-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Keep the dashboard promotion visibly separate from first-party learning cards. */
#sirDashboardInlineAd.dashboard-ad-slot {
  min-height: 0;
  padding: 10px;
  border: 1px dashed #94a3b8;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: none;
  text-align: left;
}
#sirDashboardInlineAd.dashboard-ad-slot > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: stretch;
  gap: 9px;
}
#sirDashboardInlineAd .sir-ad-disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  color: #475569;
}
#sirDashboardInlineAd .sir-ad-disclosure b {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#sirDashboardInlineAd .sir-ad-disclosure small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
#sirDashboardInlineAd.dashboard-ad-slot img {
  width: 100%;
  max-height: 126px;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  object-fit: cover;
}
#sirDashboardInlineAd .sir-ad-copy {
  display: grid;
  gap: 4px;
  padding: 3px 4px 2px;
  color: #0f172a;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}
#sirDashboardInlineAd .sir-ad-category {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
#sirDashboardInlineAd .sir-ad-copy strong {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}
#sirDashboardInlineAd .sir-ad-copy > small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
#sirDashboardInlineAd .sir-ad-external {
  justify-self: start;
  margin-top: 4px;
  padding: 7px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

