/* Ilford Muslim Society: one stylesheet, no framework.
   Sizes are in rem so the "Text size" setting scales everything. */

/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #efe9dd;
  --ink: #1a2233;
  --ink-soft: #4a5468;
  --line: #ddd4c4;
  --brand: #14284b;
  --brand-2: #1c3a66;
  --on-brand: #ffffff;
  --on-brand-soft: #c9d4e8;
  --teal: #13706d;
  --teal-soft: #e1f0ee;
  --accent: #e2b25a;
  --on-accent: #14284b;
  --alert: #9b2f1b;
  --alert-soft: #fbe8e2;
  --warn-soft: #fff4dc;
  --focus: #ffbf47;
  --shadow: 0 1px 2px rgb(20 40 75 / 0.06), 0 6px 20px rgb(20 40 75 / 0.07);
  --radius: 0.875rem;
  --radius-sm: 0.5rem;
  --border: 1px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Noto Serif", Georgia, serif;
  --font-arabic: "Noto Naskh Arabic", "Amiri", "Traditional Arabic", "Segoe UI", serif;
  --bottom-nav-h: 4.25rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1524;
    --surface: #141f35;
    --surface-2: #1a2843;
    --ink: #edf1f7;
    --ink-soft: #b3bed1;
    --line: #2b3b5c;
    --brand: #0a1428;
    --brand-2: #13223f;
    --on-brand-soft: #a9b7d0;
    --teal: #63c7bf;
    --teal-soft: #14353a;
    --alert: #ff9c85;
    --alert-soft: #3b1d17;
    --warn-soft: #3a2f16;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1524;
  --surface: #141f35;
  --surface-2: #1a2843;
  --ink: #edf1f7;
  --ink-soft: #b3bed1;
  --line: #2b3b5c;
  --brand: #0a1428;
  --brand-2: #13223f;
  --on-brand-soft: #a9b7d0;
  --teal: #63c7bf;
  --teal-soft: #14353a;
  --alert: #ff9c85;
  --alert-soft: #3b1d17;
  --warn-soft: #3a2f16;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  color-scheme: dark;
}

:root[data-contrast="high"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --ink: #000000;
  --ink-soft: #000000;
  --line: #000000;
  --brand: #000000;
  --brand-2: #000000;
  --on-brand-soft: #ffffff;
  --teal: #004d4a;
  --teal-soft: #ffffff;
  --alert: #8a0000;
  --alert-soft: #ffffff;
  --warn-soft: #ffffff;
  --shadow: none;
  --border: 2px;
}

:root[data-contrast="high"][data-theme="dark"] {
  --bg: #000000;
  --surface: #000000;
  --surface-2: #000000;
  --ink: #ffffff;
  --ink-soft: #ffffff;
  --line: #ffffff;
  --teal: #7ff0e6;
  --teal-soft: #000000;
  --alert: #ffb3a3;
  --alert-soft: #000000;
  --warn-soft: #000000;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-contrast="high"]:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #000000;
    --surface-2: #000000;
    --ink: #ffffff;
    --ink-soft: #ffffff;
    --line: #ffffff;
    --teal: #7ff0e6;
    --teal-soft: #000000;
    --alert: #ffb3a3;
    --alert-soft: #000000;
    --warn-soft: #000000;
  }
}

html { font-size: 100%; }
html[data-text="large"] { font-size: 118.75%; }
html[data-text="xlarge"] { font-size: 137.5%; }

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

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
}

@media (min-width: 64em) {
  body { padding-bottom: 0; }
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); }
h3 { font-size: 1.2rem; font-family: var(--font-body); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
img, svg { max-width: 100%; }
strong { font-weight: 700; }
[lang="ar"] { font-family: var(--font-arabic); }

a { color: var(--teal); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--ink);
  border-radius: 4px;
}
main:focus { outline: none; }

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

