/*
 * Practical guides: shared components of the Hajj & Umrah, Janazah and Travel pages (prefix pg-).
 * Built on the site tokens in layout.css, so light and dark themes follow automatically. Logical properties
 * keep Arabic and Urdu mirrored. Feature colours live in hajj-umrah.css, janazah.css and travel.css as
 * --pg-hue / --pg-hue-soft / --pg-hue-ink.
 */

.pg {
  --pg-hue: var(--ip-primary);
  --pg-hue-soft: var(--ip-primary-soft);
  --pg-hue-ink: var(--ip-primary-ink);
  --pg-gold: var(--ip-gold-500);
  color: var(--ip-ink);
  background: var(--ip-bg);
  font-family: var(--ip-font-sans);
  overflow-x: clip;
}

.pg .container { max-width: 1200px; }
.pg-narrow { max-width: 880px !important; }

/* ---------- Hero ---------- */
.pg-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(520px, 74vh, 700px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #0b3324;
}
.pg-hero-sm { min-height: clamp(420px, 58vh, 540px); }
.pg-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.pg-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--ip-plus); background-size: 28px 28px; opacity: .8; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.pg-hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(3, 22, 15, .55) 0%, rgba(3, 22, 15, .15) 35%, rgba(3, 22, 15, .55) 72%, rgba(3, 22, 15, .84) 100%);
}
.pg-hero-inner { padding-block: 7.5rem 3.25rem; }
.pg-crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: var(--ip-text-sm); }
.pg-crumbs li + li::before { content: "/"; margin-inline-end: .35rem; opacity: .6; }
.pg-crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.pg-crumbs a:hover { color: #fff; text-decoration: underline; }
.pg-crumbs [aria-current] { color: rgba(255, 255, 255, .7); }
.pg-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--ip-text-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #f6dfa6; margin-bottom: .9rem;
}
.pg-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.pg-hero-title {
  font-family: var(--ip-font-display); font-weight: 600; font-size: var(--ip-text-4xl);
  line-height: 1.05; letter-spacing: -.02em; max-width: 16ch; margin: 0 0 1rem; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.pg-hero-lead { font-size: var(--ip-text-lg); line-height: 1.65; max-width: 58ch; color: rgba(255, 255, 255, .9); margin-bottom: 1.6rem; }
.pg-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.pg-center-actions { justify-content: center; }
.pg-hero-facts { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.pg-hero-facts li {
  padding: .45rem .9rem; border-radius: var(--ip-radius-pill); font-size: var(--ip-text-sm);
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px);
}
.pg-hero-facts strong { font-size: 1.05rem; margin-inline-end: .2rem; }

/* ---------- Buttons and chips ---------- */
.pg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.25rem; border-radius: var(--ip-radius-pill);
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s var(--ip-ease), box-shadow .2s var(--ip-ease), background-color .2s, color .2s;
}
.pg-btn:hover { transform: translateY(-1px); }
.pg-btn:focus-visible, .pg-chip:focus-visible, .pg-facet-tab:focus-visible { outline: 3px solid var(--ip-focus); outline-offset: 2px; }
.pg-btn-sm { min-height: 38px; padding: .45rem .9rem; font-size: .85rem; }
.pg-btn-primary { background: var(--pg-hue); color: var(--pg-hue-ink); box-shadow: 0 10px 22px -12px var(--pg-hue); }
.pg-btn-primary:hover { color: var(--pg-hue-ink); box-shadow: 0 14px 28px -12px var(--pg-hue); }
.pg-btn-gold { background: linear-gradient(135deg, #f4cf7d, #d9a441); color: #2a1d05; box-shadow: 0 12px 26px -12px rgba(217, 164, 65, .9); }
.pg-btn-gold:hover { color: #2a1d05; }
.pg-btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(8px); }
.pg-btn-glass:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.pg-btn-ghost { background: var(--ip-surface); color: var(--ip-ink); border-color: var(--ip-line-strong); }
.pg-btn-ghost:hover { border-color: var(--pg-hue); color: var(--pg-hue); }
.pg-chip {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .35rem .85rem;
  border-radius: var(--ip-radius-pill); border: 1px solid var(--ip-line-strong); background: var(--ip-surface);
  color: var(--ip-ink-2); font-size: .85rem; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.pg-chip:hover { border-color: var(--pg-hue); color: var(--pg-hue); }
.pg-chip[aria-pressed="true"], .pg-chip[aria-selected="true"] { background: var(--pg-hue); border-color: var(--pg-hue); color: var(--pg-hue-ink); }
.pg-chip[aria-current="step"] { background: var(--pg-hue); border-color: var(--pg-hue); color: var(--pg-hue-ink); }
.pg-chip-static { cursor: default; background: var(--pg-hue-soft); border-color: transparent; color: var(--pg-hue); }
.pg-chip-link { white-space: nowrap; }
.pg-back { display: inline-flex; align-items: center; gap: .4rem; color: var(--ip-muted); text-decoration: none; font-size: var(--ip-text-sm); font-weight: 500; }
.pg-back:hover { color: var(--pg-hue); }
.pg-in-link, .pg-map-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--pg-hue); text-decoration: none; font-size: .92rem; }
.pg-in-link:hover, .pg-map-link:hover { text-decoration: underline; }
.pg-map-link { font-weight: 500; font-size: .85rem; padding: .3rem .7rem; border-radius: var(--ip-radius-pill); background: var(--pg-hue-soft); }
.pg-link-btn { background: none; border: 0; padding: 0; color: var(--pg-hue); font-weight: 600; font-size: .88rem; cursor: pointer; }
[dir="rtl"] .pg-flip { transform: scaleX(-1); }

/* ---------- Sections ---------- */
.pg-section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.pg-section-tint { background: var(--ip-surface-2); background-image: var(--ip-pattern); }
.pg-section-head { margin-bottom: 2rem; max-width: 720px; }
.pg-center { text-align: center; margin-inline: auto; }
.pg-kicker { font-size: var(--ip-text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-hue); margin: 0 0 .5rem; }
.pg-h1 { font-family: var(--ip-font-display); font-weight: 600; font-size: var(--ip-text-3xl); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 .6rem; }
.pg-h2 { font-family: var(--ip-font-display); font-weight: 600; font-size: var(--ip-text-2xl); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .75rem; text-wrap: balance; }
.pg-h3 { font-family: var(--ip-font-display); font-weight: 600; font-size: var(--ip-text-xl); margin: 0 0 .6rem; }
.pg-section-lead { color: var(--ip-muted); font-size: 1.05rem; line-height: 1.7; margin: 0; }
.pg-lead-rich { font-size: 1.05rem; color: var(--ip-ink-2); }
.pg-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.pg-split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pg-sticky { position: sticky; top: calc(var(--ip-header-h) + 1.5rem); }
.pg-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pg-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pg-cards { display: grid; gap: 1rem; }
@media (max-width: 991.98px) {
  .pg-split, .pg-split-even { grid-template-columns: minmax(0, 1fr); }
  .pg-sticky { position: static; }
  .pg-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
  .pg-grid-2, .pg-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .pg-hero-inner { padding-block: 6rem 2.25rem; }
}

.pg-card, .pg-panel {
  background: var(--ip-surface); border: 1px solid var(--ip-line); border-radius: var(--ip-radius-lg);
  padding: 1.35rem 1.4rem; box-shadow: var(--ip-shadow-sm);
}
.pg-card { transition: transform .25s var(--ip-ease), box-shadow .25s var(--ip-ease); }
.pg-card:hover { transform: translateY(-2px); box-shadow: var(--ip-shadow-md); }
.pg-card-title { display: flex; align-items: center; gap: .6rem; font-size: 1.12rem; font-weight: 650; margin: 0 0 .5rem; font-family: var(--ip-font-sans); }
.pg-card-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--pg-hue-soft); color: var(--pg-hue); flex: none; }
.pg-panel-title { font-size: 1rem; font-weight: 650; margin: 0 0 .5rem; }

