/* Bariqo — legal pages.
   Self-contained, no fonts or assets fetched from anywhere. */

:root {
  --ink:        #14201c;
  --ink-soft:   #4a5a54;
  --paper:      #fbfaf7;
  --card:       #ffffff;
  --rule:       #e4e0d6;
  --emerald:    #0f6b4f;
  --emerald-lt: #eaf3ef;
  --gold:       #a8842c;
  --flag:       #fff4e0;
  --flag-rule:  #d9a441;
  --flag-ink:   #6b4c0a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #e8ece9;
    --ink-soft:   #a3b0aa;
    --paper:      #101614;
    --card:       #171f1c;
    --rule:       #2a3531;
    --emerald:    #4fbf94;
    --emerald-lt: #14261f;
    --gold:       #d8b25c;
    --flag:       #2a2110;
    --flag-rule:  #7a5f1c;
    --flag-ink:   #f0d79a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

/* ── Masthead ─────────────────────────────────────────────── */

header.masthead {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.mark {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
  border-radius: 0.7rem;
  background: linear-gradient(150deg, #10314a, var(--emerald));
  display: grid;
  place-items: center;
  color: #f7e9c4;
  font-size: 1.35rem;
  line-height: 1;
}

.masthead .name {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.masthead .tag {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

nav.pages {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
  font-size: 0.9rem;
}

nav.pages a { color: var(--ink-soft); text-decoration: none; }
nav.pages a:hover,
nav.pages a[aria-current="page"] { color: var(--emerald); }

/* ── Type ─────────────────────────────────────────────────── */

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
}

.dateline {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

p, li { color: var(--ink); }
ul { padding-left: 1.2rem; }
li { margin: 0.4rem 0; }

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

strong { font-weight: 650; }

/* ── The headline claim ───────────────────────────────────── */

.claim {
  background: var(--emerald-lt);
  border-left: 3px solid var(--emerald);
  border-radius: 0 0.6rem 0.6rem 0;
  padding: 1.1rem 1.25rem;
  margin: 0 0 2rem;
}

.claim p { margin: 0; }
.claim p + p { margin-top: 0.6rem; }
.claim .big {
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* ── Fill-me-in markers ───────────────────────────────────── */

.fill {
  background: var(--flag);
  border-bottom: 2px solid var(--flag-rule);
  color: var(--flag-ink);
  padding: 0.05em 0.35em;
  border-radius: 0.25em;
  font-weight: 600;
  white-space: nowrap;
}

.notice {
  background: var(--flag);
  border: 1px solid var(--flag-rule);
  color: var(--flag-ink);
  border-radius: 0.6rem;
  padding: 1rem 1.15rem;
  margin: 2rem 0;
  font-size: 0.94rem;
}

.notice p { color: inherit; margin: 0; }
.notice p + p { margin-top: 0.5rem; }

/* ── Tables ───────────────────────────────────────────────── */

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

th, td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-weight: 650;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scroll { overflow-x: auto; }

/* ── Footer ───────────────────────────────────────────────── */

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}

footer a { color: var(--ink-soft); }

/* ── Right-to-left ────────────────────────────────────────── */
/*
   The four rules above that use physical sides rather than logical ones.
   Scoped to [dir="rtl"] so the English pages are untouched: rewriting them
   as `margin-inline-start` throughout would be tidier, but it would also
   silently restyle four live pages to fix one that does not exist yet.
*/
[dir="rtl"] nav.pages { margin-left: 0; margin-right: auto; }
[dir="rtl"] ul        { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] .claim    { border-left: 0; border-right: 3px solid var(--emerald);
                        border-radius: 0.6rem 0 0 0.6rem; }
[dir="rtl"] th,
[dir="rtl"] td        { text-align: right; }

/* Arabic runs taller than Latin at the same size, and the body face is a
   different family — both need a little more room between lines. */
[dir="rtl"] body { font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic",
                                 "Segoe UI", system-ui, sans-serif; }
[dir="rtl"] p,
[dir="rtl"] li   { line-height: 1.9; }