.skip-link {
  position: absolute; left: 1rem; top: -10rem; z-index: 100;
  background: var(--focus); color: #000; padding: 0.75rem 1rem; font-weight: 700; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }

.container { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 48em) { .container { padding-inline: 1.5rem; } }

.muted { color: var(--ink-soft); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1.05em; letter-spacing: 0.04em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 44rem; }
.optional { font-weight: 400; color: var(--ink-soft); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.875rem; padding: 0.6rem 1.15rem;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--large { min-height: 3.25rem; padding: 0.75rem 1.4rem; font-size: 1.08rem; }
.btn--primary { background: var(--teal); color: var(--surface); }
.btn--primary:hover { background: var(--brand-2); color: #fff; }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: #f0c675; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn:disabled { opacity: 0.5; cursor: default; }
:root[data-contrast="high"] .btn--ghost { border-color: var(--ink); }

.icon-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  min-width: 3rem; min-height: 3rem; padding: 0.25rem 0.5rem;
  background: transparent; color: var(--ink); border: var(--border) solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 0.72rem; font-weight: 650; cursor: pointer;
}
.icon-btn .icon { width: 1.35rem; height: 1.35rem; }
.icon-btn[aria-expanded="true"] { background: var(--teal-soft); border-color: var(--teal); }

.badge {
  display: inline-block; margin-left: 0.5rem; padding: 0.05rem 0.55rem;
  background: var(--accent); color: var(--on-accent); border-radius: 999px;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.03em; text-transform: uppercase; vertical-align: 0.15em;
}
.chip {
  display: inline-block; padding: 0.15rem 0.7rem; margin-bottom: 0.75rem;
  background: var(--teal-soft); color: var(--teal); border-radius: 999px; font-size: 0.9rem; font-weight: 650;
}

/* ---------------------------------------------------------------- header */

.topbar { background: var(--brand); color: var(--on-brand); font-size: 0.9rem; }
.topbar__inner { display: flex; align-items: center; gap: 1rem; min-height: 2.75rem; padding-block: 0.35rem; }
.date-line { margin: 0; display: flex; gap: 0 0.75rem; flex-wrap: wrap; min-width: 0; line-height: 1.35; }
.date-line__hijri { color: var(--accent); }
.topbar__live { margin-left: auto; flex: none; white-space: nowrap; color: var(--on-brand); display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 600; text-decoration: none; padding: 0.35rem 0; }
.topbar__live:hover { text-decoration: underline; }
.topbar__live .icon { color: var(--accent); }

.strip { display: none; align-items: center; gap: 0.75rem; }
.strip__label { color: var(--on-brand-soft); white-space: nowrap; }
.strip__list { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.strip__list li { display: flex; gap: 0.35rem; padding: 0.15rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.strip__name { color: var(--on-brand-soft); }
.strip__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.strip__list .is-next { background: var(--accent); color: var(--on-accent); }
.strip__list .is-next .strip__name { color: var(--on-accent); }
@media (min-width: 60em) { .strip { display: flex; } }

.site-header { background: var(--surface); border-bottom: var(--border) solid var(--line); position: relative; z-index: 20; }
.masthead { display: flex; align-items: center; gap: 1rem; min-height: 4.75rem; padding-block: 0.6rem; position: relative; }

.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; margin-right: auto; min-width: 0; }
/* The logo artwork has a white background, so in dark mode it sits on a white panel. */
.brand__logo { display: block; height: 4.25rem; width: auto; max-width: 100%; border-radius: var(--radius-sm); }
@media (min-width: 48em) { .brand__logo { height: 5.5rem; } }
:root[data-theme="dark"] .brand__logo { background: #fff; padding: 0.15rem 0.35rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand__logo { background: #fff; padding: 0.15rem 0.35rem; } }

.masthead__actions { display: flex; align-items: center; gap: 0.5rem; }
.masthead__donate { display: none; }
@media (min-width: 40em) { .masthead__donate { display: inline-flex; } }
/* Menu mode: "Text size" lives inside the menu, leaving room for the myLdn
   sign-in (a fixed 160px) beside the menu button. */
@media (max-width: 63.99em) {
  .masthead__text { display: none; }
}
@media (max-width: 27.49em) {
  .masthead { gap: 0.5rem; }
  /* Below ~360px there is no room for both: the menu button wraps under the sign-in. */
  .masthead__actions { gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; row-gap: 0.35rem; }
  .masthead .brand__logo { height: 3rem; }
}

/* Navigation: drawer on small screens, inline on large. */
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; inset: 100% 0 auto 0; z-index: 30;
  background: var(--surface); border-bottom: var(--border) solid var(--line); box-shadow: var(--shadow);
  max-height: calc(100dvh - 8rem); overflow-y: auto;
}
.site-nav__list { list-style: none; margin: 0; padding: 0.5rem 1rem 1rem; }
.site-nav__list a {
  display: flex; align-items: center; min-height: 3.25rem; padding: 0 0.75rem;
  color: var(--ink); text-decoration: none; font-size: 1.15rem; font-weight: 600; border-radius: var(--radius-sm);
}
.site-nav__settings { border-top: var(--border) solid var(--line); margin-top: 0.5rem; padding-top: 0.5rem; }
.site-nav__settings button {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 3.25rem; padding: 0 0.75rem;
  background: none; color: var(--ink); border: 0; border-radius: var(--radius-sm);
  font: inherit; font-size: 1.15rem; font-weight: 600; text-align: left; cursor: pointer;
}
.site-nav__list a:hover, .site-nav__settings button:hover { background: var(--surface-2); }
.site-nav__list a[aria-current="page"] { background: var(--teal-soft); color: var(--teal); box-shadow: inset 4px 0 0 var(--teal); }

@media (min-width: 64em) {
  .menu-toggle { display: none; }
  /* Too many links to sit beside the logo: the nav takes its own row below it. */
  .masthead { flex-wrap: wrap; row-gap: 0.25rem; }
  .site-nav, .site-nav.is-open { display: block; position: static; box-shadow: none; border: 0; max-height: none; overflow: visible; background: none; }
  .site-nav { order: 3; flex-basis: 100%; border-top: var(--border) solid var(--line); }
  .site-nav__list { display: flex; flex-wrap: wrap; gap: 0.15rem; padding: 0; }
  .site-nav__list a { min-height: 2.75rem; font-size: 0.98rem; padding: 0 0.7rem; }
  .site-nav__list a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--teal); background: none; }
  .site-nav__donate, .site-nav__settings { display: none; }
}

.settings {
  display: none; position: absolute; right: 1rem; top: calc(100% + 0.25rem); z-index: 40;
  width: min(28rem, calc(100vw - 2rem)); padding: 1.25rem;
  background: var(--surface); color: var(--ink); border: var(--border) solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.settings.is-open { display: block; }
.settings__title { font-size: 1.15rem; }
.settings__group { margin-bottom: 1rem; }
.settings__label { font-weight: 700; margin-bottom: 0.4rem; }
.settings__note { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.segmented { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.segmented button {
  flex: 1 1 auto; min-height: 2.875rem; padding: 0.4rem 0.75rem;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; cursor: pointer;
}
.segmented button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }
.segmented button[aria-pressed="true"]::before { content: "✓ "; }
.sample { font-family: var(--font-head); font-weight: 700; }
.sample--1 { font-size: 0.9rem; }
.sample--2 { font-size: 1.1rem; }
.sample--3 { font-size: 1.35rem; }

/* ---------------------------------------------------------------- day banners */

/* Bold, fixed brand colours (same in light and dark) so notices stand out.
   Each tone pairs a background with a contrasting call-to-action button. */
.banner {
  --b-bg: #f2b43c; --b-ink: #14284b; --b-soft: #1f2d4d;
  --cta-bg: #14284b; --cta-ink: #ffffff; --cta-hover: #1c3a66;
  background: var(--b-bg); color: var(--b-ink);
  border-bottom: 3px solid #14284b;
}
/* Urgent changes (e.g. clocks going back) get a vivid orange. */
.banner--alert {
  --b-bg: #c2410c; --b-ink: #ffffff; --b-soft: #fff1e8;
  --cta-bg: #f2b43c; --cta-ink: #14284b; --cta-hover: #f7c868;
  border-bottom-color: #7c2d12;
}
.banner__inner { display: flex; align-items: center; gap: 0.75rem 1rem; padding-block: 0.85rem; }
.banner__icon { width: 1.75rem; height: 1.75rem; color: var(--b-ink); flex: none; }
.banner__body { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.25rem; min-width: 0; }
.banner__text { margin: 0; flex: 1 1 22rem; color: var(--b-soft); }
.banner__title { font-weight: 750; color: var(--b-ink); }
.banner__cta {
  display: inline-flex; align-items: center; gap: 0.45rem; flex: none;
  min-height: 2.75rem; padding: 0.45rem 1.1rem; border-radius: 999px;
  background: var(--cta-bg); color: var(--cta-ink); font-weight: 750; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.18);
}
.banner__cta:hover { background: var(--cta-hover); }
.banner__cta .icon { width: 1.1em; height: 1.1em; }
.banner__close {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.75rem; height: 2.75rem; margin-right: -0.5rem;
  background: none; border: 0; border-radius: 50%; color: var(--b-ink); cursor: pointer;
}
.banner__close:hover { background: rgb(0 0 0 / 0.15); }
.banner :focus-visible { box-shadow: 0 0 0 5px var(--b-ink); }

:root[data-contrast="high"] .banner {
  --b-bg: var(--surface); --b-ink: var(--ink); --b-soft: var(--ink);
  --cta-bg: var(--ink); --cta-ink: var(--surface); --cta-hover: var(--ink);
  border-bottom: 3px solid var(--ink);
}

/* ---------------------------------------------------------------- hero & next prayer */

.hero {
  background: var(--brand) url("../img/pattern.svg") repeat;
  background-size: 5rem;
  color: var(--on-brand);
  padding-block: 2.5rem 3rem;
}
:root[data-contrast="high"] .hero { background-image: none; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
@media (min-width: 56em) { .hero__grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; } }
.hero__salam { color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.hero__salam [lang="ar"] { font-size: 1.35em; }
.hero__title { color: var(--on-brand); }
.hero .lead { color: var(--on-brand-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero .btn--ghost { color: var(--on-brand); border-color: rgb(255 255 255 / 0.4); }
.hero .btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero .btn--primary { background: var(--accent); color: var(--on-accent); }

.next-card {
  background: var(--surface); color: var(--ink);
  border: var(--border) solid var(--line); border-radius: calc(var(--radius) * 1.4);
  box-shadow: var(--shadow); padding: 1.5rem; min-height: 14rem;
  display: flex; flex-direction: column; justify-content: center;
  border-top: 6px solid var(--teal);
}
.next-card.is-soon { border-top-color: var(--accent); }
.next-card__loading { color: var(--ink-soft); margin: 0; }
.next-card__eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 750; color: var(--teal); margin-bottom: 0.25rem; }
.next-card__title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); margin-bottom: 0.75rem; }
.next-card__title:has(+ .next-card__also:not([hidden])) { margin-bottom: 0.2rem; }
.next-card__also { font-family: var(--font-head); font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem); font-weight: 700; color: var(--ink-soft); margin: 0 0 0.85rem; }
.next-card__also-time { font-family: var(--font-body); font-weight: 500; font-size: 0.85em; }
.next-card__when { font-family: var(--font-body); font-weight: 500; font-size: 0.6em; color: var(--ink-soft); white-space: nowrap; }
.next-card__meta { margin: 0.75rem 0 0; color: var(--ink-soft); }
.next-card--compact { min-height: 0; }

/* Quick donate (myLdn) sits on a light card in the hero, so the component
   picks up the page's light colours rather than the dark hero behind it. */
.quick-donate {
  background: var(--surface); color: var(--ink);
  border: var(--border) solid var(--line); border-radius: calc(var(--radius) * 1.4);
  box-shadow: var(--shadow); overflow: hidden;
}
/* Wide screens: welcome text, countdown and quick donate in one row, so all three show on landing. */
@media (min-width: 56em) {
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
  /* The countdown shares the row, so size it to its column rather than the screen. */
  .hero .countdown__value { font-size: clamp(2rem, 4vw, 3.75rem); }
  .hero .countdown__sep { font-size: clamp(1.6rem, 3.2vw, 3rem); }
}

.countdown { display: flex; align-items: flex-start; gap: 0.35rem; margin: 0; font-variant-numeric: tabular-nums; }
.countdown__part { display: flex; flex-direction: column; align-items: center; min-width: 3.4ch; }
.countdown__value {
  font-size: clamp(2.2rem, 11vw, 3.75rem); font-weight: 750; line-height: 1;
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.35rem 0.5rem; letter-spacing: 0.02em;
}
.countdown__unit { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.35rem; text-transform: uppercase; letter-spacing: 0.08em; }
.countdown__sep { font-size: clamp(1.8rem, 8vw, 3rem); font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.is-soon .countdown__value { background: var(--accent); color: var(--on-accent); }
.countdown [hidden] { display: none; }
/* Jamaat in progress: the card counts up the minutes since it started. */
.next-card.is-live .next-card__eyebrow { color: var(--alert); }
.is-live .countdown__value { background: var(--teal-soft); color: var(--teal); }

/* ---------------------------------------------------------------- sections & cards */

.section { margin-block: 2.5rem; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section__head h2 { margin: 0; }
.section__head a, .section__more a { font-weight: 650; }
.section__more { margin-top: 0.75rem; }

.card {
  background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem;
}
@media (min-width: 48em) { .card { padding: 1.5rem; } }
.card--accent { border-top: 5px solid var(--teal); }
.card--urgent { border-left: 6px solid var(--alert); }
.card--warning { background: var(--warn-soft); }
.card__title { display: flex; align-items: center; gap: 0.6rem; font-size: 1.35rem; }
.card__title .icon { color: var(--teal); width: 1.5rem; height: 1.5rem; }
.card > :last-child { margin-bottom: 0; }

.split { display: grid; gap: 1.25rem; }
@media (min-width: 48em) { .split { grid-template-columns: 1fr 1fr; } }

.with-aside { display: grid; gap: 0 2rem; }
@media (min-width: 64em) {
  .with-aside { grid-template-columns: minmax(0, 1fr) 20rem; }
  .with-aside__aside { padding-top: 2.5rem; }
  .sticky { position: sticky; top: 1rem; }
}
.with-aside__aside .sticky > * + * { margin-top: 1.25rem; }

.page-head { background: var(--surface); border-bottom: var(--border) solid var(--line); padding-block: 2rem 1.5rem; }
.page-head--accent { background: var(--teal-soft); }
.page-head h1 { margin-bottom: 0.35rem; }
.page-head .lead { margin-bottom: 0; }
.jump-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.jump-links a {
  padding: 0.45rem 0.9rem; border: var(--border) solid var(--line); border-radius: 999px;
  text-decoration: none; font-weight: 600; color: var(--ink); background: var(--bg);
}
.jump-links a:hover { border-color: var(--teal); color: var(--teal); }

/* ---------------------------------------------------------------- day view */

.day-view__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.day-view__date { font-size: 1.4rem; margin: 0; }
.day-view__date:focus { outline: none; }
.day-view__hijri { margin: 0.2rem 0 0; color: var(--teal); font-weight: 600; }
.day-view__controls { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.day-view__controls .btn { min-height: 2.75rem; padding-inline: 0.85rem; }
.day-view__extras { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.day-view__note { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--alert); font-weight: 650; }

.times { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.times th, .times td { padding: 0.8rem 0.75rem; text-align: left; border-bottom: var(--border) solid var(--line); }
.times thead th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); padding-block: 0.4rem; }
.times tbody th { font-size: 1.12rem; font-weight: 700; }
.times td { font-size: 1.12rem; }
.times__jamaat { font-weight: 750; color: var(--teal); }
.times tbody tr:last-child > * { border-bottom: 0; }
.times .is-sunrise th, .times .is-sunrise td { color: var(--ink-soft); font-weight: 500; font-size: 1rem; }
.times .is-next { background: var(--teal-soft); }
.times .is-next th { box-shadow: inset 5px 0 0 var(--teal); }
.times .stack { display: block; }
.times .stack small { font-weight: 600; color: var(--ink-soft); font-size: 0.78rem; }

.notice-inline { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0; color: var(--ink-soft); }

/* ---------------------------------------------------------------- jumu'ah */

.jumuah__date { font-weight: 650; color: var(--ink-soft); margin-bottom: 0.5rem; }
.jumuah__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 0.75rem; }
.jumuah__list li { background: var(--teal-soft); border-radius: var(--radius-sm); padding: 0.85rem 1rem; display: flex; flex-direction: column; }
.jumuah__label { font-size: 0.85rem; font-weight: 650; color: var(--ink-soft); }
.jumuah__time { font-size: 1.75rem; font-weight: 750; color: var(--teal); font-variant-numeric: tabular-nums; }
:root[data-contrast="high"] .jumuah__list li { border: 2px solid var(--line); }

/* ---------------------------------------------------------------- month timetable */

.timetable__bar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.timetable__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.month-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  min-height: 2.75rem; padding: 0.35rem 1.1rem; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line);
  font: inherit; font-weight: 600; cursor: pointer;
}
.pill:hover { border-color: var(--teal); }
.pill[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--surface); }
.timetable__head { margin-bottom: 0.75rem; }
.timetable__title { margin: 0; }
.timetable__title:focus { outline: none; }
.timetable__hijri { color: var(--teal); font-weight: 600; margin: 0.2rem 0 0; }
.timetable__key { font-size: 0.92rem; margin-top: 0.75rem; }