/* ---------- Rich text from the guides ---------- */
.pg-rich { line-height: 1.75; color: var(--ip-ink-2); }
.pg-rich > :last-child { margin-bottom: 0; }
.pg-rich p { margin: 0 0 .75rem; }
.pg-rich ul, .pg-rich ol { padding-inline-start: 1.25rem; margin: 0 0 .75rem; }
.pg-rich li { margin-bottom: .35rem; }
.pg-rich li::marker { color: var(--pg-hue); font-weight: 700; }
.pg-rich strong { color: var(--ip-ink); }
.pg-topic + .pg-topic { margin-top: 1rem; }
.pg-topic-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.pg-topic-title { font-size: 1.05rem; font-weight: 650; margin: 0; font-family: var(--ip-font-sans); color: var(--ip-ink); flex: 1 1 auto; }
.pg-ruling-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ip-violet-600); background: var(--ip-violet-50); padding: .2rem .55rem; border-radius: var(--ip-radius-pill); }
[data-theme="dark"] .pg-ruling-chip { color: #c8b9ff; background: rgba(164, 139, 255, .14); }

/* School differences: one line per school; the filter hides the others. */
.pg-rich .pg-schools { list-style: none; padding: 0; display: grid; gap: .5rem; }
.pg-rich .pg-schools li {
  position: relative; padding-block: .7rem .7rem; padding-inline: 1rem .9rem; border-radius: var(--ip-radius-sm);
  background: var(--ip-surface-2); border-inline-start: 3px solid var(--pg-hue); margin: 0;
}
.pg-rich .pg-schools li strong { color: var(--pg-hue); }
[data-pg-school]:not([data-pg-school="all"]) .pg-schools li[data-school] { display: none; }
[data-pg-school="hanafi"] .pg-schools li[data-school="hanafi"],
[data-pg-school="maliki"] .pg-schools li[data-school="maliki"],
[data-pg-school="shafii"] .pg-schools li[data-school="shafii"],
[data-pg-school="hanbali"] .pg-schools li[data-school="hanbali"] { display: block; }
.pg-school-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1.25rem; }
.pg-school-filter-label { font-size: .85rem; font-weight: 600; color: var(--ip-muted); margin-inline-end: .25rem; }

