/* ============================================================
   al-islam.css: loaded only by /al-islam/
   1. the geometric backdrop: an eight-point lattice, a turning
      girih rosette, and lamplight from above
   2. the mosques (SVG elevations) and the scholars (medallions)
   ============================================================ */

/* ───────────── page theme: the HUD goes emerald + gold ───────────── */
body[data-intro="alislam"] {
  --hud-grid:  rgba(63, 213, 137, 0.045);
  --hud-scan:  rgba(236, 234, 227, 0.016);
  --hud-sweep: rgba(245, 198, 60, 0.035);
  --hud-lit:   rgba(120, 240, 180, 0.2);
  --hud-halo:  rgba(63, 213, 137, 0.07);
  --gold-2:    #e8c56a;
}
body[data-intro="alislam"] #field { opacity: 0.3; }

/* ═════════════ 1. Geometric backdrop ═════════════
   Fixed, behind the circuit field and the HUD grid. --sy is written by
   islam.js on scroll so the lattice slides against the page. */
.isl-sky {
  position: fixed; inset: -8% -4%; z-index: 0;
  pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 85% at 50% -8%, #08201a 0%, #051310 42%, #030807 100%);
}
.isl-sky > * { position: absolute; inset: 0; display: block; }

/* lamplight, the glow you get walking into a mosque at ʿishāʾ */
.isl-nur {
  background:
    radial-gradient(42% 30% at 50% -4%, rgba(245, 198, 60, 0.11), transparent 72%),
    radial-gradient(38% 34% at 14% 32%, rgba(31, 157, 92, 0.12), transparent 74%),
    radial-gradient(46% 32% at 86% 66%, rgba(63, 213, 137, 0.08), transparent 74%);
  animation: isl-breathe 30s ease-in-out infinite alternate;
}
@keyframes isl-breathe { from { opacity: .72; } to { opacity: 1; } }

/* the lattice: two woven grids, 45° over 90°, which reads as an eight-point
   star tessellation without a single image */
.isl-geo { will-change: transform; }
.isl-geo--1 {
  transform: translate3d(0, calc(var(--sy, 0px) * -1), 0);
  background-image:
    repeating-linear-gradient(45deg,  rgba(63,213,137,.075) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(-45deg, rgba(63,213,137,.075) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(0deg,   rgba(245,198,60,.05)  0 1px, transparent 1px 54px),
    repeating-linear-gradient(90deg,  rgba(245,198,60,.05)  0 1px, transparent 1px 54px);
  mask-image: radial-gradient(ellipse 110% 80% at 50% 10%, #000 20%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse 110% 80% at 50% 10%, #000 20%, transparent 92%);
}
.isl-geo--2 {
  transform: translate3d(0, calc(var(--sy, 0px) * -2.4), 0);
  background-image:
    repeating-linear-gradient(45deg,  rgba(255,255,255,.035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.035) 0 1px, transparent 1px 96px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 10%, transparent 88%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 10%, transparent 88%);
}

/* a girih rosette, sixteen rays, turning once every few minutes */
.isl-rose {
  inset: auto auto auto 50%; top: 6%;
  width: clamp(300px, 46vw, 620px); aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg,    rgba(245,198,60,.5) 0 .5deg, transparent .5deg 22.5deg),
    repeating-conic-gradient(from 11.25deg, rgba(63,213,137,.4) 0 .4deg, transparent .4deg 22.5deg);
  mask-image:
    radial-gradient(circle, transparent 26%, #000 28%, #000 46%, transparent 48%,
                    transparent 60%, #000 62%, #000 63.5%, transparent 65%);
  -webkit-mask-image:
    radial-gradient(circle, transparent 26%, #000 28%, #000 46%, transparent 48%,
                    transparent 60%, #000 62%, #000 63.5%, transparent 65%);
  opacity: .3;
  animation: isl-turn 240s linear infinite;
}
.isl-rose::after {                       /* the inner medallion ring */
  content: ""; position: absolute; inset: 30%;
  border-radius: 50%;
  border: 1px solid rgba(245,198,60,.28);
  box-shadow: inset 0 0 0 6px rgba(63,213,137,.07);
}
@keyframes isl-turn { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .isl-rose { animation: none; } }
@media (max-width: 640px) { .isl-rose { opacity: .2; } }

/* ═════════════ 2. Mosques ═════════════ */

.mosques { padding-bottom: 1rem; }
.mosques .isl-lede, .scholars .isl-lede {
  max-width: 68ch; margin: -0.4rem 0 2rem;
  color: var(--ink-dim); font-size: 0.98rem; line-height: 1.75;
}
.isl-lede b { color: var(--green-2); font-weight: 500; }

.subsec--isl { color: var(--gold-2, #e8c56a); }
.subsec--isl .sch-count {
  order: 3; color: var(--mute); letter-spacing: 0.1em;
  border: 1px solid var(--line); border-radius: 100px; padding: 0.15rem 0.6rem;
}

/* the three holy mosques: one column, full width, generous */
.holy-grid { display: grid; gap: clamp(1.2rem, 2.5vw, 2rem); margin-bottom: 3.5rem; }
.msq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}

.msq-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.035), transparent 60%),
    rgba(6, 12, 10, 0.82);
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s;
  content-visibility: auto;
  contain-intrinsic-size: auto 360px;
}
.msq-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--glow) 42%, transparent);
  box-shadow: 0 26px 54px -30px #000, 0 0 44px -28px var(--glow);
}

