/* ==========================================================================
   MAKKAH MASJID BOLTON — components
   Terracotta carries action · gold is the secondary (fills on dark, never type on white).
   Every value comes from theme.css. Nothing is hard-coded.
   ========================================================================== */

/* ----- Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* `clip` not `hidden`: overflow-x:hidden on <html> makes it a scroll container
   and breaks `position: sticky` on the header. `clip` contains the off-canvas
   drawer without that side effect. */
html { overflow-x: clip; }
body {
  font-family: var(--font-ui);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: var(--lh-base);
  overflow-x: clip;
}
/* The Tailwind CDN injects its <style> AFTER these links, so its preflight
   (h1-h6 { font-size: inherit; font-weight: inherit }) would flatten every
   heading to 16px/400. `body` prefix raises specificity above it. */
body h1, body h2, body h3, body h4, body h5, body h6 {
  font-family: var(--font-head);
  font-size-adjust: var(--font-head-adj);
  font-weight: 700; line-height: var(--lh-tight); letter-spacing: var(--ls-tight);
}
/* Weight is graded against optical size, because a given weight does not read
   the same at 16px and at 60px. Poppins 800 at display size is cramped — the
   counters close up and the heading shouts. The bigger the type, the less
   weight it needs to carry the same authority.

       h1  34-60px   600
       h2  29-42px   600
       h3  18-22px   700
       h4  16px      700

   Numerals are deliberately NOT included. Prayer times, prices, counters and
   reference codes stay at 800: they are data to be scanned, not prose, and
   they are read at a glance rather than along a line. */
body h1, body h2 { font-weight: 600; }
body h3, body h4, body h5, body h6 { font-weight: 700; }
body h1 { font-size: var(--h1); }
body h2 { font-size: var(--h2); }
body h3 { font-size: var(--h3); line-height: var(--lh-snug); }
body h4 { font-size: var(--fs-base); line-height: var(--lh-snug); }
p  { color: var(--c-ink-soft); }

/* `p { color }` is a direct rule, so it BEATS the colour a dark container
   passes down by inheritance. Every dark scope has to hand inheritance back.

   The element part is wrapped in :where() so this rule contributes NO extra
   specificity - it lands at (0,1,0), which still beats `p` at (0,0,1) but
   loses to any component rule that names a real colour. Without :where() the
   selector is (0,1,1) and silently overrides things like .mbox__clock.

   ADD NEW DARK SECTIONS HERE. */
.announce, .footer__bottom, .topbar,
.announce  :where(p, b, span),
.footer    :where(p, li, span, b),
.footer__bottom :where(p, span),
.summary   :where(p, span, b),
.topbar    :where(p, span),
.section--dark  :where(p, li, span, b),
.section--brand :where(p, li, span, b),
.hero3d    :where(p, span, li),
.mbox      :where(p, span, b, li),
.tstat     :where(p, span, b),
.cf__card  :where(p),
.dh1 :where(p,span,b), .dh3 :where(p,span,b), .dh4 :where(p,span,b),
.dh5 :where(p,span,b), .dc5 :where(p,span,b), .dt :where(p,span,b,li),
.da1 :where(p,span,b), .da2 :where(p,span,b), .da4 :where(p,span,b),
.da6 :where(p,span,b), .qlink :where(span,i,b), .card--fill :where(h3,p,span,i,b),
.dl3 .v :where(b,span,p), .dl7 .v :where(b,p), .dl8 .ic :where(i),
.dq2 :where(p,span,b), .df :where(p,span,b,li,a,h4),
.df3 .strip :where(b,span) { color: inherit; }
a  { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--c-brand-600); color: #fff; }

/* A single terracotta ring measured 1.53 on the olive cards, 1.64 on the brand
   band and 1.88 on teal — six of the ten grounds it can land on were under 3:1,
   so a keyboard user tabbing the filled cards saw nothing. Two tones instead:
   a white inner ring and a dark outer halo. On a light ground the halo carries
   it, on a dark ground the ring does, and no ground can swallow both. */
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(26,20,16,.92);
  border-radius: var(--radius-xs);
}
/* Windows high contrast throws author colours away; keep a real outline there */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid CanvasText; box-shadow: none; }
}

.container { width: 100%; max-width: 1200px; margin-inline:auto; padding-inline:clamp(1rem, 4vw, 2rem); }
.section   { padding-block:clamp(3.5rem, 7vw, 6rem); }
.section--sm { padding-block:clamp(2.5rem, 5vw, 4rem); }

/* ---- rhythm ----------------------------------------------------------
   Two sections on the same ground are one passage, not two. Tightening the
   join groups them and keeps the full measure of air for where the ground
   actually changes — which is where the page turns a corner.

   Before this every join was identical, so a long page read as one
   undifferentiated column with no way to tell a continuation from a new
   subject. The homepage runs to seventeen blocks; this is what gives it
   a shape. */
:where(.section, .section--sm):not(.bg-cream, .section--dark, .section--brand, .section--sand, .cta)
  + :where(.section, .section--sm):not(.bg-cream, .section--dark, .section--brand, .section--sand, .cta) {
  padding-top: clamp(1.75rem, 3.5vw, 3rem);
}
:where(.section, .section--sm).bg-cream + :where(.section, .section--sm).bg-cream {
  padding-top: clamp(1.75rem, 3.5vw, 3rem);
}

.font-arabic { font-family: var(--font-arabic); direction: rtl; }

.skip-link {
  position: absolute; left:-9999px; top:0; z-index: var(--z-skip);
  background: var(--c-brand-600); color: #fff; padding:.75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left:0; }

/* visually hidden, still announced by screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding:0; margin:-1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ----- Islamic geometric texture ---------------------------------------- */
.pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%238c311e' stroke-width='1' stroke-opacity='.18'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z'/%3E%3Cpath d='M30 12 L48 30 L30 48 L12 30 Z'/%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
}
.pattern--light { opacity: .5; }
.pattern--gold {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23c8a24a' stroke-width='1' stroke-opacity='.30'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z'/%3E%3Cpath d='M30 12 L48 30 L30 48 L12 30 Z'/%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
}

/* ==========================================================================
   SECTION HEAD — eyebrow + title + gold rule
   ========================================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap:.5rem;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--c-brand-600);
  background: var(--c-brand-50);
  border: 1px solid var(--c-brand-100);
  padding:.4rem .9rem; border-radius: var(--radius-pill);
}
/* gold-400 measured 2.95:1 here — the .mbox note already said gold-400 and
   500 fail small text on a brand ground, and the translucent gold pill
   lightens it further. gold-200 is the accent these grounds take. */
.eyebrow--dark { color: var(--c-gold-100); background: rgba(200,162,74,.10); border-color: rgba(200,162,74,.32); }

/* An .eyebrow inside a dark box is a trap: .mbox sets `color: #fff` on its
   children, which recoloured the eyebrow's text but left its light pill
   background — white on #fbf0ed, 1.12:1, effectively invisible. No pill
   here, and gold-200, which is the accent this box is documented to take. */
.mbox .eyebrow {
  background: transparent;
  color: var(--c-gold-200);
  border-color: rgba(234,215,155,.32);
}

.sec-head { max-width: 46rem; margin-inline:auto; text-align: center; }
.sec-head--left { margin-inline:0; text-align: left; }
.sec-head h2 { margin:1rem 0 0.9rem; color: var(--c-ink); }
.sec-head p  { font-size: var(--fs-base); }
.rule {
  width: 72px; height: 4px; border-radius: var(--radius-pill);
  background: var(--g-warm); margin:1rem auto 0;
}
.sec-head--left .rule { margin-inline:0; }
.rule--gold { background: var(--g-gold); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap:.55rem;
  font-weight: 600; font-size: var(--fs-md); line-height: var(--lh-flat);
  padding:1rem 1.6rem; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out),
              background-color var(--t-med), color var(--t-med), border-color var(--t-med);
}
/* the sweep that fills a button from the left on hover */
.btn::after {
  content: ''; position: absolute; inset:0; z-index: 0;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.btn > * { position: relative; z-index: 1; }
.btn:hover::after { transform: scaleX(1); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn--brand  { background: var(--c-brand-600); color: #fff; box-shadow: var(--shadow-brand); }
.btn--brand::after  { background: var(--c-brand-700); }
.btn--gold   { background: var(--c-gold-500); color: var(--c-dark); box-shadow: var(--shadow-gold); font-weight: 700; }
.btn--gold::after   { background: var(--c-gold-400); }
.btn--goldink { background: var(--c-gold-800); color: #fff; }
.btn--goldink::after { background: var(--c-gold-700); }
.btn--outline { border-color: var(--c-brand-600); color: var(--c-brand-600); background: transparent; }
.btn--outline::after { background: var(--c-brand-600); }
.btn--outline:hover  { color: #fff; }
.btn--light  { background: #fff; color: var(--c-brand-600); }
.btn--light::after  { background: var(--c-brand-50); }
.btn--outline-light { border-color: var(--edge-on-dark); color: #fff; }
.btn--outline-light::after { background: #fff; }
.btn--outline-light:hover  { color: var(--c-brand-700); }
.btn--ghost { padding:.5rem 0; color: var(--c-brand-600); font-weight: 700; }
.btn--ghost::after { display: none; }
.btn--ghost:hover { transform: none; gap:.9rem; }
.btn--lg { padding:1.1rem 2rem; font-size: var(--fs-base); }
.btn--sm { padding:0.7rem 1.25rem; font-size: var(--fs-sm); }
.btn--block { width: 100%; }


/* Buttons carry their OWN colour. The on-dark text rules above target bare
   `span`, and every .btn label is a span - so without this the label inherits
   the band's white and a gold button renders near-white-on-gold (~2:1).
   (0,2,1) beats the (0,1,0) band rules; `inherit` takes the button's colour. */
.hero3d .btn > span, .mbox .btn > span, .tstat .btn > span,
.section--dark .btn > span, .section--brand .btn > span,
.cta .btn > span, .urgent .btn > span, .summary .btn > span,
.footer .btn > span, .announce .btn > span { color: inherit; }

/* ==========================================================================
   TOP BAR — next prayer + contact
   ========================================================================== */
.topbar {
  background: var(--c-dark); color: var(--on-dark-2);
  font-size: var(--fs-xs); position: relative; z-index: var(--z-nav);
}
.topbar a:hover { color: var(--c-gold-400); }
/* The next jama'ah is the most-wanted fact on a masjid website, and on a
   375px screen it was the ONLY prayer information above the fold — the board
   itself starts 829px down, 347px past the first screen. It was set at
   12.8px, smaller than body copy. Raised, with the time itself carrying the
   emphasis: "Next:" and the countdown are context, the time is the payload. */
.topbar__next {
  display: inline-flex; align-items: center; gap:.5rem;
  color: var(--c-gold-400); font-weight: 600;
  font-size: var(--fs-sm);
}
.topbar__next [data-next-time] { color: var(--c-gold-200); font-weight: 700; }

/* on a phone the row's whole job is this line */
@media (max-width: 640px) {
  .topbar__next { font-size: var(--fs-md); width: 100%; }
}
.topbar__dot {
  width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--c-gold-500);
  box-shadow: 0 0 0 0 rgba(185,202,111,.72); animation: ping 2.2s infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(185,202,111,.72); }
  70%  { box-shadow: 0 0 0 9px rgba(185,202,111,.04); }
  100% { box-shadow: 0 0 0 0 rgba(185,202,111,.04); }
}

/* ==========================================================================
   NAVBAR — light, because the logo has no reversed variant
   ========================================================================== */
.nav {
  position: sticky; top:0; z-index: var(--z-header);
  background: var(--fill-on-dark); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow var(--t-med), padding var(--t-med);
}
.nav.scrolled { box-shadow: 0 6px 24px -12px rgba(43,26,20,.24); }
.nav__logo img { height: 46px; width: auto; transition: height var(--t-med); }
.nav.scrolled .nav__logo img { height: 40px; }

.nav__link {
  position: relative; font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink);
  padding:.4rem 0; transition: color var(--t-fast);
}
.nav__link::after {
  content: ''; position: absolute; left:0; bottom:-2px; height: 2px; width: 100%;
  background: var(--c-brand-600); border-radius: 2px;
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-med) var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--c-brand-600); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

/* dropdown */
.nav__group { position: relative; }
.nav__menu {
  position: absolute; top:calc(100% + 14px); left:50%; translate: -50% 0;
  min-width: 15rem; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-lift);
  padding:.5rem; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all var(--t-med) var(--ease-out);
}
.nav__group:hover .nav__menu,
.nav__group:focus-within .nav__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__menu a {
  display: block; padding:.6rem 0.9rem; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink-soft);
  transition: all var(--t-fast);
}
.nav__menu a:hover { background: var(--c-brand-50); color: var(--c-brand-700); padding-left:1.1rem; }

/* mobile drawer */
.drawer {
  position: fixed; inset-block:0; right:0; width: min(330px, 86vw); z-index: var(--z-drawer);
  background: #fff; box-shadow: -18px 0 50px -20px rgba(43,26,20,.42);
  transition: transform var(--t-med) var(--ease-out), visibility var(--t-med);
  overflow-y: auto;
}
/* A closed off-canvas drawer must be INERT, not merely off-screen.
   Without this its 11 links stay in the tab order, so a keyboard user tabs
   into an invisible menu — and it still widens the document by 24px at 375px.
   `visibility: hidden` fixes both and still animates. */
.drawer.translate-x-full { visibility: hidden; }
.overlay {
  position: fixed; inset:0; z-index: var(--z-backdrop); background: rgba(29,17,13,.55);
  backdrop-filter: blur(3px); transition: opacity var(--t-med);
}
.drawer a { display: block; padding:0.9rem 0; border-bottom: 1px solid var(--c-line); font-weight: 600; }
.drawer a:hover { color: var(--c-brand-600); padding-left:.4rem; }

/* ==========================================================================
   HERO
   ========================================================================== */
/* Swiper measures its slides, so the hero must NOT be a grid container and the
   slides must not be grid items — that blows the computed slide width up. */
.hero { position: relative; }
.hero-swiper { width: 100%; height: clamp(560px, 88vh, 860px); }
.hero .swiper-wrapper { height: 100%; }
.hero__slide {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  width: 100%; height: 100%;
}
.hero__bg { position: absolute; inset:0; width: 100%; height: 100%; object-fit: cover; }
/* Darkest where the copy sits, clearing to the right so the photograph reads. */
.hero__veil {
  position: absolute; inset:0;
  background: /* The gold accent words in the headline sit out to ~56%. At the old .34/78%
       stop the veil had thinned to .67 there and `a lifetime` measured 2.97
       against the 3.0 needed for large text. Holding .74 to 60% puts the whole
       headline region at 3.5 or better, and the right edge still opens up. */
    linear-gradient(100deg, rgba(29,17,13,.72) 0%, rgba(43,26,20,.72) 42%, rgba(43,26,20,.72) 60%, rgba(43,26,20,.24) 100%),
    linear-gradient(to top, rgba(29,17,13,.55), transparent 45%);
}

/* The directional veil is built for desktop, where the copy sits in the left
   half and the gradient is thick there. On a phone the copy spans the full
   width and runs into the thin end: at 373px the lead measured 1.76:1 and the
   eyebrow 2.00 against a bright photograph. Below the two-column breakpoint the
   veil is near-uniform instead, and never thinner than .80. */
@media (max-width: 899px) {
  .hero__veil {
    background: linear-gradient(180deg,
      rgba(29,17,13,.72) 0%, rgba(29,17,13,.72) 55%, rgba(29,17,13,.72) 100%);
  }
}
.hero__inner { position: relative; z-index: 2; width: 100%; padding-block:clamp(4rem, 10vw, 7rem); }

/* ---- centred variant -------------------------------------------------
   The default veil is DIRECTIONAL: thick on the left where the copy sits,
   clearing to the right so the photograph reads. Centred copy runs into
   that thin end, so the veil has to be re-cut with it — moving the text
   without moving the veil is how a hero ends up unreadable at one end. */
.hero--center .hero__inner > * { margin-inline: auto; text-align: center; }
.hero--center .hero__inner .flex { justify-content: center; }
.hero--center .hero__veil {
  background:
    linear-gradient(180deg, rgba(29,17,13,.72) 0%, rgba(43,26,20,.72) 100%),
    linear-gradient(to top, rgba(29,17,13,.55), transparent 45%);
}

/* inline-block so the RTL run hugs its own text and still sits at the left
   edge of the ltr column, in line with the headline beneath it */
.hero__bismillah {
  font-family: var(--font-arabic); color: var(--c-gold-300);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: var(--lh-relaxed);
  direction: rtl; display: inline-block;
}
.hero h1 { color: #fff; max-width: 20ch; }
/* gold-300 and gold-400 are DISPLAY accents only — large type on a dark
   ground, where the 3:1 threshold applies. Small text on dark takes
   gold-100 or gold-200; .eyebrow--dark proved what happens otherwise. */
.hero h1 em { font-style: normal; color: var(--c-gold-400); }
.hero__lead { color: var(--on-dark-1); font-size: var(--fs-lg); max-width: 46ch; }

/* Ken Burns on the active slide */
.swiper-slide-active .hero__bg { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.14); } to { transform: scale(1); } }

.hero__dots { display: flex; gap:.5rem; }
.hero__dots .swiper-pagination-bullet {
  width: 30px; height: 4px; border-radius: var(--radius-pill); background: var(--line-on-dark-1);
  opacity: 1; transition: background var(--t-med), width var(--t-med);
}
.hero__dots .swiper-pagination-bullet-active { background: var(--c-gold-400); width: 52px; }

/* ==========================================================================
   PRAYER TIMES — the signature component.
   Rebuilt as six scannable tiles rather than a dense dark list. People read
   this in seconds, often mid-wudu, so: light surface, big tabular jama'ah
   times, Arabic set in the screen-legible UI face, one clear "next" tile.
   ========================================================================== */
.ptimes {
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); overflow: hidden;
}
.ptimes__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap:.5rem 1rem; padding:1.1rem 1.4rem 1rem;
  border-bottom: 1px solid var(--c-line);
}
.ptimes__title { font-size: var(--fs-base); font-weight: 700; color: var(--c-ink); }
.ptimes__date  { font-size: var(--fs-xs); color: var(--c-faint); }
.ptimes__flag {
  font-size: var(--fs-4xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--c-gold-800); background: var(--c-gold-50);
  border: 1px solid var(--c-gold-100); padding:.2rem .55rem; border-radius: var(--radius-pill);
}

/* the tile row */
.ptimes__grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .ptimes__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .ptimes__grid { grid-template-columns: repeat(6, 1fr); } }

.pt {
  position: relative; padding:1.1rem .75rem 1.25rem; text-align: center;
  border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  transition: background var(--t-fast);
}
.ptimes__grid > .pt:nth-child(2n) { border-right: 0; }
@media (min-width: 560px) {
  .ptimes__grid > .pt { border-right: 1px solid var(--c-line); }
  .ptimes__grid > .pt:nth-child(3n) { border-right: 0; }
}
@media (min-width: 900px) {
  .ptimes__grid > .pt { border-right: 1px solid var(--c-line); border-bottom: 0; }
  .ptimes__grid > .pt:nth-child(3n) { border-right: 1px solid var(--c-line); }
  .ptimes__grid > .pt:last-child { border-right: 0; }
}
.pt:hover { background: var(--c-cream); }

.pt__ar {
  font-family: var(--font-arabic-ui); direction: rtl;
  font-size: var(--fs-lg); line-height: var(--lh-base); color: var(--c-gold-700);
  font-weight: 500;   /* Arabic face: 500 is a real weight in Noto Naskh */
}
.pt__name {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--c-ink); margin-top:.1rem;
}
.pt__lab {
  font-size: var(--fs-4xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--c-faint); margin-top:.8rem;
}
.pt__begins { font-size: var(--fs-sm); color: var(--c-ink-soft); font-variant-numeric: tabular-nums; }
.pt__jamaat {
  font-size: var(--fs-xl); font-weight: 800; color: var(--c-brand-600);
  font-variant-numeric: tabular-nums; line-height: var(--lh-tight);
}
.pt--muted .pt__jamaat { color: var(--c-line); font-weight: 400; }