/* ---------- References ---------- */
.pg-refs { display: grid; gap: .85rem; margin-top: 1rem; }
.pg-refs:empty { display: none; }
.pg-ref-kind { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-hue); margin: 0; }
.pg-dua, .pg-hadith {
  margin: 0; padding: 1.1rem 1.2rem; border-radius: var(--ip-radius); background: var(--ip-surface);
  border: 1px solid var(--ip-line); position: relative;
}
.pg-dua { background: linear-gradient(180deg, var(--pg-hue-soft), var(--ip-surface) 70%); }
.pg-dua-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.pg-dua-title { font-weight: 650; color: var(--ip-ink); }
.pg-dua-arabic { font-family: var(--ip-font-quran); font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); line-height: 2.1; color: var(--ip-ink); margin: .25rem 0 .6rem; text-align: start; }
.pg-dua-translit { font-style: italic; color: var(--ip-ink-2); margin: 0 0 .35rem; }
.pg-dua-translation { color: var(--ip-ink-2); margin: 0 0 .5rem; }
.pg-hadith-text { margin: .5rem 0 .6rem; font-size: 1rem; line-height: 1.75; color: var(--ip-ink-2); border-inline-start: 3px solid var(--pg-gold); padding-inline-start: .9rem; }
.pg-hadith-text.is-clamped { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.pg-hadith-arabic { margin: .25rem 0 .5rem; }
.pg-hadith-arabic summary { cursor: pointer; font-size: .85rem; color: var(--ip-muted); font-weight: 500; }
.pg-hadith-arabic p { font-family: var(--ip-font-arabic); font-size: 1.2rem; line-height: 2; margin: .5rem 0 0; }
.pg-cite { display: flex; flex-wrap: wrap; gap: .35rem .75rem; font-size: .82rem; color: var(--ip-muted); margin: 0; align-items: center; }
.pg-cite a { color: var(--pg-hue); font-weight: 600; text-decoration: none; }
.pg-cite a:hover { text-decoration: underline; }
.pg-grade { padding: .1rem .5rem; border-radius: var(--ip-radius-pill); background: var(--ip-surface-2); }
.pg .ip-verse { margin: 0; border-inline-start-color: var(--pg-hue); background: var(--pg-hue-soft); }
.pg .ip-verse-arabic { text-align: start; font-size: clamp(1.4rem, 1.15rem + 1vw, 1.75rem); }
.pg-out-link {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--pg-hue); text-decoration: none;
  padding: .55rem .9rem; border-radius: var(--ip-radius-sm); border: 1px dashed var(--pg-hue); width: fit-content; word-break: break-all;
}
.pg-out-link:hover { background: var(--pg-hue-soft); }
.pg-evidence { margin-top: .9rem; }
.pg-evidence > summary { cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--pg-hue); font-size: .9rem; list-style: none; }
.pg-evidence > summary::-webkit-details-marker { display: none; }
.pg-dua-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pg-dua-cell { min-width: 0; }
.pg-dua-cell .pg-refs { margin-top: .4rem; }
@media (max-width: 767.98px) { .pg-dua-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Review and held rulings ---------- */
.pg-review-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-top: 1.25rem;
  padding: .85rem 1.1rem; border-radius: var(--ip-radius); background: var(--ip-surface); border: 1px solid var(--ip-line);
  box-shadow: var(--ip-shadow-sm); font-size: .9rem; color: var(--ip-muted);
}
.pg-review-note p { margin: 0; flex: 1 1 320px; }
.pg-preview-flag { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; padding: .25rem .65rem; border-radius: var(--ip-radius-pill); background: #fff1f2; color: #9f1239; font-size: .8rem; font-weight: 600; }
[data-theme="dark"] .pg-preview-flag { background: rgba(244, 63, 94, .15); color: #fda4af; }
.pg-held {
  display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--ip-radius);
  background: #fffaf0; border: 1px solid #f3dca6; color: #6b4a07;
}
.pg-held > i { font-size: 1.3rem; margin-top: .1rem; }
.pg-held-title { font-weight: 650; margin: 0 0 .2rem; }
.pg-held-text { margin: 0; font-size: .92rem; line-height: 1.6; }
.pg-held-lg { padding: 1.5rem; }
.pg-held-list ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .45rem; }
.pg-held-list li { display: flex; gap: .5rem; align-items: flex-start; padding: .55rem .7rem; border-radius: var(--ip-radius-sm); background: rgba(255, 255, 255, .6); font-weight: 500; font-size: .92rem; }
[data-theme="dark"] .pg-held-list li { background: rgba(255, 255, 255, .04); }
[data-theme="dark"] .pg-held { background: rgba(243, 215, 155, .08); border-color: rgba(243, 215, 155, .3); color: #f3dca0; }

/* ---------- Accordion ---------- */
.pg-accordion { display: grid; gap: .65rem; }
.pg-acc-item { background: var(--ip-surface); border: 1px solid var(--ip-line); border-radius: var(--ip-radius); overflow: hidden; }
.pg-acc-item > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; list-style: none;
  padding: 1rem 1.2rem; font-weight: 600; font-size: 1.02rem; color: var(--ip-ink);
}
.pg-acc-item > summary::-webkit-details-marker { display: none; }
.pg-acc-item > summary i { transition: transform .25s var(--ip-ease); color: var(--pg-hue); flex: none; }
.pg-acc-item[open] > summary i { transform: rotate(45deg); }
.pg-acc-item[open] > summary { border-bottom: 1px solid var(--ip-line); }
.pg-acc-item > .pg-topic, .pg-acc-item > .pg-held { margin: 1rem 1.2rem 1.2rem; }
.pg-acc-item > summary:focus-visible { outline: 3px solid var(--ip-focus); outline-offset: -3px; }

