/* ===================================================================
   MUSLIM · مسلم — chat theme
   Follows Brand Guidelines V1: light palette (Sand ground, White
   surfaces), Teal interactive, Violet borders/mark touches, Gold for
   accent only (<10% of screen), Ink text. Type: Reem Kufi (Arabic
   600/400) + Outfit (Latin 200/300/400) at 16px, 1.7 / 1.9 leading.
   Layout keeps the familiar chat structure the app was built around.
   =================================================================== */
:root {
  /* Brand constants */
  --teal: #0E9488;
  --teal-strong: #0B7C72;
  --teal-bright: #19B7A6;   /* dark-mode legibility */
  --violet: #6547D6;
  --violet-bright: #8F79E8;
  --gold: #C08A2E;
  --gold-bright: #D9A94F;
  --ink: #141B3D;
  --sand: #FAF8F3;
  --mist: #EDF6F4;
  --white: #FFFFFF;

  /* ---- DARK (default) — Ink-based ground, brand accents brightened ---- */
  --bg: #10162F;
  --sidebar: #0C1128;
  --surface: #10162F;
  --bubble: #1C2450;
  --hover: rgba(25, 183, 166, .10);
  --border: rgba(143, 121, 232, .22);
  --border-strong: rgba(143, 121, 232, .42);
  --text: #F1F3FA;
  --text-dim: rgba(241, 243, 250, .70);
  --text-faint: rgba(241, 243, 250, .46);
  --accent: var(--teal-bright);
  --accent-solid: var(--teal);
  --quote-rule: var(--violet-bright);
  --quote-bg: rgba(25, 183, 166, .09);
  --cite: var(--gold-bright);
  --chip-bg: rgba(255, 255, 255, .03);
  --ev-quran-bg: linear-gradient(180deg, rgba(25, 183, 166, .14), rgba(25, 183, 166, .06));
  --ev-quran-rule: var(--teal-bright);
  --ev-hadith-bg: linear-gradient(180deg, rgba(143, 121, 232, .15), rgba(143, 121, 232, .06));
  --ev-hadith-rule: var(--violet-bright);
  --danger: #FF6B63;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);

  --font: "Outfit", "Reem Kufi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Reem Kufi is a display face — brand lockups and the hero line only. */
  --font-ar: "Reem Kufi", "Outfit", sans-serif;
  /* Reading faces: Plex Sans Arabic for prose/UI, Naskh for quoted
     revelation text where tashkeel is dense. */
  --font-ar-ui: "IBM Plex Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", sans-serif;
  --font-ar-text: "Noto Naskh Arabic", "IBM Plex Sans Arabic", "Geeza Pro", serif;
  --radius: 16px;
}

/* ---- LIGHT — the brand's default printed palette ---- */
:root[data-theme="light"] {
  --bg: var(--white);
  --sidebar: var(--sand);
  --surface: var(--white);
  --bubble: var(--mist);
  --hover: rgba(14, 148, 136, .07);
  --border: rgba(101, 71, 214, .16);
  --border-strong: rgba(101, 71, 214, .32);
  --text: var(--ink);
  --text-dim: rgba(20, 27, 61, .64);
  --text-faint: rgba(20, 27, 61, .45);
  --accent: var(--teal);
  --accent-solid: var(--teal);
  --quote-rule: var(--violet);
  --quote-bg: var(--mist);
  --cite: var(--gold);
  --chip-bg: var(--white);
  --ev-quran-bg: linear-gradient(180deg, rgba(14, 148, 136, .10), rgba(14, 148, 136, .04));
  --ev-quran-rule: var(--teal);
  --ev-hadith-bg: linear-gradient(180deg, rgba(101, 71, 214, .09), rgba(101, 71, 214, .03));
  --ev-hadith-rule: var(--violet);
  --danger: #B3261E;
  --shadow: 0 8px 40px rgba(20, 27, 61, .18);
}

/* Logo variant follows the background: brand rule — use the mono white mark
   when contrast on a coloured ground falls under 4.5:1 */
