/* ==========================================================================
   Taleb — landing page
   Identity: Courtyard Teal (docs/brand/VISUAL-IDENTITY.md in the app repo)
   Type: IBM Plex Sans Arabic (OFL) · 400 body · 500 hierarchy · 600 headings
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Plex Arabic";
  src: url("../assets/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("../assets/fonts/IBMPlexSansArabic-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("../assets/fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("../assets/fonts/IBMPlexSansArabic-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --canvas: #F5F7F4;
  --canvas-a: rgba(245, 247, 244, .82);
  --surface: #FDFEFB;
  --muted: #EBF0ED;
  --hairline: #CBD6CF;
  --ink: #233735;
  --ink-2: #596965;
  --ink-3: #879692;

  --teal: #176B63;
  --teal-deep: #0F5750;
  --teal-ink: #0B3C37;
  --teal-soft: #E1ECE7;
  --mint: #8FCBC2;
  --ivory: #F9F8F3;

  --brass: #B18A50;
  --brass-soft: #F4ECDF;
  --correct: #235C43;
  --correct-soft: #E6F2E9;
  --review: #8B492A;
  --review-soft: #FAEFE3;

  --tint-sage: #3D7A55;  --tint-sage-soft: #E3EEE6;
  --tint-ocean: #236F8E; --tint-ocean-soft: #DFEDF4;
  --tint-plum: #6A4CA6;  --tint-plum-soft: #ECE6F6;
  --tint-clay: #B35F2A;  --tint-clay-soft: #F9E9DD;
  --tint-rose: #A8445C;  --tint-rose-soft: #F7E4E8;
  --tint-olive: #7A7236; --tint-olive-soft: #EFECDA;
  --tint-slate: #3F5B82; --tint-slate-soft: #E2E8F2;

  --badge-bg: #233735;
  --badge-fg: #F9F8F3;

  --glow-1: rgba(23, 107, 99, .20);
  --glow-2: rgba(177, 138, 80, .16);
  --arch: rgba(23, 107, 99, .10);
  --dots: rgba(35, 55, 53, .10);

  --shadow-sm: 0 8px 24px -14px rgba(17, 42, 39, .28);
  --shadow-md: 0 18px 40px -20px rgba(17, 42, 39, .32);
  --shadow-phone: 0 50px 90px -40px rgba(17, 42, 39, .55), 0 24px 44px -26px rgba(17, 42, 39, .35);

  --r-panel: 18px;
  --r-control: 13px;
  --r-sheet: 24px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --canvas: #182321; --canvas-a: rgba(24, 35, 33, .8);
  --surface: #202F2C; --muted: #2A3A37; --hairline: #3D5049;
  --ink: #E4EDE8; --ink-2: #B2C2BA; --ink-3: #7F918A;
  --teal: #8FCBC2; --teal-deep: #A8DBD3; --teal-ink: #0B3C37; --teal-soft: #2B403A;
  --brass: #CBA873; --brass-soft: #3A3224;
  --correct: #A0D9B7; --correct-soft: #253F31;
  --review: #E7B38D; --review-soft: #423326;
  --tint-sage: #8CC7A2;  --tint-sage-soft: #1D2A22;
  --tint-ocean: #86BCDC; --tint-ocean-soft: #182833;
  --tint-plum: #B3A4F2;  --tint-plum-soft: #25223A;
  --tint-clay: #EDB07D;  --tint-clay-soft: #33261B;
  --tint-rose: #E79AAE;  --tint-rose-soft: #33202A;
  --tint-olive: #CFC27A; --tint-olive-soft: #2B2A1C;
  --tint-slate: #9FB8DC; --tint-slate-soft: #243246;
  --badge-bg: #F9F8F3; --badge-fg: #182321;
  --glow-1: rgba(143, 203, 194, .16); --glow-2: rgba(203, 168, 115, .10);
  --arch: rgba(143, 203, 194, .10); --dots: rgba(228, 237, 232, .08);
  --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, .5);
  --shadow-md: 0 18px 40px -20px rgba(0, 0, 0, .6);
  --shadow-phone: 0 50px 90px -40px rgba(0, 0, 0, .8), 0 24px 44px -26px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #182321; --canvas-a: rgba(24, 35, 33, .8);
    --surface: #202F2C; --muted: #2A3A37; --hairline: #3D5049;
    --ink: #E4EDE8; --ink-2: #B2C2BA; --ink-3: #7F918A;
    --teal: #8FCBC2; --teal-deep: #A8DBD3; --teal-ink: #0B3C37; --teal-soft: #2B403A;
    --brass: #CBA873; --brass-soft: #3A3224;
    --correct: #A0D9B7; --correct-soft: #253F31;
    --review: #E7B38D; --review-soft: #423326;
    --tint-sage: #8CC7A2;  --tint-sage-soft: #1D2A22;
    --tint-ocean: #86BCDC; --tint-ocean-soft: #182833;
    --tint-plum: #B3A4F2;  --tint-plum-soft: #25223A;
    --tint-clay: #EDB07D;  --tint-clay-soft: #33261B;
    --tint-rose: #E79AAE;  --tint-rose-soft: #33202A;
    --tint-olive: #CFC27A; --tint-olive-soft: #2B2A1C;
    --tint-slate: #9FB8DC; --tint-slate-soft: #243246;
    --badge-bg: #F9F8F3; --badge-fg: #182321;
    --glow-1: rgba(143, 203, 194, .16); --glow-2: rgba(203, 168, 115, .10);
    --arch: rgba(143, 203, 194, .10); --dots: rgba(228, 237, 232, .08);
    --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, .5);
    --shadow-md: 0 18px 40px -20px rgba(0, 0, 0, .6);
    --shadow-phone: 0 50px 90px -40px rgba(0, 0, 0, .8), 0 24px 44px -26px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  font-family: "Plex Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--teal); text-decoration: none; }
button { font: inherit; color: inherit; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--teal-soft); color: var(--ink); }

.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; border-radius: var(--r-control);
  background: var(--teal); color: #fff; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { max-width: 820px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .75s var(--ease), transform .75s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Typography helpers ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--teal); font-weight: 600; font-size: .95rem; margin-bottom: .75rem;
}
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--brass); transform: rotate(45deg); }
.kicker--light { color: var(--mint); }
.title { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.75rem); line-height: 1.3; }
.sub { color: var(--ink-2); font-size: 1.1rem; max-width: 60ch; margin-top: 1rem; }
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section--surface { background: var(--surface); border-block: 1px solid var(--hairline); }
.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 760px; }
.section__head--start { margin-bottom: 0; }
.note { color: var(--ink-2); font-size: .95rem; margin-top: 1.5rem; }
.link { color: var(--teal); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .25em; }
.link:hover { text-decoration-color: currentColor; }
.link--light { color: var(--ivory); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 1.5rem; border-radius: var(--r-panel);
  font-weight: 600; font-size: 1rem; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s;
}
.btn--primary { background: var(--teal); color: var(--canvas); box-shadow: 0 12px 26px -14px rgba(23, 107, 99, .7); }
:root[data-theme="dark"] .btn--primary { color: #152C28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { color: #152C28; } }
.btn--primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn--sm { min-height: 44px; padding: 0 1.1rem; font-size: .95rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-2);
  cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease), border-color .2s;
}
.icon-btn:hover { color: var(--teal); border-color: var(--teal); transform: translateY(-1px); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn[disabled] { opacity: .4; cursor: default; transform: none; }

.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.pill--ok { background: var(--correct-soft); color: var(--correct); }
.pill--ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--canvas-a);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-color: var(--hairline); box-shadow: 0 10px 30px -24px rgba(17, 42, 39, .35); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { height: 32px; width: auto; }
.brand__dark { display: none; }
:root[data-theme="dark"] .brand__light { display: none; }
:root[data-theme="dark"] .brand__dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__light { display: none; }
  :root:not([data-theme="light"]) .brand__dark { display: inline; }
}
.nav__links { display: flex; gap: 1.6rem; margin-inline-start: 1rem; }
.nav__links a { color: var(--ink-2); font-weight: 500; font-size: .98rem; position: relative; padding: .25rem 0; }
.nav__links a::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--teal); transform: scaleX(0); transform-origin: inline-end; transition: transform .25s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: inline-start; }
.nav__actions { margin-inline-start: auto; display: flex; align-items: center; gap: .6rem; }
.theme-toggle .ic--sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic--sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic--sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ic--moon { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__glow {
  position: absolute; inset: -30% -20% auto; height: 110%;
  background:
    radial-gradient(45% 40% at 28% 40%, var(--glow-1), transparent 70%),
    radial-gradient(30% 30% at 78% 22%, var(--glow-2), transparent 70%),
    radial-gradient(35% 35% at 70% 75%, var(--glow-1), transparent 72%);
  filter: blur(20px);
}
.hero__dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 100%);
          mask-image: radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 100%);
}
.arches { position: absolute; color: var(--arch); width: 100%; }
.arches--hero {
  bottom: -2px; left: 0; height: 180px;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 100%);
          mask-image: linear-gradient(to top, #000 10%, transparent 100%);
}
.hero__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(2rem, 4vw, 4rem); align-items: center;
}
.hero__copy { max-width: 600px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem .45rem .8rem; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal); font-weight: 600; font-size: .92rem;
  border: 1px solid color-mix(in srgb, var(--teal) 18%, transparent);
}
.eyebrow__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 45%, transparent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 45%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero__title {
  font-size: clamp(2.4rem, 1.2rem + 4.8vw, 4.5rem);
  font-weight: 700; line-height: 1.22; margin-top: 1.25rem;
  letter-spacing: 0;
}
.accent { position: relative; color: var(--teal); white-space: nowrap; }
.accent::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.06em; height: .22em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'><path d='M3 17c40-10 90-14 194-8' fill='none' stroke='%23B18A50' stroke-width='6' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  opacity: .85; z-index: -1;
}
.hero__lead { margin-top: 1.4rem; font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 56ch; }

.store-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.store-row--center { justify-content: center; }
.store {
  position: relative; display: inline-flex; align-items: center; gap: .75rem;
  min-height: 58px; padding: .45rem 1rem .45rem 1.25rem; border-radius: 14px;
  background: var(--badge-bg); color: var(--badge-fg);
  border: 1px solid color-mix(in srgb, var(--badge-fg) 10%, transparent);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s;
}
.store:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.store__icon { width: 30px; height: 30px; flex: none; }
.store__text { display: flex; flex-direction: column; text-align: start; line-height: 1.2; }
.store__text small { font-size: .74rem; font-weight: 500; opacity: .78; }
.store__text strong { font-size: 1.2rem; font-weight: 600; letter-spacing: 0; }
.store.is-soon { cursor: default; }
.store.is-soon:hover { transform: none; box-shadow: var(--shadow-sm); }
.store.is-soon::after {
  content: "قريباً"; position: absolute; top: -11px; inset-inline-start: 12px;
  padding: .05rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: var(--brass); color: #fff; box-shadow: 0 4px 10px -4px rgba(0,0,0,.35);
}
.store--light { --badge-bg: var(--ivory); --badge-fg: #233735; }
.hero__alt { margin-top: 1rem; color: var(--ink-2); font-size: .98rem; }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.chips li {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .85rem; border-radius: 999px; font-size: .92rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--ink-2);
}
.chips .ic { color: var(--teal); width: 1.1em; height: 1.1em; }

/* ---------- Stage & phones ---------- */
.hero__stage { position: relative; }
.stage {
  position: relative; width: min(100%, 580px); margin-inline: auto;
  transform: perspective(1600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d; transition: transform .5s var(--ease);
  padding-top: 2.5rem;
}
.slot { position: absolute; }
.slot--front { position: relative; width: fit-content; margin-inline: auto; z-index: 3; }
.slot--front .phone { --w: clamp(200px, 22vw, 286px); animation: float 7s ease-in-out infinite; }
.slot--left { left: 0; top: 16%; z-index: 2; transform: rotate(-7deg); }
.slot--left .phone { --w: clamp(150px, 17.5vw, 228px); animation: float 8.5s ease-in-out -2s infinite; }
.slot--right { right: 0; top: 21%; z-index: 1; transform: rotate(7deg); }
.slot--right .phone { --w: clamp(150px, 17.5vw, 228px); animation: float 9s ease-in-out -4s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.phone { --w: 280px; --screen-bg: #F5F7F4; --screen-ink: #233735; width: var(--w); position: relative; }
.phone[data-dark] { --screen-bg: #182321; --screen-ink: #E4EDE8; }
.phone__frame {
  position: relative;
  padding: calc(var(--w) * .03);
  border-radius: calc(var(--w) * .165);
  background: linear-gradient(160deg, #2c3634 0%, #151b1a 55%, #1e2624 100%);
  box-shadow: var(--shadow-phone), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.phone__frame::before, .phone__frame::after {
  content: ""; position: absolute; width: calc(var(--w) * .013); border-radius: 3px; background: #2c3634;
}
.phone__frame::before { left: calc(var(--w) * -.011); top: 23%; height: 9%; box-shadow: 0 calc(var(--w) * .125) 0 #2c3634; }
.phone__frame::after { right: calc(var(--w) * -.011); top: 29%; height: 13%; }
.phone__screen {
  position: relative; width: 100%; aspect-ratio: 390 / 888;
  border-radius: calc(var(--w) * .135); overflow: hidden;
  background: var(--screen-bg); color: var(--screen-ink);
  display: flex; flex-direction: column;
  transform: translateZ(0);
}
.phone__status {
  flex: none; height: calc(var(--w) * .113);
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--w) * .006) calc(var(--w) * .085) 0 calc(var(--w) * .075);
  font-size: calc(var(--w) * .042); font-weight: 600; line-height: 1;
}
.phone__time { direction: ltr; font-variant-numeric: tabular-nums; }
.phone__sys { display: flex; align-items: center; gap: calc(var(--w) * .014); }
.phone__sys svg { width: calc(var(--w) * .048); height: calc(var(--w) * .048); fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.phone__screen img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.phone__stack { position: relative; aspect-ratio: 390 / 844; }
.phone__stack img { position: absolute; inset: 0; opacity: 0; transform: scale(1.02); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.phone__stack img.is-active { opacity: 1; transform: none; }
.phone__island {
  position: absolute; top: calc(var(--w) * .058); left: 50%; transform: translateX(-50%);
  width: calc(var(--w) * .27); height: calc(var(--w) * .074); border-radius: 999px;
  background: #0a0f0e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.float {
  position: absolute; z-index: 4;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .5rem .95rem .5rem .6rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md); font-weight: 600; font-size: .92rem; white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.float__ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.float__ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.float__ic--correct { background: var(--correct-soft); color: var(--correct); }
.float__ic--teal { background: var(--teal-soft); color: var(--teal); }
.float__ic--brass { background: var(--brass-soft); color: var(--brass); }
.float--a { top: 9%; right: 4%; animation-delay: -1s; }
.float--b { bottom: 14%; left: 2%; animation-delay: -3s; }
.float--c { top: 46%; right: -2%; animation-delay: -5s; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--hairline); background: var(--surface); padding: .9rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; gap: 2.5rem; padding-inline-end: 2.5rem; }
.marquee__list li { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; font-size: 1rem; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--teal)); transform: rotate(45deg); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- Tracks ---------- */
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.track {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-sheet);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.track:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--teal) 40%, var(--hairline)); }
.track__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.track__head h3 { font-size: 1.4rem; }
.track__head p { color: var(--ink-2); font-size: .95rem; }
.track__head .pill { margin-inline-start: auto; }
.track__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; flex: none; }
.track__icon .ic { width: 28px; height: 28px; }
.track__icon--sci { background: var(--teal-soft); color: var(--teal); }
.track__icon--lit { background: var(--brass-soft); color: var(--brass); }
.subjects { display: flex; flex-wrap: wrap; gap: .55rem; position: relative; z-index: 1; }
.subjects li {
  padding: .45rem .9rem; border-radius: 999px; font-weight: 500; font-size: .98rem;
  background: var(--cs); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
}
.track__mark {
  position: absolute; inset-inline-end: -30px; bottom: -36px; width: 190px; height: 190px;
  fill: none; stroke: var(--ink); stroke-width: .6; opacity: .05; pointer-events: none;
}

/* ---------- Story ---------- */
.story__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.story__steps { display: flex; flex-direction: column; }
.step { position: relative; min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; padding-inline-start: 4.25rem; transition: opacity .4s; }
.step:first-child { min-height: 64vh; padding-top: 0; }
.step:last-child { min-height: 80vh; }
.step__num {
  position: absolute; inset-inline-start: 0; top: calc(50% - 26px);
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--ink-2);
  font-weight: 600; font-size: 1.2rem; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.step:first-child .step__num { top: calc(50% - 26px - 1rem); }
.step h3 { font-size: clamp(1.35rem, 1rem + 1vw, 1.8rem); transition: color .3s; }
.step p { margin-top: .8rem; color: var(--ink-2); font-size: 1.08rem; max-width: 50ch; }
.step.is-active .step__num { background: var(--teal); color: var(--canvas); border-color: var(--teal); transform: scale(1.06); }
:root[data-theme="dark"] .step.is-active .step__num { color: #152C28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step.is-active .step__num { color: #152C28; } }
@media (min-width: 960px) {
  .js .step { opacity: .38; }
  .js .step.is-active { opacity: 1; }
}
.step .phone--inline { display: none; }
.story__sticky { position: sticky; top: calc(var(--header-h) + 24px); display: flex; justify-content: center; }
.phone--story { --w: clamp(240px, 24vw, 310px); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; }
.feature {
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-sheet);
  padding: 1.6rem 1.5rem 1.7rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c, var(--teal)) 35%, var(--hairline)); }
