:root {
  color-scheme: light dark;
  --background: #fff;
  --foreground: #1b1b1b;
  --muted: #757575;
  --border: #dfdfdf;
  --accent: #c4473a;
  --scalar-font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --scalar-font-code: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --background: #0f0f0f; --foreground: #e5e5e5; --muted: #a3a3a3; --border: #2d2d2d; --accent: #f17265; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 15px/1.7 var(--scalar-font); }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 8px 16px; background: var(--background); }
.skip-link:focus { top: 8px; }
header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 40px; min-height: 64px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--background); }
.brand { display: inline-flex; flex-shrink: 0; color: var(--foreground); }
.brand__logo { width: auto; height: 26px; }
header nav { display: flex; gap: 28px; }
header nav a { color: var(--foreground); text-decoration: none; }
header nav a[aria-current] { color: var(--accent); }
.dashboard { margin-left: auto; padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--foreground); text-decoration: none; white-space: nowrap; }
.layout { display: grid; grid-template-columns: 286px minmax(0, 1fr); }
aside { position: sticky; top: 64px; height: calc(100dvh - 64px); overflow: auto; border-right: 1px solid var(--border); padding: 16px; }
aside summary { cursor: pointer; font-weight: 500; }
aside h2 { margin: 24px 8px 8px; font-size: 13px; color: var(--muted); }
aside a { display: block; padding: 8px; color: var(--foreground); font-size: 13px; overflow-wrap: anywhere; text-decoration: none; border-radius: 4px; }
aside a:hover, aside a[aria-current] { background: color-mix(in srgb, var(--accent) 10%, transparent); }
main { min-width: 0; }
.page-tools { display: flex; justify-content: flex-end; padding: 20px 32px 0; font-size: 13px; }
article { max-width: 860px; margin: 24px auto 80px; padding: 0 40px; overflow-wrap: anywhere; }
article h1 { font-size: 30px; line-height: 1.3; margin-bottom: 24px; }
article h2 { margin-top: 40px; font-size: 22px; line-height: 1.4; }
article h3 { margin-top: 28px; font-size: 18px; }
article :is(h1, h2, h3) { scroll-margin-top: 90px; }
article pre { overflow: auto; padding: 16px; border: 1px solid var(--border); border-radius: 6px; }
article code { font-family: var(--scalar-font-code); font-size: 13px; }
article blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--border); color: var(--muted); }
article table { display: block; overflow: auto; border-collapse: collapse; }
article th, article td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
article img { max-width: 100%; }
@media (max-width: 900px) {
  header { gap: 20px; padding-inline: 16px; }
  header nav { gap: 16px; font-size: 13px; }
  .dashboard { display: none; }
  .layout { grid-template-columns: 1fr; }
  aside { position: static; height: auto; max-height: 280px; border-right: 0; border-bottom: 1px solid var(--border); }
  article { padding: 0 20px; }
  .page-tools { padding-inline: 20px; }
}
@media (max-width: 480px) {
  header { flex-wrap: wrap; gap: 8px 20px; }
  header nav { flex-wrap: wrap; gap: 8px 16px; }
  .brand__logo { height: 22px; }
}
