/* ============================================================
   JurisMind — design system
   Space Grotesk + Inter + IBM Plex Sans Arabic
   Electric lime #C6FF4D · Midnight #191923 · Lavender #B9A0FF
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* palette */
  --lime: #c6ff4d;
  --lime-ink: #1c2408;
  --lime-deep: #9ed62a;
  --midnight: #191923;
  --midnight-2: #23232f;
  --midnight-3: #2f2f3d;
  --lavender: #b9a0ff;
  --lavender-soft: #ece5ff;
  --off: #f7f7f2;
  --white: #ffffff;
  --coral: #ff8b70;
  --coral-soft: #ffe7e0;
  --mint: #65d6b0;
  --mint-soft: #ddf7ee;
  --grey: #777785;
  --grey-2: #9b9baa;
  --line: rgba(25, 25, 35, 0.1);
  --line-soft: rgba(25, 25, 35, 0.06);
  --line-dark: rgba(255, 255, 255, 0.1);

  /* accents for subjects */
  --a-lime: #c6ff4d;
  --a-mint: #65d6b0;
  --a-lavender: #b9a0ff;
  --a-coral: #ff8b70;
  --a-indigo: #8b93ff;
  --a-teal: #4fd1d1;
  --a-slate: #a0a8c0;
  --a-rose: #ff9dc0;
  --accent: var(--lime);

  /* shape & depth */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(25, 25, 35, 0.04), 0 8px 24px -12px rgba(25, 25, 35, 0.14);
  --sh-2: 0 2px 6px rgba(25, 25, 35, 0.06), 0 24px 48px -24px rgba(25, 25, 35, 0.26);
  --sh-dark: 0 24px 60px -30px rgba(25, 25, 35, 0.55);

  /* type */
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;

  /* layout */
  --shell-side: 258px;
  --gap: 20px;
  --maxw: 1200px;
}

html[dir="rtl"] {
  --font-head: "IBM Plex Sans Arabic", "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--off);
  color: var(--midnight);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01" 1, "cv05" 1;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5 { letter-spacing: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
h3 { font-size: 1.18rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 3px solid rgba(185, 160, 255, 0.75);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection { background: var(--lime); color: var(--lime-ink); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 22px; }
.muted { color: var(--grey); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.76rem; }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }

/* ---------- 3. Utilities ---------- */
.row-flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--gap); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 26px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.hide { display: none !important; }

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-bg: var(--midnight);
  --btn-fg: var(--off);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-1); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn svg { width: 18px; height: 18px; }