:root img.logo-color { display: none; }
:root img.logo-mono-white { display: block; }
:root img.logo-mono-ink { display: none; }
:root[data-theme="light"] img.logo-color { display: block; }
:root[data-theme="light"] img.logo-mono-white { display: none; }
:root[data-theme="light"] img.logo-mono-ink { display: block; }
/* the topbar mark sits under 44px → always the mono variant */
:root .topbar img.logo-color { display: none; }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { line-height: 1.9; }
a { color: var(--teal); }
::selection { background: rgba(14, 148, 136, .16); }

#app { display: flex; height: 100dvh; }

/* ---------- Sidebar ---------- */
#sidebar {
  width: 264px;
  min-width: 264px;
  background: var(--sidebar);
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 10px;
  transition: margin .25s ease;
}
#sidebar.hidden { margin-inline-start: -264px; }

.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 14px; }
/* Wordmark: mark + مسلم (Reem Kufi 600) + MUSLIM (Outfit 300, tracked) */
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup img { width: 34px; height: 34px; display: block; }
.brand-names { display: flex; flex-direction: column; line-height: 1.15; }
.brand-ar { font-family: var(--font-ar); font-weight: 600; font-size: 18px; color: var(--text); }
.brand-latin {
  font-family: var(--font); font-weight: 300; font-size: 10px;
  letter-spacing: .3em; color: var(--text-faint); text-transform: uppercase;
}
#sidebarClose { display: none; }

.side-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: transparent; border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font); font-size: 14.5px; font-weight: 500;
  padding: 11px 13px; border-radius: 12px;
  cursor: pointer; text-align: start;
}
.side-item:hover { background: var(--hover); border-color: var(--border-strong); }
.new-chat svg { color: var(--accent); }

.side-label {
  font-size: 12px; color: var(--text-faint);
  padding: 20px 12px 6px; font-weight: 500; letter-spacing: .04em;
}

.chat-list { flex: 1; overflow-y: auto; }
.chat-item {
  display: flex; align-items: center;
  padding: 10px 12px; border-radius: 11px;
  font-size: 14.5px; color: var(--text-dim);
  cursor: pointer; white-space: nowrap; overflow: hidden;
}
.chat-item .title { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.chat-item:hover { background: var(--hover); color: var(--text); }
.chat-item.active { background: var(--bubble); color: var(--text); font-weight: 500; }
.chat-item .del { visibility: hidden; color: var(--text-faint); border: 0; background: none; cursor: pointer; font-size: 13px; padding: 2px 4px; }
.chat-item:hover .del { visibility: visible; }
.chat-item .del:hover { color: var(--danger); }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.local-note { font-size: 11.5px; color: var(--text-faint); margin-top: 8px; line-height: 1.7; }
.user-box { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; }

/* ---------- Main ---------- */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--surface); }

.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.topbar .brand-lockup img { width: 28px; height: 28px; } /* <44px → mono mark */
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.theme-btn { border: 1px solid var(--border); }
/* Icon shows the theme you switch TO */
.ico-sun { display: block; }
.ico-moon { display: none; }
:root[data-theme="light"] .ico-sun { display: none; }
:root[data-theme="light"] .ico-moon { display: block; }
.icon-btn {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 16px; cursor: pointer; padding: 7px 9px; border-radius: 9px;
  font-family: var(--font);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.lang-btn { font-size: 13px; border: 1px solid var(--border); font-weight: 500; }

#chatArea { flex: 1; overflow-y: auto; overflow-anchor: none; }

/* ---------- Empty state ---------- */
#main.empty #chatArea { flex: 0 0 0; }
#main.empty .composer-zone {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-bottom: 10vh;
  /* Brand pattern: 150px tile, opacity well under the 45% ceiling */
  background-image: url("/assets/muslim-pattern.svg");
  background-size: 150px 150px;
  background-repeat: repeat;
  background-blend-mode: normal;
}
#main.empty .composer-zone::before {
  content: ""; position: absolute; inset: 0;
  background: var(--surface); opacity: .90; pointer-events: none;
}
/* Dark ground: the tile ships with a Sand backing, so it is inverted for dark
   and kept well under the brand's 45% pattern-opacity ceiling. */
:root[data-theme="dark"] #main.empty .composer-zone { background-image: none; }
:root[data-theme="dark"] #main.empty .composer-zone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("/assets/muslim-pattern.svg");
  background-size: 150px 150px; background-repeat: repeat;
  filter: invert(1) hue-rotate(180deg);
  opacity: .18;
}
.composer-zone { position: relative; padding: 0 20px; }
.composer-zone > * { position: relative; z-index: 1; }