/* the drawing sits on a lit horizon */
.msq-art {
  position: relative; padding: 1.4rem 1.2rem 0;
  background:
    radial-gradient(90% 70% at 50% 100%, color-mix(in srgb, var(--glow) 14%, transparent), transparent 70%);
}
.msq-svg { display: block; width: 100%; height: auto; overflow: visible; }
.msq-svg path, .msq-svg rect, .msq-svg circle { transition: opacity .4s; }
.msq-card:hover .msq-svg { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--glow) 35%, transparent)); }

.msq-body { padding: 1.1rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.msq-titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 0.7rem; }
.msq-body h4 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em;
  font-size: 1.16rem; line-height: 1.15; transition: color .3s;
}
.msq-card:hover .msq-body h4 { color: var(--glow); }
.msq-yr { font-family: var(--mono); font-size: 0.62rem; color: var(--mute); flex: none; }
.msq-ar {
  font-family: "Amiri", "Scheherazade New", serif; font-size: 1.5rem; line-height: 1.6;
  color: var(--gold-2, #e8c56a); margin-bottom: -0.2rem;
}
.msq-ar--sm { font-size: 1.15rem; color: var(--ink-dim); opacity: .8; margin: -0.1rem 0 0.1rem; }
.msq-when {
  font-family: "Amiri", serif; font-style: italic; font-size: 0.94rem;
  color: var(--gold-2, #e8c56a); opacity: .9;
}
.msq-card--holy .msq-place { margin-top: 0; padding-top: 0; }
.msq-desc { font-size: 0.87rem; line-height: 1.65; color: var(--ink-dim); }
.msq-note {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.03em;
  color: var(--mute); border-left: 2px solid var(--line); padding-left: 0.6rem;
}
.msq-place {
  margin-top: auto; padding-top: 0.5rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mute);
}

/* holy mosques: drawing on the left, text on the right, from tablet up */
.msq-card--holy { contain-intrinsic-size: auto 420px; }
.msq-card--holy .msq-body { padding: 1.4rem 1.8rem 1.8rem; gap: 0.6rem; }
.msq-card--holy .msq-body h4 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.msq-card--holy .msq-desc { font-size: 0.96rem; line-height: 1.8; max-width: 62ch; }
.msq-stats {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin-top: auto; padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.msq-stats span { display: flex; flex-direction: column; gap: 0.15rem; }
.msq-stats i {
  font-style: normal; font-family: var(--mono); font-size: 0.58rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute);
}
.msq-stats b { font-weight: 500; font-size: 0.86rem; color: var(--green-2); }
@media (min-width: 860px) {
  .msq-card--holy { flex-direction: row; align-items: stretch; }
  .msq-card--holy .msq-art { flex: 0 0 46%; display: flex; align-items: center; padding: 1.8rem 1.6rem; }
  .msq-card--holy .msq-body { flex: 1; justify-content: center; }
}

/* ═════════════ 3. Scholars ═════════════ */

.scholars { padding-bottom: 4rem; }
.sch-filters { margin-bottom: 2.2rem; }
.chip--isl:hover { color: var(--ink); border-color: color-mix(in srgb, var(--green) 55%, transparent); }
.chip--isl.is-active { background: var(--green); color: #05140c; border-color: var(--green); }
.chip--isl.is-active em { opacity: 0.75; }

.sch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.sch-group + .sch-group { margin-top: 0.6rem; }

.sch-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 1.3rem 1.2rem 1.2rem;
  border: 1px solid var(--line); border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,0.03), transparent 60%),
    rgba(6, 12, 10, 0.8);
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}
.sch-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  box-shadow: 0 24px 50px -30px #000, 0 0 40px -28px rgba(63,213,137,.5);
}

