/* alradio.app (T52). Echo's accent — Blue #1D5FD0 / #6AA8FF (DESIGN.md, T44) — on a plain ground, and the icon's
   indigo night for dark mode. Every colour is a token here; pages use classes only (the CSP allows no inline style). */
:root {
  color-scheme: light dark;
  --ground: #F6F7FB;
  --surface: #FFFFFF;
  --ink: #0D1130;
  --muted: #4A5170;
  --accent: #1D5FD0;
  --wave: #16A9D6;
  --rule: #E1E4EE;
  --gap-ground: #FFF5DC;
  --gap-edge: #A86400;
  --icon-shadow: rgb(16 7 105 / 0.22);
  --gutter: 16px;
  --measure: 680px;
  --radius: 16px;
  --font-latin: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0A0920;
    --surface: #131236;
    --ink: #EDEFFA;
    --muted: #A4AAC6;
    --accent: #6AA8FF;
    --wave: #22D8F5;
    --rule: #26254C;
    --gap-ground: #2A2110;
    --gap-edge: #FFC247;
    --icon-shadow: rgb(34 216 245 / 0.14);
  }
}

* { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  font: 17px/1.6 var(--font-latin);
  overflow-wrap: break-word;
}
body:lang(ar) { font-family: var(--font-arabic); line-height: 1.85; }
[lang="en"] { font-family: var(--font-latin); }
[lang="ar"] { font-family: var(--font-arabic); }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* The bar: the wordmark at the start, the other language at the end — the page's direction decides which side. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 12px var(--gutter);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font: 700 21px/1 var(--font-latin);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark svg { width: 24px; height: 24px; flex: none; }
.wordmark path { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

/* The landing page. */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  text-align: center;
}
.app-icon {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 22.5%;
  box-shadow: 0 14px 36px var(--icon-shadow);
}
.hero h1 {
  margin: 32px 0 16px;
  font-size: clamp(34px, 9vw, 60px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero h1:lang(ar) { line-height: 1.45; letter-spacing: 0; }
.version { color: var(--accent); }
.lead { max-width: 32em; margin: 0 0 8px; color: var(--muted); font-size: 19px; text-wrap: pretty; }
.wave { display: block; width: 100%; max-width: 320px; height: auto; margin: 32px auto 0; }
.wave path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wave .w1 { stroke: var(--accent); }
.wave .w2 { stroke: var(--wave); opacity: 0.75; }

/* Terms and privacy. */
.doc { flex: 1; width: 100%; max-width: var(--measure); margin: 0 auto; padding: 24px var(--gutter) 48px; }
.doc h1 { margin: 8px 0 4px; font-size: 32px; line-height: 1.3; letter-spacing: -0.01em; }
.doc h1:lang(ar) { line-height: 1.5; letter-spacing: 0; }
.doc h2 { margin: 36px 0 8px; font-size: 21px; line-height: 1.4; }
.doc h2:lang(ar) { line-height: 1.6; }
.doc h3 { margin: 20px 0 4px; font-size: 17px; line-height: 1.5; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-inline-start: 1.25em; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--accent); }
.updated { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.summary {
  margin: 24px 0 8px;
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.summary h2 { margin-top: 0; font-size: 17px; }
.summary ul { margin-bottom: 0; }
.summary li:last-child { margin-bottom: 0; }
.gap {
  padding: 12px 16px;
  border-inline-start: 4px solid var(--gap-edge);
  border-radius: 8px;
  background: var(--gap-ground);
}

/* The 404, in both languages. */
.missing { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 40px; width: 100%; max-width: var(--measure); margin: 0 auto; padding: 32px var(--gutter) 48px; text-align: center; }
.missing h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.4; }
.missing p { margin: 0; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 24px;
  padding: 16px var(--gutter) 28px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
}
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.foot a[aria-current="page"] { color: var(--ink); text-decoration: none; }
