/* ============================================================
   Noor — Quran & Hadith Search · Design System
   Mobile-first · No frameworks · Single stylesheet
   ============================================================ */

:root {
  --paper: #faf7f0;
  --surface: #ffffff;
  --soft: #f2ecdd;
  --ink: #152a22;
  --muted: #5d6e63;
  --faint: #8a978d;
  --primary: #0b6b4e;
  --primary-dark: #07452f;
  --primary-soft: #e3f0e9;
  --gold: #b9862f;
  --gold-soft: #f7ecd4;
  --line: #e7dfcb;
  --danger: #b3402e;
  --danger-soft: #fbe9e4;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(21, 42, 34, 0.06), 0 2px 8px rgba(21, 42, 34, 0.05);
  --shadow-md: 0 4px 14px rgba(21, 42, 34, 0.08), 0 12px 32px rgba(21, 42, 34, 0.08);
  --shadow-lg: 0 12px 40px rgba(7, 69, 47, 0.16);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "Amiri", "Scheherazade New", "Traditional Arabic",
    "Segoe UI", serif;
  --maxw: 1120px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.22;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  font-weight: 800;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

::selection { background: var(--primary-soft); }

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

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff;
  padding: 10px 18px; z-index: 200; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; }
.brand small { font-weight: 600; color: var(--faint); font-size: 0.72rem; display: block; line-height: 1.1; letter-spacing: 0.02em; }

.nav-desktop { display: none; align-items: center; gap: 6px; }
.nav-desktop a {
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
  padding: 9px 14px; border-radius: 999px;
}
.nav-desktop a:hover { background: var(--soft); text-decoration: none; }
.nav-desktop a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); }

/* Guides dropdown (desktop) */
.nav-dropdown { position: relative; }
.nav-drop-btn {
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
  padding: 9px 14px; border-radius: 999px; background: none; border: 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit;
}
.nav-drop-btn:hover { background: var(--soft); }
.nav-drop-btn[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); }
.nav-drop-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-md);
  min-width: 270px; padding: 8px; z-index: 200;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: block; padding: 10px 14px; border-radius: 9px;
  font-size: 0.92rem; font-weight: 600; color: var(--ink);
}
.nav-drop-menu a:hover { background: var(--soft); text-decoration: none; }

/* Colorful Search buttons (menu + header CTA) */
a.nav-search-btn {
  background: linear-gradient(135deg, #0b6b4e 0%, #12a06d 60%, #1cb886 100%) !important;
  color: #fff !important; font-weight: 700;
  box-shadow: 0 2px 10px rgba(11, 107, 78, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
a.nav-search-btn:hover {
  background: linear-gradient(135deg, #07452f 0%, #0b6b4e 70%, #12a06d 100%) !important;
  color: #fff !important; text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(11, 107, 78, 0.45);
}
.nav-desktop a.nav-search-btn { padding: 9px 20px; }
.nav-desktop a.nav-search-btn[aria-current="page"] {
  background: linear-gradient(135deg, #b9862f 0%, #d9a441 100%) !important;
  box-shadow: 0 2px 10px rgba(185, 134, 47, 0.45);
}

.header-cta { display: none; }

.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 12px; cursor: pointer; color: var(--ink);
}
.mobile-nav {
  display: none; border-bottom: 1px solid var(--line);
  background: var(--paper); padding: 8px 20px 18px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 13px 6px; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line); font-size: 1.02rem;
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a:hover { text-decoration: none; color: var(--primary); }
.mobile-nav-h {
  display: block; padding: 14px 6px 4px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.mobile-nav a.mobile-sub { padding-left: 22px; font-size: 0.95rem; font-weight: 500; }

/* Colorful Search button in the mobile menu */
.mobile-nav a.nav-search-btn {
  background: linear-gradient(135deg, #0b6b4e 0%, #12a06d 60%, #1cb886 100%);
  color: #fff; font-weight: 700; text-align: center;
  border-radius: 14px; border-bottom: 0; margin: 8px 0; padding: 13px 6px;
  box-shadow: 0 2px 10px rgba(11, 107, 78, 0.35);
}
.mobile-nav a.nav-search-btn:hover { color: #fff; }

@media (min-width: 860px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 50px; line-height: 1.2;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a5761f; text-decoration: none; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; min-height: 42px; }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; min-height: 58px; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ============ Hero ============ */
.hero {
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 340px at 12% -40px, rgba(185, 134, 47, 0.12), transparent 70%),
    radial-gradient(640px 420px at 88% 10%, rgba(11, 107, 78, 0.10), transparent 70%);
}
.hero-inner { position: relative; }
.hero-copy { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.hero-copy .trust-row {
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center;
  margin-top: 18px; font-size: 0.88rem; color: var(--muted); font-weight: 600;
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 16px; height: 16px; color: var(--primary); flex: none; }

/* ============ Search tool ============ */
.tool-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: clamp(18px, 3.4vw, 32px);
  max-width: 820px; margin: 0 auto; position: relative;
}
.tool-title {
  font-size: clamp(1.15rem, 2.6vw, 1.5rem); letter-spacing: -0.5px;
  margin: 0 0 14px; text-align: center; color: var(--ink);
}
.tool-tabs {
  display: inline-flex; background: var(--soft); border-radius: 999px;
  padding: 4px; gap: 2px; margin-bottom: 18px;
}
.tool-tabs button {
  font-family: inherit; font-weight: 700; font-size: 0.92rem;
  border: 0; background: transparent; color: var(--muted);
  padding: 10px 22px; border-radius: 999px; cursor: pointer; min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease;
}
.tool-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tool-tabs button:hover { color: var(--ink); }

.search-row { display: flex; gap: 10px; }
.search-field { position: relative; flex: 1; }
.search-field svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--faint); pointer-events: none;
}
#search-input {
  width: 100%; font-family: inherit; font-size: 1.05rem;
  padding: 15px 18px 15px 48px; border: 2px solid var(--line);
  border-radius: 16px; background: var(--paper); color: var(--ink);
  min-height: 58px; transition: border-color 0.15s ease, background 0.15s ease;
}
#search-input::placeholder { color: var(--faint); }
#search-input:focus { outline: none; border-color: var(--primary); background: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.chips-label { font-size: 0.85rem; color: var(--faint); font-weight: 600; margin-right: 2px; }
.chip {
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; min-height: 40px;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }

.tool-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px;
  font-size: 0.83rem; color: var(--faint);
}
.tool-meta button {
  background: none; border: 0; padding: 0; font: inherit; color: var(--primary);
  font-weight: 600; cursor: pointer;
}
.tool-meta button:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .search-row { flex-direction: column; }
  .search-row .btn { width: 100%; }
}

/* ============ Results ============ */
.results-wrap { max-width: 820px; margin: 26px auto 0; }
.results-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.results-count { font-weight: 700; font-size: 0.95rem; }
.results-note { font-size: 0.85rem; color: var(--faint); }

.result-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: clamp(18px, 3vw, 26px); margin-bottom: 14px;
  animation: rise 0.35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .result-card { animation: none; }
  html { scroll-behavior: auto; }
}

