/* ==========================================================================
   سؤال — «أزرق ملكي + فوشيا» design system
   Bright white canvas, royal-navy structure, one vivid fuchsia accent.
   Light-only (no dark mode, by owner request).
   Type: Alexandria (display) + IBM Plex Sans Arabic (text), self-hosted.
   Strict-CSP safe: no inline styles, no inline scripts, fonts from /fonts.
   ========================================================================== */

/* ------------------------------- @font-face ------------------------------ */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/alexandria-700-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/alexandria-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/alexandria-800-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/alexandria-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-arabic-400-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-arabic-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-arabic-500-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-arabic-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-arabic-700-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-arabic-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------- tokens -------------------------------- */
:root {
  --bg: #ffffff;
  --surface: #f7f9fe;
  --surface-2: #eef2fb;
  --ink: #101f4e;
  --ink-2: #3c4c7c;
  --muted: #63719d;
  --line: #e0e6f4;
  --line-strong: #c4cfe9;
  --accent: #e4177e;
  --accent-strong: #c11068;
  --accent-soft: #fce9f3;
  --accent-ink: #a80e60;
  --paper-on-ink: #ffffff;
  --ok: #0e7a52;
  --ok-soft: #e2f5ec;
  --ok-border: #b5dfcd;
  --err: #c22045;
  --err-soft: #fdecf0;
  --err-border: #f3c3cf;
  --shadow-sm: 0 1px 2px rgba(16, 31, 78, 0.06), 0 3px 10px rgba(16, 31, 78, 0.07);
  --shadow-md: 0 2px 6px rgba(16, 31, 78, 0.09), 0 14px 36px rgba(16, 31, 78, 0.14);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --font-display: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color-scheme: light;
}

/* ---------------------------------- base --------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.55; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
textarea, input, select, button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 680px; margin-inline: auto; padding-inline: 18px; }
main.wrap { padding-block: 22px 72px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: 60;
  background: var(--ink); color: var(--paper-on-ink);
  padding: 8px 14px; border-radius: 10px; transition: top 0.15s ease;
}
.skip-link:focus { top: 10px; color: var(--paper-on-ink); }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.hint { color: var(--muted); font-size: 0.82rem; margin-top: 8px; }
.counter { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

/* -------------------------------- buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
  line-height: 1.4; padding: 0.6rem 1.15rem;
  border-radius: 12px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--ink); color: var(--paper-on-ink); border-color: var(--ink); }
.btn-primary:hover { background: #0a1740; border-color: #0a1740; color: var(--paper-on-ink); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--err-soft); border-color: var(--err-border); color: var(--err); }
.btn-small { font-size: 0.84rem; padding: 0.42rem 0.85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-google { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }

/* --------------------------------- topbar -------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-row { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--ink); color: var(--accent);
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; letter-spacing: 0; }
.main-nav { display: flex; align-items: center; margin-inline-start: auto; }
.main-nav-tabs { display: none; gap: 4px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.48rem 0.9rem; border-radius: 11px;
  color: var(--muted); font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
}
.tab:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.tab[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.tab[aria-current="page"] svg { color: var(--accent); }

/* Signed-in account chip (owner-only identity reminder) */
.acct-chip {
  display: inline-flex; align-items: center;
  max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0.3rem 0.65rem; border: 1px dashed var(--line-strong); border-radius: 999px;
  color: var(--muted); font-size: 0.78rem;
}
@media (max-width: 640px) { .acct-chip { display: none; } }

/* أسئلتي: which-account strip */
.acct-strip {
  margin: 0 0 14px; padding: 0.62rem 0.9rem;
  border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: 12px; background: var(--surface-2);
  color: var(--ink-2); font-size: 0.88rem; line-height: 1.7;
}
.acct-strip strong { color: var(--ink); font-weight: 600; }