#hero-brand { display: none; text-align: center; margin-bottom: 22px; }
#main.empty #hero-brand { display: block; }
#hero-brand img { width: 96px; height: 96px; margin: 0 auto 14px; } /* full colour ≥96px */
#hero-brand .hero-ar { font-family: var(--font-ar); font-weight: 600; font-size: 27px; color: var(--text); }
#hero-brand .hero-latin {
  font-family: var(--font); font-weight: 300; font-size: 12px;
  letter-spacing: .34em; color: var(--text-faint); text-transform: uppercase; margin-top: 4px;
}
#emptyTitle { display: none; text-align: center; font-size: 22px; font-weight: 400; color: var(--text-dim); margin-bottom: 22px; }
#main.empty #emptyTitle { display: block; }
[dir="rtl"] #emptyTitle { font-family: var(--font-ar); font-weight: 600; color: var(--text); }

#main.empty .chips { display: flex; }
.chips { display: none; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; max-width: 48rem; margin-inline: auto; }
.chip {
  background: var(--chip-bg); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 15px; font-family: var(--font); font-size: 13.5px; cursor: pointer;
}
[dir="rtl"] .chip { font-family: var(--font-ar-ui); }
[dir="rtl"] .chat-item, [dir="rtl"] .side-item, [dir="rtl"] .local-note,
[dir="rtl"] .disclaimer { font-family: var(--font-ar-ui); }
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--hover); }

/* ---------- Messages ---------- */
.messages { width: 100%; max-width: 48rem; margin: 0 auto; padding: 20px 20px 24px; }
.msg { margin-bottom: 4px; }

.msg.user { display: flex; justify-content: flex-end; margin: 24px 0 18px; }
[dir="rtl"] .msg.user { justify-content: flex-start; }
.msg.user .bubble {
  background: var(--bubble);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 11px 20px;
  max-width: 72%;
  font-size: 16px;
  overflow-wrap: break-word; white-space: pre-wrap;
}

.msg.assistant .bubble { font-size: 16px; overflow-wrap: break-word; padding: 2px 0; }
/* Arabic messages read in a text face, not the Kufi display face */
[dir="rtl"] .msg .bubble { font-family: var(--font-ar-ui); font-size: 16.5px; line-height: 2.0; }
[dir="rtl"] .msg .bubble strong, [dir="rtl"] .msg .bubble b { font-weight: 600; }
.msg.assistant .bubble p { margin-bottom: 14px; }
.msg.assistant .bubble p:last-child { margin-bottom: 0; }
.msg.assistant .bubble h1, .msg.assistant .bubble h2,
.msg.assistant .bubble h3, .msg.assistant .bubble h4 {
  margin: 22px 0 10px; font-size: 17px; color: var(--text);
  font-family: var(--font); font-weight: 200;
}
[dir="rtl"] .msg.assistant .bubble h1, [dir="rtl"] .msg.assistant .bubble h2,
[dir="rtl"] .msg.assistant .bubble h3, [dir="rtl"] .msg.assistant .bubble h4 {
  font-family: var(--font-ar-ui); font-weight: 600; font-size: 17.5px; line-height: 1.75;
}
.msg.assistant .bubble ul, .msg.assistant .bubble ol { margin: 4px 0 14px; padding-inline-start: 26px; }
.msg.assistant .bubble ol { list-style-type: decimal; }
.msg.assistant .bubble li { margin-bottom: 6px; padding-inline-start: 4px; }
.msg.assistant .bubble li::marker { color: var(--accent); font-weight: 600; }
.msg.assistant .bubble strong { font-weight: 600; color: var(--text); }
/* Quoted revelation text — violet rule, Mist ground, never gold-heavy */
.msg.assistant .bubble blockquote {
  border-inline-start: 3px solid var(--quote-rule);
  background: var(--quote-bg);
  color: var(--text);
  padding: 12px 18px; margin: 14px 0; border-radius: 12px;
  font-family: var(--font-ar-text); font-size: 18.5px; line-height: 2.25;
}
/* ---------- Evidence cards: verified Quran / hadith quotes ----------
   The quote is the centre of an Islamic answer, so it gets its own surface, a
   naskh face sized for tashkeel, and its verified reference on the card. */
