/* Dubai Font: the free typeface from dubaifont.com, the same family the official tourism site uses.
   It is used when installed on the Mac (local) or when its files sit in web/fonts/ (see README). */
@font-face { font-family: "Dubai"; font-weight: 300; font-display: swap;
  src: local("Dubai Light"), local("Dubai-Light"), url("./fonts/Dubai-Light.woff2") format("woff2"), url("./fonts/Dubai-Light.ttf") format("truetype"); }
@font-face { font-family: "Dubai"; font-weight: 400; font-display: swap;
  src: local("Dubai Regular"), local("Dubai-Regular"), local("Dubai"), url("./fonts/Dubai-Regular.woff2") format("woff2"), url("./fonts/Dubai-Regular.ttf") format("truetype"); }
@font-face { font-family: "Dubai"; font-weight: 500; font-display: swap;
  src: local("Dubai Medium"), local("Dubai-Medium"), url("./fonts/Dubai-Medium.woff2") format("woff2"), url("./fonts/Dubai-Medium.ttf") format("truetype"); }
@font-face { font-family: "Dubai"; font-weight: 700; font-display: swap;
  src: local("Dubai Bold"), local("Dubai-Bold"), url("./fonts/Dubai-Bold.woff2") format("woff2"), url("./fonts/Dubai-Bold.ttf") format("truetype"); }

