/* Shared styling for the Sami legal pages.

   Deliberately plain: these are documents, not marketing. They have to stay
   readable on a phone opened from inside the app, and legible when someone
   prints them to PDF for their records. */

:root {
  --bg: #ffffff;
  --text: #16181d;
  --muted: #5b616e;
  --rule: #e3e5ea;
  --accent: #2f6bff;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --text: #e9ebf0;
    --muted: #9aa1ae;
    --rule: #262a32;
    --accent: #7ba2ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2.5rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main { max-width: var(--max); margin: 0 auto; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .35rem; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; margin: 2.4rem 0 .6rem; letter-spacing: -0.01em; }
h3 { font-size: 1rem; margin: 1.6rem 0 .4rem; }

p, li { color: var(--text); }
li { margin: .35rem 0; }
ul { padding-inline-start: 1.25rem; }

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

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

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0 1.5rem; }

footer { color: var(--muted); font-size: .875rem; }
footer a { color: var(--muted); }

/* Language switch. Arabic is not a translation afterthought here -- Sami is an
   Arabic-first app, so both versions are first-class and the toggle is at the
   top of the page rather than buried in the footer. */
.langbar {
  display: flex;
  gap: .5rem;
  margin: 0 0 2rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.langbar button {
  font: inherit;
  font-size: .9rem;
  padding: .35rem .85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.langbar button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

[dir="rtl"] { text-align: right; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
[hidden] { display: none !important; }