.table-scroll { overflow-x: auto; border: var(--border) solid var(--line); border-radius: var(--radius); background: var(--surface); }
.month { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.98rem; white-space: nowrap; }
.month th, .month td { padding: 0.55rem 0.6rem; text-align: center; border-bottom: 1px solid var(--line); }
.month thead th { background: var(--brand); color: var(--on-brand); font-weight: 700; position: sticky; top: 0; }
.month thead .month__sub th { background: var(--brand-2); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-brand-soft); font-weight: 600; }
.month tbody th { position: sticky; left: 0; background: var(--surface); text-align: left; font-weight: 700; }
.month__jamaat { font-weight: 750; color: var(--teal); }
.month__sunrise, .month__hijri { color: var(--ink-soft); }
.month .is-friday > * { background: var(--teal-soft); }
.month .is-today > * { background: var(--warn-soft); box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.month .is-today:focus { outline: 3px solid var(--focus); outline-offset: -3px; }

/* ---------------------------------------------------------------- tiles & quick links */

.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.tile {
  display: flex; flex-direction: column; gap: 0.35rem; height: 100%;
  padding: 1.25rem; background: var(--surface); color: var(--ink); text-decoration: none;
  border: var(--border) solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
a.tile:hover { border-color: var(--teal); transform: translateY(-2px); }
.tile__icon { width: 2.5rem; height: 2.5rem; padding: 0.5rem; background: var(--teal-soft); color: var(--teal); border-radius: 50%; margin-bottom: 0.35rem; }
.tile__title { font-weight: 750; font-size: 1.1rem; }
.tile__text { color: var(--ink-soft); font-size: 0.97rem; }

.quick-links { padding: 1rem; }
.quick-links__title { font-size: 1.2rem; padding: 0.25rem 0.5rem 0.5rem; margin: 0; }
.quick-links__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.quick-links__list a {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0.4rem 0.5rem;
  color: var(--ink); text-decoration: none; font-weight: 600; border-radius: var(--radius-sm);
}
.quick-links__list a:hover { background: var(--teal-soft); color: var(--teal); }
.quick-links__list .icon { width: 2.1rem; height: 2.1rem; padding: 0.42rem; background: var(--teal-soft); color: var(--teal); border-radius: 50%; }
@media (max-width: 63.99em) {
  .with-aside__aside { margin-bottom: 2.5rem; }
  .quick-links__list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
}

.updates-card { padding: 1rem; }
.updates { list-style: none; margin: 0; padding: 0 0.5rem; }
.updates li { padding-block: 0.65rem; border-bottom: 1px solid var(--line); }
.updates li:last-child { border-bottom: 0; }
.updates a { font-weight: 600; }

/* ---------------------------------------------------------------- appeal, ask, visit */

.appeal {
  display: grid; gap: 1.5rem; align-items: center;
  background: var(--brand) url("../img/pattern.svg") repeat; background-size: 5rem;
  color: var(--on-brand); border-radius: calc(var(--radius) * 1.4); padding: 1.75rem;
}
:root[data-contrast="high"] .appeal { background-image: none; border: 2px solid var(--line); }
@media (min-width: 48em) { .appeal { grid-template-columns: 1.4fr 1fr; padding: 2.25rem; } }
.appeal h2 { color: var(--on-brand); }
.appeal p { color: var(--on-brand-soft); }
.appeal__hadith { font-family: var(--font-head); font-style: italic; color: var(--accent) !important; margin: 0; }
.appeal__small { font-size: 0.95rem; margin: 0.75rem 0 0; }
.appeal a:not(.btn) { color: var(--accent); }

.ask { display: grid; gap: 1rem; align-items: center; background: var(--teal-soft); border-radius: var(--radius); padding: 1.5rem; }
@media (min-width: 40em) { .ask { grid-template-columns: auto 1fr auto; } }
.ask h2 { margin-bottom: 0.25rem; }
.ask p { margin: 0; }
.ask__icon { width: 3rem; height: 3rem; color: var(--teal); }
:root[data-contrast="high"] .ask { border: 2px solid var(--line); }

.visit { background: var(--surface); border-top: var(--border) solid var(--line); padding-block: 2.5rem; margin-top: 3rem; }
.visit__grid { display: grid; gap: 2rem; }
@media (min-width: 56em) { .visit__grid { grid-template-columns: 1.2fr 1fr; } }
.visit__address { display: flex; gap: 0.6rem; font-size: 1.15rem; font-weight: 600; }
.visit__address .icon { color: var(--teal); margin-top: 0.3rem; }
.visit__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.facts { display: grid; gap: 0.75rem; margin: 0; }
.facts > div { display: grid; gap: 0.1rem; padding: 0.85rem 1rem; background: var(--bg); border-radius: var(--radius-sm); border: var(--border) solid var(--line); }
.facts dt { font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.facts dd { margin: 0; font-weight: 600; }
.facts--inline { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin-bottom: 1.25rem; }

/* ---------------------------------------------------------------- content pages */

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose-sections { display: grid; gap: 1.25rem; margin-block: 2rem; }

.service { scroll-margin-top: 1rem; }
.service__head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.75rem; }
.service__head h2 { margin: 0; }
.service__icon { width: 2.75rem; height: 2.75rem; padding: 0.55rem; background: var(--teal-soft); color: var(--teal); border-radius: 50%; }
.card--urgent .service__icon { background: var(--alert-soft); color: var(--alert); }
.service__lead { font-family: var(--font-head); font-size: 1.15rem; }
.service__lead [lang="ar"] { font-size: 1.4rem; }
.service__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.service h3 { margin-top: 1.5rem; }

.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.55rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.55em; width: 0.65rem; height: 0.65rem;
  background: var(--teal); transform: rotate(45deg); border-radius: 2px;
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.75rem; margin-bottom: 0.9rem; min-height: 2rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  background: var(--teal); color: var(--surface); border-radius: 50%; font-weight: 750;
}

.glossary { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.glossary > div { background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-sm); padding: 1rem; }
.glossary dt { font-weight: 750; color: var(--teal); }
.glossary dd { margin: 0.25rem 0 0; }

.prayer-today { display: grid; gap: 1.25rem; }
@media (min-width: 56em) { .prayer-today { grid-template-columns: 1fr 1.4fr; align-items: start; } }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--teal); }
.timeline li { position: relative; padding: 0 0 1.25rem 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: -0.6rem; top: 0.35rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.timeline__year { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--teal); }

