:root {
  color-scheme: light;
  --bg: #eef0f5;
  --paper: #fff;
  --ink: #2e3447;
  --muted: #65708a;
  --teal: #087e8f;
  --teal-soft: #e5f1f3;
  --purple: #ad75d5;
  --purple-soft: #f0e3fa;
  --green: #298665;
  --green-soft: #e7f5ee;
  --orange: #b86627;
  --orange-soft: #fff0df;
  --red: #ae4c50;
  --red-soft: #fff0f0;
  --line: #dde3ec;
  --soft: #f5f7fa;
  --radius: 22px;
  --bottom: 76px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-bottom: 100px;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button {
  border: 0;
}
button,
a {
  -webkit-touch-callout: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #8f6cbf;
  outline-offset: 3px;
}
p,
h1,
h2,
h3,
h4 {
  margin: 0;
}
h1 {
  font-size: 29px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.45px;
}
h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}
a {
  color: var(--teal);
  text-underline-offset: 3px;
}
svg {
  max-width: 100%;
}
svg.icon,
.icon {
  width: 21px;
  height: 21px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button .icon {
  pointer-events: none;
}
strong {
  font-weight: 650;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
label {
  display: block;
}
input,
textarea,
select {
  font-size: 16px;
  max-width: 100%;
}
input,
textarea {
  color: var(--ink);
  background: var(--paper);
}
input::placeholder,
textarea::placeholder {
  color: #8490a5;
}
textarea {
  resize: vertical;
  min-height: 140px;
}
summary {
  cursor: pointer;
}
ul,
ol {
  padding-left: 22px;
}
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}
/* A single mobile canvas, including on a desktop browser. */
.app {
  width: 100%;
  max-width: 520px;
  min-height: 100svh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
}
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px 15px;
  min-height: 80px;
}
.brand {
  flex: 1;
  text-align: center;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.6px;
  line-height: 1.1;
}
.brand small {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.35px;
  color: var(--muted);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: transparent;
  flex: none;
  font-size: 23px;
}
.icon-button:hover {
  background: #e2e7ef;
}
.page {
  padding: 12px 18px calc(var(--bottom) + env(safe-area-inset-bottom) + 25px);
  min-width: 0;
}
.page > * + * {
  margin-top: 20px;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.65px;
  color: var(--muted);
  font-weight: 500;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.body-small {
  font-size: 14px;
  line-height: 1.6;
}
.spaced {
  margin-top: 24px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.paper {
  padding: 23px 21px;
  background: var(--paper);
  border-radius: var(--radius);
  min-width: 0;
  overflow-wrap: anywhere;
}
.paper > * + * {
  margin-top: 14px;
}
.paper .row > * {
  margin-top: 0;
}
.full {
  width: 100%;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.primary,
.secondary,
.option,
.text-button,
.listen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 13px;
  line-height: 1.35;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.primary {
  background: var(--ink);
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: #424a62;
}
.secondary {
  background: #e0e6ef;
  color: var(--ink);
}
.secondary:hover:not(:disabled) {
  background: #d7dfeb;
}
.option {
  background: var(--paper);
  border: 1px solid var(--line);
  justify-content: flex-start;
  text-align: left;
  min-height: 55px;
  font-weight: 400;
  width: 100%;
  padding: 14px 17px;
}
.option.selected {
  background: var(--teal-soft);
  color: #066b78;
  border-color: #9ac8d0;
}
.option.wrong {
  background: var(--red-soft);
  color: var(--red);
  border-color: #e4bec0;
}
.text-button {
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 8px;
}
.text-button:hover {
  color: var(--teal);
  background: #e5edf2;
}
.listen-button {
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  background: #e9edf4;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
}
.pill.green {
  background: var(--green-soft);
  color: var(--green);
}
.pill.orange {
  background: var(--orange-soft);
  color: var(--orange);
}
.pill.purple {
  background: var(--purple-soft);
  color: #8055a3;
}
.progress-track {
  height: 6px;
  border-radius: 9px;
  background: #dde4ee;
  overflow: hidden;
  flex: 1;
  min-width: 30px;
}
.progress-track > span {
  display: block;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  background: #53ba94;
  border-radius: inherit;
  transition: width 0.25s;
}
.bottom-nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 520px;
  padding: 8px 8px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e4e8f0;
  box-shadow: 0 -8px 24px #2d365006;
  backdrop-filter: blur(10px);
}
.bottom-nav button {
  min-height: 52px;
  min-width: 56px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 3px;
  background: transparent;
  color: #737d96;
  font-size: 11px;
  border-radius: 12px;
}
.bottom-nav button .icon {
  width: 21px;
  height: 21px;
}
.bottom-nav button.active {
  color: var(--teal);
  background: #eaf3f5;
}
/* Arrival and placement. */
.onboarding {
  padding-bottom: 30px;
}
.welcome {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 115px);
  padding-top: 24px;
}
.welcome-mark {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 0 30px;
  background: #fff;
  border-radius: 25px;
  color: var(--teal);
  font-family: "Geeza Pro", serif;
  font-size: 46px;
  line-height: 1;
}
.lead {
  font-size: 17px;
  line-height: 1.65;
  color: #657089;
  max-width: 390px;
}
.welcome h1 {
  font-size: 34px;
  line-height: 1.16;
  letter-spacing: -1px;
}
.welcome-footer {
  margin-top: auto;
  padding-top: 32px;
  display: grid;
  gap: 12px;
}
.welcome-footer .small {
  text-align: center;
}
.choice-times {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.choice-times button {
  flex: 1;
  min-width: 65px;
  min-height: 46px;
  background: var(--soft);
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
}
.choice-times button.selected {
  border-color: #8ebfc8;
  background: var(--teal-soft);
  color: var(--teal);
}
.onboarding .option + .option {
  margin-top: 10px;
}
.onboarding .paper {
  margin-top: 24px;
}
/* Today's route. */
.mission {
  padding: 25px 22px;
}
.mission-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 0 14px;
}
.mission-title .arabic {
  font-size: 34px;
}
.mission-progress {
  margin: 20px 0 19px;
}
.mission-progress .row {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 9px;
}
.home-stats,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  padding: 20px 18px;
  background: #fff;
  border-radius: 19px;
  min-width: 0;
}
.stat strong {
  display: block;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
.stat span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.home-row {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.home-row:last-child {
  border-bottom: 0;
}
.home-row > .icon {
  color: #7a8da5;
}
.home-row p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.home-row strong {
  font-size: 15px;
}
.route-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.route-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 0 0 23px;
}
.route-step:last-child {
  padding-bottom: 0;
}
.route-step:not(:last-child):before {
  content: "";
  position: absolute;
  left: 16px;
  top: 34px;
  width: 1px;
  bottom: 2px;
  background: var(--line);
}
.route-step .number {
  display: grid;
  place-items: center;
  flex: none;
  width: 33px;
  height: 33px;
  font-size: 12px;
  background: #edf0f5;
  border-radius: 50%;
  color: var(--muted);
}
.route-step.done .number {
  background: var(--green-soft);
  color: var(--green);
}
.route-step strong {
  display: block;
  font-size: 14px;
}
.route-step p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.daily-history {
  display: flex;
  gap: 7px;
}
.daily-history span {
  width: 26px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #e6ebf2;
  border-radius: 7px;
  font-size: 11px;
  color: var(--muted);
}
.daily-history span.done {
  background: #d8f0e4;
  color: var(--green);
}
/* One learning task at a time. */
.study-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 80px);
  padding-top: 8px;
}
.study-page > * + * {
  margin-top: 18px;
}
.session-line {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 11px;
  color: var(--muted);
  padding: 0 5px 7px;
}
.session-line .progress-track {
  height: 5px;
}
.study-page > .repair-line {
  margin-top: 0;
  padding-left: 5px;
  color: var(--muted);
  font-size: 13px;
}
.exercise {
  padding: 23px 22px 0;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  min-width: 0;
}
.exercise-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  min-height: 22px;
}
.exercise-meta .pill {
  margin-left: auto;
}
.stage-mark {
  display: inline-block;
  width: 21px;
  height: 5px;
  border-radius: 7px;
  background: #8ebdc4;
}
.stage-mark.new {
  background: #f5a45b;
}
.exercise-prompt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 23px;
}
.exercise-text {
  margin: 25px 0 20px;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
}
.arabic,
.arabic-large,
.arabic-medium,
.arabic-small {
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Amiri", "Traditional Arabic",
    serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.9;
  color: var(--teal);
}
.arabic {
  font-size: 35px;
}
.arabic-large {
  font-size: 48px;
  line-height: 1.8;
}
.arabic-medium {
  font-size: 33px;
}
.arabic-small {
  font-size: 25px;
}
.word-target {
  display: inline-block;
  padding: 0 9px;
  background: var(--teal-soft);
  border-radius: 9px;
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: #90bfc7;
  text-underline-offset: 10px;
  text-decoration-thickness: 2px;
}
.grammar-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--soft);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 13px;
  min-height: 44px;
  margin: 18px 0;
}
.grammar-chip button {
  min-height: 44px;
  min-width: 44px;
  background: transparent;
  color: inherit;
}
.translation {
  margin: 20px -22px 0;
  padding: 21px 22px 24px;
  background: #f7f8fb;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.translation strong {
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
.context-cue {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 17px;
}
.word-meaning {
  font-size: 22px;
  line-height: 1.4;
  text-align: center;
  margin: 8px 0;
  color: var(--ink);
}
.transliteration {
  text-align: center;
  font-size: 13px;
  color: #7c879b;
  line-height: 1.5;
}
.teaching-note {
  font-size: 14px;
  color: #626e87;
  line-height: 1.7;
  padding: 16px 0 20px;
}
.example-label {
  font-size: 11px;
  color: #7b8499;
  margin: 14px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.example-block {
  padding-top: 15px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}
.example-block .arabic {
  font-size: 31px;
  text-align: center;
}
.example-block p {
  font-size: 14px;
}
.example-block .translation {
  margin-top: 12px;
}
.answer-area {
  display: grid;
  gap: 12px;
  margin: 20px 0 22px;
}
.answer-input,
.search,
textarea {
  width: 100%;
  border: 1px solid #d7e0ea;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 15px;
  min-height: 50px;
  font-size: 16px;
}
.answer-input[dir="rtl"] {
  font-family: "Geeza Pro", "Noto Naskh Arabic", serif;
  font-size: 30px;
  color: var(--teal);
  line-height: 1.5;
  text-align: center;
}
.cloze-input {
  display: inline-block;
  vertical-align: middle;
  width: 145px;
  max-width: 50%;
  height: 74px;
  border: 0;
  border-bottom: 2px solid #79aeb8;
  background: #edf2f5;
  border-radius: 9px;
  text-align: center;
  padding: 2px 8px;
  color: var(--teal);
  font-family: "Geeza Pro", "Noto Naskh Arabic", serif;
  font-size: 40px;
  line-height: 1.2;
}
.cloze-input::placeholder {
  color: #91b4bd;
}
.study-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.study-actions .primary {
  flex: 1;
  min-width: 130px;
}
.study-actions .secondary {
  flex: 1;
}
.study-bottom {
  margin-top: auto;
  padding-top: 24px;
  display: grid;
  gap: 10px;
}
.study-bottom > .primary,
.study-bottom > .secondary {
  width: 100%;
}
.study-bottom > .small {
  text-align: center;
  color: var(--muted);
}
.choices {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.choices .arabic {
  font-size: 31px;
}
.help-options {
  display: grid;
  gap: 10px;
}
.feedback {
  padding: 20px;
  background: var(--green-soft);
  border-radius: 18px;
  color: #286c56;
  font-size: 14px;
  line-height: 1.65;
}
.feedback strong {
  display: block;
  margin-bottom: 6px;
}
.feedback.error {
  background: var(--red-soft);
  color: #95474e;
}
.feedback.assisted {
  background: #fff2e1;
  color: #936533;
}
.feedback .arabic {
  color: inherit;
}
.feedback .text-button {
  color: inherit;
}
.intro-steps {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.intro-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.intro-step:last-child {
  border: 0;
}
.intro-step .arabic {
  font-size: 32px;
  min-width: 44px;
  text-align: center;
}
.transfer-badge {
  font-size: 11px;
  color: #8c5ea9;
  background: var(--purple-soft);
  border-radius: 8px;
  padding: 6px 9px;
}
.readiness-note,
.safe-note {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
.readiness-note {
  padding: 14px 16px;
  background: #e5ecf2;
  border-radius: 13px;
}
.summary-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  margin: 8px auto 22px;
}
.summary-icon .icon {
  width: 29px;
  height: 29px;
}
.empty {
  text-align: center;
  padding: 40px 15px;
  color: var(--muted);
}
.empty .icon {
  width: 32px;
  height: 32px;
  margin-bottom: 15px;
}
.empty p {
  font-size: 14px;
  line-height: 1.65;
  margin-top: 10px;
}
/* Arabic input assistance. */
.keyboard {
  margin-top: 15px;
  padding: 12px 0 4px;
  display: grid;
  gap: 6px;
}
.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}
.keyboard-row button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 3px;
  background: #edf1f6;
  border-radius: 7px;
  font-family: "Geeza Pro", "Noto Naskh Arabic", serif;
  font-size: 25px;
  color: var(--ink);
}
.keyboard-row button:active {
  background: #d4e6ed;
}
.keyboard-row button.key-wide,
.key-wide {
  flex: 1.7;
  font-family: inherit;
  font-size: 17px;
}
.key-open .appbar {
  padding-top: 7px;
  padding-bottom: 7px;
  min-height: 56px;
}
.key-open .study-page {
  min-height: 0;
}
.key-open .exercise-text {
  margin-top: 10px;
  margin-bottom: 10px;
}
.key-open .exercise-prompt {
  margin-top: 12px;
}
.key-open .grammar-chip {
  display: none;
}
.key-open .translation {
  padding-top: 12px;
  padding-bottom: 12px;
}
.key-open .study-bottom {
  padding-top: 12px;
}
/* Reading stays readable as a continuous text. */
.reader-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.reader-head .arabic {
  font-size: 42px;
}
.reader-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.reader-toolbar button {
  flex: 1;
  font-size: 13px;
  min-width: 100px;
}
.reader-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 9px;
}
.verse {
  padding: 22px 20px;
  background: var(--paper);
  border-radius: 20px;
  transition: background 0.2s;
  scroll-margin-top: 18px;
}
.verse.playing {
  background: #e5f3f3;
  box-shadow: inset 0 0 0 1px #afcfd4;
}
.verse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: #7b859b;
  font-size: 11px;
}
.verse-head .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
}
.verse-text {
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Amiri", serif;
  font-size: 35px;
  line-height: 2.1;
  text-align: right;
  color: var(--teal);
  margin: 9px 0 12px;
  word-break: normal;
  overflow-wrap: normal;
}
.verse-word {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0 3px;
  margin: 0;
  min-height: 44px;
  border-radius: 6px;
  display: inline-block;
  vertical-align: baseline;
}
.verse-word:hover {
  background: #e9f2f5;
}
.verse-word.pending {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 8px;
  text-decoration-color: #b1becb;
  text-decoration-thickness: 2px;
}
.verse-translation {
  font-size: 15px;
  line-height: 1.7;
  color: #59667c;
  padding-top: 15px;
  margin-top: 10px;
  border-top: 1px solid #e7edf3;
}
.verse-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}
.verse-actions .text-button {
  padding-left: 0;
  justify-content: flex-start;
  font-size: 12px;
}
.reading-check {
  padding: 22px;
  background: var(--paper);
  border-radius: 21px;
}
.reading-check > p {
  font-size: 15px;
  line-height: 1.6;
}
.reading-check .choices {
  margin-bottom: 0;
}
.reader-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
/* Real lexical coverage and a clearly separate reference curve. */
.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: #e2e7f0;
  border-radius: 12px;
  margin: 18px 0;
}
.tabs button {
  flex: 1;
  min-height: 44px;
  padding: 8px 6px;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
}
.tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 5px #27354c08;
}
.coverage-value {
  font-size: 47px;
  letter-spacing: -1.8px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--ink);
  margin-top: 8px;
}
.coverage-label {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
}
.chart {
  width: 100%;
  margin-top: 20px;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart svg text {
  font-family: inherit;
  font-size: 11px;
  fill: #748098;
}
.chart .curve {
  fill: none;
  stroke: var(--purple);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .area {
  fill: #e9d5f7;
  stroke: none;
}
.chart .axis {
  stroke: #d8dfeb;
  stroke-width: 1;
  fill: none;
}
.chart .current-point {
  fill: var(--teal);
  stroke: #fff;
  stroke-width: 3;
}
.slider {
  display: block;
  width: 100%;
  min-height: 44px;
  accent-color: var(--purple);
  margin: 13px 0 0;
  padding: 0;
}
.slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--purple);
  flex: none;
}
.dot.teal {
  background: var(--teal);
}
.masked-sample {
  font-family: "Geeza Pro", "Noto Naskh Arabic", serif;
  font-size: 29px;
  line-height: 2.25;
  color: var(--purple);
  direction: rtl;
  overflow-wrap: normal;
  word-break: normal;
  padding: 12px 0;
}
.masked-word {
  display: inline-block;
  background: #edf0f5;
  color: transparent;
  border-radius: 6px;
  min-width: 35px;
  min-height: 30px;
  vertical-align: middle;
  margin: 0 3px;
  user-select: none;
}
.metric-grid .stat {
  padding: 16px 14px;
}
.metric-grid .stat strong {
  font-size: 24px;
}
.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 16px;
}
.methodology {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.methodology summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #63708a;
  font-size: 13px;
}
.methodology summary:before {
  content: "+";
  display: inline-block;
  margin-right: 10px;
  font-size: 18px;
}
.methodology[open] summary:before {
  content: "−";
}
.methodology p {
  margin-top: 10px;
}
.word-list {
  background: var(--paper);
  border-radius: 21px;
  padding: 0 18px;
  overflow: hidden;
}
.word-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.word-item:last-child {
  border-bottom: 0;
}
.word-item .arabic {
  font-size: 32px;
}
.word-item .grow > p {
  font-size: 13px;
  margin-top: 4px;
}
.word-status {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 7px;
}
.search {
  background: #fff;
  margin-bottom: 15px;
}
.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0 17px;
}
.filters button {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #e2e7ef;
  color: var(--muted);
  font-size: 12px;
}
.filters button.active {
  background: var(--ink);
  color: #fff;
}
.analysis-text {
  font-family: "Geeza Pro", "Noto Naskh Arabic", serif;
  font-size: 29px;
  line-height: 2.2;
  direction: rtl;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.analysis-text .known {
  color: var(--teal);
}
.analysis-text .estimated,
.analysis-text .provisional {
  text-decoration: underline dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}
.analysis-text .estimated {
  color: var(--teal);
}
.analysis-text .provisional {
  color: #71508b;
  background: #f4edf8;
}
.analysis-text .ambiguous {
  color: #81531b;
  text-decoration: underline;
  text-underline-offset: 7px;
}
.analysis-text .unknown {
  color: #596980;
  background: #edf0f5;
  border-radius: 5px;
  padding: 0 2px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 7px;
  text-decoration-thickness: 1px;
}
/* Details, settings, and media. */
.sheet {
  border: 0;
  border-radius: 27px 27px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: min(89svh, 850px);
  margin: 0 auto;
  padding: 0;
  inset: auto 0 0;
  background: #fff;
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -12px 40px #1f293a20;
}
.sheet::backdrop {
  background: #25304765;
  backdrop-filter: blur(2px);
}
#sheet-content {
  padding: 12px 23px calc(25px + env(safe-area-inset-bottom));
  overflow-wrap: anywhere;
}
.sheet-grip {
  width: 37px;
  height: 4px;
  background: #d7deea;
  border-radius: 9px;
  margin: 0 auto 17px;
}
.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 19px;
}
.sheet-title h2,
.sheet-title h3 {
  font-size: 20px;
}
#sheet-title[tabindex="-1"]:focus {
  outline: none;
}
.sheet-section {
  margin-top: 23px;
}
.sheet-section h3,
.sheet-section h4 {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #7d89a0;
  margin-bottom: 11px;
}
.sheet-section p {
  font-size: 14px;
  line-height: 1.75;
}