/* ------------------------------ mobile tabbar ---------------------------- */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; justify-content: space-around; align-items: end;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar .tab {
  flex-direction: column; gap: 3px; font-size: 0.72rem;
  padding: 0.3rem 0.9rem; position: relative;
}
.tabbar .tab svg { width: 23px; height: 23px; }
.tabbar .tab[aria-current="page"]::after {
  content: ""; position: absolute; bottom: 2px; inset-inline-start: 50%;
  transform: translateX(50%); width: 16px; height: 3px; border-radius: 2px;
  background: var(--accent);
}
.tabbar-ask { display: inline-flex; }
.tabbar-ask-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; margin-top: -26px;
  border-radius: 18px; background: var(--ink); color: var(--accent);
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease;
}
.tabbar-ask:active .tabbar-ask-btn { transform: scale(0.94); }
@media (min-width: 900px) {
  .tabbar { display: none; }
  .main-nav-tabs { display: flex; }
  main.wrap { padding-block: 30px 80px; }
}

/* ---------------------------- login page hero ---------------------------- */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding-block: 40px 26px;
}
.hero-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; border-radius: 22px;
  background: var(--ink); color: var(--accent);
  font-family: var(--font-display); font-weight: 800; font-size: 2.3rem;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  margin-top: 20px; font-weight: 800;
  font-size: clamp(2.3rem, 7vw, 3.3rem); letter-spacing: 0;
}
.tagline { margin-top: 6px; font-size: 1.16rem; color: var(--ink-2); font-weight: 500; }
.hero .muted { margin-top: 8px; max-width: 30rem; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.22rem 0.85rem; color: var(--ink-2);
  font-size: 0.82rem; font-weight: 500; background: var(--surface);
}
.auth-actions { display: flex; flex-direction: column; gap: 10px; width: min(330px, 100%); margin-top: 26px; }
.auth-actions .flash { width: 100%; }
.dev-login { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.hero-privacy { margin-top: 22px; max-width: 30rem; }
.intro { max-width: 40rem; margin-inline: auto; padding-block: 18px 26px; border-top: 1px solid var(--line); }
.intro h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.intro p { color: var(--ink-2); margin-bottom: 12px; font-size: 0.98rem; }

/* -------------------------------- ask card ------------------------------- */
.ask-card {
  position: relative;
  background: linear-gradient(155deg, #1b2d68 0%, #101f4e 78%);
  border: 1px solid #2c3f80;
  border-radius: var(--radius-lg);
  color: var(--paper-on-ink);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-md);
}
.ask-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.ask-title { font-size: 1.42rem; font-weight: 800; color: var(--paper-on-ink); }
.ask-quota { font-size: 0.88rem; display: flex; align-items: baseline; gap: 8px; color: #c7d2f0; }
.ask-quota::before { content: "●"; font-size: 0.6rem; transform: translateY(-2px); }
.ask-quota-ok { color: #a8ecc9; }
.ask-quota-ok::before { color: #4ade80; }
.ask-quota-warn { color: #f9c1e0; }
.ask-quota-warn::before { color: var(--accent); }
.ask-quota-empty { color: #ffb3c8; }
.ask-quota-empty::before { color: #ff7da5; }
.ask-form textarea {
  width: 100%; resize: vertical; min-height: 92px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--surface); color: var(--ink);
  padding: 12px 14px; line-height: 1.8; font-size: 1rem;
  transition: border-color 0.15s ease;
}
.ask-form textarea:focus { outline: none; border-color: var(--accent); }
.ask-form .hint { color: #9fadd6; }
.ask-form .counter { color: #9fadd6; }
.ask-form .form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.ask-form .btn-primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.ask-form .btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #ffffff; }

/* ------------------------------ referral card ---------------------------- */
.ref-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.ref-head { display: flex; flex-direction: column; gap: 2px; }
.ref-title { font-size: 1.12rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.ref-title::after {
  content: "+" attr(data-reward);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 24px; padding: 0 8px;
  border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-size: 0.82rem;
}
.ref-sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.ref-sub strong { color: var(--accent); font-weight: 700; }
.ref-row { display: flex; gap: 8px; margin-top: 14px; }
.ref-link {
  flex: 1; min-width: 0;
  direction: ltr; text-align: left;
  font-family: var(--font-body); font-size: 0.84rem;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
}
.ref-link:focus { outline: none; border-color: var(--accent); }
.ref-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ref-share-wa { background: #e7f6ec; border-color: #bfe0cc; color: #176e44; }
.ref-share-wa:hover { background: #d9f0e1; border-color: #a5d2b4; }
.ref-share-x { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.ref-stats { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.ref-stats strong { color: var(--ink); font-weight: 700; }

/* ------------------------------- page head ------------------------------- */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 1.55rem; font-weight: 800; }
.page-sub { color: var(--muted); font-size: 0.93rem; margin-top: 2px; }
.list-title { font-size: 1.2rem; font-weight: 800; margin-block: 26px 12px; }

/* ------------------------------ question list ---------------------------- */
.question-list { display: flex; flex-direction: column; gap: 10px; }
.q-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.q-card:hover {
  text-decoration: none; color: var(--ink);
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.q-card:active { transform: translateY(0); }
.q-text { font-size: 1.06rem; font-weight: 500; line-height: 1.85; color: var(--ink); }
.q-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.q-time { color: var(--muted); font-size: 0.82rem; margin-inline-start: auto; }
.pill {
  display: inline-block; background: var(--surface-2); color: var(--ink-2);
  font-size: 0.78rem; font-weight: 700; font-family: var(--font-display);
  border-radius: 999px; padding: 0.08rem 0.65rem; border: 1px solid var(--line);
}
.pill-me { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-border); }
.pill-mine { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent); }
.more { text-align: center; margin-top: 18px; }

.empty-state {
  text-align: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 38px 20px;
  background: transparent;
}
.empty-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink-2); }
.empty-state .muted { margin-top: 6px; font-size: 0.92rem; }

/* --------------------------------- flash --------------------------------- */
.flash {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  padding: 11px 15px;
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.flash-ok { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok); }
.flash-err { background: var(--err-soft); border-color: var(--err-border); color: var(--err); }

/* ----------------------------- question detail --------------------------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.back:hover { color: var(--accent); }
.q-hero {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.q-hero-badge {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-family: var(--font-display); font-weight: 700; font-size: 0.78rem;
  border-radius: 999px; padding: 0.06rem 0.7rem;
}
.q-hero-text { font-size: 1.3rem; font-weight: 700; margin-top: 10px; line-height: 1.75; }
.q-hero-meta { color: var(--muted); font-size: 0.86rem; margin-top: 8px; }
.q-owner-delete { margin-top: 14px; }
.answers-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.12rem; font-weight: 800; margin-block: 22px 12px;
}
.answers-count {
  color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid var(--accent);
  font-size: 0.82rem; border-radius: 999px; padding: 0.02rem 0.6rem;
}
.answer-list { display: flex; flex-direction: column; gap: 10px; }
.a-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 17px;
}
.a-text { font-size: 1rem; line-height: 1.9; color: var(--ink); }
.a-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.a-time { color: var(--muted); font-size: 0.8rem; }
.answered-note {
  margin-top: 16px;
  background: var(--ok-soft); border: 1px solid var(--ok-border); color: var(--ok);
  border-radius: var(--radius-sm); padding: 12px 15px; font-size: 0.94rem;
}
.a-compose { margin-top: 16px; display: flex; flex-direction: column; }
.a-compose textarea {
  width: 100%; resize: vertical; min-height: 88px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  padding: 12px 14px; line-height: 1.8;
}
.a-compose textarea:focus { outline: none; border-color: var(--accent); }
.a-compose .form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.a-compose .btn-primary { background: var(--ink); color: var(--paper-on-ink); border-color: var(--ink); }

/* --------------------------- floating sheet ------------------------------ */
.q-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 18, 48, 0.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.q-sheet {
  position: fixed; z-index: 51;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform 0.24s ease, opacity 0.2s ease;
}
/* mobile: bottom sheet */
.q-sheet {
  inset-inline: 0; bottom: 0;
  max-height: 88dvh; height: auto; min-height: 40dvh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: none;
  transform: translateY(105%); opacity: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.q-overlay.is-open { opacity: 1; pointer-events: auto; }
.q-sheet.is-open { transform: translateY(0); opacity: 1; }
.q-sheet-grip {
  display: block; width: 44px; height: 4.5px; border-radius: 3px;
  background: var(--line-strong);
  margin: 10px auto 2px; flex: none;
}
.q-sheet-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 18px 10px 18px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.q-sheet-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--ink-2); }
.q-sheet-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.q-sheet-close:hover { background: var(--surface-2); color: var(--ink); }
.q-sheet-body { overflow-y: auto; padding: 16px 18px 26px; -webkit-overflow-scrolling: touch; }
.q-sheet-loading { text-align: center; color: var(--muted); padding-block: 2.6rem; }
@media (min-width: 900px) {
  .q-sheet {
    inset-inline: auto; top: 50%; bottom: auto;
    left: 50%; transform: translate(-50%, -46%) scale(0.98);
    width: min(600px, 92vw); max-height: 84vh;
    border-radius: var(--radius-lg); border-bottom: 1px solid var(--line);
    padding-bottom: 0;
    box-shadow: var(--shadow-md);
  }
  .q-sheet.is-open { transform: translate(-50%, -50%) scale(1); }
  .q-sheet-grip { display: none; }
}

/* --------------------------------- forms --------------------------------- */
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inline-form { display: inline-flex; }
label { display: block; font-size: 0.92rem; font-weight: 500; color: var(--ink-2); }
label select, label input[type="text"], label input[type="email"] {
  display: block; width: 100%; margin-top: 6px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); padding: 0.55rem 0.8rem;
}
.checkbox { display: flex; align-items: center; gap: 8px; }
.hp-field { position: absolute; inset-inline-start: -9999px; opacity: 0; }

/* --------------------------------- report -------------------------------- */
.report { margin-inline-start: auto; }
.report summary {
  cursor: pointer; list-style: none; color: var(--muted); font-size: 0.8rem;
  display: inline-flex; align-items: center; gap: 4px;
}
.report summary::-webkit-details-marker { display: none; }
.report summary:hover { color: var(--err); }
.report-form {
  margin-top: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); display: flex; flex-direction: column; gap: 10px;
}
.report-form label { font-size: 0.84rem; }

/* --------------------------------- footer -------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding-block: 26px 90px; }
@media (min-width: 900px) { .site-footer { padding-bottom: 34px; } }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9rem; }
.footer-row a { color: var(--muted); }
.footer-row a:hover { color: var(--accent); }
.footer-copy { color: var(--muted); font-size: 0.84rem; margin-top: 14px; }

/* ------------------------------ static pages ------------------------------ */
.policy { max-width: 46rem; }
.policy h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 14px; }
.policy h2 { font-size: 1.14rem; font-weight: 700; margin-block: 22px 8px; }
.policy p, .policy li { color: var(--ink-2); font-size: 0.97rem; margin-bottom: 8px; }
.policy ul { padding-inline-start: 1.3rem; }
.intro h2 { font-weight: 700; }

.general-list { display: flex; flex-direction: column; gap: 10px; }
.general-list .q-card { display: block; }
.report-list, .audit-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.report-list .a-card, .audit-list .a-card { padding: 12px 15px; font-size: 0.92rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.ad-slot { margin-block: 14px; }
.infeed-item { margin-block: 6px; }

/* ------------------------------ motion prefs ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ===================== v5: public home + explore + notifs ================= */

/* Hero (السؤال هو البطل) */
.hero {
  text-align: center; padding: 34px 12px 26px;
  border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 6.4vw, 2.6rem); line-height: 1.35; color: var(--ink);
}
.hero-sub { color: var(--muted); margin: 10px 0 20px; font-size: 0.98rem; }
.btn-hero { font-size: 1.02rem; padding: 0.75rem 1.6rem; border-radius: 999px; }

/* Category pill on cards + heart pill */
.q-cat {
  color: var(--muted); font-size: 0.8rem; font-weight: 600;
  margin-bottom: 6px; letter-spacing: 0.01em;
}
.pill-heart { font-variant-numeric: tabular-nums; }

/* Category picker in the composer */
.cat-pick { border: none; padding: 0; margin: 12px 0 4px; }
.cat-pick-legend { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.cat-pick-row { display: flex; flex-wrap: wrap; gap: 7px; }
.cat-chip { position: relative; display: inline-flex; }
.cat-chip input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.cat-chip span {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.34rem 0.72rem; font-size: 0.84rem; color: var(--ink-2);
  background: var(--surface); cursor: pointer;
}
.cat-chip input:checked + span {
  background: var(--ink); color: var(--paper-on-ink); border-color: var(--ink);
}
.cat-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Explore grid */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-block: 6px 18px;
}
.cat-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); padding: 14px 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); text-decoration: none; }
.cat-emoji { font-size: 1.45rem; line-height: 1; }
.cat-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1rem; }
.cat-count { color: var(--muted); font-size: 0.8rem; }
.page-eyebrow { margin-bottom: 4px; }
.page-eyebrow a { color: var(--muted); font-size: 0.85rem; }
.page-eyebrow a:hover { color: var(--accent); }

/* Notifications */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); padding: 13px 16px;
}
a.notif-card:hover { text-decoration: none; box-shadow: var(--shadow-sm); }
.notif-card.is-dead { opacity: 0.55; }
.notif-line { font-weight: 600; color: var(--ink); font-size: 0.93rem; }
.notif-line.is-unread { color: var(--accent); }
.notif-line.is-unread::before { content: '●'; font-size: 0.6rem; margin-inline-end: 6px; vertical-align: 2px; }
.notif-q { color: var(--ink-2); font-size: 0.9rem; margin-top: 3px; }
.notif-time { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }

