/*
 * آيات — final layer, loaded after the other stylesheets.
 * System: Elaya (landing-page-design part B, redesign-existing-projects audit), Arabic first.
 * Written for children and older readers: every control is at least 48px, says what it does
 * in words under or beside its icon, and the one main action of each screen is the only
 * filled button. Flat surfaces, one accent, one curve. Values come from tokens.css.
 */

/* ==== Text styles (B1), one definition each ================================== */
.heading-1 { font-size: var(--text-4xl); line-height: 1.2; font-weight: var(--weight-semibold); }
.heading-2 { font-size: var(--text-3xl); line-height: 1.25; font-weight: var(--weight-semibold); }
.heading-3 { font-size: var(--text-2xl); line-height: var(--leading-2xl); font-weight: var(--weight-semibold); }
.heading-4 { font-size: var(--text-30); line-height: var(--leading-30); font-weight: var(--weight-semibold); }
.heading-5 { font-size: var(--text-xl); line-height: var(--leading-xl); font-weight: var(--weight-semibold); }
.heading-6 { font-size: var(--text-lg); line-height: var(--leading-lg); font-weight: var(--weight-semibold); }
.title-2 { font-size: var(--text-md); line-height: var(--leading-md); font-weight: var(--weight-medium); }
.title-3 { font-size: var(--text-base); line-height: var(--leading-base); font-weight: var(--weight-medium); }
.body-3 { font-size: var(--text-base); font-weight: var(--weight-regular); }
.caption-2 { font-size: var(--text-sm); line-height: var(--leading-sm); font-weight: var(--weight-regular); }
.caption-3 { font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: var(--weight-semibold); }