/* the next prayer — the one thing the eye should land on */
.pt.is-next { background: var(--g-brand); border-color: transparent; }
.pt.is-next .pt__ar     { color: var(--c-gold-100); }   /* 5.30:1 - gold-300 was 3.55 */
.pt.is-next .pt__name   { color: #fff; }
.pt.is-next .pt__lab    { color: var(--on-dark-2); }  /* 5.05:1 - .62 was 3.38 */
.pt.is-next .pt__begins { color: var(--on-dark-1); }  /* 5.38:1 */
.pt.is-next .pt__jamaat { color: #fff; }
.pt.is-next::before {
  content: 'Next'; position: absolute; top:.55rem; left:50%; translate: -50% 0;
  font-size: var(--fs-4xs); font-weight: 800; letter-spacing: var(--ls-widest); text-transform: uppercase;
  color: var(--c-dark); background: var(--c-gold-400);
  padding:.1rem .5rem; border-radius: var(--radius-pill);
}
.pt.is-next { padding-top:1.6rem; }

/* footer */
.ptimes__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap:.75rem 1rem; padding:1rem 1.4rem; background: var(--c-cream);
}
.jumuah-chip {
  display: inline-flex; align-items: center; gap:.45rem;
  background: #fff; border: 1px solid var(--c-line);
  color: var(--c-ink); font-size: var(--fs-xs); font-weight: 600;
  padding:.35rem .8rem; border-radius: var(--radius-pill);
}
.jumuah-chip i { color: var(--c-brand-600); }
.jumuah-chip b { color: var(--c-brand-700); font-variant-numeric: tabular-nums; }

/* countdown pills (used beside the card) */
.cd-pill {
  min-width: 3.2rem; padding:.5rem .3rem; border-radius: var(--radius-sm);
  background: var(--line-on-dark-3); text-align: center;
}
.cd-pill b { display: block; color: #fff; font-size: var(--fs-xl); font-variant-numeric: tabular-nums; line-height: var(--lh-flat); }
.cd-pill span { font-size: var(--fs-4xs); color: var(--on-dark-2); text-transform: uppercase; letter-spacing: var(--ls-wide); }  /* 5.6:1 on brand-600 */

/* ==========================================================================
   ANNOUNCEMENT STRIP
   ========================================================================== */
.announce {
  background: var(--c-gold-800); color: #fff; font-size: var(--fs-sm);
  transition: transform var(--t-med), opacity var(--t-med);
}
.announce.is-hidden { transform: translateY(-100%); opacity: 0; height: 0; overflow: hidden; }
.announce--urgent { background: var(--c-brand-600); }

/* ==========================================================================
   CARDS — services, fill-on-hover
   ========================================================================== */
.card {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:2rem 1.6rem; height: 100%;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.card::before {
  content: ''; position: absolute; inset:0; z-index: 0;
  background: var(--g-brand); transform: translateY(101%);
  transition: transform var(--t-slow) var(--ease-out);
}
.card > * { position: relative; z-index: 1; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); border-color: transparent; }
.card:hover::before { transform: translateY(0); }
.card:hover .card__title, .card:hover .card__text, .card:hover .card__link { color: #fff; }
.card:hover .card__icon { background: var(--line-on-dark-2); color: #fff; transform: rotate(-8deg) scale(1.06); }

.card__icon {
  width: 60px; height: 60px; border-radius: var(--radius-card);
  display: grid; place-items: center; font-size: var(--fs-2xl);
  background: var(--c-brand-50); color: var(--c-brand-600);
  transition: all var(--t-med) var(--ease-back);
}
/* The fill rises over .6s; the type used to turn white in .32s, so for a moment
   there was white text on the white part of the card that the fill had not
   reached yet. The delay lets the colour follow the fill instead of racing it. */
.card__title { color: var(--c-ink); margin:1.1rem 0 .55rem; transition: color var(--t-med) .22s; }
.card__text  { color: var(--c-ink-soft); font-size: var(--fs-md); transition: color var(--t-med) .22s; }
.card__link  { color: var(--c-brand-600); font-weight: 700; font-size: var(--fs-sm); transition: color var(--t-med) .22s; }
/* leaving the card, the type must go dark before the fill drops away */
.card:not(:hover) :where(.card__title, .card__text, .card__link) { transition-delay: 0s; }

/* alternate card — fills WARM DARK, not gold: white on gold-500 is 2.41:1 and
   fails. Dark gives the grid its alternation and stays 16.7:1. */
.card--alt::before { background: var(--g-deep); }
.card--alt .card__icon { background: var(--c-gold-50); color: var(--c-gold-700); }
.card--alt:hover .card__icon { background: rgba(200,162,74,.18); color: var(--c-gold-300); }

/* ==========================================================================
   STATS BAND
   ========================================================================== */
/* Each figure is a specimen on a rule, left aligned and read like a list, not a
   row of centred blocks. On a phone the row swipes — native scroll-snap, so it
   is a real gesture, and it still works by keyboard and trackpad. */
.stats {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%;
  gap:1.25rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom:.25rem;
}
.stats::-webkit-scrollbar { display: none; }
.stats:focus-visible { outline: 2px solid var(--c-gold-400); outline-offset: 6px; border-radius: var(--radius-sm); }

.stat {
  scroll-snap-align: center; text-align: left;
  padding:.3rem 0 .35rem 1.1rem;
  border-left: 3px solid rgba(200,162,74,.32);
  transition: border-color var(--t-med) var(--ease-out), padding-left var(--t-med) var(--ease-out);
}
.stat:hover { border-left-color: var(--c-gold-400); padding-left:1.5rem; }

.stat__num {
  font-size: clamp(2.4rem, 7vw, 3.2rem); font-weight: 800; line-height: var(--lh-flat);
  color: #fff; font-variant-numeric: tabular-nums; letter-spacing: var(--ls-tight);
}
.stat__label {
  color: var(--on-dark-2); font-size: var(--fs-sm); line-height: var(--lh-base);
  margin-top:.7rem; max-width: 13rem;
}

/* position dots — touch only, and decorative: the row itself is the control */
.stats__dots { display: flex; justify-content: center; gap:.45rem; margin-top:1.5rem; }
.stats__dots span {
  width: .45rem; height: .45rem; border-radius: var(--radius-circle);
  background: var(--line-on-dark-1);
  transition: background var(--t-fast) var(--ease-out), width var(--t-fast) var(--ease-out);
}
.stats__dots span.is-on { background: var(--c-gold-400); width: 1.15rem; border-radius: var(--radius-pill); }
.stats__hint {
  text-align: center; font-size: var(--fs-3xs); color: var(--on-dark-3);
  margin-top:.6rem; letter-spacing: var(--ls-wide);
}

@media (min-width: 768px) {
  .stats {
    grid-auto-flow: row; grid-template-columns: repeat(4, 1fr);
    gap:2rem; overflow: visible;
  }
  .stats__dots, .stats__hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .stats { scroll-behavior: auto; }
  .stat, .stats__dots span { transition: none; }
}

/* ==========================================================================
   COURSE CARD
   ========================================================================== */
.course {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  overflow: hidden; height: 100%; display: flex; flex-direction: column;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.course:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); }
.course__media { position: relative; aspect-ratio: 3/2; overflow: hidden; }
.course__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.course:hover .course__media img { transform: scale(1.09); }
.course__badge {
  position: absolute; top:.9rem; left:.9rem; z-index: 2;
  background: var(--fill-on-dark); color: var(--c-brand-700);
  font-size: var(--fs-3xs); font-weight: 700; letter-spacing: var(--ls-wide); text-transform: uppercase;
  padding:.35rem .7rem; border-radius: var(--radius-pill);
}
.course__fee {
  position: absolute; top:.9rem; right:.9rem; z-index: 2;
  background: var(--c-brand-600); color: #fff;
  font-size: var(--fs-xs); font-weight: 700; padding:.35rem .75rem; border-radius: var(--radius-pill);
}
.course__fee--free { background: var(--c-gold-800); }
.course__body { padding:1.4rem; display: flex; flex-direction: column; gap:.6rem; flex: 1; }
.course__meta { display: flex; flex-wrap: wrap; gap:.45rem; }
.chip {
  font-size: var(--fs-2xs); font-weight: 600; padding:.28rem .65rem; border-radius: var(--radius-pill);
  background: var(--c-cream); color: var(--c-ink-soft); border: 1px solid var(--c-line);
}
.chip--gold { background: var(--c-gold-50); color: var(--c-gold-700); border-color: var(--c-gold-100); }
.chip--brand { background: var(--c-brand-50); color: var(--c-brand-700); border-color: var(--c-brand-100); }

/* ==========================================================================
   CAMPAIGN / DONATION PROGRESS
   ========================================================================== */
.campaign {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.progress {
  height: 14px; border-radius: var(--radius-pill); background: var(--c-sand); overflow: hidden; position: relative;
}
.progress__bar {
  height: 100%; border-radius: var(--radius-pill); background: var(--g-warm);
  width: 0; transition: width 1.6s var(--ease-out);
  position: relative; overflow: hidden;
}
.progress__bar::after {
  content: ''; position: absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  animation: shimmer 2.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.amount-btn {
  border: 2px solid var(--c-line); background: #fff; border-radius: var(--radius-card);
  padding:1rem .75rem; text-align: center; cursor: pointer; width: 100%;
  transition: all var(--t-med) var(--ease-out);
}
.amount-btn b { display: block; font-size: var(--fs-xl); font-weight: 800; color: var(--c-ink); }
.amount-btn span { font-size: var(--fs-3xs); color: var(--c-faint); }
.amount-btn:hover { border-color: var(--c-brand-300); transform: translateY(-3px); }
.amount-btn.is-on { border-color: var(--c-brand-600); background: var(--c-brand-50); }
.amount-btn.is-on b { color: var(--c-brand-700); }

/* toggle */
.toggle {
  display: inline-flex; background: var(--c-sand); border-radius: var(--radius-pill); padding:4px;
}
.toggle button {
  border: 0; background: transparent; cursor: pointer; font-weight: 600; font-size: var(--fs-sm);
  padding:.55rem 1.25rem; border-radius: var(--radius-pill); color: var(--c-ink-soft);
  transition: all var(--t-med) var(--ease-out);
}
.toggle button.is-on { background: #fff; color: var(--c-brand-700); box-shadow: var(--shadow-sm); }

/* ==========================================================================
   EVENTS
   ========================================================================== */
.event {
  display: grid; grid-template-columns: auto 1fr; gap:1.25rem; align-items: start;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:1.25rem; transition: all var(--t-med) var(--ease-out);
}
.event:hover { border-color: var(--c-brand-200); box-shadow: var(--shadow-card); transform: translateX(6px); }
.event__date {
  background: var(--g-brand); color: #fff; border-radius: var(--radius-sm);
  padding:.7rem .9rem; text-align: center; min-width: 4.5rem;
}
.event__date b { display: block; font-size: var(--fs-2xl); line-height: var(--lh-flat); font-weight: 800; }
.event__date span { font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: var(--ls-wide); opacity: .9; }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.quote {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:2rem 1.6rem; height: 100%; position: relative;
}
.quote::before {
  content: '\201C'; position: absolute; top:.3rem; right:1.25rem;
  font-family: Georgia, serif; font-size: 5rem; line-height: var(--lh-flat); color: var(--c-brand-100);
}
.avatar {
  width: 46px; height: 46px; border-radius: var(--radius-pill); display: grid; place-items: center;
  background: var(--c-brand-600); color: #fff; font-weight: 700; font-size: var(--fs-md);
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.g-item { position: relative; overflow: hidden; border-radius: var(--radius-card); cursor: pointer; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.g-item:hover img { transform: scale(1.1); }
.g-veil {
  position: absolute; inset:0; background: var(--g-veil);
  opacity: 0; transition: opacity var(--t-med); display: flex; align-items: flex-end; padding:1.1rem;
  color: #fff; font-weight: 600; font-size: var(--fs-sm);
}
.g-item:hover .g-veil { opacity: 1; }

#lightbox {
  position: fixed; inset:0; z-index: var(--z-modal); background: rgba(15,9,7,.72);
  display: none; place-items: center; padding:2rem;
}
#lightbox.open { display: grid; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { border: 1px solid var(--c-line); border-radius: var(--radius-card); background: #fff; overflow: hidden; transition: all var(--t-med); }
.faq + .faq { margin-top:.75rem; }
.faq.open { border-color: var(--c-brand-200); box-shadow: var(--shadow-card); }
.faq-q {
  width: 100%; text-align: left; cursor: pointer; border: 0; background: transparent;
  padding:1.1rem 1.4rem; font-weight: 700; font-size: var(--fs-base); color: var(--c-ink);
  display: flex; align-items: center; justify-content: space-between; gap:1rem;
}
.faq-q i { color: var(--c-brand-600); transition: transform var(--t-med) var(--ease-out); flex-shrink: 0; }
.faq.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--t-slow) var(--ease-out); }
.faq.open .faq-a { max-height: 22rem; }
.faq-a p { padding:0 1.4rem 1.25rem; font-size: var(--fs-md); }

/* ==========================================================================
   CTA BANDS
   ========================================================================== */
.cta { position: relative; overflow: hidden; background: var(--g-brand); }
.cta--dark { background: var(--g-deep); }

/* gold-300 on the terracotta CTA is 3.55:1 - fine as large text, but the
   Bismillah clamps below 24px on narrow screens where 4.5 is required.
   gold-100 clears it at 5.3:1. The deep CTA keeps gold-300. */
.cta:not(.cta--dark) .hero__bismillah,
/* On the brand band a white wash lifts the ground under the label: gold-100 on
   it measured 4.34. A black wash darkens it instead, the same trick the service
   card icon tiles use, and white type then sits at 6.9. */
.cta:not(.cta--dark) .eyebrow--dark { color: #fff; }
.cta:not(.cta--dark) .eyebrow--dark { background: rgba(0,0,0,.18); border-color: var(--line-on-dark-1); }

.cta__blob {
  position: absolute; border-radius: var(--radius-pill); filter: blur(70px); opacity: .4; pointer-events: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--c-dark); color: var(--on-dark-2); }
.footer h4 { color: #fff; font-size: var(--fs-md); margin-bottom:1.1rem; }
/* WCAG 2.2 2.5.8 wants 24px on a standalone target. These footer links sat at
   19px, so the column reads the same but each link is now comfortably tappable.
   The hover indent moves a transform, not padding, so the box does not jump. */
.footer a { display: inline-block; padding-block:.25rem; transition: all var(--t-fast); }
.footer a:hover { color: var(--c-gold-400); transform: translateX(.3rem); }
.footer li { display: flex; }
.footer__bottom { background: var(--c-darker); font-size: var(--fs-xs); }
.footer__logo { background: #fff; border-radius: var(--radius-sm); padding:.6rem .8rem; display: inline-block; }
.social {
  width: 40px; height: 40px; border-radius: var(--radius-pill); display: grid; place-items: center;
  background: var(--line-on-dark-3); color: #fff;
  transition: all var(--t-med) var(--ease-back);
}
.social:hover { background: var(--c-gold-500); color: var(--c-dark); transform: translateY(-4px) rotate(8deg); padding:0; }

/* ==========================================================================
   MOTION
   ========================================================================== */
/* The hidden state is scoped to .js, which an inline script in <head> sets
   before first paint. Without it, 290 elements sat at opacity 0 waiting for
   an IntersectionObserver: if the script failed, was blocked, or simply had
   not run yet, most of the site's content was invisible. Content must never
   depend on JavaScript to be readable — the animation may, the words may not. */
.js .rv { opacity: 0; transform: translateY(34px); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); }
.js .rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; } .rv-d4 { transition-delay: .32s; }
.rv-l { transform: translateX(-40px); } .rv-r { transform: translateX(40px); }
.rv-s { transform: scale(.92); }

.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap:3rem; padding-right:3rem; animation: slide 32s linear infinite; flex-shrink: 0; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-100%); } }

.anchor-offset { scroll-margin-top:120px; }

#toTop {
  position: fixed; right:1.25rem; bottom:1.25rem; z-index: var(--z-float);
  width: 46px; height: 46px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: var(--c-brand-600); color: #fff; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  box-shadow: var(--shadow-brand); transition: all var(--t-med) var(--ease-out);
}
#toTop.show { opacity: 1; visibility: visible; transform: none; }
#toTop:hover { background: var(--c-brand-700); transform: translateY(-3px); }

/* ==========================================================================
   REDUCED MOTION — switches off every autoplay, parallax and transform.
   Non-negotiable: a meaningful share of users need this.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .rv { opacity: 1 !important; transform: none !important; }
  .swiper-slide-active .hero__bg { animation: none; }
  .marquee__track { animation: none; }
}

/* ==========================================================================
   PRAYER TIMES PAGE
   Legibility first. The only emphasis is the next prayer and today's row.
   ========================================================================== */
.page-banner {
  position: relative; overflow: hidden; background: var(--c-dark);
  padding-block:clamp(3.5rem, 8vw, 5.5rem);
}
.page-banner__bg { position: absolute; inset:0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.page-banner__veil { position: absolute; inset:0; background: var(--g-overlay); }
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; }
.page-banner p  { color: var(--on-dark-2); }
/* .6 white on the page-banner veil measured 4.16-4.40 across the banner pages,
   just under the floor for small text. .78 clears it with room. */
.crumb { display: flex; flex-wrap: wrap; gap:.25rem .5rem; align-items: center; font-size: var(--fs-xs); color: var(--on-dark-2); }
/* each crumb is its own target, so each needs the height to be tapped */
.crumb a { display: inline-flex; align-items: center; min-height: 24px; }
.crumb a:hover { color: var(--c-gold-400); }

/* today's six tiles */
.t-tile {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:1.1rem 0.9rem; text-align: center; position: relative; overflow: hidden;
}
.t-tile__name { font-weight: 700; font-size: var(--fs-md); color: var(--c-ink); }
.t-tile__ar   { font-family: var(--font-arabic-ui); color: var(--c-gold-700); font-size: var(--fs-sm); direction: rtl; }
.t-tile__lab  { font-size: var(--fs-4xs); text-transform: uppercase; letter-spacing: var(--ls-wider); color: var(--c-faint); margin-top:.7rem; }
.t-tile__b    { font-size: var(--fs-sm); color: var(--c-ink-soft); font-variant-numeric: tabular-nums; }
.t-tile__j    { font-size: var(--fs-xl); font-weight: 800; color: var(--c-brand-600); font-variant-numeric: tabular-nums; }
.t-tile.is-next { border-color: var(--c-gold-500); background: var(--c-gold-50); }
.t-tile.is-next::before { content: ''; position: absolute; top:0; left:0; right:0; height: 4px; background: var(--g-gold); }
.t-tile.is-next .t-tile__j { color: var(--c-gold-800); }

/* month table */
.tt-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--radius-card); background: #fff; }
.tt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 640px; }
.tt thead th {
  background: var(--c-dark); color: #fff; font-size: var(--fs-3xs); letter-spacing: var(--ls-wide);
  text-transform: uppercase; padding:.75rem .6rem; text-align: center; position: sticky; top:0; z-index: 2;
}
.tt thead th span { display: block; font-size: var(--fs-4xs); opacity: .6; letter-spacing: var(--ls-wide); }
.tt tbody th {
  text-align: left; padding:.5rem .8rem; border-bottom: 1px solid var(--c-line);
  background: var(--c-cream); white-space: nowrap; font-weight: 700;
}
.tt tbody th b { font-size: var(--fs-base); }
.tt tbody th span { font-size: var(--fs-3xs); color: var(--c-faint); font-weight: 600; margin-left:.35rem; }
.tt td { padding:.5rem .6rem; border-bottom: 1px solid var(--c-line); text-align: center; }
.tt td .b { display: block; font-size: var(--fs-xs); color: var(--c-faint); }
.tt td .j { display: block; font-size: var(--fs-md); font-weight: 700; color: var(--c-ink); }
.tt tbody tr:hover td, .tt tbody tr:hover th { background: var(--c-gold-50); }
.tt tr.is-friday th { background: var(--c-brand-50); color: var(--c-brand-700); }
.tt tr.is-friday th span { color: var(--c-brand-600); }
.tt tr.is-today th { background: var(--c-brand-600); color: #fff; }
.tt tr.is-today th span { color: var(--on-dark-2); }
.tt tr.is-today td { background: var(--c-gold-50); }
.tt tr.is-today td .j { color: var(--c-brand-700); }

.month-nav button {
  width: 40px; height: 40px; border-radius: var(--radius-pill); border: 1px solid var(--c-line);
  background: #fff; cursor: pointer; color: var(--c-brand-600); transition: all var(--t-fast);
}
.month-nav button:hover:not(:disabled) { background: var(--c-brand-600); color: #fff; border-color: transparent; }
.month-nav button:disabled { opacity: .35; cursor: not-allowed; }

/* special prayer card */
.special {
  background: #fff; border: 1px solid var(--c-line); border-left: 4px solid var(--c-gold-500);
  border-radius: var(--radius-card); padding:1.4rem;
}
.special--eid { border-left-color: var(--c-brand-600); }

/* print: the timetable goes on a fridge door */
@media print {
  .topbar, .announce, .nav, .drawer, .overlay, .footer, #toTop,
  .page-banner, .no-print { display: none !important; }
  body { background: #fff; }
  .tt thead th { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tt { min-width: 0; font-size: 10pt; }
  .tt td, .tt tbody th { padding:.28rem .4rem; }
  .tt tr.is-today th, .tt tr.is-friday th { background: #eee !important; color: #000 !important; }
  .tt tr.is-today td { background: #fff !important; }
  .section { padding-block:.5rem; }
}

/* ==========================================================================
   DONATE + CAMPAIGN
   ========================================================================== */

/* --- fund picker ------------------------------------------------------- */
.fund {
  position: relative; display: flex; gap:0.9rem; align-items: flex-start;
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius-card);
  padding:1rem 1.1rem; cursor: pointer; width: 100%; text-align: left;
  transition: all var(--t-med) var(--ease-out);
}
.fund:hover { border-color: var(--c-brand-300); transform: translateY(-2px); }
.fund.is-on { border-color: var(--c-brand-600); background: var(--c-brand-50); }
.fund__ic {
  width: 42px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: grid; place-items: center; background: var(--c-gold-50); color: var(--c-gold-700);
  transition: all var(--t-med);
}
.fund.is-on .fund__ic { background: var(--c-brand-600); color: #fff; }
.fund__t { font-weight: 700; font-size: var(--fs-md); color: var(--c-ink); display: block; }
.fund__d { font-size: var(--fs-xs); color: var(--c-faint); }
.fund__tag {
  font-size: var(--fs-4xs); font-weight: 700; letter-spacing: var(--ls-wide); text-transform: uppercase;
  padding:.15rem .45rem; border-radius: var(--radius-pill); background: var(--c-gold-100); color: var(--c-gold-800);
  margin-left:.4rem; vertical-align: middle;
}

/* --- sticky summary ---------------------------------------------------- */
.summary {
  background: var(--g-deep); color: #fff; border-radius: var(--radius-lg);
  padding:1.6rem; position: sticky; top:110px; overflow: hidden;
}
.summary p, .summary span, .summary b, .summary li { color: inherit; }
.summary__row { display: flex; justify-content: space-between; gap:1rem; padding:.5rem 0; font-size: var(--fs-sm); }
.summary__row span:first-child { color: var(--on-dark-2); }
.summary__total {
  display: flex; justify-content: space-between; align-items: baseline; gap:1rem;
  border-top: 1px solid var(--line-on-dark-2); margin-top:.6rem; padding-top:.9rem;
}
.summary__total b { font-size: var(--fs-3xl); color: var(--c-gold-400); font-variant-numeric: tabular-nums; }
.summary__total b.bump { animation: bump .45s var(--ease-back); }
@keyframes bump { 0%{transform:scale(1)} 40%{transform:scale(1.11)} 100%{transform:scale(1)} }

/* --- gift aid ---------------------------------------------------------- */
.giftaid {
  border: 2px solid var(--c-gold-200); background: var(--c-gold-50);
  border-radius: var(--radius-card); padding:1.25rem;
}
.giftaid.is-off { border-color: var(--c-line); background: var(--c-cream); }
.giftaid__body { max-height: 0; overflow: hidden; transition: max-height var(--t-slow) var(--ease-out); }
.giftaid.is-on .giftaid__body { max-height: 40rem; }
.giftaid__legal {
  font-size: var(--fs-2xs); line-height: var(--lh-base); color: var(--c-ink-soft);
  background: #fff; border-radius: var(--radius-sm); padding:.8rem .9rem; margin-top:.9rem;
}

/* --- inputs ------------------------------------------------------------ */
.field label { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--c-ink-soft); margin-bottom:.35rem; }
.input {
  width: 100%; padding:0.8rem 1rem; border: 2px solid var(--c-line);
  border-radius: var(--radius-sm); font: inherit; font-size: var(--fs-md); background: #fff;
  transition: border-color var(--t-fast);
}
/* never remove the indicator on a form field: the border alone is too weak,
   and it is the one place a keyboard user most needs to know where they are */
.input:focus-visible {
  outline: 3px solid #fff; outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(26,20,16,.92);
  border-color: var(--c-brand-600);
}
.input:focus { border-color: var(--c-brand-600); }

/* --- steps ------------------------------------------------------------- */
.steps { counter-reset: s; }
.step-h { display: flex; align-items: center; gap:.75rem; margin-bottom:1rem; }
.step-h::before {
  counter-increment: s; content: counter(s);
  width: 30px; height: 30px; border-radius: var(--radius-pill); flex-shrink: 0;
  background: var(--c-brand-600); color: #fff; font-weight: 700; font-size: var(--fs-sm);
  display: grid; place-items: center;
}

/* --- 3D / model viewer ------------------------------------------------- */
.model {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--c-dark); aspect-ratio: 16/10;
}
.model__poster { position: absolute; inset:0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.model__ui {
  position: absolute; inset:0; display: grid; place-content: center; justify-items: center;
  gap:1rem; text-align: center; padding:1.5rem;
}
.model__play {
  width: 74px; height: 74px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: var(--c-gold-500); color: var(--c-dark); font-size: var(--fs-xl);
  box-shadow: var(--shadow-gold); transition: transform var(--t-med) var(--ease-back);
}
.model__play:hover { transform: scale(1.09); }
.model.is-live .model__ui, .model.is-live .model__poster { display: none; }
.model iframe, .model spline-viewer { position: absolute; inset:0; width: 100%; height: 100%; border: 0; }

/* --- timeline ---------------------------------------------------------- */
.tl { position: relative; padding-left:2rem; }
.tl::before { content: ''; position: absolute; left:9px; top:.4rem; bottom:.4rem; width: 2px; background: var(--c-line); }
.tl__i { position: relative; padding-bottom:2rem; }
.tl__i::before {
  content: ''; position: absolute; left:-2.1rem; top:.35rem; width: 20px; height: 20px;
  border-radius: var(--radius-pill); background: #fff; border: 3px solid var(--c-line);
}
.tl__i.done::before { background: var(--c-brand-600); border-color: var(--c-brand-600); }
.tl__i.now::before  { background: var(--c-gold-500); border-color: var(--c-gold-500);
  box-shadow: 0 0 0 5px rgba(200,162,74,.24); }
.tl__i b { display: block; font-size: var(--fs-md); }
.tl__i span { font-size: var(--fs-2xs); color: var(--c-faint); }

/* --- brick / cost grid -------------------------------------------------- */
.brick {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:1.25rem; text-align: center; transition: all var(--t-med) var(--ease-out);
}
.brick:hover { border-color: var(--c-gold-400); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.brick b { display: block; font-size: var(--fs-2xl); font-weight: 800; color: var(--c-brand-600); }
.brick span { font-size: var(--fs-xs); color: var(--c-faint); }

/* --- donor wall --------------------------------------------------------- */
.donor {
  display: flex; justify-content: space-between; gap:1rem; align-items: center;
  padding:.7rem 1rem; border-bottom: 1px solid var(--c-line); font-size: var(--fs-sm);
}
.donor:last-child { border-bottom: 0; }
.donor b { color: var(--c-brand-600); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   FUNERAL / JANAZAH
   Someone is reading this on the worst day of their life, probably on a phone,
   possibly on poor signal. It loads instantly, shows the phone number first,
   and NOTHING on it moves. Do not add motion to this page.
   ========================================================================== */
body.no-motion .rv { opacity: 1 !important; transform: none !important; }
body.no-motion *,
body.no-motion *::before,
body.no-motion *::after {
  animation: none !important;
  transition: background-color .12s linear, color .12s linear, border-color .12s linear !important;
}
body.no-motion .btn:hover { transform: none; }

/* Nobody arriving here needs a promotional strip above the phone number. */
body.no-announce #announce { display: none; }

/* the call block — the single most important thing on the page */
.urgent {
  background: var(--g-deep); border-radius: var(--radius-lg);
  padding:clamp(1.6rem, 4vw, 2.5rem); color: #fff; text-align: center;
}
.urgent p, .urgent span, .urgent b, .urgent small { color: inherit; }
.urgent__label {
  font-family: var(--font-ui);   /* it is an h2 for the outline's sake, but a
                                    small uppercase label, not a display heading */
  font-size-adjust: none;
  font-size: var(--fs-xs); letter-spacing: var(--ls-widest); text-transform: uppercase;
  color: var(--c-gold-400); font-weight: 700;
}
.urgent__num {
  display: inline-block; margin:.6rem 0 .2rem;
  font-size: clamp(2.4rem, 8vw, 3.9rem); font-weight: 800; line-height: var(--lh-flat);
  color: #fff; letter-spacing: var(--ls-tight); font-variant-numeric: tabular-nums;
}
.urgent__num:hover, .urgent__num:focus-visible { color: var(--c-gold-300); }
.urgent__sub { color: var(--on-dark-2); font-size: var(--fs-base); }
.urgent__cta {
  display: inline-flex; align-items: center; justify-content: center; gap:.6rem;
  background: var(--c-gold-500); color: var(--c-dark); font-weight: 700;
  padding:1rem 2rem; border-radius: var(--radius-pill); margin-top:1.4rem;
  font-size: var(--fs-base);
}
.urgent__cta:hover { background: var(--c-gold-400); }

/* numbered practical steps */
.pstep {
  display: grid; grid-template-columns: auto 1fr; gap:1.1rem;
  padding:1.25rem 0; border-bottom: 1px solid var(--c-line);
}
.pstep:last-child { border-bottom: 0; }
.pstep__n {
  width: 38px; height: 38px; border-radius: var(--radius-pill); background: var(--c-brand-600);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-md);
}
.pstep h3 { font-size: var(--fs-base); margin-bottom:.3rem; }
.pstep p  { font-size: var(--fs-md); }

/* what is provided */
.provide {
  display: flex; gap:0.9rem; align-items: flex-start;
  padding:1rem 1.1rem; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--radius-card);
}
.provide__ic {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-sm);
  background: var(--c-brand-50); color: var(--c-brand-600); display: grid; place-items: center;
}

/* ==========================================================================
   ABOUT / SERVICES / COURSES
   ========================================================================== */

/* service detail block */
.svc {
  display: grid; gap:2rem; align-items: start;
  padding-block:clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--c-line);
}
@media (min-width: 900px) { .svc { grid-template-columns: 1fr 1.35fr; gap:3.5rem; } }
.svc:last-child { border-bottom: 0; }
.svc__head { position: sticky; top:110px; }
.svc__ic {
  width: 62px; height: 62px; border-radius: var(--radius-card); display: grid; place-items: center;
  font-size: var(--fs-2xl); background: var(--c-brand-50); color: var(--c-brand-600); margin-bottom:1rem;
}
.svc__ic--gold { background: var(--c-gold-50); color: var(--c-gold-700); }
.svc h3 { font-size: var(--fs-2xl); }
.svc__body p + p { margin-top:.9rem; }
.svc__meta {
  display: flex; flex-wrap: wrap; gap:.5rem; margin-top:1.25rem;
  padding-top:1.25rem; border-top: 1px dashed var(--c-line);
}

/* person card — used only once the client supplies real people */
/* the team: an accent avatar per role, and a rule that fills on hover */
.person {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:2rem 1.4rem 2rem; text-align: center;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med),
              border-color var(--t-med);
}
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.person__av {
  width: 4.2rem; height: 4.2rem; margin:0 auto;
  display: grid; place-items: center; border-radius: var(--radius-circle);
  font-size: var(--fs-2xl); line-height: var(--lh-flat); color: #fff;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.person__av i { font-size: inherit; line-height: var(--lh-flat); display: block; }
.person:hover .person__av { transform: scale(1.06) rotate(-6deg); }
.person__role { font-size: var(--fs-base); margin-top:1.1rem; }
.person__note { display: block; font-size: var(--fs-xs); color: var(--c-faint); margin-top:.35rem; }
.person__bar {
  position: absolute; left:0; bottom:0; height: 3px; width: 0;
  transition: width var(--t-slow) var(--ease-out);
}
.person:hover .person__bar { width: 100%; }

.pr1 .person__av, .pr1 .person__bar { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); }
.pr2 .person__av, .pr2 .person__bar { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); }
.pr3 .person__av, .pr3 .person__bar { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); }
.pr4 .person__av, .pr4 .person__bar { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); }
.pr1:hover { border-color: var(--a1-l); }
.pr2:hover { border-color: var(--a2-l); }
.pr3:hover { border-color: var(--a3-l); }
.pr4:hover { border-color: var(--a4-l); }