/* Bell badge */
.tab-bell, .tabbar-bell-wrap { position: relative; display: inline-flex; }
.bell-badge {
  position: absolute; top: -4px; inset-inline-end: -7px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: #ffffff;
  font-size: 0.66rem; font-weight: 700; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Heart toggle button */
.react-btn { border: 1px solid var(--line-strong); background: var(--surface); }
.react-btn.is-on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.react-form { margin: 10px 0 4px; }
.q-hero-cat { color: var(--muted); font-size: 0.82rem; margin-bottom: 8px; }
.q-hero-badge {
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px;
  font-size: 0.74rem; font-weight: 600; color: var(--ink-2);
}
.q-hero-hearts { font-variant-numeric: tabular-nums; }

/* Guest CTA */
.guest-cta {
  margin-top: 16px; padding: 16px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.guest-cta .btn { margin-top: 10px; }

/* ======================================================================
   Task 10 — simplified shell: profile icon + red dot, ONE (+) button,
   guest slide-down login bar, profile page, composer sheet, «ردود جديدة»
   ====================================================================== */

/* ---------------- guest slide-down login banner ---------------- */
.loginbar {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg));
  animation: loginbar-down 0.4s ease;
}
.loginbar-row { display: flex; align-items: center; gap: 14px; padding-block: 10px; }
.loginbar-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.loginbar-text strong { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.loginbar-text span { color: var(--ink-2); font-size: 0.82rem; line-height: 1.6; }
.loginbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.loginbar-close {
  width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-2); font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.loginbar-close:hover { color: var(--ink); }
@keyframes loginbar-down {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .loginbar { animation: none; } }
@media (max-width: 600px) {
  .loginbar-row { flex-wrap: wrap; padding-block: 9px; }
  .loginbar-actions { width: 100%; justify-content: space-between; }
}

/* ---------------- topbar: profile icon + red dot ---------------- */
.top-icon {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  margin-inline-start: auto;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.top-icon:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface-2); }
.red-dot {
  position: absolute; top: 7px; inset-inline-end: 8px;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2.5px var(--surface);
  animation: red-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes red-dot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}