.feature__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--cs); color: var(--c); margin-bottom: 1.1rem; }
.feature__icon .ic { width: 26px; height: 26px; }
.feature h3 { font-size: 1.15rem; margin-bottom: .45rem; }
.feature p { color: var(--ink-2); font-size: .98rem; }

/* ---------- Night / offline panel ---------- */
.night {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 4vw, 4rem); align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: 32px; color: var(--ivory);
  background:
    radial-gradient(60% 80% at 85% 20%, rgba(143, 203, 194, .22), transparent 60%),
    radial-gradient(40% 50% at 10% 90%, rgba(203, 168, 115, .18), transparent 60%),
    linear-gradient(135deg, #0F4F49 0%, #0B3C37 60%, #0D2F2B 100%);
  box-shadow: 0 40px 80px -40px rgba(11, 60, 55, .7);
}
.arches--night { inset: 0; height: 100%; color: rgba(249, 248, 243, .07); z-index: -1;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 70%); mask-image: linear-gradient(to top, #000 0%, transparent 70%); }
.night .title { color: #fff; }
.night__copy > p { margin-top: 1rem; font-size: 1.08rem; color: rgba(249, 248, 243, .85); max-width: 52ch; }
.night__list { margin-top: 1.4rem; display: grid; gap: .6rem; }
.night__list li { display: flex; align-items: center; gap: .65rem; font-weight: 500; }
.night__list .ic { width: 22px; height: 22px; color: var(--mint); }
.night__toggle { margin-top: 2rem; display: inline-flex; align-items: center; gap: .9rem; padding: .6rem .6rem .6rem 1.1rem; border-radius: 999px; background: rgba(249, 248, 243, .08); border: 1px solid rgba(249, 248, 243, .14); font-weight: 600; }
.switch { position: relative; width: 56px; height: 32px; border-radius: 999px; border: 0; background: rgba(249, 248, 243, .25); cursor: pointer; transition: background .25s; padding: 0; }
.switch__knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .25s var(--ease); }
.switch[aria-checked="true"] { background: var(--mint); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(-24px); }
.night__visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 360px; }
.phone--demo { --w: clamp(220px, 22vw, 280px); }
.dl-card {
  position: absolute; inset-inline-start: 0; bottom: 12%;
  width: min(230px, 60%); padding: .9rem 1rem; border-radius: 16px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md); animation: float 7s ease-in-out -2s infinite;
}
.dl-card__row { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem; }
.dl-card__row .ic { color: var(--teal); width: 20px; height: 20px; }
.dl-card__row em { margin-inline-start: auto; font-style: normal; color: var(--correct); font-size: .8rem; }
.dl-card__bar { height: 6px; border-radius: 999px; background: var(--muted); margin-top: .7rem; overflow: hidden; }
.dl-card__bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--teal); transform-origin: inline-start; animation: fill 4s var(--ease) infinite; }
@keyframes fill { 0% { transform: scaleX(0); } 55%, 100% { transform: scaleX(1); } }
.dl-card small { display: block; margin-top: .5rem; color: var(--ink-2); font-size: .8rem; }

