/* =====================================================================
   QURAN MEMORISATION COACH (/quran/memorize): plans, practice, revision.
   Tokens are local to these pages; body.dark redefines them for the dark theme.
   ===================================================================== */
:root {
  --mz-ink: var(--ip-ink);
  --mz-muted: #5b6b66;
  --mz-emerald: var(--ip-area-fill);
  --mz-mint: var(--ip-area-soft);
  --mz-gold: #9a6f1c;
  --mz-gold-bright: #e6b85c;
  --mz-gold-soft: #f7eed9;
  --mz-sand: #fbf8f1;
  --mz-card: #ffffff;
  --mz-line: rgba(20, 26, 51, .09);
  --mz-shadow: 0 1px 2px rgba(20, 26, 51, .05), 0 10px 30px rgba(20, 26, 51, .07);
  --mz-shadow-lift: 0 2px 4px rgba(20, 26, 51, .06), 0 18px 44px rgba(20, 26, 51, .12);
  --mz-quran: "Amiri Quran", "Noto Naskh Arabic", serif;
  --mz-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23e6b85c' stroke-opacity='.16' stroke-width='1.2'%3E%3Cpath d='M48 18l9 21 21 9-21 9-9 21-9-21-21-9 21-9z'/%3E%3Cpath d='M27 27h42v42H27z' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='6'/%3E%3C/g%3E%3C/svg%3E");
}
body.dark {
  --mz-ink: var(--ip-ink);
  --mz-muted: #9db1aa;
  --mz-emerald: var(--ip-area);
  --mz-mint: color-mix(in srgb, var(--ip-area) 12%, transparent);
  --mz-gold: #e6b85c;
  --mz-gold-soft: rgba(230, 184, 92, .12);
  --mz-sand: var(--ip-bg);
  --mz-card: var(--ip-surface);
  --mz-line: rgba(255, 255, 255, .08);
  --mz-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --mz-shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .5);
}

.mz-flip { display: inline-block; }
[dir="rtl"] .mz-flip { transform: scaleX(-1); }

/* ---------- buttons ---------- */
.mz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem;
  border-radius: 14px; border: 1px solid transparent; font-weight: 600; font-size: .92rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.mz-btn:hover { transform: translateY(-1px); }
