/* BeenTo — shared styles */
:root {
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --surface-2: #EEEDE8;
  --ink: #141518;
  --ink-2: #44464C;
  --muted: #6E7076;
  --line: rgba(20, 21, 24, 0.08);
  --line-strong: rgba(20, 21, 24, 0.14);
  --accent: #2F6FD0;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(47, 111, 208, 0.10);
  --danger: #C2412D;
  --ok: #2E8B57;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 21, 24, 0.04), 0 8px 24px rgba(20, 21, 24, 0.05);
  --font-latin: "Instrument Sans", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1B1C1F;
    --surface-2: #232428;
    --ink: #F2F1EC;
    --ink-2: #C9C9C6;
    --muted: #9A9BA0;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --accent: #5C95EC;
    --accent-ink: #0E1013;
    --accent-soft: rgba(92, 149, 236, 0.14);
    --danger: #EE7A66;
    --ok: #5FC48D;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:lang(ar) body, body:lang(ar) { font-family: var(--font-arabic); line-height: 1.85; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.lang-switch {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.lang-switch:hover { text-decoration: none; color: var(--ink); border-color: var(--muted); }
.lang-switch[lang="ar"] { font-family: var(--font-arabic); }
.lang-switch[lang="en"] { font-family: var(--font-latin); }

/* Page title */
.page-head { padding: 28px 0 20px; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
:lang(ar) .eyebrow { letter-spacing: 0; text-transform: none; }
h1 {
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0;
}
:lang(ar) h1 { letter-spacing: 0; line-height: 1.3; }
.lede { color: var(--ink-2); font-size: 17px; margin: 12px 0 0; }
.meta { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  margin: 0 0 14px;
}
@media (min-width: 640px) { .card { padding: 28px 30px; } }

.card.summary { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.summary ul { margin: 0; padding-inline-start: 20px; }
.summary li { margin: 4px 0; }
.summary h2 { margin-top: 0; }

/* Prose */
.prose h2 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 10px;
}
.prose h3 { font-size: 16px; font-weight: 600; margin: 20px 0 6px; }
.prose p { margin: 0 0 12px; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 12px; padding-inline-start: 22px; color: var(--ink-2); }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose > :last-child, .prose .card > :last-child { margin-bottom: 0; }
:lang(ar) .prose h2, :lang(ar) .prose h3 { letter-spacing: 0; }

.path {
  display: inline-block;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 1px 8px;
  white-space: nowrap;
}

.table-wrap { overflow-x: auto; margin: 0 0 12px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: start; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
th { color: var(--ink); font-weight: 600; font-size: 14px; }
tr:last-child td { border-bottom: 0; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0 !important; margin: 0 0 12px; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 42px; margin: 0 0 14px; min-height: 28px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 12px 28px 12px 0;
  position: relative;
}
[dir="rtl"] .faq summary { padding: 12px 0 12px 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 12px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line-strong); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }

.contact-card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-card p { margin: 0; }

/* Landing */
.hero { text-align: center; padding: 56px 0 28px; }
.hero img.logo { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 22px; box-shadow: 0 12px 32px rgba(20, 21, 24, 0.18); }
.hero h1 { font-size: clamp(38px, 10vw, 56px); }
.hero .lede { font-size: 19px; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 2px;
  color: var(--ink);
  font-weight: 500;
}
.link-list a:hover { text-decoration: none; color: var(--accent); }
.link-list a span.sub { color: var(--muted); font-weight: 400; font-size: 14px; }
.link-list a::after { content: "›"; color: var(--muted); font-size: 22px; line-height: 1; }
[dir="rtl"] .link-list a::after { content: "‹"; }
.link-list .txt { display: flex; flex-direction: column; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 0; }
.pill {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

/* Footer */
.site-footer {
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-footer a { color: var(--ink-2); }
.site-footer p { margin: 0; }

.toc { columns: 1; margin: 0; padding-inline-start: 20px; }
@media (min-width: 640px) { .toc { columns: 2; column-gap: 32px; } }
.toc li { break-inside: avoid; margin: 3px 0; }

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

[hidden] { display: none !important; }