/* donate */
.donate-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.donate-option { display: flex; flex-direction: column; align-items: flex-start; }
.donate-option h2 { font-size: 1.35rem; }
.donate-option--primary { border-top: 6px solid var(--accent); }
.donate-option .btn { margin-top: auto; }
.donate-option__icon { width: 3rem; height: 3rem; padding: 0.6rem; border-radius: 50%; background: var(--teal-soft); color: var(--teal); margin-bottom: 0.75rem; }
.bank { display: grid; gap: 0.6rem; margin: 0; width: 100%; }
.bank > div { display: grid; gap: 0.15rem; }
.bank dt { font-size: 0.85rem; color: var(--ink-soft); font-weight: 650; }
.bank dd { margin: 0; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-weight: 650; }
.copy {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.5rem; padding: 0.25rem 0.75rem;
  background: var(--surface); color: var(--teal); border: 2px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 0.9rem; font-weight: 650; cursor: pointer;
}
.copy:hover { border-color: var(--teal); }
.address-block { padding: 0.85rem 1rem; background: var(--bg); border-radius: var(--radius-sm); border: var(--border) solid var(--line); font-weight: 600; }

/* contact */
.contact-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.contact-card {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 1.25rem;
  background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none;
}
.contact-card:hover { border-color: var(--teal); }
.contact-card__icon { width: 2.5rem; height: 2.5rem; padding: 0.5rem; border-radius: 50%; background: var(--teal-soft); color: var(--teal); margin-bottom: 0.5rem; }
.contact-card__label { font-weight: 650; color: var(--ink-soft); }
.contact-card__value { font-size: 1.15rem; font-weight: 700; color: var(--teal); }

