/* Static SEO pages (quran/, reciters/, /{lang}/) - lightweight, no JavaScript.
   Source: no upload/seo-build/seo.css (copied to assets/seo.css by build_seo.py) */
@font-face {
  font-family: 'hafs';
  src: url('/fonts/original-hafs.woff') format('woff');
  font-display: swap;
}

:root {
  --bg: #061024;
  --panel: rgba(13, 31, 66, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8eefc;
  --muted: #9fb3d9;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --paper: #ffffff;
  --ink: #17274a;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg) linear-gradient(180deg, #06122e 0%, #091d47 45%, #040d21 100%) fixed;
  color: var(--text);
  font: 16px/1.7 'Segoe UI', Tahoma, 'Noto Sans', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(6, 16, 36, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand img { flex: none; border-radius: 8px; }
.brand span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand b { font-size: 14px; }
.brand small { font-size: 11px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin-inline-start: auto; font-size: 14px; font-weight: 600; }
.nav a { color: var(--muted); }
.nav a:hover { color: #fff; }

.langs { position: relative; font-size: 13px; }
.langs summary {
  list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); white-space: nowrap;
}
.langs summary::-webkit-details-marker { display: none; }
.langs div {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20;
  display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 2px;
  padding: 8px; border-radius: 14px; background: #0b1b3d; border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); max-height: 70vh; overflow-y: auto;
}
.langs div a { color: var(--text); padding: 6px 10px; border-radius: 8px; }
.langs div a:hover, .langs div a[aria-current] { background: rgba(59, 130, 246, 0.25); }

/* Content */
main { padding-top: 18px; padding-bottom: 40px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; overflow-wrap: anywhere; }
.crumbs span[aria-hidden], .crumbs > span { color: var(--muted); }
h1 { font-size: clamp(24px, 4.5vw, 34px); line-height: 1.3; margin: 6px 0 10px; color: #fff; }
h2 { font-size: clamp(19px, 3.2vw, 24px); line-height: 1.35; margin: 34px 0 14px; color: #fff; }
h2 a { color: #fff; }
.lead { color: var(--muted); max-width: 820px; margin: 0 0 16px; }
.muted { color: var(--muted); font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; }
.chips span {
  font-size: 13px; padding: 3px 10px; border-radius: 999px;
  background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(96, 165, 250, 0.3); color: #cfe0ff;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 12px;
  background: var(--accent); color: #fff !important; font-weight: 700; font-size: 14px;
  border: 1px solid transparent;
}
.btn:hover { background: #2563eb; }
.btn.ghost { background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.nav .btn { padding: 6px 12px; }

/* Surah list */
.surahs, .reciters, .tracks, .reciter-links { list-style: none; margin: 0; padding: 0; }
.surahs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.surahs a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); height: 100%;
}
.surahs a:hover { border-color: rgba(96, 165, 250, 0.55); }
.num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 4px; border-radius: 9px;
  background: rgba(59, 130, 246, 0.22); color: #bfdbfe; font-size: 12px; font-weight: 700;
}
.t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.t b { font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.t small { font-size: 12px; color: var(--muted); }
.ar { font-family: 'hafs', 'Amiri Quran', serif; font-size: 20px; color: #dbe7ff; flex: none; }

/* Reciters */
.reciters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.reciters a {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); height: 100%;
}
.reciters a:hover { border-color: rgba(96, 165, 250, 0.55); }
.reciters img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; background: #0e2a5e; }

.profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile img { width: 128px; height: 128px; border-radius: 22px; object-fit: cover; border: 2px solid var(--line); background: #0e2a5e; }
.profile > div { flex: 1; min-width: 220px; }

.reciter-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.reciter-links li, .tracks li {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
}
.reciter-links li > a:first-child, .tracks li > a:first-child {
  flex: 1; min-width: 0; color: var(--text); display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere;
}
.mp3, .play {
  flex: none; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: #cfe0ff;
}
.mp3:hover, .play:hover { background: var(--accent); color: #fff; }
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }

/* Quran text (same look as the in-app reader) */
.quran {
  background: var(--paper); color: var(--ink); border-radius: 22px;
  padding: 28px clamp(16px, 4vw, 40px); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.mushaf {
  font-family: 'hafs', 'Amiri Quran', 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: clamp(24px, 4.6vw, 34px); line-height: 2.05; text-align: justify; color: var(--ink);
}
.mushaf.center { text-align: center; }
.mushaf b { font-weight: 600; color: #ff3335; }
.mushaf label {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  font: 700 0.5em/1.4 'Segoe UI', Tahoma, sans-serif; color: #0284c7; padding: 0 5px; margin: 0 4px;
  border-radius: 999px; background: rgba(2, 132, 199, 0.08); border: 1px solid rgba(2, 132, 199, 0.25);
}
.mushaf p { margin: 0; }
.mushaf .basmala, .mushaf img { display: block; margin: 0 auto 18px; max-width: min(75%, 400px); height: auto; }

.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; font-weight: 600; }

.hero { padding: 18px 0 4px; }
.notfound { text-align: center; padding-top: 12vh; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--muted); font-size: 14px; text-align: center; }
.foot p { margin: 6px 0; }

@media (max-width: 640px) {
  .nav { margin-inline-start: 0; width: 100%; order: 3; }
  .langs { margin-inline-start: auto; }
  .langs div { grid-template-columns: 1fr 1fr; }
}
