@import url("/assets/fonts.css");

:root {
  --ink: #10201B;
  --ink-2: #22312C;
  --muted: #36433F;
  --green: #175A42;
  --green-dark: #0E3F2E;
  --green-tint: #E3F0E9;
  --gold: #6B4700;
  --gold-light: #E3B65C;
  --ground: #FBFAF6;
  --card: #FFFFFF;
  --line: #CFC9BA;
  --field: #7C8580;
  --danger: #A12C1E;
  --danger-tint: #FBEAE7;
  --radius: 14px;
  --body: Nunito, system-ui, sans-serif;
  --display: Nunito, system-ui, sans-serif;
  --arabic: Amiri, "Noto Naskh Arabic", serif;
}
html[lang="ar"] { --body: "Noto Naskh Arabic", Tahoma, sans-serif; --display: "Noto Naskh Arabic", Tahoma, sans-serif; }
html[lang="ur"] { --body: "Noto Nastaliq Urdu", "Noto Naskh Arabic", sans-serif; --display: "Noto Nastaliq Urdu", "Noto Naskh Arabic", sans-serif; }
html[lang="ur"] body { line-height: 2.1; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3 { line-height: 1.9; }
html[lang="ar"] h1, html[lang="ar"] h2 { line-height: 1.5; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 19px; line-height: 1.65; }
a { color: var(--green); text-underline-offset: 3px; } a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; letter-spacing: -0.005em; }
h3 { font-size: 22px; font-weight: 800; }
html[dir="rtl"] h1, html[dir="rtl"] h2 { letter-spacing: 0; }
p { margin: 0; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #C98A00; outline-offset: 3px; }

.container { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.section { padding-block: 72px; }
.section-white { background: var(--card); border-block: 1px solid var(--line); }
.section-dark { background: var(--ink); color: var(--ground); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.eyebrow { font-size: 15px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 16px; }
.lead { font-size: 21px; color: var(--ink-2); max-width: 620px; }
.arabic { font-family: var(--arabic); direction: rtl; }

/* header / footer */
#site-header { background: var(--ground); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-ar { font-family: var(--arabic); font-size: 30px; line-height: 1; color: var(--green); font-weight: 700; }
.logo-en { font-family: var(--display); font-weight: 800; font-size: 21px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 18px; font-weight: 700; font-size: 17px; flex: 1 1 auto; min-width: 0; }
.logo { flex: none; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 2px; }
.nav a.active, .nav a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 6px; }
.lang-select { width: auto; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--field); background: var(--card); font: inherit; color: var(--ink); min-height: 40px; }
.config-banner { background: #FFF4D6; color: #6B4A06; text-align: center; padding: 8px; font-size: 16px; }
#site-footer { background: var(--ink); color: #C9D6D1; margin-top: 0; }
#site-footer a { color: var(--gold-light); }
.footer-row { padding-block: 40px; display: flex; flex-direction: column; gap: 8px; }
.footer-brand { color: #fff; font-family: var(--display); font-weight: 800; font-size: 18px; }
.footer-brand .logo-ar { color: var(--gold-light); font-size: 26px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 14px 28px;
  border-radius: 999px; font: inherit; font-weight: 700; font-size: 18px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--field); }
.btn-gold { background: var(--gold-light); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: 16px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* cards & forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.card-soft { background: var(--ground); border-radius: 18px; padding: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, legend { font-size: 17px; font-weight: 700; }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input:not([type]), input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--field); border-radius: 10px; padding: 11px 13px; min-height: 46px; width: 100%; }
textarea { resize: vertical; min-height: 96px; }
fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.hint { font-size: 16px; color: var(--muted); min-height: 20px; }
.hint.ok { color: var(--green); } .hint.bad { color: var(--danger); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--field); border-radius: 12px; background: #fff; font-weight: 500; }
.choice input:checked + span { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); }
.choice input:focus-visible + span { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--green); }

