/* ════════════════════════════════════════════════════════════════════════
   Public pages (apps/public, templates/public/): loaded AFTER app.css, and
   never together with Tailwind. Tailwind's reset is not there, so this file
   holds a small reset of its own, the one Tailwind class the app's body uses
   (.antialiased), and the .pub-* classes. Tokens come from app.css :root.
   RTL: logical properties only.
   ════════════════════════════════════════════════════════════════════════ */

/* ── the small reset Tailwind would have given us ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; line-height: 1.7; font-size: 16px; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
strong, b { font-weight: 700; }

/* the reading column: about 44rem on wide screens, one column on phones */
.pub-wrap { max-width: 44rem; margin-inline: auto; padding-inline: 16px; }
.pub-body { padding-block: 22px 8px; }

/* ── top bar (brand, «الكتاب المقدس», «ابدأ الحفظ») ── */
.pub-night { background: var(--night); }
.pub-bar { position: relative; z-index: 1; color: #fff; }
.pub-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; max-width: 44rem; margin-inline: auto; padding: 10px 16px; }
.pub-brand { margin-inline-end: auto; padding-block: 4px; font-family: 'Amiri', 'Noto Naskh Arabic', serif; font-size: 1.4rem; font-weight: 700; line-height: 1.4; color: #F4D47C; }
.pub-bar-link { display: inline-block; padding-block: 8px; font-size: .95rem; font-weight: 600; color: #fff; }
.pub-bar-link:hover { text-decoration: underline; }
.pub-bar :focus-visible, .v-hero :focus-visible, .pub-foot :focus-visible { outline-color: #fff; }

/* ── night header on the index pages (the hills come from partials/hills.html) ── */
.v-hero .v-hills g { display: none; }   /* the sheep stretch into blobs on wide screens (same fix as the coming-soon page) */
.pub-hero-in { position: relative; max-width: 44rem; margin-inline: auto; padding: 14px 16px 66px; }
.pub-h1 { font-family: 'Cairo', 'Amiri', 'Noto Naskh Arabic', serif; font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 700; line-height: 1.45; }
.pub-lead { margin-top: 4px; font-size: 1rem; color: rgba(255, 255, 255, .86); }

/* ── breadcrumbs ── */
.pub-crumbs { padding-block: 12px 0; font-size: .86rem; color: var(--ink-soft); }
.pub-crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.pub-crumbs li + li::before { content: '›'; margin-inline-end: 8px; color: var(--muted); }   /* mirrored to ‹ in RTL */
.pub-crumbs a { color: var(--sky-deep); font-weight: 600; }
.pub-crumbs a:hover { text-decoration: underline; }
.pub-crumbs [aria-current] { color: var(--ink); }

/* ── headings and the book tiles ── */
.pub-section { margin-bottom: 14px; }
.pub-h2 { margin-block: 14px 4px; font-size: 1.35rem; font-weight: 700; line-height: 1.5; color: var(--ink); }
.pub-h3 { margin-block: 18px 8px; font-size: 1rem; font-weight: 700; color: var(--gold-deep); }
.pub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 36rem) { .pub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pub-tile { display: block; height: 100%; padding: 12px 14px; }
.pub-tile strong { display: block; font-size: 1rem; line-height: 1.5; color: var(--ink); }
.pub-tile span { display: block; font-size: .82rem; color: var(--ink-soft); }

/* ── a book's chapters ── */
.pub-chapters { display: grid; gap: 8px; margin-top: 10px; }
.pub-ch { display: block; padding: 12px 16px; }
.pub-ch strong { display: block; color: var(--ink); }
.pub-ch span { display: block; font-size: .95rem; color: var(--ink-soft); }

/* ── the chapter text ── */
.pub-chapter-h1 { margin-block: 8px 14px; font-family: 'Cairo', 'Amiri', 'Noto Naskh Arabic', serif; font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 700; line-height: 1.45; color: var(--ink); }
.pub-verses li { display: flex; align-items: baseline; gap: 10px; padding-block: 3px; scroll-margin-top: 12px; }
.pub-verses li:target { background: var(--gold-soft); border-radius: var(--r-sm); }
.pub-vn { flex: none; min-width: 2.2em; text-align: center; font-size: .9rem; font-weight: 700; color: var(--gold-deep); }
.pub-verses .scripture { font-size: 1.35rem; }

/* ── previous / next ── */
.pub-pager { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 24px 20px; }
.pub-pager .v-btn { flex: 0 1 calc(50% - 5px); width: auto; }
.pub-pager .pub-prev { margin-inline-end: auto; }
.pub-pager .pub-next { margin-inline-start: auto; }

/* ── the call to action under the chapter ── */
.pub-cta { margin-block: 8px 12px; }
.pub-cta-h { font-size: 1.15rem; font-weight: 700; line-height: 1.5; }
.pub-cta p { margin-block: 4px 14px; color: var(--ink-soft); }

/* ── footer ── */
.pub-foot { margin-top: 40px; padding-block: 28px 32px; background: var(--night); color: rgba(255, 255, 255, .86); }
.pub-foot-brand { font-family: 'Amiri', 'Noto Naskh Arabic', serif; font-size: 1.3rem; font-weight: 700; color: #F4D47C; }
.pub-foot-note { font-size: .9rem; }
.pub-foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.pub-foot-links a { display: inline-block; padding-block: 6px; font-weight: 600; color: #fff; text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════════
   SEO batch 2: the landing page («/»), the coming-soon pill, the privacy page
   ════════════════════════════════════════════════════════════════════════ */

/* ── «قريبًا» pill: replaces every «ابدأ الحفظ» button while the launch gate is on (not a link) ── */
.pub-soon { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep);
  border: 1px solid #EEDDB0; font-weight: 700; font-size: .82rem; line-height: 1.5; text-align: center; }
.pub-soon-sm { padding: 4px 12px; font-size: .78rem; }
.pub-soon-lg { padding: 12px 22px; font-size: 1rem; }

/* ── landing hero ── */
.pub-landing-hero { padding-bottom: 80px; }
.pub-h1-lg { font-size: clamp(1.9rem, 7vw, 2.8rem); }
.pub-landing-hero .pub-lead { max-width: 34rem; margin-top: 8px; font-size: 1.05rem; }
.pub-coach { margin-top: 18px; max-width: 30rem; }
.pub-coach .coach-avatar { width: 84px; height: 84px; }
.pub-soon-word { font-family: 'Amiri', 'Noto Naskh Arabic', serif; font-size: 2rem; font-weight: 700; line-height: 1.4; color: var(--gold-deep); }
.pub-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.pub-hero-btn { width: auto; padding-inline: 26px; }
.pub-btn-light { display: inline-flex; align-items: center; padding: 13px 20px; border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .55);
  color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.pub-btn-light:hover { background: rgba(255, 255, 255, .12); }
.pub-hero-login { margin-top: 12px; font-size: .9rem; color: rgba(255, 255, 255, .86); }
.pub-hero-login a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ── landing sections ── */
.pub-sec { margin-block: 30px; }
.pub-sec-lead { margin-block: 2px 14px; color: var(--ink-soft); }
.pub-steps, .pub-who { display: grid; gap: 10px; }
@media (min-width: 36rem) { .pub-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pub-step { text-align: center; }
.pub-step svg { display: block; margin: 0 auto 6px; width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pub-step h3, .pub-who h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.5; color: var(--ink); }
.pub-step p, .pub-who p { margin-top: 2px; font-size: .95rem; color: var(--ink-soft); }
.pub-sample { margin: 0; }
.pub-sample .pub-verses li { padding-block: 4px; }
.pub-ref { margin-top: 10px; font-size: .95rem; font-weight: 700; color: var(--gold-deep); }
.pub-more { margin-top: 14px; }

/* ── questions: plain <details>, no script ── */
.pub-faq { display: grid; gap: 8px; }
.pub-qa summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 16px;
  list-style: none; cursor: pointer; font-weight: 700; line-height: 1.6; color: var(--ink); }
.pub-qa summary::-webkit-details-marker { display: none; }
.pub-qa summary::after { content: '+'; flex: none; font-size: 1.4rem; line-height: 1; color: var(--gold-deep); }
.pub-qa[open] summary::after { content: '\2212'; }
.pub-qa p { padding: 0 16px 14px; color: var(--ink-soft); }

/* ── closing call to action ── */
.pub-closing { margin-block: 34px 8px; padding: 28px 20px; text-align: center; color: #fff; border-radius: var(--r-xl);
  background: radial-gradient(120% 140% at 85% -20%, #31478C 0%, var(--night-2) 38%, var(--night) 75%); }
.pub-closing-h { font-size: 1.35rem; font-weight: 700; line-height: 1.5; }
.pub-closing .pub-closing-verse { margin-top: 10px; font-size: 1.4rem; line-height: 1.9; color: #F4D47C; }
.pub-closing-ref { margin-block: 0 16px; font-size: .9rem; color: rgba(255, 255, 255, .86); }
.pub-closing :focus-visible { outline-color: #fff; }

/* ── the privacy page: running text ── */
.pub-prose p { margin-block: 8px; line-height: 1.95; }
.pub-prose ul { margin-block: 8px; padding-inline-start: 1.4em; list-style: disc; }
.pub-prose li { margin-block: 5px; line-height: 1.9; }
.pub-prose .pub-h2 { margin-top: 6px; }

/* ════════════════════════════════════════════════════════════════════════
   SEO batch 3: topics (/verses/, /verses/<slug>/), the topic chips, the link lines
   ════════════════════════════════════════════════════════════════════════ */

/* ── a text link that is easy to touch (at least 44px high) ── */
.pub-link { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; }
.pub-topics-line { margin-block: 0 6px; color: var(--ink-soft); }

/* ── topic chips: the landing page, the chapter pages, «مواضيع قريبة» ── */
.pub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pub-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-deep); border: 1px solid #EEDDB0; font-weight: 700; font-size: .95rem; line-height: 1.4; }
.pub-chip:hover { background: #F6E9C2; }

/* ── one topic page ── */
.pub-intro { margin-block: 0 10px; font-size: 1.05rem; line-height: 1.95; color: var(--ink-soft); }
.pub-count { margin-block: 0 6px; font-weight: 700; color: var(--gold-deep); }
.pub-topic-list { display: grid; gap: 12px; margin-top: 10px; }
.pub-topic-item { margin: 0; }
.pub-topic-item .pub-q { font-size: 1.4rem; line-height: 2; }
.pub-topic-item .pub-ref { margin-top: 8px; }
.pub-ctx { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; padding-block: 8px; }
@media (min-width: 36rem) { .pub-topic-item .pub-q { font-size: 1.55rem; } }