@media (prefers-reduced-motion: reduce) { .person, .person__av, .person__bar { transition: none; } }

.pillar {
  text-align: center; padding:1.6rem 1rem; border-radius: var(--radius-card);
  background: #fff; border: 1px solid var(--c-line);
  transition: all var(--t-med) var(--ease-out);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); border-color: var(--c-gold-300); }
.pillar__ar { font-family: var(--font-arabic-ui); font-size: var(--fs-3xl); color: var(--c-brand-600); direction: rtl; }
.pillar b { display: block; margin-top:.5rem; font-size: var(--fs-base); }
.pillar span { font-size: var(--fs-xs); color: var(--c-faint); }

/* value / mission tile */
.vtile {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--radius-card); padding:1.6rem;
  transition: all var(--t-med) var(--ease-out);
}
.vtile::before {
  content: ''; position: absolute; inset:0; background: var(--g-deep);
  transform: translateX(-101%); transition: transform var(--t-slow) var(--ease-out);
}
.vtile > * { position: relative; z-index: 1; }
.vtile:hover::before { transform: translateX(0); }
.vtile:hover h3, .vtile:hover p { color: #fff; }
.vtile:hover .vtile__n { color: var(--c-gold-400); border-color: rgba(200,162,74,.42); }
/* 1.6rem at 800 is large text, so the floor is 3:1 rather than 4.5. brand-200
   measured 1.65 on white; brand-400 gives 3.80 and still reads as a tint. */
.vtile__n {
  font-size: var(--fs-2xl); font-weight: 800; color: var(--c-brand-400);
  border-bottom: 2px solid var(--c-line); padding-bottom:.5rem; margin-bottom:.9rem;
  display: inline-block; transition: all var(--t-med);
}
.vtile h3, .vtile p { transition: color var(--t-med); }

/* ==========================================================================
   CONTACT / VENUE / YOUTH / MEMBERSHIP
   ========================================================================== */
.map {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--c-sand); aspect-ratio: 16/9; border: 1px solid var(--c-line);
}
.map iframe { position: absolute; inset:0; width: 100%; height: 100%; border: 0; }
.map__ph { position: absolute; inset:0; display: grid; place-content: center; justify-items: center; gap:.6rem; text-align: center; padding:1.5rem; }

.dl {
  display: flex; gap:1rem; align-items: center;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:1.1rem 1.25rem; transition: all var(--t-med) var(--ease-out);
}
.dl:hover { border-color: var(--c-brand-300); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.dl__ic {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--radius-sm);
  display: grid; place-items: center; font-size: var(--fs-lg);
  background: var(--c-brand-50); color: var(--c-brand-600);
}
.dl b { display: block; font-size: var(--fs-md); }
.dl span { font-size: var(--fs-xs); color: var(--c-faint); }

.cinfo {
  display: flex; gap:1rem; align-items: flex-start;
  padding:1.1rem 0; border-bottom: 1px solid var(--c-line);
}
.cinfo:last-child { border-bottom: 0; }
.cinfo__ic {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: var(--c-gold-50); color: var(--c-gold-700);
}
.cinfo b { display: block; font-size: var(--fs-sm); }
.cinfo a { color: var(--c-brand-600); font-weight: 600; }
.cinfo a:hover { text-decoration: underline; }

/* privacy / consent block — shown wherever personal data is collected */
.consent {
  background: var(--c-cream); border: 1px solid var(--c-line);
  border-radius: var(--radius-card); padding:1.1rem 1.25rem; font-size: var(--fs-sm);
}
.consent b { color: var(--c-ink); }

/* ==========================================================================
   EVENTS / NEWS / GALLERY
   ========================================================================== */
.post {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  overflow: hidden; height: 100%; display: flex; flex-direction: column;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.post:hover { transform: translateY(-7px); box-shadow: var(--shadow-lift); }
.post__media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.post:hover .post__media img { transform: scale(1.08); }
.post__cat {
  position: absolute; top:0.9rem; left:0.9rem; z-index: 2;
  font-size: var(--fs-3xs); font-weight: 700; letter-spacing: var(--ls-wide); text-transform: uppercase;
  padding:.3rem .65rem; border-radius: var(--radius-pill);
  background: var(--fill-on-dark); color: var(--c-brand-700);
}
.post__cat--gold { background: var(--c-gold-500); color: var(--c-dark); }
.post__body { padding:1.25rem; display: flex; flex-direction: column; gap:.5rem; flex: 1; }
.post__meta { font-size: var(--fs-2xs); color: var(--c-faint); display: flex; flex-wrap: wrap; gap:.8rem; }
.post h3 { font-size: var(--fs-lg); }
.post p { font-size: var(--fs-sm); }

/* featured post — wide */
.post--wide { display: grid; }
@media (min-width: 860px) { .post--wide { grid-template-columns: 1.15fr 1fr; } .post--wide .post__media { aspect-ratio: auto; height: 100%; min-height: 320px; } }
.post--wide .post__body { padding:clamp(1.5rem, 3vw, 2.5rem); justify-content: center; }
.post--wide h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }

/* album tile */
.album { position: relative; overflow: hidden; border-radius: var(--radius-card); display: block; }
.album img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.album:hover img { transform: scale(1.07); }
.album__veil {
  position: absolute; inset:0; background: var(--g-veil);
  display: flex; flex-direction: column; justify-content: flex-end; padding:1.25rem; color: #fff;
}
.album__veil b { font-size: var(--fs-base); }
.album__veil span { font-size: var(--fs-2xs); opacity: .8; }
.album__count {
  position: absolute; top:0.9rem; right:0.9rem;
  background: var(--fill-on-dark); color: var(--c-ink); font-size: var(--fs-3xs); font-weight: 700;
  padding:.25rem .6rem; border-radius: var(--radius-pill);
}