.evidence {
  display: block;
  margin: 18px 0;
  padding: 14px 20px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--ev-quran-rule);
  background: var(--ev-quran-bg);
  overflow-wrap: break-word;
}
.evidence-quran { border-inline-start-color: var(--ev-quran-rule); background: var(--ev-quran-bg); }
.evidence-hadith { border-inline-start-color: var(--ev-hadith-rule); background: var(--ev-hadith-bg); }

.evidence-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px; padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.evidence-label {
  font-family: var(--font-ar-ui); font-size: 12px; font-weight: 600;
  letter-spacing: .02em;
}
.evidence-quran .evidence-label { color: var(--ev-quran-rule); }
.evidence-hadith .evidence-label { color: var(--ev-hadith-rule); }
.evidence-ref {
  margin-inline-start: auto;
  font-family: var(--font-ar-ui); font-size: 12.5px; font-weight: 500;
  color: var(--cite);
}
.evidence-text {
  display: block;
  font-family: var(--font-ar-text);
  font-size: 19.5px; line-height: 2.35;
  color: var(--text);
  white-space: pre-wrap;
}
.evidence-quran .evidence-text { font-size: 20.5px; }
@media (max-width: 760px) {
  .evidence { padding: 12px 15px 14px; margin: 14px 0; }
  .evidence-text { font-size: 18px; line-height: 2.2; }
  .evidence-quran .evidence-text { font-size: 18.5px; }
}

.msg.assistant .bubble code { background: var(--bubble); border-radius: 6px; padding: 2px 7px; font-size: 13.5px; }
.msg.error .bubble { color: var(--danger); }

/* Loading */
.loading-dot {
  display: inline-block; width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%;
  animation: pulse 1s ease-in-out infinite; vertical-align: middle;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .45; } }

/* Message actions */
.actions { display: flex; gap: 2px; margin: 8px 0 10px; opacity: 0; transition: opacity .15s; }
.msg.assistant:hover .actions, .msg.assistant:last-child .actions { opacity: 1; }
.actions button { background: transparent; border: none; color: var(--text-faint); padding: 6px; border-radius: 8px; cursor: pointer; line-height: 0; }
.actions button:hover { background: var(--hover); color: var(--accent); }

/* Citations — the one place gold is used */
.cite { color: var(--cite); font-size: 11px; margin: 0 2px; font-weight: 600; }
.refs { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.refs-title { font-size: 12.5px; color: var(--cite); margin-bottom: 8px; font-weight: 600; letter-spacing: .03em; }
[dir="rtl"] .refs { font-family: var(--font-ar-ui); }
.ref-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-dim);
  background: var(--bubble); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 13px; margin: 0 0 6px 6px;
}
[dir="ltr"] .ref-item { margin: 0 6px 6px 0; }
.ref-num { color: var(--quote-rule); font-weight: 600; }

/* ---------- Composer ---------- */
.composer-wrap { max-width: 48rem; margin: 0 auto; padding-bottom: 14px; width: 100%; }
.composer {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--chip-bg);
  border: 1.5px solid var(--border);
  border-radius: 26px;
  padding: 10px 10px 10px 20px;
  transition: border-color .15s, box-shadow .15s;
}
[dir="rtl"] .composer { padding: 10px 20px 10px 10px; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--hover); }
#input {
  flex: 1; background: transparent; border: none; outline: none; resize: none;
  color: var(--text); font-family: var(--font); font-size: 16px;
  line-height: 1.7; max-height: 200px; padding: 8px 0;
}
[dir="rtl"] #input { font-family: var(--font-ar-ui); line-height: 1.9; }
#input::placeholder { color: var(--text-faint); }
.send-btn {
  background: var(--accent-solid); color: var(--white); border: none;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex: none;
  transition: background .15s;
}
.send-btn:hover { background: var(--teal-strong); }
.send-btn:disabled { background: var(--border-strong); cursor: default; }
.send-btn.stop { background: var(--violet); }
[dir="rtl"] .send-btn svg { transform: scaleX(-1); }
.disclaimer { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 10px; }

/* Mobile */
@media (max-width: 768px) {
  #sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 30; box-shadow: var(--shadow); }
  #sidebarClose { display: block; }
  .messages { padding: 16px 14px 20px; }
  .msg.user .bubble { max-width: 86%; }
  #hero-brand img { width: 72px; height: 72px; }
}

