
/* Layout: a quiet oasis at dusk — one centred reading column, a ripple-rings hero (the "circles of light"), numbered series list, then the article view. */
:root {
  --bg: #EEF3F1;
  --surface: #F8FBFA;
  --fg: #172A2D;
  --muted: #536A6C;
  --line: #CCDAD7;
  --accent: #26655E;
  --gold: #9A7428;
  --gold-soft: rgba(154,116,40,.28);
  --display: "Aref Ruqaa", "Noto Naskh Arabic", "Times New Roman", serif;
  --body: "Noto Naskh Arabic", "Segoe UI", Tahoma, serif;
  --size: 1.15rem;
  --leading: 1.95;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E191B; --surface: #142427; --fg: #E4ECEA; --muted: #9AB0AE;
    --line: #26393C; --accent: #7EC3B8; --gold: #D6B46A; --gold-soft: rgba(214,180,106,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E191B; --surface: #142427; --fg: #E4ECEA; --muted: #9AB0AE;
  --line: #26393C; --accent: #7EC3B8; --gold: #D6B46A; --gold-soft: rgba(214,180,106,.25);
  color-scheme: dark;
}
:root[lang="en"] {
  --display: "Marcellus", Georgia, serif;
  --body: "Literata", Georgia, "Times New Roman", serif;
  --size: 1.08rem;
  --leading: 1.72;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: var(--size);
  line-height: var(--leading);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 46rem; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--fg); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name { font-family: var(--display); font-size: 1.35rem; line-height: 1.2; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.lang button {
  font: inherit; font-size: .85rem; line-height: 1; border: 0; background: none; color: var(--muted);
  padding: .45rem .8rem; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 3.5rem 2.5rem; text-align: center; }
.rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rings span {
  position: absolute; border: 1px solid var(--gold-soft); border-radius: 50%;
  width: var(--d); aspect-ratio: 1; max-width: none;
  animation: breathe 9s ease-in-out infinite; animation-delay: var(--t);
}
.rings span:first-child { background: radial-gradient(circle, var(--gold-soft), transparent 70%); border-color: var(--gold); }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .rings span { animation: none; } }
.hero-inner { position: relative; display: grid; gap: .9rem; justify-items: center; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
:root[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1.25; margin: 0; text-wrap: balance; }
.hero p { margin: 0; max-width: 34rem; color: var(--muted); text-wrap: balance; }

/* Series list */
.series { padding-block: 1rem 4rem; }
.series h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0 0 1.2rem; }
.list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.item a {
  display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start;
  padding-block: 1.4rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.item a:hover .item-title { color: var(--accent); }
.num {
  font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--gold);
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border: 1px solid var(--gold-soft); border-radius: 50%; font-variant-numeric: tabular-nums;
}
.item-body { min-width: 0; display: grid; gap: .35rem; }
.item-title { font-family: var(--display); font-size: 1.35rem; line-height: 1.45; transition: color .2s; text-wrap: balance; }
.item-desc { color: var(--muted); font-size: .95em; line-height: 1.7; }
.item-meta { font-size: .8rem; color: var(--gold); }

/* Article */
.article { padding-block: 2rem 4rem; }
.back { font-size: .9rem; text-decoration: none; display: inline-flex; gap: .4rem; }
.art-head { display: grid; gap: .8rem; padding-block: 1.6rem 1.8rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.art-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 5.4vw, 2.7rem); line-height: 1.35; margin: 0; text-wrap: balance; }
.lead { color: var(--muted); font-size: 1.05em; margin: 0; }
.meta { font-size: .85rem; color: var(--gold); display: flex; gap: 1rem; flex-wrap: wrap; }
.prose { max-width: 38rem; }
.prose p { margin: 0 0 1.2em; }
.prose h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.55rem; line-height: 1.4;
  margin: 2.2em 0 .7em; display: flex; align-items: center; gap: .6rem; text-wrap: balance;
}
.prose h2::before { content: ""; width: .55rem; height: .55rem; flex: none; transform: rotate(45deg); background: var(--gold); }
.prose h3 { font-size: 1.1em; margin: 1.6em 0 .4em; color: var(--accent); }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; display: grid; gap: .5em; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--accent); font-weight: 600; }
.prose blockquote {
  margin: 2em 0; padding: .4em 1.2em; border-inline-start: 2px solid var(--gold);
  font-family: var(--display); font-size: 1.3em; line-height: 1.6; color: var(--fg);
}
.ask {
  margin-top: 2.5rem; padding: 1.4rem 1.5rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; display: grid; gap: .4rem;
}
.ask-label { font-size: .8rem; color: var(--gold); }
.ask p { margin: 0; font-family: var(--display); font-size: 1.2rem; line-height: 1.6; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.pager a {
  display: grid; gap: .2rem; text-decoration: none; color: var(--fg);
  padding: 1rem 0; border-top: 1px solid var(--line); min-width: 0;
}
.pager a.next { text-align: end; }
.pager small { color: var(--muted); font-size: .8rem; }
.pager span { font-family: var(--display); font-size: 1.05rem; line-height: 1.5; }
.pager a:hover span { color: var(--accent); }

footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 1.8rem 2.4rem; color: var(--muted); font-size: .88rem; display: grid; gap: .3rem; }
footer strong { font-family: var(--display); font-weight: 400; color: var(--fg); font-size: 1.1rem; }

@media (max-width: 520px) {
  .brand-name { font-size: 1.15rem; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { text-align: start; }
}

.nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lang-link { font-size: .85rem; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; }
.lang-link:hover { border-color: var(--accent); }
.page { padding-block: 2.5rem 4rem; }
.page h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 1.5rem; }
.email { font-family: var(--display); font-size: 1.3rem; direction: ltr; text-align: start; user-select: all; }
.recs { margin-top: 2rem; display: grid; gap: .5rem; }
.recs h2 { margin-top: 0; }
.recs small { color: var(--muted); }
.news { margin-top: 2rem; padding: 1.4rem 1.5rem; border: 1px solid var(--gold-soft); border-radius: 14px; display: grid; gap: .6rem; }
.news strong { font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.news form { display: flex; gap: .5rem; flex-wrap: wrap; }
.news input { flex: 1 1 14rem; min-width: 0; font: inherit; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); }
.news button { font: inherit; padding: .6rem 1.2rem; border: 0; border-radius: 10px; background: var(--accent); color: var(--bg); cursor: pointer; }
.foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