.directory { width: 100%; border-collapse: collapse; }
.directory th, .directory td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.directory thead th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.directory tbody tr:last-child > * { border-bottom: 0; }

/* forms */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.65rem 0.8rem;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--ink-soft); border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; }
.field__help { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.form__status { margin: 0; font-weight: 650; color: var(--teal); }
.form .btn { justify-self: start; }

/* events */
.events { display: grid; gap: 1.25rem; }
.event { scroll-margin-top: 1rem; }
.event__title { font-family: var(--font-head); font-size: 1.45rem; }
.event__when, .event__next { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; font-weight: 650; }
.event__when .icon, .event__next .icon { color: var(--teal); }
.event__next { color: var(--teal); margin-bottom: 1rem; }
.event__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.empty-state { text-align: center; padding-block: 4rem; }
.empty-state .lead { margin-inline: auto; }
.empty-state .hero__actions { justify-content: center; }

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

.site-footer { background: var(--brand); color: var(--on-brand-soft); margin-top: 0; padding-top: 2.5rem; }
.site-footer a { color: var(--on-brand); }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); padding-bottom: 2rem; }
.site-footer__name { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--on-brand); margin-bottom: 0.5rem; }
.site-footer__heading { font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.75rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { margin-bottom: 0.35rem; }
.site-footer__links a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-block: 1.25rem; border-top: 1px solid rgb(255 255 255 / 0.15); font-size: 0.92rem;
}
.site-footer__base p { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; margin: 0; padding: 0; }

