:root {
  color-scheme: light;
  --bg: #ffffff; --bg-alt: #f6f7f5; --surface: #ffffff; --text: #0f1720; --muted: #56606b; --faint: #8a939c;
  --line: #e5e8e4; --line-strong: #d3d8d2; --brand: #0b5f58; --brand-ink: #ffffff; --brand-soft: #e6f2ef;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f11; --bg-alt: #111518; --surface: #151a1d; --text: #ecf0f2; --muted: #a0a9b2; --faint: #6f7881;
    --line: #232a2f; --line-strong: #2e363c; --brand: #34c3b0; --brand-ink: #04211e; --brand-soft: #0f2926;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f11; --bg-alt: #111518; --surface: #151a1d; --text: #ecf0f2; --muted: #a0a9b2; --faint: #6f7881;
  --line: #232a2f; --line-strong: #2e363c; --brand: #34c3b0; --brand-ink: #04211e; --brand-soft: #0f2926;
}
:root[lang="ar"] { --font: "IBM Plex Sans Arabic", Inter, system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
[lang="ar"] body { line-height: 1.85; }
a { color: var(--brand); }
button { font: inherit; color: inherit; }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: Inter, sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; color: var(--text); direction: ltr; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); display: grid; place-items: center; }
.logo-mark svg { width: 16px; height: 16px; }
.logo-mark path { fill: var(--brand-ink); }
.tools { display: flex; gap: 8px; align-items: center; }
.icon-btn { height: 36px; min-width: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.lang-btn { font-family: "IBM Plex Sans Arabic", Inter, sans-serif; }
main { padding: 56px 0 80px; }
.doc[hidden] { display: none; }
.doc h1 { font-size: clamp(32px, 5vw, 42px); letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 10px; }
[lang="ar"] .doc h1 { letter-spacing: 0; line-height: 1.35; }
.updated { color: var(--faint); font-size: 14px; margin: 0 0 36px; }
.summary { background: var(--brand-soft); border-radius: 12px; padding: 18px 20px; margin: 0 0 36px; font-size: 15.5px; }
.doc h2 { font-size: 20px; margin: 40px 0 10px; letter-spacing: -0.01em; }
[lang="ar"] .doc h2 { letter-spacing: 0; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text); }
.ltr { direction: ltr; unicode-bidi: isolate; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--faint); font-size: 13.5px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--muted); text-decoration: none; margin-inline-end: 16px; }
footer a:hover { color: var(--text); }

.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.theme-switch button svg { width: 14px; height: 14px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--bg-alt); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