/* Arabic display type is taller than Latin: headings keep room for dots and marks. */
.resume-card__title,
.page-head__title {
  font-size: var(--text-3xl);
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
@media (min-width: 56rem) {
  .resume-card__title,
  .page-head__title {
    font-size: var(--text-4xl);
  }
}

/* Hero heading: the one gradient on the site, on the text only, left to right. */
.resume-card__title,
.page-head__title,
.not-found__title {
  max-inline-size: var(--measure-hero);
  background: linear-gradient(90deg, var(--hero-from), var(--hero-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (forced-colors: active) {
  .resume-card__title,
  .page-head__title,
  .not-found__title {
    background: none;
    color: CanvasText;
  }
}
.resume-card__lead,
.page-head__lead {
  max-inline-size: var(--measure-hero);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.eyebrow,
.settings__title,
.shortcuts__title {
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
}

/* ==== Controls: hover, press, focus (B9) ====================================== */
.btn,
.tool,
.menu__item,
.option,
.setting-row,
.surah-link,
.juz,
.shortcut,
.pager__num,
.faq summary,
.dl__item {
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-move) var(--ease-out);
}
.btn:active,
.tool:active,
.menu__item:active,
.setting-row:active,
.surah-link:active,
.juz:active,
.shortcut:active,
.pager__num:active {
  transform: scale(0.98);
}
.btn:focus-visible,
.tool:focus-visible,
.menu__item:focus-visible,
.setting-row:focus-visible,
.surah-link:focus-visible,
.juz:focus-visible,
.shortcut:focus-visible,
.pager__num:focus-visible,
.site-nav__link:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 2px;
}
.btn--secondary {
  border-color: transparent;
}
.input {
  font-size: var(--text-md);
  border-color: var(--color-border-strong);
  background: var(--color-surface-raised);
}
.input:hover {
  background: var(--color-surface-raised);
  border-color: var(--color-text-muted);
}
.dialog .btn--secondary,
.dialog .setting-row {
  border-color: transparent;
}
.chip {
  border-radius: var(--radius-xs);
}

/* Settings rows: a tone, no outline; the value sits at the far end. */
.setting-row {
  min-block-size: 3.5rem;
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-base);
}
.setting-row:hover {
  background: var(--color-surface-2);
}
.setting-row__value {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.setting-row[aria-pressed="true"] .setting-row__value {
  color: var(--color-accent);
  font-weight: var(--weight-semibold);
}
.setting-row .icon {
  inline-size: 1.5rem;
  block-size: 1.5rem;
  color: var(--color-accent);
}
.setting-row__main {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

/* Cards in dialogs, the home page and the juz list: background tone only. */
.menu--grid .menu__item,
.hifz-card,
.juz,
.progress,
.alert {
  border: 0;
}
.menu__item {
  min-block-size: 3.5rem;
  font-size: var(--text-base);
}
.menu__item .icon {
  inline-size: 1.5rem;
  block-size: 1.5rem;
}

/* ==== Page ground and shells ================================================== */
.panel {
  margin-block-start: var(--space-2);
}
@media (max-width: 40rem) {
  .glass--slab,
  .panel,
  .index {
    border-radius: var(--radius-lg);
  }
}

/* Scroll reveal (B7): rise 32px and fade in once, driven by IntersectionObserver in core.js. */
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out);
  }
  html.js-reveal [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

/* ==== Top bar: floating, translucent, sized to content ======================== */
.topbar__pill {
  min-block-size: var(--topbar-height);
}
.site-nav__link {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}
.site-nav__link[aria-current="page"] {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}
@media (max-width: 47.99rem) {
  .site-nav__link {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
  }
  .site-nav__link[aria-current="page"] {
    color: var(--color-accent);
  }
}
/* Header actions say what they do on wide screens. */
.topbar__actions .btn--icon {
  border-radius: var(--radius-pill);
}

/* ==== Home ==================================================================== */
.home {
  gap: var(--space-6);
}
.lead {
  padding: var(--space-5) var(--space-4);
  gap: var(--space-6);
}
.resume-card {
  gap: var(--space-4);
}
.resume-card__actions .btn,
.get-app__btn,
.empty__actions .btn:first-child {
  min-block-size: 3.5rem;
  padding-inline: var(--space-5);
  font-size: var(--text-md);
  line-height: var(--leading-md);
}
.progress {
  border-radius: var(--radius-md);
}
.daily {
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.daily__text {
  font-size: var(--quran-step-2);
  line-height: 2.1;
}
@media (min-width: 56rem) {
  .daily__text {
    font-size: var(--quran-step-3);
  }
}
.daily__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}
.daily__ref {
  color: var(--color-accent);
}
.daily__actions {
  display: grid;
  inline-size: 100%;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--space-2);
}
.daily__actions .btn {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-block-size: 4.5rem;
  padding: var(--space-2) var(--space-1);
  border-radius: var(--radius-md);
  background: var(--shell);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-semibold);
}
.daily__actions .btn:hover {
  background: var(--color-surface-2);
}
.daily__actions .btn[hidden] {
  display: none;
}
.daily__actions .btn .icon {
  inline-size: 1.5rem;
  block-size: 1.5rem;
  color: var(--color-accent);
}
@media (min-width: 56rem) {
  /* Asymmetric split: the heading and main action lead, the daily ayah sits beside it. */
  .lead {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: stretch;
    gap: var(--space-7);
    padding: var(--space-7);
  }
  .resume-card {
    padding-inline-start: 0;
    border: 0;
    align-content: center;
  }
  .daily {
    order: 2;
    align-content: center;
    padding: var(--space-6);
  }
  .resume-card__actions .btn {
    flex-basis: auto;
  }
}

.shortcuts__list {
  grid-auto-columns: minmax(9rem, 1fr);
}
.shortcut {
  gap: var(--space-1);
  min-block-size: 5rem;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
}
.shortcut__name {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
}
.shortcut.glass::before {
  box-shadow: none;
}
@media (hover: hover) {
  .shortcut:hover::before {
    background: var(--color-surface-2);
  }
}

/* Tagline reveal (B11): each word turns from a muted tone to full text as it crosses the line. */
.tagline {
  padding-block: var(--space-8);
  padding-inline: var(--space-2);
}
.tagline__text {
  max-inline-size: var(--measure-hero);
  margin: 0;
  font-size: var(--text-30);
  line-height: 1.6;
  font-weight: var(--weight-semibold);
  text-wrap: balance;
}
@media (min-width: 48rem) {
  .tagline {
    padding-block: var(--space-10);
  }
  .tagline__text {
    font-size: var(--text-2xl);
  }
}
.tagline__word {
  color: color-mix(in srgb, var(--color-text) 30%, transparent);
  transition: color var(--duration-move) var(--ease-out);
}
.tagline__word.is-lit {
  color: var(--color-text);
}
@media (prefers-reduced-motion: reduce) {
  .tagline__word {
    color: var(--color-text);
    transition: none;
  }
}

.index__title {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
}
.surah-link {
  min-block-size: 4rem;
}
.surah-link__name {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
  font-weight: var(--weight-semibold);
}
.surah-link__num::before,
.surah-link__num::after {
  border-color: var(--color-accent);
  opacity: 0.55;
}
.surah-link__meta,
.index__status {
  font-size: var(--text-sm);
}
.tabs__tab {
  min-block-size: 2.75rem;
}

/* ==== Reader bar: every button has a word under its icon ====================== */
.reader-bar__inner {
  max-inline-size: calc(var(--measure-reading) + 2 * var(--space-4));
  padding-inline: var(--space-2);
  border-radius: var(--radius-pill);
}
.reader-bar .btn--ghost,
.reader-bar .btn--icon {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  inline-size: auto;
  min-inline-size: 3.5rem;
  min-block-size: 3.5rem;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
}
.reader-bar .btn .icon {
  inline-size: 1.5rem;
  block-size: 1.5rem;
}
.btn__cap {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.reader-bar .btn__label {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  font-weight: var(--weight-semibold);
}
@media (max-width: 29.99rem) {
  .reader-bar .btn__label {
    position: static;
    inline-size: auto;
    block-size: auto;
    overflow: visible;
    clip-path: none;
  }
  .reader-bar .btn--ghost {
    inline-size: auto;
    padding: var(--space-1) var(--space-1);
  }
  .reader-bar .btn--ghost,
  .reader-bar .btn--icon {
    min-inline-size: 3.25rem;
  }
}
.reader-bar__name {
  font-size: var(--text-md);
  line-height: var(--leading-md);
}
.reader-bar__progress {
  inset-inline: var(--space-6);
}

/* ==== Reader: head, tools, mushaf page ======================================== */
.surah {
  padding-block-start: var(--space-5);
}
.surah-plate {
  padding: var(--space-1) var(--space-5);
  border: 1px solid var(--frame);
  border-radius: var(--radius-pill);
  background: transparent;
}
.surah-plate::before,
.surah-plate::after {
  border-color: var(--color-accent);
}
.surah-head__title {
  font-size: var(--text-2xl);
  line-height: 1.6;
}
.surah-head__meta {
  font-size: var(--text-base);
}

/* Big play button first, then three labeled tiles, then the ayah jump field. */
.surah-tools {
  display: grid;
  justify-items: stretch;
  gap: var(--space-3);
  inline-size: 100%;
  max-inline-size: 30rem;
  margin-inline: auto;
}
.surah-tools .tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  inline-size: 100%;
}
.tool {
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}
.tool[hidden] {
  display: none;
}
.tool:hover {
  background: var(--color-surface-2);
}
.surah-tools .tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-block-size: 5rem;
  padding: var(--space-2) var(--space-1);
  border-radius: var(--radius-md);
  text-align: center;
}
.surah-tools .tool .icon {
  inline-size: 1.75rem;
  block-size: 1.75rem;
  color: var(--color-accent);
}
.tool__text {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}
.surah-tools .tool--lead {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: var(--space-3);
  min-block-size: 4rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}
