/* Amiri للعناوين (OFL)، وPlex Arabic للنصوص والأرقام (OFL). */
@font-face { font-family: "Amiri Nabd"; font-weight: 400; font-display: swap; src: url("assets/fonts/Amiri-Regular.woff2") format("woff2"); }
@font-face { font-family: "Amiri Nabd"; font-weight: 700; font-display: swap; src: url("assets/fonts/Amiri-Bold.woff2") format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("assets/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("assets/fonts/IBMPlexSansArabic-Medium.woff2") format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("assets/fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("assets/fonts/IBMPlexSansArabic-Bold.woff2") format("woff2"); }

/* الألوان مطابقة لـ packages/nabd_ui/lib/src/theme.dart */
:root {
  --bg: #f4f6f3;
  --surface: #fdfefc;
  --ink: #12211c;
  --muted: #52635c;
  --line: #d6ded8;
  --line-strong: #12211c;
  --grid: rgb(11 93 80 / .09);
  --teal: #0b5d50;
  --on-teal: #ffffff;
  --calm: #1f7550;
  --watch: #8a6500;
  --bad: #b8321f;
  --night: #10211c;
  --night-ink: #e6eee9;
  --night-muted: #a3b8af;
  --night-line: #2b423a;
  --night-accent: #ff8a70;
  --display: "Amiri Nabd", "Amiri", serif;
  color-scheme: light;
}
/* الغامق مرتين: من الجهاز (إلا لو الزائر اختار فاتح)، ومن اختياره بإيده (theme.js).
   القيمتين لازم يفضلوا زي بعض. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1614;
    --surface: #15201d;
    --ink: #e6eee9;
    --muted: #9db0a8;
    --line: #263732;
    --line-strong: #5d776d;
    --grid: rgb(82 199 172 / .09);
    --teal: #52c7ac;
    --on-teal: #0e1614;
    --calm: #55c48c;
    --watch: #e7bb3f;
    --bad: #ff7466;
    --night: #15241f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1614;
  --surface: #15201d;
  --ink: #e6eee9;
  --muted: #9db0a8;
  --line: #263732;
  --line-strong: #5d776d;
  --grid: rgb(82 199 172 / .09);
  --teal: #52c7ac;
  --on-teal: #0e1614;
  --calm: #55c48c;
  --watch: #e7bb3f;
  --bad: #ff7466;
  --night: #15241f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: "Plex Arabic", Tahoma, sans-serif; line-height: 1.8; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0 0 .5em; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.1rem; line-height: 1.5; font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--teal); text-underline-offset: 4px; }
section { padding: 96px 0; scroll-margin-top: 64px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 740px; }
.center { text-align: center; }
.fine { color: var(--muted); font-size: .88rem; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--surface); padding: 8px 12px; z-index: 20; }
.skip:focus { top: 8px; }

/* ===== الرأس ===== */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1; color: var(--ink); text-decoration: none; }
.logo span { padding-bottom: 6px; }
.bar nav { display: flex; gap: 24px; margin-inline-end: auto; font-size: .95rem; }
.bar nav a, .link { color: var(--muted); text-decoration: none; }
.bar nav a:hover, .link:hover { color: var(--ink); text-decoration: underline; }
.actions { display: flex; align-items: center; gap: 16px; }
.lang { color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.lang:hover { color: var(--ink); text-decoration: underline; }
.actions.push { margin-inline-start: auto; }

/* قائمة الوضع (theme.js). */
/* المحدد أقوى من تنسيق الأسئلة الشائعة (details وsummary) تحت. */
details.theme { position: relative; border-bottom: 0; }
details.theme summary::after, details.theme[open] summary::after { content: none; }
.theme summary { display: grid; place-items: center; place-content: center; width: 38px; height: 38px; padding: 0; border-radius: 6px; color: var(--muted); cursor: pointer; list-style: none; }
.theme summary::-webkit-details-marker { display: none; }
.theme summary:hover, .theme[open] summary { color: var(--ink); background: var(--surface); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme [role="group"] { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 164px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.theme:not([open]) [role="group"] { display: none; }
.theme button { display: flex; justify-content: space-between; gap: 16px; font: inherit; font-size: .9rem; text-align: start; white-space: nowrap; color: var(--ink); background: none; border: 0; border-radius: 4px; padding: 6px 12px; cursor: pointer; }
.theme button:hover { background: var(--bg); }
.theme button[aria-pressed="true"] { font-weight: 700; color: var(--teal); }
.theme button[aria-pressed="true"]::after { content: "✓"; }

.btn { display: inline-block; background: var(--teal); color: var(--on-teal); border: 1.5px solid var(--teal); border-radius: 4px; padding: 6px 18px; font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.big { padding: 11px 28px; font-size: 1.05rem; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ===== البداية ===== */
.hero { padding: 72px 0 96px; }
.hero-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: end; margin-bottom: 56px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.25; margin: 0; letter-spacing: 0; }
[lang="en"] .hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.75rem); line-height: 1.15; }
.hero h1 em { font-style: normal; color: var(--bad); background: linear-gradient(to top, transparent 14%, color-mix(in srgb, var(--bad) 14%, transparent) 14% 38%, transparent 38%); }
.lead { font-size: 1.12rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 24px 0 14px; }
.more { font-weight: 600; }
.hero-side .fine { margin: 0; }

/* جلسة العميل كرسم نبض على ورق مربعات */
.session { margin: 0; border: 1px solid var(--line-strong); border-radius: 6px; background-color: var(--surface);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 22px 22px; }
.session-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); border-radius: 6px 6px 0 0; }
.session-head p { margin: 0; font-weight: 600; }
.verdict { display: flex; align-items: baseline; gap: 10px; color: var(--bad); }
.verdict b { font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.moments { list-style: none; margin: 0; padding: 16px 0 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.moments li { display: flex; flex-direction: column; min-width: 0; --tone: var(--calm); }
.moments li.watch { --tone: var(--watch); }
.moments li.bad { --tone: var(--bad); }
.moments svg { width: 100%; height: 120px; display: block; }
.moments path { fill: none; stroke: var(--tone); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.moments li > :not(svg) { padding-inline: 18px; }
.moments .at { margin-top: 6px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
[dir="ltr"] .moments .at { text-align: left; }
.moments strong { font-weight: 600; line-height: 1.6; }
.moments small { color: var(--muted); font-size: .82rem; padding-bottom: 14px; }
.session figcaption { padding: 10px 24px 14px; font-size: .8rem; color: var(--muted); border-top: 1px dashed var(--line); background: var(--surface); border-radius: 0 0 6px 6px; }
/* الرسم بيتكشف من اليمين: نفس اتجاه الوقت */
@media (prefers-reduced-motion: no-preference) {
  .moments svg { animation: reveal .7s cubic-bezier(.4, 0, .6, 1) both; }
  .moments li:nth-child(2) svg { animation-delay: .6s; }
  .moments li:nth-child(3) svg { animation-delay: 1.2s; }
  .moments li:nth-child(4) svg { animation-delay: 1.8s; }
  [dir="ltr"] .moments svg { animation-name: reveal-ltr; }
  @keyframes reveal { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }
  @keyframes reveal-ltr { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
}

/* ===== عناوين الأقسام ===== */
.head { margin-bottom: 48px; max-width: 640px; }
.head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: .3em; }
.head p { color: var(--muted); margin: 0; }
.head .kicker { color: var(--teal); font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.head.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; max-width: none; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }

.problem { border-block: 1px solid var(--line); background: var(--surface); padding: 80px 0; }
.problem h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); margin: 0; }
.prose { font-size: 1.2rem; color: var(--muted); align-self: center; }
.prose p:last-child { color: var(--ink); font-weight: 600; margin: 0; }

/* ===== الخطوات: دفتر بصفوف ===== */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.ledger > li { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; padding: 34px 0; border-bottom: 1px solid var(--line); }
.num { font-family: var(--display); font-size: 5rem; line-height: .9; color: var(--teal); align-self: start; }
.ledger h3 { font-size: 1.35rem; }
.ledger p { color: var(--muted); margin: 0; }
pre { background: var(--night); color: var(--night-ink); border-radius: 6px; padding: 18px 20px; margin: 0; overflow-x: auto; text-align: left; font-size: .84rem; line-height: 1.7; }
.queue { margin: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.queue ul { list-style: none; margin: 0; padding: 4px 18px; }
.queue li { display: grid; grid-template-columns: 9.5em 7em minmax(40px, 1fr) 2em; gap: 14px; align-items: center; padding: 10px 0; font-size: .86rem; border-bottom: 1px solid var(--line); }
.queue li:last-child { border-bottom: 0; }
.queue li span { text-align: right; font-variant-numeric: tabular-nums; }
.queue small { color: var(--muted); }
.queue svg { width: 100%; height: 6px; }
.queue .track { fill: var(--line); }
.queue rect.bad { fill: var(--bad); }
.queue rect.watch { fill: var(--watch); }
.queue b { text-align: left; }
[dir="ltr"] .queue li span { text-align: left; }
[dir="ltr"] .queue b { text-align: right; }
.queue b.bad { color: var(--bad); }
.queue b.watch { color: var(--watch); }
.queue figcaption { padding: 6px 18px; border-top: 1px dashed var(--line); font-size: .76rem; color: var(--muted); }

/* ===== الأقسام الغامقة ===== */
.night { background: var(--night); color: var(--night-ink); }
.night .head p, .night dd { color: var(--night-muted); }
.night .head .kicker { color: var(--night-accent); }
.night :focus-visible { outline-color: var(--night-ink); }
.signals-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.signals-grid .head { position: sticky; top: 110px; margin: 0; }
.signals { margin: 0; border-top: 1px solid var(--night-line); }
.signals > div { display: grid; grid-template-columns: 110px 13em minmax(0, 1fr); gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--night-line); }
.signals svg { width: 100%; height: auto; }
.signals path { fill: none; stroke: var(--night-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.signals .dashed { stroke-dasharray: 3 5; }
.signals dt { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.4; }
.signals dd { margin: 0; }

/* ===== البيئات: فهرس ===== */
.platforms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.platforms li { border-bottom: 1px solid var(--line); }
.platforms a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 16px 0; height: 100%; color: var(--ink); text-decoration: none; }
.platforms strong { font-weight: 600; font-size: 1.08rem; }
.platforms span { grid-column: 1; color: var(--muted); font-size: .86rem; }
.platforms em { grid-column: 2; grid-row: 1 / span 2; }
.platforms a:hover strong { color: var(--teal); text-decoration: underline; text-underline-offset: 6px; }
.tag { font-style: normal; font-size: .74rem; font-weight: 600; line-height: 1.9; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentcolor; }
.tag.building { color: var(--watch); }
.tag.planned { color: var(--muted); }
.tag.planned::before { background: transparent; border: 1.5px solid currentcolor; }

/* ===== الخصوصية ===== */
.paper { background: var(--surface); border-block: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.column h3 { font-family: var(--display); font-size: 1.6rem; padding-bottom: 10px; border-bottom: 2px solid var(--calm); margin: 0; }
.column.no h3 { border-bottom-color: var(--bad); }
.column ul { list-style: none; margin: 0; padding: 0; }
.column li { position: relative; padding: 12px 0; padding-inline-start: 30px; border-bottom: 1px solid var(--line); }
.column li::before { position: absolute; inset-inline-start: 2px; font-weight: 700; }
.yes li::before { content: "+"; color: var(--calm); }
.no li { color: var(--muted); }
.no li::before { content: "−"; color: var(--bad); }
.footnote { margin: 28px 0 0; color: var(--muted); font-size: .92rem; }

/* ===== الباقات: جدول مقارنة ===== */
.toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.toggle[hidden] { display: none; }
.toggle button { font: inherit; font-size: .9rem; background: transparent; color: var(--ink); border: 0; padding: 6px 18px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.plans { display: grid; grid-template-columns: 11em repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(7, auto); border-top: 1px solid var(--line-strong); }
.plan-labels, .plan { display: grid; grid-row: span 7; grid-template-rows: subgrid; }
.plan-labels > span, .plan > * { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--line); align-self: stretch; }
.plan-labels > span { padding-inline-start: 0; color: var(--muted); font-size: .9rem; display: flex; align-items: center; }
.plan h3 { font-family: var(--display); font-size: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plan p { display: flex; align-items: baseline; gap: 6px; }
.plan p:not(.price) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.plan b { font-weight: 600; }
.price strong { font-size: 2.4rem; line-height: 1.2; font-weight: 700; }
.price small { color: var(--muted); font-size: .85rem; }
.plan .btn { margin: 16px; text-align: center; align-self: start; }
.plan.featured { background: var(--surface); box-shadow: inset 0 3px 0 var(--bad), inset 1px 0 0 var(--line), inset -1px 0 0 var(--line); }
.badge { font-family: "Plex Arabic", sans-serif; font-size: .72rem; font-weight: 600; color: var(--bad); }

/* ===== الأسئلة ===== */
.faq { border-top: 1px solid var(--line-strong); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; line-height: 1.4; color: var(--teal); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); padding-bottom: 8px; }

/* ===== الخاتمة والتذييل ===== */
.final { padding: 0 0 96px; }
.final-trace { display: block; width: 100%; height: 120px; margin-bottom: 40px; }
.final-trace path { fill: none; stroke: var(--night-accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.final h2 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); margin-bottom: .6em; }
.final .btn { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
.final .btn:hover { background: var(--night-accent); border-color: var(--night-accent); }
footer { border-top: 1px solid var(--line); padding: 30px 0; font-size: .9rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--muted); }

/* ===== الصفحات القانونية ===== */
.legal { padding-block: 56px; }
.legal h1 { font-size: 2.4rem; }
.legal h2 { font-size: 1.5rem; margin: 1.6em 0 .4em; }
.draft { border: 1px solid var(--watch); border-inline-start-width: 4px; border-radius: 4px; padding: 12px 16px; background: var(--surface); }

@media (max-width: 1020px) {
  .bar nav { display: none; }
  .actions { margin-inline-start: auto; }
  .hero-head, .split, .signals-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .signals-grid .head { position: static; }
  .ledger > li { grid-template-columns: 64px minmax(0, 1fr); gap: 16px 20px; }
  .ledger > li > pre, .ledger > li > .queue { grid-column: 1 / -1; }
  .num { font-size: 3.6rem; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 20px; border-top: 0; }
  .plan-labels { display: none; }
  .plan { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
  .plan p:not(.price) { justify-content: space-between; }
  .plan p:not(.price) span { position: static; width: auto; height: auto; clip-path: none; color: var(--muted); font-size: .88rem; }
  .plan.featured { box-shadow: inset 0 3px 0 var(--bad); border-color: var(--line-strong); }
  .plan .btn { margin-top: auto; align-self: stretch; }
  .plan > :nth-last-child(2) { margin-bottom: 16px; border-bottom: 0; }
}
@media (max-width: 700px) {
  section { padding: 64px 0; }
  .hero { padding: 40px 0 64px; }
  .hero-head { margin-bottom: 36px; }
  .moments { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .moments li { display: grid; grid-template-columns: 110px minmax(0, 1fr); grid-template-rows: auto auto auto; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .moments li:last-child { border-bottom: 0; }
  .moments svg { grid-row: 1 / span 3; height: 76px; }
  .moments li > :not(svg) { grid-column: 2; padding: 0 14px; }
  .moments .at { margin: 0; }
  .session-head, .session figcaption { padding-inline: 16px; }
  .two, .platforms, .plans { grid-template-columns: minmax(0, 1fr); }
  .signals > div { grid-template-columns: 84px minmax(0, 1fr); gap: 6px 18px; }
  .signals svg { grid-row: 1 / span 2; }
  .queue li { grid-template-columns: minmax(0, 1fr) auto 2em; }
  .queue svg { display: none; }
  .final { padding-bottom: 64px; }
  .final-trace { height: 80px; margin-bottom: 24px; }
}
@media (max-width: 480px) {
  /* الرأس فيه اللغة والوضع وزر التسجيل: يفضلوا على سطر واحد. */
  .bar { gap: 12px; }
  .actions { gap: 8px; }
  .site-header .btn { white-space: nowrap; padding-inline: 12px; font-size: .88rem; }
  .logo { font-size: 1.5rem; gap: 8px; }
}
@media (max-width: 420px) {
  .actions .link { display: none; }
}

/* ===== التوثيق ===== */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-block: 40px 72px; }
.side nav { position: sticky; top: 88px; }
.side p { margin: 18px 0 6px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 3px 12px; color: var(--ink); text-decoration: none; border-inline-start: 2px solid var(--line); }
.side a:hover { border-inline-start-color: var(--ink); }
.side a[aria-current="page"] { border-inline-start-color: var(--teal); color: var(--teal); font-weight: 700; }
.doc { max-width: 780px; }
.doc h1 { font-size: 2.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.doc h2 { font-size: 1.7rem; margin: 1.8em 0 .5em; scroll-margin-top: 84px; padding-top: .4em; border-top: 1px solid var(--line); }
.doc :not(pre) > code { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font-size: .85em; unicode-bidi: isolate; overflow-wrap: anywhere; }
.note { background: var(--surface); border-inline-start: 3px solid var(--teal); padding: 10px 16px; }
.toc ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin-bottom: 28px; }
.toc a { font-size: .9rem; }
.code { margin: 16px 0; text-align: left; }
.code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--night); color: var(--night-muted); border-bottom: 1px solid var(--night-line); border-radius: 6px 6px 0 0; padding: 6px 16px; font-size: .76rem; unicode-bidi: plaintext; }
.code pre { border-radius: 0 0 6px 6px; }
.code button { font: inherit; background: transparent; color: var(--night-ink); border: 1px solid var(--night-line); border-radius: 4px; padding: 0 12px; cursor: pointer; }
.table { overflow-x: auto; margin-block: 16px; }
/* في الجدول الكود مايتقطعش في نص الكلمة؛ الجدول نفسه بيتسحب لو ضاق. */
.doc .table code { overflow-wrap: normal; }
.table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 0; padding-inline-end: 16px; text-align: start; vertical-align: top; }
.table th { border-bottom-color: var(--line-strong); font-weight: 600; }
.doc .platforms { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .side nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
  .side p { display: none; }
  .side ul { display: flex; gap: 6px; }
  .side a { white-space: nowrap; border: 1px solid var(--line); border-radius: 4px; }
  .side a[aria-current="page"] { border-color: var(--teal); }
}
