/* Fonts: subsets with the transliteration letters (ā ḥ ṣ ʿ …) the articles need. */
@font-face { font-family: "Source Serif"; src: url(fonts/serif.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url(fonts/serif-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif Display"; src: url(fonts/serif-display.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url(fonts/sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
/* One Arabic face for every weight and style, so it is never faux-bolded or slanted. */
@font-face { font-family: Amiri; src: url(fonts/amiri.woff2) format("woff2"); font-weight: 400 700; font-display: swap; size-adjust: 116%; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Amiri; src: url(fonts/amiri.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; size-adjust: 116%; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  color-scheme: light;
  --paper: light-dark(#f8f5ee, #0e1c22);
  --surface: light-dark(#fffdf9, #14272f);
  --sunken: light-dark(#f1ecdf, #0a151a);
  --ink: light-dark(#16303a, #ebe6d9);
  --muted: light-dark(#5a6b70, #9aabaf);
  --line: light-dark(#e3ddce, #22383f);
  --line-strong: light-dark(#cdc5b1, #35505a);
  --teal: light-dark(#1e4e5b, #8fc3cf);
  --gold: light-dark(#b18233, #d0a556);
  --gold-ink: light-dark(#8a6420, #d9b46a);
  --quran: light-dark(#2c6a4c, #8fcaa8);
  --hadith: light-dark(#3a4c8c, #aab7ec);
  --accent: light-dark(#8c3b5e, #e3a6c0);
  --band: light-dark(#1e4e5b, #14272f);
  --footer: light-dark(#163d48, #0a151a);
  --serif: "Source Serif", Amiri, Georgia, serif;
  --display: "Source Serif Display", Amiri, Georgia, serif;
  --sans: "Source Sans", Amiri, system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 80rem;
  --edge: max(var(--gutter), (100% - var(--max)) / 2); /* left edge of .wrap, for left-aligned narrower blocks */
  --star: polygon(100% 50%, 85.4% 64.6%, 85.4% 85.4%, 64.6% 85.4%, 50% 100%, 35.4% 85.4%, 14.6% 85.4%, 14.6% 64.6%, 0 50%, 14.6% 35.4%, 14.6% 14.6%, 35.4% 14.6%, 50% 0, 64.6% 14.6%, 85.4% 14.6%, 85.4% 35.4%);
  interpolate-size: allow-keywords;
}
:root[data-theme="dark"] { color-scheme: dark; }

*, ::before, ::after { box-sizing: border-box; }
/* Above 1440px everything scales with the window (1rem = 1/90 of its width), so big and 4K screens get the same proportions as a laptop. */
html { font-size: max(100%, 100vw / 90); -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.17rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--gold) 35%, transparent); }
mark { background: color-mix(in srgb, var(--gold) 30%, transparent); color: inherit; border-radius: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -100rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 30; background: var(--surface); padding: .5rem 1rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { font: 600 .809rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lead { max-width: 42rem; margin-top: 1rem; font: 400 clamp(1.2rem, 1.1rem + .5vw, 1.41rem)/1.5 var(--serif); color: var(--muted); }
.lead a, .contact a, .intro-more p a { color: var(--teal); text-underline-offset: .18em; text-decoration-thickness: 1px; }

.button { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.3rem; border: 1px solid var(--teal); border-radius: 99px; background: var(--teal); color: var(--paper); font-size: 1.05rem; font-weight: 600; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.button:hover { background: color-mix(in srgb, var(--teal) 86%, var(--ink)); }
.button.ghost { background: none; border-color: var(--line-strong); color: var(--ink); }
.button.ghost:hover { border-color: var(--ink); }
.button.light { background: #f3efe4; border-color: #f3efe4; color: #16303a; }
.button.light:hover { background: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.more { display: inline-flex; align-items: center; gap: .4rem; color: var(--teal); font-size: 1.02rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.more .icon { width: 1.1em; transition: translate .25s; }
.more:hover .icon { translate: .25rem 0; }

/* Header */
.header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 2rem; height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; font: 500 1.31rem/1 var(--display); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand b { font-weight: 500; color: var(--gold-ink); }
.logo { flex: none; width: 3.4rem; }
.logo-dark, [data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark, .logo-dark.always { display: block; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { padding-block: .4rem; background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 100% / 0 1.5px; font-size: 1.05rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-size .3s; }
.nav a:hover, .nav a[aria-current] { background-size: 100% 1.5px; }
.tools { display: flex; gap: .15rem; }
.tool { display: grid; place-items: center; width: 2.5rem; aspect-ratio: 1; border-radius: 50%; transition: background .2s; }
.tool:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.menu-open, #theme .icon-sun, [data-theme="dark"] #theme .icon-moon { display: none; }
[data-theme="dark"] #theme .icon-sun { display: block; }

.menu { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 1rem var(--gutter) 2rem; border: 0; background: var(--paper); color: var(--ink); }
.menu[open] { display: flex; flex-direction: column; animation: rise .3s; }
.menu form { align-self: flex-end; }
html:has(dialog[open]) { overflow: hidden; }
.menu nav { display: grid; gap: .35rem; margin-block: auto; }
.menu nav a { font: 500 clamp(1.93rem, 8vw, 2.56rem)/1.25 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.menu nav a[aria-current] { color: var(--gold-ink); }
.menu > p { color: var(--muted); font-size: .996rem; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: clip; }
.hero::before, .band::before, .quran-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold); opacity: .55;
  mask: url(img/patroon.svg) 0 0 / 4.5rem, radial-gradient(58rem 34rem at 88% 8%, #000, transparent 72%); mask-composite: intersect;
}
/* Narrower than .wrap, so the text and the prayer card meet in the middle instead of hugging the edges. */
.hero .wrap { display: grid; width: min(100% - 2 * var(--gutter), 66rem); grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); align-items: center; gap: clamp(2rem, 6vw, 5rem); padding-block: clamp(1.75rem, 5vh, 4.75rem); }
/* On desktop the hero fills the screen below the header, leaving the top of the next block in view. */
@media (min-width: 56rem) { .hero .wrap { min-height: calc(100svh - 4.6rem - 6rem); } }
.hero h1 { margin-block: 1rem 1.4rem; font-size: clamp(3.18rem, 1.72rem + 5.6vw, 5.78rem); line-height: .98; letter-spacing: -0.032em; }
.hero h1 span { display: block; color: var(--gold-ink); }
.hero-text > *, .hero .prayer { animation: rise .7s both; }
.hero-text > :nth-child(2) { animation-delay: .06s; }
.hero-text > :nth-child(3) { animation-delay: .12s; }
.hero-text > :nth-child(4) { animation-delay: .18s; }
.hero .prayer { animation-delay: .15s; }
.greeting { display: grid; min-height: 1.7em; font: 400 clamp(1.36rem, 1.1rem + 1vw, 1.72rem)/1.3 var(--serif); color: var(--muted); }
.greeting span { grid-area: 1 / 1; justify-self: start; opacity: 0; animation: greeting 14s infinite; }
.greeting span:nth-child(2) { animation-delay: 3.5s; }
.greeting span:nth-child(3) { animation-delay: 7s; }
.greeting span:nth-child(4) { animation-delay: 10.5s; }
.greeting.pair span { animation-name: greeting-pair; animation-duration: 7s; }
@keyframes greeting { 0% { opacity: 0; translate: 0 .35em; } 3%, 22% { opacity: 1; translate: 0; } 25%, 100% { opacity: 0; translate: 0 -.35em; } }
@keyframes greeting-pair { 0% { opacity: 0; translate: 0 .35em; } 6%, 44% { opacity: 1; translate: 0; } 50%, 100% { opacity: 0; translate: 0 -.35em; } }
@keyframes rise { from { opacity: 0; translate: 0 .9rem; } }

/* Prayer times */
.prayer { padding: clamp(1.25rem, 3vh, 1.5rem) 1.5rem clamp(.9rem, 2vh, 1.1rem); border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface); box-shadow: 0 1px 2px rgb(22 48 58 / .04), 0 28px 56px -32px rgb(22 48 58 / .3); }
.prayer header { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: clamp(.85rem, 2.2vh, 1.1rem); }
.prayer-date { margin-top: .3rem; font: 500 1.36rem/1.25 var(--display); letter-spacing: -0.01em; }
.prayer-date::first-letter { text-transform: uppercase; }
.prayer-hijri { min-height: 1.4em; color: var(--muted); font-size: .975rem; }
.full-moon { position: relative; display: inline-block; cursor: help; width: .8em; height: .8em; margin-left: .4em; vertical-align: -.05em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fffaf0, #f1dfb3 60%, #d6ba7e); box-shadow: 0 0 .5em color-mix(in srgb, var(--gold) 50%, transparent); }
.full-moon::after { content: attr(aria-label); position: absolute; bottom: calc(100% + .45rem); left: 50%; translate: -50% .2rem; padding: .25rem .55rem; border-radius: .4rem; background: var(--ink); color: var(--paper); font: 500 .8rem/1.3 var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, translate .15s; }
.full-moon:hover::after, .full-moon:focus::after { opacity: 1; translate: -50% 0; }
.prayer-next { display: grid; align-content: start; text-align: right; }
.prayer-next span { color: var(--muted); font-size: .913rem; white-space: nowrap; }
.prayer-next b { color: var(--teal); font-size: 1.72rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.prayer table, .month table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prayer thead th, .month thead th { padding: .35rem .75rem; color: var(--muted); font-size: .788rem; font-weight: 600; letter-spacing: .1em; text-align: right; text-transform: uppercase; }
.prayer thead th:first-child, .month thead th:first-child { text-align: left; }
.prayer tbody tr { line-height: 1.45; border-top: 1px solid var(--line); transition: color .4s, background .4s; }
.prayer tbody th { padding: clamp(.55rem, 1.4vh, .68rem) .75rem; font-weight: 500; text-align: left; }
.prayer td { padding: clamp(.55rem, 1.4vh, .68rem) .75rem; text-align: right; }
.prayer td:last-child { color: var(--muted); }
.prayer tr.past, .prayer tr:not([data-iqama]) { color: var(--muted); }
.prayer tr.next { background: color-mix(in srgb, var(--gold) 13%, transparent); }
.prayer tr.next :is(th, td) { color: var(--ink); font-weight: 600; }
.prayer tr.next th { box-shadow: inset 3px 0 var(--gold); }
.prayer footer { display: flex; justify-content: space-between; gap: 1rem; padding-top: clamp(.75rem, 1.8vh, .9rem); border-top: 1px solid var(--line); font-size: 1.02rem; }
.prayer-fallback { padding-block: 1rem 1.5rem; color: var(--muted); }
.prayer-note { display: flex; gap: .6rem; margin-bottom: clamp(.75rem, 1.8vh, 1rem); padding: clamp(.6rem, 1.4vh, .7rem) .9rem; border-radius: .75rem; background: color-mix(in srgb, var(--gold) 12%, transparent); font-size: .97rem; line-height: 1.45; }
.prayer-note .icon { margin-top: .1rem; color: var(--gold-ink); }
.ramadan th[data-ramadan]::after { content: attr(data-ramadan); margin-left: .5rem; padding: .05rem .5rem; border-radius: 99px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-ink); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.prayer-fallback a { color: var(--teal); }

.prayer-page { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 5vw, 4rem); padding-bottom: 5rem; }
.prayer-page .prayer { position: sticky; top: 6rem; }
.month header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.month h2 { font-size: 1.72rem; }
.month :is(th, td) { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: right; }
.month tbody th { font-weight: 500; text-align: left; white-space: nowrap; }
.month tbody th span { display: inline-block; width: 1.7rem; color: var(--muted); font-size: .913rem; }
.month td:nth-child(3) { color: var(--muted); }
.month tr.today { background: color-mix(in srgb, var(--gold) 13%, var(--paper)); font-weight: 600; }
/* On narrow screens the table scrolls sideways under a pinned day column. */
.month-scroll { overflow-x: auto; }
.month th:first-child { position: sticky; left: 0; background: var(--paper); }
.month tr.today th { background: inherit; box-shadow: inset 3px 0 var(--gold); font-weight: 600; }

/* Notice */
.notice { display: grid; grid-template-columns: 12rem 1fr; gap: .5rem 2rem; margin-bottom: 1rem; padding: 1.1rem 1.4rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 0 .75rem .75rem 0; background: var(--surface); }
.notice div { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 2rem; font-size: 1.05rem; }

/* Sections and cards */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.section-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 3rem; height: 1px; background: var(--gold); }
.section-head h2 { font-size: clamp(1.72rem, 1.41rem + 1.2vw, 2.24rem); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 2.25rem 1.75rem; }
.card { position: relative; display: flex; flex-direction: column; gap: .9rem; }
.card-image { overflow: hidden; aspect-ratio: 3 / 2; border-radius: .75rem; background: var(--sunken); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: scale .7s cubic-bezier(.2, .6, .2, 1); }
.card:hover .card-image img { scale: 1.04; }
.card h3 { margin-top: .3rem; font: 600 1.31rem/1.28 var(--serif); text-wrap: pretty; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover h3 a { text-decoration: underline 1px var(--gold); text-underline-offset: .2em; }
.byline { margin-top: .3rem; color: var(--muted); font-size: .975rem; }
.excerpt { display: -webkit-box; overflow: hidden; margin-top: .5rem; color: var(--muted); font-size: 1.06rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cards .excerpt { display: none; }
.card.row { flex-direction: row; gap: 1.2rem; }
.card.row .card-image { flex: none; width: 8.5rem; align-self: flex-start; }
.card.feature .card-image { aspect-ratio: 16 / 10; border-radius: 1rem; }
.card.feature h3 { font: 500 clamp(1.72rem, 1.31rem + 1.6vw, 2.45rem)/1.12 var(--display); letter-spacing: -0.02em; }
.card.feature .excerpt { font-size: 1.15rem; -webkit-line-clamp: 3; }

.featured { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.75rem, 4vw, 3.5rem); }
.featured-side { display: grid; grid-template-rows: auto auto 1fr; gap: 1.5rem; }
.featured-side .card + .card { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.featured-side .excerpt { display: none; }
.quran-card { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-content: end; align-items: end; gap: .3rem 1rem; min-height: 7.5rem; padding: 1.4rem 1.5rem; border-radius: 1rem; background: var(--band); color: #f3efe4; text-decoration: none; }
.quran-card::before { opacity: .5; mask-size: 3.5rem, auto; }
.quran-card .eyebrow { grid-column: 1 / -1; color: #dcb873; }
.quran-card b { font: 500 1.62rem/1.2 var(--display); }
.quran-card .icon { transition: translate .25s; }
.quran-card:hover .icon { translate: .3rem 0; }

.split { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
.split .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 2rem 1.5rem; }
.split .card h3 { font-size: 1.18rem; }
.ranked { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.ranked li { display: grid; grid-template-columns: 2.4rem 1fr; padding-block: .95rem; border-bottom: 1px solid var(--line); counter-increment: rank; }
.ranked li:first-child { padding-top: 0; }
.ranked li::before { content: counter(rank); grid-row: span 2; color: var(--gold); font: 400 1.83rem/1.1 var(--display); }
.ranked a { font: 600 1.13rem/1.35 var(--serif); text-decoration: none; }
.ranked a:hover { text-decoration: underline 1px var(--gold); text-underline-offset: .2em; }
.ranked .byline { grid-column: 2; }

.topics { background: var(--sunken); }
.index { margin: 0; padding: 0; list-style: none; columns: 3 16rem; column-gap: 3.5rem; }
.index li { break-inside: avoid; }
.index li > * { display: flex; align-items: baseline; gap: .6rem; padding-block: .55rem; font: 500 1.18rem/1.35 var(--serif); text-decoration: none; }
.index i { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted color-mix(in srgb, var(--ink) 40%, transparent); translate: 0 -.25em; }
.index li span:last-child { color: var(--muted); font: 500 .975rem var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.index a:hover span:first-child { color: var(--teal); }

.visit { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.visit figure, .contact figure { overflow: hidden; border-radius: 1.25rem; }
.visit img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.schedule { display: grid; margin-bottom: 1.5rem; }
.schedule div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.schedule dt { padding-top: .25rem; color: var(--gold-ink); font: 600 .809rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }

.scroll-buttons { display: flex; gap: .5rem; }
.scroll-buttons button { display: grid; place-items: center; width: 2.5rem; aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: 50%; transition: border-color .2s; }
.scroll-buttons button:hover { border-color: var(--ink); }
.quotes { display: flex; gap: 1rem; overflow-x: auto; padding-inline: var(--edge); scroll-padding-inline: var(--edge); scroll-snap-type: x proximity; scrollbar-width: none; }
.quotes a { flex: none; overflow: hidden; border-radius: .75rem; scroll-snap-align: start; }
.quotes img { width: auto; height: clamp(17rem, 34vw, 24rem); transition: scale .7s cubic-bezier(.2, .6, .2, 1); }
.quotes a:hover img { scale: 1.03; }

.band { position: relative; isolation: isolate; overflow: clip; margin-top: clamp(1.5rem, 4vw, 3rem); background: var(--band); color: #f3efe4; }
.band .wrap { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 2rem 4rem; padding-block: clamp(3rem, 7vw, 5rem); }
.band h2 { margin-block: .25rem 1rem; font-size: clamp(2.04rem, 1.52rem + 2vw, 2.97rem); }
.band p { max-width: 36rem; color: #c5d6da; }
.band .band-arabic, .page-arabic { color: var(--gold); font-size: 1.72rem; text-align: left; }
.band .band-arabic { color: #dcb873; }
.band-actions { display: grid; justify-items: start; gap: 1rem; }
.iban { display: inline-flex; align-items: center; gap: .9rem; padding: .85rem 1.15rem; border: 1px solid var(--line-strong); border-radius: .75rem; font-size: 1.26rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .03em; transition: border-color .2s; }
.band .iban { border-color: rgb(255 255 255 / .28); }
.iban:hover { border-color: var(--gold); }

/* Footer */
.footer { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; background: var(--footer); color: #c5d6da; font-size: 1.05rem; }
.footer > .wrap:first-child { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem 2rem; }
.footer-brand { display: flex; align-items: flex-start; gap: 1rem; color: #f3efe4; }
.footer .logo { width: 3.75rem; }
.footer nav { display: grid; align-content: start; gap: .45rem; }
.footer h2 { margin-bottom: .4rem; color: #dcb873; font: 600 .809rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.footer a { text-decoration: none; overflow-wrap: anywhere; }
.footer a:hover { color: #fff; text-decoration: underline 1px; text-underline-offset: .2em; }
.colophon { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: .944rem; }

/* Inner pages */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.75rem, 4vw, 2.75rem); }
.page-head.split { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-head h1 { font-size: clamp(2.56rem, 1.72rem + 3.4vw, 4.22rem); letter-spacing: -0.028em; }
.page { max-width: 44rem; margin-left: var(--edge); padding-bottom: 5rem; }
.missing { padding-bottom: 6rem; }

.search { position: relative; max-width: 40rem; margin-top: 1.75rem; }
.search .icon { position: absolute; top: 50%; left: 1.15rem; color: var(--muted); translate: 0 -50%; pointer-events: none; }
.search input { width: 100%; padding: .95rem 1.2rem .95rem 3.2rem; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.15rem; transition: border-color .2s, box-shadow .2s; }
.search input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 14%, transparent); }
.archive { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: start; gap: clamp(2rem, 5vw, 4.5rem); padding-bottom: 5rem; }
.filter { position: sticky; top: 6rem; display: grid; gap: 1px; max-height: calc(100dvh - 7.5rem); overflow-y: auto; scrollbar-width: thin; }
.filter a { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem .75rem; border-radius: .5rem; font-size: 1.05rem; text-decoration: none; }
.filter a span { color: var(--muted); font-size: .913rem; font-variant-numeric: tabular-nums; }
.filter a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.filter a[aria-current] { background: var(--teal); color: var(--paper); font-weight: 600; }
.filter a[aria-current] span { color: inherit; }
.filter .child { margin-left: 1rem; font-size: .996rem; }
.result-count { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; color: var(--muted); font-size: 1.02rem; }
.list .card { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.list .card.row .card-image { width: 11rem; }
.empty { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--muted); }
.load-more { padding-top: 2rem; text-align: center; }
.htmx-request .list { opacity: .5; transition: opacity .2s .15s; }

.activities { display: grid; gap: 3rem; max-width: 66rem; margin-left: var(--edge); padding-bottom: 5rem; }
.activity { display: grid; grid-template-columns: 9rem 1fr 14rem; gap: 1.5rem 2rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.activity .when { padding-top: .3rem; color: var(--gold-ink); font: 600 .892rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.activity h3 { margin-bottom: .35rem; font: 600 1.41rem/1.3 var(--serif); }
.activity .detail { margin-top: .35rem; color: var(--muted); font-size: 1.05rem; }
.activity .links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .75rem; }
.flyer { align-self: start; overflow: hidden; border-radius: .75rem; box-shadow: 0 18px 40px -24px rgb(22 48 58 / .45); }
.flyer, .quotes a, .prose a:has(> img) { cursor: zoom-in; }
.flyer img { transition: scale .7s cubic-bezier(.2, .6, .2, 1); }
.flyer:hover img { scale: 1.04; }

.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding-bottom: 5rem; }
.ways section { display: grid; justify-items: start; align-content: start; gap: .6rem; padding: 1.6rem; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface); }
.ways h2 { margin-bottom: .8rem; font-size: 1.72rem; }
.contact { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(2rem, 5vw, 4.5rem); padding-bottom: 5rem; }
.map { grid-column: 1 / -1; width: 100%; height: clamp(20rem, 40vw, 30rem); border: 0; border-radius: 1.25rem; background: var(--sunken); }
[data-theme="dark"] .map { filter: invert(.9) hue-rotate(180deg); } /* a dark map that keeps the red pin */
.socials, .facilities { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.facilities span { padding: .15rem .7rem; border: 1px solid var(--line-strong); border-radius: 99px; font-size: .975rem; }
.facilities { gap: .4rem; }
.prices { columns: 2 20rem; column-gap: 4rem; max-width: 60rem; margin-left: var(--edge); padding-bottom: 5rem; }
.prices section { break-inside: avoid; padding-bottom: 2.25rem; }
.prices .index { columns: auto; }
.intro { display: grid; max-width: 52rem; margin-left: var(--edge); counter-reset: step; }
.intro .card { padding-block: 1.75rem; border-top: 1px solid var(--line); counter-increment: step; }
.intro .card::before { content: counter(step); flex: none; width: 2.25rem; color: var(--gold); font: 400 2.56rem/1 var(--display); }
.intro .card .card-image { width: 12rem; }
.intro .card h3 { font: 500 1.72rem/1.2 var(--display); letter-spacing: -0.015em; }
.intro-more { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; max-width: 52rem; margin-left: var(--edge); padding-block: 2rem 5rem; }

/* Article */
.progress { position: fixed; inset: 0 0 auto; z-index: 20; height: 2px; background: var(--gold); scale: 0 1; transform-origin: 0 50%; }
.article-head { max-width: 52rem; padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; text-align: center; }
.article-head h1 { margin-block: 1rem 1.25rem; font-size: clamp(2.24rem, 1.52rem + 3vw, 3.6rem); letter-spacing: -0.024em; }
.meta { color: var(--muted); font-size: 1.05rem; }
.meta b { color: var(--ink); font-weight: 600; }
.article-image { max-width: 54rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.article-image img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 1.25rem; background: var(--sunken); }
.article-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 42rem) minmax(0, 1fr); gap: 0 2.5rem; padding-bottom: 3rem; }
.article-body > * { grid-column: 2; }
.toc { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 6.5rem; align-self: start; max-height: calc(100dvh - 8rem); overflow-y: auto; font-size: .975rem; line-height: 1.4; scrollbar-width: thin; }
.toc ol { display: grid; gap: .55rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc .level-3 { padding-left: .9rem; }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.prose { font: 400 1.3rem/1.72 var(--serif); font-variant-numeric: oldstyle-nums; overflow-wrap: break-word; }
.prose :where(p, ul, ol, blockquote, aside, .table-wrap, .video, audio, img) { margin-block: 1.3em; }
.prose > :first-child, .prose :where(blockquote, aside, li, td, details) > :first-child { margin-top: 0; }
.prose > :last-child, .prose :where(blockquote, aside, li, td) > :last-child { margin-bottom: 0; }
.prose h2 { margin-block: 2.1em .7em; font-size: 1.6em; }
.prose h3 { margin-block: 1.9em .6em; font: 600 1.28em/1.3 var(--serif); }
.prose h4 { margin-block: 1.7em .5em; font: 600 1.05em/1.4 var(--serif); }
.prose a { color: var(--teal); text-decoration: underline 1px color-mix(in srgb, var(--teal) 45%, transparent); text-underline-offset: .18em; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 650; }
.prose u { text-decoration-thickness: 1px; text-underline-offset: .2em; }
.prose small { color: var(--muted); font-size: .86em; line-height: 1.5; }
.prose li + li { margin-top: .45em; }
.prose blockquote { margin-inline: 0; padding: .15em 0 .15em 1.4em; border-left: 2px solid var(--gold); }
.prose [lang="ar"] { font-size: 1.3em; line-height: 2; }
.prose .center { text-align: center; }
.prose .quran { color: var(--quran); }
.prose .hadith { color: var(--hadith); }
.prose .accent { color: var(--accent); }
.prose .gold { color: var(--gold-ink); }
.prose .source { color: var(--muted); }
.prose hr { width: 1rem; height: 1rem; margin: 2.6em auto; border: 0; background: var(--gold); clip-path: var(--star); }
.prose img { margin-inline: auto; border-radius: .6rem; }
.prose p:has(> a > img) { display: flex; flex-wrap: wrap; gap: .75rem; }
.prose p:has(> a > img) img { margin: 0; }
.prose audio { display: block; width: 100%; height: 2.75rem; }
.prose .video { aspect-ratio: 16 / 9; }
.prose iframe { width: 100%; height: 100%; border: 0; border-radius: .75rem; }
.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .94em; line-height: 1.55; }
.prose :is(td, th) { padding: .6em .75em; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose .note { padding: 1.2em 1.5em; border-left: 3px solid var(--gold); border-radius: 0 .75rem .75rem 0; background: var(--sunken); font-size: .95em; }
.prose .note :is(h2, h3, h4) { margin-top: 0; font: 600 1.05em/1.4 var(--sans); letter-spacing: 0; }
.prose .cta a { display: inline-flex; padding: .6rem 1.2rem; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--ink); font: 600 1.05rem var(--sans); text-decoration: none; }
.prose .cta a:hover { border-color: var(--ink); }
.prose sup { font: .7em/0 var(--sans); }
.prose sup a { text-decoration: none; }
.prose .footnotes { margin-top: 3em; padding: 1.5em 0 0 1.4em; border-top: 1px solid var(--line); color: var(--muted); font: .82em/1.55 var(--sans); }
.prose :not(section):target { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.prose details { border-bottom: 1px solid var(--line); }
.prose :not(details) + details, .prose details:first-child { margin-top: 1.3em; border-top: 1px solid var(--line); }
.prose details:has(+ :not(details)) { margin-bottom: 1.3em; }
.prose summary { display: flex; align-items: center; justify-content: space-between; padding-block: .8rem; font: 600 1.05rem var(--sans); list-style: none; cursor: pointer; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; color: var(--gold-ink); font-size: 1.46rem; font-weight: 400; line-height: 1; transition: rotate .25s; }
.prose details[open] summary::after { rotate: 45deg; }
.prose details::details-content { block-size: 0; overflow: clip; transition: block-size .3s, content-visibility .3s allow-discrete; }
.prose details[open]::details-content { block-size: auto; padding-bottom: 1rem; }
/* Sticks below the header, so switching tabs stays in reach on long lists. */
.prose .tab-bar { position: sticky; top: 4.5rem; z-index: 5; display: flex; margin-block: 2em 1.5em; border-bottom: 1px solid var(--line); background: var(--paper); font: 600 1.1rem var(--sans); }
.prose .tab-bar a { margin-bottom: -1px; padding: .8rem 1.25rem; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.prose .tab-bar a:hover { color: var(--ink); }
.prose .tab-bar a[aria-current] { border-color: var(--gold); color: var(--ink); }

/* Dialogs fade in and out; the lightbox image and the modal also grow slightly. */
dialog, dialog::backdrop { opacity: 0; transition: opacity .25s, display .25s allow-discrete, overlay .25s allow-discrete; }
dialog[open], dialog[open]::backdrop { opacity: 1; }
.lightbox img, .modal > div { scale: .96; transition: scale .25s; }
.lightbox[open] img, .modal[open] > div { scale: 1; }
@starting-style {
  dialog[open], dialog[open]::backdrop { opacity: 0; }
  .lightbox[open] img, .modal[open] > div { scale: .96; }
}
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: none; cursor: zoom-out; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 7rem); border-radius: .6rem; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6); }
.lightbox::backdrop { background: rgb(8 18 22 / .9); backdrop-filter: blur(6px); }
.lightbox .tool { position: absolute; top: 1rem; right: 1rem; background: rgb(255 255 255 / .12); color: #fff; }
.lightbox .tool:hover { background: rgb(255 255 255 / .22); }

.modal { width: min(100% - 2rem, 32rem); padding: 0; border: 0; background: none; color: var(--ink); }
.modal::backdrop { background: rgb(8 18 22 / .55); backdrop-filter: blur(3px); }
.modal > div { position: relative; display: grid; gap: 1rem; padding: 1.75rem; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface); box-shadow: 0 30px 80px -30px rgb(0 0 0 / .5); }
.modal form[method="dialog"] { position: absolute; top: .75rem; right: .75rem; }
.modal h2 { padding-right: 2.5rem; font-size: 1.72rem; }
.modal p { color: var(--muted); }
.print-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1rem; max-width: 34rem; }
.print-form label { display: grid; gap: .35rem; color: var(--muted); font-size: .97rem; font-weight: 600; }
.print-form select { padding: .65rem .8rem; border: 1px solid var(--line-strong); border-radius: .6rem; background: var(--paper); color: var(--ink); font: inherit; font-weight: 400; }
.print-form .button { grid-column: 1 / -1; justify-content: center; margin-top: .25rem; }
.page-head .print-form { margin-top: 1.75rem; }

/* Printable month sheets: cards on screen, one A4 page each on paper. */
.sheets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-bottom: 5rem; }
.sheet { max-width: 60rem; padding: 2rem 2.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.sheet header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.sheet header .logo { width: 3.6rem; }
.sheet h2 { font-size: 1.9rem; }
.sheet header p { color: var(--muted); }
.sheet-scroll { overflow-x: auto; }
.sheet table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sheet :is(th, td) { padding: .3rem .45rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.sheet thead th { color: var(--muted); font-size: .84rem; font-weight: 600; text-align: center; }
.sheet thead tr:last-child th { font-size: .75rem; font-weight: 400; }
.sheet tbody th, .sheet td[data-hijri] { text-align: left; font-weight: 500; }
.sheet td[data-hijri], .sheet .iqama { color: var(--muted); }
.sheet tr.friday { font-weight: 600; }
.sheet tr.ramadan-day td[data-hijri] { color: var(--gold-ink); }
.sheet footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; color: var(--muted); font-size: .92rem; }

.simulate { position: fixed; left: 1rem; bottom: 1rem; z-index: 40; padding: .5rem .7rem; border: 1px dashed var(--gold); border-radius: .5rem; background: var(--surface); color: var(--ink); font: 600 .92rem var(--sans); }

/* Motion that follows the scroll position, where the browser supports it. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: .22s; }
.theming::view-transition-group(root) { animation-duration: .5s; animation-timing-function: ease-in-out; }
@supports (animation-timeline: view()) {
  .header { animation: header-line linear both; animation-timeline: scroll(); animation-range: 0 5rem; }
  .progress { animation: progress linear both; animation-timeline: scroll(); }
  @media (prefers-reduced-motion: no-preference) {
    .section-head, .card, .ranked li, .visit figure, .schedule div, .activity { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 28%; }
  }
}
@keyframes header-line { from { border-color: transparent; } }
@keyframes progress { to { scale: 1 1; } }
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .greeting { display: flex; flex-wrap: wrap; gap: .2em 1.2em; }
  .greeting span { opacity: 1; animation: none; }
}

@media (max-width: 75rem) {
  .article-body { grid-template-columns: minmax(0, 42rem); justify-content: center; }
  .article-body > *, .toc { grid-column: 1; grid-row: auto; }
  .toc { position: static; max-height: none; margin-bottom: 2rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: .75rem; }
}
@media (max-width: 64rem) {
  .nav { display: none; }
  .tools { margin-left: auto; }
  .menu-open { display: grid; }
}
@media (max-width: 56rem) {
  .hero .wrap, .featured, .split, .visit, .band .wrap, .prayer-page, .contact, .intro-more { grid-template-columns: minmax(0, 1fr); }
  .hero::before { mask-image: url(img/patroon.svg), radial-gradient(30rem 22rem at 90% 0, #000, transparent 72%); }
  .prayer-page .prayer { position: static; }
  .notice { grid-template-columns: 1fr; }
  .archive { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .filter { position: static; display: flex; gap: .4rem; max-height: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .filter a { flex: none; padding: .38rem .9rem; border: 1px solid var(--line-strong); border-radius: 99px; }
  .filter a[aria-current] { border-color: var(--teal); }
  .filter a span { display: none; }
  .filter .child { margin-left: 0; }
  .ways { grid-template-columns: 1fr; }
  .footer > .wrap:first-child { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .activity { grid-template-columns: 6.5rem 1fr; }
  .flyer { grid-column: 2; width: min(100%, 18rem); }
}
@media (max-width: 36rem) {
  .brand-name { font-size: 1.15rem; }
  .header .logo { width: 3rem; }
  .notice div { grid-template-columns: 1fr; }
  .prayer { padding-inline: 1.1rem; }
  .card.row .card-image, .list .card.row .card-image, .intro .card .card-image { width: 6.25rem; }
  .card.row h3 { font-size: 1.18rem; }
  .list .excerpt { display: none; }
  .intro .card::before { display: none; }
  .intro .card h3 { font-size: 1.36rem; }
  .month :is(th, td) { padding-inline: .45rem; }
  .schedule div { grid-template-columns: 1fr; gap: .25rem; }
  .activity { grid-template-columns: 1fr; gap: .5rem; }
  .flyer { grid-column: 1; }
  .prose { font-size: 1.23rem; }
  .sheet { padding: 1.25rem; }
}
/* The smallest phones (iPhone mini and below). */
@media (max-width: 24rem) {
  .header .wrap { gap: .75rem; }
  .brand { gap: .5rem; font-size: 1.1rem; line-height: 1.05; }
  .brand-name b { display: block; }
  .header .logo { width: 2.6rem; }
  .tool { width: 2.3rem; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  :root:root[data-theme] { color-scheme: light; }
  body { background: #fff; }
  .header, .footer, .toc, .progress, .article-foot, .section, .no-print, .simulate { display: none; }
  .sheets { display: block; width: auto; padding: 0; }
  .sheet { max-width: none; padding: 0; border: 0; break-after: page; }
  [data-theme] .sheet .logo-light { display: block; }
  [data-theme] .sheet .logo-dark { display: none; }
  .sheet header .logo { width: 14mm; }
  .sheet h2 { font-size: 18pt; }
  .sheet header p, .sheet footer { font-size: 9pt; }
  .sheet-scroll { overflow: visible; }
  .sheet table { font-size: 9.5pt; line-height: 1.25; }
  .sheet :is(th, td) { padding: .8mm 1.4mm; }
  .sheet thead th { font-size: 8.5pt; }
  .sheet thead tr:last-child th { font-size: 7.5pt; }
}