/* ---------- Sign-in ---------- */
.google-btn {
  justify-content: center; gap: 9px; font-weight: 500;
  background: var(--chip-bg);
}
.google-btn:disabled { opacity: .6; cursor: default; }
.google-btn svg { flex: 0 0 auto; }
.auth-status {
  font-size: 11.5px; line-height: 1.65; margin-top: 8px;
  color: var(--text-dim);
}
.auth-status.error { color: var(--danger); }

/* ---------- A chat that is still generating ---------- */
/* The turn belongs to the chat, so the list has to say which chats are working. */
.chat-item .spin {
  flex: 0 0 auto; width: 12px; height: 12px; margin-inline-start: 6px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.chat-item.busy .del { display: none; }
.chat-item.busy .title { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Partial answer that is still growing */
.stream-tail { display: block; margin-top: 6px; }

/* ---------- Footer links under the composer ---------- */
.composer-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px; font-size: 11.5px; flex-wrap: wrap;
}
.composer-footer a { color: var(--text-faint); text-decoration: none; }
.composer-footer a:hover { color: var(--accent); text-decoration: underline; }
.composer-footer .sep { color: var(--text-faint); opacity: .6; }

/* ---------- Content pages (privacy / terms / contact) ---------- */
.page {
  max-width: 860px; margin: 0 auto; padding: 26px 22px 60px;
  height: 100dvh; overflow-y: auto;
}
.page-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.page-head .brand-lockup { text-decoration: none; color: inherit; }
.page-back {
  margin-inline-start: auto; font-size: 13px; color: var(--accent);
  text-decoration: none; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px;
}
.page-back:hover { border-color: var(--accent); background: var(--hover); }

.doc { color: var(--text); }
.doc h1 { font-size: 27px; font-weight: 500; margin-bottom: 6px; }
.doc h2 {
  font-size: 17.5px; font-weight: 600; margin: 26px 0 8px;
  color: var(--text);
}
.doc p, .doc li { color: var(--text-dim); font-size: 15px; }
.doc p { margin-bottom: 12px; }
.doc ul { margin: 0 0 14px; padding-inline-start: 22px; }
.doc li { margin-bottom: 7px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--accent); }
.doc-meta { font-size: 12.5px; color: var(--text-faint); margin-bottom: 18px; }
.doc-rule { border: 0; border-top: 1px solid var(--border); margin: 40px 0 32px; }
[dir="rtl"].doc h1, [dir="rtl"].doc h2 { font-family: var(--font-ar-ui); }
[dir="rtl"].doc p, [dir="rtl"].doc li { font-family: var(--font-ar-ui); line-height: 2; }

.doc-alert {
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px;
  border: 1px solid var(--border);
}
.doc-alert.success { background: var(--ev-quran-bg); color: var(--text); border-color: var(--accent); }
.doc-alert.error { background: rgba(255, 107, 99, .12); color: var(--danger); border-color: var(--danger); }
.doc-alert ul { margin: 0; padding-inline-start: 20px; }
.doc-alert.error li { color: var(--danger); }

/* ---------- Contact form ---------- */
.contact-form { margin-top: 18px; }
.contact-form label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-dim); margin: 14px 0 6px;
}
.contact-form .req { color: var(--danger); }
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--chip-bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 11px 14px; font-size: 15px; font-family: var(--font-ar-ui);
  line-height: 1.8;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--hover);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.btn-send {
  margin-top: 18px; background: var(--accent-solid); color: #fff;
  border: none; border-radius: 12px; padding: 12px 26px;
  font-size: 15px; font-weight: 500; font-family: var(--font-ar-ui); cursor: pointer;
}
.btn-send:hover { background: var(--teal-strong); }
.form-note { font-size: 12px; color: var(--text-faint); margin-top: 12px; }
/* Honeypot: present for bots, invisible and unreachable for people. */
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

.site-footer {
  margin-top: 46px; padding-top: 18px;
  border-top: 1px solid var(--border); text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-links .sep { color: var(--text-faint); }
.footer-note { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; font-family: var(--font-ar-ui); }

@media (max-width: 760px) {
  .page { padding: 18px 16px 48px; }
  .doc h1 { font-size: 23px; }
}