.btn-lime { --btn-bg: var(--lime); --btn-fg: var(--lime-ink); }
.btn-lime:hover { --btn-bg: #d2ff6d; }
.btn-dark { --btn-bg: var(--midnight); --btn-fg: var(--off); }
.btn-lav { --btn-bg: var(--lavender); --btn-fg: #221741; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--midnight); border-color: var(--line); }
.btn-ghost:hover { --btn-bg: rgba(25, 25, 35, 0.04); }
.btn-coral { --btn-bg: var(--coral); --btn-fg: #3a1206; }
.btn-mint { --btn-bg: var(--mint); --btn-fg: #06301f; }
.btn-sm { padding: 8px 15px; font-size: 0.85rem; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; border-bottom: 2px solid var(--lime); padding-bottom: 1px;
}
html[dir="rtl"] .link-arrow svg { transform: scaleX(-1); }

/* ---------- 5. Pills, chips, tags ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(25, 25, 35, 0.06);
  color: var(--midnight);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pill-lime { background: var(--lime); color: var(--lime-ink); }
.pill-lav { background: var(--lavender-soft); color: #4b2f9e; }
.pill-coral { background: var(--coral-soft); color: #a63a1e; }
.pill-mint { background: var(--mint-soft); color: #0b6b4e; }
.pill-dark { background: var(--midnight); color: var(--off); }
.pill-outline { background: transparent; border: 1px solid var(--line); color: var(--grey); }
.pill-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: 0.9;
}
.kicker {
  font-family: var(--font-head);
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 12px;
}
html[dir="rtl"] .kicker { letter-spacing: 0.04em; }
.kicker-lime { color: var(--lime-deep); }
.kicker-lav { color: #8467e0; }
.kicker-coral { color: #d05a3a; }

/* ---------- 6. Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 22px;
  position: relative;
}
.card-flat { box-shadow: none; }
.card-dark {
  background: var(--midnight);
  color: var(--off);
  border-color: transparent;
}
.card-dark .muted { color: rgba(247, 247, 242, 0.6); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-title { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }
.card-sub { color: var(--grey); font-size: 0.82rem; }
.hairline { height: 1px; background: var(--line-soft); margin: 16px 0; }

/* subject accent card */
[data-accent="lime"] { --accent: var(--a-lime); }
[data-accent="mint"] { --accent: var(--a-mint); }
[data-accent="lavender"] { --accent: var(--a-lavender); }
[data-accent="coral"] { --accent: var(--a-coral); }
[data-accent="indigo"] { --accent: var(--a-indigo); }
[data-accent="teal"] { --accent: var(--a-teal); }
[data-accent="slate"] { --accent: var(--a-slate); }
[data-accent="rose"] { --accent: var(--a-rose); }
.accent-bar { width: 34px; height: 6px; border-radius: 4px; background: var(--accent); }

/* ---------- 7. Meters, rings, stats ---------- */
.meter {
  height: 9px; border-radius: var(--r-pill);
  background: rgba(25, 25, 35, 0.08);
  overflow: hidden;
}
.meter > i {
  display: block; height: 100%; border-radius: inherit;
  background: var(--midnight);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.meter-lime > i { background: var(--lime); }
.meter-mint > i { background: var(--mint); }
.meter-lav > i { background: var(--lavender); }
.meter-coral > i { background: var(--coral); }
.meter-thin { height: 6px; }

.ring { position: relative; width: 108px; height: 108px; flex: none; }
.ring svg { transform: rotate(-90deg); }
html[dir="rtl"] .ring svg { transform: rotate(-90deg) scaleX(-1); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .ring-bg { stroke: rgba(25, 25, 35, 0.08); }
.ring .ring-fg { stroke: var(--lime); transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
.ring-lg { width: 150px; height: 150px; }
.ring-val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.ring-val span { font-size: 0.9rem; }
.ring-lab { text-align: center; font-size: 0.78rem; color: var(--grey); margin-top: 6px; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-val {
  font-family: var(--font-head); font-weight: 700;
  font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.1;
}
.stat-lab { color: var(--grey); font-size: 0.82rem; }
.stat-dark .stat-val { color: var(--lime); }

/* sparkline bars (weekly activity) */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 92px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 100%; }
.bars .bar i {
  display: block; border-radius: 7px 7px 4px 4px;
  background: rgba(25, 25, 35, 0.12);
  transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 4px;
}
.bars .bar:nth-child(6) i { background: var(--lime); }
.bars .bar:nth-child(7) i { background: var(--midnight); }
.bars-lab { display: flex; gap: 8px; margin-top: 8px; }
.bars-lab span { flex: 1; text-align: center; font-size: 0.72rem; color: var(--grey-2); }
html[dir="rtl"] .bars-lab { direction: rtl; }

/* ---------- 8. Landing: header, hero ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(247, 247, 242, 0.82);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.16rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--midnight); color: var(--lime);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 13px; border-radius: var(--r-pill);
  font-size: 0.9rem; font-weight: 500; color: var(--grey);
  transition: color 0.16s ease, background 0.16s ease;
}
.site-nav a:hover { color: var(--midnight); background: rgba(25, 25, 35, 0.05); }
.head-actions { display: flex; align-items: center; gap: 10px; }
.burger {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--white);
  align-items: center; justify-content: center; cursor: pointer;
}

/* mobile nav drawer (landing) */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--white);
  padding-bottom: 10px;
}
.mobile-nav.open { display: block; }
.mobile-nav > a:not(.btn) {
  display: block; padding: 13px 22px; font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav > a:not(.btn):hover { background: rgba(25, 25, 35, 0.03); }

/* ---------- language picker: one button + dropdown ----------
   Built on <details>/<summary>: the list opens natively, no JavaScript needed. */
.langpick { position: relative; display: inline-flex; align-items: center; }
.langpick > summary { list-style: none; }
.langpick > summary::-webkit-details-marker { display: none; }
.langpick > summary::marker { content: ""; }

.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 8px 12px; border-radius: var(--r-pill);
  background: var(--white); border: 1px solid var(--line);
  color: var(--midnight); font-weight: 600; font-size: 0.82rem; line-height: 1;
  white-space: nowrap; cursor: pointer; user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.lang-btn:hover { border-color: var(--midnight); background: var(--off); transform: translateY(-1px); }
.lang-btn:active { transform: translateY(0); }
.lang-btn .lang-code { font-family: var(--font-head); letter-spacing: 0.06em; }
.lang-btn .chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; flex: none; color: var(--grey); margin-inline-start: -1px;
}
.lang-btn .chev svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.langpick[open] > .lang-btn { border-color: var(--midnight); background: var(--off); }
.langpick[open] .lang-btn .chev svg { transform: rotate(180deg); }

/* flags */
.flag {
  width: 20px; height: 13.3px; flex: none; display: block;
  border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(25, 25, 35, 0.14);
}
.lang-btn .flag { width: 19px; height: 12.7px; }

/* the list of languages — visible whenever the <details> is open */
.lang-menu {
  position: absolute; z-index: 80;
  inset-block-start: calc(100% + 8px); inset-inline-end: 0;
  min-width: min(230px, calc(100vw - 24px)); max-width: calc(100vw - 24px);
  margin: 0; padding: 7px;
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); box-shadow: var(--sh-2);
  animation: langIn 0.16s ease-out;
}
.lang-menu[hidden] { display: none; }
.langpick:not([open]) .lang-menu { display: none; }
.langpick.drop-up > .lang-menu {
  inset-block-start: auto; inset-block-end: calc(100% + 8px);
}
@keyframes langIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.lang-menu li { list-style: none; }
.lang-menu a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px;
  font-size: 0.9rem; font-weight: 500; color: var(--midnight);
}
.lang-menu a:hover { background: var(--off); }
.lang-menu .lang-name { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.lang-menu .lh {
  display: block; font-size: 0.68rem; color: var(--grey);
  letter-spacing: 0.06em; margin-top: 2px;
}
.lang-menu a .tick { width: 17px; height: 17px; flex: none; color: var(--lime-deep); opacity: 0; }
.lang-menu a .tick svg { width: 17px; height: 17px; }
.lang-menu a[aria-checked="true"] { font-weight: 700; background: rgba(198, 255, 77, 0.22); }
.lang-menu a[aria-checked="true"] .tick { opacity: 1; }

.langpick-dark .lang-btn {
  background: var(--midnight-2); border-color: rgba(255, 255, 255, 0.16); color: var(--off);
}
.langpick-dark .lang-btn:hover { border-color: rgba(255, 255, 255, 0.42); }
.langpick-dark .lang-btn .chev { color: rgba(247, 247, 242, 0.6); }
.langpick-dark[open] > .lang-btn { background: var(--midnight-3); border-color: rgba(255, 255, 255, 0.42); }
.sidebar .langpick { width: 100%; }
.sidebar .langpick > .lang-btn { width: 100%; justify-content: center; }
.sidebar .lang-menu {
  inset-block-start: auto; inset-block-end: calc(100% + 8px);
  inset-inline: 0; min-width: 0;
}
.card-dark .langpick { width: 100%; }

.hero { position: relative; overflow: hidden; padding: 70px 0 40px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 380px at 82% 8%, rgba(185, 160, 255, 0.36), transparent 62%),
    radial-gradient(520px 320px at 12% 92%, rgba(198, 255, 77, 0.34), transparent 60%),
    radial-gradient(420px 300px at 55% 120%, rgba(101, 214, 176, 0.26), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); gap: 44px; align-items: center; }
.hero h1 { max-width: 15ch; }
html[dir="rtl"] .hero h1 { max-width: 18ch; }
.hero-lede { font-size: 1.06rem; color: #4c4c5c; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; color: var(--grey); font-size: 0.84rem; }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }

/* hero dashboard card */
.hero-card {
  background: var(--midnight);
  color: var(--off);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: var(--sh-dark);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 255, 77, 0.22), transparent 68%);
  inset-block-start: -90px; inset-inline-end: -80px;
}
.hero-card .hc-title { font-family: var(--font-head); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.02em; margin: 6px 0 4px; }
.hero-tiles { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-top: 20px; }
.htile {
  background: var(--midnight-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-md);
  padding: 15px;
}
.htile-lime { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.htile-lav { background: rgba(185, 160, 255, 0.16); border-color: rgba(185, 160, 255, 0.4); }
.htile-coral { background: rgba(255, 139, 112, 0.15); border-color: rgba(255, 139, 112, 0.38); }
.htile-lime .muted, .htile-lime .stat-lab { color: rgba(28, 36, 8, 0.7); }
.htile-lab { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.72; }
.htile-val { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; margin-top: 4px; }
.hero-caption { color: rgba(247, 247, 242, 0.5); font-size: 0.74rem; margin: 16px 0 0; }

/* ticker */
.ticker {
  border-block: 1px solid var(--line-soft);
  background: var(--white);
  overflow: hidden; padding: 13px 0;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track { display: flex; gap: 34px; width: max-content; animation: marquee 42s linear infinite; }
html[dir="rtl"] .ticker-track { animation-direction: reverse; }
.ticker-track span {
  font-family: var(--font-head); font-size: 0.86rem; font-weight: 600;
  color: var(--grey); display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
}
.ticker-track span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* sections */
.section { padding: 74px 0; }
.section-tight { padding: 52px 0; }
.section-dark { background: var(--midnight); color: var(--off); }
.section-dark .muted { color: rgba(247, 247, 242, 0.62); }
.section-lav { background: linear-gradient(180deg, rgba(185, 160, 255, 0.14), rgba(185, 160, 255, 0)); }
.sec-head { max-width: 680px; margin-bottom: 34px; }
.sec-head.center { margin-inline: auto; }
.sec-head h2 { margin-bottom: 12px; }

/* step cards */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.step-num {
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  color: var(--midnight); background: var(--lime);
  border-radius: 9px; padding: 4px 9px; display: inline-block;
}

/* retention bullets */
.blist { display: grid; gap: 18px; }
.bitem { display: flex; gap: 14px; align-items: flex-start; }
.bicon {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: var(--lime); color: var(--lime-ink);
}
.bicon-lav { background: var(--lavender); color: #221741; }
.bicon-mint { background: var(--mint); color: #06301f; }
.bicon-coral { background: var(--coral); color: #3a1206; }
.bicon svg { width: 20px; height: 20px; }
.bitem h4 { margin-bottom: 3px; }

/* decay chart */
.chart-card { padding: 24px; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.8rem; color: var(--grey); }
.chart-legend i { width: 22px; height: 4px; border-radius: 3px; display: inline-block; margin-inline-end: 7px; vertical-align: middle; }
.chart-legend .l-forget { background: var(--coral); }
.chart-legend .l-keep { background: var(--mint); }

/* stats band */
.stats-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.stat-band-item { padding: 22px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line-soft); }
.section-dark .stat-band-item { background: var(--midnight-2); border-color: var(--line-dark); }

/* journey */
.journey { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.jstep { position: relative; padding-top: 26px; }
.jstep::before {
  content: ""; position: absolute; inset-block-start: 8px; inset-inline-start: 0;
  width: 12px; height: 12px; border-radius: 50%; background: var(--lime);
}
.jstep::after {
  content: ""; position: absolute; inset-block-start: 13px; inset-inline-start: 20px;
  inset-inline-end: -14px; height: 2px; background: var(--line);
}
.jstep:last-child::after { display: none; }
.jstep h4 { margin-bottom: 4px; font-size: 0.96rem; }

/* subject cards */
.subj-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.subj-card {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.subj-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line); }
.subj-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 26%, var(--white));
  color: var(--midnight);
}
.subj-icon svg { width: 21px; height: 21px; }
.subj-card h3 { margin: 0; font-size: 1.02rem; }
.subj-card .subj-blurb { color: var(--grey); font-size: 0.86rem; margin: 0; }
.subj-meta { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; }

/* voices */
.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.voice { background: var(--white); border-radius: var(--r-lg); padding: 22px; border: 1px solid var(--line-soft); }
.voice blockquote { margin: 0 0 16px; font-size: 1.02rem; line-height: 1.55; }
.voice blockquote::before { content: "“"; font-family: var(--font-head); font-size: 2.4rem; line-height: 0; color: var(--lime); vertical-align: -0.35em; margin-inline-end: 4px; }
.voice figcaption { font-size: 0.84rem; color: var(--grey); }
.voice strong { color: var(--midnight); }

/* tutor preview */
.tutor-preview {
  background: var(--midnight); color: var(--off);
  border-radius: var(--r-xl); padding: 28px;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 30px;
}
.chat-mini { display: grid; gap: 12px; }
.bubble {
  border-radius: 16px; padding: 13px 16px; font-size: 0.92rem; max-width: 96%;
  position: relative;
}
.bubble-me { background: var(--lime); color: var(--lime-ink); margin-inline-start: auto; border-end-end-radius: 5px; }
.bubble-tutor { background: var(--midnight-2); border: 1px solid rgba(185, 160, 255, 0.35); border-end-start-radius: 5px; }
.bubble-tutor strong { color: var(--lavender); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq details {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 0 20px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600;
  font-family: var(--font-head); font-size: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.3rem; color: var(--grey); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--midnight); }
.faq .faq-body { padding-bottom: 18px; color: #45455a; }

/* final CTA */
.cta-band {
  background: var(--midnight); color: var(--off);
  border-radius: var(--r-xl); padding: 48px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset-block-start: -140px; inset-inline-start: 50%;
  transform: translateX(-50%); width: 460px; height: 300px;
  background: radial-gradient(circle, rgba(185, 160, 255, 0.35), transparent 68%);
}
.cta-band > * { position: relative; }

/* footer */
.site-foot { background: var(--midnight); color: rgba(247, 247, 242, 0.72); padding: 56px 0 30px; margin-top: 60px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 30px; }
.site-foot h5 { font-family: var(--font-head); color: var(--off); font-size: 0.84rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 14px; }
.site-foot a { color: rgba(247, 247, 242, 0.72); font-size: 0.9rem; }
.site-foot a:hover { color: var(--lime); }
.foot-links { display: grid; gap: 9px; }
.foot-bottom {
  margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  font-size: 0.84rem;
}
.foot-bottom .foot-legal { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- 9. App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--shell-side) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--midnight); color: var(--off);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { color: var(--off); padding-inline: 6px; }
.side-nav { display: grid; gap: 4px; }
.side-lab { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(247, 247, 242, 0.42); padding: 12px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 13px;
  color: rgba(247, 247, 242, 0.74); font-size: 0.92rem; font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: var(--midnight-2); color: var(--off); }
.nav-item.active { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.nav-item .nav-badge {
  margin-inline-start: auto; font-size: 0.72rem; font-weight: 700;
  background: var(--coral); color: #3a1206; border-radius: var(--r-pill); padding: 1px 8px;
}
.nav-item.active .nav-badge { background: rgba(28, 36, 8, 0.16); color: var(--lime-ink); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.side-card {
  background: var(--midnight-2); border: 1px solid var(--line-dark);
  border-radius: var(--r-md); padding: 15px;
}
.side-card .streak-num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--lime); }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 13px; }
.user-chip:hover { background: var(--midnight-2); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
  background: var(--lavender); color: #221741;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.15rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 247, 242, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 26px;
  display: flex; align-items: center; gap: 14px;
}
.crumb {
  display: flex; align-items: center; gap: 8px; color: var(--grey); font-size: 0.86rem;
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.crumb > * { overflow: hidden; text-overflow: ellipsis; }
.crumb strong { color: var(--midnight); font-weight: 600; }
.page { padding: 26px; max-width: 1280px; width: 100%; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 8px; }
.page-head .sub { color: var(--grey); max-width: 68ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* mobile bottom tabbar */
.tabbar { display: none; }

/* ---------- 10. Practice UI ---------- */
.q-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap); align-items: start; }
.q-card { padding: 26px; }
.q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.q-stem { font-family: var(--font-head); font-size: 1.22rem; font-weight: 600; line-height: 1.42; margin-bottom: 20px; }
.options { display: grid; gap: 11px; }
.opt {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 17px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--white);
  cursor: pointer; text-align: start; width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  font-size: 0.96rem; line-height: 1.5;
}
.opt:hover { border-color: var(--midnight); transform: translateY(-1px); }
.opt-key {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem;
  background: rgba(25, 25, 35, 0.07); font-family: var(--font-head);
}
.opt.picked { border-color: var(--midnight); background: rgba(25, 25, 35, 0.035); }
/* read-only preview of the options on the landing page (not clickable) */
.opt-readonly {
  cursor: default;
  border-color: var(--line-soft);
  background: #fbfbf7;
  font-size: 0.94rem;
}
.opt-readonly:hover { border-color: var(--line-soft); transform: none; }
.opt-readonly .opt-key { background: rgba(25, 25, 35, 0.08); }

/* "why this question?" note — lavender = AI / personalisation */
.why-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--lavender-soft);
  border: 1px solid rgba(185, 160, 255, 0.45);
  color: #3b2a63; font-size: 0.88rem; line-height: 1.5;
}
.why-row b { color: #2a1d49; }
.why-ic { width: 19px; height: 19px; flex: none; color: #6d4fd6; margin-top: 1px; }
.why-ic svg { width: 19px; height: 19px; }

/* white "next recommended exercise" card on the landing page */
.next-card .card-title { display: flex; align-items: center; gap: 9px; }
.next-ic {
  width: 30px; height: 30px; flex: none; padding: 6px;
  border-radius: 10px; background: var(--lavender-soft); color: #5b3fc4;
}
.opt.correct { border-color: var(--mint); background: var(--mint-soft); }
.opt.correct .opt-key { background: var(--mint); color: #06301f; }
.opt.wrong { border-color: var(--coral); background: var(--coral-soft); }
.opt.wrong .opt-key { background: var(--coral); color: #3a1206; }
.opt[disabled] { cursor: default; transform: none; }

.feedback { margin-top: 20px; border-radius: var(--r-md); padding: 18px; border: 1px solid var(--line-soft); background: #fbfbf7; }
.feedback.good { background: var(--mint-soft); border-color: rgba(101, 214, 176, 0.5); }
.feedback.bad { background: var(--coral-soft); border-color: rgba(255, 139, 112, 0.5); }
.feedback h4 { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.fb-list { display: grid; gap: 8px; margin-top: 12px; }
.fb-list li { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; }
.fb-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--midnight); flex: none; }
.xp-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--lime); color: var(--lime-ink);
  border-radius: var(--r-pill); padding: 5px 12px; font-weight: 700; font-size: 0.8rem;
}

/* progress dots */
.dots { display: flex; gap: 6px; }
.dots i { width: 26px; height: 6px; border-radius: var(--r-pill); background: rgba(25, 25, 35, 0.12); }
.dots i.ok { background: var(--mint); }
.dots i.no { background: var(--coral); }
.dots i.now { background: var(--midnight); }

/* sidebar of practice */
.live-mastery { display: grid; gap: 14px; }
.lm-row { display: grid; gap: 7px; }
.lm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.86rem; }
.lm-top b { font-family: var(--font-head); }

/* ---------- 11. Path / timeline ---------- */
.stage { margin-bottom: 26px; }
.stage-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.stage-num {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; background: var(--midnight); color: var(--lime); flex: none;
}
.stage.is-locked .stage-num { background: rgba(25, 25, 35, 0.1); color: var(--grey); }
.stage-track { display: grid; gap: 10px; }
.step-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 14px 16px;
}
.step-row .step-ic {
  width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: rgba(25, 25, 35, 0.06);
}
.step-row .step-ic svg { width: 18px; height: 18px; }
.step-row.is-done .step-ic { background: var(--mint); color: #06301f; }
.step-row.is-current { border-color: var(--midnight); box-shadow: 0 0 0 3px rgba(198, 255, 77, 0.5); }
.step-row.is-current .step-ic { background: var(--lime); color: var(--lime-ink); }
.step-row.is-locked { opacity: 0.55; }
.step-name { font-weight: 600; font-size: 0.96rem; }
.step-side { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

/* review queue */
.queue { display: grid; gap: 8px; }
.queue-group { margin-bottom: 14px; }
.queue-head {
  display: flex; align-items: center; gap: 9px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey); margin-bottom: 9px;
}
.queue-head .count {
  background: rgba(25, 25, 35, 0.08); border-radius: var(--r-pill); padding: 1px 8px;
  font-size: 0.72rem; letter-spacing: 0;
}
.queue-head.is-now { color: #c0482a; }
.queue-head.is-now .count { background: var(--coral-soft); color: #a63a1e; }
.queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: #fbfbf7; border: 1px solid var(--line-soft);
}
.queue-item .qi-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, var(--midnight)); flex: none; }
.queue-item .qi-side { margin-inline-start: auto; text-align: end; }

