@font-face {
  font-family: "Aalim Urdu Sans";
  src: url("fonts/NotoSansArabic-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Aalim Arabic Naskh";
  src: url("fonts/NotoNaskhArabic-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Aalim Quran";
  src: url("fonts/AmiriQuran-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Optional V2 media remains explicitly distinct from its text fallback. */
.content-media {
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid #d8e5de;
  border-radius: 10px;
  background: #f8fcfa;
}
.content-media img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
}
.content-media audio { width: 100%; }
.content-media figcaption { margin-top: 10px; color: #44524b; }
.content-media figcaption p,
.content-media-fallback p { margin: 5px 0 0; white-space: pre-wrap; }
.content-media-fallback {
  padding: 11px 12px;
  border-inline-start: 4px solid #b7791f;
  border-radius: 6px;
  background: #fffaf0;
  color: #744210;
}
.content-media-fallback[hidden] { display: none; }
.content-media.media-failed { border-color: #eccb91; background: #fffdf8; }
.answer-option { display: grid; gap: 8px; }
.answer-option .choice-media { margin: 0; }
.answer-option .answer { width: 100%; }
.mastery-result {
  width: min(760px, 100%);
  margin: 14px auto;
  padding: 16px;
  border: 1px solid #c9ded3;
  border-radius: 10px;
  background: #f8fcfa;
  text-align: start;
}
.mastery-result.failed { border-color: #eccb91; background: #fffaf0; }
.mastery-result h2 { margin: 0 0 12px; }
.mastery-result h3 { margin: 12px 0 6px; font-size: .95rem; }
.mastery-result ul { margin: 0; padding-inline-start: 22px; }
.mastery-domains { list-style: none; padding: 0 !important; }
.mastery-domains li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #e5eee9; }
.mastery-domains li.failed strong { color: #b83232; }

:root {
  --green: #276749;
  --gold: #b7791f;
  --ink: #1a202c;
  --muted: #5f6b7a;
  --line: #d8e0ea;
  --paper: #f7fafc;
  --soft: #e6fffa;
  --danger: #c53030;
  --interface-font-size: 16px;
  --urdu-interface-font-increase: 0pt;
  --slide-content-font-size: 12pt;
  --slide-heading-font-size: 14pt;
  --slide-heading-font-weight: 700;
  --exercise-font-size: 17px;
  --content-font-size: var(--exercise-font-size);
  --font-ui: "Segoe UI", Arial, sans-serif;
  --font-arabic: "Aalim Arabic Naskh", "Noto Naskh Arabic", serif;
  --font-urdu: var(--font-arabic);
  --font-quran: "Aalim Quran", "Amiri Quran", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(var(--interface-font-size) + var(--urdu-interface-font-increase));
}
html[lang="ur"] { --urdu-interface-font-increase: 1pt; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
html[lang="ur"] body,
html[lang="ur"] button,
html[lang="ur"] input,
html[lang="ur"] textarea,
html[lang="ur"] select,
html[lang="ur"] dialog,
html[lang="ur"] .global-pending-indicator {
  font-family: var(--font-urdu);
}
.app.lang-ur {
  --font-ui: var(--font-urdu);
  font-family: var(--font-urdu);
}
.app.lang-en { font-family: var(--font-ui); }
.urdu-text { font-family: var(--font-urdu) !important; letter-spacing: 0; }
.arabic-text,
[lang="ar"] { font-family: var(--font-arabic) !important; letter-spacing: 0; }
.script-rtl {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: isolate;
}
.script-ltr {
  direction: ltr;
  unicode-bidi: isolate;
}
.mixed-script.script-ltr { text-align: start !important; }
.arabic-run { direction: rtl; unicode-bidi: isolate; }
.urdu-run { direction: rtl; unicode-bidi: isolate; }
.level-stage-prefix { unicode-bidi: isolate; }
.level-stage-name { display: inline-block; max-width: 100%; vertical-align: middle; }
.quran-lesson .slide-ayah-line,
.quran-lesson .arabic-target-line,
.quran-lesson .word-by-word-token > strong,
.quran-lesson .arabic,
.quran-lesson .arabic-text,
.quran-lesson [lang="ar"] {
  font-family: var(--font-quran) !important;
  font-synthesis: none;
  font-feature-settings: "rlig" 1, "liga" 1, "mark" 1, "mkmk" 1;
  text-rendering: optimizeLegibility;
}
.app.lang-ur .slide-body,
.app.lang-ur .slide-note,
.app.lang-ur .question-prompt,
.app.lang-ur .answer,
.app.lang-ur .meaning,
.app.lang-ur .feedback,
.app.lang-ur .match-tile,
.app.lang-ur .sort-target,
.app.lang-ur .word-chip,
.app.lang-ur .sentence-token { line-height: 1.8; }
.app.lang-ur .slide-title,
.app.lang-ur .level-title,
.app.lang-ur .course-card h2,
.app.lang-ur .category-card h2 { line-height: 1.75; }
.app.lang-ur .slide-title {
  padding-block: 5px;
  font-family: var(--font-arabic) !important;
  font-feature-settings: "rlig" 1, "liga" 1, "mark" 1, "mkmk" 1;
  text-rendering: optimizeLegibility;
}
.app.lang-ur .slide-title .urdu-run,
.app.lang-ur .slide-title .arabic-run,
.app.lang-ur .slide-title .term-word {
  font-family: inherit !important;
}
.app.lang-ur .slide-body .urdu-run,
.app.lang-ur .slide-body .arabic-run,
.app.lang-ur .slide-body .term-word {
  font-feature-settings: "rlig" 1, "liga" 1, "mark" 1, "mkmk" 1;
  text-rendering: optimizeLegibility;
}
.app.lang-ur .slide-body,
.app.lang-ur .question-prompt,
.app.lang-ur .meaning { padding-block: 0; }
.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px;
}
.lesson-stage-app {
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: ltr;
}
.lesson-stage-app > .app-nav {
  flex: 0 0 auto;
  margin-bottom: 6px;
}
.lesson-stage-shell {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  direction: ltr;
}
.lesson-stage-fixed { min-height: 0; direction: ltr; }
.lesson-stage-scroll {
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  padding-inline: 2px;
  direction: ltr;
}
.lesson-stage-scroll .lesson-content { width: 100%; margin-top: 10px; }
.lesson-stage-fixed > .lesson-nav { margin: 8px 2px 0; padding-bottom: 0; direction: ltr; }
.lesson-stage-scroll > .editorial-review { margin: 10px 2px max(8px, env(safe-area-inset-bottom)); }
.topbar, .row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar { justify-content: space-between; margin-bottom: 18px; position: relative; min-height: 44px; }
.app-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  direction: ltr;
}
.site-fixed-header {
  position: sticky;
  top: 0;
  z-index: 120;
  flex: 0 0 auto;
  width: 100%;
  padding: 0 0 8px;
  background: #f7fafc;
}
.site-fixed-header > .app-nav { margin-bottom: 8px; }
.site-fixed-header > .global-breadcrumbs { margin-top: 0; margin-bottom: 0; }
.lesson-stage-app > .site-fixed-header { flex: 0 0 auto; }
@media (max-width: 640px) {
  .site-fixed-header { padding-bottom: 6px; }
  .site-fixed-header > .app-nav { margin-bottom: 5px; }
}
.app-nav .app-top-title {
  position: static;
  transform: none;
}
.top-nav-left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: 174px;
}
.language-toggle {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  direction: ltr;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.dictionary-nav-button {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  height: 44px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
  line-height: 1;
}
.dictionary-nav-button svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  line-height: 1;
}
.dictionary-nav-button span {
  line-height: 1;
}
.dictionary-nav-button svg,
.dictionary-search-control > svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.dictionary-nav-button[aria-current="page"] { background: var(--soft); }
.app-nav .user-menu {
  flex-wrap: nowrap;
  margin: 0;
}
.brand h1 { margin: 0; font-size: 30px; }
.app-name {
  direction: rtl;
  letter-spacing: 0;
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
  font-family: var(--font-arabic);
  font-weight: 800;
}
.app-top-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  direction: rtl;
  font-family: var(--font-arabic);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0;
  white-space: nowrap;
}

.dictionary-page {
  width: min(780px, 100%);
  margin: 34px auto 0;
}
.dictionary-header { text-align: center; }
.dictionary-header > p {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dictionary-header h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.35;
}
.dictionary-header h1 [lang="ar"] { font-family: var(--font-arabic); }
.dictionary-search-form { margin-top: 26px; }
.dictionary-search-form > label {
  display: block;
  margin-bottom: 8px;
  color: #2d4f40;
  font-size: 13px;
  font-weight: 800;
  text-align: start;
}
.dictionary-search-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid #a7bdb2;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 24px rgba(38, 103, 73, .08);
  color: var(--green);
  direction: ltr;
}
.dictionary-search-control > svg { margin-inline-start: 6px; }
.dictionary-search-control:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(39, 103, 73, .2), 0 8px 24px rgba(38, 103, 73, .08);
}
.dictionary-search-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  text-align: start;
}
.dictionary-search-input[lang="ar"] { font-family: var(--font-arabic); font-size: 19px; }
.dictionary-search-input[lang="ur"] { font-family: var(--font-urdu); font-size: 18px; }
.dictionary-search-input::placeholder {
  color: #7a8791;
  font-family: var(--font-ui);
  font-size: 15px;
  direction: ltr;
}
.dictionary-clear {
  border: 0;
  background: transparent;
  color: #5f6b7a;
  padding: 8px;
  font-weight: 700;
}
.dictionary-submit { min-height: 42px; padding-inline: 17px; }
.dictionary-status {
  margin-top: 24px;
  padding: clamp(24px, 6vw, 44px);
  border: 1px solid #d6e4dd;
  border-radius: 14px;
  background: white;
  text-align: center;
}
.dictionary-empty-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--green);
  font-size: 28px;
}
.dictionary-status h2 { margin: 0 0 8px; font-size: 20px; }
.dictionary-status p { max-width: 590px; margin: 0 auto; color: var(--muted); line-height: 1.65; }
.dictionary-status .dictionary-searched-term { margin-top: 14px; color: #355b4a; }
.dictionary-searched-term bdi { font-size: 1.12em; font-weight: 800; }
.dictionary-results-summary { margin-bottom: 18px; }
.dictionary-primary-results,
.dictionary-suggestion-results { text-align: start; }
.dictionary-primary-results > h3,
.dictionary-suggestion-results > header h3 { margin: 0 0 10px; color: #274c3c; font-size: 16px; }
.dictionary-suggestion-results {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #dddfdc;
}
.dictionary-status .dictionary-suggestion-results > header p {
  max-width: none;
  margin: -4px 0 12px;
  color: #675f4e;
  font-size: 12px;
}
.dictionary-results-summary .dictionary-sample-notice,
.dictionary-sample-notice {
  width: fit-content;
  max-width: 100%;
  margin-top: 9px;
  padding: 6px 10px;
  border: 1px solid #eadcae;
  border-radius: 7px;
  background: #fff9e8;
  color: #69551d;
  font-size: 12px;
}
.dictionary-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: start;
}
.dictionary-result-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #d7e4dd;
  border-radius: 12px;
  background: #fbfdfc;
}
.dictionary-result-card-best {
  border-color: #94bca9;
  background: #f7fcf9;
  box-shadow: inset 3px 0 0 #38785c;
}
.dictionary-result-card-suggestion {
  border-color: #ded8c9;
  background: #fbfaf6;
}
.dictionary-result-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}
.dictionary-result-heading h3 { min-width: 0; margin: 0; color: var(--ink); font-size: 23px; line-height: 1.45; }
.dictionary-result-heading h3 bdi { overflow-wrap: anywhere; }
.dictionary-match-badge {
  margin-top: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  max-width: 124px;
  line-height: 1.25;
  text-align: center;
}
.dictionary-match-badge-best { background: #dcefe6; color: #225b43; }
.dictionary-match-badge-related { background: #edf2ef; color: #476257; }
.dictionary-match-badge-suggestion { background: #f1ead8; color: #6e5b28; }
.dictionary-status .dictionary-result-card p { max-width: none; margin: 8px 0 0; }
.dictionary-result-meta { color: #4e655a !important; font-size: 12px; }
.dictionary-inflection-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f2f7f4;
  color: #476257 !important;
  font-size: 11px;
}
.dictionary-inflection-link > span:first-child { font-weight: 700; }
.dictionary-inflection-map { display: inline-flex; align-items: baseline; gap: 7px; font-family: var(--font-arabic); font-size: 15px; }
.dictionary-inflection-map i { color: #70877b; font-family: sans-serif; font-style: normal; }
.dictionary-result-root bdi { font-family: var(--font-arabic); font-size: 1.1em; }
.dictionary-result-meaning { padding-top: 7px; border-top: 1px solid #e4ece8; font-size: 14px; }
.dictionary-result-meaning > span { display: block; color: #315e49; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.dictionary-result-meaning[dir="rtl"] { font-family: var(--font-urdu); text-align: right; }
.dictionary-result-meaning[lang="ar"] { font-family: var(--font-arabic); text-align: right; }
.dictionary-result-meaning[dir="ltr"] { text-align: left; }
.dictionary-presentation-notes {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.dictionary-presentation-notes li {
  padding: 8px 9px;
  border-inline-start: 3px solid #6a9b84;
  border-radius: 5px;
  background: #f1f7f4;
  color: #2e5142;
  font-size: 12px;
  line-height: 1.5;
  text-align: start;
}
.dictionary-presentation-notes li[lang="ar"] { font-family: var(--font-arabic); font-size: 15px; }
.dictionary-presentation-notes small { display: block; margin-top: 3px; color: #667b71; font: 600 9px var(--font-ui); direction: ltr; }
.dictionary-translation-notes { margin: 6px 0 2px; }
.dictionary-detail-button {
  margin-top: 12px;
  padding: 7px 0 2px;
  border: 0;
  border-top: 1px solid #e4ece8;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-align: start;
}
.dictionary-install-spinner,
.dictionary-api-spinner { animation: dictionary-spin 1.4s linear infinite; }
@keyframes dictionary-spin { to { transform: rotate(360deg); } }
.dictionary-install-progress {
  width: min(460px, 100%);
  height: 9px;
  margin: 20px auto 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6efe9;
}
.dictionary-install-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.dictionary-status .dictionary-install-caption { font-size: 12px; }
.dictionary-status .dictionary-install-error { margin-top: 12px; color: #8c3434; font-size: 12px; overflow-wrap: anywhere; }
.dictionary-status .dictionary-api-error { margin-top: 12px; color: #8c3434; font-size: 12px; overflow-wrap: anywhere; }
.dictionary-status .dictionary-more-notice { margin-top: 8px; color: #6f5a20; font-size: 12px; }
.dictionary-retry { margin-top: 14px; }
.dictionary-version { margin-top: 10px !important; font-size: 11px; direction: ltr; }
.dictionary-sources { margin: 14px 0 80px; border: 1px solid #d6e4dd; border-radius: 10px; background: white; text-align: start; }
.dictionary-sources summary { padding: 13px 15px; color: #315e49; font-size: 12px; font-weight: 800; cursor: pointer; }
.dictionary-sources > div { padding: 0 15px 15px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.dictionary-sources p { margin: 8px 0; }
.dictionary-sources ul { margin: 10px 0; padding-inline-start: 20px; }
.dictionary-source-location { direction: ltr; overflow-wrap: anywhere; }
.dictionary-sources .dictionary-release-gate { padding: 9px 10px; border-inline-start: 3px solid #a86c1f; border-radius: 5px; background: #fff8e8; color: #704a16; }
.dictionary-detail {
  position: fixed;
  z-index: 130;
  inset: 5vh max(16px, calc((100vw - 700px) / 2)) auto;
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  border: 1px solid #c9d9d1;
  border-radius: 14px;
  background: white;
  box-shadow: 0 26px 80px rgba(21, 45, 34, .28);
  text-align: start;
}
.dictionary-detail-close { position: sticky; z-index: 1; top: 0; float: inline-end; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #edf5f1; color: var(--ink); font-size: 24px; }
.dictionary-detail header > p { margin: 0; color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.dictionary-detail header h2 { margin: 5px 44px 3px 0; font-size: 31px; }
.dictionary-detail header h2[lang="ar"] { font-family: var(--font-arabic); text-align: right; }
.dictionary-detail header > span { color: var(--muted); font-size: 12px; }
.dictionary-sense-list { display: grid; gap: 10px; margin-top: 20px; }
.dictionary-sense { padding: 13px; border: 1px solid #dde8e2; border-radius: 9px; background: #fbfdfc; }
.dictionary-sense h3 { margin: 0 0 8px; color: #456558; font-size: 12px; }
.dictionary-sense ol { display: grid; gap: 6px; margin: 0; padding-inline-start: 25px; }
.dictionary-sense li[lang="ar"] { font-family: var(--font-arabic); font-size: 18px; }
.dictionary-reviewed-badge { margin-inline-start: 8px; padding: 2px 6px; border-radius: 999px; background: #e7f4ed; color: var(--green); font: 700 9px var(--font-ui); }
.dictionary-detail footer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.dictionary-detail footer span { padding: 4px 7px; border-radius: 5px; background: #eef3f0; color: #52685d; font-size: 9px; }
.app-logo {
  display: block;
  width: auto;
  height: 64px;
  object-fit: contain;
  transform: scale(1.18);
  transform-origin: center;
  filter: contrast(1.22) saturate(1.06) drop-shadow(0 2px 2px rgba(20, 70, 48, 0.24));
}
.app-name .app-logo {
  height: 98px;
}
.lesson-term {
  color: var(--green);
  font-weight: 800;
}
.lesson-note {
  color: var(--danger);
  font-weight: 800;
}
.brand p { margin: 6px 0 0; color: var(--muted); }
.btn {
  border: 0;
  background: var(--green);
  color: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.secondary {
  background: white;
  color: var(--green);
  border: 1px solid var(--green);
}
.btn.danger {
  background: white;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.icon-only {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
}
.home-top-button {
  background: white;
  color: #1f573e;
  border: 1px solid var(--green);
  font-size: 21px !important;
  font-weight: 900;
}
.home-top-button:hover { background: #f0faf5; }
.play-placeholder {
  display: inline-block;
  width: 44px;
  min-width: 44px;
  height: 44px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 18px;
}
.level-stage-header { margin: 8px 0 9px; }
.level-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.level-counter {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 6px;
  background: #f1f6f3;
  color: #456456;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.level-actions.lesson-context-actions {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 12px;
  direction: ltr;
}
.level-context-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 88px;
  min-width: 88px;
  height: 34px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  direction: ltr;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.level-context-icon { font-size: 15px; line-height: 1; }
.level-context-spacer { display: block; width: 88px; height: 34px; }
.level-stage-title {
  display: block;
  width: min(680px, calc(100% - 40px));
  margin: 8px auto 0;
  border: 0;
  background: transparent;
  color: #4a5568;
  padding: 0;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.level-stage-title.expanded { white-space: normal; overflow: visible; }
.lesson-context-actions .level-stage-title {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lesson-context-actions .level-stage-title.expanded {
  height: auto;
  line-height: 1.55;
  white-space: normal;
  overflow: visible;
}
.level-action-buttons {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}
.level-action-buttons .btn.icon-only {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-color: #8aa99a;
  border-radius: 7px;
}
.user-menu { position: relative; justify-content: flex-end; }
.account-button { min-width: 150px; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  min-width: 210px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  padding: 6px;
}
.menu-panel button {
  display: block;
  width: 100%;
  border: 0;
  background: white;
  color: var(--ink);
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  font-weight: 700;
}
.menu-panel button:hover { background: var(--paper); }
[dir="rtl"] .menu-panel { direction: rtl; text-align: right; }
[dir="rtl"] .menu-panel button { text-align: right; }
.menu-user-name { padding: 8px 10px 3px; color: var(--ink); font-size: 12px; font-weight: 800; }
.menu-section-label {
  margin: 4px 8px 2px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: #718096;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.rank-menu-summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  padding: 7px 10px 11px;
  border-bottom: 1px solid var(--line);
}
.rank-menu-copy { display: grid; min-width: 0; }
.rank-menu-copy strong { color: var(--ink); font-size: 14px; line-height: 1.2; }
.rank-menu-copy span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.rank-menu-copy .rank-arabic { color: var(--green); font-family: "Noto Naskh Arabic", serif; font-size: 14px; font-weight: 800; }
.rank-progress { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 2px; background: #e8edf2; }
.rank-progress span { display: block; height: 100%; background: var(--green); }
.rank-badge {
  --rank-accent: var(--green);
  width: 38px;
  height: 38px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--rank-accent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--rank-accent) 12%, white);
  color: var(--rank-accent);
  box-shadow: inset 0 0 0 3px white;
  font-family: var(--font-arabic);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.rank-badge.small { width: 26px; height: 26px; border-width: 1px; box-shadow: inset 0 0 0 2px white; font-size: 12px; }
.rank-badge.large { width: 48px; height: 48px; font-size: 19px; }
.font-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}
.font-stepper > div { display: grid; grid-template-columns: 34px 34px 34px; align-items: center; }
.font-stepper button {
  width: 34px;
  height: 32px;
  padding: 0;
  text-align: center;
  border: 1px solid var(--line);
}
.font-stepper button:disabled { color: #a0aec0; background: #edf2f7; cursor: default; }
.font-stepper output { text-align: center; color: var(--green); }
.home-course-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 16px;
}
.home-course-header h1 { margin: 0; font-size: 28px; }
.home-course-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.home-rank-line { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.home-rank-line p { margin: 0; min-width: 0; }
.btn.compact { padding: 7px 12px; font-size: 12px; }
.course-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 196px;
}
.course-card {
  --course-accent: var(--green);
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 7px rgba(26, 32, 44, .06);
  cursor: pointer;
}
.course-card:focus-visible { outline: 2px solid var(--course-accent); outline-offset: 2px; }
.course-accent { height: 4px; background: var(--course-accent); }
.course-card-content { height: calc(100% - 4px); display: flex; flex-direction: column; padding: 13px; }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course-mark {
  width: auto;
  min-width: 44px;
  max-width: 64px;
  height: 44px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--course-accent);
  color: white;
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.course-state {
  padding: 4px 7px;
  border-radius: 6px;
  background: #edf2f7;
  color: #718096;
  font-size: 10px;
  font-weight: 800;
}
.course-card h2 {
  margin: 9px 0 0;
  font-size: 18px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
[dir="rtl"] .course-card h2 { line-height: 1.5; }
[dir="rtl"] .course-card p { line-height: 1.65; }
.course-card-spacer { flex: 1; }
.course-progress { height: 3px; margin-bottom: 7px; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--course-accent) 12%, white); }
.course-progress span { display: block; height: 100%; background: var(--course-accent); }
.course-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--course-accent); }
.course-card footer strong { min-width: 0; overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.course-arrow { font-size: 22px; font-weight: 800; line-height: 1; }
[dir="rtl"] .course-arrow { transform: scaleX(-1); }
.course-card.disabled { opacity: .76; cursor: default; background: #f8fafc; }
.course-card.disabled .course-accent, .course-card.disabled .course-mark { background: #a0aec0; }
.course-admin-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--course-accent) 10%, white);
  color: var(--muted);
}
.course-admin-preview span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; background: var(--course-accent); color: white; font-weight: 800; }
.rank-admin-error { margin: 10px 0; padding: 10px 12px; border: 1px solid #fed7d7; border-radius: 8px; background: #fff5f5; font-weight: 700; }
.rank-editor-preview, .rank-admin-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.rank-editor-preview { width: min(100%, 420px); margin: 14px 0; padding: 12px; }
.rank-editor-preview > div, .rank-admin-copy { display: grid; min-width: 0; flex: 1; }
.rank-editor-preview span, .rank-admin-copy span { color: var(--green); font-family: "Noto Naskh Arabic", serif; font-size: 16px; font-weight: 800; }
.rank-editor-preview small, .rank-admin-copy small { color: var(--muted); font-weight: 700; }
.rank-admin-list { display: grid; gap: 9px; }
.rank-admin-card { padding: 11px 12px; }
.rank-unlocked {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #cfe2d9;
  border-radius: 8px;
  background: #f3faf7;
}
.rank-unlocked > div { display: grid; }
.rank-unlocked small { color: var(--muted); font-weight: 700; }
.rank-unlocked strong { color: var(--green); font-size: 17px; }
.rank-unlocked span { font-family: "Noto Naskh Arabic", serif; font-weight: 800; }
.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.admin-level-filter {
  min-height: 44px;
  padding: 0 4px;
  cursor: pointer;
  user-select: none;
}
.admin-level-filter input { width: 18px; height: 18px; }
.grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.level-card, .panel, .mini-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.level-card {
  padding: 12px;
  min-width: 0;
}
.level-card.clickable { cursor: pointer; }
.level-card.clickable:hover { border-color: #9fb9ad; }
.level-card.disabled {
  opacity: .68;
  background: #f7fafc;
}
.level-card.passed {
  background: var(--soft);
  border-color: #9ae6b4;
}
.level-list-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  padding: 15px 15px 13px;
  overflow: hidden;
  border: 1px solid #d7dee6;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
  box-shadow: 0 8px 24px rgba(35, 49, 61, .075);
}
.level-list-toolbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #b7791f 0 18%, #31485a 18% 100%);
}
.level-list-toolbar label { margin: 0; }
.level-list-toolbar label > span:first-child {
  display: block;
  margin-bottom: 5px;
  color: #526172;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .035em;
}
.level-list-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #c8d1dc;
  border-radius: 9px;
  background: #fbfcfe;
  color: #22313f;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(35, 49, 61, .04);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.level-list-search input { padding: 8px 11px; }
.level-list-search input:hover { background: #fff; border-color: #aeb9c5; }
.level-list-search input:focus {
  outline: 0;
  border-color: #b7791f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(183, 121, 31, .16);
}
.level-list-show-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  margin-top: 16px !important;
  padding: 7px 11px;
  border: 1px solid #ead9ba;
  border-radius: 999px;
  background: #fff8ec;
  color: #394857;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.level-list-show-all:hover { border-color: #d4b77f; background: #fff4df; }
.level-list-show-all input { width: 18px; height: 18px; accent-color: #b7791f; }
.level-list-count {
  align-self: center;
  min-width: 72px;
  margin-top: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #2f4353;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(35, 49, 61, .14);
}
.level-filter-empty { grid-column: 1 / -1; }
.app-nav {
  grid-template-columns: 132px minmax(0, 1fr) 132px;
  align-items: center;
}
.app-nav .top-nav-left,
.app-nav .toolbar.user-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: 132px;
}
.app-nav .top-nav-left { justify-self: start; }
.app-nav .toolbar.user-menu { justify-self: end; justify-content: flex-end; }
.app-nav .app-top-title { justify-self: center; align-self: center; min-width: 0; }
.app-nav .top-nav-left > .btn,
.app-nav .toolbar.user-menu > .btn,
.app-nav .toolbar.user-menu > .account-button {
  min-height: 44px;
  height: 44px;
  margin: 0;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1;
}
.app-nav .language-toggle { flex: 0 0 40px; width: 40px; min-width: 40px; padding: 0 4px; }
.app-nav .dictionary-nav-button {
  flex: 0 0 86px;
  width: 86px;
  min-width: 86px;
  padding-inline: 7px;
  gap: 5px;
}
.app-nav .dictionary-nav-button svg { width: 15px; height: 15px; flex: 0 0 15px; }
.app-nav .home-top-button { flex: 0 0 82px; width: 82px; min-width: 82px; padding-inline: 7px; }
.app-nav .home-top-button::after { font-size: 13px; }
.app-nav .account-button.icon-only:not(.home-top-button) { flex: 0 0 44px; width: 44px; min-width: 44px; padding: 0; }
.app-nav .account-button:not(.icon-only) { flex: 0 0 62px; width: 62px; min-width: 62px; padding-inline: 5px; white-space: nowrap; }
.app-nav .toolbar.user-menu:has(.account-button:not(.icon-only)) .home-top-button { flex-basis: 64px; width: 64px; min-width: 64px; }
@media (max-width: 640px) {
  body .app-nav {
    display: grid !important;
    grid-template-columns: 104px minmax(42px, 1fr) 104px !important;
    grid-template-areas: "left title right" !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    gap: 4px !important;
  }
  body .app-nav .top-nav-left {
    grid-area: left !important;
    justify-self: start !important;
    width: 104px !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }
  body .app-nav .app-top-title {
    grid-area: title !important;
    justify-self: center !important;
    align-self: center !important;
    min-width: 0 !important;
    transform: scale(.82);
    transform-origin: center;
  }
  body .app-nav .toolbar.user-menu {
    grid-area: right !important;
    justify-self: end !important;
    width: 104px !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }
  body .app-nav .top-nav-left > .btn,
  body .app-nav .toolbar.user-menu > .btn,
  body .app-nav .toolbar.user-menu > .account-button {
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
  }
  body .app-nav .language-toggle { flex-basis: 34px !important; width: 34px !important; min-width: 34px !important; padding: 0 !important; }
  body .app-nav .dictionary-nav-button { flex-basis: 66px !important; width: 66px !important; min-width: 66px !important; padding-inline: 4px !important; gap: 3px !important; }
  body .app-nav .dictionary-nav-button svg { width: 13px !important; height: 13px !important; flex-basis: 13px !important; }
  body .app-nav .home-top-button { flex-basis: 64px !important; width: 64px !important; min-width: 64px !important; padding-inline: 3px !important; }
  body .app-nav .home-top-button::after { font-size: 11.5px !important; }
  body .app-nav .account-button.icon-only:not(.home-top-button) { flex-basis: 36px !important; width: 36px !important; min-width: 36px !important; padding: 0 !important; }
  body .app-nav .account-button:not(.icon-only) { flex-basis: 50px !important; width: 50px !important; min-width: 50px !important; padding-inline: 2px !important; }
  body .app-nav .toolbar.user-menu:has(.account-button:not(.icon-only)) .home-top-button { flex-basis: 50px !important; width: 50px !important; min-width: 50px !important; }
}
.level-list .polished-level {
  background: #fcfdfb;
  border-color: #d7dee2;
  box-shadow: 0 1px 2px rgba(35, 49, 61, .055);
}
.level-list > article.polished-level:nth-of-type(even):not(.passed):not(.disabled) {
  background: #f5f7fa;
}
.level-list .polished-level.clickable:hover {
  background: #fff;
  border-color: #aebac2;
  box-shadow: 0 2px 5px rgba(35, 49, 61, .075);
}
.level-list .polished-level.passed {
  background: #f2f6f3;
  border-color: #ccd9d1;
}
.level-list .polished-level.disabled {
  background: #f3f4f5;
  border-color: #d8dde1;
}
.level-list .polished-level .level-accent {
  height: 3px;
  background: color-mix(in srgb, var(--course-accent) 72%, #7f8b94);
}
.level-list .polished-level.disabled .level-accent { background: #aab2b9; }
.level-list .polished-level .level-status {
  border: 1px solid #dce3e7;
  background: #eef2f4;
}
.level-list .polished-level.passed .level-status {
  border-color: #d1ddd5;
  background: #e5ede8;
}
.level-list .polished-level.disabled .level-status,
.level-list .polished-level .level-status.locked {
  border-color: #d8dde1;
  background: #e8ebed;
  color: #7b858d;
}
.level-list .polished-level .level-meta-strip {
  border: 1px solid #e3e7ea;
  background: #f5f7f8;
}
.level-list .polished-level.passed .level-meta-strip {
  border-color: #dce5df;
  background: #eaf0ec;
}
@media (max-width: 640px) {
  .level-list > article.polished-level:nth-of-type(odd):not(.passed):not(.disabled) { background: #fcfdfb; }
  .level-list > article.polished-level:nth-of-type(even):not(.passed):not(.disabled) { background: #f5f7fa; }
}
.progressive-category-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px 2px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 640px) {
  .level-list-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    margin-top: 12px;
    padding: 13px 11px 11px;
    border-radius: 12px;
  }
  .level-list-search { grid-column: 1 / -1; }
  .level-list-show-all { grid-column: 1; margin-top: 0 !important; justify-self: start; }
  .level-list-count { grid-column: 2; justify-self: end; margin-top: 0; min-width: 0; }
}
.progressive-category-footer .btn {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}
.progressive-category-footer small { font: inherit; }
.polished-level {
  --course-accent: var(--green);
  padding: 0;
  overflow: hidden;
  border-color: #dde5e1;
  box-shadow: 0 2px 8px rgba(26, 32, 44, .055);
}
.polished-level.clickable:hover {
  border-color: color-mix(in srgb, var(--course-accent) 48%, white);
  box-shadow: 0 4px 13px rgba(26, 32, 44, .08);
}
.polished-level.passed {
  background: #f4fbf7;
  border-color: color-mix(in srgb, var(--course-accent) 38%, white);
}
.polished-level .level-accent { height: 4px; background: var(--course-accent); }
.polished-level.disabled .level-accent { background: #a0aec0; }
.level-card-body { padding: 13px 14px 12px; }
.level-copy { min-width: 0; }
.level-display-number { display: block; margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.level-history {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  max-width: 100%;
  margin-top: 7px;
  padding: 3px 7px;
  border: 1px solid #dce3e0;
  border-radius: 999px;
  background: #f4f7f5;
  color: #5d6b64;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}
.level-history b { color: var(--course-accent); font-size: 11px; line-height: 1; }
.level-history em { padding-inline-start: 5px; border-inline-start: 1px solid currentColor; font-style: normal; opacity: .86; }
.level-history.passed { border-color: #d3ded7; background: #edf3ef; color: #496253; }
.level-history.attempted { border-color: #dde2e6; background: #f3f5f7; color: #66717a; }
.lesson-nav { position: relative; }
.lesson-nav .level-history.nav-history {
  position: absolute;
  top: 50%;
  left: calc(75% - 11px);
  z-index: 1;
  margin: 0;
  padding: 3px 6px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.challenge-question-card { --content-font-size: var(--slide-content-font-size); }
.level-status {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--course-accent) 9%, white);
  color: var(--course-accent);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}
.level-status.disabled { color: #718096; background: #edf2f7; }
.level-status.locked { color: #718096; background: #edf2f7; }
.level-status.locked::before {
  content: "";
  position: absolute;
  top: 6px;
  width: 10px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}
.level-status.locked i {
  position: absolute;
  top: 13px;
  width: 15px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
}
.level-meta-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 7px 9px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--course-accent) 6%, white);
}
.level-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
  flex: 1;
}
.level-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #355b4a;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.level-metrics b { color: var(--course-accent); font-size: 10px; }
.polished-level .btn.play,
.polished-level .play-placeholder {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  height: 38px;
}
.polished-level .btn.play { background: var(--course-accent); border-color: var(--course-accent); border-radius: 8px; }
.level-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.level-title { margin: 0; font-size: 17px; }
.level-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.level-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #edf7f5;
  color: var(--green);
  border-radius: 8px;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.spacer { flex: 1; }
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.course-lock-policy { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; padding:10px 12px; border:1px solid #cddbd4; border-radius:10px; background:#f5faf7; }
.course-lock-policy > span { display:grid; gap:2px; min-width:0; }
.course-lock-policy strong { color:var(--green); font-size:.88rem; }
.course-lock-policy small { color:var(--muted); font-size:.74rem; line-height:1.45; }
.course-lock-policy.enabled { border-color:#d8bd82; background:#fff8e8; }
.course-lock-policy.enabled strong { color:#805b14; }
.course-lock-policy .btn { flex:0 0 auto; min-height:36px; }
@media (max-width:520px) { .course-lock-policy { display:grid; align-items:stretch; } .course-lock-policy .btn { width:100%; } }
.panel { padding: 18px; }
.lesson-content {
  --urdu-interface-font-increase: 0pt;
  font-size: var(--interface-font-size);
  margin-top: 16px;
  padding: 22px;
  border-color: #dde5e1;
  box-shadow: 0 2px 9px rgba(26, 32, 44, .05);
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.lesson-content.page-turn-next { animation: page-turn-next .18s ease-out; }
.lesson-content.page-turn-back { animation: page-turn-back .18s ease-out; }
@keyframes page-turn-next {
  from { opacity: .78; transform: perspective(900px) translateX(18px) rotateY(-4deg); }
  to { opacity: 1; transform: perspective(900px) translateX(0) rotateY(0); }
}
@keyframes page-turn-back {
  from { opacity: .78; transform: perspective(900px) translateX(-18px) rotateY(4deg); }
  to { opacity: 1; transform: perspective(900px) translateX(0) rotateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .lesson-content.page-turn-next,
  .lesson-content.page-turn-back { animation: none; }
}
.lesson-footer {
  flex-wrap: nowrap;
  margin-top: 14px;
}
.lesson-footer .btn {
  flex: 1;
  min-height: 46px;
  border-radius: 8px;
}
.lesson-nav {
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 14px;
}
.lesson-nav .btn {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 8px;
  font-size: 29px;
  line-height: 1;
}
.lesson-stage-fixed > .lesson-nav .btn {
  font-family: var(--font-ui);
  font-size: 0;
}
.lesson-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.lesson-nav-leading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-self: start;
}

.lesson-nav > .nav-back { justify-self: start; }
.lesson-nav > .nav-next,
.lesson-nav > .nav-complete { justify-self: end; }

.slide-font-scale {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #b7cec2;
  border-radius: 9px;
  background: #f7faf8;
  box-shadow: 0 1px 2px rgba(18, 66, 48, 0.08);
}

.slide-font-scale-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #587065;
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.slide-font-scale-small { font-size: 12px; }
.slide-font-scale-medium { font-size: 16px; }
.slide-font-scale-large { font-size: 20px; }

.slide-font-scale-button:hover {
  background: #e8f1ec;
  color: #1f6f54;
}

.slide-font-scale-button.is-active {
  background: #1f6f54;
  color: #fff;
  box-shadow: 0 1px 3px rgba(18, 66, 48, 0.2);
}

.slide-font-scale-button:focus-visible {
  outline: 2px solid #b56a00;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .lesson-nav-leading { gap: 6px; }
  .slide-font-scale { padding: 2px; }
  .slide-font-scale-button { width: 30px; height: 32px; }
  .lesson-nav-counter { min-width: 58px; padding-inline: 8px; }
}

.lesson-nav-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: #f1f6f3;
  color: #456456;
  direction: ltr;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.lesson-nav-icon { display: block; flex: 0 0 auto; }
.nav-back .lesson-nav-icon,
.nav-next .lesson-nav-icon {
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.nav-back .lesson-nav-icon { transform: rotate(135deg); }
.nav-next .lesson-nav-icon { transform: rotate(-45deg); }
.nav-complete .lesson-nav-icon::before {
  content: "";
  display: block;
  width: 11px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(-45deg);
}
.minimal-cards-slide {
  padding: clamp(18px, 3vw, 30px);
  background: #fff;
  border-color: #d9e3de;
}
.minimal-cards-layout {
  display: grid;
  gap: 14px;
}
.minimal-cards-title {
  margin: 2px 0 4px;
  color: #10233f;
  font-size: var(--slide-heading-font-size);
  font-weight: var(--slide-heading-font-weight);
  line-height: 1.45;
  text-align: center;
}
.minimal-cards-title.script-rtl {
  font-family: var(--font-urdu);
  text-align: center;
}
.minimal-cards-title.arabic-text { font-family: var(--font-arabic); }
.minimal-card {
  min-width: 0;
  padding: clamp(17px, 2.4vw, 25px);
  border: 1px solid #d4dde4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 35, 63, .03);
  text-align: center;
}
.minimal-card-primary { min-height: 150px; }
.minimal-card-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.minimal-card-pair.single { grid-template-columns: minmax(0, 1fr); }
.minimal-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  color: #1f6f54;
  font-family: var(--font-ui);
  font-size: 27px;
  line-height: 1;
}
.minimal-card h3 {
  margin: 4px 0 7px;
  color: #1f6f54;
  font-size: var(--slide-heading-font-size);
  font-weight: var(--slide-heading-font-weight);
  line-height: 1.45;
}
.minimal-card-examples h3 { color: #10233f; }
.minimal-card-rule {
  width: min(118px, 55%);
  height: 1px;
  margin: 0 auto 13px;
  background: #b7c8c0;
}
.minimal-card-copy,
.minimal-summary-copy {
  color: #2d3748;
  font-size: var(--slide-content-font-size);
  line-height: 1.8;
}
.minimal-card-line {
  display: block;
  width: 100%;
  text-align: start;
  unicode-bidi: plaintext;
}
.minimal-card-line.script-rtl { text-align: right; }
.minimal-card-line.script-ltr { text-align: left; }
.minimal-card-spacer { display: block; height: .7em; }
.minimal-card-example-grid {
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr);
}
.minimal-card-example-grid .example {
  border: 1px solid #e5ebe8;
  background: #fbfcfc;
}
.minimal-card-sections {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}
.minimal-card-copy + .minimal-card-sections {
  padding-top: 14px;
  border-top: 1px solid #e0e8e4;
}
.minimal-card-section {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e1e8e5;
  border-radius: 9px;
  background: #fbfcfc;
  text-align: start;
}
.minimal-card-section h4 {
  margin: 0 0 7px;
  color: #10233f;
  font-size: var(--slide-heading-font-size);
  font-weight: var(--slide-heading-font-weight);
  line-height: 1.6;
}
.minimal-card-section h4.script-rtl { text-align: right; }
.minimal-card-section-copy {
  color: #2d3748;
  font-size: var(--slide-content-font-size);
  line-height: 1.8;
}
.minimal-card-section-examples {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 10px;
}
.minimal-card-summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 11px 18px;
  border: 1px solid #83b59f;
  border-radius: 11px;
  background: #fbfefc;
  color: #24352d;
}
.minimal-card-summary strong {
  color: #1f6f54;
  font-size: var(--slide-heading-font-size);
  font-weight: var(--slide-heading-font-weight);
  white-space: nowrap;
}
.minimal-summary-copy {
  padding-inline-start: 15px;
  border-inline-start: 1px solid #9fc4b3;
}
@media (max-width: 720px) {
  .minimal-cards-slide { padding: 16px 13px; }
  .minimal-cards-layout { gap: 10px; }
  .minimal-cards-title { font-size: var(--slide-heading-font-size); }
  .minimal-card-pair { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .minimal-card { padding: 16px 13px; }
  .minimal-card-primary { min-height: 0; }
  .minimal-card-summary {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    padding: 11px 13px;
  }
  .minimal-card-summary strong { grid-column: 2; }
  .minimal-summary-copy {
    grid-column: 1 / -1;
    padding: 9px 0 0;
    border-inline-start: 0;
    border-top: 1px solid #c9ddd4;
  }
}
.slide-title {
  margin: 0 0 12px;
  font-size: var(--slide-heading-font-size);
  font-weight: var(--slide-heading-font-weight);
}
.quran-lesson .slide-title.arabic-text {
  direction: rtl;
  unicode-bidi: isolate;
  margin-bottom: 8px;
  color: #1a202c;
  font-family: var(--font-quran) !important;
  font-size: var(--slide-heading-font-size);
  font-synthesis: none;
  font-weight: var(--slide-heading-font-weight);
  line-height: 1.75;
  text-align: center;
}
.quran-wbw-lesson .slide-title.arabic-text {
  direction: rtl;
  unicode-bidi: isolate;
  font-family: var(--font-quran) !important;
  font-size: clamp(27px, calc(var(--content-font-size) + 12px), 36px);
  font-weight: 600;
}
.quran-wbw-lesson .slide-title.arabic-text > .term-word {
  color: #1f6f54;
  font-weight: 800;
}
.quran-wbw-lesson .slide-ayah-line {
  display: block;
  width: 100%;
  margin: 2px 0 9px;
  direction: rtl;
  color: #1f6f54;
  font-family: var(--font-quran) !important;
  font-size: clamp(24px, calc(var(--content-font-size) + 10px), 34px);
  font-weight: 800;
  line-height: 1.8;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  unicode-bidi: isolate;
}
.quran-wbw-lesson .slide-ayah-line .term-word { color: inherit; }
.quran-wbw-lesson > .examples {
  display: flex;
  flex-wrap: wrap;
  direction: rtl;
}
.quran-wbw-lesson > .examples > .example.compact {
  flex: 0 0 calc(50% - 4px);
}
.quran-wbw-lesson > .examples > .example.compact:has(+ .example.wide) {
  flex-grow: 1;
}
.quran-wbw-lesson > .examples > .example.compact:last-child {
  flex-grow: 1;
}
.quran-wbw-lesson > .examples > .example.wide {
  flex: 0 0 100%;
}
.quran-wbw-lesson > .examples > .example .arabic {
  direction: rtl;
  unicode-bidi: isolate;
}
@media (max-width: 480px) {
  .quran-wbw-lesson > .examples > .example.compact {
    flex-basis: 100%;
  }
}
.quran-lesson .slide-title.quran-juz30-intro-title > .quran-juz30-intro-title-text {
  color: #1f6f54;
  font-weight: 800;
}
.quran-lesson .slide-title.quran-juz30-intro-title > .quran-juz30-intro-title-text.arabic-text {
  display: inline-block;
  padding-inline: 0.04em;
  font-size: 1.08em;
  line-height: 1.25;
  unicode-bidi: isolate;
}
.app .lesson-content.tarkeeb-slide .slide-title {
  font-size: calc(var(--content-font-size) + 4px);
  font-weight: 800;
  line-height: 1.35;
}
.app .lesson-content.tarkeeb-slide .slide-title.tarkeeb-source-slide-title {
  color: #1f6f54;
  direction: ltr;
  font-size: calc(var(--content-font-size) + 2px);
  line-height: 1.55;
  text-align: left;
  unicode-bidi: isolate;
}
.app.lang-ur .lesson-content.tarkeeb-slide .slide-title.tarkeeb-source-slide-title {
  direction: rtl;
  font-family: var(--font-quran) !important;
  font-size: calc(var(--content-font-size) + 5px);
  font-synthesis: weight;
  font-weight: 900;
  text-align: right;
  -webkit-text-stroke: 0.35px currentColor;
}
.app.lang-ur .lesson-content.tarkeeb-slide.qac-urdu-body-naskh > .slide-body,
.app.lang-ur .lesson-content.tarkeeb-slide.qac-urdu-body-naskh > .slide-body .arabic-run,
.app.lang-ur .lesson-content.tarkeeb-slide.qac-urdu-body-naskh > .slide-body .urdu-run,
.app.lang-ur .lesson-content.tarkeeb-slide.qac-urdu-body-naskh > .slide-body [lang="ar"],
.app.lang-ur .lesson-content.tarkeeb-slide.qac-urdu-body-naskh > .slide-body [lang="ur"] {
  font-family: "Aalim Arabic Naskh", "Noto Naskh Arabic", serif !important;
}
.tarkeeb-panel { display: grid; gap: 15px; margin-top: 16px; direction: ltr; }
.tarkeeb-ayah { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; padding: 12px 14px; border: 1px solid #dce8e2; border-radius: 7px; background: #f8fbf9; color: var(--green); font-family: var(--font-quran); font-size: calc(var(--content-font-size) + 7px); font-weight: 700; line-height: 1.9; text-align: center; }
.tarkeeb-ayah span { color: #698076; font-size: .68em; font-weight: 600; }
.tarkeeb-sentence { overflow-x: auto; padding: 4px 3px 10px; scrollbar-width: thin; scrollbar-color: #b7c9c0 transparent; }
.tarkeeb-tree { display: flex; width: max-content; min-width: 100%; align-items: flex-start; justify-content: center; gap: 20px; padding: 5px 8px 12px; }
.tarkeeb-branch { position: relative; display: flex; flex-direction: column; align-items: center; min-width: max-content; }
.tarkeeb-children { position: relative; display: flex; align-items: flex-start; justify-content: center; gap: 13px; margin-top: 25px; padding-top: 15px; }
.tarkeeb-children::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 15px; background: #8ca4b8; }
.tarkeeb-children > .tarkeeb-branch::before { content: ""; position: absolute; top: -15px; left: 50%; width: calc(100% + 13px); height: 15px; border-top: 1px solid #8ca4b8; }
.tarkeeb-children > .tarkeeb-branch:first-child::before { width: calc(50% + 7px); left: 50%; }
.tarkeeb-children > .tarkeeb-branch:last-child::before { width: calc(50% + 7px); left: 0; }
.tarkeeb-children > .tarkeeb-branch:only-child::before { width: 1px; left: 50%; border-top: 0; background: #8ca4b8; }
.tarkeeb-node { position: relative; display: grid; min-width: 108px; max-width: 180px; min-height: 62px; place-items: center; gap: 2px; padding: 8px 11px; border: 1px solid #cbd9d2; border-radius: 7px; background: white; color: var(--ink); box-shadow: 0 2px 5px rgba(26, 58, 42, .06); cursor: pointer; }
.tarkeeb-node:disabled { cursor: default; opacity: 1; }
.tarkeeb-node .arabic-text { color: var(--green); font-size: calc(var(--content-font-size) + 5px); line-height: 1.45; }
.tarkeeb-word-parts { display: inline; white-space: nowrap; unicode-bidi: isolate; }
.tarkeeb-word-part { display: inline; }
.tarkeeb-node .tarkeeb-word-part.is-connector, .tarkeeb-node .tarkeeb-word-part.is-particle, .corpus-word .tarkeeb-word-part.is-connector, .corpus-word .tarkeeb-word-part.is-particle, .tarkeeb-answer-chip .tarkeeb-word-part.is-connector, .tarkeeb-answer-chip .tarkeeb-word-part.is-particle, .tarkeeb-detail-heading .tarkeeb-word-part.is-connector, .tarkeeb-detail-heading .tarkeeb-word-part.is-particle { color: #a92d73 !important; border-bottom: 1px solid rgba(169, 45, 115, .32); font-weight: 800; }
.tarkeeb-word-part.is-pronoun { color: #587a94 !important; font-weight: 800; }
.tarkeeb-word-part.is-verb { color: #258a42 !important; }
.tarkeeb-word-part.is-noun { color: #356fa8 !important; }
.tarkeeb-word-part.is-other { color: #725b98 !important; }
.tarkeeb-node.pos-noun .arabic-text, .corpus-word.pos-noun .arabic-text { color: #356fa8; }
.tarkeeb-node.pos-verb .arabic-text, .corpus-word.pos-verb .arabic-text { color: #258a42; }
.tarkeeb-node.pos-pronoun .arabic-text, .corpus-word.pos-pronoun .arabic-text { color: #587a94; }
.tarkeeb-node.pos-particle .arabic-text, .corpus-word.pos-particle .arabic-text { color: #a92d73; }
.tarkeeb-node.pos-other .arabic-text, .corpus-word.pos-other .arabic-text { color: #725b98; }
.tarkeeb-node-labels { display: grid; width: 100%; min-width: 0; justify-items: center; gap: 2px; }
.tarkeeb-node-labels > * { display: block; max-width: 100%; overflow-wrap: anywhere; }
.tarkeeb-node-pos { color: #667b71; font-size: 11px; font-weight: 800; line-height: 1.25; }
.tarkeeb-node-role { width: 100%; padding-top: 2px; border-top: 1px solid #d7e5dd; color: var(--green); font-size: 12px; font-weight: 900; line-height: 1.25; }
.tarkeeb-panel.is-detailed .tarkeeb-node { min-width: 116px; max-width: 196px; min-height: 76px; padding: 9px 12px; }
.tarkeeb-panel.is-detailed .tarkeeb-node .arabic-text { font-size: calc(var(--content-font-size) + 7px); font-weight: 800; }
.tarkeeb-panel.is-detailed .tarkeeb-node-pos { font-size: 13px; }
.tarkeeb-panel.is-detailed .tarkeeb-node-role { font-size: 14px; }
.tarkeeb-sentence.is-focused { overflow: visible; }
.tarkeeb-focus-viewport { display: grid; gap: 7px; min-width: 0; padding: 7px 2px 12px; }
.tarkeeb-focus-heading { color: var(--green); font-size: 14px; font-weight: 900; text-align: center; }
.tarkeeb-focus-lane { display: flex; width: 100%; align-items: stretch; justify-content: center; gap: 12px; overflow-x: auto; padding: 5px 4px 12px; scrollbar-width: thin; scrollbar-color: #b7c9c0 transparent; }
.tarkeeb-orthographic-word { display: grid; flex: 0 0 auto; min-width: 138px; max-width: 420px; align-content: space-between; overflow: hidden; border: 1px solid #b9cfc3; border-radius: 9px; background: #fff; box-shadow: 0 3px 9px rgba(26, 58, 42, .07); }
.tarkeeb-orthographic-word.is-implied { border-style: dashed; background: #fbfcfb; }
.tarkeeb-word-segments { display: flex; direction: rtl; align-items: stretch; min-height: 102px; }
.tarkeeb-atomic-segment { display: grid; flex: 1 1 auto; min-width: 64px; place-items: center; align-content: start; gap: 4px; padding: 10px 8px 8px; border: 0; border-inline-start: 1px solid rgba(76, 99, 88, .16); background: transparent; color: var(--ink); cursor: pointer; }
.tarkeeb-atomic-segment:first-child { border-inline-start: 0; }
.tarkeeb-atomic-segment:disabled { cursor: default; opacity: 1; }
.tarkeeb-atomic-segment .arabic-text { font-size: calc(var(--content-font-size) + 8px); font-weight: 900; line-height: 1.45; }
.tarkeeb-segment-kind { display: block; color: #4c6157; font-size: 12px; font-weight: 800; line-height: 1.25; text-align: center; }
.tarkeeb-segment-analysis { display: grid; width: 100%; justify-items: center; gap: 3px; padding-top: 3px; border-top: 1px solid rgba(76, 99, 88, .14); }
.tarkeeb-segment-pos { color: #536e61; font-size: 14px; font-weight: 900; line-height: 1.3; }
.tarkeeb-segment-role { color: var(--green); font-size: 15px; font-weight: 900; line-height: 1.3; text-align: center; unicode-bidi: plaintext; }
.tarkeeb-atomic-segment.segment-connector { background: #fff3f9; }
.tarkeeb-atomic-segment.segment-connector .arabic-text { color: #a92d73; }
.tarkeeb-atomic-segment.segment-article { background: #fff8eb; }
.tarkeeb-atomic-segment.segment-article .arabic-text { color: #a45c08; }
.tarkeeb-atomic-segment.segment-prefix { background: #f7f2ff; }
.tarkeeb-atomic-segment.segment-prefix .arabic-text { color: #6b4b9b; }
.tarkeeb-atomic-segment.segment-stem { background: #f2faf6; }
.tarkeeb-atomic-segment.segment-stem .arabic-text { color: #246f51; }
.tarkeeb-atomic-segment.segment-suffix-pronoun { background: #eef7fc; }
.tarkeeb-atomic-segment.segment-suffix-pronoun .arabic-text { color: #2f6f98; }
.tarkeeb-atomic-segment.segment-suffix { background: #f2f6f8; }
.tarkeeb-atomic-segment.segment-suffix .arabic-text { color: #587a94; }
.tarkeeb-context-link { display: block; padding: 2px 5px; border-radius: 999px; background: #e6eef8; color: #315d82; font-size: 11px; font-weight: 900; line-height: 1.2; }
.tarkeeb-word-identity { display: block; padding: 5px 8px; border-top: 1px solid #d7e3dd; background: #f8fbf9; color: #65786f; font-size: 11px; font-weight: 800; text-align: center; }
.tarkeeb-atomic-segment.is-selected { box-shadow: inset 0 0 0 3px rgba(39, 103, 73, .45); }
.tarkeeb-atomic-segment.is-correct { background: #dff5e7; box-shadow: inset 0 0 0 2px #198754; }
.tarkeeb-atomic-segment.is-wrong { background: #fff0f0; color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }
.tarkeeb-focus-error { padding: 12px; border: 1px solid #d98585; border-radius: 7px; background: #fff2f2; color: #8a2323; font-weight: 800; text-align: center; }
.tarkeeb-focus-error code { display: block; margin-top: 5px; font-size: 10px; overflow-wrap: anywhere; }
.tarkeeb-sentence-context { min-width: 0; margin: 2px 3px 0; border: 1px solid #cbdcd3; border-radius: 8px; background: #fbfdfc; direction: ltr; }
.tarkeeb-sentence-context > summary { padding: 11px 13px; color: var(--green); font-size: 14px; font-weight: 900; cursor: pointer; text-align: start; }
.tarkeeb-sentence-context > summary small { color: #718096; }
.tarkeeb-sentence-context.is-locked > p { margin: 0; padding: 0 13px 12px; color: #65786f; font-size: 12px; }
.tarkeeb-context-body { display: grid; gap: 10px; padding: 0 10px 11px; border-top: 1px solid #dce8e2; }
.tarkeeb-context-ayat-list { display: grid; gap: 5px; padding-top: 10px; }
.tarkeeb-context-ayah { color: #456052; font-family: var(--font-quran); font-size: calc(var(--content-font-size) + 2px); font-weight: 700; line-height: 1.8; text-align: center; }
.tarkeeb-context-ayah span { color: #718096; font-size: .7em; }
.tarkeeb-context-tree { overflow-x: auto; padding-top: 5px; scrollbar-width: thin; scrollbar-color: #b7c9c0 transparent; }
.tarkeeb-node em { color: #87978f; font-size: 9px; font-style: normal; font-weight: 700; }
.tarkeeb-panel.analysis-hidden .tarkeeb-node { min-height: 48px; padding-block: 6px; border-color: transparent; background: transparent; box-shadow: none; }
.tarkeeb-node.is-implied { border-style: dashed; background: #fbfcfb; }
.tarkeeb-node.is-focus, .tarkeeb-node.is-selected { border-color: var(--green); background: #e6f4ec; box-shadow: 0 0 0 2px rgba(39, 103, 73, .14); }
.tarkeeb-node.is-ancestor { border-color: #83aa97; background: #f0f8f4; }
.tarkeeb-node.is-correct, .corpus-word.is-correct { border-color: #198754; background: #dff5e7; }
.tarkeeb-node.is-wrong, .corpus-word.is-wrong { border-color: var(--danger); background: #fff0f0; color: var(--danger); }
.tarkeeb-node-detail { display: grid; gap: 10px; padding: 12px; border: 1px solid #d7e3dd; border-inline-start: 4px solid var(--green); border-radius: 7px; background: #f8fbf9; direction: ltr; }
.tarkeeb-detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tarkeeb-detail-heading .tarkeeb-word-parts { color: var(--green); font-size: calc(var(--content-font-size) + 5px); font-weight: 800; }
.tarkeeb-detail-labels { display: grid; gap: 2px; justify-items: end; text-align: end; }
.tarkeeb-detail-labels strong { color: var(--green); font-size: 12px; font-weight: 900; }
.tarkeeb-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 7px; }
.tarkeeb-detail-grid div { display: grid; gap: 2px; padding: 7px 8px; border-radius: 6px; background: white; }
.tarkeeb-detail-grid span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.tarkeeb-detail-grid strong { font-size: 12px; }
.tarkeeb-eqtb-advanced { overflow: hidden; border: 1px solid #cbdcd3; border-radius: 7px; background: white; }
.tarkeeb-eqtb-advanced summary { padding: 9px 11px; color: var(--green); font-size: 12px; font-weight: 900; cursor: pointer; text-align: start; }
.tarkeeb-eqtb-advanced dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; margin: 0; padding: 1px; background: #e1ebe6; }
.tarkeeb-eqtb-advanced dl > div { min-width: 0; padding: 8px 9px; background: #fbfdfc; }
.tarkeeb-eqtb-advanced dt { color: #65786f; font-size: 10px; font-weight: 800; }
.tarkeeb-eqtb-advanced dd { margin: 3px 0 0; color: #263d32; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; unicode-bidi: plaintext; }
.tarkeeb-node-detail.is-detailed > small { color: #718096; overflow-wrap: anywhere; }
.tarkeeb-relation-ledger { min-width: min(760px, 100%); margin: 10px auto 0; border: 1px solid #cbdcd3; border-radius: 7px; background: #fbfdfc; direction: ltr; }
.tarkeeb-relation-ledger summary { padding: 10px 12px; color: var(--green); font-size: 13px; font-weight: 900; cursor: pointer; text-align: start; }
.tarkeeb-relation-ledger summary small { color: #718096; }
.tarkeeb-relation-ledger > div { display: grid; gap: 1px; max-height: 420px; overflow: auto; padding: 1px; background: #dfeae4; }
.tarkeeb-relation-row { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(110px, .8fr) minmax(160px, 1.2fr); align-items: center; gap: 8px; padding: 8px; background: white; }
.tarkeeb-relation-row.is-implied { border-inline-start: 3px dashed #87978f; background: #fbfbfb; }
.tarkeeb-relation-row > button { display: grid; min-width: 0; justify-items: start; gap: 1px; padding: 5px 7px; border: 1px solid #d7e3dd; border-radius: 5px; background: #f8fbf9; color: inherit; cursor: pointer; text-align: start; }
.tarkeeb-relation-row > button:disabled { cursor: default; opacity: 1; }
.tarkeeb-relation-row > button .arabic-text { color: var(--green); font-size: calc(var(--content-font-size) + 3px); font-weight: 800; }
.tarkeeb-relation-row small { color: #587267; font-size: 10px; font-weight: 700; }
.tarkeeb-relation-row code { display: block; max-width: 100%; color: #718096; font-family: ui-monospace, monospace; font-size: 9px; overflow-wrap: anywhere; }
.tarkeeb-relation-role { color: var(--green); font-size: 13px; font-weight: 900; unicode-bidi: plaintext; }
.tarkeeb-relation-parent { min-width: 0; color: #394c43; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.tarkeeb-relation-parent .arabic-text { font-size: calc(var(--content-font-size) + 1px); }
.tarkeeb-constituent-badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; }
.tarkeeb-constituent-badges span { padding: 3px 6px; border-radius: 4px; background: #eaf4ef; color: #365a48; font-size: 10px; overflow-wrap: anywhere; }
.tarkeeb-empty { padding: 14px; border: 1px dashed #cbd9d2; border-radius: 7px; color: var(--muted); text-align: center; }
.tarkeeb-feedback { margin-top: 12px; }
.tarkeeb-correct-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 9px; }
.tarkeeb-answer-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid #8db7a1; border-radius: 6px; background: #edf8f2; color: var(--green); }
.corpus-tarkeeb-panel { gap: 12px; direction: ltr; }
.corpus-sentence { overflow: hidden; border: 1px solid #d7e3dd; border-radius: 8px; background: #fbfdfc; }
.corpus-scroll { overflow-x: auto; padding: 13px 10px 9px; scrollbar-width: thin; scrollbar-color: #b7c9c0 transparent; }
.corpus-canvas { position: relative; min-width: 100%; height: 205px; }
.corpus-word-row { position: relative; z-index: 2; display: flex; direction: rtl; align-items: flex-start; gap: 16px; min-width: max-content; }
.corpus-word { display: grid; flex: 0 0 116px; width: 116px; min-height: 98px; place-items: center; align-content: start; gap: 2px; padding: 4px 5px 7px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer; }
.corpus-word:disabled { cursor: default; opacity: 1; }
.corpus-word .arabic-text { font-size: calc(var(--content-font-size) + 7px); font-weight: 700; line-height: 1.55; }
.corpus-gloss { min-height: 29px; color: #394c43; font-size: 10px; font-weight: 700; line-height: 1.25; text-align: center; }
.corpus-analysis-labels { display: grid; min-height: 28px; justify-items: center; align-content: start; gap: 2px; }
.corpus-pos, .corpus-role { font-size: 12px; font-weight: 900; line-height: 1.25; text-align: center; }
.corpus-pos { color: #667b71; text-transform: uppercase; }
.corpus-role { color: var(--green); }
.corpus-word.is-selected { border-color: var(--green); background: #eaf6ef; box-shadow: 0 0 0 2px rgba(39, 103, 73, .12); }
.corpus-relations { position: absolute; z-index: 1; top: 101px; left: 0; width: 100%; height: 92px; overflow: visible; pointer-events: none; }
.corpus-relations path { fill: none; stroke: #7894ad; stroke-width: 1.35; vector-effect: non-scaling-stroke; }
.corpus-relations circle { fill: #7894ad; }
.corpus-relations text { fill: #4e6b84; font-family: var(--font-urdu); font-size: 10px; font-weight: 700; }
.corpus-tarkeeb-panel.analysis-hidden .corpus-word { min-height: 58px; align-content: center; }
.corpus-tarkeeb-panel.analysis-hidden .corpus-relations { top: 62px; }
.corpus-tarkeeb-panel.analysis-hidden .corpus-canvas { height: 165px; }
/* Quranic Arabic Corpus source-style treebank profile.
   Opt-in only: app.js currently binds this profile to disabled test level 492. */
.qac-corpus-treebank {
  gap: 16px;
  direction: ltr;
  font-family: Arial, "Noto Sans", sans-serif;
}
.qac-sentence { display: grid; gap: 18px; min-width: 0; }
.qac-graph-scroll { overflow-x: auto; padding: 8px 4px 2px; scrollbar-width: thin; scrollbar-color: #a9bac7 transparent; }
.qac-canvas { min-width: max-content; margin-inline: auto; }
.qac-word-row { display: grid; min-height: 142px; direction: rtl; align-items: start; }
.qac-word-group {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(42px, auto) minmax(94px, auto);
  justify-items: center;
  align-content: start;
  color: #111;
  text-align: center;
}
.qac-location, .qac-phonetic, .qac-gloss {
  display: block;
  max-width: 100%;
  overflow: hidden;
  direction: ltr;
  line-height: 1.35;
  text-overflow: ellipsis;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.qac-location { color: #787878; font-size: 13px; }
.qac-phonetic { color: #4886d0; font-size: 13px; }
.qac-gloss {
  color: #111;
  font-size: 13px;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.qac-segments {
  display: flex;
  direction: rtl;
  align-items: start;
  justify-content: center;
  gap: 0;
  min-width: 0;
}
.qac-segment {
  display: grid;
  min-width: 25px;
  justify-items: center;
  align-content: start;
  gap: 0;
  padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #4a6f8f;
  cursor: pointer;
}
.qac-segment:disabled { cursor: default; opacity: 1; }
.qac-arabic {
  color: inherit !important;
  font-family: var(--font-quran) !important;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
}
.qac-surface-word { min-width: 0; padding-inline: 2px; }
.qac-surface-arabic { display: inline; direction: rtl; unicode-bidi: isolate; white-space: nowrap; }
.qac-segment-fragment { display: inline; padding: 0; margin: 0; }
.qac-arabic.qac-pos-v { color: #32bd2f !important; }
.qac-arabic.qac-pos-pron { color: #5c7085 !important; }
.qac-arabic.qac-pos-pn { color: #257e9c !important; }
.qac-arabic.qac-pos-n { color: #4886d0 !important; }
.qac-arabic.qac-pos-conj { color: #ab5d22 !important; }
.qac-corpus-treebank .qac-arabic.qac-pos-intg { color: #ef4b4b !important; }
.qac-arabic.qac-pos-det { color: #b87922 !important; }
.qac-arabic.qac-pos-neg { color: #a92d73 !important; }
.qac-arabic.qac-pos-p { color: #ad46a1 !important; }
.qac-arabic.qac-pos-other { color: #725b98 !important; }
.qac-surface-analysis {
  display: flex;
  direction: rtl;
  justify-content: center;
  align-items: start;
  column-gap: 8px;
  margin-top: 12px;
}
.qac-analysis-fragment { display: grid; min-width: 30px; justify-items: center; align-content: start; }
.qac-anchor-dot { height: 11px; color: inherit; font-size: 11px; line-height: 1; }
.qac-pos-code {
  color: inherit;
  font-family: Arial, "Noto Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}
.qac-pos-v { color: #32bd2f; }
.qac-pos-pron { color: #5c7085; }
.qac-pos-pn { color: #257e9c; }
.qac-pos-n { color: #4886d0; }
.qac-pos-conj { color: #ab5d22; }
.qac-corpus-treebank .qac-pos-intg { color: #ef4b4b; }
.qac-pos-det { color: #b87922; }
.qac-pos-neg { color: #a92d73; }
.qac-pos-p { color: #ad46a1; }
.qac-pos-other { color: #725b98; }
.qac-word-group.is-implied { opacity: .42; }
.qac-word-group.is-implied .qac-arabic { font-family: var(--font-arabic) !important; }
.qac-segment.is-selected { border-color: #276749; background: #eaf6ef; box-shadow: 0 0 0 2px rgba(39, 103, 73, .12); }
.qac-segment.is-correct { border-color: #198754; background: #dff5e7; }
.qac-segment.is-wrong { border-color: var(--danger); background: #fff0f0; }
.qac-relations { display: block; width: 100%; overflow: visible; }
.qac-relations marker path { fill: context-stroke; }
.qac-relation-underlay {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.qac-relation-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.qac-relation-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.qac-dependent-dot { fill: currentColor; }
.qac-constituent-dot { fill: #4886d0; }
.qac-relation-label, .qac-constituent-label {
  fill: currentColor;
  stroke: #fff;
  stroke-width: 2.5px;
  paint-order: stroke fill;
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 500;
}
.qac-constituent-bar, .qac-constituent-stem { stroke: #4886d0; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.qac-constituent-label { font-family: Arial, "Noto Sans", sans-serif; font-size: 16px; }
.qac-constituent-label { color: #4f7fa8; fill: #4f7fa8; }
.qac-corpus-treebank[data-language="ur"] .qac-gloss,
.qac-corpus-treebank[data-language="ur"] .qac-pos-code,
.qac-corpus-treebank[data-language="ur"] .qac-constituent-label,
.qac-corpus-treebank[data-language="ur"] .qac-morphology-table,
.qac-corpus-treebank[data-language="ur"] .qac-source-attribution { font-family: var(--font-urdu); }
.qac-corpus-treebank[data-language="ur"] .qac-pos-code { font-size: 14px; text-transform: none; }
.qac-corpus-treebank[data-language="ur"] .qac-constituent-label { font-size: 14px; }
.qac-corpus-treebank[data-language="ur"] .qac-gloss { font-size: 15px; line-height: 1.55; }
.qac-morphology-scroll { width: 100%; overflow-x: auto; }
.qac-morphology-table {
  width: min(740px, 100%);
  min-width: 660px;
  margin-inline: auto;
  border-collapse: collapse;
  border-top: 1px solid #111;
  table-layout: fixed;
  color: #111;
  direction: ltr;
  font-family: Arial, "Noto Sans", sans-serif;
  font-size: 13px;
}
.qac-morphology-table th, .qac-morphology-table td {
  padding: 14px 10px;
  border-bottom: 1px dashed #b4b4b4;
  vertical-align: middle;
}
.qac-morphology-table tbody tr { height: 110px; }
.qac-morphology-table th {
  border-bottom: 1px solid #111;
  background: #f4ffe5;
  color: #111;
  font-weight: 700;
  text-align: center;
}
.qac-morphology-table th:nth-child(1), .qac-morphology-table td:nth-child(1) { width: 28%; }
.qac-morphology-table th:nth-child(2), .qac-morphology-table td:nth-child(2) { width: 72%; }
.qac-morphology-table th:nth-child(2), .qac-syntax-cell { text-align: right; }
.qac-arabic-cell { text-align: center; }
.qac-morph-word {
  display: flex;
  direction: rtl;
  align-items: start;
  justify-content: center;
}
.qac-morph-word .qac-arabic { font-size: 36px; }
.qac-morph-word .qac-pos-code { font-size: 17px; }
.qac-morph-segment { display: grid; gap: 4px; padding-block: 3px; }
.qac-corpus-treebank[data-language="ur"] .qac-morph-segment { text-align: right; }
.qac-morph-urdu-summary { font-size: 17px; font-weight: 600; line-height: 1.55; }
.qac-morph-code { font-weight: 700; }
.qac-morph-arabic, .qac-morph-group-label {
  color: #329632;
  font-family: var(--font-arabic);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}
.qac-morph-group-label { margin-top: 4px; }
.qac-source-attribution { display: block; color: #718096; font-size: 10px; line-height: 1.4; text-align: center; }
.qac-corpus-treebank.analysis-hidden .qac-gloss { visibility: hidden; }
@media (max-width: 640px) {
  .qac-graph-scroll { margin-inline: -2px; padding-inline: 2px; }
  .qac-morphology-table { min-width: 620px; }
}
@media (max-width: 430px) {
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas[data-qac-dense-fit="true"] .qac-arabic {
    font-size: clamp(20px, 5.6vw, 25px);
  }
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas[data-qac-dense-fit="true"] .qac-gloss {
    font-size: clamp(9px, 2.6vw, 11px);
    line-height: 1.3;
  }
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas[data-qac-dense-fit="true"] .qac-surface-analysis {
    column-gap: 2px;
  }
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas[data-qac-dense-fit="true"] .qac-analysis-fragment {
    min-width: 20px;
  }
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas[data-qac-dense-fit="true"] .qac-pos-code,
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"][data-language="ur"] .qac-canvas[data-qac-dense-fit="true"] .qac-pos-code {
    font-size: 10px;
    line-height: 1.2;
  }
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas[data-qac-dense-fit="true"] .qac-relation-label,
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas[data-qac-dense-fit="true"] .qac-constituent-label {
    font-size: 11px;
  }
}
@media (max-width: 640px) {
  .tarkeeb-panel { gap: 11px; margin-top: 12px; }
  .tarkeeb-ayah { padding: 9px 10px; font-size: calc(var(--content-font-size) + 5px); }
  .tarkeeb-tree { justify-content: flex-start; gap: 12px; padding-inline: 4px; }
  .tarkeeb-children { gap: 8px; }
  .tarkeeb-node { min-width: 92px; max-width: 145px; min-height: 56px; padding: 6px 8px; }
  .tarkeeb-panel.is-detailed .tarkeeb-node { min-width: 104px; max-width: 164px; min-height: 70px; padding: 7px 9px; }
  .tarkeeb-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tarkeeb-eqtb-advanced dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tarkeeb-focus-lane { justify-content: flex-start; }
  .tarkeeb-orthographic-word { min-width: 126px; }
  .tarkeeb-atomic-segment { min-width: 58px; padding-inline: 7px; }
  .tarkeeb-segment-pos { font-size: 13px; }
  .tarkeeb-segment-role { font-size: 14px; }
  .tarkeeb-relation-row { grid-template-columns: minmax(120px, 1fr) minmax(100px, .8fr); }
  .tarkeeb-relation-parent { grid-column: 1 / -1; }
}
.slide-body {
  color: #2d3748;
  font-size: var(--slide-content-font-size);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.slide-body.presentation-bullets {
  line-height: 1.65;
}
.presentation-body-line {
  display: block;
}
.presentation-bullet-line {
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr);
  column-gap: .4em;
  align-items: start;
  direction: inherit;
}
.presentation-bullet-line.presentation-bullet-nested {
  padding-inline-start: 1.4em;
}
.presentation-bullet-marker {
  grid-column: 1;
  text-align: center;
}
.presentation-bullet-text {
  grid-column: 2;
  min-width: 0;
  text-align: start;
  overflow-wrap: anywhere;
}
.presentation-bullet-line + .presentation-bullet-line {
  margin-block-start: 10px;
}
.presentation-body-spacer {
  min-height: 10px;
}
.aalim-presentation-table-wrap {
  display: block;
  width: 100%;
  margin-block: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #d7e1dc;
  border-radius: 10px;
  background: #fff;
  white-space: normal;
  -webkit-overflow-scrolling: touch;
}
.aalim-presentation-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  color: #2d3748;
  background: #fff;
  white-space: normal;
}
.aalim-presentation-table th,
.aalim-presentation-table td {
  min-width: 112px;
  padding: 10px 14px;
  border-inline-end: 1px solid #d7e1dc;
  border-block-end: 1px solid #d7e1dc;
  vertical-align: middle;
  text-align: start;
  overflow-wrap: anywhere;
}
.aalim-presentation-table th {
  color: #244d3c;
  background: #f2f7f4;
  font-weight: 800;
}
.aalim-presentation-table tr:last-child > * { border-block-end: 0; }
.aalim-presentation-table tr > *:last-child { border-inline-end: 0; }
.term-word { color: #1f6f54; font-weight: 800; }
.term-word.arabic-term {
  padding-inline: 0.04em;
  font-size: 1.08em;
  line-height: 1.25;
}
.aalim-markup { color: inherit; font: inherit; }
.aalim-markup-b { font-weight: 800; }
.app.lang-en .lesson-content > .slide-body .aalim-markup-b,
.app.lang-en .lesson-content > .slide-note .aalim-markup-b,
.app.lang-en .minimal-card-copy .aalim-markup-b,
.app.lang-en .minimal-card-section-copy .aalim-markup-b,
.app.lang-en .minimal-summary-copy .aalim-markup-b {
  font-weight: 700;
}
.app.lang-en .lesson-content :is(.aalim-markup-a, .aalim-markup-q, .aalim-markup-h) .aalim-markup-b,
.app.lang-en .lesson-content .aalim-presentation-table th .aalim-markup-b,
.app.lang-en .lesson-content .arabic-run .aalim-markup-b,
.app.lang-en .lesson-content .aalim-markup-b .arabic-run {
  font-weight: 800;
}

/* Global learner quiz hierarchy: editorial prompts, calm selectable answers. */
.lesson-content .question-title {
  margin: 0 0 7px;
  color: #60736b;
  font-family: var(--font-ui);
  font-size: clamp(13px, var(--content-font-size), 17px);
  font-weight: 750;
  line-height: 1.45;
  letter-spacing: .025em;
}
.lesson-content .question-prompt {
  margin: 0 0 22px;
  padding: 17px 19px 18px;
  border: 1px solid #dde4e3;
  border-inline-start: 4px solid #b58a42;
  border-radius: 12px;
  background: #fffdf8;
  color: #172b35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, calc(var(--content-font-size) + 7px), 30px);
  font-weight: 700;
  line-height: 1.52;
  letter-spacing: -.012em;
  box-shadow: 0 2px 8px rgba(31, 51, 60, .05);
}
.lesson-content .question-prompt-line.script-rtl,
.lesson-content .question-prompt-line.urdu-text,
.lesson-content .question-prompt-line.arabic-text {
  font-family: var(--font-arabic);
  font-size: clamp(24px, calc(var(--content-font-size) + 9px), 34px);
  font-weight: 650;
  line-height: 1.8;
  letter-spacing: 0;
}
.lesson-content .question-prompt-line.urdu-text { font-family: var(--font-urdu); font-weight: 700; }
.lesson-content .question-prompt :is(.aalim-markup-a, .aalim-markup-q, .aalim-markup-h) { letter-spacing: 0; }
.challenge-question-card .question-prompt {
  border-color: #cfddd6;
  border-inline-start-color: #2f7d61;
  background: #f7fbf9;
  color: #173f31;
  box-shadow: 0 2px 8px rgba(39, 103, 73, .06);
}
.lesson-content .answers { gap: 12px; }
.lesson-content .answer.mcq-choice {
  min-height: 60px;
  padding: 14px 18px;
  border-color: #cdd8de;
  border-radius: 12px;
  background: #fffefc;
  color: #263946;
  font-family: var(--font-ui);
  font-size: clamp(17px, calc(var(--content-font-size) + 1px), 21px);
  font-weight: 600;
  line-height: 1.58;
  box-shadow: 0 1px 4px rgba(31, 51, 60, .055);
}
.lesson-content .answer.mcq-choice.script-rtl {
  font-family: var(--font-arabic);
  font-size: clamp(20px, calc(var(--content-font-size) + 3px), 25px);
  font-weight: 600;
  line-height: 1.8;
}
.lesson-content .answer.mcq-choice.correct {
  border-color: #3f7f5d;
  background: #edf8f1;
  color: #205c3b;
  box-shadow: 0 1px 5px rgba(39, 103, 73, .1);
}
.lesson-content .answer.mcq-choice.wrong {
  border-color: #c65a5a;
  background: #fff2f1;
  color: #8f2f2f;
  box-shadow: 0 1px 5px rgba(155, 44, 44, .08);
}
.lesson-content :is(.match-tile, .word-chip, .sentence-token) {
  border-color: #cdd8de;
  border-radius: 11px;
  background: #fffefc;
  color: #2a3d49;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(31, 51, 60, .05);
}
.lesson-content :is(.match-tile.selected, .word-chip.selected, .sentence-token.selected) {
  border-color: #4f8a6d;
  background: #edf8f1;
  box-shadow: 0 0 0 2px rgba(79, 138, 109, .12);
}
.lesson-content .match-tile.wrong { border-color: #c65a5a; background: #fff2f1; }
.lesson-content :is(.sort-target, .match-row, .group-box, .sentence-answer-lane) {
  border-color: #d5dfe3;
  border-radius: 12px;
  background: #fafcfb;
}
.lesson-content .text-answer {
  border-color: #cdd8de;
  border-radius: 11px;
  background: #fffefc;
  box-shadow: inset 0 1px 2px rgba(31, 51, 60, .035);
}
.lesson-content .text-answer:focus {
  border-color: #4f7d69;
  outline: 3px solid rgba(79, 125, 105, .13);
  outline-offset: 1px;
}
@media (hover: hover) {
  .lesson-content .answer.mcq-choice:not(:disabled):hover,
  .lesson-content :is(.match-tile, .word-chip, .sentence-token):not(:disabled):hover {
    border-color: #8ea3ad;
    background: #f8faf9;
    box-shadow: 0 2px 7px rgba(31, 51, 60, .08);
  }
}
.lesson-content .answer.mcq-choice:focus-visible,
.lesson-content :is(.match-tile, .word-chip, .sentence-token):focus-visible {
  outline: 3px solid rgba(181, 138, 66, .22);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .lesson-content .question-prompt {
    margin-bottom: 17px;
    padding: 14px 15px 15px;
    border-radius: 10px;
    font-size: clamp(21px, calc(var(--content-font-size) + 5px), 27px);
  }
  .lesson-content .question-prompt-line.script-rtl,
  .lesson-content .question-prompt-line.urdu-text,
  .lesson-content .question-prompt-line.arabic-text {
    font-size: clamp(22px, calc(var(--content-font-size) + 7px), 30px);
  }
  .lesson-content .answer.mcq-choice {
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 10px;
  }
}
.aalim-markup-i { font-style: italic; }
.aalim-markup-u { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .12em; }
.aalim-markup-t { color: #0f766e; font-weight: 800; }
.aalim-markup-a { color: #4338ca; font-weight: 800; }
.quran-lesson > .slide-body .aalim-markup-a {
  font-size: 1.12em;
  font-weight: 900;
  line-height: 1.25;
  direction: rtl;
  unicode-bidi: isolate;
}
.aalim-markup-q,
.aalim-markup-h {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-block: clamp(10px, 1.5vw, 16px);
  color: var(--ink);
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.aalim-markup-q {
  font-family: var(--font-quran) !important;
  font-size: clamp(1.55em, 2.6vw, 1.95em);
  font-weight: 400;
  line-height: 2.05;
  font-synthesis: none;
  font-feature-settings: "rlig" 1, "liga" 1, "mark" 1, "mkmk" 1;
  text-rendering: optimizeLegibility;
}
.aalim-quran-section-transition { display: contents; }
.aalim-quran-section-transition > .aalim-markup-q {
  margin-block-end: clamp(7.5px, 1.125vw, 12px);
}
.aalim-markup-h {
  font-family: var(--font-arabic) !important;
  color: #276749;
  font-size: clamp(1.45em, 2.4vw, 1.85em);
  font-weight: 500;
  line-height: 1.95;
  margin-block: clamp(6px, .8vw, 10px) clamp(2px, .4vw, 4px);
  text-align: center;
  text-rendering: optimizeLegibility;
}
.aalim-markup-q [lang],
.aalim-markup-h [lang] { font-family: inherit !important; }
.aalim-markup-h .aalim-markup-sm {
  color: #5f6f68;
  font-size: .72em;
  font-weight: 400;
  line-height: 1.45;
  margin-inline-start: .55em;
  direction: rtl;
  unicode-bidi: isolate;
  white-space: normal;
  overflow-wrap: anywhere;
}
.aalim-hadith-inline-row {
  display: flex;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: auto;
  margin-block: clamp(6px, .8vw, 10px) clamp(2px, .4vw, 4px);
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: .55em;
  row-gap: 2px;
  direction: rtl;
  text-align: center;
}
.aalim-hadith-inline-main {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
.aalim-hadith-inline-row .aalim-markup-h {
  display: inline;
  width: auto;
  max-width: 100%;
  margin: 0;
  text-align: center;
}
.aalim-hadith-inline-reference {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-arabic) !important;
  color: #5f6f68;
  font-size: .9em;
  font-weight: 400;
  line-height: 1.45;
  direction: rtl;
  unicode-bidi: isolate;
  white-space: normal;
  overflow-wrap: anywhere;
}
.aalim-hadith-inline-row + br { display: none; }
.aalim-hadith-translation-line {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-block: 0;
  unicode-bidi: isolate;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.aalim-hadith-translation-line[dir="ltr"] { direction: ltr; }
.aalim-hadith-translation-line[dir="rtl"] { direction: rtl; }
.aalim-markup-r { color: #b42318; font-weight: 800; }
.aalim-markup-n { color: #b7791f; font-weight: 800; }
.aalim-markup-w,
.aalim-markup-x { color: #b42318; background: #fff1f0; font-weight: 800; }
.aalim-markup-ok { color: #18794e; font-weight: 800; }

/* Conventional English bold across learner and application surfaces. */
.app.lang-en { --english-normal-bold-weight: 600; }
.app.lang-en :where(
  b,
  strong,
  button,
  [role="button"],
  label,
  summary,
  th,
  .btn,
  .lesson-term,
  .lesson-note,
  .aalim-markup-b,
  .aalim-markup-t,
  .aalim-markup-r,
  .aalim-markup-n,
  .aalim-markup-w,
  .aalim-markup-x,
  .aalim-markup-ok
) {
  font-weight: var(--english-normal-bold-weight) !important;
}
.app.lang-en :where(
  .arabic-run,
  .arabic-text,
  .urdu-text,
  [lang="ar"],
  [lang="ur"]
) :where(b, strong, .aalim-markup-b),
.app.lang-en :where(
  .aalim-markup-b,
  .aalim-markup-t,
  .aalim-markup-r,
  .aalim-markup-n,
  .aalim-markup-w,
  .aalim-markup-x,
  .aalim-markup-ok
) :where(.arabic-run, .arabic-text, .urdu-text, [lang="ar"], [lang="ur"]) {
  font-weight: 800 !important;
}
.aalim-markup-hl { background: #fff3b0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.aalim-markup-sm { font-size: .85em; }
.aalim-markup-lg { font-size: 1.18em; }
.aalim-markup-sup { position: relative; top: -.38em; font-size: .75em; }
.aalim-markup-sub { position: relative; top: .2em; font-size: .75em; }
.aalim-markup-nw { white-space: nowrap; }
.slide-note {
  margin-top: 14px;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  background: #fff5f5;
  color: #c53030;
  font-weight: 700;
  line-height: 1.5;
  padding: 10px 12px;
  font-size: var(--slide-content-font-size);
}
.examples {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.example {
  background: #f7fafc;
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.example.wide { grid-column: 1 / -1; padding: 13px 15px; }
.example.term { background: #e6fffa; }
.example.warning { background: #fff5f5; }
.arabic {
  direction: rtl;
  text-align: center;
  color: #1a202c;
  font-weight: 800;
  font-size: calc(var(--content-font-size) + 6px);
}
.example.term .arabic { color: #1f6f54; }
.example.warning .arabic { color: #c53030; }
.meaning {
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
  font-size: var(--slide-content-font-size);
  white-space: pre-wrap;
}
.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 10px 0 22px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--green);
}
.answers {
  display: grid;
  gap: 10px;
}
.answer {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  font-size: var(--content-font-size);
}
.answer.mcq-choice {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 14px 16px;
  font-size: clamp(18px, calc(var(--content-font-size) + 2px), 22px);
  font-weight: 650;
  line-height: 1.55;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
.answer.mcq-choice.script-rtl {
  font-size: clamp(20px, calc(var(--content-font-size) + 4px), 26px);
  line-height: 1.75;
}
.question-title { margin: 0 0 8px; color: var(--green); font-size: calc(var(--content-font-size) + 1px); line-height: 1.55; font-weight: 700; }
.challenge-question-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 0 0 8px; }
.challenge-question-header .question-title { flex: 1 1 180px; min-width: 0; margin: 0; }
.challenge-earned-xp { flex: 0 0 auto; margin-inline-start: auto; color: var(--green); font-size: 13px; line-height: 1.55; font-weight: 900; white-space: nowrap; unicode-bidi: isolate; }
.challenge-question-card { border-color: #cddfd6; }
.challenge-question-card .question-prompt {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-inline-start: 4px solid #2f7d61;
  border-radius: 10px;
  background: #f3faf7;
  color: #1f513f;
}
.challenge-question-card .question-prompt .aalim-markup-a { color: #1f6f54; }
.challenge-question-card .answers { gap: 12px; }
.challenge-question-card .answer.mcq-choice {
  border-color: #cbd8e5;
  background: #f8fafc;
  color: #29445f;
  box-shadow: 0 1px 2px rgba(36, 64, 90, .06);
}
.challenge-question-card .answer.mcq-choice .aalim-markup-a { color: #315f8f; }
.challenge-question-card .answer.mcq-choice.correct { border-color: #276749; background: #e8f7ee; color: #205c3b; }
.challenge-question-card .answer.mcq-choice.wrong { border-color: #c53030; background: #fff0f0; color: #9b2c2c; }
.challenge-question-card .answer.mcq-choice.correct .aalim-markup,
.challenge-question-card .answer.mcq-choice.wrong .aalim-markup { color: inherit; }
.challenge-source-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #dce7e1;
}
.challenge-source-field { min-width: 0; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; text-align: start; }
.challenge-source-field span { display: block; margin-bottom: 3px; color: #6b7785; font-size: 11px; font-weight: 700; }
.challenge-source-field strong { display: block; color: #2d3e50; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
@media (hover: hover) {
  .challenge-question-card .answer.mcq-choice:not(:disabled):hover { border-color: #7892ab; background: #f2f6fa; }
}
@media (max-width: 520px) {
  .challenge-question-card .question-prompt { padding: 12px 13px; }
  .challenge-source-footer { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .challenge-source-field { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); align-items: baseline; gap: 8px; }
  .challenge-source-field span { margin: 0; }
}
.challenge-citation-panel {
  margin-top: 8px;
  border: 1px solid #d8e3dd;
  border-radius: 9px;
  background: #fbfdfc;
  color: #2d3e50;
}
.challenge-citation-panel > summary,
.challenge-bibtex > summary { cursor: pointer; list-style-position: inside; }
.challenge-citation-panel > summary {
  padding: 9px 11px;
  color: #50645a;
  font-size: 12px;
  line-height: 1.45;
}
.challenge-citation-panel > summary span { font-weight: 800; }
.challenge-citation-panel > summary strong { margin-inline-start: 6px; color: #276749; font-weight: 750; }
.challenge-citation-panel[open] > summary { border-bottom: 1px solid #e1e9e5; background: #f5faf7; }
.challenge-citation-content { display: grid; gap: 9px; padding: 11px 13px 13px; }
.challenge-citation-copy,
.challenge-citation-doi,
.challenge-citation-notice { margin: 0; overflow-wrap: anywhere; }
.challenge-citation-copy { color: #334a40; font-size: 13px; line-height: 1.6; }
.challenge-citation-doi { color: #66756e; font-size: 11px; unicode-bidi: isolate; }
.challenge-citation-doi span { font-weight: 800; }
.challenge-citation-links { display: flex; flex-wrap: wrap; gap: 6px; }
.challenge-citation-links a { padding: 4px 8px; border: 1px solid #bdd4c8; border-radius: 999px; color: #1f6f54; background: white; font-size: 11px; font-weight: 750; text-decoration: none; }
.challenge-citation-links a:focus-visible { outline: 2px solid #2f7d61; outline-offset: 2px; }
.challenge-citation-notice { padding-inline-start: 9px; border-inline-start: 3px solid #d5b36d; color: #6b5a34; font-size: 11px; line-height: 1.55; }
.challenge-bibtex { min-width: 0; }
.challenge-bibtex > summary { color: #50645a; font-size: 11px; font-weight: 800; }
.challenge-bibtex pre { max-width: 100%; margin: 7px 0 0; padding: 9px; overflow: auto; border-radius: 7px; background: #f1f5f3; color: #34443c; font-size: 10px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; }
@media (max-width: 520px) {
  .challenge-citation-panel > summary { padding: 8px 10px; }
  .challenge-citation-panel > summary strong { display: block; margin: 2px 18px 0 0; }
  .challenge-citation-content { padding: 10px; }
}
.question-prompt { display: grid; gap: 8px; font-size: calc(var(--content-font-size) + 5px); }
.question-prompt-line { display: block; width: 100%; min-width: 0; overflow-wrap: anywhere; }
.answer.correct { background: #c6f6d5; border-color: var(--green); }
.answer.wrong { background: #fed7d7; border-color: var(--danger); }
.text-answer {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--ink);
}
.match-grid, .group-grid {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.match-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.match-column {
  display: grid;
  gap: 10px;
  align-content: start;
}
.match-tile {
  min-height: 56px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: var(--content-font-size);
}
.match-tile.selected {
  border-color: var(--green);
  background: #e6fffa;
  box-shadow: 0 0 0 2px rgba(39, 103, 73, 0.16);
}
.match-tile.wrong {
  border-color: var(--danger);
  background: #fed7d7;
}
.match-alert {
  position: sticky;
  top: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  color: #9b2c2c;
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(155, 44, 44, .1);
  font-size: var(--content-font-size);
}
.match-alert > span {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  color: white;
  background: var(--danger);
  border-radius: 50%;
  font-weight: 800;
}

.match-corrections {
  margin-top: 14px;
}

.match-corrections > strong {
  display: block;
  margin-bottom: 8px;
  color: #276749;
}

.match-correction-list {
  display: grid;
  gap: 6px;
}

.match-correction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f0fff4;
  text-align: center;
}

.match-correction-row span:first-child {
  color: #276749;
  font-weight: 700;
}

.match-correction-row b {
  color: #718096;
}
.hint {
  color: var(--muted);
  margin: 8px 0;
}
.penalty {
  color: var(--danger);
  font-weight: 700;
  margin: 8px 0;
}
.sort-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr);
  gap: 14px;
  align-items: start;
}
.sort-targets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sort-target {
  min-height: 150px;
  border: 1px dashed var(--green);
  background: #f7fffb;
  border-radius: 8px;
  padding: 12px;
}
.placed-words, .word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.word-bank {
  margin-top: 0;
}
.word-chip, .placed-word {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--content-font-size);
  font-weight: 700;
}
.placed-word {
  padding: 5px 8px;
  font-size: max(10px, calc(var(--content-font-size) - 2px));
  line-height: 1.15;
}
.word-chip {
  cursor: grab;
}
.word-chip.selected {
  border-color: var(--green);
  background: #e6fffa;
}
.match-row, .group-box {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 12px;
}
.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.group-box p {
  margin: 6px 0 0;
  color: var(--muted);
}
.feedback {
  position: relative;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  font-size: var(--content-font-size);
}
.feedback-correct {
  border-color: #8fcaae;
  background: #f2fbf6;
  animation: feedback-correct-glow 560ms ease-out both;
}
.feedback-correct > strong { color: #176b49; }
.feedback-correct::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e0a11b;
  box-shadow: 0 -13px #258b62, 9px -9px #e0a11b, 13px 0 #3d91c8, 9px 9px #d75b6d, 0 13px #258b62, -9px 9px #e0a11b, -13px 0 #3d91c8, -9px -9px #d75b6d;
  pointer-events: none;
  animation: feedback-correct-burst 680ms ease-out both;
}
.feedback-wrong {
  border-color: #dfa5a5;
  background: #fff6f6;
  animation: feedback-wrong-nudge 360ms ease-out both;
}
.feedback-wrong > strong { color: #a63737; }
.feedback-wrong::after {
  content: "";
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 18px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(180, 55, 55, .35);
  border-radius: 50%;
  background: linear-gradient(45deg, transparent 43%, #b93f3f 44% 56%, transparent 57%), linear-gradient(-45deg, transparent 43%, #b93f3f 44% 56%, transparent 57%);
  pointer-events: none;
  animation: feedback-wrong-mark 440ms ease-out both;
}
@keyframes feedback-correct-glow {
  0% { box-shadow: 0 0 0 0 rgba(37, 139, 98, .28); }
  100% { box-shadow: 0 0 0 8px rgba(37, 139, 98, 0); }
}
@keyframes feedback-correct-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-10deg); }
  32% { opacity: .85; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2) rotate(12deg); }
}
@keyframes feedback-wrong-nudge {
  0%, 100% { transform: translateX(0); }
  28% { transform: translateX(-3px); }
  56% { transform: translateX(3px); }
  78% { transform: translateX(-1px); }
}
@keyframes feedback-wrong-mark {
  0% { opacity: 0; transform: scale(.55); }
  42% { opacity: .8; transform: scale(1.08); }
  100% { opacity: .55; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .feedback-correct, .feedback-wrong, .feedback-correct::after, .feedback-wrong::after { animation: none; }
}
.feedback-explanation { margin: 8px 0 0; line-height: 1.65; white-space: pre-wrap; }
.hint, .penalty { font-size: var(--content-font-size); }
.text-answer { font-size: var(--content-font-size); }
.global-breadcrumbs {
  width: 100%;
  max-width: 940px;
  margin: -2px auto 9px;
  padding: 0 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}
.global-breadcrumbs::-webkit-scrollbar { display: none; }
.global-breadcrumb-track {
  display: flex;
  align-items: center;
  width: max-content;
  min-width: 100%;
  min-height: 34px;
  gap: 3px;
  padding: 3px 6px;
  border: 1px solid #d9e1dd;
  border-radius: 9px;
  background: #f8faf9;
  box-shadow: 0 1px 2px rgba(30, 50, 42, .04);
}
.global-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 26px;
  margin: 0;
  padding: 3px 7px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #40534a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.global-breadcrumb-item { cursor: pointer; }
button.global-breadcrumb-item:hover,
button.global-breadcrumb-item:focus-visible {
  background: #e9efec;
  color: #1f6f54;
  outline: 2px solid transparent;
}
.global-breadcrumb-item.current {
  background: #f1ece2;
  color: #27352f;
  font-weight: 800;
}
.global-breadcrumb-separator { flex: 0 0 auto; color: #9b7c4a; font-size: 14px; }
.lesson-stage-app > .global-breadcrumbs { flex: 0 0 auto; margin-bottom: 3px; }
@media (max-width: 640px) {
  .global-breadcrumbs { margin-top: -1px; margin-bottom: 6px; padding-inline: 0; }
  .global-breadcrumb-track { min-height: 31px; padding: 2px 4px; border-radius: 8px; }
  .global-breadcrumb-item { max-width: 150px; min-height: 25px; padding-inline: 5px; font-size: 11px; }
}
.inner-course-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  margin-top: 8px;
}
.inner-course-title {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  text-align: center;
}
.inner-course-title h1 {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inner-course-title p {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid #d9e6df;
  border-radius: 999px;
  background: #f1f6f3;
  color: #49665a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
html[dir="rtl"] .inner-course-title p { transform: translateY(2px); }
.compact-admin-toolbar { margin: 8px 0 14px; }
.category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.category-grid .category-card {
  height: auto;
  min-height: 206px;
  padding-block: 0;
}

.category-grid .category-card .category-card-content {
  height: auto;
  min-height: 202px;
}
.category-grid .category-card h2 {
  display: -webkit-box;
  min-height: 2.7em;
  margin-bottom: 6px;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.category-grid .category-card p {
  display: -webkit-box;
  min-height: 3.1em;
  margin-bottom: 10px;
  overflow: hidden;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
@media (max-width: 640px) {
  .category-grid .category-card {
    min-height: 220px;
    padding-block: 14px;
  }
}
.category-card {
  --course-accent: var(--green);
  min-width: 0;
  height: 166px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 7px rgba(26, 32, 44, .06);
}
.category-card-content { height: calc(100% - 4px); display: flex; flex-direction: column; padding: 12px; }
.category-card h2 { margin: 8px 0 0; font-size: 17px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.category-card-subtitle { margin: 5px 0 0; color: var(--muted); font-size: calc(12px + var(--urdu-interface-font-increase, 0px)); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[dir="rtl"] .category-card-subtitle { line-height: 1.8; }
.category-card-spacer { flex: 1; }
.category-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--course-accent); }
.category-card footer strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.category-card.disabled { opacity: .72; background: #f8fafc; }
.category-card.disabled .course-accent, .category-card.disabled .course-mark { background: #a0aec0; }
[dir="rtl"] .category-card h2 { line-height: 1.55; }
.category-arrow { color: var(--green); font-size: 28px; line-height: 1; }
[dir="rtl"] .category-arrow { transform: scaleX(-1); }
.level-list { margin-top: 10px; }
.empty-state { text-align: center; color: var(--muted); }
.category-admin-list { display: grid; gap: 8px; }
.category-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.category-admin-copy { display: grid; gap: 3px; }
.category-admin-copy span, .category-admin-copy small { color: var(--muted); }
.admin-drilldown-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  width: 100%;
  padding: 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.admin-drilldown-link:hover strong { color: var(--green); }
.admin-drilldown-copy { display: grid; gap: 3px; min-width: 0; }
.admin-drilldown-copy span, .admin-drilldown-copy small { color: var(--muted); }
.admin-drilldown-chevron { color: var(--green); font-size: 24px; line-height: 1; flex: 0 0 auto; }
[dir="rtl"] .admin-drilldown-chevron { transform: scaleX(-1); }
.category-editor { margin-bottom: 14px; }
.editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(26, 32, 44, .42);
}
.inline-editor {
  width: min(780px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,.2);
  padding: 18px;
}
.inline-editor header, .inline-editor footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.inline-editor header { margin-bottom: 14px; }
.inline-editor header h2, .inline-editor header p { margin: 0; }
.inline-editor header p { margin-top: 4px; color: var(--muted); }
.inline-editor footer { justify-content: flex-end; margin-top: 16px; }
.inline-editor .field small { color: var(--muted); }
.tabs { display: flex; gap: 8px; margin: 12px 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field { display: grid; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 13px; font-weight: 700; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}
textarea { min-height: 90px; resize: vertical; }
.password-control { position: relative; }
.password-control input { padding-inline-end: 46px; }
.password-toggle {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  display: grid;
  width: 38px;
  height: 36px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}
.password-toggle:hover, .password-toggle:focus-visible { background: #edf7f1; outline: none; }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-settings-shell { width: min(680px, 100%); margin: 20px auto 0; }
.account-settings-panel { padding: 20px; }
.account-settings-panel > header h1 { margin: 0; font-size: 24px; }
.account-settings-panel > header p { margin: 4px 0 0; color: var(--muted); }
.account-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e8eeeb; }
.account-section h2 { margin: 0 0 10px; font-size: 16px; }
.account-helper { margin: -4px 0 10px; color: var(--muted); font-size: 12px; }
.account-status { margin: 14px 0 0; padding: 10px 12px; border-radius: 7px; font-weight: 700; }
.account-status.success { background: #edf7f1; color: var(--green); }
.account-status.error { background: #fff5f5; color: var(--danger); }
.account-actions { margin-top: 18px; }
.mini-card {
  padding: 12px;
  margin: 10px 0;
}
.mini-card h3 { margin: 0 0 10px; }
.status { color: var(--green); font-weight: 700; margin-top: 10px; }
.error { color: var(--danger); }
.result-shell {
  --result-accent: var(--green);
  --result-soft: #f0fff4;
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin: 24px auto 0;
}
.result-shell.result-retry {
  --result-accent: #a66a12;
  --result-soft: #fffaf0;
}
.result-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 22px;
  border: 1px solid color-mix(in srgb, var(--result-accent) 34%, white);
  border-radius: 8px;
  background: var(--result-soft);
  text-align: center;
}
.result-symbol {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--result-accent);
  color: white;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}
.result-hero h1 { margin: 2px 0 0; font-size: 26px; line-height: 1.25; }
.result-hero p { max-width: 540px; margin: 0; color: #4a5568; font-size: var(--content-font-size); line-height: 1.55; }
.result-hero small { color: #8b5d13; font-weight: 800; }
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 15px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 8px rgba(26, 32, 44, .05);
  direction: ltr;
}
.result-stats div { display: grid; justify-items: center; gap: 3px; min-width: 0; }
.result-stats div + div { border-left: 1px solid #edf2f7; }
.result-stats strong { color: var(--result-accent); font-size: 20px; white-space: nowrap; }
.result-stats span { color: #718096; font-size: 11px; font-weight: 700; }
.result-penalty { margin: -4px 0 0; color: var(--danger); font-size: 13px; font-weight: 800; text-align: center; }
.result-save-status { margin: -4px 0 0; display: flex; justify-content: center; align-items: center; gap: 7px; color: #718096; font-size: 12px; font-weight: 700; text-align: center; }
.result-save-status.saving span { width: 13px; height: 13px; border: 2px solid #cfe2d9; border-top-color: var(--green); border-radius: 50%; animation: attempt-save-spin .7s linear infinite; }
.result-save-status.error { color: var(--danger); }
.result-save-status button { padding: 2px 7px; border: 1px solid currentColor; border-radius: 5px; background: transparent; color: inherit; font-weight: 800; }
@keyframes attempt-save-spin { to { transform: rotate(360deg); } }
.result-unlock { margin: 0; color: var(--result-accent); font-size: 13px; font-weight: 800; text-align: center; }
.result-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  direction: ltr;
  gap: 10px;
}
.result-actions .btn { width: 100%; min-width: 0; min-height: 50px; }
.community-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}
.community-quick-actions .btn {
  min-height: 42px;
  gap: 8px;
  border-color: #b8cec3;
  background: #fbfdfc;
  font-size: 13px;
}
.community-quick-actions .btn b { font-size: 17px; line-height: 1; }
.community-shell {
  width: min(100%, 780px);
  margin: 0 auto;
  padding-bottom: 34px;
}
.community-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.community-heading h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.community-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.compact-community-action { flex: 0 0 auto; gap: 7px; min-height: 38px; }
.community-loading,
.community-notice,
.community-error {
  margin: 12px 0;
  border: 1px solid #cfe2d9;
  border-radius: 8px;
  background: #f3faf7;
  color: #365c4b;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
}
.community-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: #feb2b2;
  background: #fff5f5;
  color: var(--danger);
}
.profile-overview {
  --profile-accent: var(--green);
  overflow: hidden;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 9px rgba(26, 32, 44, .055);
}
.profile-accent { height: 5px; background: var(--profile-accent); }
.profile-overview-body { padding: 16px; }
.profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}
.profile-identity h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.profile-identity span { display: block; color: var(--muted); font-size: 12px; direction: ltr; text-align: start; }
.profile-identity small {
  padding: 4px 7px;
  border-radius: 6px;
  background: #edf2f7;
  color: #5f6b7a;
  font-size: 10px;
  font-weight: 800;
}
.profile-rank { display: block; margin: 13px 0 0; color: var(--profile-accent); font-size: 15px; }
.profile-bio { margin: 8px 0 0; color: #4a5568; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-xp { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; }
.profile-xp b { color: var(--profile-accent); font-size: 17px; }
.profile-xp span { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 700; text-align: end; }
.profile-rank-progress { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: #e8edf2; }
.profile-rank-progress span { display: block; height: 100%; background: var(--profile-accent); }
.profile-next-rank { margin: 5px 0 0; color: var(--muted); font-size: 11px; text-align: end; }
.dashboard-section {
  margin-top: 12px;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: white;
  padding: 14px;
}
.dashboard-section h2 { margin: 0 0 11px; font-size: 16px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #e4eae7; border-radius: 7px; background: #e4eae7; }
.dashboard-metrics div { display: grid; min-width: 0; justify-items: center; gap: 3px; padding: 11px 5px; background: #fafcfb; text-align: center; }
.dashboard-metrics b { color: var(--green); font-size: 18px; }
.dashboard-metrics span { color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.3; }
.dashboard-course-list { display: grid; gap: 9px; }
.dashboard-course-list article { display: grid; gap: 7px; }
.dashboard-course-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.dashboard-course-list strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dashboard-course-list small { color: var(--muted); font-size: 10px; font-weight: 700; }
.dashboard-course-list .course-progress { width: 100%; margin: 0; }
.achievement-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.achievement-list article { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px; border: 1px solid #e3e9e6; border-radius: 7px; background: #fafcfb; }
.achievement-list article > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; background: #e7f4ed; color: var(--green); font-size: 17px; font-weight: 900; }
.achievement-list strong { display: block; font-size: 13px; }
.achievement-list p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.edit-profile-button { width: 100%; min-height: 40px; margin-top: 10px; }
.profile-editor { margin-top: 10px; padding: 14px; }
.profile-editor h2 { margin: 0; font-size: 17px; }
.profile-slug { margin: 2px 0 12px; color: var(--muted); direction: ltr; text-align: start; font-size: 11px; }
.profile-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 11px; padding: 10px 0 0; border-top: 1px solid #edf2f7; }
.profile-switch span { display: grid; min-width: 0; }
.profile-switch b { font-size: 13px; }
.profile-switch small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.profile-switch input { flex: 0 0 auto; width: 18px; height: 18px; }
.profile-editor .row { margin-top: 13px; justify-content: flex-end; }
.leaderboard-list { display: grid; gap: 7px; }
.leaderboard-row {
  display: grid;
  grid-template-columns: 36px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: white;
  cursor: pointer;
}
.leaderboard-row:hover { border-color: #9fb9ad; background: #fbfdfc; }
.leaderboard-row.current { border-color: #8bbda5; background: #f3faf7; }
.leader-position { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: #edf2f7; color: #4a5568; font-size: 12px; font-weight: 900; }
.leader-position.p1 { background: #fff4cf; color: #946200; }
.leader-position.p2 { background: #eef1f4; color: #52606d; }
.leader-position.p3 { background: #f4e6dc; color: #8a4b27; }
.leader-identity { display: grid; min-width: 0; }
.leader-identity strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.leader-identity strong i { margin-inline-start: 5px; color: var(--green); font-size: 9px; font-style: normal; }
.leader-identity span { color: var(--muted); font-size: 10px; direction: ltr; text-align: start; }
.leader-identity small { margin-top: 2px; color: #718096; font-size: 9px; }
.leader-xp { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: end; column-gap: 3px; min-width: 58px; color: var(--green); text-align: end; }
.leader-xp b { font-size: 15px; }
.leader-xp span { font-size: 9px; font-weight: 800; }
.leader-xp i { grid-column: 1 / -1; color: #789386; font-size: 16px; font-style: normal; line-height: .7; }
.privacy-footnote { margin: 12px 2px 0; color: #718096; font-size: 10px; text-align: center; }
.auth-app {
  width: 100%;
  max-width: 1120px;
}
.auth-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, .82fr) minmax(400px, 1.18fr);
  align-items: center;
  gap: clamp(40px, 7vw, 86px);
  min-height: calc(100svh - 40px);
  padding: 64px 22px 40px;
}
.auth-language {
  position: absolute;
  top: 10px;
  right: 22px;
  z-index: 2;
  width: 48px;
  min-width: 48px;
  min-height: 40px;
  padding: 0;
  direction: ltr;
  font-size: 12px;
  letter-spacing: 0;
}
.auth-brand-panel {
  min-width: 0;
  align-self: center;
}
.auth-brand-logo {
  display: flex;
  min-height: 128px;
  align-items: center;
  margin-bottom: 20px;
}
.auth-brand-logo .app-logo {
  width: auto;
  height: 136px;
}
.auth-eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.auth-brand-panel h1 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}
.auth-brand-copy {
  max-width: 430px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.auth-card {
  width: 100%;
  max-width: 520px;
  justify-self: end;
  padding: 28px;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 34px rgba(26, 55, 43, .08);
}
.auth-card-header { margin-bottom: 20px; }
.auth-card-header h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
}
.auth-card-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.auth-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #f4b7b7;
  border-radius: 7px;
  background: #fff7f7;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}
.auth-form-grid { grid-template-columns: 1fr; gap: 13px; }
.auth-card.is-register .auth-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-card .field label { font-size: 12px; font-weight: 800; }
.auth-card .field input {
  min-height: 46px;
  border-color: #cbd7d1;
  background: #fbfdfc;
}
.auth-card .field input:focus {
  outline: 2px solid rgba(39, 103, 73, .16);
  border-color: var(--green);
  background: white;
}
.auth-card .password-control input { width: 100%; }
.auth-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 17px;
}
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 18px 0 13px;
  color: #89958f;
  font-size: 11px;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; background: #e1e8e4; }
.auth-google {
  width: 100%;
  min-height: 44px;
  gap: 9px;
}
.auth-google b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #dbe4df;
  border-radius: 50%;
  background: white;
  color: #33413a;
  font-family: Arial, sans-serif;
  font-size: 12px;
}
.auth-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}
.auth-secondary-actions .btn { min-height: 42px; padding-inline: 10px; font-size: 12px; }
.auth-recovery {
  display: block;
  width: 100%;
  margin-top: 15px;
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 5px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.auth-recovery:hover { text-decoration: underline; }
.auth-panel {
  width: min(100%, 560px);
  margin: 20px auto;
  padding: 18px;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 10px rgba(26, 32, 44, .055);
}
.auth-panel h1 { margin: 0 0 4px; font-size: 24px; }
.auth-panel > p { margin: 0 0 14px; color: var(--muted); }
.auth-notice,
.password-rules {
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.auth-notice { padding: 10px 12px; border-radius: 7px; background: #f2f7f4; color: #365c4b; }
.link-button { border: 0; background: transparent; color: var(--green); padding: 6px 0; font-weight: 800; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.segmented .btn { width: 100%; }
.impersonation-return { color: #8b5d13 !important; background: #fffaf0 !important; }
.admin-users-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.admin-users-heading h1 { margin: 0; font-size: 25px; }
.admin-users-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.admin-users-heading > span { display: grid; min-width: 38px; height: 38px; place-items: center; border-radius: 7px; background: #e7f4ed; color: var(--green); font-weight: 900; }
.user-admin-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px auto;
  gap: 8px;
  margin-bottom: 12px;
}
.user-admin-filters input,
.user-admin-filters select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 8px 10px; }
.user-search-control { position: relative; min-width: 0; }
.user-search-control input { padding-inline-end: 38px; }
.user-search-control button {
  position: absolute;
  top: 50%;
  inset-inline-end: 6px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #607269;
  font-size: 18px;
}
.user-search-control button:hover { background: #edf5f1; color: var(--green); }
.admin-user-list { display: grid; gap: 9px; }
.admin-user-card { padding: 14px; border: 1px solid #dbe4df; border-radius: 8px; background: white; box-shadow: 0 2px 8px rgba(26, 32, 44, .045); }
.admin-user-card.disabled { border-color: #f1b7b7; background: #fffafa; }
.admin-user-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.admin-user-main h2 { margin: 0; font-size: 17px; line-height: 1.25; }
.admin-user-main p { margin: 3px 0; color: var(--muted); font-size: 11px; direction: ltr; text-align: start; }
.admin-user-main small { display: block; min-width: 0; overflow: hidden; color: #4a5568; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-stats { display: grid; justify-items: end; gap: 2px; color: var(--green); }
.admin-user-stats span { color: var(--muted); font-size: 10px; }
.admin-user-flags { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0; }
.admin-user-flags span { padding: 4px 7px; border-radius: 5px; background: #edf2f7; color: #536171; font-size: 9px; font-weight: 800; }
.admin-user-flags .ok { background: #e8f5ee; color: var(--green); }
.admin-user-flags .danger { background: #fff0f0; color: var(--danger); }
.admin-user-card footer,
.user-editor footer { display: flex; justify-content: flex-end; gap: 8px; }
.user-editor { width: min(760px, 100%); }
.user-editor > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.user-editor > header h2 { margin: 0; font-size: 21px; }
.user-editor > header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; direction: ltr; text-align: start; }
.user-editor textarea { min-height: 84px; resize: vertical; }
.checkline { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 9px; border: 1px solid #edf2f7; border-radius: 7px; color: #3e4b58; font-size: 12px; font-weight: 700; }
.checkline input { width: 17px; height: 17px; }
.danger-line { border-color: #fed7d7; color: #9b2c2c; background: #fffafa; }
.soft-lock-backdrop { z-index: 120; }
.soft-lock-dialog {
  width: min(100%, 520px);
  padding: 22px;
  border: 1px solid #d9e3de;
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 54px rgba(26, 32, 44, .18);
}
.soft-lock-dialog > header { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 13px; align-items: center; }
.soft-lock-dialog h2 { margin: 0; font-size: 21px; line-height: 1.3; }
.soft-lock-dialog header p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.soft-lock-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 8px; background: #edf7f2; color: var(--green); font-size: 24px; }
.soft-lock-path { display: grid; gap: 2px; margin: 18px 0; padding: 12px; border-inline-start: 3px solid var(--green); background: #f5f9f7; }
.soft-lock-path small, .soft-lock-note { color: var(--muted); }
.soft-lock-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.soft-lock-actions .btn:first-child { grid-column: 1 / -1; }
.soft-lock-actions .text-button { grid-column: 1 / -1; background: transparent; color: var(--muted); }
.soft-lock-note { margin: 13px 0 0; font-size: 11px; line-height: 1.5; }
.quiz-briefing-shell { width: min(100%, 680px); margin: 22px auto 80px; }
.quiz-briefing-hero { padding: 24px; text-align: center; border: 1px solid #d9e3de; border-radius: 8px 8px 0 0; background: white; }
.briefing-mark { display: grid; width: 52px; height: 52px; margin: 0 auto 11px; place-items: center; border-radius: 50%; background: #e7f4ed; color: var(--green); font-size: 24px; font-weight: 900; }
.briefing-eyebrow { margin: 0 0 4px !important; color: var(--green) !important; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.quiz-briefing-hero h1 { margin: 0; font-size: 27px; }
.quiz-briefing-hero p { max-width: 520px; margin: 8px auto 0; color: var(--muted); line-height: 1.55; }
.quiz-briefing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: solid #d9e3de; border-width: 0 1px 1px; background: #f8fbf9; }
.quiz-briefing-grid div { display: grid; gap: 2px; padding: 14px 8px; text-align: center; border-inline-end: 1px solid #e2e9e5; }
.quiz-briefing-grid div:last-child { border-inline-end: 0; }
.quiz-briefing-grid strong { color: var(--green); font-size: 20px; }
.quiz-briefing-grid span { color: var(--muted); font-size: 10px; font-weight: 800; }
.quiz-briefing-types { padding: 15px; border: solid #d9e3de; border-width: 0 1px 1px; background: white; }
.quiz-briefing-types small { color: var(--muted); font-weight: 800; }
.quiz-briefing-types div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quiz-briefing-types span { padding: 5px 8px; border-radius: 5px; background: #eef5f1; color: #355e4a; font-size: 11px; font-weight: 800; }
.briefing-community { margin: 0; padding: 10px 14px; border: solid #d9e3de; border-width: 0 1px 1px; background: white; color: var(--muted); font-size: 11px; text-align: center; }
.quiz-briefing-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding-top: 14px; }
.briefing-start { min-height: 48px; }
.word-by-word-exercise { display: grid; gap: 13px; }
.word-by-word-ayah { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: stretch; gap: 10px 8px; padding: 14px; border: 1px solid #d5e2dc; border-radius: 8px; background: #fbfdfc; }
.word-by-word-token { display: grid; grid-template-rows: auto minmax(42px, auto) auto; gap: 7px; flex: 1 1 112px; min-width: 96px; max-width: 190px; text-align: center; }
.word-by-word-token > strong { display: block; min-width: 0; color: var(--ink); font-size: calc(var(--content-font-size) + 5px); line-height: 1.75; overflow-wrap: anywhere; direction: rtl; unicode-bidi: isolate; }
.word-meaning-slot { display: grid; min-height: 42px; place-items: center; padding: 7px 8px; border: 1px dashed #9cb8aa; border-radius: 7px; color: #718096; background: white; font-family: inherit; font-size: max(11px, calc(var(--content-font-size) - 1px)); line-height: 1.35; }
.word-meaning-slot:not(:disabled) { cursor: pointer; }
.word-meaning-slot.filled { border-style: solid; border-color: var(--green); color: var(--green); background: #edf9f2; font-weight: 800; }
.word-meaning-slot.correct { border-color: #2f855a; color: #22543d; background: #c6f6d5; }
.word-meaning-slot.wrong { border-color: var(--danger); color: #9b2c2c; background: #fff5f5; }
.word-correction { min-height: 18px; color: #276749; font-size: max(10px, calc(var(--content-font-size) - 3px)); font-weight: 800; }
.word-meaning-bank { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 10px; border: 1px solid #dce6e1; border-radius: 8px; background: white; }
.word-by-word-check { justify-self: start; }
.word-by-word-translation { margin: 0; padding: 10px 12px; border-inline-start: 3px solid var(--green); border-radius: 0 7px 7px 0; background: #f4f8f6; color: var(--muted); font-size: var(--content-font-size); line-height: 1.7; }
.sentence-builder { display: grid; gap: 12px; }
.sentence-builder-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.sentence-answer-lane, .sentence-word-bank { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; min-height: 66px; padding: 12px; border: 1px dashed #b9c9c1; border-radius: 8px; background: #f9fbfa; }
.sentence-answer-lane { border-style: solid; border-color: #cddbd4; background: white; }
.sentence-answer-lane > span { margin: auto; color: #8a9790; font-size: 12px; }
.sentence-token { min-height: 38px; padding: 7px 11px; border: 1px solid #cad8d1; border-radius: 7px; background: white; color: var(--ink); font-weight: 800; box-shadow: 0 1px 2px rgba(26, 32, 44, .05); }
.sentence-token.selected { border-color: var(--green); background: #e9f6ef; color: var(--green); }
.sentence-typing { width: 100%; min-height: 92px; padding: 12px; border: 1px solid #cddbd4; border-radius: 8px; background: white; font-size: var(--content-font-size); resize: vertical; }
.sentence-typing:focus { outline: 2px solid rgba(39, 103, 73, .14); border-color: var(--green); }
.sentence-check { justify-self: start; }
.editorial-review { margin: 14px 0 78px; padding: 14px; border: 1px solid #d9e3de; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(26, 32, 44, .04); }
.editorial-review > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.editorial-review header > div { display: grid; }
.editorial-review header small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.editorial-review header strong { font-size: 14px; }
.review-status-dot { width: 10px; height: 10px; border-radius: 50%; background: #a0aec0; }
.editorial-review.approved .review-status-dot { background: var(--green); }
.editorial-review.changes_requested .review-status-dot { background: var(--danger); }
.editorial-review textarea { width: 100%; min-height: 68px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; resize: vertical; }
.editorial-review footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 9px; }
.editorial-review footer .btn { padding: 7px 10px; font-size: 11px; }
.course-editorial-status { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 12px 0; padding: 11px; border: 1px solid #dce7e1; border-radius: 8px; background: #f7fbf9; }
.course-editorial-status > div:first-child { display: grid; gap: 2px; }
.course-editorial-status small { color: var(--muted); }
.course-editorial-status span { color: var(--danger); font-size: 11px; font-weight: 800; }
.course-editorial-status > div:last-child { display: flex; flex-wrap: wrap; gap: 7px; }
.course-editorial-status .btn { padding: 7px 10px; font-size: 11px; }
.rtl { direction: rtl; text-align: right; }

.auth-public-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #e5ece8;
  font-size: 12px;
  font-weight: 800;
}
.auth-public-links a { color: var(--green); text-decoration: none; }
.auth-public-links a:hover { text-decoration: underline; }
.public-info-page {
  width: min(720px, 100%);
  margin: 42px auto 0;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid #d9e5df;
  border-radius: 16px;
  background: radial-gradient(circle at 100% 0, rgba(183, 121, 31, .12), transparent 34%), linear-gradient(150deg, #fff 0%, #f8fcfa 100%);
  box-shadow: 0 18px 48px rgba(27, 72, 52, .09);
}
.public-info-page h1 { margin: 0; font-size: clamp(28px, 5vw, 42px); line-height: 1.15; }
.public-info-page h2 { margin: 0 0 7px; font-size: 18px; }
.public-info-page header > p:last-child,
.public-info-page > p:not(.public-page-kicker) { color: var(--muted); line-height: 1.7; }
.full-lesson-details { margin-top: 24px; border-top: 1px solid #dce8e1; padding-top: 16px; }
.full-lesson-details summary { color: var(--green); cursor: pointer; font-weight: 850; list-style-position: outside; }
.full-lesson-content { display: grid; gap: 24px; margin-top: 20px; }
.full-lesson-slide,
.full-lesson-question { margin-top: 14px; padding: 14px 16px; border: 1px solid #deebe4; border-radius: 10px; background: rgba(255, 255, 255, .72); }
.full-lesson-slide h3,
.full-lesson-question h3 { margin: 0 0 8px; color: var(--ink); font-size: 15px; }
.full-lesson-slide p,
.full-lesson-question p,
.full-lesson-question li { color: var(--muted); line-height: 1.7; }
.full-lesson-slide p:last-child,
.full-lesson-question p:last-child { margin-bottom: 0; }
.full-lesson-question ol { margin: 10px 0 0; padding-inline-start: 24px; }
.full-lesson-practice > p { color: var(--muted); line-height: 1.65; }
.public-page-kicker { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.public-form { margin-top: 24px; }
.public-form input,
.public-form textarea,
.public-form select { width: 100%; border: 1px solid #bdcec5; border-radius: 9px; padding: 11px 12px; background: rgba(255, 255, 255, .94); }
.public-form textarea { resize: vertical; line-height: 1.55; }
.public-form small { color: var(--muted); line-height: 1.4; }
.public-form-message { margin: 18px 0 0; padding: 11px 13px; border: 1px solid #efc4c4; border-radius: 8px; background: #fff8f8; color: var(--danger); }
.public-form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.captcha-field { padding: 14px; border: 1px solid #c8d9d0; border-radius: 10px; background: #f4faf7; }
.captcha-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.captcha-control { display: grid; grid-template-columns: minmax(150px, 1fr) 110px; align-items: center; gap: 12px; }
.captcha-control strong { color: #214f3a; font-size: 17px; letter-spacing: .01em; }
.captcha-image-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.captcha-image { display: block; width: min(100%, 250px); height: auto; border: 1px solid #93b3a4; border-radius: 8px; background: #edf6f1; }
.captcha-refresh-button { display: inline-grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border: 1px solid #8fb2a1; border-radius: 9px; background: #fff; color: var(--green); cursor: pointer; }
.captcha-refresh-button:hover { border-color: var(--green); background: #eaf5ef; }
.captcha-refresh-button:focus-visible { outline: 3px solid rgba(39, 103, 73, .22); outline-offset: 2px; }
.captcha-refresh-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.captcha-control input { text-align: center; font-size: 18px; font-weight: 800; }
.captcha-loading,
.captcha-error { color: var(--muted); font-size: 13px; }
.contact-email-card { display: grid; gap: 5px; margin: 24px 0; padding: 18px; border: 1px solid #a9c5b7; border-radius: 12px; background: white; color: var(--green); text-decoration: none; box-shadow: 0 8px 24px rgba(39, 103, 73, .07); }
.contact-email-card span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.contact-email-card strong { font-size: clamp(18px, 4vw, 25px); overflow-wrap: anywhere; }
.contact-guidance { margin: 0 0 22px; padding: 16px; border-inline-start: 4px solid var(--gold); border-radius: 8px; background: #fffaf0; }
.contact-guidance p { margin: 0; color: #6d5121; line-height: 1.65; }
.feedback-success { text-align: center; }
.feedback-success .btn { margin-top: 12px; }
.feedback-admin-page { width: min(980px, calc(100% - 32px)); margin: 32px auto 56px; }
.feedback-admin-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.feedback-admin-header h1 { margin: 4px 0 0; color: var(--green); }
.feedback-admin-count { margin: 0; color: var(--muted); font-weight: 700; }
.feedback-admin-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.feedback-admin-select-all { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--green); font-weight: 750; cursor: pointer; }
.feedback-admin-select-all input, .feedback-admin-card-check input { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }
.feedback-admin-list { display: grid; gap: 12px; }
.feedback-admin-card { padding: 18px; border: 1px solid #c9d8d1; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(39, 103, 73, .06); }
.feedback-admin-card.selected { border-color: #4f8f70; box-shadow: 0 0 0 2px rgba(79, 143, 112, .14), 0 8px 24px rgba(39, 103, 73, .06); }
.feedback-admin-card header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.feedback-admin-card-title, .feedback-admin-card-tools { display: flex; align-items: flex-start; gap: 10px; }
.feedback-admin-card-check { display: inline-flex; padding-top: 3px; }
.feedback-admin-card-tools { align-items: center; color: var(--muted); font-size: 12px; }
.feedback-admin-card h2 { margin: 0; color: var(--green); font-size: 17px; }
.feedback-admin-meta { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.feedback-admin-category { align-self: start; padding: 5px 9px; border-radius: 999px; background: #eaf5ef; color: #285f45; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.feedback-admin-message { margin: 0; color: var(--ink); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-admin-card footer { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e4ece8; color: var(--muted); font-size: 12px; }
.feedback-admin-card footer a { color: var(--green); font-weight: 700; }
.feedback-delete-button { border-color: #9f3434; background: #9f3434; color: #fff; }
.feedback-delete-button:hover:not(:disabled) { background: #7f2424; }
.feedback-delete-one { border-color: #d6a9a9; color: #8a2929; }
.feedback-admin-empty { padding: 28px; border: 1px dashed #a9c5b7; border-radius: 12px; color: var(--muted); text-align: center; }

.visitor-logs-page { width: min(1280px, calc(100% - 32px)); margin: 30px auto 60px; }
.visitor-logs-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.visitor-logs-header h1 { margin: 3px 0 4px; color: var(--green); font-size: clamp(26px, 4vw, 38px); }
.visitor-logs-header p { margin: 0; color: var(--muted); }
.visitor-log-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.visitor-log-summary article { display: grid; gap: 3px; padding: 14px; border: 1px solid #d1ded8; border-radius: 11px; background: linear-gradient(145deg, #fff, #f3f8f5); box-shadow: 0 5px 16px rgba(39, 103, 73, .05); }
.visitor-log-summary strong { color: var(--green); font-size: 20px; }
.visitor-log-summary span { color: var(--muted); font-size: 11px; font-weight: 750; }
.visitor-log-filters { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 10px; padding: 14px; border: 1px solid #cbdad3; border-radius: 12px; background: #f7fbf9; }
.visitor-log-filters label { display: grid; gap: 5px; min-width: 0; }
.visitor-log-filters label > span { color: #456357; font-size: 11px; font-weight: 800; }
.visitor-log-filters input, .visitor-log-filters select { width: 100%; min-height: 40px; border: 1px solid #b9cdc3; border-radius: 7px; background: #fff; padding: 8px 9px; color: var(--ink); }
.visitor-log-filters .wide { grid-column: span 2; }
.visitor-log-filter-actions { display: flex; align-items: end; gap: 8px; }
.visitor-log-filter-actions .btn[type="submit"] { min-width: 116px; white-space: nowrap; }
.visitor-log-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 10px; }
.visitor-log-bulk > label:first-child { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; }
.visitor-log-bulk input[type="checkbox"], .visitor-log-table input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--green); }
.visitor-log-bulk .purge-date { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; color: var(--muted); font-size: 12px; font-weight: 750; }
.visitor-log-bulk .purge-date input { min-height: 38px; border: 1px solid #c8d5cf; border-radius: 7px; padding: 7px; }
.visitor-log-danger { border-color: #9f3434; background: #9f3434; color: #fff; }
.visitor-log-danger.secondary { background: #fff; color: #8a2929; }
.visitor-log-danger:hover:not(:disabled) { border-color: #7f2424; background: #7f2424; color: #fff; }
.visitor-log-table-wrap { overflow-x: auto; border: 1px solid #cbd8d2; border-radius: 12px; background: #fff; box-shadow: 0 9px 28px rgba(26, 61, 44, .06); }
.visitor-log-table { width: 100%; min-width: 980px; border-collapse: collapse; text-align: start; }
.visitor-log-table th { padding: 10px; border-bottom: 1px solid #bfcfc7; background: #edf5f1; color: #284f3e; font-size: 11px; text-align: start; }
.visitor-log-table td { padding: 11px 10px; border-bottom: 1px solid #e4ebe7; vertical-align: top; }
.visitor-log-row:hover td { background: #fbfdfc; }
.visitor-log-row td > strong, .visitor-log-row td > small, .visitor-log-row td > time { display: block; }
.visitor-log-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.visitor-log-row code { color: #183f2e; font-family: "IBM Plex Mono", Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.visitor-log-sort { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 850; cursor: pointer; }
.visitor-log-status { display: inline-flex; min-width: 48px; justify-content: center; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.visitor-log-status.success { background: #e5f4eb; color: #21613f; }
.visitor-log-status.redirect { background: #eef2ff; color: #3d4d91; }
.visitor-log-status.client-error { background: #fff3db; color: #885b08; }
.visitor-log-status.server-error { background: #fde8e8; color: #942c2c; }
.visitor-log-detail td { padding-top: 0; background: #fbfdfc; }
.visitor-log-detail details > summary { color: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.visitor-log-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 10px 0 4px; }
.visitor-log-detail dl div { min-width: 0; }
.visitor-log-detail dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.visitor-log-detail dd { margin: 3px 0 0; font-size: 11px; overflow-wrap: anywhere; }
.visitor-log-empty { padding: 36px; border: 1px dashed #aac2b6; border-radius: 12px; color: var(--muted); text-align: center; }
.visitor-log-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 750; }
.visitor-log-pagination > div { display: flex; gap: 8px; }
.visitor-log-purge-audit { margin-top: 20px; padding: 13px 15px; border: 1px solid #e2d5be; border-radius: 10px; background: #fffaf1; }
.visitor-log-purge-audit summary { color: #765019; font-weight: 850; cursor: pointer; }
.visitor-log-purge-audit p { margin: 8px 0 0; color: #715f43; font-size: 11px; }

@media (max-width: 720px) {
  .public-info-page { margin-top: 20px; padding: 20px 16px; border-radius: 12px; }
  .public-form { grid-template-columns: 1fr; }
  .captcha-control { grid-template-columns: 1fr; }
  .captcha-image { width: 100%; max-width: 250px; }
  .feedback-admin-page { width: min(100% - 24px, 980px); margin-top: 20px; }
  .feedback-admin-header, .feedback-admin-card header { align-items: flex-start; flex-direction: column; }
  .feedback-admin-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .feedback-admin-card-tools { width: 100%; justify-content: space-between; }
  .visitor-logs-page { width: min(100% - 20px, 1280px); margin-top: 18px; }
  .visitor-logs-header { align-items: flex-start; flex-direction: column; }
  .visitor-log-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visitor-log-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px; }
  .visitor-log-filters .wide { grid-column: 1 / -1; }
  .visitor-log-filter-actions { grid-column: 1 / -1; }
  .visitor-log-bulk { align-items: stretch; flex-direction: column; }
  .visitor-log-bulk .purge-date { width: 100%; align-items: stretch; flex-direction: column; margin-inline-start: 0; }
  .visitor-log-detail dl { grid-template-columns: 1fr; }
  .public-form-actions { flex-direction: column; }
  .public-form-actions .btn { width: 100%; }
}

@media (max-width: 720px) {
  .auth-app { padding: 0 16px; }
  .auth-screen {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 24px;
    min-height: 100svh;
    padding: 72px 0 28px;
  }
  .auth-language { top: 18px; right: 0; }
  .auth-brand-panel { text-align: center; }
  .auth-brand-logo { min-height: 92px; justify-content: center; margin-bottom: 10px; }
  .auth-eyebrow { margin-bottom: 5px; font-size: 10px; }
  .auth-brand-panel h1 { font-size: 31px; }
  .auth-brand-copy { max-width: 420px; margin: 9px auto 0; font-size: 13px; line-height: 1.55; }
  .auth-card { max-width: 520px; justify-self: center; padding: 20px 18px; }
  .auth-card-header { margin-bottom: 16px; }
  .auth-card-header h2 { font-size: 21px; }
  .auth-card.is-register .auth-form-grid { grid-template-columns: 1fr; }
  .auth-secondary-actions { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sort-layout { grid-template-columns: 1fr; }
  .sort-targets {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .sort-target { min-height: 110px; padding: 10px; }
  .level-bar { flex-wrap: nowrap; }
  .btn.play { flex: 0 0 44px; }
  .level-card:not(.polished-level) { padding: 11px; }
  .level-card-body { padding: 12px; }
  .level-title { font-size: 16px; }
  .level-subtitle { font-size: 12px; }
  .app-nav { grid-template-columns: minmax(118px, 1fr) 54px minmax(94px, 1fr); gap: 6px; }
  .app-nav .app-logo { height: 50px; max-width: 54px; }
  .app-nav .user-menu { gap: 6px; }
  .app-nav .btn { padding: 8px 9px; font-size: 13px; }
  .app-nav .account-button { min-width: 0; }
  .dictionary-nav-button { width: 84px; min-width: 84px; max-width: 84px; padding-inline: 7px !important; }
  .dictionary-page { margin-top: 22px; }
  .dictionary-search-control { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dictionary-submit { grid-column: 1 / -1; width: 100%; }
  .dictionary-status { margin-top: 18px; padding: 25px 17px; }
  .dictionary-results-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-actions .btn { flex: 1 1 76px; padding: 8px; font-size: 12px; }
  .level-action-buttons { gap: 4px; }
  .level-action-buttons .btn.icon-only { width: 34px; min-width: 34px; height: 34px; }
  .level-counter { font-size: 11px; padding-inline: 8px; }
  .lesson-nav .level-history.nav-history { left: calc(75% - 10px); font-size: 9px; }
  .level-actions.lesson-context-actions { grid-template-columns: 72px minmax(0, 1fr) 72px; gap: 6px; }
  .level-context-button { width: 72px; min-width: 72px; padding-inline: 5px; font-size: 11px; gap: 4px; }
  .level-context-spacer { width: 72px; }
  .level-stage-title { width: calc(100% - 24px); font-size: 12px; }
  .lesson-context-actions .level-stage-title { width: 100%; }
  .lesson-stage-fixed > .lesson-nav .btn { flex-basis: 40px; width: 40px; min-width: 40px; height: 40px; }
  .level-metrics { gap: 6px; }
  .level-metrics span { font-size: 10px; }
  .lesson-content { padding: 16px; }
  .answer.mcq-choice { min-height: 52px; padding: 12px 13px; font-size: clamp(17px, calc(var(--content-font-size) + 1px), 21px); }
  .answer.mcq-choice.script-rtl { font-size: clamp(19px, calc(var(--content-font-size) + 3px), 24px); }
  .result-shell { margin-top: 14px; }
  .result-hero { padding: 20px 15px; }
  .result-hero h1 { font-size: 22px; }
  .result-stats strong { font-size: 17px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card { height: auto; min-height: 198px; }
  .category-card h2,
  .category-card-subtitle { flex-shrink: 0; }
  .category-card h2 { font-size: 16px; }
  .category-admin-row { grid-template-columns: 1fr; }
  .editor-backdrop { padding: 8px; }
  .inline-editor { max-height: calc(100vh - 16px); padding: 13px; }
  .community-heading { align-items: center; }
  .community-heading h1 { font-size: 20px; }
  .community-heading p { font-size: 11px; }
  .compact-community-action span { display: none; }
  .compact-community-action { width: 38px; min-width: 38px; height: 38px; padding: 0; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .achievement-list { grid-template-columns: 1fr; }
  .profile-overview-body { padding: 13px; }
  .profile-identity { grid-template-columns: auto minmax(0, 1fr); }
  .profile-identity small { grid-column: 2; justify-self: start; }
  .profile-editor .form-grid { grid-template-columns: 1fr; }
  .leaderboard-row { grid-template-columns: 30px 25px minmax(0, 1fr) auto; gap: 7px; padding: 9px; }
  .leader-identity small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .profile-editor .row { flex-direction: column-reverse; }
  .profile-editor .row .btn { width: 100%; }
  .user-admin-filters { grid-template-columns: 1fr; }
  .admin-user-main { gap: 8px; }
  .admin-user-card footer,
  .user-editor footer { flex-direction: column; }
  .admin-user-card footer .btn,
  .user-editor footer .btn { width: 100%; }
  .soft-lock-dialog { padding: 17px; }
  .soft-lock-actions { grid-template-columns: 1fr; }
  .soft-lock-actions .btn { grid-column: 1 !important; width: 100%; }
  .quiz-briefing-shell { margin-top: 14px; }
  .quiz-briefing-hero { padding: 19px 14px; }
  .quiz-briefing-hero h1 { font-size: 22px; }
  .quiz-briefing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-briefing-grid div:nth-child(2) { border-inline-end: 0; }
  .quiz-briefing-grid div:nth-child(-n+2) { border-bottom: 1px solid #e2e9e5; }
  .quiz-briefing-actions { grid-template-columns: 1fr; }
  .quiz-briefing-actions .btn { width: 100%; }
  .sentence-answer-lane, .sentence-word-bank { min-height: 58px; padding: 9px; gap: 6px; }
  .sentence-token { min-height: 34px; padding: 5px 8px; font-size: 13px; }
  .word-by-word-ayah { gap: 8px 6px; padding: 10px 8px; }
  .word-by-word-token { flex-basis: 88px; min-width: 78px; max-width: 142px; }
  .word-meaning-slot { min-height: 39px; padding: 5px 6px; }
  .word-meaning-bank { gap: 6px; padding: 8px; }
  .word-meaning-bank .word-chip { padding: 7px 9px; }
  .editorial-review { margin-bottom: 76px; }
  .editorial-review footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-review footer .btn { width: 100%; }
  .course-editorial-status { grid-template-columns: 1fr; }
  .course-editorial-status > div:last-child .btn { flex: 1 1 160px; }
}

/* Urdu interface typography: add one typographic point without changing
   learner slide or active-question content inside .lesson-content. */
h1 { font-size: calc(2rem + var(--urdu-interface-font-increase)); }
h2 { font-size: calc(1.5rem + var(--urdu-interface-font-increase)); }
h3 { font-size: calc(1.17rem + var(--urdu-interface-font-increase)); }
h4 { font-size: calc(1rem + var(--urdu-interface-font-increase)); }
h5 { font-size: calc(.83rem + var(--urdu-interface-font-increase)); }
h6 { font-size: calc(.67rem + var(--urdu-interface-font-increase)); }
small { font-size: calc(.833333rem + var(--urdu-interface-font-increase)); }
:where(.lesson-content) h1 { font-size: 2em; }
:where(.lesson-content) h2 { font-size: 1.5em; }
:where(.lesson-content) h3 { font-size: 1.17em; }
:where(.lesson-content) h4 { font-size: 1em; }
:where(.lesson-content) h5 { font-size: .83em; }
:where(.lesson-content) h6 { font-size: .67em; }
:where(.lesson-content) small { font-size: smaller; }
.mastery-result h2 { font-size: calc(1.5rem + var(--urdu-interface-font-increase)); }
.mastery-result h3 { font-size: calc(.95rem + var(--urdu-interface-font-increase)); }
.language-toggle { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.level-context-button { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.brand h1 { font-size: calc(30px + var(--urdu-interface-font-increase)); }
.app-top-title { font-size: calc(28px + var(--urdu-interface-font-increase)); }
.level-counter { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.level-stage-title { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.menu-user-name { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.menu-section-label { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.rank-menu-copy strong { font-size: calc(14px + var(--urdu-interface-font-increase)); }
.rank-menu-copy span { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.rank-menu-copy .rank-arabic { font-size: calc(14px + var(--urdu-interface-font-increase)); }
.rank-badge { font-size: calc(16px + var(--urdu-interface-font-increase)); }
.rank-badge.small { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.rank-badge.large { font-size: calc(19px + var(--urdu-interface-font-increase)); }
.home-course-header h1 { font-size: calc(28px + var(--urdu-interface-font-increase)); }
.home-course-header p { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.btn.compact { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.course-mark { font-size: calc(14px + var(--urdu-interface-font-increase)); }
.course-state { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.course-card h2 { font-size: calc(18px + var(--urdu-interface-font-increase)); }
.course-card p { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.course-card footer strong { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.rank-editor-preview span,
.rank-admin-copy span { font-size: calc(16px + var(--urdu-interface-font-increase)); }
.rank-unlocked strong { font-size: calc(17px + var(--urdu-interface-font-increase)); }
.level-metrics span { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.level-metrics b { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.level-title { font-size: calc(17px + var(--urdu-interface-font-increase)); }
.level-subtitle { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.badge { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.inner-course-title p { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.category-card h2 { font-size: calc(17px + var(--urdu-interface-font-increase)); }
.category-card footer strong { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.field label { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.account-settings-panel > header h1 { font-size: calc(24px + var(--urdu-interface-font-increase)); }
.account-section h2 { font-size: calc(16px + var(--urdu-interface-font-increase)); }
.account-helper { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.result-hero h1 { font-size: calc(26px + var(--urdu-interface-font-increase)); }
.result-hero p { font-size: calc(var(--content-font-size) + var(--urdu-interface-font-increase)); }
.result-stats strong { font-size: calc(20px + var(--urdu-interface-font-increase)); }
.result-stats span { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.result-penalty { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.result-save-status { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.result-unlock { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.community-quick-actions .btn { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.community-heading h1 { font-size: calc(24px + var(--urdu-interface-font-increase)); }
.community-heading p { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.community-loading,
.community-notice,
.community-error { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.profile-identity h2 { font-size: calc(20px + var(--urdu-interface-font-increase)); }
.profile-identity span { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.profile-identity small { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.profile-rank { font-size: calc(15px + var(--urdu-interface-font-increase)); }
.profile-bio { font-size: calc(14px + var(--urdu-interface-font-increase)); }
.profile-xp b { font-size: calc(17px + var(--urdu-interface-font-increase)); }
.profile-xp span { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.profile-next-rank { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.dashboard-section h2 { font-size: calc(16px + var(--urdu-interface-font-increase)); }
.dashboard-metrics b { font-size: calc(18px + var(--urdu-interface-font-increase)); }
.dashboard-metrics span { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.dashboard-course-list strong { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.dashboard-course-list small { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.achievement-list strong { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.achievement-list p { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.profile-editor h2 { font-size: calc(17px + var(--urdu-interface-font-increase)); }
.profile-slug { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.profile-switch b { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.profile-switch small { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.leader-position { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.leader-identity strong { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.leader-identity strong i { font-size: calc(9px + var(--urdu-interface-font-increase)); }
.leader-identity span { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.leader-identity small { font-size: calc(9px + var(--urdu-interface-font-increase)); }
.leader-xp b { font-size: calc(15px + var(--urdu-interface-font-increase)); }
.leader-xp span { font-size: calc(9px + var(--urdu-interface-font-increase)); }
.privacy-footnote { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.auth-language { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.auth-eyebrow { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.auth-brand-panel h1 { font-size: calc(clamp(34px, 4.5vw, 52px) + var(--urdu-interface-font-increase)); }
.auth-brand-copy { font-size: calc(16px + var(--urdu-interface-font-increase)); }
.auth-card-header h2 { font-size: calc(25px + var(--urdu-interface-font-increase)); }
.auth-card-header p { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.auth-alert { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.auth-card .field label { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.auth-divider { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.auth-secondary-actions .btn { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.auth-recovery { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.auth-panel h1 { font-size: calc(24px + var(--urdu-interface-font-increase)); }
.auth-notice,
.password-rules { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.admin-users-heading h1 { font-size: calc(25px + var(--urdu-interface-font-increase)); }
.admin-users-heading p { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.admin-user-main h2 { font-size: calc(17px + var(--urdu-interface-font-increase)); }
.admin-user-main p { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.admin-user-main small { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.admin-user-stats span { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.admin-user-flags span { font-size: calc(9px + var(--urdu-interface-font-increase)); }
.user-editor > header h2 { font-size: calc(21px + var(--urdu-interface-font-increase)); }
.user-editor > header p { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.checkline { font-size: calc(12px + var(--urdu-interface-font-increase)); }
.soft-lock-dialog h2 { font-size: calc(21px + var(--urdu-interface-font-increase)); }
.soft-lock-dialog header p { font-size: calc(13px + var(--urdu-interface-font-increase)); }
.soft-lock-note { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.briefing-eyebrow { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.quiz-briefing-hero h1 { font-size: calc(27px + var(--urdu-interface-font-increase)); }
.quiz-briefing-grid strong { font-size: calc(20px + var(--urdu-interface-font-increase)); }
.quiz-briefing-grid span { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.quiz-briefing-types span { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.briefing-community { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.editorial-review header small { font-size: calc(10px + var(--urdu-interface-font-increase)); }
.editorial-review header strong { font-size: calc(14px + var(--urdu-interface-font-increase)); }
.editorial-review footer .btn { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.course-editorial-status span { font-size: calc(11px + var(--urdu-interface-font-increase)); }
.course-editorial-status .btn { font-size: calc(11px + var(--urdu-interface-font-increase)); }

@media (max-width: 720px) {
  .auth-eyebrow { font-size: calc(10px + var(--urdu-interface-font-increase)); }
  .auth-brand-panel h1 { font-size: calc(31px + var(--urdu-interface-font-increase)); }
  .auth-brand-copy { font-size: calc(13px + var(--urdu-interface-font-increase)); }
  .auth-card-header h2 { font-size: calc(21px + var(--urdu-interface-font-increase)); }
  .level-title { font-size: calc(16px + var(--urdu-interface-font-increase)); }
  .level-subtitle { font-size: calc(12px + var(--urdu-interface-font-increase)); }
  .app-nav .btn:not(.icon-only) { font-size: calc(13px + var(--urdu-interface-font-increase)); }
  .admin-actions .btn { font-size: calc(12px + var(--urdu-interface-font-increase)); }
  .level-counter { font-size: calc(11px + var(--urdu-interface-font-increase)); }
  .level-stage-title { font-size: calc(12px + var(--urdu-interface-font-increase)); }
  .level-metrics span { font-size: calc(10px + var(--urdu-interface-font-increase)); }
  .result-hero h1 { font-size: calc(22px + var(--urdu-interface-font-increase)); }
  .result-stats strong { font-size: calc(17px + var(--urdu-interface-font-increase)); }
  .category-card h2 { font-size: calc(16px + var(--urdu-interface-font-increase)); }
  .community-heading h1 { font-size: calc(20px + var(--urdu-interface-font-increase)); }
  .community-heading p { font-size: calc(11px + var(--urdu-interface-font-increase)); }
  .quiz-briefing-hero h1 { font-size: calc(22px + var(--urdu-interface-font-increase)); }
}

@media (max-width: 430px) {
  .app-nav {
    grid-template-columns: 174px minmax(0, 1fr);
    grid-template-areas:
      "logo logo"
      "left right";
    align-items: center;
    column-gap: 6px;
    row-gap: 8px;
  }
  .app-nav .app-top-title,
  .app-nav > .app-logo {
    grid-area: logo;
    justify-self: center;
  }
  .top-nav-left {
    grid-area: left;
    width: 174px;
    min-width: 174px;
  }
  .app-nav .user-menu {
    grid-area: right;
    min-width: 0;
    justify-self: end;
    justify-content: flex-end;
  }
  .app-nav .user-menu .btn {
    width: auto;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    white-space: nowrap;
    line-height: 1;
  }
}

/* Quiz typography is derived from one selected content size. */
.quiz-question-card {
  --content-font-size: var(--quiz-content-font-size, var(--slide-content-font-size));
}
.quiz-question-card .question-prompt {
  font-size: var(--quiz-prompt-font-size);
  font-weight: var(--slide-heading-font-weight);
}
.quiz-question-card .question-prompt-line:is(.script-rtl, .urdu-text, .arabic-text) {
  font-size: var(--quiz-arabic-prompt-font-size);
}
.quiz-question-card .answer.mcq-choice,
.quiz-question-card .match-tile,
.quiz-question-card .word-chip,
.quiz-question-card .sentence-token {
  font-size: var(--quiz-choice-font-size);
}
.quiz-question-card .answer.mcq-choice.script-rtl {
  font-size: var(--quiz-arabic-choice-font-size);
}
.quiz-question-card :is(.feedback, .hint, .penalty, .text-answer, .sentence-typing, .word-by-word-translation) {
  font-size: var(--quiz-detail-font-size);
}

/* Keep vertical page/quiz scrolling available when a touch starts on a choice. */
.answers,
.answer-option,
.answer.mcq-choice,
.answer.mcq-choice * {
  touch-action: pan-y pinch-zoom;
}

.answer.mcq-choice {
  -webkit-user-select: none;
  user-select: none;
}

.answer.mcq-choice:disabled {
  pointer-events: none;
}
.match-tile[dir="rtl"],
.match-tile:has([dir="rtl"]),
.match-tile:has([lang="ar"]),
.match-tile:has([lang="ur"]) {
    direction: rtl;
    text-align: right !important;
}

/* Generic narrow/fold lesson contract for source-style study diagrams. */
.qac-graph-scroll,
.qac-morphology-scroll {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
}
.qac-graph-scroll {
  position: relative;
  direction: ltr;
}
.qac-graph-scroll:not(.has-horizontal-overflow) {
  overflow-x: hidden;
  scrollbar-width: none;
  box-shadow: none;
}
.qac-graph-scroll:not(.has-horizontal-overflow)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.qac-graph-scroll.has-horizontal-overflow {
  overflow-x: auto;
}
.qac-graph-scroll.has-horizontal-overflow {
  box-shadow: inset 12px 0 10px -12px rgba(31, 111, 84, .5), inset -12px 0 10px -12px rgba(31, 111, 84, .5);
}
.qac-scroll-hint {
  display: none;
  margin: -10px 4px 0;
  color: #65776e;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}
.qac-graph-scroll.has-horizontal-overflow + .qac-scroll-hint { display: block; }

@media (max-width: 640px) {
  .app.lesson-stage-app {
    height: auto;
    min-height: 100svh;
    max-height: none;
    overflow: visible;
  }
  .lesson-stage-app > .app-nav { margin-bottom: 2px; }
  .lesson-stage-shell {
    display: block;
    min-height: 0;
    overflow: visible;
  }
  .lesson-stage-fixed { min-height: 0; }
  .lesson-stage-scroll {
    width: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
    padding-inline: 0;
  }
  .lesson-stage-scroll .lesson-content {
    width: 100%;
    max-height: none;
    margin-top: 7px;
    overflow: visible;
  }
  .lesson-context-actions {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    grid-template-areas: "levels title quiz";
    gap: 6px;
    width: 100%;
  }
  .lesson-context-actions > .level-context-button:first-child { grid-area: levels; justify-self: start; }
  .lesson-context-actions > .level-stage-title { grid-area: title; width: 100%; min-width: 0; justify-self: stretch; }
  .lesson-context-actions > .level-context-button:last-child:not(:first-child),
  .lesson-context-actions > .level-context-spacer { grid-area: quiz; justify-self: end; }
  .lesson-context-actions .level-context-button { min-height: 38px; padding-block: 6px; }
  .lesson-context-actions .level-stage-title {
    min-height: 30px;
    padding-block: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lesson-stage-fixed > .lesson-nav { margin-top: 5px; }
  .lesson-content.tarkeeb-slide { padding: 14px 10px; }
  .qac-corpus-treebank { gap: 12px; margin-top: 10px; }
  .qac-sentence { gap: 12px; }
  .qac-graph-scroll { width: 100%; margin-inline: 0; padding: 6px 0 2px; }
  .qac-canvas { margin-inline: 0; }
  .qac-arabic { font-size: clamp(32px, 9vw, 38px); }
  .qac-gloss { font-size: 12px; }
  .qac-pos-code { font-size: 16px; }
  .qac-corpus-treebank[data-language="ur"] .qac-pos-code { font-size: 13px; }
  .qac-morphology-scroll { overflow: visible; }
  .qac-morphology-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-top: 0;
  }
  .qac-morphology-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .qac-morphology-table tbody { display: grid; gap: 10px; }
  .qac-morphology-table tbody tr {
    display: grid;
    grid-template-areas: "arabic" "syntax";
    height: auto;
    overflow: hidden;
    border: 1px solid #d8e3de;
    border-radius: 9px;
    background: #fff;
  }
  .qac-morphology-table tbody td {
    display: grid;
    grid-template-columns: minmax(88px, .34fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: auto;
    min-width: 0;
    padding: 10px 11px;
    border: 0;
    border-bottom: 1px solid #e4ebe7;
    text-align: start;
  }
  .qac-morphology-table tbody td::before {
    content: attr(data-mobile-label);
    color: #667970;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-align: start;
  }
  .qac-morphology-table .qac-arabic-cell { grid-area: arabic; }
  .qac-morphology-table .qac-syntax-cell { grid-area: syntax; border-bottom: 0; }
  .qac-morphology-table .qac-syntax-cell > * { min-width: 0; }
  .qac-morph-word { justify-content: flex-start; }
  .qac-corpus-treebank[data-language="ur"] .qac-morphology-table tbody td,
  .qac-corpus-treebank[data-language="ur"] .qac-morphology-table tbody td::before { text-align: right; }
}

/* qac-source-v1: true narrow two-column morphology and centered fit canvas */
@media (max-width: 640px) {
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-canvas {
    max-width: none;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table {
    display: table;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table col.qac-arabic-column,
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table th:first-child,
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table td:first-child {
    width: 38%;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table col.qac-syntax-column,
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table th:nth-child(2),
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table td:nth-child(2) {
    width: 62%;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table thead tr,
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table tbody tr {
    display: table-row;
    grid-template-areas: none;
    grid-template-columns: none;
    gap: 0;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table tbody {
    display: table-row-group;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table th,
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table td {
    display: table-cell;
    min-width: 0;
    padding: 10px 8px;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: normal;
    vertical-align: middle;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morphology-table td::before {
    content: none;
    display: none;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-arabic-cell {
    text-align: center;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-syntax-cell {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"][dir="rtl"] .qac-syntax-cell {
    text-align: right;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"][dir="ltr"] .qac-syntax-cell {
    text-align: left;
  }

  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morph-word {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
}
/* qac-source-v1: phone morphology Arabic sizing only */
@media (max-width: 640px) {
  .qac-corpus-treebank[data-presentation-profile="qac-source-v1"] .qac-morph-word .qac-arabic {
    font-size: clamp(27px, 7.5vw, 32px);
  }
}
/* level-dual-entry-completion-actions-v1 */
.level-entry-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;min-width:min(290px,42vw)}
.level-entry-actions.single{grid-template-columns:minmax(150px,1fr);min-width:0}
.level-entry-action{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding-inline:12px;white-space:nowrap}
.level-entry-action.lesson{background:#fff}.level-entry-action.quiz{box-shadow:0 7px 16px rgba(17,91,68,.14)}
.flow-action-deck{width:min(680px,100%);margin:20px auto 0;display:grid;gap:10px}
.flow-action-deck .flow-primary{min-height:50px;font-size:1.02rem}
.flow-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.flow-action-grid .btn{min-height:44px;white-space:normal;line-height:1.25}
.result-actions.flow-action-deck{display:grid;grid-template-columns:minmax(0,1fr);direction:inherit}
.result-actions.flow-action-deck>.flow-primary{grid-column:1/-1;width:100%}
.result-actions.flow-action-deck>.flow-action-grid{grid-column:1/-1;width:100%;direction:inherit}
html[dir="rtl"] .flow-action-grid .btn{font-family:var(--font-urdu)}
@media(max-width:720px){.level-entry-actions{min-width:0;width:100%}.level-entry-action{min-height:40px;padding-inline:8px;font-size:.82rem}.flow-action-grid{grid-template-columns:1fr 1fr}.flow-action-grid .btn:last-child:nth-child(odd){grid-column:1/-1}}
@media(max-width:430px){.level-entry-actions{gap:5px}.level-entry-action{font-size:.76rem}.flow-action-grid{grid-template-columns:1fr}.flow-action-grid .btn:last-child:nth-child(odd){grid-column:auto}}

/* iphone14-level-list-responsive-v1 */
@media (max-width: 430px) {
  .inner-course-title { gap: 7px; padding-inline: 2px; }
  .inner-course-title h1 { overflow: visible; font-size: clamp(22px, 6.6vw, 26px); line-height: 1.25; text-overflow: clip; white-space: normal; }
  .inner-course-title p { padding: 4px 8px; font-size: 11px; }
  .polished-level .level-card-body { padding: 11px; }
  .level-meta-strip { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 8px; padding: 8px; }
  .level-metrics { width: 100%; padding-bottom: 7px; border-bottom: 1px solid color-mix(in srgb, var(--course-accent) 18%, white); }
  .level-entry-actions, .level-entry-actions.single { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; min-width: 0; }
  .level-entry-actions.single .level-entry-action { grid-column: 1 / -1; }
  .level-entry-action { min-width: 0; min-height: 44px; padding-inline: 6px; font-size: .86rem; }
  .level-entry-action span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .level-list .level-card .admin-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .level-list .level-card .admin-actions .btn { min-width: 0; min-height: 42px; padding: 7px 4px; font-size: .78rem; line-height: 1.2; white-space: normal; }
  .level-list .level-card .admin-actions .btn.danger { grid-column: 1 / -1; }
}

/* elegant-level-list-v1 */
.inner-course-header:has(+ .level-list-toolbar) {
  margin-bottom: 14px;
}
.inner-course-header:has(+ .level-list-toolbar) .inner-course-title {
  align-items: center;
  gap: 10px;
}
.inner-course-header:has(+ .level-list-toolbar) .inner-course-title h1 {
  letter-spacing: -.025em;
}
.inner-course-header:has(+ .level-list-toolbar) .inner-course-title p {
  border: 1px solid #d9e6df;
  background: #f3f8f5;
  color: #426353;
  box-shadow: none;
}
.level-list-toolbar {
  position: relative;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #dce6e1;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 30px rgba(35, 65, 52, .055);
}
.level-list-toolbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--green));
}
html[dir="rtl"] .level-list-toolbar::before { inset: 0 0 0 auto; }
.level-list-search { gap: 6px; }
.level-list-search > span {
  color: #52685d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.level-list-search input {
  min-height: 44px;
  padding-inline: 14px;
  border-color: #d8e2dd;
  border-radius: 11px;
  background: #fbfcfc;
  box-shadow: inset 0 1px 2px rgba(21, 55, 40, .025);
}
.level-list-search input:focus {
  border-color: color-mix(in srgb, var(--green) 55%, white);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 111, 79, .09);
}
.level-list-show-all {
  min-height: 42px;
  padding-inline: 13px;
  border-color: #e4d8bc;
  border-radius: 11px;
  background: #fffaf1;
}
.level-list-count {
  min-height: 38px;
  padding-inline: 13px;
  border-radius: 999px;
  background: #233f51;
  box-shadow: 0 5px 12px rgba(35, 63, 81, .16);
}
.level-list {
  gap: 12px;
}
.level-list > .polished-level {
  position: relative;
  overflow: visible;
  border: 1px solid #dce5e1;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff 0%, #fff 68%, #f7faf8 100%);
  box-shadow: 0 4px 16px rgba(27, 57, 44, .055);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.level-list > .polished-level.clickable:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--course-accent) 38%, #dce5e1);
  box-shadow: 0 12px 28px rgba(27, 57, 44, .10);
}
.level-list > .polished-level:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--course-accent) 22%, transparent);
  outline-offset: 3px;
}
.level-list > .polished-level .level-accent {
  position: absolute;
  inset: 13px auto 13px 0;
  width: 4px;
  height: auto;
  border-radius: 0 8px 8px 0;
  opacity: .78;
}
html[dir="rtl"] .level-list > .polished-level .level-accent {
  inset: 13px 0 13px auto;
  border-radius: 8px 0 0 8px;
}
.level-list > .polished-level .level-card-body {
  padding: 17px 18px 14px 20px;
}
html[dir="rtl"] .level-list > .polished-level .level-card-body {
  padding: 17px 20px 14px 18px;
}
.level-list > .polished-level .level-head {
  align-items: flex-start;
  gap: 14px;
}
.level-list > .polished-level .level-display-number {
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--course-accent) 8%, white);
  color: color-mix(in srgb, var(--course-accent) 78%, #33483e);
  font-size: 10px;
  line-height: 1.35;
}
.level-list > .polished-level .level-title {
  margin: 0;
  color: #17251f;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.35;
  letter-spacing: -.012em;
}
.level-list > .polished-level .level-subtitle {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: #65776e;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.level-list > .polished-level .level-status {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--course-accent) 20%, white);
  border-radius: 50%;
  background: color-mix(in srgb, var(--course-accent) 7%, white);
  font-size: 16px;
}
.level-list > .polished-level.passed .level-status {
  background: var(--course-accent);
  color: #fff;
  box-shadow: 0 5px 12px color-mix(in srgb, var(--course-accent) 24%, transparent);
}
.level-list > .polished-level .level-meta-strip {
  gap: 14px;
  margin-top: 15px;
  padding: 10px;
  border: 1px solid #e5ebe8;
  border-radius: 12px;
  background: rgba(247, 250, 248, .86);
}
.level-list > .polished-level .level-metrics {
  justify-content: flex-start;
  gap: 8px;
}
.level-list > .polished-level .level-metrics span {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #e2e9e5;
  border-radius: 8px;
  background: #fff;
  color: #40594e;
  font-size: 10px;
}
.level-list > .polished-level .level-metrics span:last-child {
  margin-inline-start: auto;
  border-color: transparent;
  background: transparent;
}
.level-list > .polished-level .level-entry-actions {
  gap: 8px;
  min-width: min(302px, 43vw);
}
.level-list > .polished-level .level-entry-action {
  min-height: 44px;
  border-radius: 10px;
  font-weight: 800;
}
.level-list > .polished-level .level-entry-action.lesson {
  border-color: color-mix(in srgb, var(--course-accent) 55%, white);
  background: #fff;
  box-shadow: none;
}
.level-list > .polished-level .level-entry-action.quiz {
  box-shadow: 0 7px 15px color-mix(in srgb, var(--course-accent) 17%, transparent);
}

@media (max-width: 720px) {
  .level-list-toolbar { border-radius: 14px; box-shadow: 0 7px 22px rgba(35, 65, 52, .05); }
  .level-list > .polished-level .level-card-body,
  html[dir="rtl"] .level-list > .polished-level .level-card-body { padding: 15px 15px 13px 17px; }
  html[dir="rtl"] .level-list > .polished-level .level-card-body { padding-inline: 17px 15px; }
  .level-list > .polished-level .level-meta-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .level-list > .polished-level .level-metrics { padding-bottom: 8px; border-bottom: 1px solid #dfe8e3; }
  .level-list > .polished-level .level-entry-actions { width: 100%; min-width: 0; }
}

@media (max-width: 430px) {
  .inner-course-header:has(+ .level-list-toolbar) { margin-bottom: 10px; }
  .level-list-toolbar { margin-bottom: 12px; padding: 12px 10px 10px; }
  .level-list { gap: 10px; }
  .level-list > .polished-level { border-radius: 13px; }
  .level-list > .polished-level.clickable:hover { transform: none; }
  .level-list > .polished-level .level-card-body,
  html[dir="rtl"] .level-list > .polished-level .level-card-body { padding: 13px 13px 12px 15px; }
  html[dir="rtl"] .level-list > .polished-level .level-card-body { padding-inline: 15px 13px; }
  .level-list > .polished-level .level-title { font-size: 16px; }
  .level-list > .polished-level .level-meta-strip { margin-top: 12px; padding: 8px; }
  .level-list > .polished-level .level-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .level-list > .polished-level .level-metrics span,
  .level-list > .polished-level .level-metrics span:last-child { justify-content: center; min-width: 0; margin: 0; padding-inline: 3px; }
  .level-list > .polished-level .level-entry-action { min-height: 43px; border-radius: 9px; font-size: .82rem; }
}

/* mobile-group-sort-wrap-v1 */
@media (max-width: 640px) {
  .sort-targets {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .sort-targets > * {
    flex: 1 1 110px;
    width: auto;
    min-width: min(110px, 100%);
    max-width: 100%;
    scroll-snap-align: none;
  }
}

/* Visitor analytics: explicit inclusion groups with mobile-friendly targets. */
.visitor-log-filters .visitor-log-choice-group { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid #dce7e1; }
.visitor-log-choice-group legend { padding: 0 8px 0 0; color: #456357; font-size: 12px; font-weight: 800; }
.visitor-log-options { display: flex; flex-wrap: wrap; gap: 8px; }
.visitor-log-filters .visitor-log-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid #c9d9d0; border-radius: 9px; background: #fff; cursor: pointer; }
.visitor-log-filters .visitor-log-choice:has(input:checked) { border-color: #77a28c; background: #eaf4ee; }
.visitor-log-filters .visitor-log-choice input { width: 17px; height: 17px; min-height: 0; margin: 0; padding: 0; flex: 0 0 17px; accent-color: var(--green); }
.visitor-log-filters .visitor-log-choice > span { font-size: 12px; font-weight: 650; }
.visitor-log-choice:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.visitor-log-filter-hint { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.visitor-log-filters .visitor-log-filter-actions { grid-column: 1 / -1; flex-wrap: wrap; }
@media (max-width: 720px) {
  .visitor-log-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visitor-log-filters .visitor-log-choice { padding: 8px; }
}
/* Lesson and quiz pages use one document scrollbar at every viewport size. */
.app.lesson-stage-app {
  height: auto;
  min-height: 100svh;
  max-height: none;
  overflow: visible;
}
.lesson-stage-app > .site-fixed-header {
  position: static;
}
.lesson-stage-app .lesson-stage-shell {
  display: block;
  min-height: 0;
  overflow: visible;
}
.lesson-stage-app .lesson-stage-fixed {
  position: static;
  min-height: 0;
}
.lesson-stage-app .lesson-stage-scroll {
  width: 100%;
  min-height: 0;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
  padding-inline: 0;
}
.lesson-stage-app .lesson-stage-scroll .lesson-content {
  width: 100%;
  max-height: none;
  overflow: visible;
}
