:root {
  --bg: #f7f6fb;
  --surface: #ffffff;
  --text: #17161f;
  --muted: #5b6070;
  --rule: #e4e2ec;
  --chip: #f0eef6;
  --header-bg: rgb(247 246 251 / 82%);
  --surjam: #d9480f;
  --surjam-2: #c2255c;
  --hokayantra: #1f3a8a;
  --hokayantra-2: #f2622e;
  --mathsurge: #0e7490;
  --mathsurge-2: #7c3aed;
  --scribevault: #4f46e5;
  --scribevault-2: #0891b2;
  --undercover: #6d28d9;
  --undercover-2: #b45309;
  --rasidly: #047857;
  --rasidly-2: #0f766e;
  --scanrow: #134e4a;
  --scanrow-2: #0d9488;
  --kodijunction: #9f1239;
  --kodijunction-2: #b45309;
  --blokonia: #0369a1;
  --blokonia-2: #7c3aed;
  --snakesladders: #1e40af;
  --snakesladders-2: #a16207;
  --mergequest: #6d28d9;
  --mergequest-2: #b45309;
  --brainboost: #4f46e5;
  --brainboost-2: #be123c;
  --shadow: 0 1px 2px rgb(20 18 40 / 6%), 0 8px 24px rgb(20 18 40 / 6%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e17;
    --surface: #1a1926;
    --text: #f4f3fa;
    --muted: #a3a8b8;
    --rule: #2d2b3d;
    --chip: #24223a;
    --header-bg: rgb(15 14 23 / 82%);
    --surjam: #ff8a3d;
    --surjam-2: #f0507f;
    --hokayantra: #8fa8ff;
    --hokayantra-2: #ff8a5c;
    --mathsurge: #22d3ee;
    --mathsurge-2: #a78bfa;
  --scribevault: #818cf8;
  --scribevault-2: #22d3ee;
  --undercover: #a78bfa;
  --undercover-2: #fbbf24;
  --rasidly: #34d399;
  --rasidly-2: #5eead4;
  --scanrow: #2dd4bf;
  --scanrow-2: #99f6e4;
  --kodijunction: #fb7185;
  --kodijunction-2: #fbbf24;
  --blokonia: #38bdf8;
  --blokonia-2: #c084fc;
  --snakesladders: #93c5fd;
  --snakesladders-2: #fcd34d;
  --mergequest: #c4b5fd;
  --mergequest-2: #fcd34d;
  --brainboost: #a5b4fc;
  --brainboost-2: #fda4af;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0e17;
  --surface: #1a1926;
  --text: #f4f3fa;
  --muted: #a3a8b8;
  --rule: #2d2b3d;
  --chip: #24223a;
  --header-bg: rgb(15 14 23 / 82%);
  --surjam: #ff8a3d;
  --surjam-2: #f0507f;
  --hokayantra: #8fa8ff;
  --hokayantra-2: #ff8a5c;
  --mathsurge: #22d3ee;
  --mathsurge-2: #a78bfa;
  --scribevault: #818cf8;
  --scribevault-2: #22d3ee;
  --undercover: #a78bfa;
  --undercover-2: #fbbf24;
  --rasidly: #34d399;
  --rasidly-2: #5eead4;
  --scanrow: #2dd4bf;
  --scanrow-2: #99f6e4;
  --kodijunction: #fb7185;
  --kodijunction-2: #fbbf24;
  --blokonia: #38bdf8;
  --blokonia-2: #c084fc;
  --snakesladders: #93c5fd;
  --snakesladders-2: #fcd34d;
  --mergequest: #c4b5fd;
  --mergequest-2: #fcd34d;
  --brainboost: #a5b4fc;
  --brainboost-2: #fda4af;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -999px; top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--text); color: var(--bg); z-index: 20; }
.skip-link:focus { left: 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: block; flex: none; }
.apps-menu { position: relative; flex: none; }
.apps-menu summary {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--text);
  font-size: 0.93rem; font-weight: 600; cursor: pointer; list-style: none; user-select: none;
}
.apps-menu summary::-webkit-details-marker { display: none; }
.apps-menu summary:hover, .apps-menu[open] summary { background: var(--chip); }
.apps-menu[open] .apps-chevron { transform: rotate(180deg); }
.apps-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 88px); overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; padding: 10px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 16px;
  box-shadow: 0 12px 32px rgb(20 18 40 / 18%);
}
.apps-panel a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 0.93rem; font-weight: 600;
}
.apps-panel a img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.apps-panel a:hover, .apps-panel a[aria-current="page"] { background: var(--chip); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); margin-top: 80px; padding: 40px 0 28px; color: var(--muted); font-size: 0.92rem; background: var(--surface); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.2fr 1.4fr 1.4fr; }
.footer-grid h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin: 0 0 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-about p { margin: 10px 0 0; max-width: 36ch; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; font-size: 0.82rem; }