/* ---------------------------------------------------------------- bottom nav (phones & tablets) */

.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: var(--border) solid var(--line);
  box-shadow: 0 -4px 16px rgb(0 0 0 / 0.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  min-height: var(--bottom-nav-h); padding: 0.35rem 0.15rem;
  background: none; border: 0; color: var(--ink-soft); text-decoration: none;
  font: inherit; font-size: 0.74rem; font-weight: 650; line-height: 1.1; text-align: center; cursor: pointer;
}
.bottom-nav .icon { width: 1.5rem; height: 1.5rem; }
.bottom-nav [aria-current="page"], .bottom-nav [aria-expanded="true"] { color: var(--teal); }
.bottom-nav [aria-current="page"] .icon { background: var(--teal-soft); border-radius: 999px; width: 3rem; padding-inline: 0.75rem; }
@media (min-width: 64em) { .bottom-nav { display: none; } }

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  a.tile:hover { transform: none; }
}

/* ---------------------------------------------------------------- print (monthly timetable) */

@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --ink-soft: #333; --line: #999; --teal: #000; --teal-soft: #eee; --brand: #fff; --brand-2: #fff; --on-brand: #000; --on-brand-soft: #333; }
  body { padding: 0; font-size: 10pt; background: #fff; }
  .site-header, .banners, .site-footer, .bottom-nav, .skip-link, .page-head .lead,
  .prayer-today, #jumuah, .timetable__bar, .visit, [aria-labelledby="explain-title"] { display: none !important; }
  .page-prayer-times .page-head { padding: 0; border: 0; }
  .table-scroll { overflow: visible; border: 0; }
  .month { font-size: 9pt; }
  .month th, .month td { padding: 2pt 4pt; }
  .month thead th { position: static; border-bottom: 1px solid #000; }
  .month tbody th { position: static; }
  .card { box-shadow: none; }
}

/* ---------------------------------------------------------------- small-screen refinements */

.icon-btn { overflow-wrap: normal; white-space: nowrap; }
.bottom-nav span { overflow-wrap: normal; }

@media (max-width: 40em) {
  /* One banner at a time on phones; dismissing it reveals the next. */
  .banner:not(:first-child) { display: none; }
  .banner__inner { padding-block: 0.75rem; font-size: 0.97rem; align-items: flex-start; }
}

@media (max-width: 55.99em) {
  /* On phones the next prayer is what most people came for. */
  .hero { padding-block: 1.25rem 2rem; }
  .hero__grid > .next-card { order: -1; }
  /* Quick donate straight after it, so both fit on the first screen. */
  .hero__grid > .quick-donate { order: -1; }
}

/* Grid children may shrink below their content width (long words, big text). */
.with-aside > *, .split > *, .prayer-today > *, .prose-sections > *, .hero__grid > *, .visit__grid > *, .donate-grid > * { min-width: 0; }
.events > *, .facts > div { min-width: 0; }
.facts dd, .contact-card__value, .directory td { overflow-wrap: anywhere; }

@media (max-width: 30em) {
  .times th, .times td { padding: 0.7rem 0.4rem; }
  .times tbody th, .times td { font-size: 1.02rem; }
}


/* ---------------------------------------------------------------- compact banners on phones */

.banner__more { display: none; }
@media (max-width: 40em) {
  .banner:not(.is-expanded) .banner__msg { display: none; }
  .banner__body { gap: 0.5rem 0.75rem; }
  .banner__text { flex-basis: 100%; }
  .banner__cta { min-height: 2.5rem; padding: 0.3rem 0.9rem; font-size: 0.95rem; }
  .banner__more {
    display: inline; padding: 0.6rem 0.25rem; margin: -0.6rem 0;
    background: none; color: var(--b-ink); border: 0;
    font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer;
  }
}
@media (min-width: 40.01em) {
  .banner__inner { padding-block: 0.65rem; }
}

/* ---------------------------------------------------------------- new / infrequent visitors
   prefs-boot.js sets data-visitor="new" before paint. Regular visitors see the
   standard hero; newcomers get a "Find us" map beside the countdown, laid out
   so both are visible without scrolling. */

.find-us, .hero__welcome { display: none; }

:root[data-visitor="new"] .hero__welcome { display: block; color: var(--on-brand); font-weight: 650; margin-bottom: 0.5rem; }
:root[data-visitor="new"] .find-us {
  display: block; position: relative; overflow: hidden; min-height: 10rem;
  background: #e8e4dc; color: var(--ink);
  border: var(--border) solid var(--line); border-radius: calc(var(--radius) * 1.4); box-shadow: var(--shadow);
}
.find-us__map { position: absolute; inset: 0; display: block; }
.find-us__map img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.find-us__map:hover img { filter: saturate(1.15); }
/* Address and directions sit on the map, like a maps app. */
.find-us__body {
  position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0.6rem;
  display: grid; gap: 0.1rem; padding: 0.6rem 0.8rem 0.7rem;
  background: var(--surface); border-radius: var(--radius); box-shadow: 0 4px 14px rgb(0 0 0 / 0.22);
}
.find-us__title { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 1.1rem; }
.find-us__title .icon { color: var(--teal); }
.find-us__address { margin: 0; font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); }
.find-us__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.find-us__actions .btn { min-height: 2.6rem; padding: 0.35rem 1rem; }
.find-us__credit {
  position: absolute; top: 0; right: 0; margin: 0; padding: 0.1rem 0.45rem;
  background: rgb(255 255 255 / 0.85); color: #333; font-size: 0.68rem; border-bottom-left-radius: var(--radius-sm);
}
.find-us__credit a { color: inherit; }

