/* Memorisation page: the parts only this page uses. Colours are the site's tokens; --c is Dhuhr. */

.mm-noscript { margin-top: 14px; font-size: 14px; color: var(--muted); }
.mm-credit { margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.mm-demo-head h3 { font-size: clamp(22px, 2.2vw, 26px); line-height: 1.15; margin-top: 6px; }
.end { color: var(--brass); }

/* ── How it works: the app's four steps ── */
.mm-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.mm-how li { padding: 30px 28px 32px 0; }
.mm-how li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.mm-how .n { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--c); font-family: var(--display); font-size: 18px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); }
.mm-how h3 { font-size: 23px; line-height: 1.15; margin-top: 22px; }
.mm-how p { margin-top: 10px; font-size: 16px; color: var(--muted); }
.mm-start { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 30px; }
.mm-start > span:last-child { font-size: 16px; color: var(--muted); }
.mm-start b { color: var(--ink); font-weight: 500; white-space: nowrap; }
@media (max-width: 920px) {
  .mm-how { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 0; }
  .mm-how li, .mm-how li + li { padding: 26px 0 28px; border-left: 0; border-bottom: 1px solid var(--line); }
  .mm-how li:nth-child(odd) { padding-right: 24px; }
  .mm-how li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .mm-how { grid-template-columns: minmax(0, 1fr); }
  .mm-how li:nth-child(n) { padding: 22px 0 24px; border-left: 0; }
  .mm-how li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 18px; }
  .mm-how .n { grid-row: span 2; }
  .mm-how h3 { margin-top: 8px; }
}

/* ── Memorise mode: the try-it card ── */
.mm-mode { align-items: start; }
@media (min-width: 921px) and (min-height: 760px) { .mm-mode > .text { position: sticky; top: 100px; } }
.mm-demo { padding: 0; overflow: hidden; }
.mm-surah { display: grid; justify-items: center; gap: 2px; background: var(--deep); color: var(--on-deep); padding: 18px 20px 18px; text-align: center; }
.mm-surah .ar { font-size: 30px; line-height: 1.7; }
.mm-surah b { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: 0.08em; }
.mm-surah span:last-child { font-size: 13px; opacity: 0.8; }
.mm-body { padding: 20px 24px 22px; }
.mm-hide { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
.mm-hint { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.mm-verses { list-style: none; margin: 14px 0 0; padding: 0; }
.mm-verses > li { display: grid; gap: 6px; padding: 12px 0 14px; border-top: 1px solid var(--line); }
.mv-ar { font-size: 27px; line-height: 2.05; text-align: right; color: var(--ink); }
.mv-meta { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
/* Muted rather than the app's brass: at 13px, brass on the sheet is under 4.5:1. */
.mv-n { font-family: var(--display); font-size: 13px; color: var(--muted); padding-top: 2px; }
.mv-en { font-size: 15px; line-height: 1.5; color: var(--muted); }
/* Hidden verse: the first word, and a button for the rest */
.mv-cue { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 14px; direction: rtl; }
.mv-cue .mv-ar { direction: rtl; }
.mv-peek, .mv-link, .mv-btn { font: 500 14px var(--body); color: var(--muted); background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; direction: ltr; }
.mv-peek:hover, .mv-link:hover, .mv-btn:hover { border-color: var(--gold); color: var(--ink); }
.mv-link { justify-self: end; color: var(--brand); }
/* Hidden word: kept at its own width, like the app, with nothing to read until it is chosen. The glyphs are
   hidden with visibility, not a clear colour, so forced colours, find-in-page and copying can't show them.
   The muted edge gives each box 3:1 against the sheet. */
.mv-word { font: inherit; color: inherit; background: var(--line); border: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--muted); padding: 0 1px; margin: 0; cursor: pointer; line-height: 1.3; vertical-align: baseline; }
.mv-word > span { visibility: hidden; }
.mv-word:hover { background: color-mix(in srgb, var(--gold) 35%, var(--line)); }
@media (forced-colors: active) { .mv-word { border: 1px solid ButtonText; } }
.mv-grade { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.mv-grade > span { font-size: 14px; color: var(--muted); }
.mv-btn { font-size: 13.5px; padding: 5px 12px; color: var(--ink); }
.mv-btn.had:hover { border-color: var(--brand); }
.mv-result { justify-self: end; display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--muted); text-align: right; }
.mv-result::before { content: ''; flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--brand); }
.mv-result.missed::before { border-color: var(--asr); background: var(--asr); }
.mv-result b { color: var(--ink); font-weight: 600; }
.mm-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mm-tally { font-size: 14.5px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .mv-ar.fresh, .mq-ar.fresh { animation: mm-in 0.5s ease both; }
  @keyframes mm-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 480px) {
  .mm-body { padding: 18px 16px 20px; }
  .mv-ar { font-size: 25px; }
  /* When the result wraps, the dot leads its first line. */
  .mv-result { justify-self: start; text-align: left; }
}

/* ── Revision: one verse followed through the schedule ── */
.mm-sched { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: start; }
@media (min-width: 561px) { .mm-sched .rows > li { grid-template-columns: 130px minmax(0, 1fr); } }
@media (max-width: 920px) { .mm-sched { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.mm-walk { padding: 26px 26px 24px; }
.mm-walk h3 { font-size: clamp(22px, 2.2vw, 26px); line-height: 1.15; margin-top: 6px; }
.mm-walk .steps { gap: 6px 4px; flex-wrap: nowrap; margin-top: 24px; }
.mm-walk .steps span { font-size: 16px; padding: 6px 12px; flex: none; transition: background-color 0.25s, color 0.25s, box-shadow 0.25s; }
.mm-walk .steps i { flex: 1 1 4px; min-width: 4px; }
.mm-walk .steps small { flex: 0 0 100%; margin-top: 8px; }
.mm-walk .steps { flex-wrap: wrap; }
.mm-walk .steps span[aria-current] { background: var(--deep); border-color: var(--deep); color: var(--on-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 45%, transparent); }
.mm-status { margin-top: 20px; font-size: 17px; line-height: 1.5; min-height: 3em; }
.mm-status b { font-weight: 600; }
.mm-tag { display: inline-block; margin-left: 6px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--asr); color: var(--ink); border-radius: 999px; padding: 1px 9px; vertical-align: 2px; background: color-mix(in srgb, var(--asr) 14%, transparent); }
.mm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mm-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.mm-log { list-style: none; margin: 18px 0 0; padding: 0; font-size: 14.5px; }
.mm-log:empty { display: none; }
.mm-log li { display: grid; grid-template-columns: 8.8em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); color: var(--muted); }
.mm-log li b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 480px) {
  .mm-walk { padding: 22px 16px 20px; }
  .mm-walk .steps { gap: 6px 2px; }
  .mm-walk .steps span { font-size: 14px; padding: 4px 8px; }
  .mm-walk .steps i { min-width: 2px; }
  .mm-log li { gap: 10px; }
}

