@font-face {
  font-family: NotoArabic;
  src: url("noto-sans-arabic-arabic-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Amiri;
  src: url("amiri-arabic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: AmiriQuran;
  src: url("amiri-quran-arabic-400-normal.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --paper: #f6efdf;
  --muted: #c2b7a2;
  --gold: #e0ba78;
  --edge: #433727;
  --base: #10100e;
  --panel: #191712;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 23% 18%, #271e15, transparent 48%), var(--base);
  color: var(--paper);
  font: 1rem/1.8 NotoArabic, system-ui, sans-serif;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
a:focus-visible, button:focus-visible, :is(input, select, textarea):focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
p, h1, h2, h3, blockquote, figure { margin: 0; }
h1, h2 { font-family: Amiri, NotoArabic, serif; line-height: 1.35; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-block-end: .65rem; }
h3 { font-size: 1.04rem; margin-block-end: .65rem; }
small { display: block; color: var(--muted); }
.wrap { width: min(1320px, calc(100% - 88px)); margin-inline: auto; }
.skip { position: absolute; z-index: 2; top: .5rem; right: .5rem; background: var(--base); padding: .5rem 1rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--edge); background: #100f0deb; }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.header-row { min-height: 84px; }
.brand, .developer { display: inline-flex; align-items: center; gap: .8rem; line-height: 1.45; }
.brand strong { font: bold 1.5rem Amiri, serif; }
.brand small { margin-block-start: .15rem; font-size: .8rem; }
.brand-mark { display: inline-grid; place-items: center; flex: none; border: 1px solid #88663c; border-radius: 50%; color: var(--gold); width: 49px; height: 49px; font: 700 1.4rem Amiri, serif; background: #241b12; }
nav { display: flex; gap: clamp(.7rem, 2.1vw, 2rem); }
nav a { padding: .35rem .12rem; color: var(--muted); border-bottom: 1px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--gold); border-color: var(--gold); }
/* The side lighting fills wide screens while the full artwork stays visible. */
.hero { padding-block-end: clamp(28px, 5vw, 65px); }
.memorial {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  height: clamp(420px, calc(100svh - 84px), 1000px);
  background: #14100e;
  border-bottom: 1px solid #80613b;
}
.memorial::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -34px;
  background: linear-gradient(90deg, #080705bb, #08070535 50%, #080705bb),
    url("memorial.webp") center / cover no-repeat;
  filter: blur(24px);
}
.memorial img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.hero-copy {
  max-width: 900px;
  text-align: center;
  padding-block-start: clamp(30px, 5vw, 60px);
}
.eyebrow { color: var(--gold); margin-block-end: .45rem; font-weight: 650; }
h1 { font-size: clamp(2.4rem, 4.8vw, 4.75rem); }
.hero h1 span { color: var(--gold); white-space: nowrap; }
.hero-subtitle { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); margin-block: .15rem 1.2rem; }
.hero-copy .actions { justify-content: center; }
.verse { border-block: 1px solid var(--edge); padding-block: .9rem; }
.verse blockquote { font: 400 clamp(1.3rem, 2.02vw, 1.95rem)/1.95 AmiriQuran, Amiri, serif; color: var(--paper); }
.verse-info { display: flex; justify-content: space-between; align-items: center; gap: .3rem 1rem; flex-wrap: wrap; margin-block-start: .55rem; color: var(--muted); font-size: .86rem; min-height: 32px; }
.verse-toggle { font-size: .86rem; background: none; color: var(--gold); cursor: pointer; border: 0; padding: .2rem 0; text-decoration: underline; text-underline-offset: .28em; }
.verse-status { font-size: .83rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-block-start: 1.35rem; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 7px; padding: .57rem 1.14rem; font-weight: 650; cursor: pointer; }
.primary { background: var(--gold); color: #211609; }
.primary:hover { background: #f2cc8c; }
.secondary { border-color: #806340; background: #211a13; color: var(--gold); }
.secondary:hover { background: #362719; }
.whatsapp { border-color: #536d58; background: #1a2b20; color: #e0f2df; }
.whatsapp:hover { background: #294531; }
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-block-end: 3.25rem; }
.explore a, .panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: clamp(1rem, 2.1vw, 1.7rem); }
.explore a:hover { border-color: var(--gold); }
.explore strong { display: block; margin-block-end: .25rem; color: var(--gold); font-size: 1.08rem; }
.explore span { color: var(--muted); }
.site-footer { margin-block-start: auto; border-top: 1px solid var(--edge); background: #100f0d; }
.footer-row { padding-block: 1.25rem; flex-wrap: wrap; }
.developer img { object-fit: contain; border-radius: 10px; }
.admin-link { color: var(--muted); font-size: .87rem; }
.admin-link:hover, .developer:hover { color: var(--gold); }
.interior { max-width: 850px; padding-block: clamp(44px, 8vw, 100px); }
.interior h1, .admin h1 { font-size: clamp(2.6rem, 5vw, 4.15rem); margin-block-end: 1.3rem; }
.interior .verse { margin-block-end: 1.4rem; }
.interior .panel .button { margin-block-start: 1rem; }
.prose { white-space: pre-wrap; font-size: clamp(1.02rem, 1.45vw, 1.18rem); line-height: 2; }
.memorial-library { max-width: 1110px; padding-block-start: clamp(32px, 6vw, 74px); }
.library-intro { max-width: 840px; margin-inline: auto; text-align: center; }
.library-intro .verse { margin-block-end: 1.7rem; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.library-heading { margin-block: 2rem 1rem; }
.memorial-card { display: flex; flex-direction: column; gap: .45rem; scroll-margin-top: 1.25rem; }
.memorial-card:target { border-color: var(--gold); }
.memorial-card h2 { color: var(--gold); margin-block-end: .05rem; }
.featured-card {
  padding: clamp(1.2rem, 3vw, 2.3rem);
  background: linear-gradient(135deg, #251d14, var(--panel));
  border-color: #785a36;
}
.card-message { margin-block-end: .45rem; }
.prayer-text { font: 700 clamp(1.3rem, 2.15vw, 1.68rem)/1.8 Amiri, NotoArabic, serif; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-block-start: auto; }
.interior .card-actions .button { margin-block-start: 0; font-size: .88rem; }
.copy-status { color: var(--gold); font-size: .9rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
label { display: grid; gap: .3rem; min-width: 0; }
input, select, textarea { width: 100%; padding: .55rem .75rem; color: var(--paper); background: #11100d; border: 1px solid #63503a; border-radius: 6px; }
select { appearance: none; padding-inline-end: 2.1rem; background: #11100d url("chevron.svg") no-repeat left .75rem center / 1rem; }
audio[controls] { display: block; width: 100%; max-width: 540px; margin-block: .5rem; }
.player { margin-block-start: 1.35rem; }
#surah-status, .feedback { color: var(--gold); }
.login { max-width: 420px; }
.admin { padding-block: 2.5rem 4rem; }
.admin-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.metrics, .stats { display: grid; gap: 1rem; margin-block-end: 1rem; }
.metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics strong { display: block; color: var(--gold); font-size: 2.1rem; line-height: 1.3; }
.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.daily { max-height: 230px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { font-weight: 400; text-align: start; padding: .25rem .5rem; border-bottom: 1px solid var(--edge); }
thead th { color: var(--gold); }
.content-form { display: grid; gap: .9rem; }
.content-form button { justify-self: start; }
.reciter-fields { padding-block-end: .85rem; border-bottom: 1px solid var(--edge); }
@media (max-width: 950px) {
  .wrap { width: calc(100% - 44px); }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .header-row { align-items: flex-start; flex-direction: column; gap: .55rem; padding-block: .65rem; }
  nav { gap: .6rem 1.15rem; flex-wrap: wrap; }
  .memorial { height: auto; aspect-ratio: 3 / 2; }
  .memorial img { height: auto; }
  .hero h1 { font-size: clamp(2.1rem, 8vw, 3.25rem); }
  .explore, .stats, .fields, .library-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
  .footer-row { column-gap: 1rem; }
}
@media (max-width: 720px) {
  .header-row { gap: .2rem; }
  nav { width: 100%; justify-content: space-between; gap: .1rem .35rem; }
  nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: .25rem; }
  .button, .verse-toggle, :is(input, select) { min-height: 44px; }
  audio[controls] { min-height: 48px; }
  .hero-copy, .library-intro { text-wrap: pretty; }
  .hero-copy .verse blockquote, .library-intro .verse blockquote { text-align: start; }
  .hero-copy .actions .whatsapp { width: min(100%, 20rem); }
  .library-grid { gap: .8rem; }
  .card-actions .button { flex: 1 0 auto; }
  .card-actions .primary { flex-basis: 100%; }
}
