:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f6fa;
  --text: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --accent: #2563eb;
  --draft-bg: #fef3c7;
  --draft-text: #78350f;
  --mark-bg: #fde68a;
  --mark-text: #111827;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b22;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --line: #2a2f3a;
    --accent: #7aa2ff;
    --draft-bg: #3b2f12;
    --draft-text: #fde68a;
    --mark-bg: #854d0e;
    --mark-text: #fef9c3;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.65 system-ui,
    'Segoe UI',
    Tahoma,
    'Noto Sans Arabic',
    sans-serif;
}

a {
  color: var(--accent);
}

.top,
.pages,
.draft,
main,
footer {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
}

.lang {
  font-weight: 600;
}

.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.pages a {
  color: var(--muted);
  text-decoration: none;
}

.pages a[aria-current='page'] {
  color: var(--text);
  font-weight: 700;
}

.draft {
  margin-block: 16px 0;
  padding-block: 10px;
  background: var(--draft-bg);
  color: var(--draft-text);
  border-radius: 8px;
  font-weight: 600;
}

main {
  padding-block: 8px 32px;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.2rem;
  margin-top: 2em;
}

ul,
ol {
  padding-inline-start: 1.4em;
}

li {
  margin-block: 0.3em;
}

.table {
  overflow-x: auto;
  margin-block: 1em;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--surface);
}

code {
  font-size: 0.9em;
}

mark.placeholder {
  background: var(--mark-bg);
  color: var(--mark-text);
  border-radius: 4px;
  padding-inline: 3px;
}

footer {
  padding-block: 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.landing img {
  border-radius: 16px;
}

.landing h1 {
  margin-bottom: 0.2em;
}

.landing p {
  margin: 0.2em 0;
  color: var(--muted);
}

.choose {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.choose a {
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
}