/* Phones and small tablets: a compact countdown with quick donate straight after it (both on the
   first screen), then the map for newcomers, then the welcome text. */
@media (max-width: 55.99em) {
  .hero { padding-block: 0.6rem 1.5rem; }
  .hero__grid { gap: 0.75rem; }
  .hero__grid > .next-card { order: -2; min-height: 0; padding: 0.9rem 1.1rem 1rem; border-top-width: 5px; }
  :root[data-visitor="new"] .hero__grid > .quick-donate { order: -2; }
  :root[data-visitor="new"] .hero__grid > .find-us { order: -1; height: auto; min-height: 7.5rem; }
  /* The "Next jamaat" label stays for screen readers; the card is self-explanatory visually. */
  .hero .next-card__eyebrow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* …except "Jamaat in progress", which changes what the numbers mean. */
  .hero .next-card.is-live .next-card__eyebrow { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  :root[data-visitor="new"] .hero__intro { margin-top: 0.75rem; }
  .hero .next-card__title { font-size: 1.5rem; margin-bottom: 0.4rem; }
  .hero .next-card__also { margin-bottom: 0.5rem; font-size: 1.1rem; }
  .hero .next-card__meta { display: none; }
  .hero .countdown__value { font-size: clamp(2rem, 9.5vw, 2.6rem); padding: 0.25rem 0.45rem; }
  .hero .countdown__unit { margin-top: 0.2rem; }
  :root[data-visitor="new"] .find-us { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); }
  .find-us__map { position: relative; inset: auto; }
  .find-us__map img { object-position: 50% 50%; }
  .find-us__body { position: static; box-shadow: none; border-radius: 0; align-content: center; padding: 0.5rem 0.75rem; }
  .find-us__title { font-size: 1.05rem; }
  .find-us__address { font-size: 0.88rem; }
  .find-us__actions { margin-top: 0.25rem; }
  .find-us__actions .btn { min-height: 2.5rem; padding-block: 0.3rem; }
  .find-us__actions .btn--ghost { display: none; }
  .find-us__credit { top: auto; right: auto; bottom: 0; left: 0; font-size: 0.6rem; border-radius: 0 var(--radius-sm) 0 0; }
  .brand__logo { height: 3.75rem; }
}

