/* Fajr Wake website: support, privacy policy, terms of use.
   Colours are the app's own (Theme.swift): night navy, purple dawn gradient, warm gold.
   System fonts only, so the site makes no requests to third parties. */
:root {
  --night: #0A0F24;
  --night-2: #101640;
  --purple: #3A2A6E;
  --indigo: #1E2160;
  --surface: rgba(22, 27, 66, .72);
  --surface-2: rgba(32, 36, 86, .78);
  --outline: rgba(143, 168, 255, .18);
  --text: #F3F4FF;
  --muted: #B4B8D6;
  --dawn: #F4B860;
  --dawn-light: #FFE2A8;
  --sky: #8FA8FF;
  --success: #6FD3A0;
  --radius: 20px;
  --font-en: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "SF Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 17px/1.7 var(--font-en);
  background-color: var(--night);
  background-image:
    radial-gradient(70% 45% at 85% -5%, rgba(110, 90, 200, .30), transparent 70%),
    radial-gradient(60% 40% at 10% 0%, rgba(244, 184, 96, .10), transparent 70%),
    linear-gradient(180deg, #060918 0%, var(--night-2) 30%, var(--indigo) 65%, var(--purple) 100%);
  background-attachment: fixed;
}
[lang="ar"] { font-family: var(--font-ar); }
[lang="ar"] body, html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.85; }
body::before { /* the app's eight-point star lattice, very faint */
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .05; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23FFE2A8' stroke-width='1.5'%3E%3Crect x='39' y='39' width='42' height='42'/%3E%3Crect x='39' y='39' width='42' height='42' transform='rotate(45 60 60)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%);
}

/* Language: html[data-lang] shows one language; without JavaScript both stay visible. */
html[data-lang="en"] [data-l="ar"], html[data-lang="ar"] [data-l="en"] { display: none !important; }

