/* Points: Party Trivia — pointstrivia.com
   One stylesheet for every page, English (ltr) and Arabic (rtl).
   Colours, fonts and the chunky "chip" controls come from the game's own design (points_app/design/handoff). */

/* ---------- Fonts (SIL Open Font License; licences in assets/fonts/) ---------- */
@font-face {
  font-family: Cairo;
  src: url("../fonts/cairo-latin.woff2") format("woff2");
  font-weight: 500 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Cairo;
  src: url("../fonts/cairo-arabic.woff2") format("woff2");
  font-weight: 500 1000;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F, U+2010-2011, U+204F, U+2E41, U+FD3E-FD3F;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-petch-semibold-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Changa;
  src: url("../fonts/changa-arabic.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --canvas: #100c17;
  --bg-top: #1f132e;
  --bg-bottom: #150d23;
  --text: #fff7ff;
  --muted: #c0add2;
  --dim: #a38db8;
  --border: #4b3565;
  --ink: #28123f;
  --violet: #c18bff;
  --lime: #c8fb63;
  --rose: #ffaed9;
  --gold: #ffce8c;
  --row: #271a38;
  --row-border: #45305b;
  --rack: #140d21;
  --rack-border: #503468;
  --card: #1d1329;

  --lime-face: linear-gradient(158deg, #d9ff83, #b5f84a 54%, #8deb2f);
  --lime-edge: #5f9e24;
  --lime-shine: #eeffbc;
  --violet-face: linear-gradient(158deg, #714ba0, #4c2d70 64%, #382052);
  --violet-edge: #4e207e;
  --violet-shine: #e3b5ff94;

  --wrap: 1180px;
  --gutter: clamp(16px, 4.5vw, 40px);
  --radius: 22px;

  --font: Cairo, "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --font-label: "Chakra Petch", Cairo, sans-serif;
  --font-label-ar: Changa, Cairo, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-width: 300px;
  font-family: var(--font);
  font-weight: 560;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--canvas);
  background-image:
    radial-gradient(1100px 620px at 78% -120px, #3a1b5ccc, transparent 70%),
    radial-gradient(900px 520px at -10% 8%, #2b1844aa, transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom) 900px, var(--canvas) 1800px);
  background-repeat: no-repeat;
  overflow-x: hidden;
}
:lang(ar) body, body:lang(ar) { line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
picture { display: contents; }
a { color: var(--lime); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: #e4ffb0; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--ink); }
bdi { unicode-bidi: isolate; white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 12px; background: var(--lime); color: var(--ink); font-weight: 900; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Type helpers ---------- */
.label {
  font-family: var(--font-label);
  font-style: italic;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
:lang(ar) .label { font-family: var(--font-label-ar); font-style: normal; letter-spacing: 0; text-transform: none; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lime);
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 14px;
}
.display {
  font-weight: 1000;
  font-size: clamp(42px, 8.2vw, 92px);
  line-height: .98;
  letter-spacing: -.012em;
}
:lang(ar) .display { letter-spacing: 0; line-height: 1.18; font-size: clamp(40px, 7.6vw, 84px); }
.h2 {
  font-weight: 1000;
  font-size: clamp(32px, 5.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -.008em;
}
:lang(ar) .h2 { letter-spacing: 0; line-height: 1.3; }
.accent { color: var(--lime); }
.lead { color: var(--muted); font-size: clamp(17px, 1.9vw, 20px); line-height: 1.6; max-width: 34em; }

/* ---------- Chips (the game's numbered tiles) ---------- */
.chip {
  --s: 52px;
  --face: var(--lime-face);
  --edge: var(--lime-edge);
  --shine: var(--lime-shine);
  --fg: var(--ink);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  border-radius: calc(var(--s) * .24);
  border: calc(var(--s) * .055) solid var(--ink);
  background: var(--face);
  color: var(--fg);
  box-shadow:
    inset 0 calc(var(--s) * .05) 0 var(--shine),
    0 calc(var(--s) * .09) 0 0 var(--edge),
    0 calc(var(--s) * .09) 0 calc(var(--s) * .055) var(--ink);
  font-family: var(--font);
  font-weight: 1000;
  font-size: calc(var(--s) * .46);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  direction: ltr;
}
.chip--violet { --face: linear-gradient(145deg, #d48eff, #a261f7 56%, #783ad7); --edge: #4e207e; --shine: #ecc1ff; }
.chip--pink { --face: linear-gradient(145deg, #ffcbf3, #c071e5); --edge: #7e3a9a; --shine: #fff0fb; }
.chip--gold { --face: linear-gradient(145deg, #ffe3b5, #ffce8c 55%, #f0a650); --edge: #9a5c1e; --shine: #fff4e0; }
.chip--sm { --s: 30px; }
.eyebrow .chip { --s: 26px; }

/* ---------- Buttons ---------- */
.btn {
  --face: var(--lime-face);
  --edge: var(--lime-edge);
  --shine: var(--lime-shine);
  --depth: 5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 24px 11px;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: var(--face);
  color: var(--ink);
  box-shadow: inset 0 2px 0 var(--shine), 0 var(--depth) 0 var(--edge), 0 var(--depth) 0 2.5px var(--ink);
  margin-bottom: calc(var(--depth) + 2.5px);
  font-family: var(--font-label);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: transform .09s ease, box-shadow .09s ease, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
:lang(ar) .btn { font-family: var(--font-label-ar); font-style: normal; letter-spacing: 0; text-transform: none; line-height: 1.45; font-size: 17px; }
.btn:hover { color: var(--ink); filter: brightness(1.06); }
.btn:active:not([aria-disabled="true"], :disabled) { transform: translateY(3px); --depth: 2px; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn--violet { --face: var(--violet-face); --edge: var(--violet-edge); --shine: var(--violet-shine); color: var(--text); text-shadow: 0 1px var(--ink); }
.btn--violet:hover { color: var(--text); }
.btn--small { min-height: 42px; padding: 6px 16px 8px; font-size: 14px; border-radius: 13px; --depth: 4px; }
:lang(ar) .btn--small { font-size: 15px; }
.btn:disabled, .btn[aria-disabled="true"] {
  --face: #362844; --edge: #544465; --shine: #ffffff12;
  color: #c0acd0; text-shadow: none; cursor: default; filter: none;
}
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 850; color: var(--text); text-decoration: none; }
.text-link:hover { color: var(--lime); }
.text-link svg { width: 18px; height: 18px; }

/* ---------- Store buttons (filled in from assets/js/stores.js) ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 14px 14px; align-items: center; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 196px;
  min-height: 60px;
  padding: 8px 18px 9px 14px;
  border-radius: 16px;
  border: 2.5px solid var(--ink);
  background: linear-gradient(158deg, #2f2142, #21162f);
  box-shadow: inset 0 2px 0 #ffffff14, 0 5px 0 #3b2a52, 0 5px 0 2.5px var(--ink);
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.15;
  transition: transform .09s ease, box-shadow .09s ease, filter .15s;
}
:lang(ar) .store { padding: 8px 14px 9px 18px; }
.store svg { width: 30px; height: 30px; flex: none; color: var(--violet); }
.store-text { display: grid; }
.store-small { font-size: 12px; font-weight: 700; color: var(--muted); }
.store-name { font-size: 20px; font-weight: 1000; letter-spacing: -.01em; }
:lang(ar) .store-name { letter-spacing: 0; }
.store[aria-disabled="true"] { cursor: default; }
.store[aria-disabled="true"] .store-small { color: var(--gold); }
.store[href] { background: var(--lime-face); color: var(--ink); box-shadow: inset 0 2px 0 var(--lime-shine), 0 5px 0 var(--lime-edge), 0 5px 0 2.5px var(--ink); }
.store[href] svg, .store[href] .store-small { color: var(--ink); }
.store[href]:hover { filter: brightness(1.06); }
.store[href]:active { transform: translateY(3px); }
.stores-note { margin-top: 6px; font-size: 14px; color: var(--dim); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #120c1bd9;
  border-bottom: 1px solid #ffffff0f;
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.nav { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { flex: none; display: block; }
.brand img { height: 35px; width: auto; }
.nav-links { display: flex; gap: 4px; margin-inline-start: 14px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 750; font-size: 15px; text-decoration: none; }
.nav-links a:hover { color: var(--text); background: #ffffff0d; }
.nav-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.lang-switch { display: flex; padding: 3px; border-radius: 12px; background: #ffffff0a; border: 1px solid #ffffff14; }
.lang-switch a { min-width: 40px; padding: 4px 10px; border-radius: 9px; color: var(--muted); font-weight: 850; font-size: 14px; line-height: 1.6; text-align: center; text-decoration: none; }
.lang-switch a[aria-current="page"] { background: #ffffff14; color: var(--text); }
.lang-switch a:not([aria-current]):hover { color: var(--lime); }
@media (max-width: 980px) { .nav-links { display: none; } }
.nav-actions .btn--small { white-space: nowrap; }
@media (max-width: 460px) {
  .brand img { height: 30px; }
  .nav { gap: 10px; }
  .nav-actions .btn--small { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(28px, 6vw, 70px) clamp(40px, 7vw, 90px); overflow: clip; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#ffffff1c 1.1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 72% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 72% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}
:dir(rtl).hero::before, [dir="rtl"] .hero::before {
  -webkit-mask-image: radial-gradient(60% 70% at 28% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 28% 40%, #000 0%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy .lead { margin-top: 22px; }
.hero-copy .lead strong { color: var(--text); font-weight: 850; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.hero-facts li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px 6px 8px; border-radius: 999px;
  background: #ffffff0b; border: 1px solid #ffffff17;
  font-size: 14px; font-weight: 800; color: var(--muted);
}
:lang(ar) .hero-facts li { padding: 6px 8px 6px 13px; }
.hero-facts svg { width: 20px; height: 20px; color: var(--lime); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 520px; }
.hero-visual .phone { width: min(300px, 64%); transform: rotate(5deg) translateX(20%); }
[dir="rtl"] .hero-visual .phone { transform: rotate(-5deg) translateX(-20%); }
.hero-chips {
  position: absolute;
  width: min(360px, 74%);
  inset-inline-start: -4%;
  bottom: -7%;
  filter: drop-shadow(0 26px 30px #0b061399);
  animation: float 6s ease-in-out infinite;
}
[dir="rtl"] .hero-chips { animation-name: float-rtl; }
@keyframes float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -12px; rotate: -1.5deg; } }
@keyframes float-rtl { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -12px; rotate: 1.5deg; } }
.hero-sticker {
  position: absolute;
  top: 8%;
  inset-inline-start: 4%;
  padding: 10px 16px 12px;
  border-radius: 16px;
  background: var(--ink);
  border: 2px solid #7f52a8;
  box-shadow: 0 10px 30px #0008;
  rotate: -6deg;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  color: var(--muted);
}
.hero-sticker strong { display: block; color: var(--lime); font-size: 22px; font-weight: 1000; letter-spacing: -.01em; }
[dir="rtl"] .hero-sticker { rotate: 6deg; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; margin-top: 8px; padding-block: 10px 30px; }
  .hero-visual .phone { width: min(250px, 58%); }
  .hero-chips { width: min(330px, 64%); inset-inline-start: 2%; bottom: 0; }
  .hero-sticker { top: 6%; inset-inline-start: 2%; }
}
@media (max-width: 520px) {
  .hero-sticker { font-size: 12px; padding: 8px 12px 9px; }
  .hero-sticker strong { font-size: 18px; }
}

/* ---------- Phone frame for screenshots ---------- */
.phone {
  position: relative;
  aspect-ratio: 600 / 1304;
  border-radius: 13% / 6%;
  padding: 2.4%;
  background: linear-gradient(160deg, #3a2a4e, #0d0914 40%, #1b1227);
  box-shadow: 0 0 0 1.5px #5b4378, 0 30px 60px -12px #05030acc, 0 12px 24px -10px #000a;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 11% / 5.1%; background: #160e22; }

/* ---------- Ticker band ---------- */
.ticker-wrap { overflow: hidden; padding-block: 16px 26px; margin-bottom: clamp(12px, 3vw, 40px); }
.ticker {
  position: relative;
  z-index: 2;
  background: var(--lime-face);
  border-block: 3px solid var(--ink);
  color: var(--ink);
  rotate: -1.6deg;
  margin-inline: -20px;
  box-shadow: 0 10px 0 #5f9e2455;
  overflow: hidden;
}
[dir="rtl"] .ticker { rotate: 1.6deg; }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
[dir="rtl"] .ticker-track { animation-name: ticker-rtl; }
.ticker ul { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.ticker li { display: inline-flex; align-items: center; gap: 18px; padding: 12px 18px; font-size: clamp(16px, 2vw, 21px); white-space: nowrap; }
.ticker li::after { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--ink); rotate: 45deg; margin-inline-start: 18px; }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes ticker-rtl { to { transform: translateX(50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(48px, 6.5vw, 88px); }
.section--glow::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 420px at 75% 50%, #3a1b5c99, transparent 70%); pointer-events: none; }
[dir="rtl"] .section--glow::before { background: radial-gradient(700px 420px at 25% 50%, #3a1b5c99, transparent 70%); }
.section--glow-center::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(800px 380px at 50% 60%, #2f1a4a99, transparent 72%); pointer-events: none; }
main { position: relative; z-index: 0; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(30px, 4vw, 48px); }
.section-head .lead { margin-top: 4px; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* How a round goes: swipeable row of steps */
.steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(196px, 1fr);
  gap: 18px;
  margin: 0;
  padding: 6px 2px 18px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #5b4378 transparent;
  overscroll-behavior-x: contain;
}
.step {
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  padding: 18px 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #24183a, #1a1129);
  border: 1px solid var(--row-border);
}
.step .phone { width: 82%; margin: 4px auto 6px; rotate: -1.5deg; }
.step:nth-child(even) .phone { rotate: 1.5deg; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 1000; line-height: 1.2; }
:lang(ar) .step-title { letter-spacing: 0; }
.step p { color: var(--muted); font-size: 16px; line-height: 1.55; }
@media (max-width: 760px) {
  .steps { grid-auto-columns: 78%; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
}
.swipe-hint { display: none; align-items: center; gap: 8px; margin-top: 4px; color: var(--dim); font-size: 14px; font-weight: 750; }
.swipe-hint svg { width: 18px; height: 18px; }
[dir="rtl"] .swipe-hint svg { scale: -1 1; }
@media (max-width: 1180px) { .swipe-hint { display: inline-flex; } }

/* ---------- Try a round (interactive) ---------- */
.try-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.try-copy .lead { margin-top: 18px; }
.try-rules { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.try-rules li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-weight: 700; }
.try-rules .chip { --s: 28px; margin-top: 1px; }
@media (max-width: 900px) { .try-grid { grid-template-columns: 1fr; } }

.demo {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  padding: 18px 18px 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, #23163a, #150d23);
  border: 1px solid #5b4378;
  box-shadow: 0 0 0 8px #0d0914, 0 0 0 9.5px #4b3565, 0 40px 80px -20px #000c;
}
.demo-top { display: flex; align-items: center; gap: 10px; }
.demo-round { font-size: 13px; font-weight: 850; color: var(--muted); }
.demo-score {
  display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto;
  padding: 4px 11px; border-radius: 11px; background: #ffffff0d; border: 1px solid #ffffff1c;
  font-weight: 1000; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text);
}
.demo-score svg { width: 16px; height: 16px; color: var(--lime); }
.demo-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 18px; }
.demo-progress span { height: 5px; border-radius: 5px; background: #4a335f; }
.demo-progress span.is-past { background: #9662ce; }
.demo-progress span.is-now { background: var(--lime); box-shadow: 0 0 10px #c8fb6366; }
.demo-cat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #2a1b3e; border: 1px solid var(--border); }
.demo-cat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #44305d; border: 1px solid #63467f; color: var(--violet); flex: none; }
.demo-cat-icon svg { width: 26px; height: 26px; }
.demo-cat-name { font-weight: 1000; font-size: 18px; line-height: 1.2; }
.badge { display: inline-block; margin-inline-start: auto; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 900; border: 1px solid; }
.badge--easy { background: #2c3927; border-color: #57713a; color: #d6ff95; }
.badge--medium { background: #3b2b2c; border-color: #76553f; color: var(--gold); }
.badge--hard { background: #3c223c; border-color: #76475f; color: var(--rose); }
.demo-title { margin-top: 18px; font-size: 24px; font-weight: 1000; line-height: 1.2; letter-spacing: -.015em; }
:lang(ar) .demo-title { letter-spacing: 0; }
.demo-sub { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.rack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 9px; margin-top: 16px; padding: 13px 13px 17px; border-radius: 20px; background: var(--rack); border: 1px solid var(--rack-border); }
.rack button {
  position: relative;
  display: grid; place-items: center;
  width: 100%; aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid #8d61b6;
  background: linear-gradient(145deg, #65438a, #4b306b);
  color: #fff4ff;
  box-shadow: 0 3px 0 #351d4b, inset 0 1px 0 #d9a5ff50;
  font-size: clamp(20px, 5.6vw, 27px);
  font-weight: 1000;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: background .12s, transform .12s, border-color .12s;
}
.rack button:not(:disabled):hover { border-color: #dfb6ff; }
.rack button[aria-pressed="true"] {
  background: linear-gradient(142deg, #ddff99, #a9ef42);
  border-color: #eaffbd;
  box-shadow: 0 3px 0 #68952c, 0 0 16px #b8ff483b, inset 0 1px 0 #f7ffdc;
  color: var(--ink);
  transform: translateY(-2px);
}
.rack button:disabled { border-color: #3e2e53; color: #8f78a6; background: #261b35; box-shadow: none; cursor: default; }
.rack button:disabled::after { content: ""; position: absolute; width: 52%; height: 1.5px; background: #b299c5; transform: rotate(-38deg); opacity: .68; }
.demo-actions { display: grid; gap: 10px; margin-top: 18px; }
.demo-actions .btn { width: 100%; }
.question-card { margin-top: 16px; padding: 20px 18px; border-radius: 20px; background: linear-gradient(160deg, #35204e, #261739); border: 1px solid #7f52a8; box-shadow: 0 0 24px #7643aa40; }
.question-card p { font-size: 22px; font-weight: 1000; line-height: 1.3; }
.thrown { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-weight: 800; font-size: 14px; }
.thrown .chip { --s: 26px; }
.demo-input {
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 15px;
  border: 1px solid #6d5190;
  background: #10091d;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
}
.demo-input::placeholder { color: #ad98c0; font-weight: 650; opacity: 1; }
.demo-input:focus { outline: 2px solid var(--lime); outline-offset: 2px; border-color: transparent; }
.result { margin-top: 16px; padding: 18px; border-radius: 20px; border: 1px solid; }
.result--right { background: linear-gradient(160deg, #e5ffb2, #c8fb63); border-color: #eaffbd; color: var(--ink); }
.result--wrong { background: #2a1b3e; border-color: #76475f; }
.result-head { font-size: 26px; font-weight: 1000; line-height: 1.15; letter-spacing: -.015em; }
:lang(ar) .result-head { letter-spacing: 0; }
.result-points { display: block; font-size: 46px; font-weight: 1000; line-height: 1.05; letter-spacing: -.03em; }
:lang(ar) .result-points { letter-spacing: 0; }
.result-points small { font-size: 18px; letter-spacing: 0; margin-inline-start: 4px; }
.result--wrong .result-head { color: var(--rose); }
.result-line { margin-top: 10px; font-size: 15px; font-weight: 750; }
.result--right .result-line { color: #3a2058; }
.result--wrong .result-line { color: var(--muted); }
.result-line strong { color: var(--text); font-weight: 1000; }
.result--right .result-line strong { color: var(--ink); }
.host-note { margin-top: 12px; color: var(--dim); font-size: 14px; }
.btn-quiet { padding: 10px; border: 1px dashed #7f52a8; border-radius: 14px; background: transparent; color: var(--violet); font-weight: 850; font-size: 15px; }
.btn-quiet:hover { background: #ffffff08; color: var(--text); }
.demo-end .result-points { color: var(--lime); }
.demo-noscript { margin-top: 16px; color: var(--muted); }
.demo [hidden] { display: none !important; }
.demo-live { min-height: 1px; }
.pop { animation: pop .38s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- The final ---------- */
.final-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.final-cards { display: grid; gap: 18px; margin-top: 26px; }
.final-card { padding: 22px 22px 24px; border-radius: var(--radius); background: #ffffff08; border: 1px solid #ffffff17; }
.final-card h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 1000; line-height: 1.2; }
.final-card p { margin-top: 8px; color: var(--muted); }
.final-visual { position: relative; display: flex; justify-content: center; align-items: center; padding-block: 20px; }
.final-visual .phone { width: min(260px, 48%); }
.final-visual .phone:first-child { rotate: -6deg; margin-inline-end: -14%; z-index: 1; margin-top: 50px; }
.final-visual .phone:last-child { rotate: 5deg; }
[dir="rtl"] .final-visual .phone:first-child { rotate: 6deg; }
[dir="rtl"] .final-visual .phone:last-child { rotate: -5deg; }
@media (max-width: 900px) { .final-grid { grid-template-columns: 1fr; } .final-visual { order: -1; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--radius); background: linear-gradient(180deg, #221637, #190f27); border: 1px solid var(--row-border); }
.feature-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: #44305d; border: 1px solid #63467f; box-shadow: inset 0 -3px 0 #2a1a414a; color: var(--violet); }
.feature-icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 19px; font-weight: 1000; line-height: 1.25; }
.feature p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.feature--code { grid-row: span 2; align-content: space-between; background: linear-gradient(170deg, #35204e, #1d1229); border-color: #7f52a8; }
.room-code { margin-top: 8px; padding: 18px; border-radius: 18px; background: linear-gradient(113deg, #35204e, #40265b); border: 1.5px solid #7f52a8; box-shadow: 0 0 22px #7643aa66; text-align: center; }
.room-code-label { display: block; color: #e0c4f5; font-size: 13px; margin-bottom: 4px; }
.room-code-value { display: block; font-size: clamp(34px, 4vw, 44px); font-weight: 1000; letter-spacing: .14em; line-height: 1.1; color: var(--text); direction: ltr; font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } .feature--code { grid-row: auto; grid-column: 1 / -1; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---------- Avatars ---------- */
.avatar-wall { display: grid; grid-template-columns: repeat(10, 1fr); gap: clamp(8px, 1.2vw, 16px); margin: 0; padding: 0; list-style: none; }
.avatar-wall li { aspect-ratio: 1; border-radius: 24%; overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 5px 0 #0b0712, 0 0 0 1.5px #5b4378; background: #2a1b3e; transition: transform .18s cubic-bezier(.2, 1.4, .4, 1); }
.avatar-wall li:nth-child(3n) { rotate: -3deg; }
.avatar-wall li:nth-child(4n + 1) { rotate: 2.5deg; }
.avatar-wall li:hover { transform: translateY(-6px) scale(1.06); }
.avatar-wall img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 980px) { .avatar-wall { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 560px) { .avatar-wall { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Only points ---------- */
.only-points {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 5vw, 56px);
  border-radius: 32px;
  background: radial-gradient(500px 300px at 90% 0%, #c8fb6326, transparent 70%), linear-gradient(160deg, #2e1d45, #180f26);
  border: 1.5px solid #7f52a8;
  overflow: hidden;
}
.only-points-chips { position: relative; width: 190px; height: 170px; }
.only-points-chips .chip { position: absolute; }
.only-points-chips .chip:nth-child(1) { --s: 92px; inset-inline-start: 0; top: 18px; rotate: -16deg; }
.only-points-chips .chip:nth-child(2) { --s: 110px; inset-inline-start: 62px; top: 30px; rotate: 9deg; font-size: 52px; }
.only-points-chips .chip:nth-child(3) { --s: 58px; inset-inline-start: 22px; top: 112px; rotate: 14deg; }
.only-points .h2 { font-size: clamp(30px, 4.4vw, 48px); }
.only-points p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 36em; }
.only-points p strong { color: var(--text); }
@media (max-width: 700px) { .only-points { grid-template-columns: 1fr; } .only-points-chips { width: 180px; height: 150px; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { border-radius: 18px; background: #ffffff08; border: 1px solid #ffffff17; }
.faq details[open] { background: #ffffff0c; border-color: #7f52a8; }
.faq summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 900; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-inline-start: auto; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #ffffff10; color: var(--lime); font-size: 22px; font-weight: 900; line-height: 1; transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }
.faq details > div p + p { margin-top: 10px; }

/* ---------- Download ---------- */
.download {
  position: relative;
  padding: clamp(30px, 6vw, 70px);
  border-radius: 36px;
  background: var(--lime-face);
  border: 3px solid var(--ink);
  box-shadow: 0 10px 0 var(--lime-edge), 0 10px 0 3px var(--ink);
  color: var(--ink);
  overflow: hidden;
}
.download-grid { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; }
.download .eyebrow { color: #3a2058; }
.download .h2 { color: var(--ink); }
.download p.lead { color: #3a2058; margin-top: 16px; font-weight: 700; }
.download .stores { margin-top: 26px; }
.download .store { background: linear-gradient(158deg, #3a2058, #28123f); box-shadow: inset 0 2px 0 #ffffff1c, 0 5px 0 #14081f, 0 5px 0 2.5px var(--ink); }
.download .store[aria-disabled="true"] .store-small { color: var(--lime); }
.download .stores-note { color: #3a2058; }
.download-art { justify-self: center; width: min(320px, 100%); filter: drop-shadow(0 20px 24px #2a4a0a66); }
@media (max-width: 800px) { .download-grid { grid-template-columns: 1fr; } .download-art { width: min(220px, 70%); order: -1; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(60px, 8vw, 110px); padding-block: 48px 28px; border-top: 1px solid #ffffff12; background: #0c0912; }
.footer-top { display: grid; grid-template-columns: 1.3fr 2fr; gap: 36px; }
.footer-brand img { height: 39px; width: auto; }
.footer-brand p { margin-top: 12px; color: var(--muted); font-weight: 750; max-width: 22em; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col strong { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.footer-col a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.footer-col a:hover { color: var(--lime); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid #ffffff0f; color: var(--dim); font-size: 14px; font-weight: 700; }
.footer-bottom a { color: var(--muted); }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .footer-links { grid-template-columns: 1fr 1fr; } }

/* ---------- Inner pages (legal, support) ---------- */
.page-intro { position: relative; padding-block: clamp(40px, 7vw, 80px) clamp(28px, 4vw, 44px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: var(--dim); font-size: 14px; font-weight: 750; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--lime); }
.page-intro .h2 { font-size: clamp(38px, 6vw, 64px); }
.page-intro .lead { margin-top: 16px; }
.updated { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 5px 12px; border-radius: 999px; background: #ffffff0b; border: 1px solid #ffffff17; color: var(--muted); font-size: 14px; font-weight: 800; }
.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: 92px; padding: 18px; border-radius: 18px; background: #ffffff07; border: 1px solid #ffffff14; }
.toc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 900; color: var(--text); list-style: none; }
.toc summary::after { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #ffffff10; color: var(--lime); font-size: 19px; line-height: 1; transition: rotate .2s; }
.toc[open] summary::after { rotate: 45deg; }
.toc summary::-webkit-details-marker { display: none; }
.toc nav { display: grid; gap: 2px; margin-top: 10px; }
.toc a { padding: 5px 8px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.toc a:hover { color: var(--lime); background: #ffffff08; }
.doc { max-width: 760px; }
.doc h2 { margin: 44px 0 12px; font-size: clamp(23px, 2.6vw, 28px); font-weight: 1000; line-height: 1.25; letter-spacing: -.01em; scroll-margin-top: 92px; }
:lang(ar) .doc h2 { letter-spacing: 0; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 26px 0 8px; font-size: 19px; font-weight: 950; line-height: 1.35; color: var(--text); scroll-margin-top: 92px; }
.doc p, .doc li { color: #dccdea; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { margin: 12px 0; padding-inline-start: 1.3em; display: grid; gap: 8px; }
.doc li::marker { color: var(--lime); font-weight: 900; }
.doc strong { color: var(--text); font-weight: 900; }
.doc .note { margin-top: 36px; padding: 16px 18px; border-radius: 16px; background: #ffffff08; border: 1px solid #ffffff14; color: var(--muted); font-size: 15px; }
.doc .callout { margin: 16px 0; padding: 18px 20px; border-radius: 18px; background: #c8fb630f; border: 1px solid #c8fb6355; }
.doc .callout p { color: var(--text); }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}

/* Support page */
.contact-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: clamp(20px, 4vw, 32px); border-radius: 26px; background: linear-gradient(160deg, #35204e, #1f1430); border: 1.5px solid #7f52a8; box-shadow: 0 0 30px #7643aa40; }
.contact-card .feature-icon { width: 64px; height: 64px; border-radius: 20px; }
.contact-card .feature-icon svg { width: 34px; height: 34px; }
.contact-card h2 { margin: 0; font-size: 22px; }
.contact-card .mail { display: inline-block; margin-top: 4px; font-size: clamp(22px, 3.2vw, 30px); font-weight: 1000; color: var(--lime); text-decoration: none; word-break: break-all; direction: ltr; unicode-bidi: isolate; }
.contact-card .mail:hover { text-decoration: underline; }
.contact-card p { color: var(--muted); }
@media (max-width: 560px) { .contact-card { grid-template-columns: 1fr; } }
.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.help-grid > div { padding: 18px 20px; border-radius: 18px; background: #ffffff07; border: 1px solid #ffffff14; }
.help-grid h3 { margin: 0 0 6px; font-size: 18px; }
.help-grid p { font-size: 16px; }
@media (max-width: 700px) { .help-grid { grid-template-columns: 1fr; } }

/* 404 */
.lost { display: grid; place-items: center; text-align: center; min-height: calc(100vh - 69px); padding-block: 60px; }
.lost .chips-row { display: flex; gap: 14px; justify-content: center; margin-bottom: 30px; direction: ltr; }
.lost .chip { --s: 74px; }
.lost .chip:nth-child(1) { rotate: -10deg; }
.lost .chip:nth-child(2) { rotate: 6deg; translate: 0 -8px; }
.lost .chip:nth-child(3) { rotate: -4deg; }
.lost p { color: var(--muted); margin-top: 12px; }
.lost .split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 6px auto 0; max-width: 860px; }
.lost .split > div { display: grid; gap: 14px; justify-items: center; align-content: start; }
.lost .split .h2 { font-size: clamp(30px, 4.4vw, 46px); color: var(--text); }
.lost .split p { margin: 0; }
@media (max-width: 640px) { .lost .split { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll (only when JS has said it may) ---------- */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker-track { animation: none; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}