/* filter tabs */
.f-tab { cursor: pointer; border: 1px solid var(--c-line); transition: all var(--t-med) var(--ease-out); }
.f-tab:hover { border-color: var(--c-brand-300); }
.f-tab.is-on { background: var(--c-brand-600); color: #fff; border-color: var(--c-brand-600); }

/* empty state */
.empty {
  border: 2px dashed var(--c-line); border-radius: var(--radius-lg);
  padding:3rem 1.5rem; text-align: center; background: var(--c-cream);
}

/* ==========================================================================
   POLICY PAGES — long-form legal text. Readability over decoration.
   ========================================================================== */
.prose { max-width: 46rem; }
.prose h2 {
  font-size: var(--fs-2xl); margin-top:2.5rem; margin-bottom:0.9rem;
  padding-bottom:.5rem; border-bottom: 2px solid var(--c-line);
}
.prose h2:first-child { margin-top:0; }
.prose h3 { font-size: var(--fs-lg); margin-top:1.6rem; margin-bottom:.5rem; }
.prose p { margin-bottom:1rem; }
.prose ul, .prose ol { margin:0 0 1.1rem 1.25rem; }
.prose li { margin-bottom:.45rem; color: var(--c-ink-soft); font-size: var(--fs-md); }
.prose a { color: var(--c-brand-600); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom:1.25rem; font-size: var(--fs-sm); }
.prose th, .prose td { padding:.65rem .8rem; border: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.prose th { background: var(--c-cream); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--c-ink); }
.prose td { color: var(--c-ink-soft); }

/* a blank the masjid must fill before adoption */
.tofill {
  display: inline-block; background: var(--c-gold-50); border: 1px dashed var(--c-gold-600);
  color: var(--c-gold-800); font-weight: 700; font-size: var(--fs-sm);
  padding:.1rem .5rem; border-radius: var(--radius-xs);
}

/* draft banner */
.draft {
  background: var(--c-gold-50); border: 2px solid var(--c-gold-200);
  border-left: 5px solid var(--c-gold-600);
  border-radius: var(--radius-card); padding:1.25rem 1.5rem;
}
.draft h2 { border: 0 !important; margin:0 0 .5rem !important; font-size: 1.1rem !important; }

/* sticky contents */
.toc { position: sticky; top:110px; }
.toc a {
  display: block; padding:0.5rem .8rem; border-left: 2px solid var(--c-line);
  font-size: var(--fs-sm); color: var(--c-ink-soft); transition: all var(--t-fast);
}
.toc a:hover { border-color: var(--c-brand-600); color: var(--c-brand-600); background: var(--c-cream); }

/* Hero slide titles are <h2> so the page keeps a single <h1> (an sr-only one),
   but they must still render at display size. */
body .hero__title { font-size: var(--h1); color: #fff; max-width: 20ch; }
body .hero__title em { font-style: normal; color: var(--c-gold-400); }


/* Tailwind's slash-opacity BACKGROUND utilities (bg-white/12) do not generate
   under this CDN setup - verified: bg-white/12 computes to transparent while
   text-white/70 and bg-brand-600/50 both work. Chips using it fell back to
   .chip's cream background, giving WHITE TEXT ON CREAM at 1.1:1.
   Use this class on any dark band instead. 12% keeps white at 4.9:1 even on
   the lightest terracotta; 18% would drop it to 4.33 and fail. */
.chip--ondark, .jumuah-chip--ondark {
  background: var(--line-on-dark-2) !important;
  border-color: var(--line-on-dark-1) !important;
  color: #fff !important;
}
.chip--ondark b, .jumuah-chip--ondark b { color: var(--c-gold-200); }
.progress--ondark { background: var(--line-on-dark-2); }
.chip--ondark i, .jumuah-chip--ondark i { color: var(--c-gold-300); }

/* ==========================================================================
   SECTION THEMES
   Any band can be re-skinned by swapping one class. Add new dark scopes to
   the inheritance list in the base rules too (see the note by `p { color }`).
   Rule: never two identical dark bands in a row.
   ========================================================================== */
.section--dark  { background: var(--g-deep);  color: var(--on-dark-2); }
.section--brand { background: var(--g-brand); color: var(--on-dark-1); }
.section--sand  { background: var(--c-sand); }

/* ---- text on dark / brand ------------------------------------------- */
/* The element part sits in :where() so these carry a single class of weight.
   Written as `.section--dark p` they were (0,1,1) and beat every component's own
   (0,1,0) rule — a span inside a card took the band's ink instead of its own.
   That bug appeared five times before the cause was fixed here. */
.section--dark, .section--dark :where(p, li, span) {
  color: var(--on-dark-2);              /* 8.43:1 on the light end of --g-deep */
}
/* Terracotta is a much lighter ground than the deep band, so the same 80% white
   drops to 4.60:1 - passing, but with no margin. 88% gives 5.2:1. */
.section--brand, .section--brand :where(p, li, span) {
  color: var(--on-dark-1);
}
/* headings keep their original weight: dropped to :where() they lost to
   `.sec-head h2` and the band's own h2 rendered in dark ink. */
.section--dark h2, .section--dark h3, .section--dark h4,
.section--brand h2, .section--brand h3, .section--brand h4 { color: #fff; }
.section--dark .sec-head p { color: var(--on-dark-2); }
.section--brand .sec-head p { color: var(--on-dark-1); }
.section--dark .eyebrow {
  color: var(--c-gold-200); background: rgba(200,162,74,.1); border-color: rgba(200,162,74,.32);
}
/* gold-200 is only 4.37:1 on terracotta; gold-100 clears 4.5 at 5.3:1 */
.section--brand .eyebrow {
  color: var(--c-gold-100); background: var(--line-on-dark-2); border-color: var(--line-on-dark-1);
}
.section--dark .rule, .section--brand .rule { background: var(--g-gold); }

/* ---- cards on dark --------------------------------------------------- */
/* a filled card brings its own background; the band must not override it.
   `.section--dark .card` is (0,2,0) and was beating `.cf1` at (0,1,0). */
.section--dark .card:not(.card--fill), .section--brand .card:not(.card--fill) {
  background: var(--line-on-dark-3); border-color: var(--line-on-dark-2);
}
/* a filled card is white at rest even inside a dark band, so its type must stay
   dark; only the band's own translucent cards take the light-on-dark treatment */
.section--dark .card:not(.card--fill) .card__title, .section--brand .card:not(.card--fill) .card__title { color: #fff; }
.section--dark .card:not(.card--fill) .card__text,  .section--brand .card:not(.card--fill) .card__text  { color: var(--on-dark-2); }
.section--dark .card:not(.card--fill) .card__link,  .section--brand .card:not(.card--fill) .card__link  { color: var(--c-gold-400); }
.section--dark .card:not(.card--fill) .card__icon,
.section--brand .card:not(.card--fill) .card__icon {
  background: rgba(200,162,74,.14); color: var(--c-gold-300);
}
.section--dark .card:not(.card--fill)::before { background: var(--g-brand); }
.section--brand .card:not(.card--fill)::before { background: var(--g-deep); }
.section--dark .card--alt:not(.card--fill)::before { background: var(--g-goldink); }
.section--dark .card:hover, .section--brand .card:hover { border-color: transparent; }

/* ---- event rows on dark ---------------------------------------------- */
.section--dark .event {
  background: var(--line-on-dark-3); border-color: var(--line-on-dark-2);
}
.section--dark .event:hover { border-color: rgba(200,162,74,.42); }
.section--dark .event .card__title { color: #fff; }
.section--dark .event .card__text  { color: var(--on-dark-2); }

/* ---- quotes on dark --------------------------------------------------- */
.section--dark .quote {
  background: var(--line-on-dark-3); border-color: var(--line-on-dark-2);
}
.section--dark .quote blockquote { color: var(--on-dark-1); }
.section--dark .quote::before { color: rgba(200,162,74,.55); }
/* the quote card is 7% white over the deep band, so it resolves to #693124 --
   not the band's own stop. 55% white on that is 4.25:1; 72% gives 6.34. */
.section--dark .quote .text-faint { color: var(--on-dark-2) !important; }
.section--dark .avatar { background: var(--c-gold-500); color: var(--c-dark); }

/* ---- chips + course cards on dark ------------------------------------- */
.section--dark .chip, .section--brand .chip {
  background: var(--line-on-dark-3); border-color: var(--line-on-dark-2); color: var(--on-dark-2);
}
.section--dark .chip--gold { background: rgba(200,162,74,.14); border-color: rgba(200,162,74,.32); color: var(--c-gold-300); }
.section--dark .chip--brand { background: rgba(212,105,80,.18); border-color: rgba(212,105,80,.32); color: #f0b8a8; }
.section--dark .course { background: var(--line-on-dark-3); border-color: var(--line-on-dark-2); }
.section--dark .course .card__title { color: #fff; }
.section--dark .course .card__text  { color: var(--on-dark-2); }

/* ---- buttons on dark --------------------------------------------------- */
.section--dark .btn--outline, .section--brand .btn--outline {
  border-color: var(--edge-on-dark); color: #fff;
}
.section--dark .btn--outline::after, .section--brand .btn--outline::after { background: #fff; }
.section--dark .btn--outline:hover { color: var(--c-dark); }
.section--brand .btn--outline:hover { color: var(--c-brand-700); }
.section--dark .btn--ghost, .section--brand .btn--ghost { color: var(--c-gold-400); }

/* ---- the pattern overlay reads gold on dark ---------------------------- */
.section--dark .pattern, .section--brand .pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23c8a24a' stroke-width='1' stroke-opacity='.30'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z'/%3E%3Cpath d='M30 12 L48 30 L30 48 L12 30 Z'/%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3C/g%3E%3C/svg%3E");
}


/* ==========================================================================
   HOME C — a third treatment. 3D coverflow hero, trust strip, a MasjidBox-style
   prayer board, and elements that appear nowhere else. Scoped so none of it
   can leak into A or B.
   ========================================================================== */

/* ---- 3D coverflow hero ------------------------------------------------ */
.hero3d { position: relative; overflow: hidden; background: var(--g-deep);
  color: var(--on-dark-2); }
.hero3d__bg { position: absolute; inset:0; width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.hero3d__glow { position: absolute; border-radius: var(--radius-pill); filter: blur(90px); opacity: .5; pointer-events: none; }
.hero3d__inner { position: relative; z-index: 2; padding-block:clamp(3rem, 6vw, 4.5rem); }
.hero3d h1, .hero3d h2 { color: #fff; }
.hero3d :where(p, span, li) { color: var(--on-dark-2); }

.cf { padding-block:1.5rem 3.5rem; }
.cf .swiper-slide {
  width: min(320px, 74vw); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--c-dark); box-shadow: 0 30px 60px -28px rgba(0,0,0,.72);
}
.cf__card { position: relative; aspect-ratio: 3/4; }
.cf__card img { width: 100%; height: 100%; object-fit: cover; }
.cf__veil {
  position: absolute; inset:0; background: var(--g-veil);
  display: flex; flex-direction: column; justify-content: flex-end; padding:1.4rem;
}
.cf__tag {
  align-self: flex-start; font-size: var(--fs-4xs); font-weight: 700; letter-spacing: var(--ls-wider);
  text-transform: uppercase; color: var(--c-dark); background: var(--c-gold-400);
  padding:.2rem .6rem; border-radius: var(--radius-pill); margin-bottom:.6rem;
}
.cf__card h3 { color: #fff; font-size: var(--fs-lg); }
.cf__card p  { color: var(--on-dark-2); font-size: var(--fs-sm); margin-top:.25rem; }
.cf .swiper-pagination-bullet { background: var(--line-on-dark-1); opacity: 1; }
.cf .swiper-pagination-bullet-active { background: var(--c-gold-400); width: 26px; border-radius: var(--radius-pill); }

/* ---- trust strip ------------------------------------------------------- */
.trust { margin-top:-3.5rem; position: relative; z-index: 5; }
.trust__grid { display: grid; gap:1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .trust__grid { grid-template-columns: repeat(4, 1fr); } }
.tstat {
  position: relative; overflow: hidden; border-radius: var(--radius-card);
  padding:1.5rem 1.25rem; background: var(--c-brand-600); color: #fff;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.tstat :where(p, span, b) { color: inherit; }
.tstat:nth-child(2n) { background: var(--c-dark); }
.tstat:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.tstat__ic {
  width: 42px; height: 42px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--line-on-dark-2); color: #fff; font-size: var(--fs-base); margin-bottom:.9rem;
  transition: all var(--t-med) var(--ease-back);
}
.tstat:hover .tstat__ic { background: #fff; color: var(--c-brand-600); transform: rotate(-8deg); }
.tstat:nth-child(2n):hover .tstat__ic { color: var(--c-dark); }
.tstat b { display: block; font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 800; line-height: var(--lh-flat); font-variant-numeric: tabular-nums; }
.tstat span { display: block; font-size: var(--fs-xs); color: var(--on-dark-2); margin-top:.4rem; }

/* ---- prayer board (design option 2, chosen) ----------------------------
   Painted in the logo terracotta. Everything primary is FULL WHITE (8.16:1)
   and every accent is gold-200/300 (5.71 / 4.64) - gold-400 and 500 fail
   small text on this ground, so they are used only for rules and icons. ---- */
.mbox {
  background: linear-gradient(135deg, #7a2b1a 0%, #8c311e 100%);
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  color: #fff;
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(234,215,155,.24);
}
.mbox :where(p, span, b, li) { color: inherit; }
.mbox__top {
  display: grid; gap:1.25rem; padding:1.5rem clamp(1.1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line-on-dark-2);
}
@media (min-width: 820px) { .mbox__top { grid-template-columns: 1fr auto; align-items: center; } }
.mbox__clock {
  font-size: clamp(2.2rem, 5vw, 3.1rem); font-weight: 800; color: #fff !important;
  font-variant-numeric: tabular-nums; line-height: var(--lh-flat); letter-spacing: var(--ls-tight);
}
.mbox__date { color: var(--c-gold-200); font-size: var(--fs-sm); margin-top:.45rem; }
.mbox__next {
  background: rgba(0,0,0,.18); border: 1px solid rgba(234,215,155,.42);
  border-radius: var(--radius-card); padding:.9rem 1.25rem; text-align: center;
}
.mbox__next-lab { font-size: var(--fs-4xs); font-weight: 800; letter-spacing: var(--ls-widest); text-transform: uppercase; color: var(--c-gold-200); }
.mbox__next-name { color: #fff; font-weight: 700; font-size: var(--fs-base); margin-top:.15rem; }
.mbox__cd { font-size: var(--fs-2xl); font-weight: 800; color: var(--c-gold-200); font-variant-numeric: tabular-nums; line-height: var(--lh-tight); }

.mbox__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
@media (min-width: 760px) { .mbox__grid { grid-template-columns: repeat(6, 1fr); } }
.mb {
  position: relative; text-align: center; padding:1.1rem .5rem 1.25rem;
  border-right: 1px solid var(--line-on-dark-2);
  border-bottom: 1px solid var(--line-on-dark-2);
  transition: background var(--t-fast);
}
.mb:hover { background: rgba(0,0,0,.1); }
.mb__ar { font-family: var(--font-arabic-ui); direction: rtl; font-size: var(--fs-base); color: var(--c-gold-300); }
.mb__name { font-size: var(--fs-3xs); font-weight: 800; letter-spacing: var(--ls-widest); text-transform: uppercase; color: #fff; margin-top:.15rem; }
.mb__begins { font-size: var(--fs-sm); color: var(--on-dark-2); font-variant-numeric: tabular-nums; margin-top:.7rem; }
.mb__iqamah { font-size: var(--fs-xl); font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.mb__lab { font-size: var(--fs-4xs); letter-spacing: var(--ls-widest); text-transform: uppercase; color: var(--c-gold-200); }
/* the window you are currently in: a darker inset plus a gold rule */
.mb.is-active { background: rgba(0,0,0,.24); }
.mb.is-active::before { content: ''; position: absolute; inset:0 0 auto; height: 3px; background: var(--g-gold); }
.mb.is-active .mb__name   { color: var(--c-gold-200); }
.mb.is-active .mb__iqamah { color: var(--c-gold-200); }
.mb.is-active .mb__ar     { color: var(--c-gold-300); }
.mbox__foot {
  display: flex; flex-wrap: wrap; gap:.6rem 1rem; align-items: center; justify-content: space-between;
  padding:.9rem clamp(1.1rem, 3vw, 2rem); background: rgba(0,0,0,.18);
}

/* ---- a day at the masjid, as a rail ------------------------------------- */
.dayrail { position: relative; display: grid; gap:0; }
@media (min-width: 800px) { .dayrail { grid-template-columns: repeat(5, 1fr); } }
.dayrail::before {
  content: ''; position: absolute; left:0; right:0; top:46px; height: 2px;
  background: linear-gradient(90deg, var(--c-line), var(--c-brand-300), var(--c-line));
}
@media (max-width: 799px) {
  .dayrail::before { top:0; bottom:0; left:27px; right:auto; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--c-line), var(--c-brand-300), var(--c-line)); }
}
.dayrail__i { position: relative; padding:0 1rem 2rem; text-align: center; }
@media (max-width: 799px) { .dayrail__i { text-align: left; padding:0 0 1.75rem 4.5rem; } }
.dayrail__dot {
  position: relative; z-index: 2; width: 56px; height: 56px; border-radius: var(--radius-pill);
  display: grid; place-items: center; margin:20px auto 1rem;
  background: #fff; border: 2px solid var(--c-brand-200); color: var(--c-brand-600); font-size: var(--fs-lg);
  transition: all var(--t-med) var(--ease-back);
}
@media (max-width: 799px) { .dayrail__dot { position: absolute; left:0; top:0; margin:0; } }
.dayrail__i:hover .dayrail__dot { background: var(--c-brand-600); border-color: var(--c-brand-600); color: #fff; transform: scale(1.08); }
.dayrail__t { font-size: var(--fs-2xs); font-weight: 800; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--c-gold-700); }
.dayrail__i h3 { font-size: var(--fs-base); margin-top:.2rem; }
.dayrail__i p { font-size: var(--fs-sm); margin-top:.3rem; }

/* ---- angled service tile ------------------------------------------------ */
.atile {
  position: relative; overflow: hidden; display: block; height: 100%;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card);
  padding:1.6rem 1.4rem; transition: all var(--t-med) var(--ease-out);
}
.atile::after {
  content: ''; position: absolute; right:-40px; bottom:-40px; width: 110px; height: 110px;
  background: var(--c-brand-50); border-radius: var(--radius-card); transform: rotate(32deg);
  transition: all var(--t-slow) var(--ease-out);
}
.atile:hover { transform: translateY(-7px); box-shadow: var(--shadow-lift); border-color: transparent; }
.atile:hover::after { background: var(--c-brand-600); right:-20px; bottom:-20px; transform: rotate(14deg) scale(1.25); }
.atile > * { position: relative; z-index: 1; }
.atile__ic { font-size: var(--fs-3xl); color: var(--c-brand-600); }
.atile h3 { margin:.8rem 0 .4rem; font-size: var(--fs-base); }
.atile p { font-size: var(--fs-sm); }
.atile__go { font-size: var(--fs-xs); font-weight: 700; color: var(--c-gold-700); margin-top:.9rem; display: inline-block; }

/* ---- ayah marquee band --------------------------------------------------- */
.ayah { background: var(--c-cream); border-block: 1px solid var(--c-line); padding-block:1.1rem; }
.ayah .marquee__track { gap:4rem; padding-right:4rem; animation-duration: 46s; }
.ayah__item { display: inline-flex; align-items: center; gap:1rem; white-space: nowrap; }
.ayah__ar { font-family: var(--font-arabic); direction: rtl; font-size: var(--fs-xl); color: var(--c-brand-600); }
.ayah__en { font-size: var(--fs-sm); color: var(--c-ink-soft); font-style: italic; }
.ayah__dot { width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--c-gold-500); flex-shrink: 0; }
/* the lower band of a pair travels the other way, so two bands framing a section
   read as deliberate rather than as the same strip printed twice */
.ayah--rev .marquee__track { animation-direction: reverse; }

/* ==========================================================================
   DESIGN OPTIONS MEGA MENU — review aid only.
   Delete this block, the .mega markup in index.html's shell, and the
   design-*.html pages once the client has signed the options off.
   ========================================================================== */
.mega-wrap { position: static; }
.nav__link--review {
  border: 1px dashed var(--c-gold-600); color: var(--c-gold-800);
  padding:.35rem .8rem; border-radius: var(--radius-pill);
}
.nav__link--review::after { display: none; }
.nav__link--review:hover { background: var(--c-gold-50); color: var(--c-gold-800); }

.mega {
  position: absolute; left:0; right:0; top:100%;
  background: #fff; border-top: 1px solid var(--c-line);
  box-shadow: 0 26px 50px -24px rgba(43,26,20,.32);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--t-med) var(--ease-out); z-index: var(--z-nav);
}
.mega-wrap:hover .mega, .mega-wrap:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega__inner { display: grid; gap:1.75rem; padding:1.75rem 0 2rem; }
@media (min-width: 900px) { .mega__inner { grid-template-columns: repeat(4, 1fr); } }
.mega__col h4 {
  font-size: var(--fs-3xs); font-weight: 800; letter-spacing: var(--ls-widest); text-transform: uppercase;
  color: var(--c-gold-800); padding-bottom:.55rem; margin-bottom:.5rem;
  border-bottom: 1px solid var(--c-line);
}
.mega__link {
  display: flex; gap:.7rem; align-items: flex-start;
  padding:.5rem .6rem; border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}
.mega__link:hover { background: var(--c-cream); }
.mega__link i { color: var(--c-brand-600); width: 1.1rem; text-align: center; margin-top:.15rem; }
.mega__link b { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); }
.mega__link span { font-size: var(--fs-2xs); color: var(--c-faint); }
.mega__soon { opacity: .5; pointer-events: none; }
.mega__note {
  grid-column: 1 / -1; font-size: var(--fs-2xs); color: var(--c-faint);
  border-top: 1px dashed var(--c-line); padding-top:.8rem;
}

/* ==========================================================================
   DESIGN OPTION SHOWCASE PAGES
   ========================================================================== */
.opt { border-top: 1px solid var(--c-line); padding-block:clamp(2.5rem, 5vw, 4rem); }
.opt:first-of-type { border-top: 0; }
.opt__head { display: flex; flex-wrap: wrap; align-items: baseline; gap:.6rem 1rem; margin-bottom:1.5rem; }
.opt__n {
  width: 34px; height: 34px; border-radius: var(--radius-pill); flex-shrink: 0;
  background: var(--c-brand-600); color: #fff; font-weight: 800; font-size: var(--fs-sm);
  display: grid; place-items: center;
}
.opt__title { font-size: var(--fs-xl); font-weight: 700; }
.opt__for { font-size: var(--fs-xs); color: var(--c-faint); }
.opt__meta { display: flex; flex-wrap: wrap; gap:.45rem; margin-top:1rem; }
.opt__meta .chip { font-size: var(--fs-3xs); }
.opt__pro { color: var(--c-sage-700, #1f7a5c); }
.tag-good, .tag-warn {
  font-size: var(--fs-3xs); font-weight: 600; padding:.28rem .65rem; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap:.35rem;
}
.tag-good { background: #e9f6f0; color: #15694c; border: 1px solid #c9e7db; }
.tag-warn { background: var(--c-gold-50); color: var(--c-gold-800); border: 1px solid var(--c-gold-100); }

/* ---- option 3: compact bar --------------------------------------------- */
.pbar {
  display: flex; flex-wrap: wrap; align-items: stretch;
  background: var(--c-dark); border-radius: var(--radius-card); overflow: hidden;
}
.pbar p, .pbar span, .pbar b { color: inherit; }
.pbar__next {
  display: flex; align-items: center; gap:.9rem; padding:1rem 1.25rem;
  background: var(--c-brand-600); color: #fff; flex: 0 0 auto;
}
.pbar__next b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.pbar__next span { font-size: var(--fs-4xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--on-dark-2); display: block; }
.pbar__list { display: flex; flex: 1 1 auto; flex-wrap: wrap; }
.pbar__i {
  flex: 1 1 auto; min-width: 88px; padding:0.9rem .6rem; text-align: center;
  border-left: 1px solid var(--line-on-dark-3); color: var(--on-dark-2);
}
.pbar__i b { display: block; color: #fff; font-size: var(--fs-base); font-variant-numeric: tabular-nums; }
.pbar__i span { font-size: var(--fs-4xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--on-dark-3); }
.pbar__i.is-next { background: rgba(200,162,74,.14); }
.pbar__i.is-next b { color: var(--c-gold-300); }

/* ---- option 4: split hero card ------------------------------------------ */
.psplit { display: grid; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--c-line); }
@media (min-width: 760px) { .psplit { grid-template-columns: .85fr 1.15fr; } }
.psplit__now { background: var(--g-brand); color: #fff; padding:2rem 1.6rem; text-align: center; }
.psplit__now p, .psplit__now span, .psplit__now b { color: inherit; }
.psplit__lab { font-size: var(--fs-4xs); font-weight: 800; letter-spacing: var(--ls-widest); text-transform: uppercase; color: var(--c-gold-100); }
.psplit__name { font-size: var(--fs-3xl); font-weight: 800; margin-top:.3rem; }
.psplit__time { font-size: var(--fs-5xl); font-weight: 800; line-height: var(--lh-flat); font-variant-numeric: tabular-nums; }
.psplit__cd { font-size: var(--fs-md); color: var(--on-dark-1); margin-top:.7rem; font-variant-numeric: tabular-nums; }
.psplit__rows { background: #fff; }
.psplit__r {
  display: grid; grid-template-columns: 1fr auto auto; gap:1rem; align-items: center;
  padding:0.7rem 1.25rem; border-bottom: 1px solid var(--c-line); font-size: var(--fs-md);
}
.psplit__r:last-child { border-bottom: 0; }
.psplit__r b { font-variant-numeric: tabular-nums; min-width: 4.2rem; text-align: right; }
.psplit__r .t-b { color: var(--c-faint); font-variant-numeric: tabular-nums; min-width: 4.2rem; text-align: right; }
.psplit__r.is-next { background: var(--c-gold-50); }
.psplit__r.is-next b { color: var(--c-brand-700); }

/* ---- option 5: classic table -------------------------------------------- */
.ptable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-card); overflow: hidden; }
.ptable th, .ptable td { padding:0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--c-line); }
.ptable thead th { background: var(--c-cream); font-size: var(--fs-3xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--c-ink-soft); }
.ptable td { font-variant-numeric: tabular-nums; }
.ptable td.j { font-weight: 800; color: var(--c-brand-600); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tr.is-next td { background: var(--c-gold-50); }
.ptable .ar { font-family: var(--font-arabic-ui); direction: rtl; color: var(--c-gold-700); margin-left:.45rem; }

/* ---- option 6: ring / dial ---------------------------------------------- */
.pring { display: grid; gap:1.5rem; align-items: center; }
@media (min-width: 720px) { .pring { grid-template-columns: auto 1fr; } }
.pring__dial { position: relative; width: 210px; height: 210px; margin-inline:auto; }
.pring__dial svg { transform: rotate(-90deg); }
.pring__track { fill: none; stroke: var(--c-sand); stroke-width: 14; }
.pring__fill  { fill: none; stroke: url(#ringgrad); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease-out); }
.pring__mid {
  position: absolute; inset:0; display: grid; place-content: center; text-align: center;
}
.pring__mid span { font-size: var(--fs-4xs); font-weight: 800; letter-spacing: var(--ls-widest); text-transform: uppercase; color: var(--c-faint); }
.pring__mid b { display: block; font-size: var(--fs-2xl); font-weight: 800; color: var(--c-brand-600); font-variant-numeric: tabular-nums; }
.pring__mid i { font-style: normal; font-size: var(--fs-xs); color: var(--c-ink-soft); font-variant-numeric: tabular-nums; }
.pring__list { display: grid; grid-template-columns: repeat(2,1fr); gap:.5rem; }
@media (min-width: 520px) { .pring__list { grid-template-columns: repeat(3,1fr); } }
.pring__i { padding:.7rem .8rem; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; }
.pring__i span { display: block; font-size: var(--fs-4xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--c-faint); }
.pring__i b { font-size: var(--fs-base); font-variant-numeric: tabular-nums; }
.pring__i.is-next { border-color: var(--c-brand-600); background: var(--c-brand-50); }
.pring__i.is-next b { color: var(--c-brand-700); }

/* ==========================================================================
   QUICK LINKS — the four actions under the prayer board.
   Each is FILLED with its own colour at rest; hovering deepens it to a richer
   shade of the same hue and flips the icon tile to solid white.

   Every value measured against the actual fill:
     rest fill      white title   description @86%
     terracotta     6.24          5.05
     deep teal      7.14          5.76
     deep indigo   10.51          8.24
     moss green     5.82          4.81
   Hover fills clear 11.4 - 16.5. The arrow stays WHITE at rest because
   gold-200 is only 4.37 on terracotta and 4.07 on moss; it turns gold on
   hover, where the ground is much darker.
   ========================================================================== */
.qlink {
  position: relative; overflow: hidden; display: flex; align-items: center; gap:1rem;
  background: #fff; border: 1px solid var(--c-line); border-left-width: 4px;
  border-radius: var(--radius-card);
  padding:1.1rem 1.1rem 1.1rem 1.25rem; height: 100%; color: var(--c-ink);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med),
              border-color var(--t-med), color var(--t-med);
}
.qlink:hover { color: #fff; border-color: transparent; }
.qlink :where(span, i, b) { color: inherit; }
.qlink .qlink__ic i { color: inherit; }   /* inherit the TILE's colour, not the card's */
/* The colour wipes in from the left rather than fading. The service cards
   directly above fill vertically, so the two rows move differently and do not
   read as the same component twice. */
.qlink::before {
  content: ''; position: absolute; inset:0; z-index: 0;
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--t-slow) var(--ease-out);
}
.qlink > * { position: relative; z-index: 1; }
.qlink:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.qlink:hover::before { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .qlink::before { transition: none; }
}

.qlink__ic {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-sm);
  display: grid; place-items: center; font-size: var(--fs-lg);
  /* the tile colour and its glyph both arrive from the modifier below */
  transition: all var(--t-med) var(--ease-back);
}
.qlink:hover .qlink__ic { background: #fff; transform: rotate(-7deg); }

.qlink__t { display: block; font-weight: 700; font-size: var(--fs-base); color: var(--c-ink); line-height: var(--lh-snug); transition: color var(--t-med); }
.qlink__d { display: block; font-size: var(--fs-xs); color: var(--c-ink-soft); margin-top:.15rem; transition: color var(--t-med); }
.qlink__go {
  margin-left:auto; flex-shrink: 0;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  border-radius: var(--radius-circle); border: 1px solid var(--c-line);
  color: var(--c-brand-600); font-size: var(--fs-xs);
  transition: transform var(--t-med) var(--ease-out), color var(--t-med),
              border-color var(--t-med), background var(--t-med);
}
.qlink:hover .qlink__t { color: #fff; }
.qlink:hover .qlink__d { color: var(--on-dark-1); }
/* white, not gold-200: gold measured 4.07:1 on the olive hover fill */
.qlink:hover .qlink__go {
  color: #fff; border-color: var(--edge-on-dark); background: rgba(0,0,0,.18);
  transform: translateX(4px);
}

/* ---- four accents, on the icon tile and on the hover fill ----------------
   Four distinct hues (11 / 178 / 219 / 82 degrees), deep and muted so they read
   as a jewel-tone set beside terracotta rather than a different brand.
   -------------------------------------------------------------------------- */
.qlink--give   { border-left-color: var(--a1-d); }
.qlink--learn  { border-left-color: var(--a2-d); }
.qlink--urgent { border-left-color: var(--a3-d); }
.qlink--hire   { border-left-color: var(--a4-d); }

.qlink--give   .qlink__ic { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); color: #fff; }
.qlink--learn  .qlink__ic { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); color: #fff; }
.qlink--urgent .qlink__ic { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); color: #fff; }
.qlink--hire   .qlink__ic { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); color: #fff; }

.qlink--give::before   { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); }
.qlink--learn::before  { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); }
.qlink--urgent::before { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); }
.qlink--hire::before   { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); }

.qlink--give:hover   .qlink__ic { color: var(--a1-d); }
.qlink--learn:hover  .qlink__ic { color: var(--a2-d); }
.qlink--urgent:hover .qlink__ic { color: var(--a3-d); }
.qlink--hire:hover   .qlink__ic { color: var(--a4-d); }

/* on hover the white tile carries the card's own colour as its glyph */
.qlink--give:hover   .qlink__ic { color: var(--a1-d); }
.qlink--learn:hover  .qlink__ic { color: var(--a2-d); }
.qlink--urgent:hover .qlink__ic { color: var(--a3-d); }
.qlink--hire:hover   .qlink__ic { color: var(--a4-d); }

/* ==========================================================================
   DESIGN OPTION DEMOS — review pages only.
   Everything here is scoped under .dopt so it cannot leak into the real site.
   Delete this block with the design-*.html pages at sign-off.
   ========================================================================== */
.dopt { border-radius: var(--radius-lg); overflow: hidden; }

/* ---- H1: full-bleed photo ---------------------------------------------- */
.dh1 { position: relative; min-height: 340px; display: flex; align-items: center; }
.dh1 img { position: absolute; inset:0; width: 100%; height: 100%; object-fit: cover; }
.dh1__veil { position: absolute; inset:0;
  background: linear-gradient(100deg, rgba(29,17,13,.72) 0%, rgba(43,26,20,.72) 45%, rgba(43,26,20,.24) 100%); }
.dh1__c { color: #fff; position: relative; padding:2.5rem; max-width: 34rem; }

/* ---- H2: split, copy + collage ------------------------------------------ */
.dh2 { display: grid; gap:0; background: var(--c-cream); }
@media (min-width: 820px) { .dh2 { grid-template-columns: 1fr 1fr; } }
.dh2__c { padding:2.5rem; align-self: center; }
.dh2__g { display: grid; grid-template-columns: 1fr 1fr; gap:.6rem; padding:.6rem; }
.dh2__g img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius-sm); }

/* ---- H3: dark gradient, centred ----------------------------------------- */
.dh3 { color: #fff; position: relative; background: var(--g-deep); padding:3rem 2rem; text-align: center; overflow: hidden; }
.dh3 img { position: absolute; inset:0; width: 100%; height: 100%; object-fit: cover; opacity: .2; }
.dh3__c { position: relative; max-width: 40rem; margin-inline:auto; }

/* ---- H4: copy + prayer board -------------------------------------------- */
.dh4 { color: #fff; display: grid; gap:0; background: var(--c-darker); }
@media (min-width: 900px) { .dh4 { grid-template-columns: 1.1fr .9fr; } }
.dh4__c { padding:2.5rem; align-self: center; position: relative; }
.dh4__b { background: var(--line-on-dark-3); padding:1.5rem; display: grid; gap:.5rem; align-content: center; }
.dh4__r { display: flex; justify-content: space-between; gap:1rem; padding:.5rem .75rem;
  border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.dh4__r b { font-variant-numeric: tabular-nums; }
.dh4__r.on { background: rgba(200,162,74,.14); }
.dh4__r.on b, .dh4__r.on span { color: var(--c-gold-200); }

/* ---- H5: terracotta panel, no photo -------------------------------------- */
.dh5 { color: #fff; position: relative; background: var(--g-brand); padding:3rem 2rem; overflow: hidden; }
.dh5__c { position: relative; max-width: 38rem; }

/* ---- H6: bordered, quiet -------------------------------------------------- */
.dh6 { background: #fff; border: 1px solid var(--c-line); padding:3rem 2rem; text-align: center; }
.dh6__rule { width: 62px; height: 3px; background: var(--g-warm); margin:1rem auto; border-radius: var(--radius-pill); }

/* ==========================================================================
   CARD / LISTING STYLES
   ========================================================================== */
.dc-grid { display: grid; gap:1rem; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); }

/* C1 classic */
.dc1 { background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);overflow:hidden; }
.dc1 img { width:100%;height:120px;object-fit:cover; }
.dc1 div { padding:1rem; }

/* C2 icon-left rows */
.dc2 { display:flex;gap:1rem;align-items:flex-start;background: #fff;border: 1px solid var(--c-line);
  border-radius: var(--radius-card);padding:1.1rem;transition:all var(--t-med) var(--ease-out); }
.dc2:hover { border-color: var(--c-brand-300);transform:translateX(5px); }
.dc2 i.ic { width:42px;height:42px;flex-shrink:0;border-radius: var(--radius-sm);display:grid;place-items:center;
  background: var(--c-brand-50);color: var(--c-brand-600); }

/* C3 big numeral */
.dc3 { background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);padding:1.4rem;position:relative;overflow:hidden; }
/* a watermark, not content - it carries aria-hidden in the markup, so it is
   exempt from contrast. Kept faint on purpose. */
.dc3 b.n { position:absolute;right:.6rem;top:.2rem;font-size:3.6rem;font-weight:800;color: var(--c-brand-50);line-height: var(--lh-flat); }
.dc3 > * { position:relative; }

/* C4 top accent */
.dc4 { background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);padding:1.4rem;border-top: 4px solid var(--c-gold-500);
  transition:all var(--t-med) var(--ease-out); }
.dc4:hover { border-top-color: var(--c-brand-600);transform:translateY(-5px);box-shadow: var(--shadow-card); }

/* C5 dark + gold */
.dc5 { background: var(--g-deep);border-radius: var(--radius-card);padding:1.4rem;color: #fff; }
.dc5 :where(p,span,b){color:inherit}
.dc5 i.ic { width:42px;height:42px;border-radius: var(--radius-sm);display:grid;place-items:center;
  background: rgba(200,162,74,.18);color: var(--c-gold-300);margin-bottom:.8rem; }
.dc5 h4 { color: #fff; } .dc5 p { color: var(--on-dark-2); }

/* C6 letter badge */
.dc6 { background: var(--c-cream);border-radius: var(--radius-card);padding:1.4rem;border-left: 4px solid var(--c-brand-600); }
.dc6 b.l { display:inline-grid;place-items:center;width:38px;height:38px;border-radius: var(--radius-pill);
  background: var(--c-brand-600);color: #fff;font-weight:800;margin-bottom:.7rem; }

/* C7 corner ribbon */
.dc7 { position:relative;background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);padding:1.4rem;overflow:hidden; }
.dc7::after { content:'';position:absolute;right:-30px;top:-30px;width:70px;height:70px;background: var(--c-gold-100);
  transform:rotate(45deg);transition:background var(--t-med); }
.dc7:hover::after { background: var(--c-brand-600); }

/* C8 split colour */
.dc8 { display:grid;grid-template-columns:auto 1fr;border-radius: var(--radius-card);overflow:hidden;border: 1px solid var(--c-line); }
.dc8 .side { background: var(--g-brand);color: #fff;display:grid;place-items:center;padding:0 1.1rem;font-size: var(--fs-xl); }
.dc8 .body { background: #fff;padding:1.25rem; }

/* ==========================================================================
   CTA / DONATION BANDS
   ========================================================================== */
.dt { border-radius: var(--radius-card); overflow: hidden; position: relative; }
.dt :where(p,span,b,li,h3) { color: inherit; }
.dt1 { background: var(--g-brand); color: #fff; padding:2.2rem; text-align:center; }
.dt2 { background: var(--g-deep); color: #fff; padding:2.2rem; display:grid; gap:1.25rem; }
@media(min-width:760px){ .dt2 { grid-template-columns:1fr auto; align-items:center; text-align:left; } }
.dt3 { position:relative; min-height:230px; display:grid; align-items:center; color: #fff; }
.dt3 img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.dt3 .in { position:relative;padding:2.2rem;background: linear-gradient(90deg,rgba(29,17,13,.72),rgba(29,17,13,.55)); }
.dt4 { background: #fff;border: 2px solid var(--c-brand-600);border-radius: var(--radius-card);padding:2rem;text-align:center; }
.dt5 { background: var(--c-cream);border-left: 5px solid var(--c-gold-500);padding:2rem; }
/* white is 3.80:1 on #a67c1a, so this band uses a darker bronze: 7.63:1 */
.dt6 { background: linear-gradient(135deg,#4a360c 0%,#6b4f12 100%); color: #fff; padding:2rem; text-align:center; }
.dt7 { display:grid;gap:1px;background: var(--c-line);border-radius: var(--radius-card);overflow:hidden; }
@media(min-width:680px){ .dt7 { grid-template-columns:1fr 1fr; } }
.dt7 > div { background: #fff;padding:2rem;text-align:center; }
.dt7 > div.alt { background: var(--g-brand);color: #fff; }
.dt7 > div.alt :where(p,span,h3){color:inherit}
.dt8 { background: var(--c-darker); color: #fff; padding:1.1rem 1.5rem; display:flex; flex-wrap:wrap;
  gap:.8rem 1.25rem; align-items:center; justify-content:space-between; }

/* ==========================================================================
   ANNOUNCEMENT BARS
   ========================================================================== */
.da { border-radius: var(--radius-sm); padding:.8rem 1.1rem; display:flex; flex-wrap:wrap;
  gap:.6rem 1rem; align-items:center; font-size: var(--fs-sm); }
.da :where(p,span,b) { color: inherit; }
.da1 { background: var(--c-gold-800); color: #fff; }
.da2 { background: var(--c-brand-600); color: #fff; }
.da3 { background: var(--c-cream); border: 1px solid var(--c-gold-200); color: var(--c-ink); }
.da4 { background: var(--c-darker); color: #fff; border-left: 4px solid var(--c-gold-500); }
.da5 { background: #fff; border: 1px dashed var(--c-brand-300); color: var(--c-ink); }
.da6 { background: linear-gradient(90deg,var(--c-brand-700),var(--c-gold-800)); color: #fff; }

/* ==========================================================================
   DESIGN OPTION DEMOS, PART 2 — listings, testimonials, footers.
   Review pages only. CSS-only wherever possible, so nothing here depends on
   JavaScript to demonstrate.
   ========================================================================== */

/* ---- L1 card grid -------------------------------------------------------- */
.dl1 { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
.dl1 article { background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);overflow:hidden;
  transition:all var(--t-med) var(--ease-out); }
.dl1 article:hover { transform:translateY(-5px); box-shadow: var(--shadow-card); }
.dl1 img { width:100%;height:110px;object-fit:cover; }
.dl1 .b { padding:.9rem; }

/* ---- L2 horizontal rows -------------------------------------------------- */
.dl2 { display:grid; gap:.7rem; }
.dl2 article { display:grid; grid-template-columns:96px 1fr auto; gap:1rem; align-items:center;
  background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);padding:.7rem;
  transition:all var(--t-med) var(--ease-out); }
.dl2 article:hover { border-color: var(--c-brand-300); transform:translateX(5px); }
.dl2 img { width:96px;height:66px;object-fit:cover;border-radius: var(--radius-sm); }

/* ---- L3 bento mosaic ------------------------------------------------------ */
.dl3 { display:grid; gap:.75rem; grid-template-columns:repeat(2,1fr); }
@media(min-width:760px){ .dl3 { grid-template-columns:repeat(4,1fr); grid-auto-rows:118px; }
  .dl3 > *:nth-child(1){ grid-column:span 2; grid-row:span 2; }
  .dl3 > *:nth-child(4){ grid-column:span 2; } }
.dl3 article { position:relative; border-radius: var(--radius-card); overflow:hidden; min-height:118px; }
.dl3 img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform var(--t-slow) var(--ease-out); }
.dl3 article:hover img { transform:scale(1.08); }
.dl3 .v { position:absolute;inset:0;background: var(--g-veil);display:flex;align-items:flex-end;padding:0.9rem;color: #fff; }
.dl3 .v :where(b,span){color:inherit}

/* ---- L4 scroll-snap carousel ---------------------------------------------- */
.dl4 { display:flex; gap:1rem; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:.75rem;
  scrollbar-width:thin; }
.dl4 article { flex:0 0 min(240px,72vw); scroll-snap-align:start; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--radius-card); overflow:hidden; }
.dl4 img { width:100%;height:120px;object-fit:cover; }
.dl4 .b { padding:.9rem; }

/* ---- L5 continuous marquee ------------------------------------------------ */
.dl5 .marquee__track { gap:1rem; padding-right:1rem; animation-duration:34s; }
.dl5 article { flex:0 0 210px; background: #fff;border: 1px solid var(--c-line);
  border-radius: var(--radius-card); padding:1rem; }

/* ---- L6 accordion (native details) ---------------------------------------- */
.dl6 details { background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);
  margin-bottom:.6rem; overflow:hidden; }
.dl6 summary { cursor:pointer; padding:1rem 1.25rem; font-weight:700; display:flex;
  align-items:center; justify-content:space-between; gap:1rem; list-style:none; }
.dl6 summary::-webkit-details-marker { display:none; }
.dl6 summary::after { content:'+'; color: var(--c-brand-600); font-weight:800; font-size: var(--fs-lg); }
.dl6 details[open] summary::after { content:'\\2212'; }
.dl6 details[open] { border-color: var(--c-brand-200); }
.dl6 .c { padding:0 1.25rem 1.1rem; font-size: var(--fs-sm); color: var(--c-ink-soft); }

/* ---- L7 hover-reveal tiles ------------------------------------------------- */
.dl7 { display:grid; gap:.75rem; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }
.dl7 article { position:relative; height:170px; border-radius: var(--radius-card); overflow:hidden; }
.dl7 img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.dl7 .v { position:absolute;inset:0;background: linear-gradient(to top,rgba(29,17,13,.72),rgba(29,17,13,.24));
  display:flex;flex-direction:column;justify-content:flex-end;padding:.9rem;color: #fff; }
.dl7 .v :where(b,p){color:inherit}
.dl7 .v p { max-height:0; opacity:0; overflow:hidden; font-size: var(--fs-xs);
  transition:max-height var(--t-slow) var(--ease-out), opacity var(--t-med); }
.dl7 article:hover .v p { max-height:4rem; opacity:.9; }

/* ---- L8 overlapping stack -------------------------------------------------- */
.dl8 { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.dl8 article { position:relative; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-card); padding:2rem 1.1rem 1.1rem; margin-top:22px;
  transition:all var(--t-med) var(--ease-out); }
.dl8 .ic { position:absolute; top:-22px; left:1.1rem; width:44px; height:44px; border-radius: var(--radius-sm);
  display:grid; place-items:center; background: var(--g-brand); color: #fff; box-shadow: var(--shadow-brand); }
.dl8 article:hover { transform:translateY(-5px); box-shadow: var(--shadow-card); }

/* ==========================================================================
   TESTIMONIAL STYLES
   ========================================================================== */
.dq-grid { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.dq1 { background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);padding:1.4rem;position:relative; }
.dq1::before { content:'\\201C'; position:absolute;top:.1rem;right:1rem;font-family:Georgia,serif;
  font-size:4rem;line-height: var(--lh-flat);color: var(--c-brand-100); }
.dq2 { background: var(--g-deep); color: #fff; border-radius: var(--radius-lg); padding:2.2rem; text-align:center; }
.dq2 :where(p,span,b){color:inherit}
.dq2 blockquote { font-size: var(--fs-lg); line-height: var(--lh-base); }
.dq3 { border-left: 3px solid var(--c-gold-500); padding:.4rem 0 .4rem 1.25rem; }
.dq4 { display:grid; gap:1rem; grid-template-columns:auto 1fr; align-items:start;
  background: var(--c-cream); border-radius: var(--radius-card); padding:1.25rem; }
.dq5 { background: #fff;border: 1px solid var(--c-line);border-radius: var(--radius-card);overflow:hidden; }
.dq5 .top { background: var(--g-brand); height:5px; }
.dq5 .b { padding:1.25rem; }
.dq6 { text-align:center; max-width:40rem; margin-inline:auto; }
.dq6 blockquote { font-size: var(--fs-xl); line-height: var(--lh-base); color: var(--c-ink); }

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
.df { border-radius: var(--radius-card); overflow:hidden; }
.df :where(p,span,b,li,a,h4) { color: inherit; }
.df1 { background: var(--c-dark); color: var(--on-dark-2); padding:2rem; }
.df1 h4 { color: #fff; font-size: var(--fs-sm); margin-bottom:.6rem; }
.df1 .g { display:grid; gap:1.4rem; }
@media(min-width:760px){ .df1 .g { grid-template-columns:1.4fr 1fr 1fr; } }
.df2 { background: var(--c-dark); color: var(--on-dark-2); padding:2rem; text-align:center; }
.df3 { background: var(--c-darker); color: var(--on-dark-2); }
.df3 .strip { background: var(--g-brand); color: #fff; padding:.8rem 1.4rem; display:flex;
  flex-wrap:wrap; gap:.5rem 1.25rem; justify-content:center; font-size: var(--fs-xs); font-variant-numeric:tabular-nums; }
.df3 .strip :where(b,span){color:inherit}
.df3 .body { padding:1.6rem; display:grid; gap:1.25rem; }
@media(min-width:760px){ .df3 .body { grid-template-columns:1fr 1fr 1fr; } }
.df4 { background: var(--c-cream); border: 1px solid var(--c-line); color: var(--c-ink-soft); padding:1.25rem;
  display:flex; flex-wrap:wrap; gap:.8rem 1.4rem; align-items:center; justify-content:space-between; font-size: var(--fs-sm); }
.df4 :where(p,span,a){ color: var(--c-ink-soft); }


/* ==========================================================================
   FILLED SERVICE CARD — .card plus .card--fill and one of .cf1 to .cf4.
   Coloured at rest, deepening on hover. Shares the accent set with .qlink,
   so the two rows on the homepage read as one system rather than two.
   Every value measured against the LIGHT end of each gradient - the worst case.
   ========================================================================== */
/* At rest this is simply the base card: white, dark type, and an icon tile in
   its own accent. The colour arrives on hover, and each card's is different —
   eight saturated cards at once is a wall; eight white ones that light up is not. */
.card--fill { border: 1px solid var(--c-line); color: var(--c-ink); }
.card--fill .card__icon i { color: inherit; }   /* inherit the TILE's colour */
.card--fill:hover { border-color: transparent; }

/* A dark band paints its own type: `.section--dark h3` is (0,1,1) and beats
   `.card__title` at (0,1,0), so on Home B the title went white on a white card.
   These are (0,2,0) and say plainly that a filled card keeps its own ink. */
.card--fill .card__title { color: var(--c-ink); }
.card--fill .card__text  { color: var(--c-ink-soft); }
.card--fill .card__link  { color: var(--c-brand-600); }
.card--fill:hover .card__title,
.card--fill:hover .card__text,
.card--fill:hover .card__link { color: #fff; }

/* the icon tile: accent at rest on the white card, inverted once the card fills */
.cf1 .card__icon { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); color: #fff; }
.cf2 .card__icon { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); color: #fff; }
.cf3 .card__icon { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); color: #fff; }
.cf4 .card__icon { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); color: #fff; }

.card--fill:hover .card__icon { background: #fff; transform: rotate(-8deg) scale(1.04); }
.cf1:hover .card__icon { color: var(--a1-d); }
.cf2:hover .card__icon { color: var(--a2-d); }
.cf3:hover .card__icon { color: var(--a3-d); }
.cf4:hover .card__icon { color: var(--a4-d); }

/* the hover fill, one accent each */
.cf1::before { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%) !important; }
.cf2::before { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%) !important; }
.cf3::before { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%) !important; }
.cf4::before { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%) !important; }

/* Tailwind's preflight ships `[hidden]{display:none}` at the very bottom of the
   cascade, so any display utility or component rule outranks it and an element
   we mark hidden keeps painting. State it with the weight the attribute means. */
[hidden] { display: none !important; }

/* ==========================================================================
   GLOBAL MODAL  —  .mdl
   Stamped into every page from the footer shell; driven by main.js.
   Opened by any element carrying  data-enrol="Course name".
   ========================================================================== */
.mdl {
  position: fixed; inset:0; z-index: var(--z-modal);
  display: grid; place-items: center; padding:1.25rem;
  background: rgba(26,14,10,.72);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out);
}
/* Inertness comes from the `hidden` attribute (display:none), not from
   `visibility`. Tying it to visibility made focus depend on the transition
   having run, and a transition does not advance in a hidden tab. */
.mdl.is-open { opacity: 1; pointer-events: auto; }

.mdl__box {
  width: 100%; max-width: 560px; max-height: calc(100vh - 2.5rem);
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-card);
  box-shadow: 0 30px 80px rgba(0,0,0,.42);
  transform: translateY(26px) scale(.97);
  transition: transform var(--t-med) var(--ease-out);
  overflow: hidden;
}
.mdl--wide .mdl__box { max-width: 720px; }
.mdl.is-open .mdl__box { transform: none; }

.mdl__head {
  position: relative; padding:1.6rem 3.5rem 1.5rem 2rem; color: #fff;
  background: linear-gradient(135deg, #7a2b1a 0%, var(--c-brand-600) 100%);
}
.mdl__head h2 { color: #fff; font-size: var(--fs-xl); line-height: var(--lh-snug); margin:0; }
.mdl__head p  { color: var(--on-dark-2); font-size: var(--fs-sm); margin-top:.4rem; }
.mdl__head :where(p, span, b) { color: inherit; }
.mdl__head b  { color: var(--c-gold-200); }

.mdl__x {
  position: absolute; top:1rem; right:1rem;
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border-radius: var(--radius-circle); color: #fff; background: rgba(0,0,0,.18);
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.mdl__x:hover { background: rgba(0,0,0,.42); transform: rotate(90deg); }

.mdl__body { padding:1.6rem 2rem 2rem; overflow-y: auto; }
.mdl__note { font-size: var(--fs-2xs); color: var(--c-faint); margin-top:1.1rem; }

/* ---- the four routes: filled at rest, alternate fill on hover ---- */
/* grid-auto-rows:1fr keeps all four tiles the same height, so the email tile
   wrapping to two lines does not leave the others looking short. */
.mdl__routes { display: grid; gap:.8rem; grid-auto-rows: 1fr; }
@media (min-width: 520px) { .mdl__routes { grid-template-columns: 1fr 1fr; } }

.eroute {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap:.8rem;
  padding:.9rem 1rem; border-radius: var(--radius-sm);
  color: #fff; text-align: left;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.eroute::before {
  content: ''; position: absolute; inset:0; z-index: -1;
  opacity: 0; transition: opacity var(--t-med) var(--ease-out);
}
.eroute:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.eroute:hover::before { opacity: 1; }

/* every part of the tile takes the tile's own ink; the description dims itself */
.eroute :where(b, span, i) { color: inherit; }

/* the icon square. Its own rules must outrank the description rule below, so
   both are written at the same depth rather than relying on class order. */
.eroute__ic {
  width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center;
  border-radius: var(--radius-sm); background: rgba(0,0,0,.18);
  font-size: var(--fs-base); line-height: var(--lh-flat);
  transition: background var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.eroute__ic i { font-size: inherit; line-height: var(--lh-flat); display: block; }
.eroute:hover .eroute__ic { background: #fff; transform: rotate(-8deg) scale(1.05); }

.eroute__txt b {
  display: block; font-size: var(--fs-md); font-weight: 700; line-height: var(--lh-snug);
}
.eroute__txt span {
  display: block; font-size: var(--fs-2xs); line-height: var(--lh-snug); margin-top:.15rem;
  color: var(--on-dark-2);
  /* break-word, not anywhere: the <wbr> after the @ is a real break opportunity,
     so the address splits there instead of mid-domain. */
  overflow-wrap: break-word;
}

.eroute__go {
  font-size: var(--fs-xs); opacity: .65;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out);
}
.eroute:hover .eroute__go { transform: translateX(3px); opacity: 1; }

.er1 { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); }
.er2 { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); }
.er3 { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); }
.er4 { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); }
.er1::before { background: linear-gradient(135deg, #5e2114 0%, var(--a1-x) 100%); }
.er2::before { background: linear-gradient(135deg, #2c3a16 0%, var(--a4-x) 100%); }
.er3::before { background: linear-gradient(135deg, #141f33 0%, var(--a3-x) 100%); }
.er4::before { background: linear-gradient(135deg, #0a3335 0%, var(--a2-x) 100%); }
.er1:hover .eroute__ic { color: var(--a1-d); }
.er2:hover .eroute__ic { color: var(--a4-d); }
.er3:hover .eroute__ic { color: var(--a3-d); }
.er4:hover .eroute__ic { color: var(--a2-d); }

/* ---- success panel ---- */
.mdl__done { text-align: center; padding:.5rem 0 .4rem; }
.mdl__done i {
  width: 4.2rem; height: 4.2rem; margin:0 auto 1.1rem;
  display: grid; place-items: center; border-radius: var(--radius-circle); font-size: var(--fs-3xl);
  color: #fff; background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%);
}
.mdl__done h3 { font-size: var(--fs-xl); }
.mdl__done p  { margin-top:.6rem; }

body.mdl-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mdl, .mdl__box, .eroute, .eroute::before, .eroute__ic, .mdl__x { transition: none; }
  .mdl__box { transform: none; }
}

/* ==========================================================================
   COURSE FILTER TABS  +  STACKED COURSE DETAIL
   ========================================================================== */
.ftab {
  padding:0.6rem 1.25rem; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600;
  background: #fff; border: 1px solid var(--c-line); color: var(--c-brand-700);
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.ftab:hover { transform: translateY(-2px); border-color: var(--c-brand-300); }
.ftab.is-on {
  background: linear-gradient(135deg, #7a2b1a 0%, var(--c-brand-600) 100%);
  border-color: transparent; color: #fff;
}
.course.is-hidden, .cdet.is-hidden { display: none; }

.cdet { scroll-margin-top:7.5rem; }
.cdet__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.cdet__media img { width: 100%; height: 23.75rem; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.cdet__media:hover img { transform: scale(1.05); }
.cdet__tag {
  position: absolute; top:1rem; left:1rem;
  padding:.35rem 0.9rem; border-radius: var(--radius-pill);
  font-size: var(--fs-3xs); font-weight: 700; color: #fff;
  background: rgba(26,14,10,.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.cdet__ic {
  width: 3rem; height: 3rem; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-size: var(--fs-lg);
  background: var(--c-brand-50); color: var(--c-brand-600);
}
.cdet__list { display: grid; gap:.55rem; font-size: var(--fs-sm); }
@media (min-width: 640px) { .cdet__list { grid-template-columns: 1fr 1fr; } }
.cdet__list li { display: flex; gap:.6rem; }
.cdet__list i  { color: var(--c-gold-700); margin-top:.28rem; font-size: var(--fs-xs); }

/* the overview card now links down to its own detail block */
.course__more {
  display: flex; align-items: center; gap:.5rem;
  font-size: var(--fs-sm); color: var(--c-brand-600);
  transition: gap var(--t-fast) var(--ease-out);
}
.course__more b { font-weight: 600; }
.course:hover .course__more { gap:0.9rem; }
.course:hover .card__icon {
  background: var(--c-brand-600); color: #fff;
  transform: rotate(-8deg) scale(1.06);
}

/* ==========================================================================
   ACTION PANEL  —  .ctaq
   A large filled call to action. Same behaviour as .card--fill: the accent is
   the resting state and the deeper stop arrives on hover, so the panel reads as
   a button at any size. Colours come from the --a* set measured in theme.css.
   ========================================================================== */
.ctaq {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  padding:2rem 2rem 2rem;
  border-radius: var(--radius-card); color: #fff;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.ctaq::before {
  content: ''; position: absolute; inset:0; z-index: -1;
  opacity: 0; transition: opacity var(--t-med) var(--ease-out);
}
.ctaq:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(0,0,0,.24); }
.ctaq:hover::before { opacity: 1; }
.ctaq :where(h3, p, span, i, b) { color: inherit; }

.ctaq__ic {
  width: 3.4rem; height: 3.4rem; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-size: var(--fs-xl); line-height: var(--lh-flat);
  background: rgba(0,0,0,.18);
  transition: background var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.ctaq__ic i { font-size: inherit; line-height: var(--lh-flat); display: block; }
.ctaq:hover .ctaq__ic { background: #fff; transform: rotate(-8deg) scale(1.05); }

.ctaq__title { font-size: var(--fs-2xl); margin-top:1.25rem; }
.ctaq__text  { font-size: var(--fs-md); line-height: var(--lh-base); margin-top:.7rem; color: var(--on-dark-2); }
.ctaq__meta  { font-size: var(--fs-xs); margin-top:1rem; color: var(--on-dark-1); }
  /* .78 alpha measured 4.45:1 on the terracotta panel — under the floor for
     small text, so the meta line sits at the same alpha as the body copy. */
.ctaq__go {
  display: inline-flex; align-items: center; gap:.6rem;
  font-weight: 700; font-size: var(--fs-md); margin-top:auto; padding-top:1.5rem;
  transition: gap var(--t-fast) var(--ease-out);
}
.ctaq:hover .ctaq__go { gap:1rem; }
.ctaq__go i { font-size: var(--fs-xs); }

.ctaq--1 { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); }
.ctaq--2 { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); }
.ctaq--1::before { background: linear-gradient(135deg, #5e2114 0%, var(--a1-x) 100%); }
.ctaq--2::before { background: linear-gradient(135deg, #0a3335 0%, var(--a2-x) 100%); }
.ctaq--1:hover .ctaq__ic { color: var(--a1-d); }
.ctaq--2:hover .ctaq__ic { color: var(--a2-d); }

@media (prefers-reduced-motion: reduce) {
  .ctaq, .ctaq::before, .ctaq__ic, .ctaq__go { transition: none; }
}

/* ==========================================================================
   MORE WAYS TO GIVE  —  .give
   One panel split by hairlines rather than three boxes, and one accent colour
   throughout. Editorial rather than decorative: the account details are the
   point, so they get tabular figures and a copy button.
   ========================================================================== */
.give { margin-top:4rem; display: grid; gap:2.5rem 1.25rem; }
@media (min-width: 900px) { .give { grid-template-columns: repeat(3, 1fr); } }

/* A rail across the top with the icon lifted onto it, rather than the icon
   sitting inside the card. The white ring cuts the icon out of the rail. */
.give__col {
  position: relative; display: flex; flex-direction: column;
  padding:3.5rem 2rem 2.2rem;
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med),
              border-color var(--t-med);
}
.give__col::before {
  content: ''; position: absolute; left:-1px; right:-1px; top:-1px; height: 5px;
  background: var(--g-brand);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  transition: height var(--t-med) var(--ease-out);
}
.give__col:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lift);
  border-color: var(--c-brand-200);
}
.give__col:hover::before { height: 9px; }

@media (prefers-reduced-motion: reduce) { .give__col, .give__col::before, .give__ic { transition: none; } }

.give__ic {
  position: absolute; top:0; left:2rem; transform: translateY(-50%);
  width: 3.5rem; height: 3.5rem; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-size: var(--fs-xl); line-height: var(--lh-flat);
  background: var(--g-brand); color: #fff;
  box-shadow: 0 0 0 7px var(--c-cream), var(--shadow-brand);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.give__col:hover .give__ic { transform: translateY(-50%) rotate(-8deg) scale(1.06); }
.give__ic i { font-size: inherit; line-height: var(--lh-flat); display: block; }

.give__h { font-size: var(--fs-lg); }
.give__p { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:.55rem; line-height: var(--lh-base); }
.give__big {
  display: block; margin-top:1.1rem;
  font-size: var(--fs-xl); font-weight: 800; color: var(--c-brand-600);
  font-variant-numeric: tabular-nums; letter-spacing: var(--ls-tight);
}
a.give__big { transition: color var(--t-fast) var(--ease-out); }
a.give__big:hover { color: var(--c-brand-800); text-decoration: underline; text-underline-offset: 4px; }
.give__note { font-size: var(--fs-2xs); color: var(--c-faint); margin-top:.6rem; line-height: var(--lh-base); }

.give__rows { margin-top:1.1rem; display: grid; gap:.1rem; }
.give__rows > div {
  display: flex; align-items: center; justify-content: space-between; gap:1rem;
  padding:.6rem 0; border-bottom: 1px solid var(--c-line);
}
.give__rows > div:last-child { border-bottom: 0; }
.give__rows dt { font-size: var(--fs-xs); color: var(--c-faint); }
.give__rows dd {
  font-size: var(--fs-md); font-weight: 700; color: var(--c-ink);
  display: flex; align-items: center; gap:.5rem; text-align: right;
}
.give__num { font-variant-numeric: tabular-nums; }

.give__copy {
  width: 1.75rem; height: 1.75rem; flex-shrink: 0;
  display: grid; place-items: center; border-radius: var(--radius-sm);
  background: var(--c-brand-50); color: var(--c-brand-600); font-size: var(--fs-3xs);
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.give__copy:hover { background: var(--c-brand-600); color: #fff; }
.give__copy.is-done { background: var(--c-brand-600); color: #fff; }

.give__verify {
  display: flex; gap:0.9rem; align-items: flex-start;
  margin:1.75rem auto 0; max-width: 60rem;
  padding:1rem 1.1rem; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--c-line); border-left: 4px solid var(--c-gold-500);
  font-size: var(--fs-xs); line-height: var(--lh-base); color: var(--c-ink-soft);
}
.give__verify i { color: var(--c-gold-700); margin-top:.18rem; }
.give__verify b { color: var(--c-gold-800); }

/* ==========================================================================
   WHAT WE DO  —  .wdo
   The accent opens as a circle from behind the icon rather than fading or
   wiping, so this grid moves differently again from the service cards and the
   quick links. Four accents, one per panel.
   ========================================================================== */
.wdo-grid { display: grid; gap:1.25rem; }
@media (min-width: 640px) { .wdo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .wdo-grid { grid-template-columns: repeat(4, 1fr); } }

.wdo {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  padding:2rem 1.6rem 1.6rem;
  border: 0; border-radius: var(--radius-card); color: #fff;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.wdo::before {
  content: ''; position: absolute; inset:0; z-index: -1;
  clip-path: circle(0% at 2.55rem 2.6rem);
  transition: clip-path var(--t-slow) var(--ease-out);
}
.wdo:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.wdo:hover::before { clip-path: circle(142% at 2.55rem 2.6rem); }

/* black wash, not white: a white tile lifts the ground under a white glyph and
   drops it below 4.5. Black takes it to 8-13:1. */
.wdo__ic {
  width: 3rem; height: 3rem; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-size: var(--fs-lg); line-height: var(--lh-flat);
  background: rgba(0,0,0,.18); color: #fff;
  transition: background var(--t-med) var(--ease-out), color var(--t-med),
              transform var(--t-med) var(--ease-out);
}
.wdo__ic i { font-size: inherit; line-height: var(--lh-flat); display: block; }
.wdo:hover .wdo__ic { background: #fff !important; transform: rotate(-8deg) scale(1.05); }

.wdo :where(h3, p, span, i) { color: inherit; }
.wdo__h { font-size: var(--fs-lg); margin-top:1.1rem; color: #fff; }
.wdo__p { font-size: var(--fs-sm); line-height: var(--lh-base); margin-top:.55rem; color: var(--on-dark-1); }
.wdo__go {
  display: inline-flex; align-items: center; gap:.5rem; margin-top:auto; padding-top:1.25rem;
  font-size: var(--fs-xs); font-weight: 700; color: #fff;
  transition: gap var(--t-fast) var(--ease-out);
}
.wdo__go i { font-size: var(--fs-3xs); }
.wdo:hover .wdo__go { gap:0.9rem; }

.wd1 { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); }
.wd2 { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); }
.wd3 { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); }
.wd4 { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); }
.wd1::before { background: linear-gradient(135deg, #5e2114 0%, var(--a1-x) 100%); }
.wd2::before { background: linear-gradient(135deg, #072425 0%, var(--a2-x) 100%); }
.wd3::before { background: linear-gradient(135deg, #0e1524 0%, var(--a3-x) 100%); }
.wd4::before { background: linear-gradient(135deg, #1e2810 0%, var(--a4-x) 100%); }
.wd1:hover .wdo__ic { color: var(--a1-d); }
.wd2:hover .wdo__ic { color: var(--a2-d); }
.wd3:hover .wdo__ic { color: var(--a3-d); }
.wd4:hover .wdo__ic { color: var(--a4-d); }

@media (prefers-reduced-motion: reduce) {
  .wdo, .wdo::before, .wdo__ic, .wdo__go { transition: none; }
}

/* ==========================================================================
   JUMU'AH  —  .jum
   Two slots, given the weight the busiest prayer of the week deserves.
   ========================================================================== */
.jum-grid { display: grid; gap:1.25rem; }
@media (min-width: 720px) { .jum-grid { grid-template-columns: 1fr 1fr; } }

.jum {
  position: relative; overflow: hidden;
  padding:2rem 2rem 2rem;
  background: var(--line-on-dark-3);
  border: 1px solid var(--line-on-dark-2);
  border-radius: var(--radius-card);
  transition: transform var(--t-med) var(--ease-out), background var(--t-med),
              border-color var(--t-med), box-shadow var(--t-med);
}
.jum:hover {
  transform: translateY(-6px); background: var(--line-on-dark-2);
  border-color: rgba(200,162,74,.55); box-shadow: 0 18px 40px rgba(0,0,0,.32);
}

/* the slot number, decorative and hidden from screen readers */
.jum__no {
  position: absolute; right:1.1rem; top:.2rem;
  font-size: 5.5rem; font-weight: 800; line-height: var(--lh-flat);
  color: var(--on-dark-3); letter-spacing: var(--ls-tight);
  transition: color var(--t-med) var(--ease-out);
}
.jum:hover .jum__no { color: rgba(200,162,74,.55); }

.jum__badge {
  display: inline-block; padding:.3rem .8rem; border-radius: var(--radius-pill);
  font-size: var(--fs-3xs); font-weight: 700; letter-spacing: var(--ls-wide); text-transform: uppercase;
  background: rgba(200,162,74,.18); color: var(--c-gold-200);
}
.jum__time {
  margin-top:1.1rem; color: #fff; line-height: var(--lh-flat);
  font-variant-numeric: tabular-nums; letter-spacing: var(--ls-tight);
}
.jum__time b { font-size: clamp(2.8rem, 8vw, 3.6rem); font-weight: 800; }
.jum__time span { font-size: var(--fs-lg); font-weight: 700; color: var(--c-gold-300); margin-left:.3rem; }
.jum__lang {
  display: flex; align-items: center; gap:.6rem;
  margin-top:1rem; font-size: var(--fs-sm); color: var(--on-dark-2);
}
.jum__lang i { color: var(--c-gold-400); font-size: var(--fs-sm); }

.jum-notes {
  display: grid; gap:.8rem; margin-top:2rem;
  font-size: var(--fs-sm); color: var(--on-dark-2);
}
@media (min-width: 900px) { .jum-notes { grid-template-columns: repeat(3, 1fr); } }
.jum-notes li { display: flex; align-items: flex-start; gap:.7rem; }
.jum-notes i { color: var(--c-gold-400); margin-top:0.25rem; font-size: var(--fs-sm); }
.jum-notes a { color: var(--c-gold-200); font-weight: 600; text-underline-offset: 4px; }
.jum-notes a:hover { color: #fff; text-decoration: underline; }

.jum__tbc {
  margin-top:2rem; padding:1rem 1.1rem;
  border-radius: var(--radius-sm); border-left: 4px solid var(--c-gold-500);
  background: var(--line-on-dark-3);
  font-size: var(--fs-xs); line-height: var(--lh-base); color: var(--on-dark-2);
}
.jum__tbc b { color: var(--c-gold-200); }

@media (prefers-reduced-motion: reduce) { .jum, .jum__no { transition: none; } }

/* ==========================================================================
   QUICK JUMP  —  .qj
   The four category cards at the top of the services page. Plain at rest, and
   each one fills with its own accent on hover, so the colour tells you which
   section you are heading to before you get there.
   ========================================================================== */
.qj .card__icon { color: #fff; transition: all var(--t-med) var(--ease-back); }
.qj1 .card__icon { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); }
.qj2 .card__icon { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); }
.qj3 .card__icon { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); }
.qj4 .card__icon { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); }

.qj1::before { background: linear-gradient(135deg, var(--a1-d) 0%, var(--a1-l) 100%); }
.qj2::before { background: linear-gradient(135deg, var(--a2-d) 0%, var(--a2-l) 100%); }
.qj3::before { background: linear-gradient(135deg, var(--a3-d) 0%, var(--a3-l) 100%); }
.qj4::before { background: linear-gradient(135deg, var(--a4-d) 0%, var(--a4-l) 100%); }

/* the tile inverts so the accent survives as the glyph once the card fills */
.qj:hover .card__icon { background: #fff; transform: rotate(-8deg) scale(1.06); }
.qj1:hover .card__icon { color: var(--a1-d); }
.qj2:hover .card__icon { color: var(--a2-d); }
.qj3:hover .card__icon { color: var(--a3-d); }
.qj4:hover .card__icon { color: var(--a4-d); }

/* ==========================================================================
   EVENT DETAIL  —  .ev-*
   ========================================================================== */
.ev-hero { position: relative; overflow: hidden; padding:5.5rem 0 3.25rem; color: #fff; }
.ev-hero__bg { position: absolute; inset:0; width: 100%; height: 100%; object-fit: cover; }
/* The light end of this veil is the whole page's worst case: a bright patch of
   photograph showing through it. At .6 the ground came out #776E6E and the
   summary, facts, crumb and gold icons all fell under 4.5. At .74 the ground is
   #584F4C and the weakest of them clears — gold-300 at 4.52, white at 7.96. */
.ev-hero__veil {
  position: absolute; inset:0;
  background: linear-gradient(105deg, rgba(29,17,13,.72) 0%, rgba(29,17,13,.72) 55%, rgba(29,17,13,.72) 100%);
}
.ev-hero__in { position: relative; }
.ev-hero h1 { color: #fff; font-size: clamp(1.9rem, 5vw, 3rem); line-height: var(--lh-tight); }
.ev-hero__sum { color: var(--on-dark-1); max-width: 46rem; font-size: var(--fs-base); line-height: var(--lh-base); }
.ev-hero .crumb, .ev-hero .crumb a, .ev-hero .crumb span { color: var(--on-dark-2); }
.ev-hero .crumb a:hover { color: #fff; }

.ev-facts { display: grid; gap:.7rem 2rem; }
@media (min-width: 720px) { .ev-facts { grid-template-columns: repeat(2, auto); justify-content: start; } }
.ev-facts li { display: flex; align-items: center; gap:.7rem; font-size: var(--fs-md); color: var(--on-dark-1); }
.ev-facts i { color: var(--c-gold-200); width: 1.1rem; text-align: center; }

.ev-grid { display: grid; gap:2.5rem; padding:3.25rem 0 1rem; align-items: start; }
@media (min-width: 1024px) { .ev-grid { grid-template-columns: minmax(0,1fr) 22rem; gap:3.5rem; } }

.ev-block + .ev-block { margin-top:2.75rem; }
.ev-h { font-size: var(--fs-xl); margin-bottom:1.1rem; }
.ev-main p { line-height: var(--lh-relaxed); }
.ev-main p + p { margin-top:1rem; }

.ev-feats { display: grid; gap:1rem; }
@media (min-width: 640px) { .ev-feats { grid-template-columns: 1fr 1fr; } }
.ev-feat {
  display: flex; gap:1rem; padding:1.1rem 1.1rem;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  transition: border-color var(--t-med), transform var(--t-med) var(--ease-out);
}
.ev-feat:hover { border-color: var(--c-brand-200); transform: translateY(-3px); }
.ev-feat__ic {
  flex: 0 0 auto; width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-size: var(--fs-base); line-height: var(--lh-flat);
  background: var(--c-brand-50); color: var(--c-brand-600);
}
.ev-feat b { display: block; font-size: var(--fs-md); }
.ev-feat p { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:.2rem; line-height: var(--lh-base); }

/* running order: a rule down the left with a node per slot */
.ev-sched { position: relative; padding-left:1.6rem; }
.ev-sched::before {
  content: ""; position: absolute; left:0.35rem; top:.5rem; bottom:.5rem;
  width: 2px; background: var(--c-line);
}
.ev-slot { position: relative; padding-bottom:1.5rem; }
.ev-slot:last-child { padding-bottom:0; }
.ev-slot::before {
  content: ""; position: absolute; left:-1.6rem; top:0.35rem;
  width: .75rem; height: .75rem; border-radius: var(--radius-circle);
  background: var(--c-brand-600); box-shadow: 0 0 0 4px #fff;
}
.ev-slot__t {
  display: block; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: var(--ls-wide);
  text-transform: uppercase; color: var(--c-brand-600);
}
.ev-slot__b b { display: block; margin-top:.25rem; font-size: var(--fs-base); }
.ev-slot__b p { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:.2rem; }

.ev-speakers { display: grid; gap:.9rem; }
@media (min-width: 640px) { .ev-speakers { grid-template-columns: 1fr 1fr; } }
.ev-spk {
  display: flex; align-items: center; gap:.9rem; padding:1rem 1rem;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
}
.ev-spk__av {
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: var(--radius-circle);
  background: var(--g-brand); color: #fff; font-size: var(--fs-md);
}
.ev-spk b { display: block; font-size: var(--fs-md); }
.ev-spk span { font-size: var(--fs-xs); color: var(--c-faint); }

/* ---- the ticket panel ---- */
.ev-side { display: grid; gap:1.25rem; }
@media (min-width: 1024px) { .ev-side { position: sticky; top:7.5rem; } }

.ev-ticket {
  padding:1.6rem 1.5rem 1.5rem;
  background: #fff; border: 1px solid var(--c-line);
  border-top: 4px solid var(--c-brand-600);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
.ev-ticket__kicker { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-wider); color: var(--c-faint); }
.ev-ticket__price { font-size: var(--fs-4xl); font-weight: 800; color: var(--c-ink); line-height: var(--lh-tight); margin-top:.2rem; }
.ev-ticket__note { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:.5rem; line-height: var(--lh-base); }
.ev-ticket__label {
  font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--ls-wider);
  color: var(--c-faint); margin:1.25rem 0 .6rem;
}
.ev-ticket__meta { font-size: var(--fs-xs); color: var(--c-faint); margin-top:.8rem; text-align: center; }
.ev-ticket__demo {
  font-size: var(--fs-3xs); color: var(--c-faint); margin-top:1rem;
  padding-top:.9rem; border-top: 1px solid var(--c-line); line-height: var(--lh-base);
}

.ev-tiers { display: grid; gap:.55rem; }
.ev-tier {
  display: flex; align-items: center; justify-content: space-between; gap:1rem;
  padding:.8rem 1rem; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ev-tier:hover { border-color: var(--c-brand-300); }
.ev-tier.is-on { border-color: var(--c-brand-600); background: var(--c-brand-50); }
.ev-tier__l b { display: block; font-size: var(--fs-md); }
.ev-tier__l span { display: block; font-size: var(--fs-2xs); color: var(--c-ink-soft); margin-top:.1rem; }
.ev-tier__p { font-weight: 800; color: var(--c-brand-600); font-size: var(--fs-base); flex: 0 0 auto; }

.ev-qty { margin-top:1.25rem; }
.ev-qty label { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--c-ink-soft); margin-bottom:.4rem; }
.ev-stepper { display: flex; align-items: stretch; gap:.5rem; }
.ev-stepper button {
  width: 2.6rem; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  font-size: var(--fs-lg); font-weight: 700; color: var(--c-brand-600); background: #fff;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.ev-stepper button:hover { background: var(--c-brand-50); border-color: var(--c-brand-300); }
.ev-stepper input {
  flex: 1; min-width: 0; text-align: center; font-weight: 700; font-size: var(--fs-base);
  border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding:.55rem;
}
.ev-total {
  display: flex; align-items: center; justify-content: space-between;
  margin-top:1.25rem; padding-top:1rem; border-top: 1px solid var(--c-line);
  font-size: var(--fs-sm); color: var(--c-ink-soft);
}
.ev-total b { font-size: var(--fs-2xl); font-weight: 800; color: var(--c-ink); }

.btn.is-off { opacity: .55; cursor: not-allowed; }

.ev-where {
  padding:1.4rem 1.5rem 1.5rem;
  background: var(--c-cream); border: 1px solid var(--c-line); border-radius: var(--radius-card);
}
.ev-back { padding:1rem 0 2.5rem; }
.ev-back a {
  display: inline-flex; align-items: center; gap:.4rem; min-height: 24px;
  color: var(--c-brand-600); font-weight: 700; font-size: var(--fs-sm);
}
.ev-back a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* the payment summary inside the booking modal */
.ev-pay { padding:1.1rem 1.1rem; background: var(--c-cream); border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.ev-pay .ev-ticket__label { margin-top:0; }
.ev-pay__row { display: flex; justify-content: space-between; gap:1rem; font-size: var(--fs-sm); padding:.35rem 0; }
.ev-pay__row span { color: var(--c-ink-soft); }
.ev-pay__row--total { border-top: 1px solid var(--c-line); margin-top:.35rem; padding-top:.6rem; }
.ev-pay__row--total b { font-size: var(--fs-lg); }
.ev-pay__note { font-size: var(--fs-2xs); color: var(--c-faint); margin-top:.7rem; line-height: var(--lh-base); }
.ev-pay__note i { color: var(--c-gold-700); }

/* ==========================================================================
   TICKET  —  .tkt
   ========================================================================== */
.tkt {
  display: grid; overflow: hidden; max-width: 46rem; margin-inline:auto;
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
@media (min-width: 720px) { .tkt { grid-template-columns: 17rem minmax(0,1fr); } }

.tkt__stub {
  padding:1.75rem 1.5rem; text-align: center; color: #fff;
  background: linear-gradient(160deg, #7a2b1a 0%, var(--c-brand-600) 100%);
  position: relative;
}
/* the perforation between stub and body */
.tkt__stub::after {
  content: ""; position: absolute; inset-inline:0; bottom:-1px; height: 2px;
  background: repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 12px);
}
@media (min-width: 720px) {
  .tkt__stub::after {
    inset:0 -1px 0 auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, #fff 0 6px, transparent 6px 12px);
  }
}
.tkt__brand { font-size: var(--fs-2xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--c-gold-200); }
.tkt__kind { font-size: var(--fs-xs); color: var(--on-dark-2); margin-top:.2rem; }
.tkt__qr {
  width: 10.5rem; height: 10.5rem; margin:1.1rem auto 0;
  background: #fff; border-radius: var(--radius-sm); padding:.5rem;
  display: grid; place-items: center;
}
.tkt__qr canvas { width: 100%; height: 100%; display: block; }
.tkt__qrfail { font-size: var(--fs-2xs); color: var(--c-ink-soft); line-height: var(--lh-base); padding:.5rem; }
.tkt__ref {
  margin-top:.9rem; font-size: var(--fs-lg); font-weight: 800; letter-spacing: var(--ls-wider);
  font-variant-numeric: tabular-nums; color: #fff;
}
.tkt__scan { font-size: var(--fs-3xs); color: var(--on-dark-2); margin-top:.25rem; }

.tkt__body { padding:2rem 2rem 2rem; }
.tkt__title { font-size: var(--fs-2xl); line-height: var(--lh-snug); }
.tkt__rows { margin-top:1.25rem; }
.tkt__rows > div {
  display: flex; justify-content: space-between; gap:1.25rem;
  padding:.6rem 0; border-bottom: 1px solid var(--c-line);
}
.tkt__rows > div:last-child { border-bottom: 0; }
.tkt__rows dt { font-size: var(--fs-xs); color: var(--c-faint); flex: 0 0 auto; }
.tkt__rows dd { font-size: var(--fs-sm); font-weight: 600; text-align: right; }
.tkt__actions { display: flex; flex-wrap: wrap; gap:.7rem; margin-top:1.5rem; }

.tkt__demo {
  display: flex; gap:0.9rem; align-items: flex-start;
  max-width: 46rem; margin:1.5rem auto 0; padding:1rem 1.1rem;
  border-radius: var(--radius-sm); background: #fff;
  border: 1px solid var(--c-line); border-left: 4px solid var(--c-gold-500);
  font-size: var(--fs-xs); line-height: var(--lh-base); color: var(--c-ink-soft);
}
.tkt__demo i { color: var(--c-gold-700); margin-top:.18rem; }
.tkt__demo b { color: var(--c-gold-800); }
.tkt__empty { text-align: center; color: var(--c-ink-soft); padding:3rem 0; }
.tkt__empty a { color: var(--c-brand-600); font-weight: 700; }

@media print {
  .topbar, .announce, .nav, #toTop, .footer, .tkt__actions, .tkt__demo, .ev-back { display: none !important; }
  .tkt { box-shadow: none; border-color: #000; max-width: none; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  .ev-feat, .ev-tier, .ev-stepper button { transition: none; }
}

/* listing rows link through to the detail page */
.event { text-decoration: none; color: inherit; }
.ev-line { display: flex; flex-wrap: wrap; align-items: center; gap:.35rem .5rem; font-size: var(--fs-xs); color: var(--c-faint); margin-top:.7rem; }
.ev-line i { color: var(--c-gold-700); }
.ev-line i + i { margin-left:.5rem; }
.ev-tags { display: flex; flex-wrap: wrap; align-items: center; gap:.45rem; margin-top:.8rem; }
.ev-tag {
  display: inline-flex; align-items: center; gap:.4rem;
  padding:.28rem .7rem; border-radius: var(--radius-pill); font-size: var(--fs-3xs); font-weight: 700;
  background: var(--c-cream); border: 1px solid var(--c-line); color: var(--c-ink-soft);
}
.ev-tag--free { background: var(--c-gold-50); border-color: var(--c-gold-100); color: var(--c-gold-800); }
.ev-tag--paid { background: var(--c-brand-50); border-color: var(--c-brand-100); color: var(--c-brand-700); }
.ev-tag--out  { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.ev-more {
  margin-left:auto; display: inline-flex; align-items: center; gap:.4rem;
  font-size: var(--fs-xs); font-weight: 700; color: var(--c-brand-600);
  transition: gap var(--t-fast) var(--ease-out);
}
.event:hover .ev-more { gap:.75rem; }
.ev-more i { font-size: var(--fs-3xs); }

/* --- photographs added after an event ------------------------------------ */
.ev-gal { display: grid; grid-template-columns: repeat(2, 1fr); gap:.75rem; }
@media (min-width: 640px) { .ev-gal { grid-template-columns: repeat(3, 1fr); } }
.ev-gal .g-item { aspect-ratio: 4/3; margin:0; }
.ev-gal__note { font-size: var(--fs-xs); color: var(--c-faint); margin-top:.9rem; }

/* --- booking terms -------------------------------------------------------- */
.ev-pol { display: grid; gap:.6rem; }
.ev-pol__i { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.ev-pol__i summary {
  display: flex; align-items: center; gap:.75rem; cursor: pointer;
  padding:.9rem 1rem; font-weight: 600; font-size: var(--fs-md); list-style: none;
}
.ev-pol__i summary::-webkit-details-marker { display: none; }
.ev-pol__i summary > i:first-child { color: var(--c-brand-600); width: 1.1rem; text-align: center; }
.ev-pol__c { margin-left:auto; font-size: var(--fs-3xs); color: var(--c-faint); transition: transform var(--t-fast) var(--ease-out); }
.ev-pol__i[open] .ev-pol__c { transform: rotate(180deg); }
.ev-pol__i[open] { border-color: var(--c-brand-200); }
.ev-pol__i p { padding:0 1rem 1rem 3rem; font-size: var(--fs-sm); line-height: var(--lh-base); color: var(--c-ink-soft); }
.ev-pol__tbc {
  margin-top:1rem; padding:.9rem 1.1rem; font-size: var(--fs-xs); line-height: var(--lh-base);
  color: var(--c-ink-soft); background: var(--c-cream);
  border: 1px solid var(--c-line); border-left: 4px solid var(--c-gold-500);
  border-radius: var(--radius-sm);
}
.ev-pol__tbc b { color: var(--c-gold-800); }
.ev-pol__tbc a { color: var(--c-brand-600); font-weight: 600; text-underline-offset: 3px; }
.ev-pol__tbc a:hover { text-decoration: underline; }

/* a past event has no ticket panel, so the aside only holds the map card */
.ev-side--past { align-self: start; }

/* --- past events on the listing ------------------------------------------- */
.past-grid { display: grid; gap:1.25rem; margin-top:2.75rem; }
@media (min-width: 720px) { .past-grid { grid-template-columns: 1fr 1fr; } }
.past {
  display: block; overflow: hidden; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--radius-card);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.past:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--c-brand-200); }
.past__strip { display: grid; grid-template-columns: repeat(3, 1fr); gap:2px; }
.past__strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.past__b { padding:1.25rem 1.25rem 1.4rem; }
.past__when { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-wider); color: var(--c-faint); }
.past__t { font-size: var(--fs-lg); margin-top:.3rem; }
.past__s { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:.35rem; line-height: var(--lh-base); }
.past__n {
  display: inline-flex; align-items: center; gap:.45rem; margin-top:0.9rem;
  font-size: var(--fs-xs); font-weight: 700; color: var(--c-brand-600);
  transition: gap var(--t-fast) var(--ease-out);
}
.past:hover .past__n { gap:.8rem; }

@media (prefers-reduced-motion: reduce) { .past, .ev-pol__c { transition: none; } }

/* ==========================================================================
   STALL BOOKING  —  .sc-*
   Cinema-style plan. Colour is never the only signal: each stall carries a
   symbol (+ / tick / x / ban) and its accessible name states the condition.
   ========================================================================== */
.sc-facts { display: grid; gap:.7rem 2rem; }
@media (min-width: 720px) { .sc-facts { grid-template-columns: repeat(2, auto); justify-content: start; } }
.sc-facts li { display: flex; align-items: center; gap:.7rem; font-size: var(--fs-md); color: var(--on-dark-1); }
.sc-facts i { color: var(--c-gold-200); width: 1.1rem; text-align: center; }

.sc-lead { font-size: var(--fs-md); color: var(--c-ink-soft); line-height: var(--lh-base); margin-bottom:1.5rem; }

/* the orientation bar, so the plan maps onto the real room */
.sc-stage {
  display: grid; place-items: center; padding:.55rem;
  background: var(--c-cream); border: 1px dashed var(--c-line);
  border-radius: var(--radius-pill); margin-bottom:1.25rem;
}
.sc-stage span {
  font-size: var(--fs-3xs); font-weight: 700; letter-spacing: var(--ls-widest);
  text-transform: uppercase; color: var(--c-faint);
}

.sc-key { display: flex; flex-wrap: wrap; gap:.5rem 1.4rem; margin-bottom:2rem; }
.sc-key li { display: flex; align-items: center; gap:.55rem; font-size: var(--fs-xs); color: var(--c-ink-soft); }
.sc-chip {
  width: 1.6rem; height: 1.6rem; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-size: var(--fs-4xs);
}
.sc-chip--free  { background: var(--c-free);  color: #fff; }
.sc-chip--sel   { background: var(--c-sel);   color: var(--c-ink); }
.sc-chip--book  { background: var(--c-taken); color: #fff; }
.sc-chip--block { background: var(--c-block); color: var(--c-block-ink); border: 1px dashed var(--c-block-ink); }

.sc-zone + .sc-zone { margin-top:2.75rem; padding-top:2.5rem; border-top: 1px solid var(--c-line); }
.sc-zone__h { display: flex; flex-wrap: wrap; gap:.75rem 1.5rem; align-items: flex-start; justify-content: space-between; }
.sc-zone__t { font-size: var(--fs-lg); }
.sc-zone__n { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:.25rem; max-width: 34rem; line-height: var(--lh-base); }
.sc-zone__p { text-align: right; flex: 0 0 auto; }
.sc-zone__p b { display: block; font-size: var(--fs-2xl); font-weight: 800; color: var(--c-brand-600); line-height: var(--lh-flat); }
.sc-zone__p span { font-size: var(--fs-2xs); color: var(--c-faint); }
.sc-zone__c { font-size: var(--fs-xs); color: var(--c-faint); margin-top:.9rem; }

.sc-grid {
  display: grid; gap:.45rem; margin-top:.9rem;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
}
@media (max-width: 520px) { .sc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.sc-stall {
  position: relative; aspect-ratio: 1; min-height: 2.9rem;
  display: grid; place-items: center; gap:.1rem;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: var(--fs-3xs); font-weight: 700; line-height: var(--lh-flat);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast),
              background var(--t-fast), color var(--t-fast);
}
.sc-stall__n { font-variant-numeric: tabular-nums; }
.sc-stall i { font-size: var(--fs-4xs); opacity: .85; }

.sc-stall.is-available { background: var(--c-free); color: #fff; cursor: pointer; }
.sc-stall.is-available:hover { transform: translateY(-3px) scale(1.04); box-shadow: var(--shadow-card); }
.sc-stall.is-selected {
  background: var(--c-sel); color: var(--c-ink);
  box-shadow: 0 0 0 3px var(--c-brand-600); transform: translateY(-3px);
}
.sc-stall.is-booked { background: var(--c-taken); color: #fff; cursor: not-allowed; }
.sc-stall.is-blocked {
  background: var(--c-block); color: var(--c-block-ink);
  border-style: dashed; border-color: var(--c-block-ink); cursor: not-allowed;
}
.sc-stall:disabled { opacity: 1; }          /* the colour already says it */
.sc-stall:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(26,20,16,.92); }

/* ---- the basket ---- */
.sc-basket__empty { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:.6rem; line-height: var(--lh-base); }
.sc-picked { display: grid; gap:.4rem; margin-top:.9rem; }
.sc-pick {
  display: flex; align-items: center; gap:.6rem;
  padding:.55rem .65rem; border-radius: var(--radius-sm);
  background: var(--c-cream); border: 1px solid var(--c-line); font-size: var(--fs-sm);
}
.sc-pick__id { font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-pick__z { color: var(--c-faint); font-size: var(--fs-2xs); }
.sc-pick__p { margin-left:auto; font-weight: 700; color: var(--c-brand-600); }
.sc-pick__x {
  width: 1.5rem; height: 1.5rem; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: var(--radius-circle); font-size: var(--fs-4xs); color: var(--c-brand-700); background: var(--c-brand-50);
  transition: background var(--t-fast), color var(--t-fast);
}
.sc-pick__x:hover { background: var(--c-taken); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .sc-stall, .sc-pick__x { transition: none; }
  .sc-stall.is-available:hover, .sc-stall.is-selected { transform: none; }
}

/* ==========================================================================
   BOOKING PAGES  —  .bk-*
   ========================================================================== */
.page-banner--slim { padding-block:3.5rem 2.75rem; background: var(--g-deep); }
.page-banner--slim .page-banner__veil { background: none; }

.bk-grid { display: grid; gap:2.5rem; align-items: start; }
@media (min-width: 1024px) { .bk-grid { grid-template-columns: minmax(0,1fr) 21rem; gap:3.5rem; } }
@media (min-width: 1024px) { .bk-side { position: sticky; top:7.5rem; } }

.bk-h { font-size: var(--fs-lg); margin-bottom:.2rem; }
.bk-form .bk-h + * { margin-top:0; }
.bk-pay { padding-top:1.4rem; margin-top:.6rem; border-top: 1px solid var(--c-line); }
.bk-pay .ev-pay__note { margin-top:.6rem; }
.bk-actions { padding-top:1rem; display: flex; flex-wrap: wrap; gap:.75rem; }
.bk-actions .mdl__note { flex-basis: 100%; }

.bk-what { margin-top:.5rem; line-height: var(--lh-base); }
.bk-what b { display: block; font-size: var(--fs-base); }
.bk-what span { display: block; font-size: var(--fs-xs); color: var(--c-ink-soft); margin-top:.35rem; }
.bk-side .ev-pay__row:first-of-type { margin-top:1.1rem; padding-top:1rem; border-top: 1px solid var(--c-line); }

/* ---- thank you / error ---- */
.bk-done {
  max-width: 34rem; margin-inline:auto; text-align: center;
  background: #fff; border: 1px solid var(--c-line); border-top: 4px solid var(--c-free);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding:2.75rem 2rem 2.2rem;
}
.bk-done--bad { border-top-color: var(--c-taken); }
.bk-done__ic {
  width: 4.5rem; height: 4.5rem; margin:0 auto 1.25rem;
  display: grid; place-items: center; border-radius: var(--radius-circle);
  font-size: var(--fs-3xl); color: #fff; background: var(--c-free);
}
.bk-done__ic--bad { background: var(--c-taken); }
.bk-done__h { font-size: var(--fs-3xl); line-height: var(--lh-tight); }
.bk-done__s { color: var(--c-ink-soft); margin-top:.6rem; line-height: var(--lh-base); }

.bk-done__rows { margin-top:1.75rem; text-align: left; }
.bk-done__rows > div {
  display: flex; justify-content: space-between; gap:1.25rem;
  padding:.65rem 0; border-bottom: 1px solid var(--c-line);
}
.bk-done__rows > div:last-child { border-bottom: 0; }
.bk-done__rows dt { font-size: var(--fs-xs); color: var(--c-faint); flex: 0 0 auto; }
.bk-done__rows dd { font-size: var(--fs-sm); font-weight: 700; text-align: right; }

.bk-done__next { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top:1.4rem; }
.bk-done__acts { display: flex; flex-wrap: wrap; justify-content: center; gap:.7rem; margin-top:1.5rem; }
.bk-done__demo {
  display: flex; gap:.75rem; align-items: flex-start; text-align: left;
  margin-top:1.75rem; padding-top:1.25rem; border-top: 1px solid var(--c-line);
  font-size: var(--fs-xs); line-height: var(--lh-base); color: var(--c-faint);
}
.bk-done__demo i { color: var(--c-gold-700); margin-top:.18rem; }
.bk-done__demo b { color: var(--c-gold-800); }
.bk-done__demo a { color: var(--c-brand-600); font-weight: 600; }

.bk-err__what {
  margin-top:1.5rem; padding:1rem 1.1rem; text-align: left;
  background: var(--c-cream); border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-taken); border-radius: var(--radius-sm);
  font-size: var(--fs-sm); line-height: var(--lh-base); color: var(--c-ink-soft);
}

.bk-empty { max-width: 34rem; margin-inline:auto; text-align: center; padding:3rem 0; }
.bk-empty a { color: var(--c-brand-600); font-weight: 700; }

/* ---- bazaar page, option B: image banner, stats strip, gallery ---------- */
.sc-hero { padding-block:6rem 4rem; }
.sc-hero .chip--gold { background: rgba(200,162,74,.18); color: var(--c-gold-200); border-color: rgba(200,162,74,.32); }

.sc-stats { background: var(--c-cream); border-block: 1px solid var(--c-line); }
.sc-stats__row {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap:1.5rem 1rem; padding:2rem 0; text-align: center;
}
@media (min-width: 720px) { .sc-stats__row { grid-template-columns: repeat(4, 1fr); } }
.sc-stats__row li { display: grid; gap:.3rem; }
.sc-stats__row b {
  font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; line-height: var(--lh-flat);
  color: var(--c-brand-600); font-variant-numeric: tabular-nums; letter-spacing: var(--ls-tight);
}
.sc-stats__row span {
  font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-widest); color: var(--c-faint);
}

.sc-gal { display: grid; grid-template-columns: repeat(2, 1fr); gap:.8rem; }
@media (min-width: 720px) { .sc-gal { grid-template-columns: repeat(3, 1fr); } }
.sc-gal .g-item { aspect-ratio: 4/3; margin:0; }

/* ==========================================================================
   EVENT DETAIL, OPTION B  —  banner image with a thumbnail strip
   ========================================================================== */
.evb-top { padding:1.75rem 0 .5rem; }
/* the base .crumb is white, written for dark page banners. Option B puts the
   breadcrumb on the white page, so it needs its own ink or it disappears. */
.evb-top .crumb { color: var(--c-faint); }
.evb-top .crumb a { color: var(--c-ink-soft); }
.evb-top .crumb a:hover { color: var(--c-brand-600); }
.evb-grid { display: grid; gap:2rem; margin-top:1.25rem; align-items: start; }
@media (min-width: 900px) { .evb-grid { grid-template-columns: 1.05fr 1fr; gap:3rem; } }

.evb-main {
  position: relative; margin:0; overflow: hidden;
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  background: var(--c-cream);
}
.evb-main img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }

.evb-zoom {
  position: absolute; right:0.9rem; bottom:0.9rem;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  border-radius: var(--radius-circle); font-size: var(--fs-sm); color: #fff;
  background: rgba(26,14,10,.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.evb-zoom:hover { background: var(--c-brand-600); transform: scale(1.08); }

.evb-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap:.5rem; margin-top:.5rem; }
.evb-thumb {
  position: relative; overflow: hidden; padding:0;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.evb-thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.evb-thumb:hover { transform: translateY(-2px); }
.evb-thumb.is-on { border-color: var(--c-brand-600); }
.evb-thumb.is-on::after {
  content: ''; position: absolute; inset:0; box-shadow: inset 0 0 0 2px #fff;
  border-radius: calc(var(--radius-sm) - 2px);
}

.evb-h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: var(--lh-tight); }
.evb-sum { font-size: var(--fs-base); line-height: var(--lh-relaxed); color: var(--c-ink-soft); max-width: 34rem; }

.evb-facts { display: grid; gap:.9rem; }
@media (min-width: 560px) { .evb-facts { grid-template-columns: 1fr 1fr; } }
.evb-facts li {
  display: flex; gap:0.9rem; align-items: flex-start;
  padding:0.9rem 1rem; background: var(--c-cream);
  border: 1px solid var(--c-line); border-radius: var(--radius-sm);
}
.evb-facts i { color: var(--c-brand-600); margin-top:.2rem; width: 1rem; text-align: center; }
.evb-facts span {
  display: block; font-size: var(--fs-3xs); text-transform: uppercase;
  letter-spacing: var(--ls-wider); color: var(--c-faint);
}
.evb-facts b { display: block; font-size: var(--fs-sm); margin-top:.15rem; line-height: var(--lh-snug); }

@media (prefers-reduced-motion: reduce) { .evb-thumb, .evb-zoom { transition: none; } }


/* ==========================================================================
   STANDALONE TAP TARGETS  —  24px minimum
   Padding on an INLINE element grows the hit area without changing the line
   box, so a phone number inside a paragraph gets a bigger target while the
   text around it stays exactly where it was.
   ========================================================================== */
main a[href^="tel:"], main a[href^="mailto:"],
footer a[href^="tel:"], footer a[href^="mailto:"] { padding-block:.25rem; }

/* two block-level links that measured 20-21px */
.mbox__foot a { display: inline-block; padding-block:.3rem; }
.jum-notes a  { display: inline-flex; align-items: center; min-height: 24px; }


/* ==========================================================================
   EMPTY STATES
   A list with nothing in it should say so, say why, and offer somewhere to go.
   A blank grid reads as a broken page; this reads as a quiet month.

   The dashed rule is doing the work: it says "nothing here yet" where a solid
   card border would say "here is a thing". The grid column span means one
   markup pattern drops straight into the 2-, 3- and 4-column listings without
   sitting in the first cell.
   ========================================================================== */
.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(2.2rem, 6vw, 3.4rem) 1.5rem;
  background: var(--c-cream);
  border: 2px dashed var(--c-line-2);
  border-radius: var(--radius-card);
}

.empty__ic {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--c-line);
  color: var(--c-gold-800);
  font-size: var(--fs-2xl);
  box-shadow: var(--shadow-sm);
}

.empty__t {
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--c-ink);
  margin-top: 1.1rem;
}

.empty__s {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--c-ink-soft);
  max-width: 44ch;
  margin-top: .6rem;
}

.empty__do { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.4rem; }

/* the filter version: same voice, less furniture, because it appears and
   disappears as the reader clicks rather than being the state of the page */
.empty--sm { padding: 2.1rem 1.25rem; }
.empty--sm .empty__ic { width: 48px; height: 48px; font-size: var(--fs-lg); }
.empty--sm .empty__t  { font-size: var(--fs-lg); margin-top: .85rem; }
.empty--sm .empty__s  { font-size: var(--fs-sm); }

/* on a cream band the panel needs to separate from its ground */
.bg-cream .empty, .section--cream .empty { background: #fff; }

@media (forced-colors: active) {
  .empty { border-color: CanvasText; }
  .empty__ic { border-color: CanvasText; }
}


/* ==========================================================================
   HEADING TYPEFACE OPTIONS  —  design-type.html, and the ?type= preview
   Body copy stays Poppins in every option. Only headings change, which is the
   whole point: the reading text is settled, the voice is not.

   Each face carries its own size correction. Swapping the family alone is a
   dishonest comparison: set at the same pixel size, a face with a smaller
   x-height looks smaller and weaker than it really is.

   Measured at 100px/700 in the browser, not estimated:

     face        x-height   cap-height
     Poppins        56          71
     Fraunces       45          70
     Cormorant      39          63
     Playfair       52          71

   Poppins has an unusually large x-height for a geometric sans, so every serif
   here needs to come up. Matching x-height alone over-corrects — Fraunces would
   need +24%, which would push its cap height to 87 against Poppins's 71 and read
   as oversized. Headings are mostly Title Case, where cap height carries more of
   the perceived size, so the multiplier is weighted 65% cap-match / 35%
   x-match: Fraunces 1.09, Cormorant 1.24, Playfair 1.03.
   ========================================================================== */
/* The correction is applied with font-size-adjust, not by overriding font-size.
   `font-size: calc(1em * n)` would resolve the 1em against the PARENT, so every
   heading on the real page would lose its own size and inherit the body's.
   font-size-adjust scales the face to a target x-height/em ratio instead, which
   leaves every clamp() and utility size exactly where it was.

   A face with ratio a, given font-size-adjust: v, renders at v/a. So the value
   is simply (measured ratio x multiplier): Fraunces .45x1.09, Cormorant
   .39x1.24, Playfair .52x1.03. */
.ty-poppins   { --ty: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; --ty-adj: none;  --ty-w: 600; --ty-ls: -0.02em; }
.ty-fraunces  { --ty: 'Fraunces', Georgia, 'Times New Roman', serif;               --ty-adj: 0.491; --ty-w: 700; --ty-ls: -0.015em; }
.ty-cormorant { --ty: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;     --ty-adj: 0.484; --ty-w: 700; --ty-ls: -0.005em; }
.ty-playfair  { --ty: 'Playfair Display', Georgia, 'Times New Roman', serif;       --ty-adj: 0.536; --ty-w: 700; --ty-ls: -0.015em; }

.ty-spec :is(h1, h2, h3, h4),
.ty-spec :is(.card__title, .opt__title, .stat__n, .ev-hero__t),
.ty-spec :is(.ty__h1, .ty__h2, .ty__h3, .ty__small, .ty__set) {
  font-family: var(--ty);
  font-size-adjust: var(--ty-adj);
  font-weight: var(--ty-w);
  letter-spacing: var(--ty-ls);
}
/* the alphabet strip is a specimen, not a heading — it keeps its own weight */
.ty-spec .ty__set { font-weight: 600; letter-spacing: 0; }

/* the specimen block itself */
.ty {
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-card); padding: clamp(1.4rem, 4vw, 2.2rem);
}
.ty__h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: var(--lh-tight); color: var(--c-ink); margin: 0; }
.ty__h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); line-height: var(--lh-tight); color: var(--c-ink); margin: 1.5rem 0 0; }
.ty__h3 { font-size: var(--fs-xl); line-height: var(--lh-snug); color: var(--c-ink); margin: 1.2rem 0 0; }
.ty__body { font-size: var(--fs-md); line-height: var(--lh-relaxed); color: var(--c-ink-soft); margin-top: .7rem; max-width: 62ch; }
.ty__ar { font-family: var(--font-arabic); font-size: var(--fs-2xl); line-height: 2; direction: rtl; color: var(--c-ink); margin-top: 1.2rem; }

/* the alphabet strip — where a face's character actually shows */
.ty__set {
  font-weight: 600; font-size: var(--fs-lg);
  line-height: var(--lh-snug); color: var(--c-ink-soft);
  margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px dashed var(--c-line-2);
  word-spacing: .12em;
}

/* small-size stress test: the size a card title is on a phone */
.ty__small { font-size: 1.0625rem; color: var(--c-ink); margin-top: 1rem; }

/* the picker */
.ty-pick { display: flex; flex-wrap: wrap; gap: .6rem; }
.ty-pick button {
  font-family: var(--ty); font-size-adjust: var(--ty-adj); font-size: var(--fs-md); font-weight: 600;
  padding: .55rem 1.1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--c-line-2); background: #fff; color: var(--c-ink);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.ty-pick button:hover { border-color: var(--c-brand-600); }
.ty-pick button[aria-pressed="true"] { background: var(--c-brand-600); border-color: var(--c-brand-600); color: #fff; }

/* the live sample, which the picker drives */
.ty-live { position: relative; }
.ty-live__tag {
  position: absolute; top: -.7rem; left: 1.2rem;
  background: var(--c-gold-800); color: #fff;
  font-size: var(--fs-3xs); font-weight: 700; letter-spacing: var(--ls-wider);
  text-transform: uppercase; padding: .25rem .7rem; border-radius: var(--radius-pill);
}

@media (prefers-reduced-motion: reduce) { .ty-pick button { transition: none; } }

/* the review bar that appears under ?type=  — review-only, never on a live page */
.ty-preview-bar {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  z-index: var(--z-float); max-width: calc(100vw - 1.5rem);
  display: flex; align-items: center; gap: .9rem;
  background: var(--c-darker); color: #fff;
  font-family: var(--font-ui); font-size: var(--fs-xs); white-space: nowrap;
  padding: .55rem .6rem .55rem 1rem;
  border-radius: var(--radius-sm);   /* not a pill — it is a box, and a pill on
                                        a box this size reads as a mistake */
  box-shadow: var(--shadow-lift);
}
.ty-preview-bar__t { overflow: hidden; text-overflow: ellipsis; }
.ty-preview-bar b { color: var(--c-gold-200); }
.ty-preview-bar a {
  color: var(--c-gold-200); text-decoration: underline;
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 .3rem;
}
.ty-preview-bar a:hover { color: #fff; }


/* ==========================================================================
   PLACEHOLDERS AND DISABLED CONTROLS
   Neither had any styling, so both fell through to Tailwind preflight's
   defaults. Two problems with that: the placeholder came out rgb(156,163,175)
   — a cool slate at 2.54:1, low contrast and the one hue the palette does not
   use — and a disabled button rendered identically to an enabled one, so the
   stall "Book and pay" button looked live while nothing was selected.
   ========================================================================== */

/* Informative, not decorative: several placeholders on this site are worked
   examples ("e.g. son, daughter, spouse"), so they have to be readable.
   n5 gives 5.96:1. What separates a placeholder from real input is that the
   ink is far darker (15.94:1), not that the hint is hard to see. */
.input::placeholder,
input::placeholder,
textarea::placeholder { color: var(--c-n5); opacity: 1; }

/* Disabled: the muted ground is what says "not yet", and it says it without
   relying on colour alone — the label wording changes too. n6 on n2 is
   4.60:1, so it stays readable even though disabled controls are exempt. */
.btn:disabled,
.btn[disabled],
button:disabled {
  background: var(--c-n2) !important;
  border-color: var(--c-n2) !important;
  color: var(--c-n6) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
.btn:disabled:hover,
.btn[disabled]:hover,
button:disabled:hover { transform: none !important; filter: none !important; }

.input:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  background: var(--c-n1);
  color: var(--c-n5);
  cursor: not-allowed;
}

@media (forced-colors: active) {
  .btn:disabled, .btn[disabled], button:disabled { color: GrayText !important; }
}


/* ==========================================================================
   UI COMPONENT BOUNDARIES  —  WCAG 2.1 SC 1.4.11, 3:1
   Where the border is the only thing that identifies a control, it has to be
   visible. Measured before this: .input 1.23:1, .f-tab and .ftab 1.32:1 — a
   text field whose edge you cannot see.

   Chips are deliberately NOT included. They are labels, not controls; their
   text carries the meaning and that already passes, so 1.4.11 does not apply
   and darkening them would only add noise.
   ========================================================================== */
.input,
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="time"], input[type="url"], input[type="search"],
textarea, select { border-color: var(--c-n4); }

.f-tab, .ftab { border-color: var(--c-n4); }

/* the selected tab keeps its own treatment */
.f-tab.is-on, .ftab.is-on { border-color: currentColor; }


/* ==========================================================================
   FORM VALIDATION
   Before this, forms ran on novalidate + reportValidity(), so the only error
   the visitor ever saw was the browser's native bubble: one error at a time,
   unstyleable, gone on the next click, and nothing left on the field to say
   which one had failed. 457 controls across the site, 228 of them required,
   and not one was marked as required before it was submitted.

   Colour is never the only signal here. The danger red sits at hue 3 and the
   brand terracotta at hue 12 — close enough that a red border alone could
   read as an accent — so every error carries an icon and a sentence too.
   ========================================================================== */

/* ---- the required convention ---- */
.req {
  color: var(--c-danger);
  font-weight: 700;
  margin-left: .15rem;
}
.form-note {
  font-size: var(--fs-xs);
  color: var(--c-n5);
  margin-top: .4rem;
}

/* ---- a field in error ---- */
.field--err .input,
.field--err input,
.field--err textarea,
.field--err select { border-color: var(--c-danger); }

.field__err {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  margin-top: .4rem;
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--c-danger);
  font-weight: 600;
}
.field__err i { margin-top: .12rem; flex-shrink: 0; }

/* ---- the summary, for anything longer than a couple of fields ---- */
.form-err {
  border: 2px solid var(--c-danger);
  border-left-width: 6px;
  border-radius: var(--radius-sm);
  background: #fdf4f3;
  padding: 1rem 1.15rem;
  margin-bottom: 1.4rem;
}
.form-err__t {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; color: var(--c-danger); font-size: var(--fs-md);
}
.form-err ul { margin: .6rem 0 0; padding-left: 1.6rem; list-style: disc; }
.form-err li { font-size: var(--fs-sm); line-height: var(--lh-snug); margin-top: .3rem; }
.form-err a {
  color: var(--c-danger); text-decoration: underline;
  /* inline, not inline-block: an inline-block two lines tall drags the list
     marker down to its last line. Padding on an inline element still grows
     the hit area without changing the line box. */
  display: inline; padding-block: .3rem;
}
.form-err a:hover { color: var(--c-brand-800); }

/* the summary takes focus so the caret and the screen reader both land on it */
.form-err:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(26,20,16,.92); }

@media (forced-colors: active) {
  .field--err .input { border-color: CanvasText; }
  .form-err { border-color: CanvasText; }
}


/* ==========================================================================
   TYPE SYSTEM — the closed weight set
   Latin runs on four weights: 400 body, 600 display headings, 700 small
   headings and emphasis, 800 numerals. Arabic keeps its own 500, which is a
   real weight in Noto Naskh and does a job Poppins 500 was not doing.

   Tailwind preflight ships `b, strong { font-weight: bolder }`. Inside a 700
   parent `bolder` computes to 900, and Poppins has no 900 — so 32 elements
   across the site were rendering a synthetic bold nobody chose, most of them
   prayer times. Stated explicitly here, which also stops it drifting further.
   ========================================================================== */
/* `body` prefix, for the same reason the heading rule needs one: the CDN
   injects preflight AFTER this file, so at equal specificity it wins. */
body b, body strong { font-weight: 700; }

/* numerals read in groups — an account number, a sort code, a stall id —
   need a little air between figures to be read back correctly */
.give__num, .sc-stall__n { letter-spacing: var(--ls-num); }


/* ==========================================================================
   MOTION DISCIPLINE
   290 elements carried .rv, and up to twelve of them shared a single
   viewport. Twelve things sliding up together is not emphasis — it is
   weather. Attention is finite: if everything moves, nothing is pointed at.

   So the movement belongs to the SECTION, not to each item inside it. A
   section head still reveals; the cards in its grid simply arrive with it.
   The markup keeps its .rv classes, which stay meaningful for the standalone
   blocks and cost nothing here.
   ========================================================================== */
.js :where(.grid, .past-grid, .give, .stats, [class*="grid-cols"]) > .rv {
  opacity: 1;
  transform: none;
  transition: none;
}

/* the stagger ramp, named — it is a delay sequence, not four loose values */
.rv-d1 { transition-delay: var(--d-1); }
.rv-d2 { transition-delay: var(--d-2); }
.rv-d3 { transition-delay: var(--d-3); }
.rv-d4 { transition-delay: var(--d-4); }


/* ==========================================================================
   PRESSED STATE
   Hover does not exist on a touchscreen. Every interactive card and tile
   had a hover state and no :active one, so a tap on a phone gave no
   confirmation that it had registered until the next page loaded.

   The gesture is "settle", not "shrink": whatever lifted on hover returns
   to the surface, and the shadow tightens. That reads as pressed without
   moving text under the reader's finger.
   ========================================================================== */
:where(.card, .qlink, .course, .event, .past, .give__col, .eroute, .g-item,
       .fund, .amount-btn, .f-tab, .ftab, .person):active {
  transform: translateY(0) scale(.995);
  box-shadow: var(--shadow-sm);
}
.sc-stall:not(:disabled):active { transform: scale(.94); }

@media (prefers-reduced-motion: reduce) {
  :where(.card, .qlink, .course, .event, .past, .give__col, .eroute, .g-item,
         .fund, .amount-btn, .f-tab, .ftab, .person, .sc-stall):active {
    transform: none;
  }
}


/* ==========================================================================
   ARABIC LEADING
   Arabic was inheriting the Latin body leading of 1.5. The script carries
   harakat above and below the baseline, so at Latin leading the marks of one
   line crowd the line above it — hardest to read in exactly the passages
   that matter most, the Qur'an and the du'a.

   Two values, because the two faces do different jobs: Noto Naskh sets short
   UI labels, Amiri sets scripture with full vowel marks.
   ========================================================================== */
/* `body` prefix on .font-arabic: it is usually written alongside a Tailwind
   size utility, and those now carry their own line-height from the paired
   fontSize scale. At equal specificity the CDN's stylesheet wins, because it
   is injected after this one — the same reason the heading and `strong` rules
   need a prefix. */
body .font-arabic { line-height: var(--lh-ar); }
:where(.ayah__ar, .pillar__ar) { line-height: var(--lh-ar); }
:where(.mb__ar, .t-tile__ar, .pt__ar, .ptable .ar) { line-height: var(--lh-ar-ui); }


/* ==========================================================================
   HERO CONTROLS
   Dots and a pause button on one rail. The pause exists because WCAG 2.2.2
   (Level A) requires a way to stop content that moves by itself for more
   than five seconds, and there was none: the slides turned every six
   seconds and nothing held them.
   ========================================================================== */
.hero__ctl {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; align-items: center; gap: .9rem;
}
.hero__pause {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--edge-on-dark);
  background: rgba(29,17,13,.55);
  color: #fff; font-size: var(--fs-2xs); cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.hero__pause:hover { background: rgba(29,17,13,.78); border-color: #fff; }
@media (prefers-reduced-motion: reduce) { .hero__pause { transition: none; } }


/* ==========================================================================
   SLIDER OPTIONS  —  design-slider.html
   Six working treatments in bounded boxes rather than full-bleed, so the
   page can be browsed and compared rather than scrolled through.
   ========================================================================== */
.sl-demo { position: relative; border-radius: var(--radius-card); overflow: hidden; background: var(--c-dark); }
.sl-swiper, .sl-demo--static { height: clamp(300px, 34vw, 380px); }
.sl-slide { position: relative; overflow: hidden; display: flex; align-items: center; height: 100%; }
.sl-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sl-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(29,17,13,.72), rgba(43,26,20,.72));
}
.sl-in { position: relative; z-index: 2; padding: clamp(1.5rem, 4vw, 2.5rem); max-width: 34rem; }
.sl-in--center { margin-inline: auto; text-align: center; }
.sl-title { font-family: var(--font-head); font-size-adjust: var(--font-head-adj);
  font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: var(--lh-tight); color: #fff; }
.sl-title em { font-style: normal; color: var(--c-gold-200); }
.sl-lead { color: var(--on-dark-2); font-size: var(--fs-sm); margin-top: .6rem; }

/* controls */
.sl-dots { position: absolute; bottom: .9rem; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: .4rem; }
.sl-dots .swiper-pagination-bullet { width: 8px; height: 8px; border-radius: var(--radius-pill);
  background: var(--edge-on-dark); opacity: 1; cursor: pointer; border: 0; }
.sl-dots .swiper-pagination-bullet-active { background: var(--c-gold-400); width: 22px; }
.sl-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: var(--radius-pill); border: 1px solid var(--edge-on-dark);
  background: rgba(29,17,13,.55); color: #fff; cursor: pointer;
}
.sl-arrow:hover { background: rgba(29,17,13,.82); border-color: #fff; }
.sl-arrow--prev { left: .8rem; } .sl-arrow--next { right: .8rem; }
.sl-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--line-on-dark-2); z-index: 4; }
@keyframes sl-fill { from { width: 0; } to { width: 100%; } }
.sl-prog span {
  display: block; height: 100%; width: 0; background: var(--c-gold-400);
  animation: sl-fill 5s linear forwards;      /* matches the autoplay delay */
}
.sl-demo.is-paused .sl-prog span { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .sl-prog span { animation: none; width: 0; } }
.sl-pause {
  position: absolute; right: .8rem; bottom: .9rem; z-index: 5;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--radius-pill); border: 1px solid var(--edge-on-dark);
  background: rgba(29,17,13,.55); color: #fff; font-size: var(--fs-2xs); cursor: pointer;
}
.sl-pause:hover { background: rgba(29,17,13,.82); border-color: #fff; }

/* the slow zoom */
@keyframes sl-kb { from { transform: scale(1); } to { transform: scale(1.12); } }
.sl-bg--kb { animation: sl-kb 12s ease-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  .sl-bg--kb { animation: none; }
  .sl-arrow, .sl-pause { transition: none; }
}


/* ==========================================================================
   HERO — DEPTH
   The masjid's own architecture is about depth: arches receding, a dome
   above. So this slider moves THROUGH space rather than across a surface.
   The photograph recedes and the next one comes forward out of it, and the
   copy sits on its own plane so it settles a moment later. That second
   plane is what makes it read as depth rather than as a zoom.

   Transform and opacity only, so it runs on the compositor and cannot
   cause layout shift.
   ========================================================================== */
.hero--depth .hero-swiper { perspective: 1500px; }
.hero--depth .swiper-wrapper { transform-style: preserve-3d; }
.hero--depth .hero__slide { backface-visibility: hidden; }
.hero--depth .hero__inner { transform-style: preserve-3d; }

/* The copy's own plane. Scoped to .is-ready, which JS adds only once Swiper
   has initialised — otherwise a script failure would leave every headline
   invisible, which is the trap Phase 5 was about. */
.hero--depth.is-ready .hero__inner > * > * {
  opacity: 0;
  transform: translate3d(0, 18px, -90px);
  transition: opacity .55s var(--ease-out) .15s,
              transform .85s var(--ease-out) .15s;
}
.hero--depth.is-ready .swiper-slide-active .hero__inner > * > * {
  opacity: 1;
  transform: none;
}

/* a faint gold edge-light that settles with the slide */
.hero--depth .hero__slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, rgba(200,162,74,.16) 50%, transparent 62%);
  opacity: 0; transition: opacity 1.1s var(--ease-out);
}
.hero--depth.is-ready .swiper-slide-active .hero__slide::after,
.hero--depth.is-ready .swiper-slide-active::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero--depth .hero-swiper { perspective: none; }
  .hero--depth.is-ready .hero__inner > * > *,
  .hero--depth.is-ready .swiper-slide-active .hero__inner > * > * {
    opacity: 1; transform: none; transition: none;
  }
  .hero--depth .hero__slide::after { display: none; }
}