.ref-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em;
  background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 12px;
  text-transform: uppercase;
}
.ref-badge.hadith { background: var(--gold-soft); color: #7a5a17; }
.ref-badge .src { font-weight: 600; text-transform: none; letter-spacing: 0; opacity: 0.75; }

.arabic {
  font-family: var(--font-arabic);
  font-size: 1.55rem; line-height: 2.1; text-align: right; direction: rtl;
  margin: 4px 0 14px; color: var(--ink);
}
.translation { font-size: 1.06rem; line-height: 1.75; margin-bottom: 6px; }
.translation mark, .hadith-text mark { background: #fdf0c3; border-radius: 3px; padding: 0 2px; }
.hadith-text { font-size: 1.02rem; line-height: 1.75; margin-bottom: 8px; }
.grade { font-size: 0.83rem; color: var(--muted); margin-bottom: 4px; }
.translator { font-size: 0.8rem; color: var(--faint); margin-bottom: 12px; }

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: 0.85rem; font-weight: 700;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 9px 16px; cursor: pointer; min-height: 40px;
  transition: all 0.15s ease;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.icon-btn.saved { border-color: var(--gold); color: #7a5a17; background: var(--gold-soft); }
.icon-btn.link { text-decoration: none; }

/* Skeletons */
.skeleton {
  border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid var(--line); padding: 22px; margin-bottom: 14px;
}
.skel-line {
  height: 14px; border-radius: 7px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--soft) 25%, #e6ddc8 50%, var(--soft) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel-line { animation: none; } }

/* States */
.state-box {
  text-align: center; padding: 44px 24px;
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius-md); margin-bottom: 14px;
}
.state-box .state-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.state-box .state-icon svg { width: 26px; height: 26px; }
.state-box.error .state-icon { background: var(--danger-soft); color: var(--danger); }
.state-box h3 { margin-bottom: 6px; }
.state-box p { color: var(--muted); margin-bottom: 16px; font-size: 0.95rem; }

/* ============ Cards & grids ============ */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.feature-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 28px 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-icon.gold { background: var(--gold-soft); color: var(--gold); }
.feature-card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feature-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* Verse of the day */
.votd {
  background: var(--primary-dark); color: #f3efe4;
  border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 52px);
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.votd::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px;
  border: 1.5px solid rgba(185, 134, 47, 0.35); border-radius: 50%;
}
.votd::before {
  content: ""; position: absolute; right: -30px; top: -30px; width: 180px; height: 180px;
  border: 1.5px solid rgba(185, 134, 47, 0.25); border-radius: 50%;
}
.votd .eyebrow { color: var(--gold); }
.votd .arabic { color: #fff; font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.votd .translation { color: #e9e2cf; font-size: clamp(1rem, 2.4vw, 1.2rem); }
.votd .ref { color: var(--gold); font-weight: 700; }
.votd .card-actions .icon-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: #f3efe4; }
.votd .card-actions .icon-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* Topic cards */
.topic-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .topic-grid { grid-template-columns: repeat(4, 1fr); } }
.topic-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px 18px; box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  display: block;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); text-decoration: none; }
.topic-card h3 { font-size: 1rem; margin-bottom: 4px; }
.topic-card p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.topic-card .go { font-size: 0.82rem; font-weight: 700; color: var(--primary); margin-top: 10px; display: inline-block; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; font-family: inherit; font-size: 1rem; font-weight: 700;
  background: none; border: 0; padding: 18px 20px; cursor: pointer; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px;
}
.faq-q .plus { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease, background 0.2s ease; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); background: var(--primary-soft); color: var(--primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.faq-a-inner { padding: 0 20px 20px; color: var(--muted); font-size: 0.96rem; }
.faq-item.open .faq-a { max-height: 400px; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0a5c42 100%);
  border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px);
  text-align: center; color: #f3efe4; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d9d2ba; max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ Footer ============ */