/* ---------- Facet tabs ---------- */
.pg-facets { margin-top: 1.25rem; }
.pg-facet-lead { margin-top: 1rem; font-size: 1.06rem; }
.pg-facet-lead .pg-rich { color: var(--ip-ink); }
.pg-facet-tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .5rem; margin-bottom: .75rem; }
@media (max-width: 639.98px) { .pg-facet-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; margin-inline: -.25rem; padding-inline: .25rem; } }
.pg-facet-tab {
  flex: none; display: inline-flex; align-items: center; gap: .4rem; scroll-snap-align: start;
  padding: .5rem .85rem; border-radius: var(--ip-radius-pill); border: 1px solid var(--ip-line); background: var(--ip-surface);
  color: var(--ip-ink-2); font-size: .86rem; font-weight: 600; cursor: pointer; transition: all .2s;
}
.pg-facet-tab:hover { color: var(--pg-hue); border-color: var(--pg-hue); }
.pg-facet-tab[aria-selected="true"] { background: var(--pg-hue); color: var(--pg-hue-ink); border-color: var(--pg-hue); box-shadow: 0 8px 18px -10px var(--pg-hue); }
.pg-facet-panel { padding: 1.4rem 1.5rem; border-radius: var(--ip-radius-lg); background: var(--ip-surface); border: 1px solid var(--ip-line); }
.pg-facet-panel + .pg-facet-panel { margin-top: 1rem; }
.pg-facets.is-tabbed .pg-facet-panel + .pg-facet-panel { margin-top: 0; }
.pg-facets.is-tabbed .pg-facet-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pg-facet-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--pg-hue); margin: 0 0 .75rem; font-weight: 700; }
.pg-facets:not(.is-tabbed) .pg-facet-tabs { display: none; }
.pg-facet-panel[data-facet="mistakes"] .pg-rich li::marker { content: "✕  "; color: #c2410c; }
.pg-facet-panel:focus-visible { outline: 3px solid var(--ip-focus); outline-offset: 2px; }

/* ---------- Checklist ---------- */
.pg-checklist { background: var(--ip-surface); border: 1px solid var(--ip-line); border-radius: var(--ip-radius-xl); padding: clamp(1.1rem, 3vw, 1.75rem); box-shadow: var(--ip-shadow-sm); }
.pg-checklist-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.pg-checklist-bar .pg-progress { flex: 1 1 220px; }
.pg-checklist-count { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pg-checklist-actions { display: flex; gap: .5rem; }
.pg-checklist-privacy { display: flex; gap: .4rem; align-items: center; font-size: .82rem; color: var(--ip-muted); margin: .75rem 0 1.1rem; }
.pg-checklist-groups { columns: 2 300px; column-gap: 1.5rem; }
.pg-check-group { break-inside: avoid; border: 0; margin: 0 0 1.25rem; padding: 0; }
.pg-check-legend { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--pg-hue); margin-bottom: .5rem; float: none; width: auto; }
.pg-check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pg-check-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pg-check-label { display: flex; align-items: flex-start; gap: .7rem; padding: .55rem .65rem; border-radius: var(--ip-radius-sm); cursor: pointer; transition: background-color .2s; line-height: 1.5; }
.pg-check-label:hover { background: var(--ip-surface-2); }
.pg-check-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--ip-line-strong); color: transparent; transition: all .2s var(--ip-ease); margin-top: 1px; }
.pg-check-input:checked + .pg-check-label .pg-check-box { background: var(--pg-hue); border-color: var(--pg-hue); color: var(--pg-hue-ink); transform: scale(1.05); }
.pg-check-input:checked + .pg-check-label .pg-check-text { color: var(--ip-muted); text-decoration: line-through; text-decoration-color: var(--ip-line-strong); }
.pg-check-input:focus-visible + .pg-check-label { outline: 3px solid var(--ip-focus); outline-offset: 1px; }
.pg-progress { height: 10px; border-radius: var(--ip-radius-pill); background: var(--ip-surface-3); overflow: hidden; }
.pg-progress-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pg-hue), var(--pg-gold)); transition: width .45s var(--ip-ease); }