.reading-context {
  display: grid;
  gap: 12px;
  margin: 12px 0 16px;
}
.reading-highlight {
  border-radius: 5px;
  background: var(--teal-soft);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.reading-neighbor {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft, #f1f4f8);
}
.reading-neighbor .eyebrow {
  margin: 0;
}
.reading-context-arabic {
  text-align: right;
  font-size: 23px;
  line-height: 1.8;
  margin: 6px 0 10px;
}
.word-passage .reading-highlight {
  color: inherit;
  padding: 0 3px;
}
.word-passage-cue strong {
  color: var(--teal);
}
.sheet .arabic-large {
  font-size: 44px;
  text-align: center;
}
.sheet .arabic-small {
  font-size: 23px;
}
.sources {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.65;
}
.sources a {
  overflow-wrap: anywhere;
}
.sources p {
  color: var(--muted);
}
.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.skill-row:last-child {
  border: 0;
}
.skill-row .progress-track {
  max-width: 130px;
}
.timeline {
  padding: 0 0 0 17px;
  margin: 20px 0;
  list-style: none;
  border-left: 1px solid #d9e1ec;
}
.timeline li {
  position: relative;
  padding: 0 0 19px 4px;
  font-size: 14px;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -22px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #86aeb8;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(92px + env(safe-area-inset-bottom));
  max-width: min(440px, calc(100% - 32px));
  width: max-content;
  padding: 13px 18px;
  border-radius: 14px;
  background: #30394def;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 5px 25px #1e263b25;
  pointer-events: none;
}
.audio-dock {
  position: fixed;
  z-index: 30;
  bottom: calc(var(--bottom) + env(safe-area-inset-bottom) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 496px;
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 18px;
  padding: 9px 13px 12px;
  box-shadow: 0 8px 35px #1e293c24;
}
.audio-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  gap: 12px;
}
.audio-caption .icon-button {
  height: 44px;
  min-height: 44px;
  width: 44px;
  min-width: 44px;
}
.audio-dock audio {
  display: block;
  width: 100%;
  height: 42px;
}
.recitation-navigation:not([hidden]) {
  display: flex;
  justify-content: space-between;
}
.recitation-navigation button {
  min-height: 44px;
  padding-inline: 8px;
}
.recitation-navigation button:disabled {
  opacity: 0.5;
}
.audio-dock p {
  font-size: 11px;
  color: var(--red);
  line-height: 1.5;
  margin: 7px 5px 0;
}
.audio-dock p:empty {
  display: none;
}
body:has(.audio-dock:not([hidden])) .page {
  padding-bottom: 230px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.settings-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.settings-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--teal);
  flex: none;
}
.settings-row select {
  padding: 10px;
  max-width: 150px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
}
.danger {
  color: var(--red) !important;
  background: var(--red-soft) !important;
}
@media (max-width: 360px) {
  .appbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }
  .paper,
  .mission {
    padding-left: 17px;
    padding-right: 17px;
  }
  .exercise {
    padding-left: 17px;
    padding-right: 17px;
  }
  .translation {
    margin-left: -17px;
    margin-right: -17px;
    padding-left: 17px;
    padding-right: 17px;
    font-size: 18px;
  }
  .arabic-large {
    font-size: 42px;
  }
  .arabic {
    font-size: 32px;
  }
  .verse-text {
    font-size: 31px;
  }
  .cloze-input {
    width: 122px;
    font-size: 35px;
    height: 66px;
  }
  .coverage-value {
    font-size: 41px;
  }
  .home-stats,
  .metric-grid {
    gap: 9px;
  }
  .stat {
    padding: 17px 13px;
  }
  .primary,
  .secondary {
    padding-left: 13px;
    padding-right: 13px;
  }
  .exercise-meta {
    gap: 6px;
  }
  .sheet #sheet-content {
    padding-left: 17px;
    padding-right: 17px;
  }
  .keyboard-row {
    gap: 3px;
  }
  .keyboard-row button {
    font-size: 23px;
  }
  .welcome h1 {
    font-size: 31px;
  }
  .masked-sample,
  .analysis-text {
    font-size: 26px;
  }
}
@media (min-width: 700px) {
  body {
    background: #e8ecf2;
  }
  .app {
    background: var(--bg);
    box-shadow: 0 0 50px #2e3b5010;
    border-left: 1px solid #e0e5ed;
    border-right: 1px solid #e0e5ed;
  }
  .appbar {
    padding-top: 24px;
    padding-bottom: 18px;
  }
  .page {
    padding-top: 18px;
  }
  .sheet {
    bottom: 14px;
    border-radius: 26px;
    max-height: 86svh;
  }
  .audio-dock {
    bottom: calc(var(--bottom) + 12px);
  }
  .welcome {
    min-height: calc(100svh - 125px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
/* Match the implemented screen structure. */
.onboarding > * + * {
  margin-top: 18px;
}
.welcome .welcome-mark {
  margin-top: 0;
  margin-bottom: 12px;
}
.welcome .option {
  justify-content: space-between;
  flex: none;
  min-height: 74px;
}
.welcome .option span {
  flex: 1;
}
.welcome .option small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.welcome .welcome-footer {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: auto;
  padding-top: 25px;
  display: block;
}
.choice-times {
  margin-top: 16px;
}
.choice-times button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.choice-times small {
  font-size: 12px;
}
.home-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.home-stats .stat {
  padding: 18px 13px;
}
.home-stats .stat strong {
  font-size: 25px;
}
.home-stats .stat span {
  font-size: 11px;
  line-height: 1.45;
}
.metric-grid > .paper {
  padding: 19px 17px;
}
.metric-grid > .paper strong {
  display: block;
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}
.metric-grid > .paper span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 7px;
}
.stage-mark {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  line-height: 1.4;
}
.stage-mark:before {
  content: "";
  display: block;
  flex: none;
  width: 19px;
  height: 5px;
  border-radius: 5px;
  background: #8ebdc4;
}
.stage-mark.new {
  background: transparent;
  color: #a56a36;
}
.stage-mark.new:before {
  background: #f5a45b;
}
.exercise-meta > span:last-child:not(:first-child) {
  margin-left: auto;
}
.exercise .grammar-chip {
  width: 100%;
  text-align: left;
}
.intro-step {
  background: #f5f7fa;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  flex-wrap: wrap;
}
.intro-step small {
  font-size: 14px;
  color: var(--muted);
}
.intro-step p {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.intro-step > .icon {
  margin-left: auto;
}
p.study-bottom {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.reader-head {
  display: block;
}
.reader-head h1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 11px;
}
.reader-head .reader-toolbar {
  margin-top: 20px;
}
.reader-toolbar .secondary {
  flex: 0;
  min-width: 48px;
  padding-left: 12px;
  padding-right: 12px;
}
.reader-head > .text-button {
  margin-top: 8px;
}
.word-item {
  width: 100%;
  background: transparent;
  justify-content: space-between;
  text-align: left;
  align-items: center;
}
.word-item > span:first-child {
  flex: 1;
  min-width: 0;
}
.word-item strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.word-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 6px;
}
.word-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex: none;
  max-width: 46%;
}
.word-status .arabic {
  overflow-wrap: anywhere;
}
.word-status .icon {
  width: 15px;
  height: 15px;
}
.chart {
  display: block;
  height: auto;
  overflow: visible;
}
.chart text {
  font-family: inherit;
  font-size: 17px;
  fill: #748098;
}
.chart circle {
  stroke: #fff;
  stroke-width: 2;
}
.text-analyzer {
  display: block;
  width: 100%;
  font-family: "Geeza Pro", "Noto Naskh Arabic", serif;
  font-size: 25px;
  line-height: 1.9;
  min-height: 160px;
  margin: 19px 0 16px;
}
.keyboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-top: 0;
  padding: 5px 0;
}
.keyboard-row {
  display: contents;
}
.keyboard-row button {
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  flex: none;
}
.keyboard-row button.key-wide {
  grid-column: span 3;
  min-height: 44px;
}
.key-open .study-page .answer-area {
  margin-top: 12px;
  margin-bottom: 12px;
}
.key-open .study-page .study-actions {
  gap: 4px;
}
.key-open .study-page .study-actions > .text-button {
  min-height: 44px;
}
.key-open .exercise-text {
  font-size: 33px;
}
.key-open .exercise-meta {
  font-size: 11px;
}
.key-open .study-page > .session-line {
  padding-bottom: 0;
  margin-bottom: 0;
}
.key-open .cloze-input {
  height: 59px;
  font-size: 35px;
}
.key-open .exercise .translation {
  font-size: 17px;
}
.key-open .study-bottom {
  margin-top: 10px;
  padding-top: 0;
}
@media (max-width: 360px) {
  .home-stats .stat {
    padding: 16px 10px;
  }
  .home-stats .stat strong {
    font-size: 23px;
  }
  .home-stats .stat span {
    font-size: 11px;
  }
  .keyboard {
    gap: 4px;
  }
  .keyboard-row button {
    min-width: 44px;
  }
  .metric-grid > .paper {
    padding: 17px 13px;
  }
  .metric-grid > .paper strong {
    font-size: 25px;
  }
  .welcome .option {
    padding-left: 14px;
    padding-right: 14px;
  }
  .welcome .welcome-footer {
    padding-top: 18px;
  }
  .chart text {
    font-size: 17px;
  }
}
/* Compact teaching tiles and a focused keyboard state. */
.intro-steps {
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
}
.intro-step {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 12px 7px;
  text-align: center;
}
.intro-step p {
  flex-basis: auto;
  font-size: 11px;
  line-height: 1.55;
}
.intro-step .arabic {
  min-width: 0;
  width: 100%;
  font-size: 32px;
}
.intro-step > .icon {
  margin-left: 0;
  width: 17px;
  height: 17px;
}
.exercise > p.arabic-large {
  text-align: center;
}
.keyboard-row button {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
}
.key-open .bottom-nav {
  display: none;
}
.key-open .study-page {
  padding-bottom: 20px;
  min-height: calc(100svh - 56px);
}
.key-open .study-page > .session-line {
  display: none;
}
.key-open .study-actions [data-action="help"],
.key-open .study-actions [data-action="reveal"],
.key-open .study-page > [data-action="end-session"],
.key-open p.study-bottom {
  display: none;
}
.key-open .study-actions {
  margin-top: 10px;
}
.key-open .study-actions [data-action="keyboard"] {
  background: transparent;
  min-height: 44px;
}
.key-open .exercise {
  padding-top: 15px;
}
.key-open .exercise-meta {
  min-height: 17px;
}
.key-open .exercise-prompt {
  margin-top: 10px;
  font-size: 13px;
}
.key-open .exercise-text {
  margin-top: 8px;
  margin-bottom: 8px;
}
/* Focused lessons: one concept, one answer surface. */
.teach-card {
  padding-bottom: 24px;
}
.teaching-form {
  font-size: 72px;
  line-height: 1.7;
  text-align: center;
  margin: 12px 0 4px;
}
.teaching-title {
  text-align: center;
  font-size: 23px;
}
.teaching-in-context {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.45;
}
.teaching-in-context strong {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.teaching-summary {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  line-height: 1.65;
  margin-top: 18px;
}
.teach-card .transliteration {
  margin-top: 5px;
}
.letter-forms {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}
.forms-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}
.forms-grid > div {
  text-align: center;
  background: var(--soft);
  border-radius: 12px;
  padding: 8px 2px;
}
.forms-grid .arabic {
  display: block;
  font-size: 32px;
}
.forms-grid small {
  display: block;
  font-size: 10px;
  margin-top: 6px;
}
.selection-card {
  padding-bottom: 22px;
}
.selection-card .exercise-prompt {
  font-size: 19px;
  font-weight: 550;
  margin: 26px 0 22px;
}
.selection-card .choices {
  margin: 0;
  gap: 10px;
}
.selection-card .option {
  min-height: 56px;
}
.symbol-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.symbol-choices .option {
  justify-content: center;
  text-align: center;
  min-height: 82px;
  padding: 9px;
}
.symbol-choices .arabic {
  font-size: 39px;
  line-height: 1.4;
}
.selection-card .exercise-text {
  margin-top: 10px;
  margin-bottom: 18px;
}
.study-page > .answer-area:empty {
  display: none;
}
.diagnostic-feedback {
  margin-top: 20px;
}
.diagnostic-next {
  width: 100%;
  margin-top: 15px;
}
.placement-breakdown {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}
.placement-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}
.study-actions .row {
  margin-top: 4px;
}
.teach-card .intro-steps {
  margin-top: 20px;
}
.teach-card .listen-button {
  margin-top: 22px;
}
.selection-card form:empty {
  display: none;
}
.lesson-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.update-note {
  border-radius: 14px;
  background: var(--teal-soft);
  padding: 14px 16px;
  color: #456b73;
  font-size: 13px;
  line-height: 1.6;
}
.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-links .secondary {
  font-size: 13px;
  padding: 12px;
}
.chapter-list {
  background: white;
  border-radius: 20px;
  overflow: hidden;
}
.chapter-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 15px;
  background: white;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.chapter-item:last-child {
  border: 0;
}
.chapter-number {
  font-size: 12px;
  color: var(--muted);
  width: 27px;
  flex: none;
  text-align: center;
}
.chapter-item strong {
  font-size: 15px;
  display: block;
}
.chapter-item small {
  font-size: 11px;
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.chapter-item .arabic {
  font-size: 25px;
  max-width: 30%;
  line-height: 1.5;
}
.reader-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 13px;
}
.reader-toolbar > .secondary {
  flex: 1;
  min-width: 140px;
}
.reader-sub {
  font-size: 13px;
}
.basmala {
  font-size: 23px;
  text-align: center;
  color: var(--muted);
  margin: 16px 0;
}
.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.letter-tile {
  background: white;
  border-radius: 14px;
  min-height: 96px;
  padding: 10px 3px;
}
.letter-tile .arabic {
  display: block;
  font-size: 36px;
  color: var(--teal);
}
.letter-tile small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.letter-tile.known {
  box-shadow: inset 0 -3px #64b7a2;
}
.word-gloss-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 8px;
}
.verse-translation,
.tafsir-content {
  white-space: pre-line;
  line-height: 1.8;
  font-size: 15px;
}
.reader-toolbar {
  flex-wrap: wrap;
}
.reader-head h1 {
  font-size: 27px;
}
.reader-head h1 .arabic {
  font-size: 31px;
}