/* Install guide: same palette and type as the landing page, but a normal scrolling document. */
:root { --teal: #00a6c7; --magenta: #d4147d; --magenta-deep: #b90f6c; --charcoal: #252b32; --mist: #c9d2d8;
  --muted: rgba(201, 210, 216, 0.88); --line: rgba(201, 210, 216, 0.2); --ease: cubic-bezier(0.22, 1, 0.36, 1); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #1b2026; color: #fff; font-family: "Dubai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300; line-height: 1.6; }
a { color: var(--teal); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
kbd { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff; background: rgba(255, 255, 255, 0.07); padding: 1px 5px; border-radius: 5px; }

.bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 14px 24px;
  background: rgba(27, 32, 38, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand span { color: var(--teal); margin-left: 6px; font-weight: 500; }
.bar-links { display: flex; gap: 4px; }
.bar-links a { padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.bar-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.bar-links a[aria-current="page"] { color: #fff; background: rgba(0, 166, 199, 0.16); }

/* Two columns on wide screens: a sticky table of contents beside the document. */
.page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; width: min(1120px, 100%); margin: 0 auto; padding: 0 24px; }
.side { position: relative; }
.doc { min-width: 0; max-width: 800px; padding: 48px 0 24px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); font-weight: 500; }
h1 { margin: 0; font-size: clamp(36px, 6vw, 60px); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.lede { margin: 16px 0 0; font-size: 19px; color: var(--muted); max-width: 640px; }
h2 { margin: 0 0 14px; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
section { margin-top: 20px; padding: 26px 28px; scroll-margin-top: 80px; border: 1px solid var(--line); border-radius: 20px; background: rgba(37, 43, 50, 0.35); }
section > :last-child { margin-bottom: 0; }
section p { color: var(--muted); }
b { color: #fff; font-weight: 500; }

.toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; padding-top: 48px; }
.toc a { padding: 8px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.toc a:hover { color: #fff; border-left-color: var(--teal); background: rgba(0, 166, 199, 0.06); }

.hero-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 28px; padding: 20px; border-radius: 20px;
  border: 1px solid rgba(0, 166, 199, 0.4); background: linear-gradient(135deg, rgba(0, 166, 199, 0.14), rgba(212, 20, 125, 0.08)); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.facts li, .ways li { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(27, 32, 38, 0.5); }
.facts span, .ways span { color: var(--muted); font-size: 13px; }
.ways { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 18px 18px 18px 64px; border: 1px solid var(--line); border-radius: 16px; background: rgba(37, 43, 50, 0.6); }
.steps > li + li { margin-top: 12px; }
.steps > li::before { content: counter(step); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 166, 199, 0.15); border: 1px solid rgba(0, 166, 199, 0.5); color: var(--teal); font-weight: 700; }
.steps p { margin: 0; }
.dl-button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px;
  background: var(--magenta); color: #fff; text-decoration: none; font-weight: 700; transition: background 200ms var(--ease); }
.dl-button:hover { background: var(--magenta-deep); }
.plain { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.plain li + li { margin-top: 4px; }
.card .code + .code { margin-top: 10px; }
.card { padding: 6px 18px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(37, 43, 50, 0.6); }

.code { display: flex; align-items: stretch; gap: 8px; margin-top: 12px; }
.code pre { flex: 1; min-width: 0; margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(0, 166, 199, 0.35);
  background: rgba(0, 166, 199, 0.07); font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }
.code button { flex: none; width: 84px; border-radius: 10px; border: 1px solid var(--magenta); background: var(--magenta); color: #fff;
  font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: background 200ms var(--ease); }
.code button:hover { background: var(--magenta-deep); }

.checks, .crosses { list-style: none; margin: 0; padding: 0; }
.checks li, .crosses li { position: relative; padding-left: 26px; color: var(--muted); }
.checks li + li, .crosses li + li { margin-top: 8px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.crosses li::before { content: "×"; position: absolute; left: 2px; color: var(--magenta); font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two > div { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(37, 43, 50, 0.6); }

table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
th { color: #fff; font-weight: 500; }
.note { font-size: 14px; }
.foot { width: min(1120px, 100%); margin: 40px auto 0; padding: 24px 24px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.foot nav a { color: var(--mist); text-decoration: underline; text-decoration-color: rgba(201, 210, 216, 0.35); text-underline-offset: 4px; font-size: 14px; font-weight: 500; }
.foot nav a:hover { color: var(--teal); text-decoration-color: currentColor; }
.foot p { margin: 0; }
.foot p a { color: var(--mist); }
#laws { margin-top: 28px; scroll-margin-top: 80px; }
.laws td:first-child { font-weight: 500; color: var(--mist); width: 42%; }
.faq { display: grid; gap: 8px; margin-top: 14px; }
.faq details { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(27, 32, 38, 0.5); padding: 0 14px;
  transition: border-color 250ms var(--ease), background-color 250ms var(--ease); }
.faq details:hover { border-color: rgba(0, 166, 199, 0.45); }
.faq details.expanded { border-color: rgba(0, 166, 199, 0.55); background: rgba(27, 32, 38, 0.8); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 12px 0; list-style: none;
  font-weight: 500; color: #fff; transition: color 250ms var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 320ms var(--ease); }
.faq details.expanded summary { color: var(--teal); }
.faq details.expanded summary::after { transform: rotate(225deg); margin-top: 3px; }
.faq summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.faq details p { margin: 0 0 14px; color: var(--muted); }
.faq.anim details p { opacity: 0; transform: translateY(-4px); transition: opacity 280ms var(--ease), transform 320ms var(--ease); }
.faq.anim details.expanded p { opacity: 1; transform: none; transition-delay: 60ms; }
@media (prefers-reduced-motion: reduce) {
  .faq summary::after, .faq.anim details p { transition: none; }
}

/* Privacy and terms pages */
.legal h2 { font-size: 21px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.updated { margin-top: 10px; color: var(--muted); font-size: 14px; }
.summary { margin-top: 28px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 30; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border-radius: 12px;
  border: 1px solid rgba(0, 166, 199, 0.5); background: rgba(37, 43, 50, 0.97); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); animation: toast-in 260ms var(--ease); }
.toast[hidden] { display: none; }
.toast b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.toast b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.toast code { display: block; margin-top: 6px; padding: 0; background: none; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.error { border-color: rgba(212, 20, 125, 0.6); }
.toast.error code { white-space: normal; overflow: visible; text-overflow: clip; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 900px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  .side { display: none; }
  .doc { padding-top: 32px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .bar { padding: 12px 16px; }
  .bar-links a { padding: 6px 8px; font-size: 13px; }
  .bar-links a:last-child { display: none; }
  section { padding: 20px 16px; }
  .ways { grid-template-columns: minmax(0, 1fr); }
  .foot { padding: 20px 16px 32px; }
  .two { grid-template-columns: 1fr; }
  .steps > li { padding: 58px 14px 16px; }
  .steps > li::before { left: 14px; top: 16px; }
  .card { padding: 2px 14px 16px; }
  .dl-button { width: 100%; }
  .code { flex-direction: column; }
  .code button { width: 100%; min-height: 44px; }
  table { display: block; overflow-x: auto; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .toast { animation: none; } }
.legal ul.checks { padding-left: 0; }

/* language switcher (js/i18n.js) and Arabic */
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(10, 22, 32, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); direction: ltr; }
.lang-switch button { min-width: 46px; padding: 6px 12px; border: 0; border-radius: 999px; cursor: pointer; background: transparent;
  color: rgba(255, 255, 255, 0.72); font: 600 13px/1 -apple-system, "SF Arabic", "Geeza Pro", "Segoe UI", system-ui, sans-serif; transition: background 0.2s, color 0.2s; }
.lang-switch button[lang="ar"] { font-size: 14px; }
.lang-switch button:hover { color: #fff; }
.lang-switch button[aria-pressed="true"] { background: #fff; color: #0b1a26; }
.lang-switch button:focus-visible { outline: 2px solid #00a6c7; outline-offset: 2px; }
[dir="rtl"] body { font-family: "Dubai", -apple-system, "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] kbd, [dir="rtl"] code, [dir="rtl"] pre { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .eyebrow, [dir="rtl"] h1, [dir="rtl"] h2 { letter-spacing: 0; text-transform: none; }
.keys { display: inline-flex; gap: 3px; direction: ltr; unicode-bidi: isolate; vertical-align: baseline; }
.lang-slot { margin-left: 14px; display: inline-flex; }
[dir="rtl"] .lang-slot { margin-left: 0; margin-right: 14px; }
.ar-notice { margin: 0 0 24px; padding: 14px 16px; border-radius: 12px; line-height: 1.8; background: rgba(0, 166, 199, 0.1);
  border: 1px solid rgba(0, 166, 199, 0.35); color: rgba(255, 255, 255, 0.92); }
.ar-notice span { display: block; margin-top: 6px; color: rgba(255, 255, 255, 0.65); font-size: 0.92em; }
/* on the legal pages the binding text stays English, so it keeps reading left to right under the Arabic notice */
[dir="rtl"] body[data-legal] .doc > :not(.ar-notice):not(.eyebrow),
[dir="rtl"] body[data-legal] .toc { direction: ltr; text-align: left; }
.brand { white-space: nowrap; }