/* the medallion: an eight-point star with the name inside it */
.sch-medal {
  position: relative; display: grid; place-items: center;
  height: 116px; margin-bottom: 0.9rem; color: var(--green);
}
.sch-star {
  position: absolute; inset: 0; margin: auto;
  width: 116px; height: 116px; opacity: .5;
  transition: transform .8s var(--ease), opacity .4s, color .4s;
}
.sch-card:hover .sch-star { transform: rotate(22.5deg); opacity: .9; color: var(--gold-2, #e8c56a); }
.sch-ar {
  position: relative; z-index: 1; text-align: center;
  font-family: "Amiri", "Scheherazade New", serif;
  font-size: 1.3rem; line-height: 1.7; color: var(--ink);
  padding: 0 0.4rem;
}

.sch-body { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }

/* Row alignment: each card is a subgrid of its row in .sch-grid (medal, name,
   English name, dates, blurb, meaning, source) so a row of cards puts each of
   those on one line whatever the blurb lengths are. islam.js renders an empty
   .sch-slot for a part a person hasn't got, which is what keeps them in step;
   the prophets carry one part more than the scholars, and the spare row simply
   collapses to nothing in the grids that don't use it. */
@supports (grid-template-rows: subgrid) {
  .sch-grid { --rowgap: clamp(1rem, 2vw, 1.5rem); row-gap: 0; margin-bottom: calc(-1 * var(--rowgap)); }
  .sch-grid > .sch-card {
    display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0;
    align-content: start; margin-bottom: var(--rowgap);
  }
  .sch-card > .sch-body {
    grid-row: 2 / span 6; display: grid; grid-template-rows: subgrid; row-gap: 0;
  }
  .sch-body > * + * { margin-top: 0.4rem; }   /* was the flex column's gap */
  /* .sch-meta used margin-top:auto to drop to the card's foot, which pulls it
     off its shared row */
  .sch-grid > .sch-card > .sch-body > .sch-meta { margin-top: 0.4rem; align-self: start; }
  .sch-slot { display: block; height: 0; }
}
.sch-titlerow h4 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em;
  font-size: 1.04rem; line-height: 1.25; transition: color .3s;
}
.sch-card:hover .sch-titlerow h4 { color: var(--green-2); }
.sch-died { font-family: var(--mono); font-size: 0.62rem; color: var(--gold-2, #e8c56a); opacity: .85; }
.sch-desc { font-size: 0.84rem; line-height: 1.62; color: var(--ink-dim); }
.sch-work {
  align-self: flex-start;
  font-family: "Amiri", serif; font-style: italic; font-size: 0.86rem;
  color: var(--green-2); border-bottom: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  padding-bottom: 1px;
}
.sch-meta {
  margin-top: auto; padding-top: 0.5rem;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mute);
}

/* the salaf preamble, the ḥadīth the whole section hangs on */
.salaf-card {
  position: relative; overflow: hidden;
  margin: 0 0 2.4rem; padding: 1.8rem clamp(1.3rem, 3vw, 2.4rem);
  border: 1px solid color-mix(in srgb, var(--gold-2, #e8c56a) 28%, transparent);
  border-radius: 20px;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(245,198,60,0.07), transparent 60%),
    rgba(6, 12, 10, 0.6);
}
.salaf-ar {
  font-family: "Amiri", "Scheherazade New", serif;
  font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 2;
  color: var(--gold-2, #e8c56a);
}
.salaf-en { margin-top: 0.6rem; font-size: 1.02rem; line-height: 1.8; color: var(--ink); max-width: 62ch; }
.salaf-src {
  display: block; margin-top: 0.5rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mute);
}
.salaf-note {
  margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
  font-size: 0.9rem; line-height: 1.75; color: var(--ink-dim); max-width: 74ch;
}
.salaf-note b { color: var(--green-2); font-weight: 500; }

/* generation tags on a heading: Ṣaḥābah in gold, Salaf in green */
.sch-tag {
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em;
  padding: 0.2rem 0.55rem; border-radius: 100px; white-space: nowrap;
}
.sch-tag--salaf {
  color: var(--green-2); border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
  background: rgba(31,157,92,0.08);
}
.sch-tag--sahabah {
  color: var(--gold-2, #e8c56a); border: 1px solid color-mix(in srgb, #e8c56a 45%, transparent);
  background: rgba(245,198,60,0.08);
}
/* The five of firm resolve. Distinct from the Ṣaḥābah tag so the two never
   read as the same category. */
/* The English / biblical name, under the transliterated one. */
.sch-en {
  display: block; margin-bottom: 0.25rem;
  font-family: var(--sans); font-size: 0.82rem; color: var(--ink-dim); opacity: .85;
}
/* Used only for the Prophet ﷺ, whose name is explained rather than translated. */
.sch-meaning {
  margin-top: 0.6rem; padding-left: 0.7rem;
  border-left: 2px solid color-mix(in srgb, var(--green) 40%, transparent);
  font-size: 0.86rem; line-height: 1.7; color: var(--ink-dim);
}
.sch-tag--azm {
  color: #c9a8f0; border: 1px solid color-mix(in srgb, #c9a8f0 45%, transparent);
  background: rgba(170,130,230,0.09);
}

/* dating note under the scholars */
.isl-foot {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.66rem; line-height: 1.9; color: var(--mute);
  max-width: 80ch;
}

@media (max-width: 560px) {
  .sch-grid { grid-template-columns: 1fr; }
  .msq-grid { grid-template-columns: 1fr; }
  .sch-medal { height: 92px; }
  .sch-star { width: 92px; height: 92px; }
}

/* ═══════════════════════════════════════════════════════════
   The live panel and the tajweed sheet on /al-islam/
   (see alislam-live.js)

   This page is about three apps, so it now ends by DOING what
   they do rather than by listing scholars; those moved to
   /worlds/islam/, which is the page about the religion.
   ═══════════════════════════════════════════════════════════ */

.islam-live { padding-bottom: 1rem; }

.isl-live {
  display: grid; gap: clamp(0.9rem, 2vw, 1.4rem);
  grid-template-columns: 1.25fr 0.85fr 0.9fr;
  align-items: start;
}

@media (max-width: 1040px) { .isl-live { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .isl-live { grid-template-columns: 1fr; } }

.isl-panel {
  display: flex; flex-direction: column;
  padding: 1.3rem 1.4rem 1.4rem; border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(31,157,92,.07), transparent 60%),
    rgba(255,255,255,0.012);
  transition: border-color .35s;
}

.isl-panel:hover { border-color: color-mix(in srgb, var(--green) 38%, transparent); }

.isl-panel-h { margin-bottom: 1rem; }

.isl-panel-k {
  display: block; font-family: var(--mono); font-size: 0.54rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--green-2);
  margin-bottom: 0.4rem;
}

.isl-panel-h h4 { font-family: var(--serif); font-weight: 600; font-size: 1.16rem; letter-spacing: -0.01em; }

.isl-place { margin-top: 0.3rem; font-size: 0.76rem; line-height: 1.5; color: var(--ink-dim); }

.isl-place em { font-style: normal; font-family: var(--mono); font-size: 0.6rem; color: var(--mute); }

/* ── the next prayer, which is the one thing worth reading at a glance ── */
.isl-next {
  display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap;
  padding: 0.75rem 0.9rem; margin-bottom: 0.9rem; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  background: rgba(31,157,92,.1);
}

.isl-next-k {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mute);
}

.isl-next b { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--green-2); }

.isl-next-ar { font-family: "Amiri", "Scheherazade New", serif; font-size: 1.05rem; color: var(--ink-dim); }

.isl-next-in { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: var(--ink); }

/* ── the five times ── */
.isl-times { list-style: none; display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }

.isl-time {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center;
  gap: 0.7rem; padding: 0.62rem 0.8rem; background: var(--bg);
}

.isl-time-n { font-size: 0.88rem; }

.isl-time-ar { font-family: "Amiri", "Scheherazade New", serif; font-size: 0.95rem; color: var(--mute); }

.isl-time-v { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; }

/* sunrise is a boundary, not a prayer, so it is set back */
.isl-time.is-minor .isl-time-n,
.isl-time.is-minor .isl-time-v { color: var(--mute); font-size: 0.76rem; }

.isl-time.is-now { background: rgba(255,255,255,0.03); }

.isl-time.is-now .isl-time-n { color: var(--ink); font-weight: 600; }

.isl-time.is-next { background: rgba(31,157,92,.1); }

.isl-time.is-next .isl-time-n { color: var(--green-2); font-weight: 600; }

.isl-time.is-next .isl-time-v { color: var(--green-2); }

/* ── the two pickers ── */
.isl-controls { display: grid; gap: 0.7rem; margin-top: 1rem; }

.isl-ctl-k {
  display: block; font-family: var(--mono); font-size: 0.5rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
  margin-bottom: 0.4rem;
}

.isl-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.isl-chips .chip { font-size: 0.58rem; padding: 0.3rem 0.6rem; }

.isl-geo {
  font: inherit; cursor: pointer; margin-top: 1rem; align-self: flex-start;
  padding: 0.5rem 1rem 0.46rem; border-radius: 999px;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green-2);
  border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
  background: rgba(31,157,92,.08);
  transition: background .25s, border-color .25s, opacity .25s;
}

