:root {
  color-scheme: dark;
  --faq-bg: #050505;
  --faq-surface: #0b0b0b;
  --faq-text: #f1efe9;
  --faq-muted: #aaa69d;
  --faq-line: #292722;
  --faq-gold: #d2aa5c;
  --faq-display: "Amiri", Georgia, serif;
  --faq-body: "Noto Sans Arabic", "Segoe UI", sans-serif;
  --faq-utility: "Figtree", "Segoe UI", sans-serif;
}

html[lang="en"] {
  --faq-display: "Fraunces", Georgia, serif;
  --faq-body: "Figtree", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--faq-bg);
  color: var(--faq-text);
  font-family: var(--faq-body);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--faq-gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  padding: 8px 13px;
  background: var(--faq-text);
  color: var(--faq-bg);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.faq-shell {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  /* env(safe-area-inset-top) keeps the header clear of notched displays. */
  padding: calc(22px + env(safe-area-inset-top, 0px)) 0 72px;
}

.faq-topbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--faq-line);
}

.faq-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.faq-brand img {
  width: 34px;
  height: 34px;
}

.faq-brand strong {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
}

.faq-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.faq-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--faq-muted);
  font: 650 0.77rem/1 var(--faq-body);
  text-decoration: none;
}

.faq-nav a:hover,
.faq-nav a[aria-current="page"] { color: var(--faq-text); }

/* Solid "back to the site" pill, mirroring .home-button on the legal pages
   so all three footer documents land with the same visible exit. */
.faq-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 10px;
  padding: 0 13px;
  background: var(--faq-text);
  color: #090704;
  font: 700 0.78rem/1 var(--faq-utility);
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.faq-home-button:hover {
  background: var(--faq-gold);
}

.faq-nav .language-link {
  color: var(--faq-gold);
  font-family: var(--faq-utility);
  letter-spacing: 0.05em;
}

.faq-hero {
  padding: clamp(70px, 12vw, 126px) 0 clamp(52px, 8vw, 82px);
  border-bottom: 1px solid var(--faq-line);
}

.faq-kicker {
  margin: 0 0 13px;
  color: var(--faq-gold);
  font: 700 0.72rem/1.4 var(--faq-utility);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.faq-hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--faq-display);
  font-size: clamp(2.7rem, 8vw, 5.4rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.faq-intro {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--faq-muted);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
}

.faq-list { padding-top: 20px; }

.faq-group {
  margin-top: 58px;
}

.faq-group h2 {
  margin: 0 0 5px;
  color: var(--faq-muted);
  font: 700 0.72rem/1.4 var(--faq-utility);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.faq-item {
  position: relative;
  border-bottom: 1px solid var(--faq-line);
}

.faq-item:first-of-type { border-top: 1px solid var(--faq-line); }

.faq-item[open]::before {
  content: "";
  position: absolute;
  inset-block: 22px;
  inset-inline-start: 0;
  width: 2px;
  background: var(--faq-gold);
}

.faq-item summary {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 4px;
  color: var(--faq-text);
  font-size: clamp(1rem, 2vw, 1.13rem);
  font-weight: 700;
  line-height: 1.55;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--faq-gold);
  font: 400 1.45rem/1 var(--faq-utility);
}

.faq-item[open] summary::after { content: "−"; }

.faq-answer {
  max-width: 740px;
  padding: 0 28px 28px 4px;
  color: var(--faq-muted);
}

[dir="rtl"] .faq-answer { padding: 0 4px 28px 28px; }

.faq-answer p { margin: 0 0 14px; }
.faq-answer p:last-child { margin-bottom: 0; }

.faq-answer a {
  color: var(--faq-text);
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--faq-gold) 70%, transparent);
}

.faq-answer a:hover { color: var(--faq-gold); }

.faq-contact {
  margin-top: 74px;
  padding-top: 30px;
  border-top: 1px solid var(--faq-line);
}

.faq-contact h2 {
  margin: 0 0 8px;
  font-family: var(--faq-display);
  font-size: 1.8rem;
  font-weight: 500;
}

.faq-contact p {
  margin: 0;
  color: var(--faq-muted);
}

.faq-contact a { color: var(--faq-gold); }

.faq-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 70px;
  padding-top: 22px;
  border-top: 1px solid var(--faq-line);
  color: var(--faq-muted);
  font: 600 0.75rem/1.7 var(--faq-utility);
}

.faq-footer nav { display: flex; gap: 18px; }
.faq-footer a { text-decoration: none; }
.faq-footer a:hover { color: var(--faq-text); }

@media (max-width: 680px) {
  .faq-shell { width: min(100% - 28px, 920px); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .faq-topbar { flex-direction: column; align-items: stretch; gap: 3px; padding: 9px 0 14px; }
  .faq-brand { align-self: flex-start; }
  .faq-nav { width: 100%; flex-wrap: nowrap; justify-content: space-between; }
  .faq-nav a { min-height: 36px; padding: 0 7px; font-size: 0.7rem; }
  .faq-home-button { min-height: 36px; padding: 0 9px; font-size: 0.7rem; }
  .faq-hero { padding-top: 64px; }
  .faq-group { margin-top: 44px; }
  .faq-item summary { min-height: 68px; gap: 14px; padding-block: 17px; }
  .faq-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