.surah-tools .tool--lead:hover {
  background: var(--color-accent-hover);
}
.surah-tools .tool--lead .icon,
.surah-tools .tool--lead .tool__text {
  color: var(--color-on-accent);
}
.surah-tools .tool--lead .tool__text {
  font-size: var(--text-md);
  line-height: var(--leading-md);
}
.surah-tools .tool[aria-pressed="true"] {
  background: var(--color-accent-soft);
}
.surah-tools .jump {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-1);
  padding-inline-start: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}
.surah-tools .jump:focus-within {
  border-color: var(--color-accent);
}
.jump__label {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.surah-tools .jump .input {
  inline-size: 100%;
  min-block-size: var(--tap);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  font-size: var(--text-md);
  text-align: center;
}
.surah-tools .jump__go {
  flex-direction: row;
  min-block-size: var(--tap);
  padding-inline: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--shell);
}
html[data-theme="light"] .surah-tools .jump__go {
  background: var(--color-surface-raised);
}
.surah-tools .jump__go .icon {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}
html[dir="ltr"] .jump__go .icon {
  transform: scaleX(-1);
}
.surah-tools .field__error:empty {
  display: none;
}
.surah-tools .field__error {
  text-align: center;
}

/* The verses sit in a framed page, like the ruled border of a printed mushaf. */
.mushaf {
  margin-block: var(--space-4) var(--space-5);
  padding: var(--space-4) var(--space-3);
  border: 1px solid var(--frame);
  border-radius: var(--radius-md);
}
@media (min-width: 40rem) {
  .mushaf {
    padding: var(--space-5) var(--space-6);
  }
}
.mushaf ::selection {
  background: color-mix(in srgb, var(--color-accent) 38%, transparent);
}
.word {
  background: transparent;
}