.isl-geo:hover { background: rgba(31,157,92,.18); }

.isl-geo:disabled { opacity: .55; cursor: default; }

.isl-fine {
  margin-top: auto; padding-top: 1rem;
  font-size: 0.68rem; line-height: 1.6; color: var(--mute);
}

/* ── the compass ── */
.isl-compass { margin: 0 auto; max-width: 240px; width: 100%; }

.isl-compass svg { width: 100%; height: auto; display: block; }

.qb-face { fill: rgba(255,255,255,0.015); }

.qb-ring { fill: none; stroke: var(--line); stroke-width: 1.4; }

.qb-ring--in { stroke: rgba(255,255,255,0.05); }

.qb-ticks path { stroke: var(--mute); stroke-width: 1.1; opacity: .55; }

.qb-card { font-family: var(--mono); font-size: 9px; fill: var(--mute); letter-spacing: 0.1em; }

/* the needle points at the Kaʿbah, not at north: the little square on the end
   of it is the building itself */
.qb-needle { transition: transform .8s var(--ease); transform-origin: 100px 100px; }

.qb-arrow { fill: var(--green-2); }

.qb-kaaba { fill: #0d0d10; stroke: var(--gold); stroke-width: 1.6; }

.qb-hub { fill: var(--green); }

.isl-qread { display: flex; gap: 1.4rem; margin-top: 1rem; justify-content: center; flex-wrap: wrap; }

.isl-qread span { display: grid; gap: 0.15rem; text-align: center; }

.isl-qread b { font-family: var(--mono); font-size: 1.05rem; color: var(--green-2); }

.isl-qread i {
  font-style: normal; font-family: var(--mono); font-size: 0.5rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute);
}