/* ---------- Gallery ---------- */
.gallery { overflow: hidden; }
.gallery__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.25rem; }
.gallery__nav { display: flex; gap: .5rem; }
.gallery__track {
  display: flex; gap: clamp(1rem, 2.5vw, 2rem);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 1rem max(var(--gutter), calc((100% - var(--container)) / 2)) 2.5rem;
  scrollbar-width: none; cursor: grab;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.shot { flex: none; scroll-snap-align: center; width: clamp(210px, 22vw, 260px); }
.shot .phone { --w: 100%; width: 100%; }
/* phones inside the gallery use container-relative sizes */
.shot { container-type: inline-size; }
.shot .phone { --w: 100cqw; }
.shot figcaption { margin-top: 1.1rem; text-align: center; }
.shot figcaption strong { display: block; font-weight: 600; }
.shot figcaption span { display: block; color: var(--ink-2); font-size: .9rem; margin-top: .15rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; counter-reset: step; position: relative; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-sheet); padding: 1.5rem; }
.steps__num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: var(--canvas); font-weight: 600; font-size: 1.1rem; margin-bottom: 1rem; }
:root[data-theme="dark"] .steps__num { color: #152C28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps__num { color: #152C28; } }
.steps h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.steps p { color: var(--ink-2); font-size: .98rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .75rem; }
.faq__item { background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-panel); overflow: hidden; }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; font-weight: 600; font-size: 1.08rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .ic { width: 22px; height: 22px; color: var(--teal); transition: transform .3s var(--ease); }
.faq__item[open] summary .ic { transform: rotate(45deg); }
.faq__item[open] summary { color: var(--teal); }
.faq__body { padding: 0 1.4rem 1.3rem; color: var(--ink-2); }
.faq__body p { max-width: 70ch; }

