/* Tasbih and adhkar (Asr): the after-prayer counter, the six dhikr, the hadith cards and the seven sections.
   Colours are the site's tokens; the counter's ring is the app's own (brand gold while counting, green when a round is done). */

/* The "Count by feel" heading is linked from the after-prayer section; keep it clear of the sticky header. */
#feel-title { scroll-margin-top: 110px; }

/* The after-prayer section: the text and the hadith in one column, the counter beside them.
   On a phone the counter comes straight after the text, before the hadith. */
.split.after { grid-template-areas: 'text demo' 'from demo'; align-items: start; row-gap: 0; }
.split.after > .text { grid-area: text; }
.split.after > .counter-col { grid-area: demo; align-self: center; }
.split.after > .from { grid-area: from; }
@media (max-width: 920px) { .split.after { grid-template-areas: 'text' 'demo' 'from'; row-gap: 44px; } .split.after .hadith-lead { margin-top: 0; } }

/* ── The counter: a small demo of the app's tasbih ── */
html:not(.js) .counter, html:not(.js) .counter-note { display: none; }
.counter-col { display: grid; justify-items: center; gap: 16px; }
.counter { width: 100%; max-width: 440px; background: var(--bg); display: grid; justify-items: center; gap: 18px; padding: 26px 22px 24px; }
.counter .head { text-align: center; display: grid; gap: 6px; justify-items: center; }
.counter .head h3 { font-size: clamp(22px, 2.4vw, 26px); line-height: 1.15; }
.counter .head p { font-size: 14px; color: var(--muted); max-width: 30em; }
.demo-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink); border: 1px dashed var(--gold); border-radius: 999px; padding: 3px 12px; background: var(--sheet); }