/* Pager: previous and next, then every page as a numbered button. */
.pager {
  padding-block-start: var(--space-4);
}
.pager > .btn {
  min-block-size: 3.5rem;
  font-size: var(--text-md);
}
.pager__label {
  font-size: var(--text-base);
}
.pager__hint {
  grid-column: 1 / -1;
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
}
.pager__pages {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-1) var(--space-2);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.pager__pages:empty,
.pager:has(.pager__pages:empty) .pager__hint {
  display: none;
}
@media (min-width: 40rem) {
  .pager__pages {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
  }
}
.pager__num {
  flex: 0 0 auto;
  min-inline-size: var(--tap);
  min-block-size: var(--tap);
  padding-inline: var(--space-2);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pager__num:hover {
  background: var(--color-surface-2);
  color: var(--color-accent);
}
.pager__num[aria-current="page"] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
@media (max-width: 39.99rem) {
  .pager {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pager__label {
    grid-column: 1 / -1;
    order: -1;
    margin: 0;
  }
  .pager > .btn {
    justify-content: center;
  }
}

/* ==== Settings sheet ========================================================== */
.settings__title {
  margin-block: var(--space-6) var(--space-2);
}
.settings__title:first-child {
  margin-block-start: 0;
}
.settings__rows {
  display: grid;
  gap: var(--space-2);
}
.settings__rows .setting-row--next {
  margin-block-start: 0;
}
.settings__note {
  margin-block-end: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
/* The translation block: its own heading in two languages so foreign readers find it. */
.settings__title--trans {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.settings__title--trans .icon {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  color: var(--color-accent);
}

/* ==== Translation switch ====================================================== */
/* While the translation is on, every ayah is its own block with the meaning under it,
   whatever the reading layout; switching it off returns to the reader's own layout. */
html[data-trans="on"] .mushaf {
  text-align: start;
}
html[data-trans="on"] .mushaf .ayah {
  display: block;
  padding: var(--space-2) var(--space-2) var(--space-1);
  border-block-end: 1px solid var(--color-border);
  cursor: pointer;
}
html[data-trans="on"] .mushaf .ayah-trans {
  display: block;
  margin-block: var(--space-1) var(--space-2);
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.75;
  text-align: start;
  cursor: pointer;
}
html[data-trans="off"] .mushaf .ayah-trans {
  display: none;
}
html[data-layout="list"] .mushaf .ayah {
  cursor: pointer;
}
@media (hover: hover) {
  .mushaf .ayah:hover {
    background: var(--color-surface);
  }
}
::selection {
  background: var(--color-selection);
}

/* ==== Motion: base curve, 500ms movement, 300ms colour ======================== */
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] {
    animation: ayat-rise var(--duration-move) var(--ease-out) backwards;
  }
  .dialog[open]::backdrop {
    animation: ayat-fade var(--duration-base) var(--ease-out) backwards;
  }
  .surah:not([hidden]) .surah-plate,
  .surah:not([hidden]) .tools,
  .surah:not([hidden]) .mushaf {
    animation: ayat-rise var(--duration-reveal) var(--ease-out) backwards;
  }
  .surah:not([hidden]) .tools { animation-delay: 60ms; }
  .surah:not([hidden]) .mushaf { animation-delay: 120ms; }
}
@media (prefers-reduced-motion: reduce) {
  .dialog[open],
  .surah:not([hidden]) .mushaf {
    animation: ayat-fade var(--duration-base) var(--ease-out) backwards;
  }
}
@keyframes ayat-rise {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: none; }
}
@keyframes ayat-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==== Get the Android app (hidden inside the app itself) ====================== */
html.in-app .get-app,
html.in-app .app-banner {
  display: none !important;
}
.app-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
}
.app-banner:hover {
  color: var(--color-text);
}
.app-banner__icon,
.get-app__icon {
  border-radius: var(--radius-md);
}
.app-banner__text {
  display: grid;
}
.app-banner__title {
  font-weight: var(--weight-semibold);
}
.app-banner__note {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.app-banner__btn {
  pointer-events: none;
  background: var(--color-surface-2);
}
@media (max-width: 26rem) {
  .app-banner__btn {
    padding-inline: var(--space-3);
    font-size: var(--text-sm);
  }
}

/* ==== About and other short pages ============================================== */
.about {
  display: grid;
  gap: var(--space-7);
  padding-block-end: var(--space-6);
}
.about-hero {
  text-align: start;
}
.about-hero.panel {
  padding: var(--space-6) var(--space-4);
}
@media (min-width: 48rem) {
  .about-hero.panel {
    padding: var(--space-7);
  }
}
.about-title {
  margin: 0 0 var(--space-4);
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
}
/* Features: a two column list of icon rows instead of a grid of equal cards. */
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0 var(--space-4);
  padding: var(--space-3) 0;
  border-radius: 0;
}
.feature.glass::before {
  background: transparent;
}
.feature .icon {
  grid-row: 1 / span 2;
  inline-size: 3rem;
  block-size: 3rem;
  padding: var(--space-3);
  margin: 0;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.feature__name {
  font-size: var(--text-md);
  line-height: var(--leading-md);
  font-weight: var(--weight-semibold);
}
.feature__note {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: var(--leading-base);
}
.get-app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
}
.get-app p {
  margin: 0;
  color: var(--color-text-muted);
}
.get-app__text .about-title {
  margin-block-end: var(--space-1);
}
.get-app__btn {
  grid-column: 1 / -1;
  justify-content: center;
}
@media (min-width: 40rem) {
  .get-app {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: var(--space-6);
  }
  .get-app__btn {
    grid-column: auto;
  }
}

