/* Oxera legal pages — shared stylesheet (RTL/LTR, responsive, dark mode) */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --badge-bg: #1e3a5f;
  --badge-text: #ffffff;
  --note-bg: #f1f5f9;
  --note-border: #cbd5e1;
  --link: #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --accent: #60a5fa;
    --accent-soft: #1e3a5f;
    --badge-bg: #3b82f6;
    --note-bg: #1e293b;
    --note-border: #475569;
    --link: #60a5fa;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

[dir="rtl"] body {
  text-align: right;
}

[dir="ltr"] body {
  text-align: left;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  width: fit-content;
}

.lang-toggle {
  display: flex;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.lang-toggle a {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
}

.lang-toggle a.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.lang-toggle a:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--text);
}

p {
  margin: 0.75rem 0;
}

ul {
  margin: 0.5rem 0 0.75rem;
  padding-inline-start: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.meta code {
  font-size: 0.85em;
  background: var(--note-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

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

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a {
  margin-inline-end: 1rem;
}
