/* Raneen public pages — colours and type from lib/core/theme (app_color.dart,
   app_text_styles.dart): light from the app's light theme, dark from its
   dark theme. */
:root {
  --bg: #FFFFFF; --surface: #F4F7F7; --card: #FFFFFF;
  --primary: #0E5E5A; --primary-pressed: #0E4F4C; --on-primary: #FFFFFF;
  --tint: #DDEDEB; --tint-subtle: #F2F7F6; --accent: #F2A93B;
  --ink: #0F2229; --stone: #55686E; --fog: #8A9BA0; --link: #0E5E5A;
  --border: #DCE6E6; --ok: #1E874C; --ok-text: #1E874C;
  --err-text: #DC2626; --err-bg: #FEF2F2;
  --hero: #0E4F4C; --hero-2: #0A3331; --hero-text: #FFFFFF; --hero-muted: rgba(255,255,255,.78);
  --logo-bg: #0E4F4C; --logo-fg: #FFFFFF;
  --wa: #1E874C;
  --shadow: 0 1px 2px rgba(15,34,41,.04), 0 4px 16px rgba(15,34,41,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1D1D; --surface: #132A29; --card: #0C1D1D;
    --primary: #1E7A73; --primary-pressed: #0E5E5A;
    --tint: #173F3C; --tint-subtle: #10302E;
    --ink: #E6F0EE; --stone: #9DB3B0; --fog: #6F8784; --link: #7CC3BB;
    --border: #23413F; --ok-text: #5CC98C;
    --err-text: #F59A93; --err-bg: #341716;
    --hero: #0E4F4C; --hero-2: #0A3331;
    --logo-bg: #FFFFFF; --logo-fg: #0E4F4C;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name { font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; }
a { color: var(--link); text-underline-offset: 3px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg.mark { width: 36px; height: 36px; flex: none; }
.brand svg.word { height: 26px; width: auto; color: var(--ink); }
.nav { display: flex; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px; }
.nav a {
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--stone);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.nav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .nav a[aria-current="page"] { background: #23413F; } }
@media (max-width: 520px) {
  .brand svg.word { display: none; }
  .nav a { padding: 6px 10px; font-size: 13px; }
}

/* ---------- Hero (the app's call-screen teal) ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--hero-text);
  background: radial-gradient(120% 140% at 85% 0%, #14706B 0%, var(--hero) 45%, var(--hero-2) 100%);
  padding: 44px 0 110px;
}
.hero .rings { position: absolute; inset-inline-start: -60px; top: -60px; width: 320px; height: 320px; opacity: .12; color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.1); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(26px, 5.4vw, 38px); line-height: 1.3; font-weight: 700; margin: 0 0 10px; }
.hero p { margin: 0; max-width: 580px; color: var(--hero-muted); font-size: 17px; }

/* ---------- Cards ---------- */
main.wrap { margin-top: -64px; position: relative; padding-bottom: 48px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.grid .card { margin-bottom: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--tint); color: var(--link); display: grid; place-items: center;
}
.icon svg { width: 22px; height: 22px; }
h2 { font-size: 19px; font-weight: 600; margin: 0; line-height: 1.45; }
.tag { font-size: 13px; color: var(--stone); }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--stone); }

ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
ol.steps li { counter-increment: s; position: relative; padding-inline-start: 40px; margin-bottom: 12px; }
ol.steps li::before {
  content: counter(s); position: absolute; inset-inline-start: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  font-weight: 700; font-size: 14px; display: grid; place-items: center; line-height: 1;
}
ul.plain { margin: 0; padding-inline-start: 20px; }
ul.plain li { margin-bottom: 8px; }
ul.plain li::marker { color: var(--link); }
.note {
  background: var(--surface); border-radius: 12px; padding: 12px 14px;
  font-size: 15px; margin-top: 14px;
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  text-decoration: none; font-weight: 600; border-radius: 12px; padding: 10px 18px; font-size: 15px;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-pressed); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-ghost { background: transparent; color: var(--link); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--tint-subtle); }

/* ---------- FAQ ---------- */
details { border-top: 1px solid var(--border); padding: 4px 0; }
details:first-of-type { border-top: 0; }
summary {
  cursor: pointer; list-style: none; font-weight: 600; padding: 10px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--link); font-size: 22px; line-height: 1; flex: none; }
details[open] summary::after { content: "−"; }
details > div { padding: 0 0 12px; color: var(--stone); }

/* ---------- Table ---------- */
.table { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: 0; }
.row.head { background: var(--surface); font-weight: 600; font-size: 13px; color: var(--stone); }
.row small { display: block; color: var(--stone); font-size: 13px; }
.badge { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.badge.del { color: var(--err-text); background: var(--err-bg); }
.badge.keep { color: var(--ok-text); background: var(--tint); }

/* ---------- Policy text ---------- */
.policy h2 { font-size: 18px; margin: 22px 0 8px; }
.policy h2:first-of-type { margin-top: 0; }
.updated { font-size: 14px; color: var(--stone); margin-bottom: 16px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 24px 0 32px; font-size: 14px; color: var(--stone); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer a { color: var(--stone); text-decoration: none; }
footer a:hover { color: var(--link); }
.tagline::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-inline-start: 4px; vertical-align: middle; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Logo (lib/core/shared_widget/brand) ---------- */
.mark .sq { fill: var(--logo-bg); }
.mark .fg { fill: var(--logo-fg); }
.mark .fgs { fill: none; stroke: var(--logo-fg); }
.mark .dot, .word .dot { fill: var(--accent); }