/* ── both calendars ── */
.isl-hijri {
  font-family: "Amiri", "Scheherazade New", serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.7; color: var(--green-2);
}

.isl-hijri-en { font-family: var(--mono); font-size: 0.82rem; color: var(--ink); margin-top: 0.3rem; }

.isl-greg { font-size: 0.8rem; color: var(--ink-dim); margin-top: 0.5rem; }

/* ═══════════ the tajweed sheet ═══════════ */
.islam-tajweed { padding-bottom: 4rem; }

.tj-legend { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.4rem; }

.tj-chip {
  font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.38rem 0.75rem 0.34rem; border-radius: 999px;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em;
  color: var(--ink-dim); border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  transition: color .25s, border-color .25s, background .25s;
}

.tj-chip i { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

.tj-chip span { font-family: "Amiri", "Scheherazade New", serif; font-size: 0.9rem; opacity: .7; }

.tj-chip:hover { color: var(--ink); border-color: var(--mute); }

.tj-chip.is-on { color: var(--ink); border-color: currentColor; background: rgba(255,255,255,0.05); }

/* one colour per rule, used by the chip, the note and the text alike */
.tj-chip--madd     { color: #a88fe0; }
.tj-chip--qalqalah { color: #e8c56a; }
.tj-chip--idgham   { color: #5fa3ec; }
.tj-chip--ghunnah  { color: #3fd589; }
.tj-chip--izhar    { color: #e0885f; }

.tj-sheet {
  padding: clamp(1.4rem, 4vw, 2.4rem); border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(31,157,92,.07), transparent 62%),
    rgba(8, 14, 11, 0.55);
  text-align: center;
}

.tj-ayah {
  font-family: "Amiri", "Scheherazade New", serif;
  font-size: clamp(1.5rem, 4.5vw, 2.4rem); line-height: 2.3;
  color: var(--ink);
}

.tj-num { color: var(--mute); font-size: 0.7em; margin-right: 0.3rem; }

.tj { transition: color .3s, opacity .3s, background .3s; border-radius: 4px; }

.tj--madd     { color: #a88fe0; }
.tj--qalqalah { color: #e8c56a; }
.tj--idgham   { color: #5fa3ec; }
.tj--ghunnah  { color: #3fd589; }
.tj--izhar    { color: #e0885f; }

/* picking one rule dims every other colour back to plain text, so the eye can
   find that rule in the line rather than reading five colours at once */
.tj-sheet[data-only] .tj { color: var(--ink); }

.tj-sheet[data-only="madd"] .tj--madd,
.tj-sheet[data-only="qalqalah"] .tj--qalqalah,
.tj-sheet[data-only="idgham"] .tj--idgham,
.tj-sheet[data-only="ghunnah"] .tj--ghunnah,
.tj-sheet[data-only="izhar"] .tj--izhar {
  background: rgba(255,255,255,0.06);
}

.tj-sheet[data-only="madd"] .tj--madd         { color: #a88fe0; }
.tj-sheet[data-only="qalqalah"] .tj--qalqalah { color: #e8c56a; }
.tj-sheet[data-only="idgham"] .tj--idgham     { color: #5fa3ec; }
.tj-sheet[data-only="ghunnah"] .tj--ghunnah   { color: #3fd589; }
.tj-sheet[data-only="izhar"] .tj--izhar       { color: #e0885f; }

.tj-notes {
  display: grid; gap: 0.7rem; margin-top: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.tj-note {
  font-size: 0.8rem; line-height: 1.6; color: var(--ink-dim);
  padding: 0.75rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.012);
  transition: opacity .3s;
}

.tj-note b { display: block; margin-bottom: 0.25rem; font-family: var(--serif); font-weight: 600; }

.tj-note--madd b     { color: #a88fe0; }
.tj-note--qalqalah b { color: #e8c56a; }
.tj-note--idgham b   { color: #5fa3ec; }
.tj-note--ghunnah b  { color: #3fd589; }
.tj-note--izhar b    { color: #e0885f; }

.tj-note.is-dim { opacity: .32; }

@media (prefers-reduced-motion: reduce) { .qb-needle { transition: none; } }