/* Laptops and tablets: countdown, map and quick donate side by side, welcome text below. */
@media (min-width: 56em) {
  :root[data-visitor="new"] .hero { padding-block: 1.25rem 2rem; }
  :root[data-visitor="new"] .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
  :root[data-visitor="new"] .hero__intro { grid-column: 1 / -1; order: 1; }
  :root[data-visitor="new"] .hero__intro .lead { display: none; }
  :root[data-visitor="new"] .hero__title { font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem); }
  :root[data-visitor="new"] .hero__actions { margin-top: 1rem; }
  :root[data-visitor="new"] .next-card { min-height: 0; }
  :root[data-visitor="new"] .hero__grid > .quick-donate { align-self: start; }
  :root[data-visitor="new"] .hero .countdown__value { font-size: clamp(2rem, 2.6vw, 2.75rem); padding: 0.3rem 0.4rem; }
  :root[data-visitor="new"] .hero .countdown__sep { font-size: clamp(1.5rem, 2vw, 2.2rem); }
  :root[data-visitor="new"] .brand__logo { height: 4.75rem; }
}

/* Wide screens: welcome text, countdown, map and quick donate in one row. */
@media (min-width: 80em) {
  :root[data-visitor="new"] .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  :root[data-visitor="new"] .hero__intro { grid-column: auto; order: 0; align-self: center; }
}
@media (min-width: 80em) and (min-height: 50em) {
  :root[data-visitor="new"] .hero__intro .lead { display: block; font-size: 1.05rem; }
}

/* Short phone screens: trim the map so it still fits above the fold. */
@media (max-width: 55.99em) and (max-height: 45em) {
  :root[data-visitor="new"] .hero__grid > .find-us { min-height: 0; }
  :root[data-visitor="new"] .hero__grid { gap: 0.6rem; }
  :root[data-visitor="new"] .countdown__unit { font-size: 0.7rem; }
  .find-us__body { padding-block: 0.3rem; }
}