/* En escritorio la navegación ocupa una columna propia y el contenido
   aprovecha el espacio; las reglas móviles permanecen por debajo de 900 px. */
@media (min-width: 900px) {
  .app {
    max-width: none;
    min-height: 100svh;
    padding-left: 0;
    border: 0;
    box-shadow: none;
  }
  body:has(.bottom-nav) .app {
    padding-left: 206px;
  }
  .appbar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 40px 10px;
  }
  .page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 25px 40px 80px;
  }
  .study-page {
    max-width: 800px;
  }
  .onboarding {
    max-width: 620px;
    margin: 0 auto;
  }
  .bottom-nav {
    left: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 206px;
    max-width: none;
    flex-direction: column;
    justify-content: flex-start;
    gap: 5px;
    padding: 27px 14px;
    border-top: 0;
    border-right: 1px solid #e4e8f0;
    box-shadow: none;
    background: #fff;
  }
  .bottom-nav::before {
    content: "algernoun";
    padding: 4px 13px 28px;
    color: var(--ink);
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -0.5px;
  }
  .bottom-nav button {
    flex: none;
    width: 100%;
    min-height: 50px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 13px;
    padding: 10px 13px;
    font-size: 14px;
  }
  .page[data-page="home"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: start;
    gap: 18px;
  }
  .page[data-page="home"] > * {
    margin-top: 0;
    min-width: 0;
  }
  .page[data-page="home"] > .eyebrow,
  .page[data-page="home"] > h1,
  .page[data-page="home"] > .update-note,
  .page[data-page="home"] > .quick-links,
  .page[data-page="home"] > .note {
    grid-column: 1 / -1;
  }
  .page[data-page="home"] > .mission {
    grid-column: 1;
    grid-row: span 3;
  }
  .page[data-page="home"] > .home-stats,
  .page[data-page="home"] > .home-row,
  .page[data-page="home"] > .paper:not(.mission) {
    grid-column: 2;
  }
  .page[data-page="reader"] .chapter-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page[data-page="reader"] .chapter-item:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .page[data-page="progress"] .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .audio-dock {
    bottom: 18px;
  }
  body:has(.bottom-nav) .audio-dock {
    left: calc(50% + 103px);
  }
}
.unlock-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid #c5e7dc;
  border-radius: 16px;
  background: #edf8f3;
  color: #285c50;
}
.unlock-notice strong {
  font-size: 14px;
}
.unlock-notice p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}
.unlock-notice .secondary {
  flex: none;
  padding: 10px 13px;
}
@media (min-width: 900px) {
  body:has(.bottom-nav) .appbar .brand {
    visibility: hidden;
  }
}
.recommend-card {
  padding: 22px;
}
.recommend-card .row {
  align-items: flex-start;
}
.recommend-card h3 {
  margin-top: 7px;
}
.recommend-card > .body-small {
  margin-top: 10px;
}
.recommend-list {
  margin-top: 12px;
}
.recommend-plan {
  margin-top: 12px;
}
.recommend-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: transparent;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.recommend-item > span:first-child {
  flex: 1;
  min-width: 0;
}
.recommend-item strong,
.recommend-item small {
  display: block;
}
.recommend-item strong {
  font-size: 14px;
}
.recommend-item small {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.recommend-item .arabic {
  color: var(--teal);
  font-size: 23px;
}
.recommend-card > .note {
  margin-top: 2px;
}
@media (min-width: 900px) {
  .page[data-page="home"] > .paper.recommend-card {
    grid-column: 1 / -1;
  }
  .recommend-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
}
/* Mantén las lecturas ya disponibles cerca del objetivo en pantallas pequeñas. */
@media (max-width: 899px) {
  .page[data-page="home"] {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .page[data-page="home"] > * {
    margin-top: 0;
  }
  .page[data-page="home"] > .eyebrow {
    order: 0;
  }
  .page[data-page="home"] > h1 {
    order: 1;
  }
  .page[data-page="home"] > .update-note {
    order: 2;
  }
  .page[data-page="home"] > .mission {
    order: 3;
  }
  .page[data-page="home"] > .paper.recommend-card {
    order: 4;
  }
  .page[data-page="home"] > .home-stats {
    order: 5;
  }
  .page[data-page="home"] > .home-row {
    order: 6;
  }
  .page[data-page="home"] > .paper:not(.mission):not(.recommend-card) {
    order: 7;
  }
  .page[data-page="home"] > .quick-links {
    order: 8;
  }
  .page[data-page="home"] > .note {
    order: 9;
  }
}
