/*
 * InAleppo legal pages.
 *
 * One stylesheet, no web fonts: a page explaining what data we collect should not
 * itself send a request to a third party. Logical properties throughout
 * (margin-inline, border-inline-start, text-align: start), so the Arabic pages
 * (dir="rtl") and the English ones share every rule and neither is an
 * afterthought.
 */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --text: #1f2430;
  --muted: #5c6270;
  --brand: #1a365d;
  --line: #dcd8cf;
  --soft: #f1eee7;
  --note-bg: #fff3d6;
  --note-text: #6b4a00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --text: #e7e5df;
    --muted: #a3a7b0;
    --brand: #9cc2ff;
    --line: #2e333b;
    --soft: #1c2027;
    --note-bg: #3a2d0c;
    --note-text: #ffdc8a;
  }
}

/* Printed, or saved as a PDF: the light palette whatever the reader's theme.
   Browsers leave backgrounds out of print by default, so the dark theme's pale
   text would come out on white paper. Declared after the dark block so it wins. */
@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --text: #1f2430;
    --muted: #5c6270;
    --brand: #1a365d;
    --line: #dcd8cf;
    --soft: #f1eee7;
    --note-bg: #fff3d6;
    --note-text: #6b4a00;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-inline: 1rem;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic",
    "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
}

/* Arabic script needs more room between lines than Latin to stay readable. */
html[lang="ar"] body { line-height: 1.95; }

.site-header,
.site-nav,
main,
.site-footer {
  max-inline-size: 44rem;
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem 0.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand);
  text-decoration: none;
}

.site-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding-block: 0.5rem;
  border-block-end: 1px solid var(--line);
}

.site-footer {
  margin-block: 3rem 2rem;
  color: var(--muted);
}

.site-footer nav { border-block: 1px solid var(--line); }

a { color: var(--brand); }
a[aria-current="page"] { font-weight: 700; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

h1 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  line-height: 1.25;
  margin-block: 1.5rem 1rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.35;
  margin-block: 2.25rem 0.75rem;
  text-wrap: balance;
}

p, li { max-inline-size: 70ch; }

ul, ol { padding-inline-start: 1.5rem; }
li + li { margin-block-start: 0.35rem; }

hr {
  border: 0;
  border-block-start: 1px solid var(--line);
  margin-block: 2rem;
}

blockquote {
  margin-inline: 0;
  padding: 0.25rem 1rem;
  border-inline-start: 4px solid var(--line);
  background: var(--soft);
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Wide tables scroll inside their own box; the page itself never scrolls sideways. */
.table-wrap { overflow-x: auto; margin-block: 1rem; }

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

th, td {
  text-align: start;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border-block-end: 1px solid var(--line);
}

th { font-weight: 700; background: var(--soft); }

.preview {
  position: sticky;
  inset-block-start: 0;
  margin: 0 -1rem;
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: 700;
  background: var(--note-bg);
  color: var(--note-text);
}

.index section { margin-block: 2rem; }
.index nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