.mz-btn:focus-visible, .mz-tab:focus-visible, .mz-act:focus-visible, .mz-rate-btn:focus-visible, .mz-scope input:focus-visible + .mz-scope-card,
.mz-seq-tile:focus-visible, .mz-w:focus-visible, .mz-icon-btn:focus-visible, .mz-link:focus-visible {
  outline: 3px solid var(--mz-gold-bright); outline-offset: 2px;
}
.mz-btn-primary { background: linear-gradient(135deg, var(--ip-area-fill), var(--ip-area-fill)); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--ip-area-fill) 25%, transparent); }
.mz-btn-primary:hover { color: #fff; }
.mz-btn-gold { background: linear-gradient(135deg, #e9c46f, #c8962f); color: #2a1d04; box-shadow: 0 8px 20px rgba(184, 137, 43, .28); }
.mz-btn-gold:hover { color: #2a1d04; }
.mz-btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); color: #fff; }
.mz-btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.mz-btn-soft { background: var(--mz-mint); color: var(--mz-emerald); }
.mz-btn-soft:hover { color: var(--mz-emerald); border-color: var(--mz-emerald); }
.mz-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.mz-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--mz-emerald); text-decoration: none; }
.mz-link:hover { text-decoration: underline; color: var(--mz-emerald); }
.mz-icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--mz-line); background: transparent; color: var(--mz-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto;
}
.mz-icon-btn:hover { color: #b91c1c; border-color: #fca5a5; }

/* ---------- hero ---------- */
.mz-hero {
  position: relative; color: #fff; padding: 52px 0 60px; overflow: hidden;
  background:
    radial-gradient(1000px 420px at 88% -10%, rgba(230, 184, 92, .2), transparent 60%),
    radial-gradient(800px 420px at -10% 120%, color-mix(in srgb, var(--ip-area) 18%, transparent), transparent 55%),
    linear-gradient(140deg, var(--ip-surface) 0%, var(--ip-area-deep) 50%, var(--ip-area-fill) 100%);
}
body.dark .mz-hero { background: radial-gradient(1000px 420px at 88% -10%, rgba(230, 184, 92, .12), transparent 60%), linear-gradient(140deg, var(--ip-bg) 0%, var(--ip-surface) 60%, var(--ip-area-deep) 100%); }
.mz-hero::before { content: ""; position: absolute; inset: 0; background: var(--mz-star) 0 0 / 96px 96px; pointer-events: none; }
.mz-hero > .container { position: relative; }
.mz-hero-tight { padding: 28px 0 32px; }
.mz-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; }
.mz-kicker { display: inline-flex; align-items: center; gap: .45rem; color: #e6b85c; font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6rem; }
.mz-hero-title { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .7rem; color: #fff; }
.mz-hero-title-sm { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.mz-hero-lead { color: rgba(255, 255, 255, .84); font-size: 1.02rem; line-height: 1.65; max-width: 40rem; margin: 0 0 1.4rem; }
.mz-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.mz-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; font-size: .82rem; color: rgba(255, 255, 255, .72); margin-bottom: 1rem; }
.mz-crumbs a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.mz-crumbs a:hover { color: #fff; text-decoration: underline; }
.mz-crumbs .bi { font-size: .7rem; opacity: .7; }
.mz-practice-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.mz-today {
  position: relative; border-radius: 26px; padding: 24px; color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  border: 1px solid rgba(230, 184, 92, .38); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
}
.mz-today-title { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #e6b85c; margin: 0 0 14px; }
.mz-today-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.mz-today-stat { background: rgba(255, 255, 255, .08); border-radius: 16px; padding: 14px 10px; text-align: center; }
.mz-today-num { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.mz-today-label { display: block; font-size: .76rem; color: rgba(255, 255, 255, .75); margin-top: 6px; }
.mz-today-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.mz-today-empty { margin: 0; color: rgba(255, 255, 255, .82); font-size: .92rem; }

/* ---------- page and sections ---------- */
.mz-page { background: var(--mz-sand); padding: 28px 0 64px; }
.mz-section {
  background: var(--mz-card); border: 1px solid var(--mz-line); border-radius: 24px; padding: 24px; box-shadow: var(--mz-shadow); margin-bottom: 20px;
}
.mz-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.mz-section-head h2 { font-size: 1.25rem; font-weight: 800; color: var(--mz-ink); margin: 0; letter-spacing: -.01em; }
.mz-section-head p { color: var(--mz-muted); margin: 0; flex-basis: 100%; }
.mz-note { display: inline-flex; gap: .4rem; align-items: center; font-size: .85rem; color: var(--mz-muted); }
.mz-note .bi { color: var(--mz-gold); }
.mz-note a, .mz-honest a { color: var(--mz-emerald); font-weight: 600; }
.mz-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mz-two .mz-section { margin-bottom: 20px; }

/* Plans */
.mz-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.mz-plan { border: 1px solid var(--mz-line); border-radius: 20px; padding: 18px; background: linear-gradient(180deg, var(--mz-card), var(--mz-sand)); display: flex; flex-direction: column; gap: 12px; }
.mz-plan-top { display: flex; gap: 14px; align-items: flex-start; }
.mz-plan-head { flex: 1; min-width: 0; }
.mz-plan-head h3 { font-size: 1.05rem; font-weight: 800; color: var(--mz-ink); margin: .3rem 0 .15rem; }
.mz-plan-head p { font-size: .82rem; color: var(--mz-muted); margin: 0; }
.mz-badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; background: var(--mz-gold-soft); color: var(--mz-gold); }
.mz-ring {
  --p: 0; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ip-area-fill) calc(var(--p) * 1%), var(--mz-line) 0);
}
.mz-ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--mz-card); display: flex; align-items: center; justify-content: center; gap: 1px; font-weight: 800; color: var(--mz-ink); font-size: .95rem; }
.mz-ring small { font-size: .65rem; font-weight: 700; }
.mz-bar { position: relative; height: 8px; border-radius: 99px; background: var(--mz-line); overflow: hidden; }
.mz-bar span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; }
.mz-bar .is-started { background: color-mix(in srgb, var(--ip-area-fill) 45%, transparent); }
.mz-bar .is-memorised { background: linear-gradient(90deg, var(--ip-area-fill), #e6b85c); }
.mz-legend { display: flex; gap: 14px; font-size: .75rem; color: var(--mz-muted); margin-top: 6px; }
.mz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.mz-legend i.is-started { background: color-mix(in srgb, var(--ip-area-fill) 45%, transparent); }
.mz-legend i.is-memorised { background: linear-gradient(90deg, var(--ip-area-fill), #e6b85c); }
.mz-plan-today p { display: flex; gap: .45rem; align-items: flex-start; margin: 0; font-size: .9rem; color: var(--mz-ink); }
.mz-plan-today .bi { color: var(--mz-gold); margin-top: 2px; }
.mz-plan-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.mz-empty { text-align: center; color: var(--mz-muted); padding: 24px; }
.mz-empty > .bi { font-size: 2.2rem; color: var(--mz-gold); }
.mz-empty-big { background: var(--mz-card); border: 1px solid var(--mz-line); border-radius: 24px; padding: 48px 24px; box-shadow: var(--mz-shadow); }
.mz-empty-big h2 { font-weight: 800; color: var(--mz-ink); font-size: 1.4rem; margin-top: 10px; }

/* Builder */
.mz-scopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0 0 18px; }
.mz-scope { position: relative; cursor: pointer; }
.mz-scope input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.mz-scope-card {
  display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 14px; border-radius: 16px; border: 1.5px solid var(--mz-line);
  background: var(--mz-card); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.mz-scope-card .bi { font-size: 1.3rem; color: var(--mz-gold); }
.mz-scope-card strong { color: var(--mz-ink); font-size: .95rem; }
.mz-scope-card small { color: var(--mz-muted); font-size: .78rem; line-height: 1.4; }
.mz-scope input:checked + .mz-scope-card { border-color: var(--mz-emerald); background: var(--mz-mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ip-area-fill) 12%, transparent); }
.mz-builder-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.mz-field { display: flex; flex-direction: column; gap: 6px; }
.mz-field[hidden] { display: none; }
.mz-field label { font-size: .8rem; font-weight: 700; color: var(--mz-muted); }
.mz-field output { color: var(--mz-emerald); font-weight: 800; margin-inline-start: .25rem; }
.mz-field .form-select, .mz-field .form-control { border-radius: 12px; min-height: 44px; }
.mz-field-wide { grid-column: span 2; }
.mz-field .form-range { accent-color: var(--ip-area-strong); }
.mz-estimate { font-size: .85rem; color: var(--mz-emerald); font-weight: 600; margin: 0; }
.mz-error { color: #b91c1c; font-weight: 600; margin: 12px 0 0; }
.mz-builder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; }
body.dark .mz-field .form-select, body.dark .mz-field .form-control, body.dark .mz-tool .form-select {
  background-color: var(--ip-surface); color: var(--ip-area-strong); border-color: rgba(255, 255, 255, .14);
}

/* Revision lists, stages and calendar */
.mz-rows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mz-rows li > a, .mz-rows li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mz-rows li > a { flex: 1; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--mz-ink); }
.mz-rows li > a:hover { background: var(--mz-mint); }
.mz-history li { padding: 10px 4px; border-bottom: 1px solid var(--mz-line); }
.mz-row-ref { font-weight: 600; font-size: .92rem; }
.mz-row-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mz-row-meta small { color: var(--mz-muted); }
.mz-stage, .mz-stage-pill { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .22rem .55rem; border-radius: 999px; background: var(--mz-line); color: var(--mz-muted); }
.mz-stage.is-sabaq, .mz-stage-pill.is-sabaq { background: rgba(217, 119, 6, .12); color: #b45309; }
.mz-stage.is-sabqi, .mz-stage-pill.is-sabqi { background: rgba(176, 87, 63, .12); color: #9a4a35; }
.mz-stage.is-manzil, .mz-stage-pill.is-manzil { background: color-mix(in srgb, var(--ip-area-fill) 12%, transparent); color: #15803d; }
body.dark .mz-stage.is-sabaq, body.dark .mz-stage-pill.is-sabaq { color: #fbbf24; }
body.dark .mz-stage.is-sabqi, body.dark .mz-stage-pill.is-sabqi { color: #f0a994; }
body.dark .mz-stage.is-manzil, body.dark .mz-stage-pill.is-manzil { color: #4ade80; }
.mz-memorised { display: inline-flex; gap: .3rem; align-items: center; font-size: .75rem; font-weight: 700; color: var(--mz-gold); }
.mz-empty-line { display: flex; gap: .5rem; align-items: center; color: var(--mz-muted); margin: 6px 0 0; }
.mz-empty-line .bi { color: var(--mz-gold); }
.mz-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 360px; margin-bottom: 16px; }
.mz-day { aspect-ratio: 1; border-radius: 6px; background: var(--mz-line); }
.mz-day.lv-1 { background: color-mix(in srgb, var(--ip-area-fill) 25%, transparent); }
.mz-day.lv-2 { background: color-mix(in srgb, var(--ip-area-fill) 45%, transparent); }
.mz-day.lv-3 { background: color-mix(in srgb, var(--ip-area-fill) 70%, transparent); }
.mz-day.lv-4 { background: var(--ip-area-fill); box-shadow: inset 0 0 0 2px rgba(230, 184, 92, .6); }

.mz-stage-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mz-stage-card { position: relative; border-radius: 20px; padding: 20px; border: 1px solid var(--mz-line); background: var(--mz-sand); overflow: hidden; }
.mz-stage-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--mz-ink); margin: 0 0 .4rem; display: flex; align-items: baseline; gap: .5rem; }
.mz-stage-card h3 [lang="ar"] { font-family: var(--mz-quran); font-size: 1.5rem; color: var(--mz-gold); font-weight: 400; }
.mz-stage-card p { color: var(--mz-muted); margin: 0; line-height: 1.6; font-size: .92rem; }
.mz-stage-count { position: absolute; top: 14px; inset-inline-end: 16px; font-size: 1.8rem; font-weight: 800; opacity: .25; color: var(--mz-ink); }
.mz-stage-card.is-sabaq { border-top: 4px solid #d97706; }
.mz-stage-card.is-sabqi { border-top: 4px solid #b0573f; }
.mz-stage-card.is-manzil { border-top: 4px solid var(--ip-area-fill); }
.mz-honest { display: flex; gap: .5rem; align-items: flex-start; color: var(--mz-muted); font-size: .88rem; margin: 14px 0 0; line-height: 1.55; }
.mz-honest .bi { color: var(--mz-gold); margin-top: 2px; }
.mz-quick-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }

/* ---------- practice ---------- */
.mz-toolbar {
  position: sticky; top: 76px; z-index: 20; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
  padding: 14px 16px; border-radius: 20px; background: var(--mz-card); border: 1px solid var(--mz-line); box-shadow: var(--mz-shadow);
}
.mz-tool { display: flex; flex-direction: column; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--mz-muted); text-transform: uppercase; letter-spacing: .05em; min-width: 120px; }
.mz-tool .form-select { text-transform: none; letter-spacing: 0; font-weight: 500; border-radius: 10px; min-height: 38px; }
.mz-tool-toggles { flex-direction: row; gap: 14px; align-items: center; text-transform: none; letter-spacing: 0; padding-bottom: 8px; }
.mz-switch { display: inline-flex; gap: .4rem; align-items: center; font-size: .88rem; font-weight: 600; color: var(--mz-ink); cursor: pointer; }
.mz-switch input { width: 18px; height: 18px; accent-color: var(--ip-area-strong); }
.mz-group-play { margin-inline-start: auto; }
.mz-group-play.is-active { background: linear-gradient(135deg, #c8962f, #a87a1f); color: #fff; }
.mz-speed-note { margin: 10px 4px 16px; display: flex; }

.mz-tabs { display: flex; gap: 6px; padding: 5px; background: var(--mz-card); border: 1px solid var(--mz-line); border-radius: 16px; margin-bottom: 16px; overflow-x: auto; }
.mz-tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 0; background: transparent;
  color: var(--mz-muted); font-weight: 600; font-size: .92rem; padding: .7rem 1rem; border-radius: 12px; cursor: pointer; min-height: 44px;
}
.mz-tab.is-active { background: linear-gradient(135deg, var(--ip-area-fill), var(--ip-area-fill)); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--ip-area-fill) 25%, transparent); }
.mz-panel-lead { color: var(--mz-muted); margin: 0 4px 14px; }

.mz-ayahs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.mz-ayah {
  background: var(--mz-card); border: 1px solid var(--mz-line); border-radius: 22px; padding: 18px 20px; box-shadow: var(--mz-shadow);
  transition: box-shadow .2s ease, border-color .2s ease; scroll-margin-top: 200px;
}
.mz-ayah.is-playing { border-color: color-mix(in srgb, var(--ip-area-fill) 50%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ip-area-fill) 12%, transparent), var(--mz-shadow-lift); }
.mz-ayah-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mz-ayah-num {
  width: 36px; height: 36px; display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--mz-gold);
  background: var(--mz-gold-soft); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transform: rotate(45deg);
}
.mz-ayah-num bdi { transform: rotate(-45deg); }
.mz-ayah-ref { font-weight: 700; color: var(--mz-ink); font-size: .9rem; }
.mz-stage-pill[hidden] { display: none; }
.mz-arabic {
  font-family: var(--mz-quran); font-size: 2.05rem; line-height: 2.35; text-align: right; color: var(--ip-area-deep); margin: 0 0 8px;
  display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0 .45rem; direction: rtl;
}
body.dark .mz-arabic { color: var(--ip-area-strong); }
.mz-w { border-radius: 8px; padding: 0 .1rem; transition: background-color .2s ease, color .2s ease; }
.mz-w.is-hidden { color: transparent; background: color-mix(in srgb, var(--ip-area-fill) 13%, transparent); cursor: pointer; user-select: none; }
.mz-w.is-hidden:hover { background: color-mix(in srgb, var(--ip-area-fill) 22%, transparent); }
body.dark .mz-w.is-hidden { background: color-mix(in srgb, var(--ip-area) 16%, transparent); color: transparent; }
.mz-w.is-hidden.is-peeked { color: var(--ip-area-deep); background: rgba(230, 184, 92, .25); }
body.dark .mz-w.is-hidden.is-peeked { color: #f3e6c4; }
.mz-translation { color: var(--mz-muted); line-height: 1.65; margin: 0 0 12px; }
.mz-practice.no-arabic .mz-ayah .mz-arabic { display: none; }
.mz-practice.no-translation .mz-translation { display: none; }
.mz-ayah-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mz-act {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .45rem .85rem; border-radius: 12px; border: 1px solid var(--mz-line);
  background: var(--mz-card); color: var(--mz-ink); font-weight: 600; font-size: .85rem; cursor: pointer;
}
.mz-act:hover { border-color: var(--mz-emerald); color: var(--mz-emerald); }
.mz-play { background: var(--mz-mint); border-color: transparent; color: var(--mz-emerald); }
.mz-record.is-recording { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; animation: mz-pulse 1.4s ease-in-out infinite; }
.mz-repeat-status { font-size: .82rem; color: var(--mz-muted); font-weight: 600; }
.mz-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 14px; background: var(--mz-sand); }
.mz-compare[hidden] { display: none; }
.mz-compare audio { height: 36px; max-width: 100%; }
.mz-compare small { color: var(--mz-muted); flex-basis: 100%; }
.mz-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--mz-line); }
.mz-rate[hidden] { display: none; }
.mz-rate-q { font-size: .85rem; font-weight: 700; color: var(--mz-ink); }
.mz-rate-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.mz-rate-btn { min-height: 38px; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--mz-line); background: var(--mz-card); font-weight: 700; font-size: .82rem; cursor: pointer; }
.mz-rate-btn.is-again { color: #b91c1c; }
.mz-rate-btn.is-hard { color: #b45309; }
.mz-rate-btn.is-good { color: #15803d; }
.mz-rate-btn.is-easy { color: #1d4ed8; }
body.dark .mz-rate-btn.is-again { color: #f87171; }
body.dark .mz-rate-btn.is-hard { color: #fbbf24; }
body.dark .mz-rate-btn.is-good { color: #4ade80; }
body.dark .mz-rate-btn.is-easy { color: #93c5fd; }
.mz-rate-btn:hover { border-color: currentColor; }
.mz-rate-result { font-size: .82rem; font-weight: 600; color: var(--mz-emerald); flex-basis: 100%; }
.mz-source { display: flex; gap: .4rem; align-items: center; font-size: .82rem; color: var(--mz-muted); margin: 14px 4px 0; }

.mz-continue, .mz-sequence { background: var(--mz-card); border: 1px solid var(--mz-line); border-radius: 22px; padding: 22px; box-shadow: var(--mz-shadow); }
.mz-continue-ref { font-weight: 700; color: var(--mz-gold); margin: 0 0 6px; }
.mz-continue-text { justify-content: center; min-height: 5rem; }
.mz-continue-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0; }
.mz-continue-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--mz-muted); font-size: .85rem; }
.mz-seq-answer { list-style: none; counter-reset: seq; padding: 0; margin: 0 0 14px; min-height: 64px; display: flex; flex-direction: column; gap: 8px; border: 2px dashed var(--mz-line); border-radius: 18px; padding: 10px; }
.mz-seq-answer li { counter-increment: seq; display: flex; align-items: center; gap: 10px; }
.mz-seq-answer li::before { content: counter(seq); width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--mz-gold-soft); color: var(--mz-gold); font-weight: 800; }
.mz-seq-pool { display: flex; flex-direction: column; gap: 8px; }
.mz-seq-tile {
  width: 100%; text-align: center; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--mz-line); background: var(--mz-sand); cursor: pointer;
}
.mz-seq-tile:hover { border-color: var(--mz-emerald); }
.mz-seq-text { font-family: var(--mz-quran); font-size: 1.35rem; line-height: 2; color: var(--mz-ink); }
.mz-seq-tile.is-right { border-color: #16a34a; background: rgba(22, 163, 74, .1); }
.mz-seq-tile.is-wrong { border-color: #dc2626; background: rgba(220, 38, 38, .08); }
.mz-seq-result { text-align: center; font-weight: 700; color: var(--mz-emerald); min-height: 1.4em; margin: 6px 0 0; }
.mz-sequence[hidden] { display: none; }

.mz-session { margin-top: 20px; padding: 18px 20px; border-radius: 20px; background: var(--mz-card); border: 1px solid var(--mz-line); }
.mz-session strong { font-size: 1.4rem; color: var(--mz-emerald); }

@keyframes mz-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .35); } 50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); } }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
  .mz-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .mz-two { grid-template-columns: 1fr; gap: 0; }
  .mz-builder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mz-stage-cards { grid-template-columns: 1fr; }
  .mz-toolbar { top: 64px; }
}
@media (max-width: 575.98px) {
  .mz-hero { padding: 32px 0 40px; }
  .mz-section { padding: 18px 14px; border-radius: 20px; }
  .mz-plans { grid-template-columns: 1fr; }
  .mz-scopes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mz-scope-card small { display: none; }
  .mz-builder-grid { grid-template-columns: 1fr; }
  .mz-field-wide { grid-column: auto; }
  .mz-quick-form { grid-template-columns: 1fr 1fr; }
  .mz-quick-form .mz-field:first-child, .mz-quick-form .mz-btn { grid-column: 1 / -1; }
  .mz-today-num { font-size: 1.6rem; }
  .mz-toolbar { position: static; padding: 12px; }
  .mz-tool { min-width: calc(50% - 7px); flex: 1; }
  .mz-group-play { width: 100%; margin-inline-start: 0; }
  .mz-arabic { font-size: 1.65rem; line-height: 2.2; }
  .mz-ayah { padding: 14px; }
  .mz-act span { display: none; }
  .mz-tab { font-size: .8rem; padding: .6rem .5rem; flex: 1 1 0; }
  .mz-tab .bi { display: none; }
  .mz-act { padding: .45rem .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mz-btn, .mz-ayah, .mz-w { transition: none; }
  .mz-btn:hover { transform: none; }
  .mz-record.is-recording { animation: none; }
}

/* ---------- Lapis & Saffron layer (2026): a light hero in the Quran's lapis ---------- */
.mz-hero,
body.dark .mz-hero {
  color: var(--ip-ink);
  background:
    radial-gradient(55% 120% at 100% 0%, var(--ip-area-tint), transparent 62%),
    radial-gradient(45% 90% at 0% 100%, color-mix(in srgb, var(--ip-area-2) 14%, transparent), transparent 65%),
    linear-gradient(180deg, var(--ip-area-soft) 0%, var(--ip-bg) 100%);
  border-bottom: 1px solid var(--ip-line);
}
body.dark .mz-hero {
  background:
    radial-gradient(55% 120% at 100% 0%, var(--ip-area-tint), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--ip-area) 10%, var(--ip-bg)) 0%, var(--ip-bg) 100%);
}
.mz-hero::before { background: var(--ip-girih) 0 0 / 120px 120px; -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 85%); mask-image: linear-gradient(100deg, transparent 30%, #000 85%); }
.mz-kicker { color: var(--ip-area-strong); }
.mz-hero-title { color: var(--ip-ink); font-family: var(--ip-font-display); font-weight: 600; }
html[lang="ar"] .mz-hero-title { font-family: var(--ip-font-arabic); font-weight: 700; }
html[lang="ur"] .mz-hero-title { font-family: var(--ip-font-urdu); line-height: 1.9; }
.mz-hero-lead { color: var(--ip-ink-2); }
.mz-crumbs { color: var(--ip-muted); }
.mz-crumbs a { color: var(--ip-ink-2); }
.mz-crumbs a:hover { color: var(--ip-area-strong); }
.mz-hero .mz-btn-ghost { background: var(--ip-surface); border-color: var(--ip-line-strong); color: var(--ip-ink); }
.mz-hero .mz-btn-ghost:hover { border-color: var(--ip-area); color: var(--ip-area-strong); }
.mz-btn-gold { background: linear-gradient(135deg, #ffd27f, #f2a83b); color: #2b1a00; box-shadow: 0 10px 22px -12px rgba(214, 133, 18, .95); }
.mz-btn-gold:hover { color: #2b1a00; }
.mz-today {
  color: var(--ip-ink);
  background: color-mix(in srgb, var(--ip-surface) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--ip-surface) 50%, var(--ip-line));
  box-shadow: 0 30px 60px -36px rgba(20, 30, 80, .45);
}
.mz-today-title { color: var(--ip-accent-strong); }
.mz-today-stat { background: var(--ip-area-soft); }
.mz-today-num { color: var(--ip-area-strong); font-family: var(--ip-font-display); font-weight: 600; }
.mz-today-label { color: var(--ip-muted); }
.mz-today-empty { color: var(--ip-ink-2); }
.mz-page { background: transparent; }
.mz-section { border-radius: var(--ip-radius-xl); }

/* The free plan's one-plan limit: a gentle note with the way to more, not an error. */
.mz-error.mz-error--limit { color: var(--ip-ink, #13221d); font-weight: 500; background: var(--ip-tile-gold-bg, #fbf5e6); border: 1px solid var(--ip-line, #e6dfcd); padding: 12px 14px; border-radius: 12px; line-height: 1.6; }
.mz-error.mz-error--limit a { font-weight: 700; color: var(--ip-link, #0b6b55); }

/* ==============================================================
   Wave 2: the coach under the house deep green, today's work on a glass card with a ring for the plans
   begun, and the session ring on the practice page that fills as ayahs are rated.
   ============================================================== */
.mz-xhero + .qx-areanav + .mz-page { padding-top: 1.25rem; }
.mz-method { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: mz-step; }
.mz-method li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .75rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--ip-radius-pill);
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .9);
  font-size: .8rem;
  font-weight: 600;
  counter-increment: mz-step;
}
.mz-method li::before {
  content: counter(mz-step);
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e6b85c;
  color: #2a1c00;
  font-size: .7rem;
  font-weight: 800;
}
.mz-method span[lang="ar"] { font-family: var(--ip-font-quran); font-size: 1.05rem; color: #f1d59a; }
.mz-glass__top { display: flex; align-items: center; gap: .9rem; margin-bottom: .85rem; }
.mz-glass .qx-glass__label { margin-bottom: .25rem; font-size: .72rem; }
.mz-glass .mz-today-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .85rem; }
.mz-glass .mz-today-stat {
  padding: .65rem .4rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  text-align: center;
}
.mz-glass .mz-today-num { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.mz-glass .mz-today-label { display: block; margin-top: .3rem; font-size: .72rem; color: rgba(255, 255, 255, .75); }
.mz-glass .mz-today-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.mz-glass .mz-today-empty { margin: 0; font-size: .88rem; color: rgba(255, 255, 255, .82); }
.mz-glass .mz-btn-primary { background: #fff; color: var(--ip-green-700); border-color: #fff; }
.mz-glass--session .qx-ring__label { font-size: 1rem; }
@media (max-width: 575.98px) {
  .mz-method { display: none; }
  .mz-glass .mz-today-num { font-size: 1.35rem; }
}