/* Home hero */
.hero { padding: 56px 0 32px; display: grid; gap: 32px; grid-template-columns: 1.1fr 1fr; align-items: center; }
.eyebrow { margin: 0 0 10px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.7rem); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 16px; }
.hero-accent {
  background: linear-gradient(100deg, var(--surjam), var(--mathsurge-2) 60%, var(--mathsurge));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { color: var(--muted); font-size: 1.15rem; margin: 0; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-actions svg { width: 18px; height: 18px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.pills li { background: var(--chip); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; color: var(--muted); }
.hero-phones { position: relative; aspect-ratio: 5 / 4.4; max-width: 460px; width: 100%; justify-self: center; }
.hero-phones::before {
  content: ""; position: absolute; inset: 8% 4%; border-radius: 50%; filter: blur(48px); opacity: 0.28;
  background: linear-gradient(120deg, var(--surjam), var(--mathsurge-2), var(--mathsurge));
}
.phone {
  position: absolute; top: 8%; width: 40%; border-radius: 22px; overflow: hidden; display: block;
  border: 5px solid #17161f; background: #17161f; box-shadow: 0 16px 36px rgb(20 18 40 / 28%);
  transition: transform 0.25s ease;
}
.phone img { width: 100%; height: auto; aspect-ratio: 1 / 2; object-fit: cover; }
.phone-left { left: 2%; transform: rotate(-8deg); }
.phone-right { right: 2%; transform: rotate(8deg); }
.phone-center { left: 30%; top: 0; width: 40%; z-index: 1; }
.phone:hover, .phone:focus-visible { z-index: 2; }
.phone-left:hover, .phone-left:focus-visible { transform: rotate(-4deg) translateY(-8px); }
.phone-right:hover, .phone-right:focus-visible { transform: rotate(4deg) translateY(-8px); }
.phone-center:hover, .phone-center:focus-visible { transform: translateY(-8px); }

/* App list heading and category filters */
.apps-section { padding-top: 16px; }
.apps-heading { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.apps-heading h2, .why h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.02em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters[hidden] { display: none; }
.filters button {
  font: inherit; font-size: 0.9rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--muted);
}
.filters button:hover { background: var(--chip); color: var(--text); }
.filters button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filters button:focus-visible { outline: 3px solid var(--hokayantra); outline-offset: 2px; }

/* Why these apps */
.why { margin-top: 72px; }
.why-grid { display: grid; gap: 20px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.why-item { background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 24px; }
.why-item h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.why-item p { margin: 0; color: var(--muted); }
.why-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--surjam), var(--mathsurge-2)); }
.why-icon svg { width: 24px; height: 24px; }

/* Closing call to action */
.cta {
  margin-top: 40px; padding: 28px 32px; border-radius: 20px; background: var(--chip); border: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
}
.cta h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.01em; }
.cta p { margin: 4px 0 0; color: var(--muted); }