/* ---------- Jump nav, related ---------- */
.pg-jump { display: flex; gap: .45rem; overflow-x: auto; padding: 1rem 0 .25rem; scrollbar-width: thin; }
.pg-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.pg-related-card {
  display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; border-radius: var(--ip-radius); background: var(--ip-surface);
  border: 1px solid var(--ip-line); color: var(--ip-ink); text-decoration: none; font-weight: 600; transition: all .2s var(--ip-ease);
}
.pg-related-card i { font-size: 1.25rem; color: var(--pg-hue); }
.pg-related-card:hover { border-color: var(--pg-hue); transform: translateY(-2px); color: var(--ip-ink); box-shadow: var(--ip-shadow-md); }
@media (max-width: 991.98px) { .pg-related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479.98px) { .pg-related { grid-template-columns: minmax(0, 1fr); } }


/* ---------- Walkthrough progress, controls and completion (Hajj journeys and the Janazah studio) ---------- */
.hj-progress-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.hj-progress-row .pg-progress { flex: 1; }
.hj-progress-text { margin: 0; font-weight: 600; font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes hj-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hj-controls { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; padding: .8rem; border-radius: var(--ip-radius-lg); background: color-mix(in srgb, var(--ip-surface) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--ip-line); box-shadow: var(--ip-shadow-md); }
.hj-controls-hint { font-size: .8rem; color: var(--ip-muted); text-align: center; }
.hj-complete { text-align: center; padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--ip-radius-xl); background: radial-gradient(circle at 50% 0%, var(--pg-hue-soft), var(--ip-surface) 70%); border: 1px solid var(--ip-line); box-shadow: var(--ip-shadow-md); }
.hj-complete-art { width: 96px; margin: 0 auto 1rem; color: var(--pg-gold); }
.hj-complete .pg-hero-actions { margin: 1.5rem 0; }
.hj-other-journeys { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
@media (max-width: 991.98px) { .hj-controls-hint { display: none; } }

/* ---------- Motion ---------- */
.pg-reveal { opacity: 1; transform: none; }
.js-pg .pg-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ip-ease), transform .6s var(--ip-ease); }
.js-pg .pg-reveal.is-in { opacity: 1; transform: none; }
.pg-twinkle circle { animation: pg-twinkle 4s ease-in-out infinite; }
.pg-twinkle circle:nth-child(2n) { animation-delay: 1.3s; }
.pg-twinkle circle:nth-child(3n) { animation-delay: 2.4s; }
@keyframes pg-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.pg-dash-flow { animation: pg-dash 22s linear infinite; }
@keyframes pg-dash { to { stroke-dashoffset: -320; } }
@media (prefers-reduced-motion: reduce) {
  .pg-twinkle circle, .pg-dash-flow, .pg-orbit { animation: none !important; }
  .js-pg .pg-reveal { opacity: 1; transform: none; transition: none; }
  .pg-btn, .pg-card, .pg-progress-fill { transition: none; }
}

