/* Muhammadan — design system (Stage 2: emerald + gold). No external fonts: Quran fonts are uploaded in the admin panel. */
:root {
  --bg: #FBFAF6; --surface: #FFFFFF; --surface-2: #F7F4EC; --line: #E6E2D8; --line-2: #D6D1C4;
  --ink: #13201C; --ink-2: #2E3A36; --muted: #5E6B66;
  --green: #0F5C4A; --green-ink: #0A4236; --green-soft: #E7F1EE; --on-green: #FFFFFF; --on-green-2: #D5E7E1;
  --gold: #B8862B; --gold-ink: #8A6416; --gold-soft: #F4EEE0; --gold-light: #E8CF97;
  --danger: #A3271F; --warn-bg: #FBF5E6; --warn-line: #E8D5A6;
  --radius: 14px; --radius-sm: 10px;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "Noto Naskh Arabic", "Segoe UI", "Geeza Pro", "Arabic Typesetting", Tahoma, serif;
  --font-quran-fallback: "KFGQPC Uthmanic Script HAFS", "Amiri Quran", "Scheherazade New", "Noto Naskh Arabic", "Traditional Arabic", "Geeza Pro", serif;
  --font-urdu-fallback: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", serif;
  --ar-size: 34px; --tr-size: 17.5px; --banner: #0F5C4A;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E1714; --surface: #15211D; --surface-2: #1A2824; --line: #26352F; --line-2: #33453E;
  --ink: #E9EFEC; --ink-2: #C9D5D0; --muted: #9DB0A9;
  --green: #4FB89A; --green-ink: #7FD1B6; --green-soft: #1A2E27; --on-green: #0E1714; --on-green-2: #1E3A31;
  --gold: #D9B160; --gold-ink: #E8CF97; --gold-soft: #2A2416; --gold-light: #E8CF97;
  --warn-bg: #2A2416; --warn-line: #5A4A22; --danger: #F08A80; --banner: #0F3D32;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1714; --surface: #15211D; --surface-2: #1A2824; --line: #26352F; --line-2: #33453E;
    --ink: #E9EFEC; --ink-2: #C9D5D0; --muted: #9DB0A9;
    --green: #4FB89A; --green-ink: #7FD1B6; --green-soft: #1A2E27; --on-green: #0E1714; --on-green-2: #1E3A31;
    --gold: #D9B160; --gold-ink: #E8CF97; --gold-soft: #2A2416; --gold-light: #E8CF97;
    --warn-bg: #2A2416; --warn-line: #5A4A22; --danger: #F08A80; --banner: #0F3D32;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font-ui); }
body.lang-ur { font-family: var(--font-urdu-fallback), var(--font-ui); line-height: 2; }
body.lang-ar { font-family: var(--font-arabic), var(--font-ui); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding-inline-start: 1.3em; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--green); color: var(--on-green); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.page-pad { padding-top: 40px; padding-bottom: 56px; }
.page-pad-b { padding-bottom: 32px; }
.stack > * + * { margin-top: 16px; } .stack-sm > * + * { margin-top: 10px; } .stack-xs > * + * { margin-top: 6px; }
.stack-lg > * + * { margin-top: 28px; } .stack-xl > * + * { margin-top: 48px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: 14px; } .center-link { display: block; text-align: center; font-weight: 600; }
.h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.5px; }
.h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.4px; }
.h3 { font-size: 20px; font-weight: 700; } .h4 { font-size: 17px; font-weight: 700; }
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); display: block; }
.eyebrow.gold, .gold { color: var(--gold-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.section-head.pad { padding: 16px 20px; border-bottom: 1px solid var(--line); }

/* Buttons & form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none !important; }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-outline { background: transparent; border-color: var(--green); color: var(--green); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn.sm { width: 36px; height: 36px; border: 0; background: transparent; }
.icon-btn.sm:hover { background: var(--green-soft); }
.stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stroke-green { fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linejoin: round; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 12px; min-height: 44px; max-width: 100%; }
textarea { padding: 10px 12px; width: 100%; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 20px; height: 20px; accent-color: var(--green); }
label.stack-xs { display: flex; flex-direction: column; font-size: 14px; font-weight: 500; }
label.stack-xs > input, label.stack-xs > select { width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; } legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.radio-card, .check-card { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-card:has(input:checked), .check-card:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.radio-card span, .check-card span { display: flex; flex-direction: column; }
.radio-card small, .check-card small { color: var(--muted); font-size: 13px; }
.segmented { display: inline-grid; grid-auto-flow: column; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.segmented > a, .segmented > label > span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.segmented > label > input { position: absolute; opacity: 0; }
.segmented > a[aria-selected="true"], .segmented > label > input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented > label > input:focus-visible + span { outline: 3px solid var(--gold); }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 16px; border: 1px solid var(--line); background: var(--surface); }
.flash-success { border-color: var(--green); background: var(--green-soft); }
.flash-error { border-color: var(--danger); color: var(--danger); background: var(--surface); }
.flash-warn { border-color: var(--warn-line); background: var(--warn-bg); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.badge-ok { background: var(--green-soft); color: var(--green-ink); } .badge-warn { background: var(--warn-bg); color: var(--gold-ink); } .badge-bad { background: #FBE9E7; color: #8E1F17; }
.toast { position: fixed; inset-inline: 0; bottom: 24px; margin: 0 auto; width: max-content; max-width: 90vw; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; transform: none; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.notice p { flex: 1 1 300px; }
.empty { padding: 24px; color: var(--muted); }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 21px; letter-spacing: -.3px; text-decoration: none !important; }
.brand-a { fill: var(--green); } .brand-b { fill: none; stroke: var(--gold-light); stroke-width: 2; }
.main-nav { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.main-nav a { color: var(--ink); padding: 6px 0; }
.main-nav a[aria-current="page"] { color: var(--green); font-weight: 700; border-bottom: 2px solid var(--green); }
.header-tools { display: flex; gap: 8px; align-items: center; }
.lang-form select { min-height: 44px; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; margin-inline-start: auto; }
  .main-nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .header-tools { order: 2; }
}

/* Hero */
.hero { background: var(--banner); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.2'%3E%3Crect x='16' y='16' width='32' height='32'/%3E%3Crect x='16' y='16' width='32' height='32' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='9'/%3E%3C/g%3E%3C/svg%3E"); }
.hero > * { position: relative; }
.hero-inner { padding: 64px 20px 56px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; letter-spacing: -1px; max-width: 820px; }
.hero-ar { font-family: var(--font-arabic); font-size: 26px; color: #E8CF97; }
.hero-intro { font-size: 18px; color: #D5E7E1; max-width: 640px; }
.hero-sm .stack { padding: 36px 20px; }
.on-dark, .on-dark a { color: #fff; } .on-dark-muted { color: #D5E7E1; }
.hero-search { width: 100%; max-width: 720px; display: flex; gap: 8px; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.hero-search input { flex: 1; border: 0; min-width: 0; color: #13201C; background: #fff; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 900px; margin-top: 16px; }
.quick { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius); padding: 18px; color: #fff; display: flex; flex-direction: column; gap: 4px; text-align: start; text-decoration: none !important; }
.quick:hover { background: rgba(255,255,255,.16); }
.quick-ar { font-family: var(--font-arabic); font-size: 22px; color: #E8CF97; } .quick-t { font-weight: 700; font-size: 18px; } .quick-d { font-size: 14px; color: #D5E7E1; }
@media (max-width: 700px) { .quick-grid { grid-template-columns: 1fr; } }

/* Cards & grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.surah-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none !important; }
.surah-card:hover, .juz-card:hover { border-color: var(--green); }
.num-diamond { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--gold-soft); color: var(--gold-ink); border-radius: 10px; font-weight: 700; font-size: 14px; transform: rotate(45deg); }
.num-diamond > span { transform: rotate(-45deg); }
.sc-name { display: block; font-weight: 600; } .sc-meta { display: block; font-size: 13px; color: var(--muted); }
.sc-ar { font-family: var(--font-arabic); font-size: 21px; color: var(--green); }
.juz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--ink); text-decoration: none !important; }
.juz-n { display: block; font-weight: 700; }
.continue { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.continue-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--green-soft); display: flex; align-items: center; justify-content: center; }
.continue-t { font-weight: 600; font-size: 17px; }
.filter-row input { width: 100%; max-width: 420px; }

/* Quran text */
.quran-text { font-family: var(--font-quran-fallback); font-size: var(--ar-size); line-height: 2.15; text-align: right; color: var(--ink); word-spacing: 2px; }
.vod-text { font-size: 32px; }
.ayah-end { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; padding: 0 .2em; border: 1.5px solid var(--gold); border-radius: 50%; font-family: var(--font-arabic); font-size: .55em; color: var(--gold-ink); vertical-align: middle; }
.basmala { text-align: center; font-size: calc(var(--ar-size) * 1.3); padding: 18px 0 6px; }

/* Reader */
.reader-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 24px; padding-bottom: 48px; }
.surah-side { flex: 1 1 220px; max-width: 250px; padding: 12px; position: sticky; top: 84px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; gap: 6px; }
.surah-side input { width: 100%; }
.side-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); font-size: 14px; text-decoration: none !important; }
.side-link[aria-current="page"] { background: var(--green-soft); font-weight: 700; }
.side-n { width: 26px; color: var(--muted); font-weight: 600; } .side-ar { font-family: var(--font-arabic); color: var(--green); }
.reader-main { flex: 999 1 520px; min-width: 0; }
.surah-banner { background: var(--banner); color: #fff; border-radius: 16px; padding: 26px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.surah-banner h1 { font-size: 26px; font-weight: 800; } .surah-banner p { color: #D5E7E1; font-size: 14px; }
.banner-ar { font-family: var(--font-arabic); font-size: 32px; color: #E8CF97 !important; }
.reader-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.goto { display: flex; gap: 8px; align-items: center; font-size: 14px; } .goto input { width: 120px; }
.ayah-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ayah { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; gap: 16px; scroll-margin-top: 90px; }
.ayah:target { background: var(--warn-bg); }
.ayah-side { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.ayah-num { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; text-decoration: none !important; }
.ayah-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tr { display: flex; flex-direction: column; gap: 2px; }
.tr-label { font-size: 12px; font-weight: 600; color: var(--gold-ink); font-family: var(--font-ui); }
.tr-text { font-size: var(--tr-size); line-height: 1.7; color: var(--ink-2); }
.tr[lang="ur"] .tr-text { font-family: var(--font-urdu-fallback); line-height: 2.3; }
.tr[dir="rtl"] { text-align: right; }
[data-justify="1"] .tr-text { text-align: justify; }
[data-icon-on] { display: none; }
[data-bookmark][aria-pressed="true"] .bm { fill: var(--gold); stroke: var(--gold); }
/* Reading layout: continuous Arabic */
[data-layout="flow"] .ayah-list { padding: 24px; }
[data-layout="flow"] .ayah { display: inline; padding: 0; border: 0; }
[data-layout="flow"] .ayah-side, [data-layout="flow"] .tr { display: none; }
[data-layout="flow"] .ayah-body, [data-layout="flow"] .quran-text { display: inline; }
[data-layout="flow"] .ayah-list { direction: rtl; text-align: justify; }
.pager { display: flex; justify-content: space-between; gap: 12px; }
.settings { flex: 1 1 320px; max-width: 360px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 0; }
.settings form { display: flex; flex-direction: column; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.tabs button { min-height: 50px; border: 0; border-bottom: 3px solid transparent; background: transparent; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
.tab-panel { padding: 18px; }
.preview { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.preview .quran-text { font-size: var(--ar-size); }
.row-between select { max-width: 62%; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 20px; cursor: pointer; }
.stepper output { min-width: 24px; text-align: center; font-weight: 700; }
[aria-busy="true"] { opacity: .5; transition: opacity .2s; }
@media (max-width: 1100px) { .surah-side { display: none; } }
@media (max-width: 760px) {
  .settings { position: fixed; inset: auto 0 0 0; max-width: none; max-height: 75vh; border-radius: 18px 18px 0 0; z-index: 30; box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
  .ayah { padding: 18px 14px; gap: 10px; }
}

/* Search */
.search-big { display: flex; gap: 10px; } .search-big input { flex: 1; min-width: 0; min-height: 50px; font-size: 17px; }
.hit { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none !important; padding: 16px 20px; }
.hit:hover { border-color: var(--green); }
.hit-ref { font-size: 13px; font-weight: 600; color: var(--gold-ink); }
.hit-ar { font-size: 26px; line-height: 2; } .hit-tr[lang="ur"] { font-family: var(--font-urdu-fallback); line-height: 2.2; }
.ref-hit { display: block; font-weight: 700; font-size: 17px; }

/* Prayer times */
.pt-tools { display: flex; gap: 10px; flex-wrap: wrap; } .pt-tools select { min-width: 240px; }
.pt-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.grow-main { flex: 999 1 600px; min-width: 0; } .side-col { flex: 1 1 280px; max-width: 360px; }
.pt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .pt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pt-card.is-sun { background: var(--surface-2); }
.pt-card.is-next { background: var(--green); border-color: var(--green); color: var(--on-green); }
.pt-ar { font-family: var(--font-arabic); font-size: 18px; } .pt-name { font-weight: 600; font-size: 15px; } .pt-time { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.pt-table, .table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.pt-table th, .pt-table td, .table th, .table td { padding: 10px 14px; text-align: start; border-top: 1px solid var(--line); vertical-align: top; }
.pt-table thead th, .table thead th { background: var(--surface-2); font-weight: 600; border-top: 0; }
.pt-table tr.is-today { background: var(--green-soft); font-weight: 700; }
.compass { width: 160px; height: 160px; margin: 0 auto; border-radius: 50%; border: 2px solid var(--line); position: relative; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.compass-n { position: absolute; top: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.arrow-a { fill: var(--green); } .arrow-b { fill: var(--line-2); }
.qibla-deg { text-align: center; font-size: 22px; font-weight: 700; }

/* Footer */
.site-footer { background: #13201C; color: #C9D3CF; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-top: 44px; padding-bottom: 24px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-grid a { color: #C9D3CF; }
.brand-foot { color: #fff; font-weight: 800; font-size: 20px; margin-bottom: 6px; } .foot-h { color: #fff; font-weight: 600; }
.foot-note { border-top: 1px solid #2B3833; padding-top: 16px; padding-bottom: 24px; font-size: 13px; color: #9AA8A3; } .foot-note a { color: #E8CF97; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Admin */
.admin-shell { display: flex; min-height: 100vh; flex-wrap: wrap; }
.admin-nav { flex: 0 0 240px; background: #13201C; color: #C9D3CF; padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; }
.admin-nav .brand { color: #fff; flex-direction: column; align-items: flex-start; gap: 0; } .admin-nav .brand small { color: #E8CF97; font-size: 12px; font-weight: 600; }
.admin-nav nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-nav nav a { color: #C9D3CF; padding: 10px 12px; border-radius: 9px; }
.admin-nav nav a[aria-current="page"] { background: #22312C; color: #fff; font-weight: 600; }
.admin-user { font-size: 14px; } .admin-user .btn-outline { border-color: #4B5D56; color: #fff; margin-top: 8px; }
.admin-main { flex: 1 1 600px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-nav { flex-basis: 100%; } }
.stat { display: flex; flex-direction: column; gap: 4px; } .stat-n { font-size: 28px; font-weight: 800; }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.two-col > * + * { margin-top: 0; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.narrow-form { max-width: 720px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; } .actions form { display: inline-flex; gap: 6px; }
.pre { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); padding: 8px; border-radius: 8px; }
.font-row { border-top: 1px solid var(--line); padding-top: 12px; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; }
.secret { font-size: 16px; letter-spacing: 1px; }

@media print {
  .site-header, .site-footer, .hero, .side-col, .surah-side, .settings, .reader-bar, .pager, .ayah-side, [data-print] { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .ayah-list { border: 0; }
}