/* App cards on the home page */
.apps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); margin-top: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.5s ease;
}
.card[hidden] { display: none; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgb(20 18 40 / 14%); }
/* Added by site.js to cards below the fold, then removed as they scroll into view. */
.card.reveal { opacity: 0; transform: translateY(16px); }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.card-head { display: flex; gap: 16px; align-items: center; }
.card-head img { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.card h2 { font-size: 1.35rem; margin: 0; line-height: 1.2; }
.tagline { color: var(--muted); margin: 2px 0 0; font-size: 0.95rem; }
.card p { margin: 0; }
.features { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.95rem; }
.features li { padding-left: 22px; position: relative; }
.features li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.surjam { --accent: var(--surjam); --accent-2: var(--surjam-2); }
.hokayantra { --accent: var(--hokayantra); --accent-2: var(--hokayantra-2); }
.mathsurge { --accent: var(--mathsurge); --accent-2: var(--mathsurge-2); }
.scribevault { --accent: var(--scribevault); --accent-2: var(--scribevault-2); }
.undercover { --accent: var(--undercover); --accent-2: var(--undercover-2); }
.rasidly { --accent: var(--rasidly); --accent-2: var(--rasidly-2); }
.scanrow { --accent: var(--scanrow); --accent-2: var(--scanrow-2); }
.kodijunction { --accent: var(--kodijunction); --accent-2: var(--kodijunction-2); }
.blokonia { --accent: var(--blokonia); --accent-2: var(--blokonia-2); }
.snakesladders { --accent: var(--snakesladders); --accent-2: var(--snakesladders-2); }
.mergequest { --accent: var(--mergequest); --accent-2: var(--mergequest-2); }
.brainboost { --accent: var(--brainboost); --accent-2: var(--brainboost-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 1px solid transparent;
}
.btn-play { background: var(--text); color: var(--bg); }
.btn-play svg { width: 18px; height: 18px; }
.btn-ghost { border-color: var(--rule); color: var(--text); }
/* Not on Google Play yet: looks like the Play button but isn't a link. */
.btn-soon { border: 1px dashed var(--accent, var(--rule)); color: var(--muted); cursor: default; }
.btn-soon:hover { filter: none; }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent, var(--hokayantra)); outline-offset: 2px; }

/* "Scan to install" QR panel: on computer-sized screens only; on a phone the Play button is the shortcut. */
.qr {
  display: none;
  align-items: center; gap: 14px;
  padding: 12px; border-radius: 14px;
  background: var(--chip); border: 1px solid var(--rule);
}
.qr img { width: 96px; height: 96px; border-radius: 8px; flex: none; background: #fff; }
.qr strong { display: block; font-size: 0.95rem; }
.qr span { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
@media (min-width: 860px) {
  .qr { display: flex; }
  /* Keep the QR panel and the buttons lined up at the bottom of each card. */
  .card .qr { margin-top: auto; }
  .card .qr + .card-actions { margin-top: 0; }
}

/* Screenshot strip */
.shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.shots img {
  width: 150px; height: auto; aspect-ratio: 1 / 2; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--rule); scroll-snap-align: start; flex: none;
  background: var(--chip);
}

/* App detail pages */
.app-hero { padding: 40px 0 8px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.app-hero > img { width: 96px; height: 96px; border-radius: 24px; }
.app-hero-text { flex: 1 1 280px; }
.app-hero h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; }
.app-hero .tagline { font-size: 1.05rem; }
.app-hero .qr { flex: none; }
.accent-bar { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); margin: 24px 0; }
.section { margin-top: 40px; }
.section h2 { font-size: 1.25rem; margin: 0 0 14px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.box { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px; }
.box h3 { margin: 0 0 8px; font-size: 1.02rem; color: var(--accent); }
.box ul { margin: 0; padding-left: 18px; }
.box li { margin: 3px 0; }
.page-shots .shots img { width: 200px; }
.note { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .why { margin-top: 56px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .phone { transition: none; }
  .card:hover { transform: none; }
}
@media (max-width: 480px) {
  .card { padding: 18px; }
  .shots img { width: 128px; }
  .page-shots .shots img { width: 160px; }
}
