:root {
  color-scheme: light;
  --ink: #18241f;
  --muted: #617069;
  --paper: #fbfaf5;
  --surface: #ffffff;
  --line: #dce4df;
  --green: #176b4d;
  --green-dark: #0f4f39;
  --gold: #c49a45;
  --shadow: 0 18px 50px rgba(24, 36, 31, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
a { color: inherit; }
.shell { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(220,228,223,.9); background: rgba(251,250,245,.92); backdrop-filter: blur(16px); }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(145deg, var(--green), var(--green-dark)); font-family: Georgia, serif; font-size: 23px; box-shadow: 0 8px 18px rgba(23,107,77,.22); }
.main-nav { display: flex; align-items: center; gap: 18px; margin-inline: auto; }
.main-nav a, .language-nav a { text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 650; }
.main-nav a:hover, .language-nav a:hover, .language-nav a[aria-current="page"] { color: var(--green); }
.language-nav { display: flex; gap: 8px; }
.language-nav a { padding: 5px 7px; border-radius: 7px; }
.language-nav a[aria-current="page"] { background: #e4f0e9; }
.page-shell { min-height: calc(100vh - 150px); padding-block: 48px 80px; }
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 92px); border-radius: 30px; color: #fff; background: radial-gradient(circle at 85% 15%, rgba(196,154,69,.32), transparent 28%), linear-gradient(135deg, #123d2e, #176b4d 60%, #1f7a59); box-shadow: var(--shadow); }
.hero::after { content: "۞"; position: absolute; inset-inline-end: 5%; top: 2%; color: rgba(255,255,255,.09); font-family: Georgia, serif; font-size: clamp(130px, 25vw, 310px); line-height: 1; }
.hero h1, .page-heading h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 6vw, 4.8rem); line-height: 1.08; letter-spacing: -.035em; }
.hero p:not(.eyebrow) { max-width: 680px; margin: 20px 0 0; color: rgba(255,255,255,.82); font-size: 1.08rem; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: .77rem; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.card-grid, .list-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-top: 28px; }
.collection-card, .list-card { min-height: 170px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); text-decoration: none; box-shadow: 0 8px 30px rgba(24,36,31,.04); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.collection-card:hover, .list-card:hover { transform: translateY(-3px); border-color: #a9cbbb; box-shadow: var(--shadow); }
.collection-card strong, .list-card strong { font-family: Georgia, serif; font-size: 1.28rem; }
.collection-card span, .list-card span, .muted { color: var(--muted); }
.collection-card p, .list-card p { margin: 5px 0 0; color: var(--muted); }
.card-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 13px; color: var(--green); background: #e6f2ec; font-family: Georgia, serif; font-size: 1.25rem; }
.page-heading { max-width: 800px; margin: 16px 0 34px; }
.page-heading h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
.page-heading > p:not(.eyebrow):last-child { color: var(--muted); font-size: 1.06rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: .9rem; }
.breadcrumbs a { color: var(--green); text-decoration: none; }
.chapter-list { display: grid; gap: 10px; }
.chapter-list a { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; }
.chapter-list a:hover { border-color: #a9cbbb; }
.chapter-list a > span:last-child { color: var(--muted); font-size: .88rem; }
.chapter-number, .surah-number, .ayah-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: #e6f2ec; font-weight: 750; font-size: .85rem; }
.reading-stack { display: grid; gap: 18px; max-width: 850px; margin-inline: auto; }
.reading-card { padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 8px 30px rgba(24,36,31,.04); }
.reading-card > header { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 15px; color: var(--muted); font-size: .9rem; }
.reading-card footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.arabic-text { margin: 12px 0; font-family: "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", serif; font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 2.15; text-align: right; }
.prose { white-space: pre-line; }
.long-form { max-width: 780px; font-size: 1.05rem; }
.quote-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.quote-card { margin: 0; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.quote-card p { margin: 0; font-family: Georgia, serif; font-size: 1.25rem; line-height: 1.6; }
.quote-card footer { margin-top: 18px; color: var(--muted); }
.surah-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.surah-grid a { display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; }
.surah-grid a:hover { border-color: #a9cbbb; }
.surah-grid a > span:last-child { display: flex; flex-direction: column; }
.surah-grid small { color: var(--muted); }
.quran-heading { text-align: center; margin-inline: auto; }
.arabic-title { margin: 0; color: var(--green); font-family: "Noto Naskh Arabic", Georgia, serif; font-size: 3rem; }
.ayah > header { justify-content: flex-end; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }
.pagination a { padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--green); background: var(--surface); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); background: #f5f4ee; }
.footer-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; }
.footer-inner a { color: var(--green); text-decoration: none; }
[dir="rtl"] .arabic-text { text-align: right; }
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; padding-block: 12px; gap: 12px; }
  .main-nav { width: 100%; order: 3; overflow-x: auto; padding-bottom: 4px; }
  .language-nav { margin-inline-start: auto; }
  .card-grid, .list-grid, .surah-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1160px); }
  .page-shell { padding-block: 30px 56px; }
  .hero { padding: 34px 24px; border-radius: 22px; }
  .card-grid, .list-grid, .surah-grid, .quote-grid { grid-template-columns: 1fr; }
  .chapter-list a { grid-template-columns: 36px 1fr; }
  .chapter-list a > span:last-child { grid-column: 2; }
  .main-nav { gap: 15px; }
}
