/* Sift — one stylesheet for the whole site. No build step, no dependencies.
   Layout uses logical properties only (inline-start/end, not left/right),
   so Arabic pages mirror from the same rules. */

:root {
  color-scheme: light dark;

  --accent: #F25C6B;        /* brand fill: logo mark, bullets, borders */
  --accent-strong: #C8323F; /* text and buttons: 4.6:1 or better on every light surface */
  --accent-ink: #ffffff;
  --accent-soft: #fdecee;
  --accent-line: #f6c3c9;

  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #eef0f4;
  --border: #e0e4ea;
  --text: #14171c;
  --muted: #5c6573;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", Roboto, Tahoma, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #FF7683;
    --accent-strong: #FF7683;
    --accent-ink: #2a0d11;
    --accent-soft: #2a171a;
    --accent-line: #5c2b31;

    --bg: #0B0D10;
    --surface: #14181d;
    --surface-2: #1b2027;
    --border: #272e37;
    --text: #e7eaef;
    --muted: #9aa4b2;
  }
}

/* Arabic: a stack that shapes Arabic well, a little more leading, and no
   letter-spacing anywhere — spacing breaks the joins between letters. */
html:lang(ar) {
  --sans: "SF Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", sans-serif;
}
html:lang(ar) body { line-height: 1.8; }
html:lang(ar) h1,
html:lang(ar) h2,
html:lang(ar) .eyebrow,
html:lang(ar) .brand-name { letter-spacing: 0; text-transform: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 5rem;
}

/* ------------------------------------------------------------- typography */

h1 {
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.8rem;
}

h3 {
  font-size: 1.03rem;
  margin: 1.8rem 0 0.5rem;
}

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-inline-start: 1.35rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--accent); }

a { color: var(--accent-strong); text-underline-offset: 2px; }
a:hover { text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 4px; }

strong { font-weight: 650; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.36em;
  overflow-wrap: anywhere;
}

/* ----------------------------------------------------------------- header */

.masthead {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.6rem;
  margin-bottom: 2rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.mark {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

@media (prefers-color-scheme: dark) {
  .mark { color: var(--accent-ink); }
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

.eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.dateline {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* The "this is a translation" line on non-English legal pages. */
.xlate {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.6rem 0 0;
}

/* ------------------------------------------------------------------ lede */

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

/* ------------------------------------------------------ language switcher */

.langbar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0;
}

.langbar a,
.langbar span {
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted);
}

.langbar a:hover { border-color: var(--accent-line); color: var(--accent-strong); }

.langbar span[aria-current] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-strong);
  font-weight: 650;
}

.foot .langbar { margin: 0 0 0.9rem; }
.foot .langbar a { color: var(--muted); }

/* --------------------------------------------- first-visit language chooser
   Root home page only. Visible by default so it works without JavaScript;
   lang.js hides it once a language has been chosen. */

.chooser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.2rem;
  margin: 0 0 2rem;
}

.lang-chosen .chooser { display: none; }

.chooser-title {
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.chooser-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.9rem;
}

.chooser-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chooser-options a {
  display: inline-block;
  min-width: 6.5rem;
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 650;
  font-size: 0.97rem;
  text-decoration: none;
}

.chooser-options a:hover { border-color: var(--accent-line); }

.chooser-options a.is-suggested {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
}

/* While lang.js sends a returning reader to their language, show nothing
   rather than a flash of the English page. */
.lang-redirecting body { visibility: hidden; }

/* --------------------------------------------------------------- controls */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.97rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn.primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
}

/* ----------------------------------------------------------------- blocks */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  margin: 0 0 1.25rem;
}

.card h2 { margin-top: 0; font-size: 1.08rem; }
.card > :last-child { margin-bottom: 0; }

.note {
  border-inline-start: 3px solid var(--accent);
  background: var(--accent-soft);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-start-end-radius: 10px;
  border-end-end-radius: 10px;
  padding: 0.95rem 1.2rem;
  margin: 1.4rem 0;
}

.note > :last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding-inline-start: 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 2.5rem;
  margin-bottom: 0.85rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Arabic pages count their steps in Arabic-Indic digits, like their text. */
html:lang(ar) .steps li::before { content: counter(step, arabic-indic); }

.never { padding-inline-start: 0; }

.never li {
  list-style: none;
  position: relative;
  padding-inline-start: 1.6rem;
}

.never li::before {
  content: "\00d7";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ----------------------------------------------------------------- tables */

.tablewrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 30rem;
}

th, td {
  text-align: start;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-weight: 650;
  font-size: 0.84rem;
}

tr:last-child td { border-bottom: none; }

/* -------------------------------------------------------------------- FAQ */

.faq { margin: 1.5rem 0 0; }

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 1.2rem;
  margin-bottom: 0.7rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 1.2rem;
  flex: none;
}

.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .answer { padding: 1rem 0 0.35rem; }
.faq .answer > :last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- footer */

.foot {
  margin-top: 3.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.foot a { color: var(--muted); }
.foot nav { display: flex; gap: 0.4rem 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }

/* ------------------------------------------------------------ small print */

@media (max-width: 34rem) {
  body { font-size: 16px; }
  .wrap { padding: 2rem 1rem 3.5rem; }
  h2 { margin-top: 2.25rem; }
  .btn { width: 100%; text-align: center; }
  .chooser-options a { flex: 1 1 40%; min-width: 0; }
}
