:root {
  --paper: #ffffff;
  --page: #f4f2ee;
  --ink: #1f1f1f;
  --muted: #5f5f5f;
  --rule: #d8d4cc;
  --accent: #1c3d6e;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.7;
}

html[lang="ar"] body {
  font-family: "Noto Naskh Arabic", "Traditional Arabic", "Times New Roman", "Geeza Pro", serif;
  font-size: 19px;
  line-height: 1.9;
}

.page {
  max-width: 820px;
  margin: 40px auto;
  padding: 56px 64px 48px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

header.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 40px;
}

.brand {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

html[lang="ar"] .brand {
  letter-spacing: 0.08em;
}

nav.languages {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 0.95rem;
}

nav.languages a {
  color: var(--accent);
  text-decoration: none;
}

nav.languages a:hover {
  text-decoration: underline;
}

nav.languages a[aria-current="page"] {
  color: var(--ink);
  font-weight: bold;
  pointer-events: none;
}

nav.languages .separator {
  color: var(--rule);
  margin: 0 8px;
}

h1 {
  font-size: 2.2rem;
  font-weight: normal;
  line-height: 1.25;
  text-align: center;
  margin: 0 0 8px;
}

.updated {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 40px;
}

html[lang="ar"] .updated {
  font-style: normal;
}

section {
  padding-top: 8px;
  margin-bottom: 28px;
}

section + section {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}

h2 {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent);
  line-height: 1.4;
  margin: 0 0 12px;
}

h3 {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: normal;
  margin: 20px 0 6px;
}

html[lang="ar"] h3 {
  font-style: normal;
  font-weight: bold;
}

p,
ul {
  margin: 0 0 12px;
  text-align: justify;
  hyphens: auto;
}

html[lang="ar"] p:not(.updated),
html[lang="ar"] ul {
  text-align: start;
}

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

li {
  margin-bottom: 6px;
}

a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
    background: var(--paper);
  }

  html[lang="ar"] body {
    font-size: 18px;
  }

  .page {
    margin: 0;
    padding: 28px 16px 32px;
    border: none;
  }

  header.top {
    margin-bottom: 28px;
  }

  h1 {
    font-size: 1.75rem;
  }

  p,
  ul {
    text-align: start;
  }
}