a { color: var(--dawn-light); text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 30; background: var(--dawn); color: #1a1205; padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 11, 32, .78); border-bottom: 1px solid var(--outline);
}
.bar { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--dawn-light); font-weight: 700; font-size: 17px; white-space: nowrap; margin-inline-end: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 226, 168, .25), 0 4px 16px rgba(244, 184, 96, .25); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] { color: #1a1205; background: var(--dawn); }
.lang-switch { display: inline-flex; border: 1px solid var(--outline); border-radius: 999px; padding: 2px; background: rgba(255, 255, 255, .04); }
.lang-switch button {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 4px 12px; border-radius: 999px; min-height: 32px;
}
.lang-switch button[aria-pressed="true"] { color: #1a1205; background: var(--dawn-light); }
.no-js .lang-switch { display: none; }

/* Page */
main { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 16px 64px; }
.hero { padding: 48px 0 28px; display: grid; gap: 18px; justify-items: start; }
.hero .icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 0 0 1.5px rgba(255, 226, 168, .25), 0 10px 40px rgba(244, 184, 96, .28); }
.eyebrow { color: var(--dawn); font-weight: 700; letter-spacing: .4px; font-size: 15px; margin: 0; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 52px); line-height: 1.15; letter-spacing: -.5px; color: #fff; }
[lang="ar"] h1 { letter-spacing: 0; line-height: 1.3; }
h1 em, h2 em { font-style: normal; background: linear-gradient(180deg, #FFD58F 0%, #F4B860 55%, #E39A4C 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 0; max-width: 760px; font-size: 19px; color: var(--dawn-light); opacity: .95; }
.meta { margin: 0; color: var(--muted); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 14px;
  font-weight: 700; text-decoration: none; border: 1px solid var(--outline); color: var(--text); background: var(--surface-2);
}
.btn:hover { color: #fff; border-color: rgba(255, 226, 168, .45); }
.btn.primary { color: #1a1205; border: 0; background: linear-gradient(180deg, #FFD58F, #F4B860 60%, #E8A452); box-shadow: 0 8px 24px rgba(244, 184, 96, .25); }
.btn.primary:hover { color: #1a1205; filter: brightness(1.05); }
/* Under the support email button: the address itself and a Copy button, for phones and computers with no email app. */
.mail-fallback { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 15px; }
.mail-fallback strong { color: var(--dawn-light); user-select: all; }
.copy-email {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 36px; padding: 6px 14px; border-radius: 12px;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--outline);
}
.copy-email:hover { color: #fff; border-color: rgba(255, 226, 168, .45); }
.copy-status { color: var(--success); font-weight: 700; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 980px) { .layout.with-toc { grid-template-columns: 260px minmax(0, 1fr); } }
.toc { align-self: start; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 14px; }
@media (min-width: 980px) { .toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; } }
.toc summary { cursor: pointer; font-weight: 700; color: var(--dawn-light); list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; color: var(--dawn); font-size: 20px; }
.toc[open] summary::after { content: "–"; }
.toc ol { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.45; }
.toc a::before { content: counter(toc); color: var(--dawn); font-weight: 700; min-width: 1.4em; }
.toc.plain a::before { content: none; }
.toc a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.content { display: grid; gap: 18px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 22px 22px 18px; min-width: 0; }
@media (max-width: 560px) { .card { padding: 18px 16px 14px; } }
.card > h2 { margin: 0 0 10px; font-size: 23px; line-height: 1.3; color: #fff; display: flex; gap: 10px; align-items: baseline; }
.card > h2 .num { color: var(--dawn); font-size: 17px; min-width: 1.6em; }
h3 { margin: 18px 0 6px; font-size: 18px; color: var(--dawn-light); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-inline-start: 1.4em; }
li { margin: 4px 0; }
li::marker { color: var(--dawn); }
strong { color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.ui { /* a label as it appears in the app */
  display: inline; padding: 1px 7px; border-radius: 7px; background: rgba(244, 184, 96, .13); color: var(--dawn-light);
  border: 1px solid rgba(244, 184, 96, .28); font-weight: 600; white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.platforms { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 6px; }
@media (min-width: 760px) { .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.platform { background: rgba(10, 15, 36, .55); border: 1px solid var(--outline); border-radius: 16px; padding: 14px 16px 6px; min-width: 0; }
.platform > h3:first-child { margin-top: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; letter-spacing: .3px; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.pill.ios { color: #0b1030; background: var(--sky); }
.pill.android { color: #072414; background: var(--success); }
.pill.both { color: #1a1205; background: var(--dawn-light); }
.note { border-inline-start: 3px solid var(--dawn); background: rgba(244, 184, 96, .08); padding: 10px 14px; border-radius: 12px; margin: 10px 0 14px; }
.note.info { border-color: var(--sky); background: rgba(143, 168, 255, .08); }
.summary-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 6px 0 4px; }
.summary-grid div { background: rgba(10, 15, 36, .55); border: 1px solid var(--outline); border-radius: 14px; padding: 12px 14px; }
.summary-grid b { display: block; color: var(--dawn-light); margin-bottom: 2px; }
.tablewrap { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--outline); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--outline); }
th { color: var(--dawn-light); background: rgba(10, 15, 36, .6); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { /* phones: each row becomes a block (what, then why), no sideways scrolling */
  table { min-width: 0; }
  thead { display: none; }
  tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--outline); }
  tr:last-child { border-bottom: 0; }
  td { display: block; padding: 0; border: 0; }
  td + td { margin-top: 6px; color: var(--dawn-light); font-size: 14px; }
}
[lang="ar"] .toc a::before { content: counter(toc, arabic-indic); }
.grid-links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--outline); border-radius: 18px; padding: 18px; }
.tile:hover { border-color: rgba(255, 226, 168, .45); color: #fff; }
.tile b { display: block; color: var(--dawn-light); font-size: 18px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 15px; }
.contact { background: linear-gradient(135deg, rgba(244, 184, 96, .16), rgba(110, 90, 200, .18)); border-color: rgba(244, 184, 96, .35); }
.email { font-size: 20px; font-weight: 800; color: var(--dawn-light); }
[dir="rtl"] .ltr, .ltr { direction: ltr; unicode-bidi: isolate; }

/* Footer */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--outline); background: rgba(6, 9, 24, .6); }
.site-footer .bar { padding: 22px 16px 28px; gap: 10px 18px; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-inline-end: auto; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand span.full { display: none; }
  .nav a { padding: 6px 9px; font-size: 14px; }
  .hero { padding-top: 32px; }
  .lead { font-size: 17px; }
}
@media print {
  .site-header, .site-footer, .toc, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .card, .platform { border-color: #ccc; background: none; }
  a, strong, h1, h2, h3, .ui { color: #000 !important; background: none !important; -webkit-text-fill-color: #000; }
}