/* Questions: every answer is open and readable at once, no chevrons to find. */
.qa {
  display: grid;
  gap: var(--space-5);
  margin: 0;
}
@media (min-width: 48rem) {
  .qa {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) var(--space-7);
  }
}
.qa__item {
  display: grid;
  gap: var(--space-1);
  align-content: start;
}
.qa__q {
  font-size: var(--text-md);
  line-height: var(--leading-md);
  font-weight: var(--weight-semibold);
}
.qa__a {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* Folding sections that stay (the long surah list on the Downloads page). */
.faq {
  border-radius: var(--radius-lg);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-block-size: 3.5rem;
  padding: var(--space-2) var(--space-4);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  inline-size: 0.625rem;
  block-size: 0.625rem;
  border-bottom: 2px solid var(--color-accent); /* physical on purpose: a down chevron in both directions */
  border-right: 2px solid var(--color-accent);
  transform: translateY(-25%) rotate(45deg);
  transition: transform var(--duration-move) var(--ease-out);
}
.faq[open] summary::after {
  transform: translateY(25%) rotate(225deg);
}
.faq summary:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 2px;
  border-radius: var(--radius-lg);
}
.faq p {
  margin: 0;
  padding: 0 var(--space-4) var(--space-4);
  color: var(--color-text-muted);
}
.about-credits {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  text-align: start;
}

/* 404 */
.not-found {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  padding: var(--space-7) var(--space-4);
}
.not-found__code {
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.not-found__title {
  font-size: var(--text-3xl);
  line-height: 1.35;
}
@media (min-width: 48rem) {
  .not-found {
    padding: var(--space-8);
  }
}

/* A Latin word beside an Arabic heading, for readers who do not read Arabic; hidden once
   the interface is in their language. */
html:not([lang="ar"]) .lang-hint {
  display: none;
}
.lang-hint {
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}
@media (max-width: 23.99rem) {
  .reader-bar .is-wide-only {
    display: none;
  }
}

/* Latin surah names are long: keep the bar title on one line and the plate calmer. */
.reader-bar__name {
  overflow: hidden;
  max-inline-size: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[dir="ltr"] .surah-head__title {
  font-size: var(--text-30);
  line-height: var(--leading-30);
  padding-block: var(--space-2);
}
html[dir="ltr"] .surah-plate {
  border-radius: var(--radius-xl);
}
