/* OpenTune Arabic website. One stylesheet for every page.
   Dark room, a soft green-to-amber glow, frosted glass cards, mint accents.
   Written with logical properties so the same rules serve Arabic (rtl) and English (ltr). */

/* ---------- Fonts (self-hosted, OFL). Only the family in use is ever downloaded. ---------- */
@font-face { font-family: "Outfit"; src: url("outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSansArabic-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSansArabic-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSansArabic-500-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSansArabic-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("fonts/IBMPlexSansArabic-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("fonts/IBMPlexSansArabic-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url("fonts/ReadexPro-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url("fonts/ReadexPro-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url("fonts/ReadexPro-500-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url("fonts/ReadexPro-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 700; font-display: swap; src: url("fonts/ReadexPro-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 700; font-display: swap; src: url("fonts/ReadexPro-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url("fonts/Tajawal-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url("fonts/Tajawal-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url("fonts/Tajawal-500-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url("fonts/Tajawal-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url("fonts/Tajawal-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url("fonts/Tajawal-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Noto Kufi Arabic"; font-weight: 400; font-display: swap; src: url("fonts/NotoKufiArabic-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 400; font-display: swap; src: url("fonts/NotoKufiArabic-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 500; font-display: swap; src: url("fonts/NotoKufiArabic-500-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 500; font-display: swap; src: url("fonts/NotoKufiArabic-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 700; font-display: swap; src: url("fonts/NotoKufiArabic-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 700; font-display: swap; src: url("fonts/NotoKufiArabic-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+200F-2069, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #050a08;
  --ink: #f3f8f6;
  --ink-2: #c5d3ce;
  --ink-3: #8ea49b;
  --mint: #7de3b8;
  --mint-2: #54cb9d;
  --mint-ink: #032418;
  --mint-tint: rgb(125 227 184 / 0.16);
  --mint-line: rgb(125 227 184 / 0.32);
  --amber: #e9b94f;
  --line: rgb(255 255 255 / 0.13);
  --line-2: rgb(255 255 255 / 0.22);
  --glass: linear-gradient(155deg, rgb(255 255 255 / 0.085), rgb(255 255 255 / 0.03) 60%);
  --glass-flat: rgb(255 255 255 / 0.05);
  --glass-hi: rgb(255 255 255 / 0.1);

  --font-ar: "IBM Plex Sans Arabic";
  --font-text: var(--font-ar), "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --ls: 0;
  --lh: 1.75;

  --step--1: clamp(0.86rem, 0.84rem + 0.1vw, 0.93rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.15rem, 1.07rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.25rem + 1vw, 2rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.4vw, 3.2rem);
  --step-4: clamp(2.3rem, 1.3rem + 4.8vw, 4.6rem);

  --gutter: clamp(16px, 4.5vw, 44px);
  --max: 1180px;
  --radius: 28px;
  --radius-sm: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html[data-font="plex"] { --font-ar: "IBM Plex Sans Arabic"; }
html[data-font="readex"] { --font-ar: "Readex Pro"; }
html[data-font="tajawal"] { --font-ar: "Tajawal"; }
html[data-font="kufi"] { --font-ar: "Noto Kufi Arabic"; }
/* English keeps a clean Latin face; Arabic fallbacks still come from the chosen family. */
html[lang="en"] { --font-text: "Outfit", var(--font-ar), "IBM Plex Sans Arabic", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --ls: -0.01em; --lh: 1.6; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100svh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-text); font-size: var(--step-0); line-height: var(--lh); letter-spacing: 0;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
/* The glow: green at the top corner, amber at the other, deep blue at the foot. Fixed, so it never scrolls. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 46% at 0% 0%, rgb(22 128 86 / 0.62), transparent 70%),
    radial-gradient(60% 40% at 100% 2%, rgb(168 122 24 / 0.42), transparent 72%),
    radial-gradient(80% 46% at 100% 100%, rgb(24 56 128 / 0.38), transparent 70%),
    radial-gradient(60% 40% at 0% 100%, rgb(12 70 60 / 0.3), transparent 70%);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--mint); text-underline-offset: 4px; }
a:hover { color: #a6f0d2; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; text-wrap: balance; letter-spacing: var(--ls); }
h1 { font-size: var(--step-4); line-height: 1.18; }
h2 { font-size: var(--step-3); line-height: 1.22; }
h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.4; }
code, kbd, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
bdi { unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
::selection { background: var(--mint); color: var(--mint-ink); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: var(--bg); }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.muted { color: var(--ink-3); }
.lede { font-size: var(--step-1); line-height: 1.7; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
/* Directional icons: drawn pointing "forward" in LTR, mirrored in RTL. */
[dir="rtl"] .flip { transform: scaleX(-1); }
svg.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1), 0 24px 60px -34px rgb(0 0 0 / 0.8);
}
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; border-radius: 999px;
  background: var(--mint-tint); color: var(--mint); font-size: var(--step--1); font-weight: 700; line-height: 1.7; white-space: nowrap;
}
.pill.plain { background: var(--glass-flat); color: var(--ink-2); font-weight: 500; }
.dot { width: 46px; height: 46px; border-radius: 50%; background: var(--mint-tint); color: var(--mint); display: grid; place-items: center; flex: none; }
.dot svg { width: 22px; height: 22px; }
.dot.square { border-radius: 16px; background: var(--glass-hi); width: 54px; height: 54px; }
.bar { height: 12px; border-radius: 999px; background: var(--glass-flat); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint-2), var(--mint)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 24px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.4; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--glass-flat); color: var(--ink);
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover { background: var(--glass-hi); color: var(--ink); border-color: rgb(255 255 255 / 0.34); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); box-shadow: 0 14px 34px -14px rgb(125 227 184 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.4); }
.btn-primary:hover { background: #99efc9; border-color: #99efc9; color: var(--mint-ink); }
.btn-sm { min-height: 42px; padding: 6px 18px; font-size: 0.95rem; }
.btn .sub { font-weight: 500; opacity: 0.75; font-size: 0.88em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* ---------- Header ---------- */
.nav { position: sticky; top: 0; z-index: 30; padding-top: 12px; }
.nav-in {
  display: flex; align-items: center; gap: 8px; min-height: 62px; padding-block: 8px; padding-inline: 18px 9px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgb(10 18 15 / 0.6);
  backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 14px 40px -18px rgb(0 0 0 / 0.75);
}
.nav.scrolled .nav-in { background: rgb(8 14 12 / 0.82); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.12rem; white-space: nowrap; margin-inline-end: auto; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .brand { direction: rtl; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 11px; }
.brand b { font-weight: 700; }
.brand span { color: var(--mint); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 0.98rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); background: var(--glass-hi); }
.ctrls { display: flex; align-items: center; gap: 6px; }
.ctrl {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.ctrl:hover { background: var(--glass-hi); color: var(--ink); }
.fontsel { position: relative; display: inline-flex; align-items: center; direction: ltr; }
.fontsel select {
  appearance: none; -webkit-appearance: none; min-height: 42px; max-width: 200px; padding-block: 6px; padding-inline: 14px 34px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; text-overflow: ellipsis; text-align: start;
}
.fontsel select option { background: #0c1512; color: var(--ink); }
.fontsel::after { content: ""; position: absolute; inset-inline-end: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.nav .btn { min-height: 44px; padding: 6px 20px; font-size: 0.95rem; }
.nav .btn .short, .tabbar { display: none; }
@media (max-width: 960px) { .nav-links .opt { display: none; } }

/* ---------- Phones: a slim top bar plus a fixed bottom tab bar, like an app ---------- */
@media (max-width: 760px) {
  .nav { padding-top: max(8px, env(safe-area-inset-top)); }
  .nav-in { min-height: 54px; padding-block: 5px; padding-inline: 14px 6px; gap: 6px; }
  .nav-main { display: none; }
  .nav .btn { min-height: 44px; min-width: 44px; padding: 6px 16px; gap: 6px; }
  .nav .btn .long { display: none; }
  .nav .btn .short { display: inline; }
  .ctrl, .fontsel select, .nav .brand { min-height: 44px; }
  .fontsel select { max-width: 120px; }

  body.has-tabbar { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .tabbar { display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; padding: 0 12px calc(10px + env(safe-area-inset-bottom)); pointer-events: none; }
  .tabbar ul {
    pointer-events: auto; display: flex; gap: 2px; max-width: 460px; margin: 0 auto; padding: 5px; list-style: none;
    border-radius: 28px; border: 1px solid var(--line);
    background: rgb(10 18 15 / 0.72);
    backdrop-filter: saturate(1.6) blur(22px); -webkit-backdrop-filter: saturate(1.6) blur(22px);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 14px 40px -12px rgb(0 0 0 / 0.85);
  }
  .tabbar li { flex: 1 1 0; min-width: 0; }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 6px 2px;
    border-radius: 22px; color: var(--ink-3); text-decoration: none; font-size: 0.72rem; font-weight: 600; line-height: 1.2; text-align: center;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .i { width: 22px; height: 22px; }
  .tabbar a:hover { color: var(--ink); }
  .tabbar a[aria-current] { color: var(--mint); background: var(--mint-tint); box-shadow: inset 0 0 0 1px var(--mint-line); }
  .tabbar a:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
  html { scroll-padding-top: 84px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .tabbar a { transition: none; } }
@media (max-width: 480px) {
  .nav .btn { padding: 6px; }
  .nav .btn .short { display: none; }
  .nav .btn svg { width: 22px; height: 22px; }
  .nav .brand span { display: none; }
}
@media (max-width: 420px) {
  .fontsel select { max-width: 104px; padding-inline: 10px 28px; font-size: 0.85rem; }
  .fontsel::after { inset-inline-end: 11px; }
  .ctrl { padding-inline: 12px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
}
@media (max-width: 340px) { .tabbar a { font-size: 0.66rem; } .tabbar ul { gap: 0; padding: 4px; } }
@media (max-width: 380px) { .nav .brand b, .nav .brand span { display: none; } .nav .brand { min-width: 44px; justify-content: center; } }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(32px, 6vw, 80px) clamp(24px, 4vw, 48px); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy h1 { margin: 18px 0 18px; }
.hero-copy h1 em { font-style: normal; color: var(--mint); }
.hero-copy .lede { margin-bottom: 28px; }
.hero-meta { margin: 18px 0 0; color: var(--ink-3); font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
.status { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; margin-top: 30px; max-width: 520px; }
.status .bar { grid-column: 1 / -1; }
.status b { display: block; font-size: 1.05rem; line-height: 1.4; }
.status small { color: var(--ink-3); font-size: var(--step--1); }
.phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 460px; direction: ltr; }
.phone { width: min(46%, 250px); border-radius: 34px; padding: 6px; background: linear-gradient(160deg, rgb(255 255 255 / 0.28), rgb(255 255 255 / 0.06)); box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.9); }
.phone img { border-radius: 29px; width: 100%; aspect-ratio: 640 / 1387; object-fit: cover; background: #0b1210; }
.phone.a { transform: translate(-14%, 3%) rotate(-5deg); z-index: 2; }
.phone.b { transform: translate(14%, -3%) rotate(5deg); margin-inline-start: -18%; }
.float { position: absolute; z-index: 3; padding: 9px 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; direction: rtl; }
[dir="ltr"] .float { direction: ltr; }
.float svg { width: 18px; height: 18px; color: var(--mint); }
.float.f1 { top: 12%; inset-inline-start: 0; }
.float.f2 { bottom: 12%; inset-inline-end: 0; }
@media (max-width: 880px) {
  .hero-in { grid-template-columns: 1fr; }
  .phones { min-height: 0; padding-block: 10px; }
  .phone { width: min(42%, 210px); }
}
@media (max-width: 420px) { .float { display: none; } .hero-copy .btn-row .btn { flex: 1 1 100%; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(36px, 7vw, 88px); }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); max-width: 44em; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--ink-2); font-size: var(--step-1); margin: 0; text-wrap: pretty; }
.eyebrow { display: block; margin-bottom: 10px; }

.platforms { padding-block: 10px; }
.platforms ul { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.platforms li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink-2); font-size: var(--step--1); font-weight: 500; }
.platforms li svg { color: var(--mint); width: 18px; height: 18px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat { padding: 24px; display: grid; gap: 14px; align-content: start; }
.feat h3 { font-size: 1.12rem; margin-bottom: 4px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 0.97rem; line-height: 1.75; }
.feat.hl { grid-column: span 2; background: linear-gradient(155deg, rgb(125 227 184 / 0.16), rgb(255 255 255 / 0.03) 70%); border-color: var(--mint-line); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feat.hl { grid-column: 1 / -1; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } .feat { padding: 20px; } }
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: var(--step--1); background: var(--glass-flat); }

/* Screenshots: a row to swipe through. It starts at the reading edge in either direction. */
.shots { --edge: max(var(--gutter), calc((100vw - var(--max)) / 2)); display: flex; gap: 18px; overflow-x: auto; padding-block: 6px 22px; padding-inline: var(--edge); scroll-snap-type: x proximity; scroll-padding-inline: var(--edge); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.shots figure { margin: 0; flex: 0 0 clamp(190px, 52vw, 250px); scroll-snap-align: start; }
.shots .screen { padding: 6px; border-radius: 32px; background: linear-gradient(160deg, rgb(255 255 255 / 0.26), rgb(255 255 255 / 0.05)); box-shadow: 0 30px 60px -30px #000; }
.shots img { border-radius: 27px; width: 100%; aspect-ratio: 640 / 1387; object-fit: cover; background: #0b1210; }
.shots figcaption { padding: 14px 6px 0; font-size: 0.95rem; color: var(--ink-2); line-height: 1.6; }
.shots figcaption b { display: block; color: var(--ink); font-size: 1rem; }
.shots-note { margin-top: 4px; color: var(--ink-3); font-size: var(--step--1); }

/* Downloads */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dl { padding: 26px; display: grid; gap: 14px; align-content: start; }
.dl { min-width: 0; }
.dl.wide { grid-column: 1 / -1; }
.dl-head { display: flex; align-items: center; gap: 14px; }
.dl-head h3 { margin: 0; }
.dl-head small { display: block; color: var(--ink-3); font-weight: 400; font-size: var(--step--1); }
.dl p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.dl .note { color: var(--ink-3); font-size: var(--step--1); }
.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--glass-flat); text-decoration: none; color: var(--ink); transition: background-color 0.2s, border-color 0.2s; }
.file:hover { background: var(--glass-hi); border-color: var(--mint-line); color: var(--ink); }
.file b { font-weight: 700; flex: 1; min-width: 0; }
.file small { color: var(--ink-3); font-weight: 500; }
.file small.ltr { white-space: nowrap; }
@media (max-width: 520px) { .file { flex-wrap: wrap; row-gap: 2px; } .file b { flex: 1 1 40%; } .file small:not(.ltr) { order: 5; flex: 1 0 100%; padding-inline-start: 2.1em; } }
.file svg { color: var(--mint); }
.file.main { background: var(--mint-tint); border-color: var(--mint-line); }
.file[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }
.file em { font-style: normal; font-size: 0.8rem; color: var(--mint); background: var(--mint-tint); padding: 1px 10px; border-radius: 999px; }
@media (max-width: 760px) { .dl-grid { grid-template-columns: minmax(0, 1fr); } .dl { padding: 20px; } }

/* Install steps: round icons joined by a line, as a timeline. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 46px 1fr; gap: 16px; position: relative; padding-bottom: 22px; }
.steps li:last-child { padding-bottom: 0; }
.steps li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 22px; top: 50px; bottom: 4px; width: 2px; background: var(--mint-line); border-radius: 2px; }
.steps b { display: block; font-size: 1.08rem; line-height: 1.5; margin-top: 2px; }
.steps span.t { color: var(--ink-2); font-size: 0.97rem; }
.install { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; }
.install > .glass { padding: 26px; }
.install h3 { margin-bottom: 18px; }
.verify code { overflow-wrap: anywhere; background: var(--glass-flat); padding: 2px 8px; border-radius: 8px; font-size: 0.86em; }
.verify p { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 880px) { .install { grid-template-columns: 1fr; } .install > .glass { padding: 20px; } }

/* Releases */
.rels { display: grid; gap: 14px; }
.rel { padding: 22px 24px; display: grid; gap: 14px; }
.rel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rel-top h3 { font-size: 1.25rem; direction: ltr; unicode-bidi: isolate; }
.rel-top time { color: var(--ink-3); font-size: var(--step--1); margin-inline-start: auto; }
.rel ul { margin: 0; padding-inline-start: 1.3em; color: var(--ink-2); font-size: 0.97rem; display: grid; gap: 4px; }
.rel ul li::marker { color: var(--mint); }
.rel .none { color: var(--ink-3); margin: 0; font-size: 0.97rem; }
.rel details { border-top: 1px solid var(--line); padding-top: 12px; }
.rel summary, .dl details summary { cursor: pointer; font-weight: 700; color: var(--mint); font-size: 0.95rem; list-style: none; display: flex; align-items: center; gap: 8px; }
.rel summary::-webkit-details-marker, .dl details summary::-webkit-details-marker { display: none; }
.rel summary::after, .dl details summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -3px; transition: transform 0.2s; }
.rel details[open] summary::after, .dl details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.rel .files { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.rel .file { padding: 10px 14px; font-size: 0.92rem; }
.rel .file b { overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir="rtl"] .rel .file b { text-align: right; }
.rel-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.95rem; }
.rel-state { padding: 26px; text-align: center; color: var(--ink-2); }
.rel-state p { margin: 0 0 14px; }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--glass); padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 700; padding-block: 16px; list-style: none; display: flex; align-items: center; gap: 14px; line-height: 1.5; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; margin-inline-start: auto; flex: none; width: 8px; height: 8px; border: solid var(--mint); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.2s; margin-top: -4px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.faq details > div { padding-bottom: 18px; color: var(--ink-2); font-size: 0.98rem; }
.faq details > div p { margin: 0 0 0.7em; }

.closing { padding-block: clamp(28px, 6vw, 72px); }
.closing .glass { padding: clamp(28px, 6vw, 64px); text-align: center; background: linear-gradient(155deg, rgb(125 227 184 / 0.18), rgb(233 185 79 / 0.08) 70%, rgb(255 255 255 / 0.03)); border-color: var(--mint-line); }
.closing h2 { margin-bottom: 10px; }
.closing p { color: var(--ink-2); font-size: var(--step-1); margin-bottom: 24px; }
.closing .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.footer { padding-block: 36px 48px; border-top: 1px solid var(--line); margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer h3 { font-size: 0.95rem; color: var(--ink-3); margin-bottom: 12px; font-weight: 700; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--mint); }
.footer .brand { margin-bottom: 12px; display: inline-flex; }
.footer p { color: var(--ink-3); font-size: var(--step--1); }
.attrib { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-2) !important; font-size: 0.95rem !important; text-wrap: pretty; }
.legal { color: var(--ink-3); font-size: 0.85rem !important; margin: 0; text-wrap: pretty; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Content pages (privacy, add-ons) ---------- */
.page-head { padding-block: clamp(36px, 7vw, 80px) clamp(18px, 3vw, 32px); }
.page-head h1 { font-size: var(--step-3); margin-bottom: 14px; }
.prose { max-width: 760px; padding-bottom: clamp(40px, 8vw, 96px); }
.prose h2 { font-size: var(--step-2); margin: 2em 0 0.5em; }
.prose p, .prose li { color: var(--ink-2); text-wrap: pretty; }
.prose .glass { padding: 4px 24px 8px; }

/* ---------- Single-card pages (invite, TV pairing, Spotify return) ---------- */
.card-page { min-height: 100svh; display: grid; place-items: center; padding: 20px; }
.card-page main { width: min(100%, 520px); padding: clamp(24px, 6vw, 40px); }
.card-page img.logo { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 22px; }
.card-page h1 { font-size: clamp(1.8rem, 1.2rem + 3vw, 2.6rem); margin-bottom: 16px; }
.card-page p { color: var(--ink-2); }
.card-page .btn { width: 100%; margin-block: 6px 14px; }
.card-page .code { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.08em; direction: ltr; text-align: center; color: var(--mint); margin: 18px 0; overflow-wrap: anywhere; }
.card-top { position: fixed; top: 12px; inset-inline-end: 12px; z-index: 5; }
.dl details .files { margin-top: 12px; }
@media (max-width: 360px) {
  .nav-in { gap: 4px; padding-inline: 10px 6px; }
  .ctrls { gap: 4px; }
  .ctrl { padding-inline: 10px; font-size: 0.85rem; }
  .fontsel select { max-width: 92px; padding-inline: 8px 24px; font-size: 0.8rem; }
  .fontsel::after { inset-inline-end: 9px; }
}