/* ── Each day: the reminder and the due card, on a phone's Lock Screen ── */
.mm-mock { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mm-archcard { position: relative; width: min(100%, 380px); }
.mm-archcard { padding: 10px; border-radius: 48px; background: #1f1d1a; box-shadow: 0 0 0 1px rgba(36, 33, 28, 0.12), 0 30px 60px -30px rgba(36, 33, 28, 0.5); }
.mm-archcard::before { content: ''; position: absolute; top: 20px; left: 50%; width: 30%; height: 22px; transform: translateX(-50%); border-radius: 999px; background: #1f1d1a; z-index: 1; }
.mm-archcard .frame { display: none; }
.mm-archcard .inner { position: relative; border-radius: 38px; background: var(--sheet); padding: 64px 18px 26px; display: grid; gap: 14px; }
.mm-clock { display: grid; justify-items: center; gap: 2px; margin-bottom: 18px; color: var(--ink); }
.mm-clock span { font-family: var(--display); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.mm-clock b { font-family: var(--display); font-weight: 400; font-size: clamp(54px, 6vw, 68px); line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.mm-notif { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 13px 14px 14px; box-shadow: 0 18px 30px -24px rgba(36, 33, 28, 0.5); }
.mm-notif img { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; }
.mm-notif b { font-weight: 600; font-size: 15px; }
.mm-notif small { font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.mm-notif > span { grid-column: 2 / span 2; font-size: 14.5px; line-height: 1.45; }
.mm-duecard { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--deep); color: var(--on-deep); border-radius: 18px; padding: 16px 18px; }
.mm-duecard .label { color: var(--on-deep); opacity: 0.75; font-size: 11px; }
.mm-duecard b { display: block; margin-top: 4px; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 0.04em; }
.mm-duecard .go { font-weight: 600; white-space: nowrap; }
.mm-mock figcaption { font-size: 13px; color: var(--muted); text-align: center; max-width: 300px; }

/* ── Recall quiz: a round on Al-Ikhlas ── */
.mm-quizsplit { align-items: start; }
.mm-quizsplit .rows { margin-top: 26px; }
@media (min-width: 561px) { .mm-quizsplit .rows > li { grid-template-columns: 120px minmax(0, 1fr); } }
.mm-quizsplit .text > p:last-child { font-size: 16px; margin-top: 20px; }
.mm-quiz { display: grid; gap: 14px; }
.mq-basmala { font-size: 24px; line-height: 2; text-align: center; color: var(--brand); }
.mq-verses { list-style: none; margin: 0; padding: 0; }
.mq-basmala { margin-bottom: 6px; }
.mq-verses li { border-top: 1px solid var(--line); padding: 4px 0; }
.mq-ar { font-size: 26px; line-height: 2.05; text-align: right; color: var(--ink); }
.mq-stage { display: grid; gap: 10px; }
.mq-card { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 16px; background: var(--bg); }
.mq-card.shown { border-color: var(--gold); }
.mq-card .label { font-size: 11px; letter-spacing: 0.18em; }
.mq-name { font-size: 32px; line-height: 1.9; text-align: center; color: var(--brand); }
.mq-sub { text-align: center; font-size: 14px; color: var(--muted); }
.mq-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.mq-card > .btn { margin-top: 4px; }
.mq-tally { text-align: center; font-size: 14px; color: var(--muted); }
.mq-count { white-space: nowrap; }
.mq-done { justify-items: center; text-align: center; padding: 22px 18px; }
.mq-done .mq-title { font-family: var(--display); font-size: 22px; letter-spacing: 0.04em; }
.mq-done p { color: var(--muted); font-size: 15px; }
@media (max-width: 480px) { .mm-quiz { padding: 22px 16px 20px; } }

/* ── Easily confused verses, on the deep band ── */
.mm-similar .wrap { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.mm-similar h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.08; margin-top: 12px; }
.mm-similar .text > p { margin-top: 16px; font-size: 18px; opacity: 0.9; max-width: 32em; }
.mm-similar .points li { font-size: 16px; }
.mm-similar .text > .mm-source { margin-top: 24px; font-size: 14px; opacity: 0.75; }
.mm-similar a { color: inherit; text-decoration-color: var(--sunrise); text-underline-offset: 4px; }
.mm-pair { margin: 0; display: grid; gap: 14px; }
.mm-card { background: color-mix(in srgb, var(--on-deep) 6%, transparent); border: 1px solid color-mix(in srgb, var(--on-deep) 16%, transparent); border-right: 3px solid var(--gold); border-radius: 18px; padding: 16px 20px 14px; }
.mm-card .ref { font-family: var(--display); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.75; }
.mm-card .ar { font-size: clamp(22px, 2.3vw, 27px); line-height: 2.15; text-align: right; margin-top: 4px; }
/* The words keep the card's own text colour (5.5:1 on the tint); the tint and the underline mark them. */
.mm-card mark { background: color-mix(in srgb, var(--sunrise) 16%, transparent); color: var(--on-deep); border-radius: 6px; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--sunrise) 70%, transparent); }
.mm-card .end { color: var(--sunrise); }
.mm-card .tr { margin-top: 6px; font-size: 15px; line-height: 1.5; opacity: 0.85; }
.mm-card .sim { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; opacity: 0.9; }
.mm-card .chip { border: 1px solid var(--gold); border-radius: 999px; padding: 2px 10px; font-weight: 500; }
.mm-pair figcaption { font-size: 13px; opacity: 0.75; }
@media (max-width: 920px) { .mm-similar .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* ── Your record ── */
.mm-last { padding-bottom: 8px; }
.mm-sources { margin-top: 28px; max-width: 760px; font-size: 14px; color: var(--muted); }
@media (min-width: 921px) { .section .more { margin-top: 0; } }

/* Parts that only work with JavaScript start hidden; these rules keep their own display from showing them. */
.mm-foot[hidden], .mq-stage[hidden], .mq-src[hidden] { display: none; }