.site-footer { background: var(--ink); color: #c9cfc8; margin-top: 0; }
.footer-inner { padding: clamp(44px, 6vw, 72px) 0 28px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { width: 30px; height: 30px; }
.site-footer p { font-size: 0.92rem; }
.footer-h { color: #fff; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #c9cfc8; font-size: 0.93rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: 0.85rem; color: #9aa39c;
}
.footer-bottom a { color: #c9cfc8; }

/* ============ Content pages ============ */
.page-hero { padding: clamp(36px, 6vw, 64px) 0 clamp(20px, 3vw, 32px); text-align: center; }
.page-hero p { max-width: 640px; margin: 0 auto; color: var(--muted); }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2.2em; }
.prose ul, .prose ol { padding-left: 1.4em; color: var(--muted); }
.prose li { margin-bottom: 0.5em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.94rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; color: var(--ink); }

/* Surah grid */
.surah-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .surah-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .surah-grid { grid-template-columns: repeat(4, 1fr); } }
.surah-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.surah-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.surah-num {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-weight: 800; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.surah-card .s-name { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.surah-card .s-meta { font-size: 0.78rem; color: var(--faint); }
.surah-card .s-ar { margin-left: auto; font-family: var(--font-arabic); font-size: 1.35rem; color: var(--primary); }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow-md); max-width: 640px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  border: 2px solid var(--line); border-radius: 12px; padding: 13px 16px; background: var(--paper);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); background: #fff; }
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: 0.83rem; color: var(--faint); margin-top: 6px; }
.field .error-msg { font-size: 0.85rem; color: var(--danger); margin-top: 6px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .error-msg { display: block; }
.form-note { font-size: 0.88rem; color: var(--muted); background: var(--soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 18px; }

/* Ad slot (reserved, hidden until enabled) */
.ad-slot { display: none; }
.ad-slot.enabled {
  display: block; text-align: center; margin: 30px auto; max-width: 820px;
}
.ad-slot .ad-label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }

/* Breadcrumbs */
.crumbs { font-size: 0.85rem; color: var(--faint); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; font-size: 0.92rem; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 300; max-width: calc(100vw - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Saved drawer */
.saved-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--gold-soft); border: 1px solid #e5d3a3; border-radius: var(--radius-md);
  padding: 12px 18px; margin-bottom: 18px; font-size: 0.92rem; font-weight: 600; color: #6b4f14;
}
.saved-bar button { background: none; border: 0; font: inherit; color: var(--primary-dark); font-weight: 700; cursor: pointer; }
.saved-bar button:hover { text-decoration: underline; }

/* Collection pills (hadith page) */
.coll-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.coll-pill {
  font-family: inherit; font-size: 0.85rem; font-weight: 700;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 9px 18px; cursor: pointer; min-height: 42px;
}
.coll-pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.coll-pill:hover { border-color: var(--primary); color: var(--primary-dark); }
.coll-pill[aria-pressed="true"]:hover { color: #fff; }

/* Misc */
.divider { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.kbd {
  font-family: ui-monospace, monospace; font-size: 0.82rem;
  background: var(--soft); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 8px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
