/* Shared styling for privacy.html, terms.html and simulator.html — Makinzi brand tokens. */
:root {
  --surface: #ffffff;
  --surface-raised: #f4f5fa;
  --surface-sunken: #e9ebf3;
  --line: #d9dce8;
  --line-strong: #8d93b0;
  --ink: #0f1330;
  --ink-muted: #4b5170;
  --ink-inverse: #ffffff;
  --blue: #040bf7;
  --blue-hover: #0309c4;
  --blue-soft: #e6e8ff;
  --navy: #263a95;
  --navy-deep: #182563;
  --red: #e30613;
  --red-deep: #c80015;
  --red-soft: #ffe6e8;
  --green: #0a6b34;
  --green-soft: #e3f5ea;
  --amber: #b45309;
  --amber-soft: #fff1dc;
  --focus: var(--blue);
  --shadow-card: 0 1px 2px rgba(15, 19, 48, 0.06), 0 4px 12px rgba(15, 19, 48, 0.06);
  --shadow-modal: 0 12px 40px rgba(15, 19, 48, 0.18);
  --header-bg: rgba(255, 255, 255, 0.88);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --font-sans: "Montserrat", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Tajawal", "Montserrat", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  /* aliases kept for simulator.css */
  --bg: var(--surface);
  --bg-2: var(--surface-raised);
  --text: var(--ink);
  --text-2: var(--ink-muted);
  --muted: var(--ink-muted);
  --brand: var(--blue);
  --brand-2: var(--blue);
  --brand-deep: var(--blue-hover);
  --brand-tint: var(--blue-soft);
  --brand-line: var(--line-strong);
  --font-text: var(--font-sans);
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --surface: #12152b;
  --surface-raised: #1b1f3a;
  --surface-sunken: #0b0d1f;
  --line: #2f3452;
  --line-strong: #5c6388;
  --ink: #eef0ff;
  --ink-muted: #b3b8d0;
  --ink-inverse: #12152b;
  --blue: #7b84ff;
  --blue-hover: #9aa1ff;
  --blue-soft: #1f2461;
  --navy: #a9b4ff;
  --navy-deep: #0b0d1f;
  --red: #ff6b74;
  --red-deep: #ff8b92;
  --red-soft: #4a1218;
  --green: #4ade80;
  --green-soft: #0f2e1c;
  --amber: #fbbf24;
  --amber-soft: #3a2606;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 12px 40px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(18, 21, 43, 0.88);
}
html[lang="ar"] { --font-sans: "IBM Plex Sans Arabic", "Montserrat", system-ui, sans-serif; }
html[lang="ar"] * { letter-spacing: 0 !important; }
html[lang="ar"] body { line-height: 1.85; font-size: 1.02rem; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
html[lang="ar"] h1, html[lang="ar"] h2 { line-height: 1.45; }
p, ul { margin: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* header */
header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand-mark { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark:hover { text-decoration: none; }
.brand-mark img { width: 42px; height: 42px; display: block; }
.brand-mark .logo-dark, html[data-theme="dark"] .brand-mark .logo-light { display: none; }
html[data-theme="dark"] .brand-mark .logo-dark { display: block; }
.brand-mark .bt { font-weight: 700; font-size: 1.22rem; letter-spacing: -0.015em; display: block; line-height: 1.1; }
.brand-mark .bs { font-size: 0.7rem; font-weight: 500; color: var(--ink-muted); display: block; white-space: nowrap; }
.nav-end { display: flex; align-items: center; gap: 10px; }
.back-link { color: var(--ink-muted); font-size: 0.92rem; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.back-link:hover { color: var(--blue); text-decoration: none; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); background: transparent; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; transition: border-color 150ms ease-out, color 150ms ease-out; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.theme-btn .i-sun, html[data-theme="dark"] .theme-btn .i-moon { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: block; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; cursor: pointer;
  font: 600 0.88rem/1 var(--font-arabic); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill);
  transition: border-color 150ms ease-out, color 150ms ease-out;
}
.lang-btn:lang(en) { font-family: "Montserrat", system-ui, sans-serif; }
.lang-btn:hover { color: var(--blue); border-color: var(--blue); }

/* document */
.doc-head { padding: 54px 0 30px; border-bottom: 1px solid var(--line); }
.eyebrow {
  display: block; margin-bottom: 12px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue);
}
html[lang="ar"] .eyebrow { text-transform: none; font-size: 0.85rem; }
.doc-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; }
.doc-head .updated { color: var(--ink-muted); font-size: 0.9rem; margin-top: 12px; }
.doc-head .lede { color: var(--ink-muted); font-size: 1.04rem; margin-top: 16px; }

.toc { margin: 30px 0 0; padding: 20px 24px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.toc h2 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px; }
html[lang="ar"] .toc h2 { text-transform: none; font-size: 0.9rem; }
.toc ol { margin: 0; padding-inline-start: 20px; columns: 2; column-gap: 28px; font-size: 0.93rem; }
.toc li { margin-bottom: 5px; break-inside: avoid; }
.toc a { color: var(--ink-muted); }
.toc a:hover { color: var(--blue); }

main { padding: 10px 0 70px; }
section.s { padding-top: 36px; }
section.s h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
section.s p + p, section.s ul + p, section.s p + ul, section.s h3 + p { margin-top: 12px; }
section.s p, section.s li { color: var(--ink-muted); font-size: 0.99rem; }
section.s h3 { font-size: 1.02rem; font-weight: 600; margin-top: 18px; color: var(--ink); }
section.s ul { padding-inline-start: 22px; display: grid; gap: 7px; }
section.s li::marker { color: var(--blue); }
.callout { margin-top: 16px; background: var(--surface-raised); border: 1px solid var(--line); border-inline-start: 6px solid var(--blue); border-radius: var(--radius-md); padding: 18px 22px; }
.callout p { font-size: 0.95rem; }
.facts { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.95rem; }
.facts th, .facts td { text-align: start; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 38%; font-weight: 500; color: var(--ink-muted); padding-inline-end: 16px; }
.facts td { color: var(--ink); font-weight: 600; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

footer { background: var(--navy-deep); border-top: 1px solid var(--line); padding: 34px 0; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #8b93bd; font-size: 0.88rem; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a { color: #c5cce8; }
.foot nav a:hover { color: #fff; }

@media (max-width: 680px) {
  .nav { height: 64px; }
  .brand-mark .bs { display: none; }
  .back-link span { display: none; }
  .toc ol { columns: 1; }
  .doc-head { padding: 34px 0 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