/* ---------- CTA ---------- */
.cta-wrap { padding-top: 0; }
.cta {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 4rem);
  border-radius: 32px; color: var(--ivory);
  background:
    radial-gradient(50% 70% at 20% 10%, rgba(143, 203, 194, .25), transparent 60%),
    radial-gradient(40% 50% at 90% 100%, rgba(203, 168, 115, .22), transparent 60%),
    linear-gradient(135deg, #1B7F76 0%, #176B63 50%, #0F4F49 100%);
  box-shadow: 0 40px 80px -40px rgba(23, 107, 99, .7);
}
.arches--cta { inset: 0; height: 100%; color: rgba(249, 248, 243, .09); z-index: -1; }
.cta__icon { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 0 0 4px rgba(249, 248, 243, .22), 0 20px 40px -20px rgba(0,0,0,.5); }
.cta .title { color: #fff; margin-top: 1.25rem; }
.cta > p { margin-top: .75rem; font-size: 1.15rem; color: rgba(249, 248, 243, .9); }
.cta__tag { color: var(--mint); font-weight: 600; }
.cta .store-row { margin-top: 1.8rem; }
.cta__alt { margin-top: 1.2rem; color: rgba(249, 248, 243, .85); font-size: .98rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); background: var(--surface); padding: 3rem 0 2.5rem; }
.footer { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.footer__brand p { color: var(--ink-2); margin-top: .75rem; font-size: .98rem; }
.footer__brand img { height: 28px; width: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: flex-end; align-content: start; padding-top: .4rem; }
.footer__links a { color: var(--ink-2); font-weight: 500; }
.footer__links a:hover { color: var(--teal); }
.footer__legal { grid-column: 1 / -1; color: var(--ink-3); font-size: .9rem; border-top: 1px solid var(--hairline); padding-top: 1.25rem; margin-top: .5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav__links { gap: 1.1rem; }
}
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { max-width: 680px; }
  .hero__stage { margin-top: 1rem; }
  .stage { width: min(100%, 620px); }
  .slot--front .phone { --w: clamp(210px, 38vw, 290px); }
  .slot--left .phone, .slot--right .phone { --w: clamp(150px, 30vw, 230px); }
  .story__grid { grid-template-columns: 1fr; }
  .story__sticky { display: none; }
  .step { min-height: 0; padding: 1.5rem 0 1.5rem 0; padding-inline-start: 0; }
  .step:first-child, .step:last-child { min-height: 0; }
  .step__num { position: static; width: 44px; height: 44px; margin-bottom: 1rem; }
  .step:first-child .step__num { top: auto; }
  .step .phone--inline { display: block; --w: clamp(220px, 60vw, 280px); margin: 1.75rem auto 0; }
  .night { grid-template-columns: 1fr; }
  .night__visual { min-height: 0; padding-block: 1rem; }
  .footer { grid-template-columns: 1fr; }
  .footer__links { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
}
@media (max-width: 719px) {
  :root { --header-h: 64px; }
  .brand img { height: 28px; }
  .hero { text-align: center; padding-top: 2rem; }
  .hero__copy { margin-inline: auto; }
  .hero__lead { margin-inline: auto; }
  .store-row, .chips { justify-content: center; }
  .store { flex: 1 1 200px; justify-content: flex-start; }
  .stage { padding-top: 2rem; }
  .slot--front .phone { --w: clamp(200px, 56vw, 260px); }
  .slot--left .phone, .slot--right .phone { --w: clamp(120px, 34vw, 170px); }
  .slot--left { left: -6%; top: 18%; }
  .slot--right { right: -6%; top: 24%; }
  .float { font-size: .82rem; padding: .4rem .75rem .4rem .45rem; }
  .float__ic { width: 24px; height: 24px; }
  .float--a { top: 4%; right: 0; }
  .float--b { bottom: 8%; left: 0; }
  .float--c { display: none; }
  .title { font-size: clamp(1.6rem, 1.2rem + 3vw, 2.2rem); }
  .section__head { margin-bottom: 2rem; }
  .gallery__head { align-items: center; }
  .shot { width: min(72vw, 250px); }
  .night { padding: 1.75rem 1.25rem; border-radius: 24px; }
  .dl-card { inset-inline-start: -4px; bottom: 4%; width: 190px; }
  .cta { border-radius: 24px; }
  .cta .store { flex: 1 1 200px; }
}
@media (max-width: 420px) {
  .store__text strong { font-size: 1.1rem; }
  .eyebrow { font-size: .85rem; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .slot .phone, .float, .dl-card, .dl-card__bar i, .eyebrow__dot { animation: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
  .marquee__list:last-child { display: none; }
  .stage { transform: none !important; transition: none; }
  .phone__stack img, .step, .step__num, .track, .feature, .store, .btn, .icon-btn { transition: none; }
  .gallery__track { scroll-behavior: auto; }
}

/* ==========================================================================
   Try-it playground: a live replica of the question screen
   ========================================================================== */
.try__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.try__controls { display: grid; gap: .85rem; }
.ctl { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 1rem 1.15rem; }
.ctl--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ctl__head { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.ctl__head .ic { color: var(--teal); width: 22px; height: 22px; }
.ctl__head .switch { margin-inline-start: auto; }
.ctl__label { font-weight: 600; margin-bottom: .6rem; }
.ctl--row .ctl__label { margin-bottom: .1rem; }
.ctl__hint { color: var(--ink-2); font-size: .9rem; }
.seg { display: flex; border: 1px solid var(--hairline); border-radius: var(--r-control); overflow: hidden; background: var(--canvas); }
.seg button { flex: 1; min-height: 44px; padding: 0 .5rem; border: 0; background: transparent; color: var(--ink); font-weight: 500; font-size: .95rem; cursor: pointer; border-inline-start: 1px solid var(--hairline); transition: background .2s, color .2s; }
.seg button:first-child { border-inline-start: 0; }
.seg button[aria-checked="true"] { background: var(--teal-soft); color: var(--teal); font-weight: 600; }
.seg button:focus-visible { outline-offset: -3px; }
.seg--sizes button { font-weight: 600; }
.switch--ink { background: var(--hairline); }
.switch--ink .switch__knob { background: var(--surface); }
.switch--ink[aria-checked="true"] { background: var(--teal); }
.try__note { color: var(--ink-2); font-size: .92rem; padding-inline: .25rem; }
.try__stage { display: flex; justify-content: center; }
.phone--try { --w: clamp(280px, 25vw, 340px); }

/* The replica uses the app's own palette, independent of the page theme */
.app {
  --u: calc(var(--w) / 390); --qs: 1;
  --a-canvas: #F5F7F4; --a-surface: #FDFEFB; --a-muted: #EBF0ED; --a-hairline: #CBD6CF;
  --a-ink: #233735; --a-ink2: #596965; --a-ink3: #879692;
  --a-primary: #176B63; --a-primary-soft: #E1ECE7;
  --a-correct: #235C43; --a-correct-soft: #E6F2E9; --a-review: #8B492A; --a-review-soft: #FAEFE3; --a-brass: #B18A50;
  position: relative; display: flex; flex-direction: column; height: calc(844 * var(--u));
  background: var(--a-canvas); color: var(--a-ink); text-align: start; user-select: none;
}
.phone[data-dark] .app {
  --a-canvas: #182321; --a-surface: #202F2C; --a-muted: #2A3A37; --a-hairline: #4A5F56;
  --a-ink: #E4EDE8; --a-ink2: #B2C2BA; --a-ink3: #7F918A;
  --a-primary: #8FCBC2; --a-primary-soft: #2B403A;
  --a-correct: #A0D9B7; --a-correct-soft: #253F31; --a-review: #E7B38D; --a-review-soft: #423326; --a-brass: #CBA873;
}
.app__bar { flex: none; display: flex; align-items: center; gap: calc(10 * var(--u)); height: calc(56 * var(--u)); padding: 0 calc(16 * var(--u)); }
.app__back { display: grid; place-items: center; width: calc(32 * var(--u)); height: calc(32 * var(--u)); border: 0; background: none; color: var(--a-ink); padding: 0; }
.app__back .ic { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.app__progress { flex: 1; display: flex; align-items: center; gap: calc(12 * var(--u)); }
.app__track { flex: 1; height: calc(4 * var(--u)); border-radius: 999px; background: var(--a-muted); overflow: hidden; }
.app__track i { display: block; height: 100%; width: 33%; border-radius: inherit; background: var(--a-primary); transition: width .35s var(--ease); }
.app__count { font-size: calc(13 * var(--u)); color: var(--a-ink2); direction: ltr; font-variant-numeric: tabular-nums; }
.app__chip { display: inline-flex; align-items: center; gap: calc(4 * var(--u)); padding: calc(7 * var(--u)) calc(12 * var(--u)); border-radius: 999px; background: var(--a-muted); color: var(--a-ink); font-size: calc(13 * var(--u)); font-weight: 500; }
.app__chip .ic { width: calc(14 * var(--u)); height: calc(14 * var(--u)); color: var(--a-ink2); }
.app__pages { flex: 1; min-height: 0; display: flex; width: 100%; transform: translateX(calc(var(--page, 0) * 100% + var(--drag, 0) * 1px)); transition: transform .38s var(--ease); touch-action: pan-y; cursor: grab; }
.app__pages.is-dragging { transition: none; cursor: grabbing; }
.app[data-layout="list"] .app__pages { flex-direction: column; overflow-y: auto; transform: none; cursor: auto; scrollbar-width: none; }
.app[data-layout="list"] .app__pages::-webkit-scrollbar { display: none; }
.q { flex: 0 0 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: calc(10 * var(--u)) calc(16 * var(--u)) calc(56 * var(--u)); scrollbar-width: none; }
.q::-webkit-scrollbar { display: none; }
.app[data-layout="list"] .q { flex: none; overflow: visible; padding-bottom: calc(18 * var(--u)); }
.app[data-layout="list"] .q + .q { border-top: 1px solid var(--a-hairline); padding-top: calc(18 * var(--u)); }
.q__label { display: none; font-size: calc(12 * var(--u)); color: var(--a-ink2); margin-bottom: calc(6 * var(--u)); }
.app[data-layout="list"] .q__label { display: block; }
.q__text { font-size: calc(20 * var(--u) * var(--qs)); font-weight: 500; line-height: 1.7; margin-bottom: calc(16 * var(--u)); }
.q__text .f, .q__opt .f { direction: ltr; unicode-bidi: isolate; }
.q__options { display: grid; gap: calc(12 * var(--u)); }
.q__options[data-align="center"] .q__opt { text-align: center; }
.q__options[data-align="start"] .q__opt { text-align: start; }
.q__opt {
  display: block; width: 100%; min-height: calc(53 * var(--u)); padding: calc(12 * var(--u)) calc(16 * var(--u));
  border-radius: calc(13 * var(--u)); border: calc(1.5 * var(--u)) solid var(--a-hairline); background: var(--a-surface); color: var(--a-ink);
  font-size: calc(18 * var(--u) * var(--qs)); line-height: 1.6; font-weight: 400; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .18s var(--ease);
}
.q__opt:hover { border-color: var(--a-ink3); }
.q__opt.is-selected { background: var(--a-primary-soft); border-color: var(--a-primary); border-width: calc(2 * var(--u)); }
.q__opt.is-correct { background: var(--a-correct-soft); border-color: var(--a-correct); border-width: calc(2 * var(--u)); color: var(--a-correct); font-weight: 500; }
.q__opt.is-wrong { background: var(--a-review-soft); border-color: var(--a-review); border-width: calc(2 * var(--u)); color: var(--a-review); animation: shake .42s var(--ease); }
.q.is-answered .q__opt { cursor: default; }
.q.is-answered .q__opt:not(.is-correct):not(.is-wrong) { color: var(--a-ink2); }
.q.is-answered .q__opt:hover { border-color: var(--a-hairline); }
.q.is-answered .q__opt.is-correct:hover { border-color: var(--a-correct); }
.q.is-answered .q__opt.is-wrong:hover { border-color: var(--a-review); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(calc(-5 * var(--u))); } 40% { transform: translateX(calc(5 * var(--u))); } 60% { transform: translateX(calc(-3 * var(--u))); } 80% { transform: translateX(calc(3 * var(--u))); } }
.q__confirm { margin-top: calc(10 * var(--u)); text-align: center; font-size: calc(12.5 * var(--u)); color: var(--a-primary); font-weight: 500; }
.q__actions { display: flex; align-items: center; gap: calc(26 * var(--u)); height: calc(40 * var(--u)); margin-top: calc(10 * var(--u)); padding: 0 calc(6 * var(--u)); }
.q__actions button { display: grid; place-items: center; border: 0; background: none; padding: 0; color: var(--a-ink3); cursor: pointer; width: calc(28 * var(--u)); height: calc(28 * var(--u)); }
.q__actions .ic { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.q__actions .q__flag { margin-inline-start: auto; }
.q__actions .q__heart.is-on { color: var(--a-brass); }
.q__actions .q__heart.is-on .ic { fill: currentColor; }
.q__explain { margin-top: calc(14 * var(--u)); background: var(--a-muted); border-radius: calc(18 * var(--u)); padding: calc(14 * var(--u)) calc(16 * var(--u)); animation: rise .45s var(--ease); }
.q__explain-head { display: flex; align-items: center; gap: calc(6 * var(--u)); font-size: calc(13 * var(--u)); color: var(--a-ink2); }
.q__explain-head .ic { width: calc(16 * var(--u)); height: calc(16 * var(--u)); color: var(--a-brass); }
.q__fb { margin-inline-start: auto; font-weight: 600; font-size: calc(13 * var(--u)); }
.q__fb.is-right { color: var(--a-correct); }
.q__fb.is-review { color: var(--a-review); }
.q__explain p { margin-top: calc(6 * var(--u)); font-size: calc(17 * var(--u) * var(--qs)); line-height: 1.85; color: var(--a-ink); }
@keyframes rise { from { opacity: 0; transform: translateY(calc(8 * var(--u))); } to { opacity: 1; transform: none; } }
.q__next { display: block; width: 100%; margin-top: calc(14 * var(--u)); min-height: calc(46 * var(--u)); border: 0; border-radius: calc(18 * var(--u)); background: var(--a-primary); color: #fff; font-weight: 600; font-size: calc(15 * var(--u)); cursor: pointer; animation: rise .45s var(--ease) .1s both; }
.phone[data-dark] .q__next { color: #152C28; }
.app[data-layout="list"] .q__next { display: none; }
.app__hint { position: absolute; inset-inline: 0; bottom: calc(16 * var(--u)); display: flex; justify-content: center; align-items: center; gap: calc(6 * var(--u)); font-size: calc(12 * var(--u)); color: var(--a-ink2); pointer-events: none; transition: opacity .3s; }
.app__hint .ic { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.app__hint.is-hidden, .app[data-layout="list"] .app__hint { opacity: 0; }

@media (max-width: 1023px) {
  .try__grid { grid-template-columns: 1fr; }
  .try__stage { order: 1; }
  .try__controls { order: 2; max-width: 560px; margin-inline: auto; width: 100%; }
  .phone--try { --w: min(88vw, 360px); }
}
@media (prefers-reduced-motion: reduce) {
  .app__pages, .app__track i, .q__opt { transition: none; }
  .q__opt.is-wrong, .q__explain, .q__next { animation: none; }
}

/* ---------- Subject marks (same icons and colours as the app) ---------- */
:root {
  --sub-math: #2F6DB5; --sub-math-soft: #E6EDF6;
  --sub-physics: #4C3B9E; --sub-physics-soft: #EAE7F3;
  --sub-chem: #D17A22; --sub-chem-soft: #F9EFE4;
  --sub-bio: #3E8E5A; --sub-bio-soft: #E8F1EB;
  --sub-arabic: #176B63; --sub-arabic-soft: #E3EDEC;
  --sub-english: #C0443C; --sub-english-soft: #F7E9E8;
  --sub-french: #B5477F; --sub-french-soft: #F6E9F0;
  --sub-religion: #A57A2C; --sub-religion-soft: #F4EFE6;
  --sub-history: #8A5A3B; --sub-history-soft: #F1EBE7;
  --sub-geo: #1E8AA0; --sub-geo-soft: #E4F1F4;
  --sub-philo: #7A4FA0; --sub-philo-soft: #EFEAF4;
}
:root[data-theme="dark"] {
  --sub-math: #6D99CB; --sub-math-soft: #233D4A;
  --sub-physics: #8276BB; --sub-physics-soft: #2A3245;
  --sub-chem: #DFA264; --sub-chem-soft: #47402A;
  --sub-bio: #78B08C; --sub-bio-soft: #274436;
  --sub-arabic: #5D9792; --sub-arabic-soft: #1E3C38;
  --sub-english: #D37C76; --sub-english-soft: #433430;
  --sub-french: #CB7EA5; --sub-french-soft: #41343E;
  --sub-religion: #C0A26B; --sub-religion-soft: #3D402C;
  --sub-history: #AD8C76; --sub-history-soft: #37382F;
  --sub-geo: #62ADBC; --sub-geo-soft: #204346;
  --sub-philo: #A284BC; --sub-philo-soft: #343646;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sub-math: #6D99CB; --sub-math-soft: #233D4A;
    --sub-physics: #8276BB; --sub-physics-soft: #2A3245;
    --sub-chem: #DFA264; --sub-chem-soft: #47402A;
    --sub-bio: #78B08C; --sub-bio-soft: #274436;
    --sub-arabic: #5D9792; --sub-arabic-soft: #1E3C38;
    --sub-english: #D37C76; --sub-english-soft: #433430;
    --sub-french: #CB7EA5; --sub-french-soft: #41343E;
    --sub-religion: #C0A26B; --sub-religion-soft: #3D402C;
    --sub-history: #AD8C76; --sub-history-soft: #37382F;
    --sub-geo: #62ADBC; --sub-geo-soft: #204346;
    --sub-philo: #A284BC; --sub-philo-soft: #343646;
  }
}
.subjects li { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .7rem; }
.mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--c); flex: none; }
.mark .ic { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.mark--letters { border: 1.5px solid currentColor; border-radius: 7px; font-weight: 700; font-size: .62rem; line-height: 1; letter-spacing: 0; width: 22px; height: 22px; }
.mark--letters.is-ar { font-size: .8rem; }
.marquee__list li .mark { width: 22px; height: 22px; }
.marquee__list li .mark .ic { width: 18px; height: 18px; }
.marquee__list li .mark--letters { width: 20px; height: 20px; font-size: .55rem; }
.marquee__list li .mark--letters.is-ar { font-size: .72rem; }
.track__icon .ic--p { fill: currentColor; stroke: none; width: 32px; height: 32px; }