/* ---------- Print ---------- */
.pg-print-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.5rem; }
.pg-print-head { padding-bottom: 1rem; border-bottom: 2px solid var(--ip-line); margin-bottom: 1.5rem; }
.pg-print-block { margin-bottom: 2rem; }
.pg-print-columns { columns: 2 260px; column-gap: 2rem; }
.pg-print-group { break-inside: avoid; margin-bottom: 1.25rem; }
.pg-print-boxes { list-style: none; padding: 0; margin: 0; }
.pg-print-boxes li { display: flex; gap: .6rem; align-items: flex-start; padding: .3rem 0; }
.pg-print-box { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--ip-ink-2); border-radius: 3px; margin-top: .25rem; }
.pg-print-note { font-size: .85rem; color: var(--ip-muted); border-top: 1px dashed var(--ip-line-strong); padding-top: .75rem; }
@media print {
  .ip-header, header.ip-header, footer, .ip-footer, .pg-print-tools, .pg-hero-actions, .pg-school-filter, .pg-jump,
  .pg-checklist-actions, .ip-skip, nav.ip-crumbs, .pg-review-note .pg-preview-flag { display: none !important; }
  body, .pg { background: #fff !important; color: #000 !important; }
  .pg-page-break { break-before: page; }
  .pg-refs { gap: .4rem; }
  .pg-dua, .pg-hadith { border-color: #bbb; break-inside: avoid; }
  a { color: #000 !important; text-decoration: none !important; }
}

/* ==========================================================================
   Studio heroes (a Hajj journey, the Janazah prayer): the deep green band with
   the lattice, the learner's progress card (practical-guides.js paints it),
   the prayer at a glance, and "what next".
   ========================================================================== */
.pg .pg-studio-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; border-bottom: 0;
  padding-block: clamp(1.5rem, 1rem + 2.4vw, 3rem) clamp(1.6rem, 1rem + 2.4vw, 3rem);
  background:
    radial-gradient(900px 380px at 88% 120%, rgba(230, 184, 92, .26), transparent 62%),
    radial-gradient(700px 300px at 8% -20%, rgba(46, 158, 103, .25), transparent 60%),
    linear-gradient(160deg, #072a1d 0%, #0d3b29 55%, #16624f 100%);
}
.pg .pg-studio-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--ip-pattern-light); background-size: 120px 120px;
  -webkit-mask-image: linear-gradient(100deg, rgba(0, 0, 0, .25) 20%, #000 80%); mask-image: linear-gradient(100deg, rgba(0, 0, 0, .25) 20%, #000 80%);
}
.pg .pg-studio-hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, #e6b85c, transparent); opacity: .7; }
.pg-studio-hero__star { position: absolute; z-index: -1; inset-inline-end: -100px; top: 50%; width: clamp(260px, 30vw, 460px); aspect-ratio: 1; translate: 0 -50%; color: #f1d59a; opacity: .16; pointer-events: none; animation: pg-turn 200s linear infinite; }
@keyframes pg-turn { to { transform: rotate(360deg); } }
.pg-studio-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: center; }
@media (min-width: 992px) { .pg-studio-hero__grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 2.5rem; } }
.pg-studio-hero__copy { min-width: 0; }
.pg .pg-studio-hero .pg-eyebrow { color: #f1d59a; margin: 0 0 .6rem; }
.pg-studio-hero__title { margin: 0 0 .5rem; font-family: var(--ip-font-display); font-weight: 800; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); line-height: 1.08; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
html[lang="ar"] .pg-studio-hero__title, html[lang="ur"] .pg-studio-hero__title { letter-spacing: 0; line-height: 1.4; }
.pg-studio-hero__lead { margin: 0; max-width: 44rem; color: rgba(255, 255, 255, .86); font-size: 1.05rem; line-height: 1.65; }
.pg .pg-studio-hero .jz-band-ar { color: #f1d59a; display: block; margin: .3rem 0 0; font-size: .72em; line-height: 1.5; }
.pg .pg-studio-hero .hj-journey-hero-row { margin-top: 0; }
.pg .pg-studio-hero .hj-journey-icon { background: rgba(255, 255, 255, .12); color: #f1d59a; border: 1px solid rgba(255, 255, 255, .2); }
.pg .pg-studio-hero .pg-progress { background: rgba(255, 255, 255, .16); }
.pg .pg-studio-hero .hj-progress-text { color: rgba(255, 255, 255, .86); }
.pg .pg-studio-hero .pg-chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.pg .pg-studio-hero .pg-chip:hover { border-color: #f1d59a; color: #f1d59a; }
.pg .pg-studio-hero .pg-chip[aria-pressed="true"] { background: #f1d59a; border-color: #f1d59a; color: #2a1d05; }
.pg .pg-studio-hero .jz-figure-toggle { flex-wrap: wrap; margin-top: 1.1rem; }
body.dark .pg .pg-studio-hero .pg-studio-hero__lead { color: rgba(255, 255, 255, .86); }
body.dark .pg .pg-studio-hero .pg-eyebrow, body.dark .pg .pg-live__label { color: #f1d59a; }
.pg-studio-note { margin-top: 1rem; }
.pg-studio-note:empty { display: none; }

.pg-live {
  display: grid; gap: .8rem; padding: 1.15rem 1.2rem; border-radius: 24px; color: #fff;
  border: 1px solid rgba(255, 255, 255, .18); background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.pg-live p { margin: 0; }
.pg-live__label { display: inline-flex; gap: .4rem; align-items: center; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f1d59a; }
html[lang="ar"] .pg-live__label, html[lang="ur"] .pg-live__label { letter-spacing: 0; font-size: .9rem; }
.pg-live__row { display: flex; align-items: center; gap: .9rem; }
.pg-live .lx-ring { --size: 66px; --lx-ring-hole: rgba(7, 42, 29, .94); --lx-ring-fill: #e6b85c; flex: none; }
.pg-live__title { font-weight: 700; font-size: 1.05rem; color: #fff; }
.pg-live__next { font-size: .88rem; color: rgba(255, 255, 255, .8); }
.pg-live__note { font-size: .78rem; color: rgba(255, 255, 255, .68); display: inline-flex; gap: .35rem; align-items: center; }
body.dark .pg .pg-live__title { color: #fff; }
body.dark .pg .pg-live__next { color: rgba(255, 255, 255, .8); }
body.dark .pg .pg-live__note { color: rgba(255, 255, 255, .68); }
.pg-live__dots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.pg-live__dots button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: none; cursor: pointer; }
.pg-live__dots button::before {
  content: ""; width: 18px; height: 18px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); transition: transform .2s, background-color .2s;
}
.pg-live__dots button:hover::before { transform: scale(1.15); }
.pg-live__dots button.is-done::before { background: #e6b85c; border-color: #e6b85c; }
.pg-live__dots button.is-current::before { box-shadow: 0 0 0 2px #fff; }
.pg-live__glance { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 5px; position: relative; }
.pg-live__glance button {
  width: 100%; display: grid; justify-items: center; gap: .15rem; padding: .45rem .2rem; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .85); transition: background-color .2s, transform .2s;
}
.pg-live__glance button:hover { transform: translateY(-2px); }
.pg-live__glance-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-size: .85rem; font-weight: 800; background: rgba(255, 255, 255, .14); }
.pg-live__glance-ar { font-family: var(--ip-font-arabic); font-size: .78rem; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pg-live__glance button.is-done .pg-live__glance-num { background: #e6b85c; color: #2a1d05; }
.pg-live__glance button.is-current { background: rgba(230, 184, 92, .22); border-color: #e6b85c; color: #fff; }
.pg-live.is-complete .lx-ring { --lx-ring-fill: #7fe0a8; }

/* Memorise the recitation: the words are covered until tapped */
.jz-studio-page.is-memorise .jz-recite-cols > div { position: relative; cursor: pointer; }
.jz-studio-page.is-memorise .jz-recite-cols > div p:not(.jz-col-label) { opacity: 0; transition: opacity .3s; }
.jz-studio-page.is-memorise .jz-recite-cols > div::after {
  content: "\F341"; font-family: "bootstrap-icons"; position: absolute; inset: 1.8rem 0 0; display: grid; place-items: center;
  color: var(--pg-hue); font-size: 1.4rem; opacity: .7; pointer-events: none; transition: opacity .3s;
}
.jz-studio-page.is-memorise .jz-recite-cols > div.is-revealed p:not(.jz-col-label) { opacity: 1; }
.jz-studio-page.is-memorise .jz-recite-cols > div.is-revealed::after { opacity: 0; }
.jz-studio-page.is-memorise .jz-recite-cols > div:focus-visible { outline: 3px solid var(--ip-focus); outline-offset: 2px; }

/* What next */
.pg-next { padding-top: 1rem; }
.pg-next .lx-kicker { margin-bottom: .2rem; }

@media (max-width: 767.98px) {
  .pg-studio-hero__star { opacity: .1; }
  .pg-live { padding: 1rem; }
  .pg-live .lx-ring { --size: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-studio-hero__star { animation: none; }
}
html[lang="ar"] .pg .pg-studio-hero .jz-band-ar { display: none; }