/* ---------- 12. Subjects library ---------- */
.subj-lib { display: grid; gap: 16px; }
.subj-block { scroll-margin-top: 90px; }
.topic-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.topic-row:last-child { border-bottom: 0; }
.topic-name { font-weight: 600; font-size: 0.94rem; }
.topic-key { font-size: 0.8rem; color: var(--grey); }
.status-tag { font-size: 0.74rem; font-weight: 700; border-radius: var(--r-pill); padding: 3px 10px; }
.status-weak { background: var(--coral-soft); color: #a63a1e; }
.status-solid { background: rgba(25, 25, 35, 0.07); color: #4c4c5c; }
.status-strong { background: var(--mint-soft); color: #0b6b4e; }

/* ---------- 13. Tutor ---------- */
.tutor-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: var(--gap); align-items: start; }
.chat { display: flex; flex-direction: column; min-height: 62vh; }
.chat-scroll { display: grid; gap: 14px; padding: 4px 2px 14px; overflow-y: auto; max-height: 58vh; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg-me { flex-direction: row-reverse; }
.msg-body { background: var(--white); border: 1px solid var(--line-soft); border-radius: 18px; padding: 14px 17px; max-width: 78%; box-shadow: var(--sh-1); }
.msg-me .msg-body { background: var(--midnight); color: var(--off); border-color: transparent; }
.msg-tutor .msg-body { border-start-start-radius: 6px; }
.msg-me .msg-body { border-start-end-radius: 6px; }
.msg-name { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey); margin-bottom: 5px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body .sources { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.msg-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--lavender); color: #221741; font-weight: 700; font-size: 0.8rem;
}
.msg-me .msg-avatar { background: var(--midnight); color: var(--lime); }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--lavender); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.composer {
  display: flex; gap: 10px; align-items: flex-end;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 10px 10px 10px 16px; margin-top: 4px;
}
html[dir="rtl"] .composer { padding: 10px 16px 10px 10px; }
.composer textarea {
  border: 0; resize: none; min-height: 44px; max-height: 140px; flex: 1;
  background: transparent; outline: none; padding: 10px 0; font-size: 0.96rem;
}
.prompt-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--white);
  border-radius: var(--r-pill); padding: 8px 14px; font-size: 0.84rem;
  line-height: 1.45; color: var(--midnight); max-width: 100%;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  text-align: start;
}
.chip:hover { border-color: var(--lavender); background: var(--lavender-soft); transform: translateY(-1px); }
.chip svg { width: 16px; height: 16px; flex: none; }
.chip.on { background: var(--midnight); color: var(--off); border-color: var(--midnight); }
.chip.on svg { color: var(--lime); }
.mode-switch { display: inline-flex; background: rgba(25, 25, 35, 0.06); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.mode-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 14px; border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 600; color: var(--grey);
}
.mode-switch button.on { background: var(--midnight); color: var(--off); }

