/* AllaMenu legal documents — shared stylesheet.
   Deliberately dependency-free: no build step, no CDN, no webfonts.
   These pages are linked from App Store / Google Play listings and must
   render even if every external service is unreachable. */

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --heading: #0f172a;
  --accent: #059669;
  --border: #e2e8f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;
    --surface: #0f172a;
    --text: #cbd5e1;
    --muted: #94a3b8;
    --heading: #f8fafc;
    --accent: #34d399;
    --border: #1e293b;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* Arabic pages set dir="rtl" on <html>; logical properties handle the flip. */
html[dir="rtl"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Naskh Arabic",
    "Geeza Pro", Tahoma, Arial, sans-serif;
  line-height: 1.9;
}

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

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

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

.brand span {
  color: var(--accent);
}

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

a:hover {
  text-decoration: underline;
}

h1 {
  color: var(--heading);
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h2 {
  color: var(--heading);
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  color: var(--heading);
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
}

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

.lede {
  color: var(--muted);
  margin-bottom: 2rem;
}

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

li {
  margin-bottom: 0.4rem;
}

strong {
  color: var(--heading);
}

/* Callout for the app-coverage box at the top of each document. */
.scope {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.scope p {
  margin: 0 0 0.5rem;
}

.scope ul {
  margin: 0;
}

code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.88em;
  /* Bundle IDs are latin even inside RTL text. */
  direction: ltr;
  display: inline-block;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Language switcher / index cards */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 2rem;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--heading);
}

.card span {
  color: var(--muted);
  font-size: 0.9rem;
}