@media (prefers-reduced-motion: reduce) { .red-dot { animation: none; } }
/* Feed button: on the profile page the top slot turns into a pill that
   leads back to أسئلة الناس — icon + short label, same 40px height. */
.top-icon-feed { width: auto; gap: 7px; padding-inline: 12px; }
.top-icon-label {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap; color: var(--ink);
}
@media (max-width: 360px) { .top-icon-label { display: none; } }

/* ---------------- ONE bottom (+) button ---------------- */
.fab {
  position: fixed; z-index: 45;
  bottom: calc(16px + env(safe-area-inset-bottom));
  inset-inline: 0; margin-inline: auto;
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 21px;
  background: var(--accent); color: #ffffff;
  box-shadow: 0 8px 22px rgba(228, 23, 126, 0.38), 0 3px 8px rgba(228, 23, 126, 0.28);
  transition: transform 0.15s ease;
}
.fab:hover { text-decoration: none; }
.fab:active { transform: scale(0.93); }
main.wrap { padding-bottom: 118px; }

/* ---------------- profile page (حسابي) ---------------- */
.profile-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0;
  background: var(--ink); color: var(--accent);
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
}
.profile-id { flex: 1; min-width: 0; }
.profile-title { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; margin: 0; }
.profile-email {
  color: var(--ink-2); font-size: 0.88rem; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-note { color: var(--muted); font-size: 0.76rem; margin-top: 3px; }

.balance-card {
  margin-top: 14px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface);
}
.balance-row { display: flex; gap: 12px; }
.balance-item {
  flex: 1; text-align: center; padding: 10px 8px;
  border: 1px dashed var(--line-strong); border-radius: 12px;
}
.balance-num {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 1.45rem; color: var(--ink); font-variant-numeric: tabular-nums;
}
.balance-label { color: var(--muted); font-size: 0.76rem; }
.reward { margin-top: 14px; }
.reward-line { color: var(--ink-2); font-size: 0.9rem; }
.reward-line strong { color: var(--ink); font-weight: 700; }
.reward-bar {
  height: 8px; margin-top: 7px; border-radius: 999px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.reward-fill {
  display: block; height: 100%; border-radius: 999px;
  background: var(--accent); transition: width 0.3s ease;
}
.reward-hint { color: var(--muted); font-size: 0.75rem; margin-top: 6px; }

/* «ردود جديدة» pill — unread answers on my question */
.pill-new {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  font-weight: 700;
}
.pill-new::before { content: '●'; font-size: 0.55rem; margin-inline-end: 5px; vertical-align: 2px; }

/* ---------------- composer sheet content ---------------- */
.compose { padding-block: 4px 10px; }
.compose-title { font-family: var(--font-display); font-weight: 800; font-size: 1.22rem; margin-bottom: 4px; }
.compose-quota { color: var(--ink-2); font-size: 0.88rem; margin-bottom: 12px; line-height: 1.7; }
.compose-success { text-align: center; padding-block: 20px 14px; }
/* Success mark: pure-CSS check — no emoji/glyphs in UI (owner request 2026-09-15) */
.success-mark {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 999px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.success-check {
  display: block;
  width: 24px; height: 12px;
  border-left: 4px solid var(--accent);
  border-bottom: 4px solid var(--accent);
  transform: rotate(-45deg);
  margin-top: -3px;
}
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.credit-flash { margin-bottom: 12px; font-weight: 700; }

/* ---------------- مشاركة السؤال (نسخ الرابط) — owner request 2026-09-15 ---------------- */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.6;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.share-btn:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.share-btn:active { transform: translateY(1px); }
.share-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.back-btn:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.back-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.q-hero-actions { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .share-btn, .back-btn { transition: none; }
}