/* ---------- 14. Badges & milestones ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.badge {
  text-align: center; padding: 14px 10px; border-radius: var(--r-md);
  background: #fbfbf7; border: 1px solid var(--line-soft);
}
.badge .bg-ic {
  width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 14px;
  display: grid; place-items: center; background: var(--lime); color: var(--lime-ink);
}
.badge .bg-ic svg { width: 20px; height: 20px; }
.badge.locked { opacity: 0.5; filter: grayscale(1); }
.badge.locked .bg-ic { background: rgba(25, 25, 35, 0.1); color: var(--grey); }
.badge-name { font-size: 0.76rem; font-weight: 600; line-height: 1.3; }
.badge.just { animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { 0% { transform: scale(0.82); } 55% { transform: scale(1.07); } 100% { transform: scale(1); } }

/* ---------- 15. Misc ---------- */
.progress-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.8rem; color: var(--grey); }
.progress-legend b { color: var(--midnight); }
.toast {
  position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 90;
  background: var(--midnight); color: var(--off);
  border-radius: var(--r-md); padding: 14px 18px;
  box-shadow: var(--sh-2); display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; max-width: 360px;
  animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast .t-ic { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); flex: none; }
.toast .t-ic svg { width: 15px; height: 15px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.empty {
  text-align: center; padding: 48px 24px; border-radius: var(--r-lg);
  background: var(--white); border: 1px dashed var(--line);
}
.empty .bicon { margin: 0 auto 14px; }

.delta-up { color: #0b6b4e; font-weight: 700; }
.delta-down { color: #b8431f; font-weight: 700; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

.flame { display: inline-flex; align-items: center; gap: 7px; }
.flame svg { width: 18px; height: 18px; color: var(--coral); }

/* decorative grid background */
.grid-bg {
  background-image:
    linear-gradient(rgba(25, 25, 35, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 25, 35, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* ---------- 16. Responsive ---------- */
@media (max-width: 1080px) {
  .subj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tutor-wrap, .q-wrap { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hide-sm { display: none !important; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .g-side, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .steps, .voices { grid-template-columns: minmax(0, 1fr); }
  .tutor-preview { grid-template-columns: minmax(0, 1fr); }
  .site-nav { display: none; }
  .burger { display: inline-flex; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 60;
    transform: translateX(-104%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--sh-2);
  }
  html[dir="rtl"] .sidebar { transform: translateX(104%); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(25, 25, 35, 0.45); z-index: 55; }
  .page { padding: 18px 16px 92px; }
  .topbar { padding: 10px 16px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 50;
    background: var(--midnight); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    border-start-start-radius: 18px; border-start-end-radius: 18px;
  }
  .tabbar a {
    display: grid; justify-items: center; gap: 3px;
    color: rgba(247, 247, 242, 0.62); font-size: 0.68rem; font-weight: 600; padding: 6px 2px;
  }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a.active { color: var(--lime); }
  .section { padding: 52px 0; }
  .cta-band { padding: 32px 20px; }
}

@media (max-width: 620px) {
  .hide-xs { display: none !important; }
  .langpick .lang-btn { padding: 8px 9px; }
  .subj-grid, .stats-band, .g-2, .g-4, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-tiles { grid-template-columns: minmax(0, 1fr); }
  .topic-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .step-side { margin-inline-start: 0; }
  .step-row { flex-wrap: wrap; }
  .card { padding: 18px; }
  .msg-body { max-width: 100%; }
  .toast { inset-inline: 14px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
