/* Majd legal pages — same palette as the app so these read as part of the
   product rather than a bolted-on legal afterthought. */

:root {
  --obsidian: #000;
  --surface: #0b0b0b;
  --raised: #161616;
  --hairline: #1f1f1f;
  --gold: #d4af37;
  --gold-pale: #f3e3b0;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --dim: #5c5c5c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Arabic needs more vertical room and no letter-spacing — it is cursive, so
   tracking would break words apart. Same rule the app's theme follows. */
body[dir="rtl"] {
  font-family: "Segoe UI", system-ui, "Noto Naskh Arabic", sans-serif;
  line-height: 1.95;
  letter-spacing: 0;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

header { border-bottom: 1px solid var(--hairline); padding-bottom: 1.5rem; margin-bottom: 2rem; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.wordmark {
  font-size: 1.6rem;
  letter-spacing: 0.5em;
  font-weight: 300;
  margin: 0;
  color: var(--text);
}
body[dir="rtl"] .wordmark { letter-spacing: 0; font-size: 2rem; }

.toggle { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--hairline); border-radius: 100px; background: var(--surface); }
.toggle button {
  border: 1px solid transparent; background: none; color: var(--muted);
  padding: 0.35rem 0.9rem; border-radius: 100px; cursor: pointer;
  font-size: 0.8rem; font-family: inherit;
}
.toggle button[aria-pressed="true"] {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.55);
  font-weight: 700;
}

h1 { font-size: 1.75rem; font-weight: 400; margin: 0 0 0.4rem; }
h2 { font-size: 1.05rem; margin: 2.4rem 0 0.6rem; color: var(--gold-pale); font-weight: 600; }
.updated { color: var(--dim); font-size: 0.85rem; margin: 0; }

p, li { color: var(--muted); }
strong { color: var(--text); font-weight: 600; }
ul { padding-inline-start: 1.2rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--gold); text-decoration-color: rgba(212, 175, 55, 0.4); }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
}
.card.good { border-color: rgba(212, 175, 55, 0.4); background: rgba(212, 175, 55, 0.05); }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
th, td { text-align: start; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { color: var(--text); font-weight: 600; }
td { color: var(--muted); }

footer { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); color: var(--dim); font-size: 0.85rem; }
footer a { margin-inline-end: 1rem; }

[data-lang] { display: none; }
[data-lang].on { display: block; }