.notice { padding: 16px 18px; border-radius: 12px; font-size: 16px; }
.notice-info { background: var(--ground); border: 1px solid var(--line); }
.notice-success { background: var(--green-tint); color: var(--green-dark); }
.notice-error { background: var(--danger-tint); color: var(--danger); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; background: var(--ground); color: var(--ink-2); border: 1px solid var(--line); }
.badge-green { background: var(--green-tint); color: var(--green-dark); border-color: transparent; }
.badge-gold { background: #FBF0D9; color: var(--gold); border-color: transparent; }
.badge-red { background: var(--danger-tint); color: var(--danger); border-color: transparent; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.step { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--ground); }
.step .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: #fff; border: 1.5px solid var(--field); flex: none; }
.step.done .dot { background: var(--green); border-color: var(--green); color: #fff; }

/* home */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-card { flex: 1 1 320px; }
.bismillah { font-family: "Amiri Quran", var(--arabic); font-size: 30px; line-height: 2.3; color: var(--gold); margin: 0; }
.bismillah-block { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.bismillah-tr { margin: 0; font-size: 17px; font-style: italic; color: var(--muted); }
.bismillah-tr:empty { display: none; }
html[dir="rtl"] .bismillah-tr { font-style: normal; font-size: 17px; }
.about-link { font-weight: 600; color: var(--green); text-decoration: none; }
.about-link:hover { text-decoration: underline; }
.about-p { font-size: 19px; line-height: 1.7; color: var(--ink-2); margin: 0; }
html[lang="ur"] .about-p, html[lang="ur"] .about-sign { line-height: 2.2; }
.about-sign { font-weight: 600; color: var(--green); margin: 0; }
.mark { display: flex; flex-direction: column; align-items: center; }
.mark .arabic { font-size: 86px; line-height: 1.1; color: var(--green); font-weight: 700; }
.mark .wordmark { font-family: Manrope, sans-serif; font-weight: 800; letter-spacing: 0.3em; font-size: 14px; color: var(--ink); padding-top: 6px; }
.pillar .arabic { font-size: 30px; color: var(--green); text-align: end; }
html[dir="rtl"] .pillar .arabic { text-align: start; }
.verse { text-align: center; display: flex; flex-direction: column; gap: 22px; align-items: center; }
.verse .arabic { font-size: clamp(40px, 6vw, 60px); color: #fff; line-height: 1.2; }
.verse .ref { color: #C9D6D1; font-weight: 600; font-size: 15px; }
.verse .meaning { font-family: var(--display); font-weight: 600; font-size: clamp(21px, 2.6vw, 28px); line-height: 1.5; max-width: 760px; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid #6F8A82; background: transparent; color: var(--ground); cursor: pointer; display: grid; place-items: center; }
html[dir="rtl"] .round-btn svg { transform: scaleX(-1); }
.num { font-family: var(--display); font-weight: 800; font-size: 38px; color: var(--green); }

/* lists */
.list { display: flex; flex-direction: column; gap: 14px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 15px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat b { display: block; font-family: var(--display); font-size: 30px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--ground); font-weight: 600; white-space: nowrap; }

@media (max-width: 640px) {
  .section { padding-block: 48px; }
  .card { padding: 20px; }
  .mark .arabic { font-size: 64px; }
}
html[lang="ur"] .stack-sm { gap: 16px; }
.verse-ar { font-family: "Amiri Quran", Amiri, serif; font-size: clamp(24px, 3.2vw, 34px); line-height: 2.2; color: #fff; max-width: 860px; }
.verse-ar .vnum { color: var(--gold-light); font-size: 0.8em; }
.verse-tr { max-width: 760px; font-size: clamp(17px, 2vw, 21px); line-height: 1.7; display: flex; flex-direction: column; gap: 8px; }
.verse-tr[lang="ur"] { font-family: "Noto Nastaliq Urdu", serif; line-height: 2.3; }
.vnum-tr { color: var(--gold-light); font-weight: 700; }

/* Inside the phone apps: keep content clear of the notch / status bar / home bar */
html.in-app #site-header { padding-top: env(safe-area-inset-top); }
html.in-app #site-footer { padding-bottom: env(safe-area-inset-bottom); }
html.in-app body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }

/* About: invitation to read the Qur'an */
.invite { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
  border: 2px solid var(--gold-light); border-radius: 24px; padding: 44px 28px; background: var(--ground); }
.invite-ar { font-family: "Amiri Quran", var(--arabic); font-size: 34px; line-height: 2; color: var(--green-dark); }
.invite-tr { margin: 0; font-size: 18px; font-style: italic; color: var(--ink-2); max-width: 560px; }
.invite-tr:empty { display: none; }
html[dir="rtl"] .invite-tr { font-style: normal; }
html[lang="ur"] .invite-tr, html[lang="ur"] .invite .about-p { line-height: 2.2; }
.invite h2 { margin-top: 10px; }
.invite .about-p { max-width: 600px; }
@media (max-width: 520px) { .invite { padding: 32px 18px; } .invite-ar { font-size: 27px; } }
.copyright { opacity: 0.85; margin-top: 4px; }

/* Emergency line: always red and bold */
.emergency { color: #B3261E; font-weight: 800; font-size: 18px; }
#site-footer .emergency { color: #FF8F87; }
.notice-error.emergency, .notice-error { font-weight: 700; }

.nav a.nav-admin { background: var(--green-tint); color: var(--green-dark); border-radius: 8px; padding: 6px 12px; }
.nav a.nav-signin { padding: 8px 20px; color: var(--green-dark); white-space: nowrap; text-decoration: none; }
.nav a.nav-signin:hover { background: var(--green-tint); }

.private-number { display: inline-block; font-size: 24px; font-weight: 800; letter-spacing: 0.02em; direction: ltr; unicode-bidi: isolate; }
.private-call .hint { margin: 4px 0 0; }

/* Volunteer photos */
.vphoto { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 2px solid var(--line); background: var(--green-tint); }
.vphoto-lg { width: 140px; height: 140px; }
.vphoto-admin { width: 72px; height: 72px; }
.vphoto-empty { display: flex; align-items: center; justify-content: center; font-size: 56px; color: var(--muted); }
.photo-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.photo-field .label { display: block; font-weight: 700; margin-bottom: 8px; }
.volunteer-photo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Larger text + read aloud */
.access-bar { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.access-btn { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--green-dark); cursor: pointer; min-height: 40px; }
.access-btn:hover { background: var(--green-tint); }
.voice-group { display: inline-flex; align-items: center; gap: 4px; }
.access-bar { flex-wrap: wrap; }
@media print { .access-bar { display: none; } }

/* Door code */
.door-code { border: 2px solid var(--green); background: var(--green-tint); border-radius: 14px; padding: 12px 16px; margin: 10px 0; }
.door-label { display: block; font-weight: 800; color: var(--green-dark); }
.door-digits { display: block; font-size: 40px; font-weight: 800; letter-spacing: 0.25em; color: var(--ink); line-height: 1.2; }
.door-code .hint { margin: 4px 0 0; }

/* Safety, impact, misc */
.tips { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.impact { display: flex; flex-direction: column; gap: 4px; border-color: var(--green); }
.impact-n { font-size: 24px; font-weight: 800; color: var(--green-dark); margin: 0; }
.verse-small { margin: 0; color: var(--muted); font-style: italic; }
.for-someone p { margin: 0 0 6px; }
.money-rule { font-size: 17px; }

/* Messages */
.msg-thread { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.msg-title { margin: 0; font-size: 19px; }
.msg-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.msg-mine { align-self: flex-end; background: var(--green-tint); border-color: var(--green-tint); }
.msg-theirs { align-self: flex-start; }
.msg-meta { font-size: 14px; color: var(--muted); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-input { width: 100%; }

/* Header logo (سورة with the gold smile), about the size of page titles */
.logo-img { display: block; height: 160px; width: auto; }
@media (max-width: 1100px) { .logo-img { height: 120px; } }
@media (max-width: 760px) { .logo-img { height: 80px; } }

/* Report a concern (opens in place) */
details.concern > summary { cursor: pointer; color: var(--green-dark); text-decoration: underline; list-style: none; }
details.concern > summary::-webkit-details-marker { display: none; }
details.concern[open] { flex-basis: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.concern-note { width: 100%; }
.concern-urgent-item { border-color: #B3261E; border-width: 2px; }

/* Phone menu: links fold under a Menu button */
.nav-links { display: contents; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .header-row { position: relative; }
  .menu-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 8px 16px;
    border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-weight: 800; color: var(--green-dark); cursor: pointer; }
  .nav { gap: 10px; }
  .nav .nav-links { display: none; }
  .nav.open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--ground);
    border-bottom: 1px solid var(--line); padding: 12px 20px 18px; box-shadow: 0 10px 18px rgba(0,0,0,0.08); }
  .nav.open .nav-links a, .nav.open .nav-links button { font-size: 20px; padding: 12px 6px; text-align: start; }
  .nav.open .nav-links .btn { align-self: flex-start; }
}

/* Icons for each kind of help */
.cat-icon { display: inline-flex; width: 26px; height: 26px; color: var(--green); flex: none; }
.cat-icon svg { width: 100%; height: 100%; }
.cat-icon-lg { width: 46px; height: 46px; }
h3.with-icon { display: flex; align-items: center; gap: 10px; }

/* Picture tiles: icon, name, short description underneath */
.choices.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.choice.tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 16px 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; min-height: 150px; }
.choice.tile:hover { border-color: var(--green); }
.choice.tile .tile-radio { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice.tile:has(.tile-radio:checked) { border-color: var(--green); background: var(--green-tint); box-shadow: 0 0 0 2px var(--green) inset; }
.choice.tile:has(.tile-radio:focus-visible) { outline: 3px solid #C98A00; outline-offset: 2px; }
.tile-name { font-weight: 800; font-size: 19px; color: var(--ink); }
.tile-desc { font-size: 15px; line-height: 1.35; color: var(--muted); }

/* Request wizard */
.wiz-bar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wiz-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; color: var(--muted); font-weight: 700; }
.wiz-dot::before { content: ""; display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.wiz-dot.done::before, .wiz-dot.current::before { background: var(--green); }
.wiz-dot.current { color: var(--green-dark); }
.wiz-num { display: none; }
.wiz-count { margin: 0; }
.wiz-q { font-size: 26px; outline: none; }
.wiz-nav { justify-content: space-between; }
.wiz-nav .wiz-next { margin-inline-start: auto; min-width: 160px; }
.review dd { font-weight: 700; }
.rv-cat { display: inline-flex; align-items: center; gap: 6px; }

/* Progress track on requests */
.track { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.trk { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: 14px; color: var(--muted); }
.trk::before { content: ""; position: absolute; top: 15px; inset-inline-start: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.trk:first-child::before { display: none; }
.trk.done::before, .trk.current::before { background: var(--green); }
.trk-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); font-weight: 800; color: var(--muted); }
.trk.done .trk-dot { background: var(--green); border-color: var(--green); color: #fff; }
.trk.current .trk-dot { border-color: var(--green); color: var(--green-dark); box-shadow: 0 0 0 4px var(--green-tint); }
.trk.current .trk-label { color: var(--green-dark); font-weight: 800; }

/* Home page */
.btn-xl { min-height: 64px; padding: 14px 34px; font-size: 21px; }
.trust-row { list-style: none; margin: 18px 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.trust-row li { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); }
.trust-check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green-tint); color: var(--green-dark); font-weight: 800; }
.choice.tile span { min-height: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.choice.tile .tile-name, .choice.tile .tile-desc { display: block; }
.choice.tile .cat-icon { display: inline-flex; }
.choice.tile input:checked + span, .choice.tile input:focus-visible + span { border: 0; background: none; outline: none; }

/* Admin tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid var(--line); margin-top: 18px; }
.tab { font: inherit; font-weight: 800; padding: 12px 18px; border: 0; background: none; color: var(--muted); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; display: inline-flex; align-items: center; gap: 8px; }
.tab.active { color: var(--green-dark); border-bottom-color: var(--green); }
.tab-count { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--line); color: var(--ink); font-size: 14px; display: inline-grid; place-items: center; }
.tab-count-alert { background: #B3261E; color: #fff; }
.tab-panel { padding-top: 14px; }
@media (max-width: 760px) { .nav.open .nav-links .btn { padding: 10px 24px; font-size: 18px; } }
.trust-row .langs bdi { white-space: nowrap; }

/* Breadcrumbs */
.crumb-nav { border-top: 1px solid var(--line); background: #fff; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-block: 10px; margin: 0 auto; font-size: 16px; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.crumbs li + li::before { content: "›"; color: var(--muted); padding-inline: 6px; font-weight: 700; }
html[dir="rtl"] .crumbs li + li::before { content: "‹"; }
.crumbs a { color: var(--green-dark); font-weight: 700; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* Balloon help */
.tip { position: relative; display: inline-flex; vertical-align: middle; }
.tip-btn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--green); background: #fff; color: var(--green-dark);
  font: inherit; font-size: 15px; font-weight: 800; line-height: 1; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.tip-btn:hover, .tip-btn[aria-expanded="true"] { background: var(--green); color: #fff; }
.tip-bubble { position: absolute; z-index: 30; top: calc(100% + 8px); inset-inline-start: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(300px, 80vw); background: var(--ink); color: #fff; font-size: 16px; font-weight: 500; line-height: 1.45;
  padding: 10px 14px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.18); text-align: start; white-space: normal; }
html[dir="rtl"] .tip-bubble { transform: translateX(50%); }
.tip-bubble::before { content: ""; position: absolute; top: -6px; inset-inline-start: calc(50% - 6px); border: 6px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
.for-other-row { align-items: center; gap: 8px; }
/* The voice tip sits at the screen edge: open it toward the page, not off-screen. */
.access-bar .tip-bubble { inset-inline-start: auto; inset-inline-end: -4px; transform: none; }
html[dir="rtl"] .access-bar .tip-bubble { transform: none; }
.access-bar .tip-bubble::before { inset-inline-start: auto; inset-inline-end: 10px; }

/* English | Español switch in the header */
.lang-toggle { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); min-height: auto; width: auto; flex-shrink: 0; align-items: center; }
.lang-opt { font: inherit; font-size: 0.95em; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  padding: 7px 14px; border-radius: 999px; line-height: 1.2; white-space: nowrap; }
.lang-opt:hover { background: var(--green-tint); }
.lang-opt[aria-pressed="true"] { background: var(--green, #2f5d4a); color: #fff; font-weight: 600; }
.lang-opt:focus-visible { outline: 3px solid var(--gold, #c9a24a); outline-offset: 2px; }
@media (max-width: 480px) {
  .access-bar { gap: 6px; justify-content: center; }
  .access-btn { padding: 5px 10px; font-size: 0.88em; }
}

/* Keep the menu beside the logo in every language, so switching language
   doesn't move the page up or down. Long menus wrap within their own space. */
@media (min-width: 761px) {
  .header-row { flex-wrap: nowrap; }
  .nav { row-gap: 4px; }
}

/* Top bar: reading tools on the left, language + sign in/out on the right */
.access-bar { justify-content: space-between; align-items: center; flex-wrap: wrap; row-gap: 8px; }
.bar-left, .bar-right { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar-right { margin-inline-start: auto; }
a.access-btn { text-decoration: none; display: inline-flex; align-items: center; }
.bar-sign { font-weight: 700; color: var(--green-dark); }
.access-bar .lang-opt { padding: 5px 12px; }
@media (max-width: 480px) {
  .bar-left, .bar-right { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .access-bar { padding-top: 6px; row-gap: 6px; }
  .bar-left { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 6px; width: 100%; }
  .bar-left .access-btn { width: 100%; justify-content: center; text-align: center; white-space: normal;
    line-height: 1.15; font-size: 13.5px; padding: 6px 6px; border-radius: 14px; min-height: 44px; }
  .bar-left .voice-group { gap: 3px; }
  .bar-left .voice-group .tip-btn { flex: none; }
  .bar-right { gap: 6px; }
  .bar-right .lang-opt, .bar-right .access-btn { font-size: 14.5px; }
}

/* Internet connection notice */
.net-banner { position: sticky; top: 0; z-index: 60; text-align: center; padding: 10px 16px; font-weight: 700; font-size: 17px; }
.net-offline { background: #FDECEA; color: #8A1C14; border-bottom: 1px solid #F2B8B2; }
.net-online { background: var(--green-tint); color: var(--green-dark); border-bottom: 1px solid var(--line); }
/* Coordinator reports */
.report-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.report-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.linklike { background: none; border: 0; padding: 0; color: var(--green); text-decoration: underline; font: inherit; cursor: pointer; }
.notice-warn { background: #FFF4D6; color: #6B4A06; border: 1px solid #F0D9A0; }
.date-range .row { gap: 8px; }
.date-range input { width: auto; }
.report-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.report-table th, .report-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.report-table th { background: var(--green-tint); }
.report-cols { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.col-chip span { min-height: 44px; padding: 8px 12px; font-size: 16px; }
.col-chip input:checked + span::before { content: "✓"; font-weight: 800; margin-inline-end: 8px; color: var(--green); }
.col-chip input:not(:checked) + span { color: var(--muted); }
.report-builder fieldset { border: 0; padding: 0; margin: 0; }
.report-builder legend { font-weight: 800; font-size: 19px; margin-bottom: 8px; }
.report-kinds .choice.tile { padding: 14px; }
.vphoto-report { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.print-roster { display: none; }
@media print {
  body:has(.print-roster) > *:not(.print-roster) { display: none !important; }
  .print-roster { display: block; color: #000; font-size: 12pt; }
  .print-roster h1 { font-size: 18pt; margin: 0 0 4pt; }
  .print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt; }
  .print-card { display: flex; gap: 10pt; border: 1px solid #999; border-radius: 6pt; padding: 8pt; break-inside: avoid; }
  .print-photo { width: 90pt; height: 110pt; object-fit: cover; border-radius: 4pt; flex: none; }
  .print-nophoto { display: flex; align-items: center; justify-content: center; background: #eee; color: #555; font-size: 10pt; }
  .print-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1pt 6pt; font-size: 10pt; }
  .print-card dt { font-weight: 700; }
  .print-card dd { margin: 0; overflow-wrap: anywhere; }
}
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.registry-cell { min-width: 210px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.registry-cell { min-width: 240px; }
.registry-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-xs { padding: 5px 10px; font-size: 14px; min-height: 36px; }

/* About page dedication */
.dedication { text-align: center; max-width: 680px; margin: 0 auto; padding: 40px 32px; border-radius: 22px;
  background: var(--ground); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.dedication::before { content: ""; width: 64px; height: 3px; border-radius: 3px; background: var(--gold, #C9A24A); }
.dedication-text { font-size: 21px; line-height: 1.75; color: var(--ink); margin: 0; font-style: italic; }
html[lang="ur"] .dedication-text, html[lang="ar"] .dedication-text { font-style: normal; line-height: 2.2; }
.dedication-ar { font-family: "Amiri Quran", var(--arabic); font-size: 32px; line-height: 2; color: var(--green-dark); margin: 6px 0 0; }
.dedication-tr { font-size: 18px; color: var(--ink-2); margin: 0; }
.dedication-tr:empty { display: none; }
@media (max-width: 520px) { .dedication { padding: 28px 18px; } .dedication-text { font-size: 19px; } .dedication-ar { font-size: 26px; } }

/* About: join the mission */
.mission { text-align: center; max-width: 680px; margin: 36px auto 0; padding: 36px 32px; border-radius: 22px;
  background: var(--green-tint); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mission h2 { margin: 0; }
.mission-list { text-align: start; margin: 0; padding-inline-start: 1.2em; display: grid; gap: 8px; font-size: 19px; line-height: 1.55; }
.mission-ar { font-family: "Amiri Quran", var(--arabic); font-size: 30px; line-height: 2; color: var(--green-dark); margin: 4px 0 0; }
.mission-btns { justify-content: center; margin-top: 6px; }
.share-status:empty { display: none; }
@media (max-width: 520px) { .mission { padding: 26px 18px; } .mission-list { font-size: 17px; } .mission-ar { font-size: 25px; } }

/* About page: wider two-column layout */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.about-grid-even { grid-template-columns: 1fr 1fr; align-items: stretch; }
.about-grid .dedication { margin: 0; max-width: none; position: sticky; top: 24px; }
.about-story .lead { margin: 0; }
.about-mission { padding-block: 56px; }
.mission-wide { max-width: none; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; text-align: start;
  align-items: start; padding: 40px 44px; }
.mission-wide .mission-btns { justify-content: flex-start; }
.mission-wide .mission-list { font-size: 18px; }
.mission-verse { text-align: center; padding-top: 8px; border-top: 1px solid rgba(23, 90, 66, 0.18); margin-top: 6px; }
.verse-card { background: var(--ink); color: var(--ground); border-radius: 22px; padding: 36px 32px; gap: 18px; justify-content: center; }
.verse-card .verse-ar { font-size: clamp(22px, 2.4vw, 30px); }
.verse-card .verse-tr { font-size: 17px; }
.about-quran .invite { margin: 0; height: 100%; justify-content: center; }
.about-quran .invite-ar { font-size: 28px; }
.about-credits { margin: 32px 0 0; text-align: center; }
@media (max-width: 900px) {
  .about-grid, .about-grid-even, .mission-wide { grid-template-columns: 1fr; gap: 28px; }
  .about-grid .dedication { position: static; }
  .mission-wide { padding: 28px 20px; }
}
.addr-box { margin-top: 6px; }
.addr-box address { font-style: normal; background: #FFF8E6; border: 1px solid #F0D9A0; border-radius: 10px; padding: 8px 10px; margin: 4px 0; }

/* Home: video tour */
.promo-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 44px; align-items: center; }
.promo-text h2 { margin: 0; }
.promo-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #10201B;
  box-shadow: 0 18px 40px rgba(16, 32, 27, 0.18); display: block; }
.promo-video p { margin: 8px 0 0; }
@media (max-width: 900px) { .promo-grid { grid-template-columns: 1fr; gap: 22px; } }