.seq { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.seq li { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--sheet); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.seq li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.seq li.passed { color: var(--ink); }
.seq li.now { background: var(--deep); border-color: var(--deep); color: var(--on-deep); }
.seq li.passed::before { content: ''; width: 5px; height: 9px; margin: -3px 2px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }

.bead { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 2px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); font: inherit; cursor: pointer; display: grid; place-content: center; justify-items: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.bead svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.bead .track { fill: var(--sheet); stroke: var(--line); stroke-width: 2; }
.bead .fill { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 100 100; }
.counter.is-done .bead .fill { stroke: var(--brand); }
.bead > span { position: relative; }
.bead .ar { font-size: clamp(26px, 7vw, 31px); line-height: 1.9; color: var(--brand); }
.bead .n { font-family: var(--display); font-size: clamp(54px, 15vw, 66px); line-height: 1.08; font-variant-numeric: tabular-nums; }
.bead .of { font-size: 14px; color: var(--muted); min-height: 1.6em; padding: 0 18%; text-align: center; line-height: 1.35; }
.counter.is-done .bead .of { color: var(--brand); font-weight: 500; }
.bead:focus-visible { outline: 2px solid var(--brass); outline-offset: 6px; border-radius: 50%; }
.said { text-align: center; display: grid; gap: 1px; }
.said b { font-weight: 600; }
.said span { font-size: 14.5px; color: var(--muted); }
.acts { display: flex; justify-content: center; gap: 10px; }
.acts .btn { min-width: 64px; }
.acts .btn:disabled { opacity: 0.45; cursor: default; border-color: var(--line); }
.counter-note { font-size: 13px; color: var(--muted); text-align: center; max-width: 28em; }
@media (prefers-reduced-motion: no-preference) {
  .bead .fill { transition: stroke-dashoffset 0.25s ease, stroke 0.3s ease, opacity 0.2s; }
  .bead { transition: transform 0.08s ease; }
  .bead:active { transform: scale(0.985); }
}

/* ── A hadith exactly as the app stores it: the Prophet's own words in full ink, the narration around them softer ── */
.hadith { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px 18px; display: grid; gap: 12px; }
.band .hadith { background: var(--bg); }
.hadith blockquote { margin: 0; display: grid; gap: 12px; }
.hadith .ar { font-size: 22px; line-height: 2.05; text-align: right; color: var(--muted); }
.hadith .ar .words { color: var(--ink); }
.hadith .en { font-size: 15px; line-height: 1.6; color: var(--ink); }
.hadith figcaption { font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.hadith-lead { margin-top: 26px; font-size: 15.5px; color: var(--muted); max-width: 34em; }
.hadith-lead + .hadith { margin-top: 12px; }
.credit { margin-top: 10px; font-size: 13px; color: var(--muted); }
.credit a, .note a { text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ── The six dhikr ── */
.dhikr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dhikr li { position: relative; padding: 22px 24px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.dhikr .ar { font-size: clamp(28px, 2.8vw, 34px); line-height: 1.95; color: var(--brand); text-align: right; min-height: 1.95em; }
.dhikr b { font-weight: 600; font-size: 17px; margin-top: 4px; }
.dhikr .m { color: var(--muted); font-size: 15px; }
.dhikr .in { position: absolute; top: 18px; left: 24px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.dhikr .in::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.targets { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 28px; align-items: center; margin-top: 32px; }
.targets .label { grid-column: 1 / -1; }
.targets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 0; }
/* Plain figures, ruled apart like the hero's counts: they describe the app's choices, they are not buttons here. */
.targets li { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.targets li + li { border-left: 1px solid var(--line); margin-left: 16px; padding-left: 16px; }
.targets p { color: var(--muted); font-size: 15.5px; max-width: 40em; }
@media (max-width: 920px) { .dhikr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .dhikr { grid-template-columns: minmax(0, 1fr); }
  .targets { grid-template-columns: minmax(0, 1fr); }
}

/* ── By feel, and what it keeps ── */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; align-items: start; }
.pair h3 { font-size: clamp(22px, 2.4vw, 26px); line-height: 1.15; margin-bottom: 18px; }
.pair .rows > li { grid-template-columns: 150px minmax(0, 1fr); }
.pair .rows > li > b:first-child { display: grid; gap: 10px; align-content: start; }
/* How strong each moment feels, drawn small: a light ring, a fuller dot, two dots for done */
.feel { display: inline-flex; align-items: center; gap: 4px; height: 14px; }
.feel i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--c); }
.feel.firm i { width: 12px; height: 12px; background: var(--c); }
.feel.done i { width: 12px; height: 12px; background: var(--brand); border-color: var(--brand); }
@media (max-width: 920px) { .pair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .pair .rows > li { grid-template-columns: minmax(0, 1fr); } .pair .rows > li > b:first-child { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; } }

/* ── Ar-Ra'd 13:28 on the deep band ── */
.verse-band { position: relative; overflow: hidden; padding: 96px 0; }
.verse-band .arch-bg { position: absolute; height: 460px; opacity: 0.07; pointer-events: none; color: var(--on-deep); }
.verse-band .arch-bg.l { left: -70px; bottom: -150px; }
.verse-band .arch-bg.r { right: -70px; top: -150px; transform: rotate(180deg); }
.verse-band figure { position: relative; margin: 0 auto; max-width: 900px; text-align: center; }
.verse-band .ar { display: block; font-size: clamp(30px, 4.4vw, 50px); line-height: 2.1; }
.verse-band .tr { margin: 14px auto 0; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; opacity: 0.92; max-width: 34em; }
.verse-band figcaption { margin-top: 14px; font-size: 13px; opacity: 0.75; }
.verse-band figcaption a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 560px) { .verse-band { padding: 72px 0; } }

/* ── The seven sections ── */
.adhkar-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 56px; align-items: start; }
.adhkar-grid h3 { font-size: clamp(22px, 2.4vw, 26px); line-height: 1.15; }
.adhkar-grid h3 + p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.adhkar-grid h3 + p + .hadith { margin-top: 16px; }
table.sections tbody th { font-weight: 500; }
table.sections .count { display: inline-flex; align-items: center; justify-content: flex-end; gap: 12px; }
table.sections .bar { display: block; height: 8px; border-radius: 4px; background: var(--c); width: calc(var(--n) * 4px); }
table.sections tfoot th, table.sections tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 600; }
table.sections td.num b { font-weight: 600; min-width: 2ch; }
@media (max-width: 920px) { .adhkar-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { table.sections .bar { width: calc(var(--n) * 2.5px); } table.data.sections th, table.data.sections td { padding-left: 14px; padding-right: 14px; } }

.sources-note { margin-top: 40px; }

/* The adhkar screen still carries the bottom edge of the phone's notch in its top rows: trim it off.
   The glass behind is the same sandstone, so the cut does not show. */
.screen img.trim-top { clip-path: inset(4px 0 0 0); }

