/* ==========================================================================
   Golborne Mosque
   The grey and gold of the mosque's logo and frontage, set in an Apple-style
   system: the platform's own typeface with size-specific tracking, a
   translucent header, rounded surfaces with hairlines instead of heavy rules,
   and motion only where it has a job (see "motion" near the end).
   ========================================================================== */

/* Until Cinzel arrives, Georgia stands in, scaled to Cinzel's width so the
   lettering wraps the same way and nothing jumps when the font swaps. */
@font-face {
  font-family: "Cinzel Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 600;
  size-adjust: 95.3%;
}
@font-face {
  font-family: "Cinzel Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 700;
  size-adjust: 96.9%;
}

:root {
  color-scheme: dark;

  /* Neutral greys, a few steps darker than the logo's grey disc (#606060) */
  --bg: #333333;
  --bg-alt: #393939;
  --bg-deep: #2c2c2c;
  --surface: #404040;
  --surface-2: #474747;
  --hairline: rgba(255, 255, 255, 0.1);
  --hairline-strong: rgba(255, 255, 255, 0.17);

  /* The logo's golds: its English lettering, its Arabic lettering, and a gradient between them */
  --gold: #e7b22e;
  --gold-bright: #f1be31;
  --gold-wash: rgba(231, 178, 46, 0.12);
  --gold-line: rgba(231, 178, 46, 0.34);
  --gold-gradient: linear-gradient(180deg, #f7d466 0%, #e7b22e 50%, #c9961f 100%);

  --ink: #f5f5f5;
  /* Secondary text, kept at 4.5:1 or better on every grey above */
  --ink-2: #c4c4c4;
  --ink-3: #b8b8b8;
  --ink-on-gold: #1b1508;

  /* The platform's own typeface: San Francisco on Apple devices */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Cinzel", "Cinzel Fallback", "Trajan Pro", Georgia, serif;
  --font-ar: "Amiri", "Geeza Pro", "Traditional Arabic", serif;

  /* Motion curves */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1120px;
  --gutter: 20px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --lift: 0 24px 60px -30px rgba(0, 0, 0, 0.55);

  /* Zellige: a Moroccan lattice of eight-pointed stars and rosettes, as fine gold lines.
     One repeat is 220 x 243.5px; the tile is drawn at twice that for sharp screens. */
  --pattern: url("../assets/zellige.webp");
  --pattern-size: 220px auto;
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
html.nav-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.47 var(--font-sans);
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, iframe { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--gold-bright); text-decoration: none; }
/* Links inside running text need more than colour to stand out */
p a:not([class]) {
  text-decoration: underline;
  text-decoration-color: rgba(235, 203, 139, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

[lang="ar"] { font-family: var(--font-ar); letter-spacing: 0; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* Controls: no tap delay, no long-press text selection */
a, button, summary, [role="button"] { touch-action: manipulation; }
button, .btn, .icon-btn, .amount, .copy, .nav-toggle, .site-nav a, summary {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprite { position: absolute; }
.print-only { display: none; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 980px;
  background: var(--gold);
  color: var(--ink-on-gold);
  font-weight: 600;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- shared pieces ---------- */

.eyebrow {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 980px;
  font: 500 1.0625rem/1.2 var(--font-sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--gold { background: var(--gold); color: var(--ink-on-gold); }
.btn--line { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.btn--block { display: flex; width: 100%; }

.text-link { color: var(--gold-bright); font-weight: 500; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-bright);
  font: 500 1rem var(--font-sans);
  letter-spacing: -0.01em;
  cursor: pointer;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Surfaces: rounded, lifted by a hairline rather than a border */
.panel {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--lift);
}
/* The frontage's gold outline, kept as a single fine line */
.panel--framed { box-shadow: inset 0 0 0 1px var(--gold-line), var(--lift); }
@media (min-width: 640px) {
  .panel { padding: 40px; }
}

.fine-print {
  margin-top: 18px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 20px;
  color: var(--ink-2);
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.plain-list strong { color: var(--ink); font-weight: 600; }

/* ---------- header: translucent, content scrolls beneath ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(51, 51, 51, 0.74);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* room above and below the lockup, including the tail of the Q */
  min-height: 68px;
}

/* The mosque symbol and the name form one lockup, sized from --brand-size (the
   name's font size). The mosque stands on the name's baseline and rises to twice
   the height of its capitals (Cinzel's capitals are 0.7em, so 1.4em). */
/* Set on the header (not the lockup) so the menu can line up with the name too */
.site-header { --brand-size: 28px; }
.brand {
  display: inline-flex;
  /* an image's baseline is its bottom edge, so this sets the mosque on the text's baseline */
  align-items: baseline;
  gap: calc(var(--brand-size) * 0.35);
  color: var(--gold);
}
.brand__logo { width: auto; height: calc(var(--brand-size) * 1.4); flex: none; }
.brand--footer { --brand-size: 22px; }
.brand__text {
  display: flex;
  flex-direction: column;
  /* the space below the letters (for the Q's tail) shouldn't push the mosque off-centre */
  margin-bottom: -0.21em;
  font-size: var(--brand-size);
  line-height: 1;
}
/* On a phone the lockup shrinks a little if needed, so it never runs into the menu button */
@media (max-width: 899px) {
  .site-header { --brand-size: min(28px, calc((100vw - 112px) / 14)); }
  .brand--footer { --brand-size: min(22px, calc((100vw - 48px) / 14)); }
}
.brand__name {
  /* The tracking after the last letter would leave a gap; take it back so the
     line's box ends where the lettering does */
  margin-right: -0.12em;
  font: 600 1em/1 var(--font-brand);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.nav-toggle:active { transform: scale(0.95); }
.nav-toggle__label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 240ms var(--ease-out), background-color 240ms var(--ease-out);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1;
  transition: color 200ms ease;
}
.site-nav a[aria-current="page"] { color: var(--gold-bright); }

@media (max-width: 899px) {
  /* Full-height menu that fades in, links cascading in after it */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Solid: a blur nested inside the blurred header doesn't composite reliably */
    background: var(--bg);
    visibility: hidden;
    opacity: 0;
    transition: opacity 240ms var(--ease-out), visibility 0s linear 240ms;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 240ms var(--ease-out), visibility 0s;
  }
  .site-nav ul { padding: 12px var(--gutter) 48px; }
  .site-nav li {
    border-bottom: 1px solid var(--hairline);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  }
  .site-nav.is-open li { opacity: 1; transform: none; }
  .site-nav.is-open li:nth-child(2) { transition-delay: 30ms; }
  .site-nav.is-open li:nth-child(3) { transition-delay: 60ms; }
  .site-nav.is-open li:nth-child(4) { transition-delay: 90ms; }
  .site-nav.is-open li:nth-child(5) { transition-delay: 120ms; }
  .site-nav.is-open li:nth-child(6) { transition-delay: 150ms; }
  .site-nav a {
    padding: 16px 0;
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
  }
  .site-nav a[aria-current="page"] { color: var(--gold-bright); }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav ul { display: flex; gap: 32px; }
  .site-nav a { padding: 10px 0; white-space: nowrap; }
  /* The name's capitals sit 0.35em below the header's middle (it stands on the
     mosque's base), so the menu moves down to the same line */
  .site-nav { translate: 0 calc(var(--brand-size) * 0.35); }
}
/* Small laptops: a slightly smaller name and tighter menu keep both on one row */
@media (min-width: 900px) and (max-width: 1099px) {
  .site-header { --brand-size: 24px; }
  .site-nav ul { gap: 22px; }
}

/* ---------- prayer times strip (under the menu, scrolls with the page) ---------- */

.prayer-bar {
  padding: 14px 0 10px;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--hairline);
}
.prayer-bar__inner { display: grid; gap: 8px; }

.prayer-bar__day {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.prayer-bar__day p { margin: 0; }
.prayer-bar__title { margin-right: 6px; font-weight: 600; color: var(--gold); }
.prayer-bar__date { font-weight: 600; color: var(--gold); }
.prayer-bar__credit { font-size: 0.75rem; color: var(--ink-3); }
.prayer-bar__credit a { color: var(--gold-bright); }
@media (max-width: 899px) {
  .prayer-bar__credit { flex-basis: 100%; order: 3; }
}

.prayer-bar__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
.prayer-bar__table th,
.prayer-bar__table td {
  padding: 3px 1px;
  text-align: center;
  white-space: nowrap;
}
.prayer-bar__table thead td { width: 52px; }
.prayer-bar__table thead th {
  padding-top: 7px;
  padding-bottom: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-2);
}
.prayer-bar__table tbody th {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-3);
  text-align: left;
}
.prayer-bar__table td {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.prayer-bar__table tbody tr:last-child td,
.prayer-bar__table tbody tr:last-child th { padding-bottom: 7px; }
/* The next prayer reads as one rounded column */
.prayer-bar__table .is-next { background: var(--gold-wash); color: var(--gold-bright); }
.prayer-bar__table thead th.is-next { border-radius: 10px 10px 0 0; }
.prayer-bar__table tbody tr:last-child td.is-next { border-radius: 0 0 10px 10px; }

@media (min-width: 900px) {
  .prayer-bar { padding: 12px 0 10px; }
  .prayer-bar__inner { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 48px; }
  .prayer-bar__day { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 0.875rem; }
  .prayer-bar__table { max-width: 760px; margin-left: auto; }
  .prayer-bar__table thead td { width: 76px; }
  .prayer-bar__table thead th { font-size: 0.8125rem; }
  .prayer-bar__table tbody th { font-size: 0.8125rem; }
  .prayer-bar__table td { padding: 3px 8px; font-size: 1.0625rem; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 56px 0 72px;
  background:
    radial-gradient(ellipse 60% 55% at 74% 40%, rgba(231, 178, 46, 0.13), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern);
  background-size: var(--pattern-size);
  opacity: 0.07;
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 75% 45%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 70% at 75% 45%, #000, transparent 75%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding: 72px 0 112px; }
  /* On wide screens the tiles sit behind the arch rather than the text, so they can show a little more */
  .hero::before { opacity: 0.1; }
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 72px; }
}

.sign { container-type: inline-size; }
/* The mosque's badge stands in for a written heading */
.sign__logo { margin: 0; line-height: 0; }
.sign__logo img {
  display: block;
  width: clamp(220px, 66cqi, 320px);
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}
.sign__logo + .sign__lede { margin-top: 32px; }

.sign__lede {
  max-width: 30em;
  margin: 24px 0 32px;
  font-size: clamp(1.1875rem, 2.2vw, 1.375rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--ink-2);
}

.sign__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* The arch: next prayer */
.arch {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
  aspect-ratio: 320 / 420;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5));
}
/* room for the finial that rises above the arch when it sits under the hero text */
@media (max-width: 899px) { .arch { margin-top: 44px; } }
.arch__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arch__fill { fill: var(--surface); }
.arch__line { fill: none; stroke: var(--gold); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.arch__band { opacity: 0.6; }
/* the inner edge of the lattice band */
.arch__line--inner { stroke: var(--gold-line); stroke-width: 1; }
.arch__weave { fill: url(#arch-weave); opacity: 0.06; }
/* voussoirs: plain ones are the card's grey over the lattice band, each with a star */
.arch__voussoir { fill: var(--surface); }
.arch__voussoir--key { fill: rgba(231, 178, 46, 0.2); }
.arch__vstars { fill: rgba(231, 178, 46, 0.62); }
.arch__voussoir--key { stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; }
.arch__kstar { fill: var(--gold); }
.arch__dividers, .arch__lobes, .arch__columns { fill: none; stroke: var(--gold-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.arch__lobes { stroke: rgba(231, 178, 46, 0.45); }
.arch__impost, .arch__bases { fill: var(--surface); stroke: var(--gold-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.arch__finial path, .arch__finial circle { fill: var(--gold); }

.arch__content {
  position: absolute;
  inset: 22% 14% 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.arch__content p { margin: 0; }
.arch__label { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.arch__name {
  margin-top: 10px !important;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.arch__name-ar { display: block; margin-top: 6px; font-size: 1.3rem; color: var(--gold); }
.arch__time {
  margin-top: 10px !important;
  font-size: clamp(3.25rem, 14vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.arch__countdown {
  margin-top: 10px !important;
  min-height: 1.4em;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gold-bright);
}
.arch__iqamah { margin-top: 2px !important; font-size: 0.9375rem; color: var(--ink-2); }
.arch__date {
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}
.arch__hijri { display: block; }

/* ---------- notices ---------- */

.notices { display: grid; gap: 12px; padding-top: 32px; }
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--gold-wash);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--gold); }
.notice h3 { margin-bottom: 4px; font-size: 1.0625rem; font-weight: 600; }
.notice p { color: var(--ink-2); }

/* ---------- sections ---------- */

.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
@media (min-width: 900px) {
  .section { padding: 128px 0; }
}

.section__head { margin-bottom: 48px; text-align: center; }
.section__head h2 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.section__head--left { margin-bottom: 28px; text-align: left; }
.section__lede {
  max-width: 34em;
  margin: 16px auto 0;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  color: var(--ink-2);
}
@media (min-width: 900px) {
  .section__head { margin-bottom: 64px; }
}

/* ---------- prayer times ---------- */

.times-grid { display: grid; gap: 20px; }
@media (min-width: 900px) {
  /* both panels share a height; the Jumu'ah card centres its content in it */
  .times-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
  .jumuah { display: flex; flex-direction: column; justify-content: center; }
}

.times__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
.times__date { text-align: center; }
.times__date p { margin: 0; }
#pt-date { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.times__hijri { margin-top: 2px !important; font-size: 0.875rem; color: var(--ink-2); }

.times__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.times__table th {
  padding: 12px 12px 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-3);
  text-align: right;
}
.times__table th:first-child { text-align: left; }
.times__table td {
  padding: 14px 12px;
  border-top: 1px solid var(--hairline);
  text-align: right;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.times__table td:first-child { text-align: left; white-space: normal; }

.prayer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.prayer__en { font-size: 1.0625rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.prayer__ar { font-size: 1.15rem; line-height: 1; color: var(--gold); }
.prayer__tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--gold);
  color: var(--ink-on-gold);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.times__table tr.is-info td { color: var(--ink-3); font-size: 1.0625rem; font-weight: 500; }
.times__table tr.is-info .prayer__en,
.times__table tr.is-info .prayer__ar { color: var(--ink-3); font-weight: 500; }

.times__table tr.is-next td { border-top-color: transparent; background: var(--gold-wash); color: var(--gold-bright); }
.times__table tr.is-next + tr td { border-top-color: transparent; }
.times__table tr.is-next td:first-child { border-radius: 12px 0 0 12px; }
.times__table tr.is-next td:last-child { border-radius: 0 12px 12px 0; }
.times__table tr.is-next .prayer__en { color: var(--gold-bright); }

.times__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.times__foot .text-link { margin-left: auto; }

/* Jumu'ah, drawn as a prayer mat */
.jumuah {
  overflow: hidden;
  /* % padding follows the card's width, as the drawing does: the content starts
     below the lantern and stops above the foot panel */
  padding: calc(49% + 6px) 40px calc(14% + 34px);
  text-align: center;
}
@media (min-width: 640px) { .jumuah { padding-left: 62px; padding-right: 62px; } }
.jumuah > :not(.mat) { position: relative; }
.mat {
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--radius-lg) - 12px);
  box-shadow: inset 0 0 0 1px var(--gold-line);
  pointer-events: none;
}
/* the border: a running band of eight-pointed stars and beads, whole tiles on every side */
.mat::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 18px;
  border-radius: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M9 2.8L10.82 4.62L13.38 4.62L13.38 7.18L15.2 9L13.38 10.82L13.38 13.38L10.82 13.38L9 15.2L7.18 13.38L4.62 13.38L4.62 10.82L2.8 9L4.62 7.18L4.62 4.62L7.18 4.62Z' fill='none' stroke='%23e7b22e' stroke-width='.8'/%3E%3Cpath d='M9 6.4L9.76 7.16L10.84 7.16L10.84 8.24L11.6 9L10.84 9.76L10.84 10.84L9.76 10.84L9 11.6L8.24 10.84L7.16 10.84L7.16 9.76L6.4 9L7.16 8.24L7.16 7.16L8.24 7.16Z' fill='%23e7b22e'/%3E%3Cg fill='%23e7b22e'%3E%3Ccircle cx='0' cy='0' r='1.25'/%3E%3Ccircle cx='18' cy='0' r='1.25'/%3E%3Ccircle cx='0' cy='18' r='1.25'/%3E%3Ccircle cx='18' cy='18' r='1.25'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 18px 18px round;
  opacity: 0.62;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* fringe at the mat's two ends */
.mat__fringe {
  position: absolute;
  left: 22px;
  right: 22px;
  height: 9px;
  background: repeating-linear-gradient(90deg, var(--gold-line) 0 1px, transparent 1px 4px);
}
.mat__fringe--top { bottom: 100%; -webkit-mask: linear-gradient(to top, #000, transparent); mask: linear-gradient(to top, #000, transparent); }
.mat__fringe--bottom { top: 100%; -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent); }
.mat__field {
  position: absolute;
  inset: 18px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--gold-line), inset 0 0 0 4px var(--surface), inset 0 0 0 5px rgba(231, 178, 46, 0.16);
}
.mat__niche { display: block; width: 100%; height: auto; }
.mat__foot { position: absolute; left: 0; right: 0; bottom: 0; display: block; width: 100%; height: auto; }
.mat__weave { fill: url(#mat-weave); opacity: 0.07; }
.mat__spandrel { fill: url(#mat-lattice); opacity: 0.55; }
.mat__rosette { fill: rgba(231, 178, 46, 0.5); stroke: var(--surface); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.mat__rosette-eye { fill: var(--surface); }
.mat__arch, .mat__lobes, .mat__columns { fill: none; stroke: var(--gold-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mat__arch { stroke: rgba(231, 178, 46, 0.5); }
.mat__lobes { stroke: rgba(231, 178, 46, 0.42); }
.mat__foot-ground { fill: var(--surface); }
.mat__foot-line { fill: none; stroke: var(--gold-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mat__bases path { fill: var(--surface); stroke: var(--gold-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mat__motifs { fill: rgba(231, 178, 46, 0.45); }
/* columns need the room: on narrow phones the arch springs from the frame instead */
@media (max-width: 639px) { .mat__columns, .mat__bases { display: none; } }
/* the lantern */
.mat__lamp path, .mat__lamp rect, .mat__lamp ellipse, .mat__lamp circle {
  fill: rgba(231, 178, 46, 0.14);
  stroke: var(--gold);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.mat__lamp .thin { fill: none; stroke-width: 0.7; opacity: 0.8; }
.mat__lamp .fill { fill: var(--gold); stroke: none; }
.mat__lamp .glass { fill: url(#mat-glass); stroke: var(--gold); }
.mat__chain ellipse, .mat__chain circle { fill: none; }
.mat__lamp .link-edge { stroke-width: 1.4; }
.mat__lamp .susp { fill: none; stroke-width: 0.6; opacity: 0.7; }
/* a star pierced through the brass of the centre window */
.mat__lamp .pierce { fill: rgba(64, 64, 64, 0.85); stroke: none; }
.jumuah__ar { margin: 0 0 4px; font-size: 2rem; line-height: 1.4; color: var(--gold); }
.jumuah h3 { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.jumuah__sub { margin: 8px 0 24px; color: var(--ink-2); }
.jumuah__list { margin: 0 0 20px; text-align: left; }
.jumuah__list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--hairline);
}
.jumuah__list > div:last-child { border-bottom: 1px solid var(--hairline); }
.jumuah__list dt { font-size: 0.9375rem; color: var(--ink-2); }
.jumuah__list dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.jumuah__note { font-size: 0.9375rem; color: var(--ink-2); }

/* ---------- services ---------- */

.cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

.card {
  padding: 32px 28px 30px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.card .card__ar { margin: 0 0 12px; font-size: 2.1rem; line-height: 1.35; color: var(--gold); text-align: right; }
.card h3 { margin-bottom: 8px; font-size: 1.3125rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.card p { font-size: 1rem; line-height: 1.5; color: var(--ink-2); }

/* ---------- Ramadan ---------- */

.band {
  position: relative;
  padding: 96px 0;
  background:
    radial-gradient(ellipse 55% 75% at 80% 50%, rgba(231, 178, 46, 0.16), transparent 70%),
    var(--bg-deep);
  overflow: hidden;
}
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern);
  background-size: var(--pattern-size);
  opacity: 0.06;
  pointer-events: none;
}
.band__grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .band { padding: 144px 0; }
  .band__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 72px; }
}
.band h2 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.band__lede {
  max-width: 30em;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  color: var(--ink-2);
}

.countdown {
  padding: 40px 28px;
  text-align: center;
  background: rgba(64, 64, 64, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--gold-line), var(--lift);
}
.countdown p { margin: 0; }
.countdown__icon { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--gold); }
.countdown__label { font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); }
.countdown__value {
  margin-top: 8px !important;
  padding-bottom: 0.05em;
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.countdown__detail { margin-top: 14px !important; font-size: 0.9375rem; color: var(--ink-2); }

/* Ramadan on top, the two Eids side by side beneath it */
.seasons { display: grid; gap: 16px; }
.seasons__eids { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.countdown--small { padding: 24px 16px; }
.countdown--small .countdown__value { font-size: clamp(1.5rem, 2.6vw, 2rem); white-space: nowrap; }
.countdown--small .countdown__detail { margin-top: 10px !important; font-size: 0.875rem; }
.countdown__ar { margin-bottom: 2px !important; font-size: 1.375rem; line-height: 1.4; color: var(--gold); }
.seasons__note { margin: 4px 0 0 !important; text-align: center; font-size: 0.875rem; color: var(--ink-3); }

/* ---------- donate ---------- */

.donate__intro { max-width: 760px; margin: 0 auto 56px; text-align: center; }

.quote { margin: 0; padding: 8px 0 8px 24px; border-left: 2px solid var(--gold); }
.quote--center { padding: 0; border-left: 0; }
.quote blockquote { margin: 0; }
/* The hadith keeps a serif, set apart from the interface type */
.quote p { font: 400 clamp(1.5rem, 3.8vw, 2rem)/1.42 var(--font-ar); color: var(--ink); }
.quote figcaption { margin-top: 18px; font-size: 0.9375rem; font-weight: 500; color: var(--gold); }
.donate__lede {
  max-width: 34em;
  margin: 28px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-2);
}

.give-grid { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .give-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

.give { display: flex; flex-direction: column; }
.give__eyebrow { margin: 0 0 8px; font-size: 0.9375rem; font-weight: 600; color: var(--gold); }
.give h3 {
  margin-bottom: 10px;
  font-size: clamp(1.625rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.give__text { color: var(--ink-2); }
.give__note { margin-top: 18px; font-size: 0.875rem; color: var(--ink-2); }

.donate-form { display: grid; gap: 12px; margin-top: 24px; }
.amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}
.amount {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.amount:active { transform: scale(0.97); }
/* the radio itself is hidden; the chip shows its state */
.amount input { position: absolute; opacity: 0; pointer-events: none; }
.amount:has(input:checked) { background: var(--gold-wash); box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold-bright); }
.amount:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.amount-other {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  cursor: text;
}
.amount-other:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold); }
.amount-other__label { font-size: 0.9375rem; color: var(--ink-2); }
.amount-other__field { display: flex; align-items: baseline; gap: 4px; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.amount-other input {
  width: 6.5ch;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.amount-other input::placeholder { color: var(--ink-3); opacity: 1; }
.amount-other input:focus { outline: none; }
/* until card donations are switched on */
.donate-form.is-off .amount, .donate-form.is-off .amount-other, .donate-form.is-off .btn {
  background: transparent;
  box-shadow: none;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--ink-2);
  cursor: not-allowed;
}
.donate-form.is-off .btn { opacity: 1; }
/* SumUp's card form: it is drawn for a light page, so it sits on a light card */
.donate-card { margin-top: 24px; }
.donate-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--ink-2); }
.donate-card__head strong { color: var(--gold-bright); font-size: 1.125rem; }
.donate-card__form { min-height: 320px; padding: 4px; border-radius: var(--radius); background: #fff; color: #1c1c1e; }
.donate-done { margin-top: 24px; padding: 28px 20px; border-radius: var(--radius); text-align: center; background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold-line); }
.donate-done:focus { outline: none; }
.donate-done__ar { margin: 0 0 4px; font-family: var(--font-ar); font-size: 1.75rem; line-height: 1.4; color: var(--gold); }
.donate-done__title { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.donate-done p:not([class]) { color: var(--ink-2); }
.donate-done .link-btn { margin-top: 12px; }
#donate-status:empty { display: none; }

/* Shown until the mosque fills in its details */
.is-placeholder {
  background: transparent !important;
  box-shadow: none !important;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--ink-2) !important;
  cursor: not-allowed;
  pointer-events: none;
}
.placeholder-chip {
  display: inline-block;
  padding: 2px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  font-size: 0.875rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-2);
}

.bank { margin: 20px 0 0; }
.bank > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2px 12px;
  min-height: 52px;
  padding: 6px 0;
  border-top: 1px solid var(--hairline);
}
.bank > div:last-child { border-bottom: 1px solid var(--hairline); }
.bank dt { font-size: 0.9375rem; color: var(--ink-2); }
.bank dd { margin: 0 0 0 auto; text-align: right; }
.bank__value { font-weight: 600; }

.copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 6px 4px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font: 600 1rem/1.3 var(--font-sans);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  text-align: right;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.copy:active { transform: scale(0.97); }
.copy__hint {
  flex: none;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--gold-bright);
  transition: background-color 200ms ease, color 200ms ease;
}
.copy.is-copied .copy__hint { background: var(--gold); color: var(--ink-on-gold); }

.donate__inperson { margin: 36px 0 0; text-align: center; color: var(--ink-2); }

/* ---------- visit ---------- */

.visit { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .visit { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; }
}

.contact-list { margin: 0 0 36px; padding: 0; list-style: none; }
.contact-list li {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.contact-list li:first-child { padding-top: 0; }
.contact-list svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--gold); }
.contact-list address { font-size: 1.125rem; font-style: normal; letter-spacing: -0.015em; }
.contact-list a[href^="tel"],
.contact-list a[href^="mailto"] {
  color: var(--ink);
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  word-break: break-word;
  transition: color 200ms ease;
}
.contact-list__label { margin: 0 0 2px !important; font-size: 0.875rem; font-weight: 500; color: var(--ink-3); }
.contact-list__links { display: flex; gap: 18px; margin-top: 8px !important; font-size: 0.9375rem; }

.visit__subtitle { margin: 32px 0 14px; font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.02em; }

.map { margin: 0; }
.map iframe {
  width: 100%;
  min-height: 300px;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline);
  /* soften Google's colours slightly so the map sits with the rest of the page */
  filter: saturate(0.85);
}
@media (min-width: 900px) {
  .map { position: sticky; top: 96px; align-self: start; }
  .map iframe { height: 540px; aspect-ratio: auto; }
}
.map figcaption { margin-top: 16px; font-size: 0.9375rem; }

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  padding: 64px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-alt);
  box-shadow: 0 -1px 0 var(--hairline);
  font-size: 0.875rem;
  color: var(--ink-3);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  background-image: var(--pattern);
  background-size: var(--pattern-size);
  opacity: 0.07;
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
  pointer-events: none;
}
.site-footer > * { position: relative; }
.site-footer__grid { display: grid; gap: 32px; }
/* Columns are as wide as their contents and spread across the width, so nothing wraps or collides */
@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 40px 32px; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .site-footer__grid { grid-template-columns: repeat(4, auto); }
  .site-footer__brand { grid-column: auto; }
}
.site-footer__charity { margin-top: 16px; font-size: 0.8125rem; line-height: 1.6; color: var(--ink-3); }
.site-footer__heading {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.site-footer__lines { display: grid; gap: 8px; font-style: normal; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.site-footer__lines a { color: var(--ink-2); overflow-wrap: break-word; transition: color 200ms ease; }
.site-footer__links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; line-height: 1.4; }
@media (max-width: 639px) {
  .site-footer__links { grid-template-columns: repeat(2, max-content); column-gap: 40px; }
}
.site-footer__links a { color: var(--ink-2); transition: color 200ms ease; }
.site-footer__copy {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* ---------- page header (About, timetable) ---------- */

.page-head {
  position: relative;
  padding: 72px 0 56px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(231, 178, 46, 0.1), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern);
  background-size: var(--pattern-size);
  opacity: 0.07;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000, transparent 75%);
  pointer-events: none;
}
.page-head > .wrap { position: relative; }
.page-head h1 {
  padding-bottom: 0.05em;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-head .eyebrow { margin: 0 0 12px; font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--gold); }
.page-head h1.page-head__name {
  padding-bottom: 0.08em;
  font-family: var(--font-brand);
  /* 7vw keeps the name on one line at any phone width, in Cinzel or its stand-in */
  font-size: clamp(1.25rem, 7vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.page-head p:not(.eyebrow) {
  margin-top: 14px;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  letter-spacing: -0.015em;
  color: var(--ink-2);
}
.page-head__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
/* The not-found page is only a title, so it fills the screen down to the footer */
.page-head--missing { min-height: 60vh; }
@media (min-width: 900px) {
  .page-head { padding: 112px 0 72px; }
}
/* The page title already opens the page, so the first section needn't add as much again */
.page-head + .section { padding-top: 24px; }
@media (min-width: 900px) {
  .page-head + .section { padding-top: 40px; }
}

/* ---------- monthly timetable ---------- */

.month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 40px 0 20px;
}
.month-bar h2 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-align: center;
}
.month-bar__hijri {
  display: block;
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.month-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 28px; }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
/* Hold the space while the rows are being filled in, so nothing below jumps */
.table-wrap:has(tbody:empty) { min-height: 100vh; }

.month-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.month-table th,
.month-table td { padding: 11px 8px; text-align: center; white-space: nowrap; }
.month-table thead th {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--hairline-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.month-table thead th span {
  display: block;
  margin-top: 4px;
  font: 400 0.95rem/1 var(--font-ar);
  color: var(--gold);
}
.month-table tbody tr + tr td,
.month-table tbody tr + tr th { border-top: 1px solid var(--hairline); }
.month-table tbody th,
.month-table thead th:first-child { padding-left: 16px; text-align: left; }
.month-table tbody th { font-weight: 600; }
.month-table .day-num { display: inline-block; min-width: 1.6em; color: var(--ink); }
.month-table .day-name { margin-left: 6px; font-weight: 400; color: var(--ink-2); }
.month-table .col-hijri { color: var(--ink-2); }
.month-table tr.is-friday td,
.month-table tr.is-friday th { background: rgba(255, 255, 255, 0.025); }
.month-table tr.is-friday .day-name { color: var(--gold); }
.month-table tr.is-today td,
.month-table tr.is-today th { background: var(--gold-wash); color: var(--gold-bright); }
.month-table tr.is-today th { box-shadow: inset 3px 0 0 var(--gold); }
.month-table tr.is-today .day-num,
.month-table tr.is-today .day-name,
.month-table tr.is-today .col-hijri { color: var(--gold-bright); }
.month-table td.is-sunrise { color: var(--ink-2); }
.month-table.has-iqamah { min-width: 760px; }
.month-table thead th.is-group { padding-bottom: 4px; border-bottom: 0; }
.month-table thead th.is-sub { padding-top: 0; font-size: 0.6875rem; font-weight: 500; color: var(--ink-2); }
.month-table.has-iqamah td.is-adhan { border-left: 1px solid var(--hairline); }
.month-table td.is-iqamah { color: var(--gold-bright); }
.calc-mark { margin-left: 2px; font-weight: 600; color: var(--gold); }

@media (max-width: 599px) {
  .month-table { font-size: 0.82rem; }
  .month-table th,
  .month-table td { padding: 9px 4px; }
  .month-table tbody th,
  .month-table thead th:first-child { padding-left: 10px; }
  .month-table .col-hijri { display: none; }
  .month-table .day-name { display: block; margin: 0; font-size: 0.72rem; }
}

.timetable-notes { max-width: 46em; margin: 24px 0 0; }
.back-link { margin: 28px 0 80px; }

/* ---------- our story (About page) ---------- */

.story { --rule-x: 11px; max-width: 900px; margin: 0 auto; }
.story__intro {
  max-width: 32em;
  margin: 0 auto 64px;
  text-align: center;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  line-height: 1.38;
  letter-spacing: -0.02em;
}

/* A timeline down a gold rule, each era marked with a gold dot */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before {
  content: "";
  position: absolute;
  left: var(--rule-x);
  top: 14px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(231, 178, 46, 0.25) 85%, transparent);
}
.timeline__item { position: relative; padding: 0 0 48px 46px; }
.timeline__item:last-child { padding-bottom: 0; }
/* The dot sits on the rule, with a ring of page colour around it so the line stops short of it */
.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(var(--rule-x) - 5px);
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--bg);
}
/* Today also gets a fine ring around its dot */
.timeline__item--now::after {
  content: "";
  position: absolute;
  left: calc(var(--rule-x) - 10px);
  top: 3px;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
}

.timeline__when { margin: 0 0 6px; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--gold); }
.timeline__item h3 {
  margin-bottom: 10px;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.timeline__item p { line-height: 1.55; color: var(--ink-2); }
.timeline__item p + p { margin-top: -0.2em; }

@media (min-width: 760px) {
  .story { --rule-x: 151px; }
  .timeline__item { padding-left: 192px; }
  .timeline__when {
    position: absolute;
    left: 0;
    top: 3px;
    width: 124px;
    font-size: 1rem;
    text-align: right;
    color: var(--gold-bright);
  }
}

/*
 * Drawn as it is read (js/about.js): the rule grows down the page behind a
 * glowing pen, each dot turns gold as the pen reaches it, and that
 * milestone's text rises in. Without the script, or with reduced motion,
 * the whole timeline simply shows.
 */
.timeline--live::before {
  bottom: auto;
  height: var(--track, 0px);
  background: rgba(231, 178, 46, 0.16);
}
.timeline-wrap { position: relative; }
.timeline__line,
.timeline__pen {
  position: absolute;
  top: 14px;
  pointer-events: none;
  transition: transform 120ms linear;
}
.timeline__line {
  left: var(--rule-x);
  width: 2px;
  height: var(--track, 0px);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  transform: scaleY(0);
  transform-origin: 50% 0;
}
.timeline__pen {
  left: calc(var(--rule-x) - 3px);
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(241, 190, 49, 0.16), 0 0 16px 3px rgba(241, 190, 49, 0.5);
  opacity: 0;
  transition: transform 120ms linear, opacity 300ms ease;
}
.timeline__pen.is-on { opacity: 1; }
.timeline--live .timeline__item::before,
.timeline--live .timeline__item::after {
  transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 400ms ease, opacity 400ms ease;
}
.timeline--live .timeline__item::before { background: rgba(231, 178, 46, 0.35); transform: scale(0.6); }
.timeline--live .timeline__item::after { opacity: 0; transform: scale(0.5); }
.timeline--live .timeline__item.is-reached::before { background: var(--gold-bright); transform: none; }
.timeline--live .timeline__item.is-reached::after { opacity: 1; transform: none; }
.timeline--live .timeline__item > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.timeline--live .timeline__item.is-shown > * { opacity: 1; transform: none; }
.timeline--live .timeline__item.is-shown > :nth-child(2) { transition-delay: 90ms; }
.timeline--live .timeline__item.is-shown > :nth-child(n + 3) { transition-delay: 180ms; }

.sources { max-width: 900px; margin: 48px auto 0; font-size: 0.875rem; color: var(--ink-2); }
.sources summary { cursor: pointer; font-size: 0.9375rem; font-weight: 600; color: var(--gold); }
.sources ol { margin: 14px 0 0; padding-left: 20px; }
.sources li { margin-bottom: 6px; }
.sources a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
  transition: color 200ms ease;
}

/* The mission: four short lines, set large and centred, the last in gold */
.mission { text-align: center; }
.mission::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 45%, rgba(231, 178, 46, 0.1), transparent 70%);
  pointer-events: none;
}
.mission__inner { position: relative; z-index: 1; }
.mission__icon {
  width: 48px; height: 48px;
  margin: 0 auto 22px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.band h2.mission__eyebrow {
  margin: 0 0 20px;
  font-size: clamp(1.125rem, 2.6vw, 1.375rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.mission__lines { margin: 0; }
.mission__lines span {
  display: block;
  font-size: clamp(2rem, 7.4vw, 4rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.mission__lines .mission__gold {
  padding-bottom: 0.06em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mission__by {
  max-width: 640px;
  margin: 44px auto 0 !important;
  padding-top: 28px;
  border-top: 1px solid var(--gold-line);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* About the trust: a lead sentence, then the trust's own words */
.trust { max-width: 760px; margin: 0 auto; }
.trust p { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.trust .trust__lead {
  margin-bottom: 1.1em;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.trust .trust__mission { color: var(--ink); font-weight: 600; }
.trust .trust__charity {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.trust__charity .text-link { white-space: nowrap; }

/* ---------- News ----------
   Cards on the News page and the home page (js/news.js), a post's own page
   (functions/news/[slug].js), and the posting page (admin.html). */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--lift);
  transition: box-shadow 200ms ease;
}
.news-card:has(a:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.news-card__photo { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-deep); }
.news-card__photo img { width: 100%; height: 100%; object-fit: cover; }
/* No photo: the mosque's symbol on a faint gold lattice */
.news-card__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(231, 178, 46, 0.14), transparent 70%), var(--bg-deep);
}
.news-card__mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern);
  background-size: 160px auto;
  opacity: 0.1;
}
.news-card .news-card__mark img { position: relative; width: 40px; height: auto; }
.news-card__text { padding: 22px 24px 26px; }
.news-card__date { margin: 0 0 8px; font-size: 0.875rem; font-weight: 500; color: var(--gold); }
.news-card__title { font-size: 1.3125rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.news-card__title a { color: var(--ink); }
.news-card__title a:focus-visible { outline: none; }
/* The whole card is the link */
.news-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.news-card__excerpt {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
}
/* Room for the first cards while they load, so nothing below jumps */
.news-grid[aria-busy="true"] { min-height: 560px; }
.news-all { margin: 36px 0 0; text-align: center; }
.news-empty { margin: 0; text-align: center; color: var(--ink-2); }
.news-more { margin-top: 40px; text-align: center; }
.section--news { padding-top: 56px; }

/* A post */
.page-head--post h1 {
  max-width: 18em;
  margin-inline: auto;
  font-size: clamp(2rem, 5.6vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.page-head--post .eyebrow a { color: inherit; }
.post__wrap { max-width: calc(760px + 2 * var(--gutter)); padding-bottom: 96px; }
.post__draft {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold-wash);
  box-shadow: inset 0 0 0 1px var(--gold-line);
  font-size: 0.9375rem;
}
.post__photo {
  margin: 0 0 40px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--lift);
}
.post__photo img { width: 100%; height: auto; }
.post__body { font-size: 1.125rem; line-height: 1.65; color: var(--ink-2); overflow-wrap: break-word; }
.post__body p, .post__body ul { margin: 0 0 1.1em; }
.post__body > :last-child { margin-bottom: 0; }
.post__body h2 { margin: 1.6em 0 0.5em; font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.post__body > h2:first-child { margin-top: 0; }
.post__body strong { color: var(--ink); }
.post__body ul { padding-left: 1.3em; }
.post__body li { margin-bottom: 0.35em; }
.post__body li::marker { color: var(--gold); }
.post__body a {
  text-decoration: underline;
  text-decoration-color: rgba(235, 203, 139, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.post__back { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--hairline); }

/* The posting page */
.admin-main { min-height: 70vh; padding: 40px 0 96px; }
.admin-wrap { max-width: calc(820px + 2 * var(--gutter)); }
.admin-bar { display: flex; align-items: center; gap: 20px; font-size: 0.9375rem; white-space: nowrap; }
/* On a phone the posting page keeps just the mosque's symbol, leaving room for its links */
@media (max-width: 520px) { .admin .brand__text { display: none; } }
.admin h1:focus { outline: none; }
.admin code { font: 0.875em ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.admin-status { padding: 48px 0; text-align: center; color: var(--ink-2); }
.admin-card { max-width: 440px; margin: 24px auto 0; }
.admin-card h1,
.admin-head h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.admin-card h1 { margin-bottom: 20px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.admin-notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold-wash);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.admin-empty { color: var(--ink-2); }

.admin-posts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.admin-post {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.admin-post__thumb {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
}
.admin-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-post__thumb .admin-post__mark { width: 24px; height: auto; object-fit: contain; }
.admin-post__title { margin: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.admin-post__meta { margin: 4px 0 0 !important; font-size: 0.875rem; color: var(--ink-2); }
.admin-badge { font-weight: 600; color: var(--gold); }
.admin-post__actions { display: flex; align-items: center; gap: 16px; }
@media (max-width: 520px) {
  .admin-post { grid-template-columns: 56px minmax(0, 1fr); }
  .admin-post__thumb { width: 56px; }
  .admin-post__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
.btn--small { min-height: 36px; padding: 7px 16px; font-size: 0.9375rem; }

.admin-form { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; margin: 0; }
.field__label { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.field__hint { margin: 0; font-size: 0.875rem; font-weight: 400; color: var(--ink-3); }
.field__label .field__hint::before { content: "· "; }
.field--short { max-width: 240px; }
.field__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.admin-form input:not([type="checkbox"]):not([type="file"]),
.admin-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--ink);
  font: 400 1.0625rem/1.4 var(--font-sans);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}
.admin-form textarea { min-height: 280px; line-height: 1.6; resize: vertical; }
.admin-form input:focus,
.admin-form textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
.admin-form input::placeholder { color: var(--ink-3); opacity: 1; }
.field-error { margin: 0; font-size: 0.9375rem; color: #ffa494; }
.field-error:empty { display: none; }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); }
.check .field__hint { display: block; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.link-btn--danger { margin-left: auto; color: #ffa494; }

.photo-pick { display: grid; justify-items: start; gap: 12px; }
.photo-pick__preview { width: 100%; max-width: 480px; height: auto; border-radius: var(--radius); }
.photo-pick__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.photo-pick__choose:focus-within { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.toolbar button,
.seg__btn {
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: 500 0.9375rem var(--font-sans);
  cursor: pointer;
}
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 980px; background: rgba(255, 255, 255, 0.06); }
.seg__btn { min-height: 32px; background: none; color: var(--ink-2); font-size: 0.875rem; }
.seg__btn[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.admin-preview {
  min-height: 280px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

/* ---------- welcome message ----------
   Shown once to a new visitor (js/site.js). The card scrolls on its own
   when the message is taller than the screen; the button stays in reach. */

.welcome {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.7);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-line) transparent;
}
.welcome:focus, .welcome:focus-visible { outline: none; }
.welcome::backdrop {
  background: rgba(24, 24, 24, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
html:has(.welcome[open]) { overflow: hidden; }

.welcome__x { position: absolute; top: 12px; right: 12px; }

.welcome__head {
  padding: 36px 24px 0;
  text-align: center;
}
.welcome__mark { width: 30px; height: 38px; margin: 0 auto 12px; }
.welcome__ar { margin: 0 0 2px; font-size: 1.75rem; line-height: 1.4; color: var(--gold); }
.welcome__title {
  padding-bottom: 0.08em;
  font: 700 clamp(1.25rem, 5.4vw, 1.625rem)/1.2 var(--font-brand);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.welcome__head::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 20px auto 0;
  background: var(--gold);
}

.welcome__body { padding: 22px 24px 0; color: var(--ink-2); line-height: 1.6; }
.welcome__body p { margin-bottom: 0.9em; }
.welcome__greeting,
.welcome__closing { color: var(--ink); font-weight: 600; }
.welcome__body .welcome__motto {
  margin: 22px 0 0;
  text-align: center;
  font: 600 0.9375rem/1.45 var(--font-brand);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
}

/* The button stays at the bottom of the card while the message scrolls under it. */
.welcome__foot {
  position: sticky;
  bottom: 0;
  padding: 28px 24px 24px;
  background: linear-gradient(to bottom, rgba(64, 64, 64, 0), var(--surface) 22px);
}

@media (min-width: 640px) {
  .welcome__head { padding: 44px 44px 0; }
  .welcome__body { padding: 24px 44px 0; }
  .welcome__foot { padding: 32px 44px 36px; }
}

/* Opens with a soft fade and rise, and fades away when closed. */
.welcome,
.welcome::backdrop {
  transition:
    opacity 320ms var(--ease-out),
    transform 420ms var(--ease-out),
    overlay 320ms allow-discrete,
    display 320ms allow-discrete;
}
.welcome:not([open]) { opacity: 0; transform: translateY(12px) scale(0.98); }
.welcome:not([open])::backdrop { opacity: 0; }
@starting-style {
  .welcome[open] { opacity: 0; transform: translateY(16px) scale(0.98); }
  .welcome[open]::backdrop { opacity: 0; }
}

/* ---------- hover, only where there's a real pointer ---------- */

@media (hover: hover) and (pointer: fine) {
  a:hover { color: #fbd77a; }
  .text-link:hover,
  .link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
  .btn--gold:hover { background: var(--gold-bright); color: var(--ink-on-gold); }
  .btn--line:hover { background: rgba(255, 255, 255, 0.14); color: var(--ink); }
  .icon-btn:hover,
  .nav-toggle:hover { background: rgba(255, 255, 255, 0.14); }
  .brand:hover { color: var(--gold-bright); }
  .site-nav a:hover { color: var(--ink); }
  .amount:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
  .copy:hover { background: rgba(255, 255, 255, 0.06); }
  .contact-list a[href^="tel"]:hover,
  .contact-list a[href^="mailto"]:hover,
  .site-footer__lines a:hover,
  .site-footer__links a:hover { color: var(--ink); }
  .sources a:hover { color: var(--gold-bright); }
  .news-card:hover { box-shadow: inset 0 0 0 1px var(--gold-line), var(--lift); }
  .news-card:hover .news-card__title a { color: var(--gold-bright); }
  .toolbar button:hover, .seg__btn:hover { background: rgba(255, 255, 255, 0.14); color: var(--ink); }
}

/* ---------- motion ----------
   Kept to what has a job: press feedback on controls (above), the mobile
   menu (above), a one-time reveal for content below the fold as it first
   scrolls into view, and a crossfade when the prayer table changes day.
   Nothing moves on the prayer times themselves, which people check daily. */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms var(--ease-out) var(--reveal-delay, 0ms),
    transform 600ms var(--ease-out) var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Reduced motion: no movement, gentle fades only */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 200ms ease; }
  .btn:active, .icon-btn:active, .nav-toggle:active, .amount:active, .copy:active { transform: none; }
  .site-nav li { transform: none !important; transition: opacity 200ms ease !important; }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { transition: none; }
  .welcome[open], .welcome:not([open]) { transform: none; }
}

/* Reduced transparency: solid chrome instead of glass */
@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .countdown {
    background: var(--bg-alt);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .welcome::backdrop {
    background: rgba(24, 24, 24, 0.85);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* More contrast: firmer hairlines and secondary text */
@media (prefers-contrast: more) {
  :root {
    --hairline: rgba(255, 255, 255, 0.24);
    --hairline-strong: rgba(255, 255, 255, 0.36);
    --ink-2: #d6d6d6;
    --ink-3: #cacaca;
  }
}

/* ---------- print ---------- */

@media print {
  :root { color-scheme: light; }
  @page { size: A4 portrait; margin: 10mm 12mm; }
  body { background: #fff; color: #111; font-size: 9.5pt; line-height: 1.25; letter-spacing: 0; }
  .site-header, .prayer-bar, .site-footer, .skip-link, .month-bar .icon-btn, .month-actions, .no-print, .welcome { display: none !important; }
  .reveal, .timeline--live .timeline__item > * { opacity: 1 !important; transform: none !important; }
  .timeline__line, .timeline__pen { display: none; }
  .print-only { display: block; }
  span.print-only { display: inline; }
  .wrap { max-width: none; padding: 0; }
  .page-head { padding: 0 0 3mm; border: 0; background: none; }
  .page-head::before { display: none; }
  .page-head h1 { font-size: 17pt; color: #111; background: none; -webkit-background-clip: border-box; background-clip: border-box; letter-spacing: -0.01em; }
  .page-head h1.page-head__name { font-size: 17pt; padding-bottom: 0; }
  .page-head p { margin-top: 1.5mm; font-size: 9pt; color: #333; }
  .month-bar { margin: 0 0 3mm; justify-content: center; }
  .month-bar h2 { font-size: 14pt; color: #111; }
  .month-bar__hijri { color: #333; font-size: 9pt; }
  .table-wrap { border: 1px solid #888; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .month-table { font-size: 9.5pt; }
  .month-table th, .month-table td { padding: 1.05mm 2mm; line-height: 1.2; color: #111 !important; background: none !important; box-shadow: none !important; }
  .month-table thead th { background: #eee !important; border-bottom: 1px solid #888; position: static; font-size: 7.5pt; }
  .month-table thead th span { color: #333; font-size: 9pt; margin-top: 0.5mm; }
  .month-table tbody tr + tr td, .month-table tbody tr + tr th { border-top: 1px solid #ddd; }
  .month-table tr.is-friday td, .month-table tr.is-friday th { background: #f2f2f2 !important; font-weight: 600; }
  .month-table .day-num, .month-table .day-name, .month-table .col-hijri, .calc-mark { color: #111 !important; }
  .month-table .col-hijri { display: table-cell; }
  .month-table .day-name { display: inline; margin-left: 4px; }
  .month-table tr { break-inside: avoid; }
  .month-table.has-iqamah { min-width: 0; font-size: 8.5pt; }
  .month-table.has-iqamah th, .month-table.has-iqamah td { padding: 1mm 1.2mm; }
  .month-table td.is-iqamah { font-weight: 600; }
  .timetable-notes { margin-top: 3mm; font-size: 7.5pt; line-height: 1.35; color: #333; max-width: none; }
}
