/* Prep · dark game theme · Plus Jakarta Sans · colours from the Prep logo: navy #0f3482, blue #2062e7, green #2cce78 */
:root {
  --navy: #3f74ff;
  --navy-800: #1d3fa8;
  --navy-900: #030817;
  --navy-600: #7aa0ff;
  --navy-50: rgba(63, 116, 255, .13);
  --navy-100: rgba(63, 116, 255, .24);
  --mint: #2cce78;
  --mint-600: #179a55;
  --mint-700: #5ff0a3;
  --mint-50: rgba(44, 206, 120, .13);
  --mint-100: rgba(44, 206, 120, .3);
  --gold: #ffc53d;
  --green: #22c55e;
  --green-700: #5ff0a3;
  --green-50: rgba(34, 197, 94, .15);
  --red: #f43f5e;
  --red-700: #ff8095;
  --red-50: rgba(244, 63, 94, .15);
  --ink: #f1f4ff;
  --ink-2: #c0cae8;
  --muted: #8a97bd;
  --line: rgba(150, 172, 255, .13);
  --line-2: rgba(150, 172, 255, .24);
  --bg: #050a1c;
  --bg-soft: #081029;
  --surface: #0c1534;
  --surface-2: #111d44;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75);
  --glow-mint: 0 0 0 1px rgba(44, 206, 120, .35), 0 10px 40px -8px rgba(44, 206, 120, .45);
  --glow-blue: 0 0 0 1px rgba(63, 116, 255, .35), 0 10px 40px -8px rgba(63, 116, 255, .45);
  --r-lg: 24px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tab-h: 64px;
  --side-w: 256px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: radial-gradient(1100px 600px at 85% -10%, rgba(32, 98, 231, .28), transparent 60%), radial-gradient(900px 600px at -10% 30%, rgba(44, 206, 120, .12), transparent 60%), var(--bg); background-attachment: fixed; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--navy-600); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: 19px; letter-spacing: -.01em; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mint-700); margin: 0 0 10px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); line-height: 1.65; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; font-size: 15px; line-height: 1; padding: 13px 22px; min-height: 50px; border-radius: 16px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.is-off { opacity: .45; filter: grayscale(1); cursor: default; transform: none; }
.btn-primary { background: linear-gradient(180deg, #3fe08b, var(--mint)); color: var(--navy-900); box-shadow: 0 4px 0 var(--mint-600), 0 12px 30px -8px rgba(44, 206, 120, .6); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--mint-600), 0 6px 18px -8px rgba(44, 206, 120, .6); }
.btn-navy { background: linear-gradient(180deg, #5585ff, #2f62ef); color: #fff; box-shadow: 0 4px 0 #1d3fa8; }
.btn-navy:hover { background: var(--navy-600); }
.btn-outline { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); box-shadow: 0 3px 0 var(--line-2); }
.btn-outline:hover { border-color: var(--navy-600); color: #fff; background: var(--navy-50); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); }
.btn-green { background: var(--green); color: #04220f; box-shadow: 0 4px 0 #15803d; }
.btn-green:hover { background: var(--green-700); }
.btn-link { background: none; color: var(--ink); padding-left: 12px; padding-right: 12px; }
.btn-link:hover { color: var(--navy-600); }
.btn-lg { min-height: 58px; padding: 16px 30px; font-size: 17px; border-radius: 18px; }
.btn-sm { min-height: 40px; padding: 9px 14px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; white-space: normal; line-height: 1.3; text-align: center; } /* long labels wrap instead of pushing the page wider */
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--navy-600); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* learning screens: chunky game buttons */
.game .btn { min-height: 52px; border-radius: 14px; }
.game .btn-primary { box-shadow: 0 4px 0 var(--mint-600); }
.game .btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--mint-600); }
.game .btn-green { box-shadow: 0 4px 0 var(--green-700); }
.game .btn-outline { box-shadow: 0 3px 0 var(--line-2); }

/* ---------- site header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(5, 10, 28, .72); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.site-header-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.logo img { height: 34px; width: auto; display: block; }
.app-top .logo img { height: 30px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--navy); background: var(--navy-50); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; place-items: center; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.mobile-menu { display: none; }
@media (max-width: 880px) {
  .site-nav, .site-actions { display: none; }
  .menu-btn { display: grid; }
  .mobile-menu { display: grid; gap: 4px; padding: 8px 16px 18px; border-top: 1px solid var(--line); background: var(--surface); }
  .mobile-menu a:not(.btn) { padding: 12px 8px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { margin-top: 8px; }
  .site-header-in { height: 64px; }
}
.site-footer { background: #030713; border-top: 1px solid var(--line); color: #b9c4dc; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid p { max-width: 34ch; margin-top: 14px; }
.footer-grid h4 { color: #fff; font-size: 15px; letter-spacing: 0; margin: 6px 0 14px; }
.footer-grid a:not(.logo) { display: block; color: #b9c4dc; text-decoration: none; padding: 4px 0; font-size: 15px; }
.footer-grid a:not(.logo):hover { color: #fff; }
.footer-grid p a:not(.logo) { display: inline; padding: 0; font-size: inherit; color: #fff; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding-top: 22px; padding-bottom: 22px; font-size: 14px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- landing sections ---------- */
.section { padding: 96px 0; }
.section-soft { background: rgba(8, 16, 41, .6); }
.section-navy { background: linear-gradient(180deg, rgba(63, 116, 255, .08), rgba(44, 206, 120, .05)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 18px; }
.section-navy .section-head p { color: #b9c4dc; }
@media (max-width: 640px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hl { position: relative; z-index: 0; white-space: nowrap; background: linear-gradient(90deg, var(--mint), #7aa0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl::after { display: none; content: ""; position: absolute; left: -2px; right: -2px; bottom: .08em; height: .3em; background: var(--mint); opacity: .5; border-radius: 6px; z-index: -1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 22px; }
.pill b { background: var(--navy); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 34px; }
.trust { display: flex; flex-wrap: wrap; gap: 32px; }
.trust b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.trust span { font-size: 14px; color: var(--muted); font-weight: 500; }
@media (max-width: 960px) { .hero { padding: 40px 0 64px; } .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* interactive demo card */
.demo-wrap { position: relative; padding: 22px 10px; }
.demo { position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 24px; max-width: 480px; margin: 0 auto; }
.demo-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.demo-top .bar { flex: 1; }
.demo-subject { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.demo-q { font-weight: 700; font-size: 18px; line-height: 1.45; margin-bottom: 4px; }
.demo-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.demo-explain { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; color: var(--ink-2); background: var(--navy-50); max-height: 120px; overflow: hidden; position: relative; }
.demo-explain::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(transparent, var(--navy-50)); }
.demo-done { text-align: center; padding: 14px 4px 4px; }
.demo .opt { padding: 11px 14px; font-size: 15px; }
.float { position: absolute; z-index: 3; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 14px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; animation: floaty 5s ease-in-out infinite; white-space: nowrap; }
.float.f1 { top: 0; left: -14px; }
.float.f2 { top: 44%; right: -22px; animation-delay: -2s; }
.float.f3 { bottom: 0; left: 6%; animation-delay: -3.5s; }
.blob { position: absolute; inset: 6% 2%; background: linear-gradient(135deg, var(--mint) 0%, #8fe8b8 100%); border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%; opacity: .2; z-index: 1; }
@media (max-width: 1100px) { .float.f2 { right: -6px; } .float.f1 { left: -4px; } }
@media (max-width: 520px) { .float { font-size: 12px; padding: 7px 10px; } .float.f2 { display: none; } .demo { padding: 18px; border-radius: 22px; } }

.exam-strip { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.exam-strip .container { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; }
.exam-strip p { margin: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.exam-strip a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 800; font-size: 18px; text-decoration: none; }
.exam-strip a:hover { color: var(--navy); }

.exam-tools { max-width: 620px; margin: 0 auto 36px; }
.exam-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .exam-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .exam-grid { grid-template-columns: 1fr; } }
.exam-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.exam-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.exam-card .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--accent) 22%, transparent); margin-bottom: 18px; }
.exam-card h3 { font-size: 24px; margin: 0 0 2px; }
.exam-card .full { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.exam-card p { color: var(--ink-2); font-size: 15px; margin-bottom: 18px; }
.exam-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag-green { background: var(--green-50); border-color: #c6ead3; color: var(--green-700); }
.exam-card .go { margin-top: auto; font-weight: 700; color: var(--navy); }
.exam-card.soon .go { color: var(--muted); }
.soon-badge { position: absolute; top: 22px; right: 22px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }

.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .steps3 { grid-template-columns: 1fr; } }
.step3 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.step3 .num { width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 18px; }
.step3 p { color: var(--ink-2); margin: 0; }
.mini { margin-top: 22px; background: var(--bg-soft); border-radius: 16px; padding: 14px; border: 1px solid var(--line); font-size: 14px; }
.mini-card { background: var(--surface); border-radius: 12px; padding: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.mini-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mini-opt { padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; margin-top: 6px; }
.mini-opt.ok { border-color: var(--green); background: var(--green-50); }
.mini-dots { display: flex; gap: 6px; }
.mini-dots i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; background: var(--mint); color: var(--navy-900); }
.mini-dots i.todo { background: var(--line); color: var(--muted); }
.mini-dots i.now { background: var(--navy); color: #fff; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.feature { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px; padding: 22px; }
.feature .em { font-size: 28px; margin-bottom: 10px; display: block; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; font-size: 15px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.board-card { background: var(--surface); color: var(--ink); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); }
.board-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.board-row:last-child { border-bottom: 0; }

.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats-band b { display: block; font-size: clamp(32px, 4vw, 46px); letter-spacing: -.03em; font-weight: 800; background: linear-gradient(90deg, var(--mint), #7aa0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-band span { color: var(--muted); font-weight: 600; }
@media (max-width: 700px) { .stats-band { grid-template-columns: repeat(2, 1fr); row-gap: 32px; } }

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--navy); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 20px; margin: 0; }

.cta-band { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-600) 100%); border-radius: 32px; padding: 56px; color: #c9d3ea; display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0; font-size: 18px; }
.cta-band .btn { position: relative; z-index: 1; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: var(--mint); opacity: .18; }
@media (max-width: 800px) { .cta-band { flex-direction: column; align-items: flex-start; padding: 36px 26px; } }

/* exam landing */
.ex-hero { padding: 36px 0 56px; background: radial-gradient(800px 400px at 75% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); border-bottom: 1px solid var(--line); }
/* under the breadcrumb: one level up */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; padding: 7px 14px 7px 10px; border-radius: 999px; border: 1.5px solid var(--line-2); color: var(--ink-2); font-size: 14px; font-weight: 700; text-decoration: none; }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back-link:hover { color: var(--ink); border-color: var(--navy); }
.ex-hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .ex-hero-grid { grid-template-columns: 1fr; gap: 28px; } }
.ex-badge { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-2); margin-bottom: 16px; }
.ex-badge .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 26px; }
.summary-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.summary-card li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.ck { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .subject-grid { grid-template-columns: 1fr; } }
.subject-card { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.subject-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.subject-card .head { display: flex; gap: 14px; align-items: center; }
.subject-card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--accent) 22%, transparent); flex: none; }
.subject-card h3 { margin: 0; font-size: 21px; }
.subject-card ol { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; }
.subject-card ol li { margin: 3px 0; }
.subject-card .go { font-weight: 700; color: var(--navy); margin-top: auto; }

/* ---------- forms / auth ---------- */
.auth { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: radial-gradient(600px 400px at 100% 0%, rgba(44, 206, 120, .18), transparent 60%), rgba(3, 8, 23, .7); border-right: 1px solid var(--line); color: #c9d3ea; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { color: #fff; font-size: clamp(28px, 3vw, 40px); }
.auth-side ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 18px; }
.auth-side li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; }
.auth-side li .em { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 20px; flex: none; }
.auth-side li b { color: #fff; display: block; font-size: 16px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: clamp(28px, 3vw, 34px); margin-bottom: 8px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-side { order: 2; padding: 40px 20px; }
  .auth-main { padding: 36px 16px 48px; }
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--ink); }
.input { width: 100%; font: inherit; font-size: 16px; padding: 13px 15px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--mint); box-shadow: 0 0 0 4px var(--mint-50); }
.input.bad { border-color: var(--red); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 70px; }
.toggle-pw { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--navy-600); cursor: pointer; padding: 6px 8px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.form-error { background: var(--red-50); color: var(--red-700); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.form-ok { background: var(--green-50); color: var(--green-700); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14px; margin-bottom: 16px; word-break: break-all; }
.exam-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.exam-pick label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; font-weight: 700; margin: 0; }
.exam-pick input { accent-color: var(--navy); }
.exam-pick label.on { border-color: var(--navy); background: var(--navy-50); }
.divider { text-align: center; color: var(--muted); font-size: 15px; margin: 22px 0 0; }

/* ---------- app shell ---------- */
.shell-app, .shell-focus { }
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--surface); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; z-index: 30; }
.sidebar .logo { padding: 0 8px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.side-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.side-nav a[aria-current] { background: var(--navy); color: #fff; }
.side-nav svg, .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-level { margin-top: auto; background: var(--mint-50); border: 1px solid var(--mint-100); border-radius: 16px; padding: 14px; font-size: 14px; }
.side-level .bar { margin: 8px 0 6px; }
.side-level p { margin: 0; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.side-user b { display: block; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-main { min-width: 0; }
.shell-app .app-main { margin-left: var(--side-w); }
.app-top { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; height: 68px; padding: 0 28px; background: rgba(5, 10, 28, .75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.app-title { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-app .app-top-logo { display: none; }
.app-content { padding: 32px 28px 56px; max-width: 1180px; margin: 0 auto; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none; flex: none; }
.icon-btn:hover { background: var(--navy-50); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; flex: none; }
.chip-streak b { color: #ea580c; }
.chip-streak.off { filter: grayscale(1); opacity: .7; }
.chip-xp b { color: var(--gold); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--mint), #8fe8b8); color: var(--navy-900); display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; text-decoration: none; }
.avatar.sm { width: 38px; height: 38px; font-size: 15px; }
.top-avatar { display: none; }
.tabbar { display: none; }
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .shell-app .app-main { margin-left: 0; }
  .shell-app .app-top-logo { display: inline-flex; }
  .top-avatar { display: grid; }
  .app-top { padding: 0 20px; }
  .app-content { padding: 24px 20px 48px; }
}
@media (max-width: 720px) {
  .shell-app { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--tab-h); color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
  .tabbar a[aria-current] { color: var(--navy); }
  .top-avatar { display: none; }
  /* a blurred translucent header can glitch during fast scroll on phones, letting the page show through; solid instead */
  .app-top { height: 60px; padding: 0 12px; gap: 8px; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .app-content { padding: 18px 16px 40px; }
  .chip { padding: 6px 10px; }
  .app-top-logo span { display: none; }
}

/* ---------- app components ---------- */
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)), var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 19px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-h h1 { font-size: clamp(26px, 3vw, 34px); margin: 0; }
.page-h p { margin: 6px 0 0; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; }
@media (max-width: 1180px) { .dash { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-4 { gap: 10px; } }
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-card .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none; }
.stat-card b { display: block; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; }
.stat-card span { font-size: 13px; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .stat-card { padding: 14px; gap: 10px; } .stat-card .ic { width: 40px; height: 40px; font-size: 20px; } .stat-card b { font-size: 20px; } }
.bg-orange { background: var(--mint-50); } .bg-navy { background: var(--navy-50); } .bg-green { background: var(--green-50); } .bg-red { background: var(--red-50); }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), #7be3ab); border-radius: inherit; transition: width .5s; }
.bar.green > i { background: linear-gradient(90deg, var(--green), #4ade80); }
.ring { --p: 0; --c: var(--green); width: 56px; height: 56px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; flex: none; }
.ring::before { content: attr(data-label); width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ring.lg { width: 120px; height: 120px; }
.ring.lg::before { width: 96px; height: 96px; font-size: 22px; }
.continue-card { display: flex; align-items: center; gap: 18px; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-600) 100%); color: #c9d3ea; border: 0; text-decoration: none; }
.continue-card h3 { color: #fff; margin: 2px 0; }
.continue-card .play { width: 54px; height: 54px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; flex: none; }
.continue-card .play svg { width: 22px; height: 22px; fill: var(--navy-900); margin-left: 3px; }
.subj { display: flex; flex-direction: column; gap: 14px; }
.subj .head { display: flex; align-items: center; gap: 14px; }
.subj .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--accent) 22%, transparent); flex: none; }
.subj h3 { margin: 0; }
.subj .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.rank { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--bg-soft); border: 1px solid var(--line); flex: none; }
.rank.r1 { background: #ffd43b; border-color: #f2b705; color: #2b1d00; }
.rank.r2 { background: #e5e7eb; border-color: #c4c9d2; color: #111; }
.rank.r3 { background: #f6c09a; border-color: #dd9360; color: #2a1200; }
.me-row { background: var(--mint-50); border-radius: 12px; padding-left: 10px !important; padding-right: 10px !important; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.badge { text-align: center; padding: 16px 8px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); }
.badge .i { font-size: 32px; line-height: 1.2; }
.badge b { display: block; font-size: 13px; margin-top: 6px; line-height: 1.3; }
.badge.locked .i { filter: grayscale(1); opacity: .3; }
.badge.locked b { color: var(--muted); }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.big-emoji { font-size: 52px; line-height: 1; margin-bottom: 10px; }
.notice { background: var(--mint-50); border: 1px solid var(--mint-100); border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button, .seg a { font: inherit; font-weight: 700; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 8px 14px; border-radius: 9px; cursor: pointer; text-decoration: none; }
.seg .on { background: var(--navy); color: #fff; }

/* subject outline */
.outline-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 36px 0; }
.outline-hero .row-between { align-items: flex-end; flex-wrap: wrap; }
.outline-hero h1 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 6px; }
.outline-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
.outline-tools .input { flex: 1 1 260px; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 900px) { .topics { grid-template-columns: 1fr; } }
.topic-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); height: 100%; transition: border-color .15s, box-shadow .15s; }
.topic-row:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.topic-row .num { width: 40px; height: 40px; border-radius: 12px; background: var(--navy-50); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.topic-row.mastered .num { background: var(--mint-50); color: var(--mint-700); }
.topic-row .t { font-weight: 700; line-height: 1.35; display: block; }
.topic-row small { color: var(--muted); font-size: 13px; }
.stars { display: inline-flex; gap: 1px; font-size: 15px; flex: none; }
.stars i { font-style: normal; filter: grayscale(1); opacity: .25; }
.stars i.on { filter: none; opacity: 1; }

/* topic page */
.sticky { position: sticky; top: 92px; }
.big-stars { font-size: 28px; display: flex; gap: 6px; }
.big-stars i { font-style: normal; filter: grayscale(1); opacity: .22; }
.big-stars i.on { filter: none; opacity: 1; animation: pop .5s; }
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .modules { grid-template-columns: 1fr; } }
.module { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; padding: 20px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.module:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.module .m-ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 25px; background: color-mix(in srgb, var(--accent) 22%, transparent); margin-bottom: 6px; }
.module h3 { margin: 0; }
.module p { margin: 0; color: var(--muted); font-size: 14px; }
.module .bar { margin-top: 10px; }
.module .done-tag { position: absolute; top: 16px; right: 16px; }
@media (max-width: 800px) {
  .module { display: grid; grid-template-columns: 50px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px; }
  .module .m-ic { grid-row: span 3; margin: 0; }
  .module .bar, .module p { grid-column: 2; }
}

/* prose (lesson text) */
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose p { margin: 0 0 .9em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 1em; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin: .4em 0; }
.prose li::before { content: ""; position: absolute; left: 6px; top: .68em; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.prose h3 { margin: 1.2em 0 .5em; font-size: 18px; color: var(--navy); }
.prose h3.tip-h { background: var(--mint-50); color: var(--mint-700); padding: 9px 13px; border-radius: 12px; font-size: 15px; }
.prose h3.tip-h::before { content: "💡 "; }
.prose .eq { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; color: var(--ink); background: var(--navy-50); border-left: 4px solid var(--navy); padding: 10px 14px; border-radius: 10px; margin: .5em 0 .9em; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.prose .eq + .eq { margin-top: -.5em; border-top-left-radius: 0; border-top-right-radius: 0; }
.prose strong { color: var(--ink); font-weight: 700; }


/* focus screens: tutorial, examples, quiz */
.focus-main { max-width: 780px; width: 100%; margin: 0 auto; }
@media (max-width: 640px) { .prose { font-size: 16px; } }
.reward { text-align: center; padding: 36px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); animation: pop .45s; }
.reward .big-emoji { font-size: 64px; }
.xp-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 197, 61, .14); color: var(--gold); font-weight: 800; font-size: 22px; padding: 8px 20px; border-radius: 999px; margin: 6px 0 14px; }
.reward .actions { display: grid; gap: 10px; margin: 20px auto 0; max-width: 420px; }

.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); animation: slidein .25s ease; }
.q-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.q-stem { font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.q-stem.prose { color: var(--ink); }
.opts { display: grid; gap: 10px; margin-top: 18px; }
.opt { display: flex; align-items: flex-start; gap: 14px; text-align: left; width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface-2); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform .08s, border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.opt:hover { border-color: var(--navy-600); }
.opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.opt .l { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--bg-soft); border: 1.5px solid var(--line-2); flex: none; }
.opt .o { padding-top: 4px; font-weight: 600; }
.opt.chosen { border-color: var(--navy); background: var(--navy-50); box-shadow: 0 3px 0 var(--navy); }
.opt.chosen .l { background: var(--navy); color: #fff; border-color: var(--navy); }
.opt.right { border-color: var(--green); background: var(--green-50); box-shadow: 0 3px 0 var(--green-700); animation: pop .35s; }
.opt.right .l { background: var(--green); color: #fff; border-color: var(--green); }
.opt.wrong { border-color: var(--red); background: var(--red-50); box-shadow: 0 3px 0 var(--red-700); animation: shake .35s; }
.opt.wrong .l { background: var(--red); color: #fff; border-color: var(--red); }
.opt.dim { opacity: .5; }
.opt:disabled { cursor: default; }
.explain { margin-top: 18px; border-radius: 18px; padding: 18px; background: var(--navy-50); animation: slidein .25s ease; }
.explain.good { background: var(--green-50); }
.explain.bad { background: var(--red-50); }
.explain .verdict { font-weight: 800; font-size: 18px; margin-bottom: 8px; color: var(--ink); }
.explain.good .verdict { color: var(--green-700); }
.explain.bad .verdict { color: var(--red-700); }
.explain .prose { font-size: 16px; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dots button { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; padding: 0; }
.dots button.cur { border-color: var(--navy); color: var(--navy); box-shadow: 0 0 0 3px var(--navy-50); }
.dots button.ok { background: var(--green-50); border-color: var(--green); color: var(--green-700); }
.dots button.no { background: var(--red-50); border-color: var(--red); color: var(--red-700); }
.dots button.ans { background: var(--navy-50); border-color: var(--navy); color: var(--navy); }
.quiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.quiz-top .bar { flex: 1; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; padding: 7px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 70px; text-align: center; }
.timer.low { background: var(--red-50); color: var(--red-700); border-color: var(--red); animation: pulse 1s infinite; }
.combo { font-weight: 800; color: #ea580c; animation: pop .3s; white-space: nowrap; }
.setup-card { max-width: 640px; margin: 0 auto; }
.setup-opt { display: grid; gap: 10px; margin: 20px 0; }
.setup-opt > label { font-weight: 700; }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice { font: inherit; font-weight: 800; font-size: 20px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--ink); padding: 14px 8px; cursor: pointer; line-height: 1.2; }
.choice small { display: block; font-weight: 600; color: var(--muted); font-size: 13px; margin-top: 3px; }
.choice.on { border-color: var(--mint); background: var(--mint-50); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.toggle small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--mint); outline-offset: 2px; }
.score-ring { --p: 0; width: 160px; height: 160px; margin: 4px auto 12px; border-radius: 50%; background: conic-gradient(var(--c, var(--green)) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; animation: pop .5s; }
.score-ring div { width: 128px; height: 128px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; }
.score-ring b { font-size: 38px; line-height: 1; }
.score-ring span { font-size: 13px; color: var(--muted); font-weight: 700; }
.xp-lines { list-style: none; padding: 0; margin: 12px auto; text-align: left; max-width: 420px; }
.xp-lines li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.xp-lines li b { color: var(--gold); }
.xp-lines li.xp-again { color: var(--muted); font-weight: 500; }
.xp-lines li.xp-again b { color: var(--muted); }

/* toasts, modals, confetti */
.toasts { position: fixed; z-index: 60; left: 50%; top: calc(80px + env(safe-area-inset-top)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--navy); color: #fff; font-weight: 700; padding: 11px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: drop .3s ease; }
.toast.xp { background: var(--gold); color: #2b1d00; font-size: 18px; font-weight: 800; }
.toast.streak { background: #ea580c; }
.modal-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(2, 5, 15, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 26px; padding: 30px 24px 24px; width: min(400px, 100%); text-align: center; box-shadow: var(--shadow-lg); }
.modal .big-emoji { font-size: 64px; }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; }

/* search box with suggestions */
.searchbox { position: relative; width: 100%; }
.searchbox .input { padding-left: 46px; height: 54px; }
.searchbox .s-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 20; text-align: left; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.suggest a:first-child { border-top: 0; }
.suggest a.on, .suggest a:hover { background: var(--navy-50); }
.suggest .ic { font-size: 22px; width: 30px; text-align: center; }
.suggest small { display: block; color: var(--muted); font-size: 13px; }
.suggest .type { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.suggest .none { padding: 14px 16px; color: var(--muted); }

@keyframes pop { 0% { transform: scale(.9); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes pulse { 50% { opacity: .65; } }
@keyframes floaty { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* simple pages that work in both the public site and the app */
.shell-site .page-wrap { max-width: 980px; margin: 0 auto; padding: 48px 24px 88px; }
@media (max-width: 640px) { .shell-site .page-wrap { padding: 28px 16px 64px; } }

/* ================= game layer ================= */
.stars-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background-image: linear-gradient(rgba(150, 172, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 172, 255, .045) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); }
.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hud { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 800; font-size: 14px; }
.hud b { font-size: 18px; }
.hud-row { display: flex; flex-wrap: wrap; gap: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(44, 206, 120, .7); animation: ping 1.8s infinite; display: inline-block; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(44, 206, 120, .6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(44, 206, 120, 0); } }
.btn-play { position: relative; text-transform: uppercase; letter-spacing: .08em; }
.btn-play::after { content: ""; position: absolute; inset: -4px; border-radius: 22px; border: 2px solid rgba(44, 206, 120, .5); animation: ring 2.2s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { opacity: .9; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.08); } }

/* exam "game mode" cards */
.mode-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 24px; border-radius: 24px; text-decoration: none; color: var(--ink); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, transparent) 0%, rgba(255, 255, 255, .02) 55%), var(--surface); border: 1px solid var(--line-2); box-shadow: 0 6px 0 rgba(0, 0, 0, .35); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; min-height: 230px; }
.mode-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 70%, #fff); box-shadow: 0 11px 0 rgba(0, 0, 0, .35), 0 0 50px -10px var(--accent); }
.mode-card::after { content: ""; position: absolute; right: -50px; bottom: -50px; width: 170px; height: 170px; border-radius: 50%; background: var(--accent); opacity: .16; filter: blur(4px); }
.mode-card .emblem { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 32px; background: color-mix(in srgb, var(--accent) 35%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 30px -6px var(--accent); margin-bottom: 14px; }
.mode-card h3 { font-size: 26px; margin: 0; }
.mode-card .full { color: var(--muted); font-size: 14px; font-weight: 600; }
.mode-card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; position: relative; z-index: 1; }
.mode-card .status { position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; background: var(--mint-50); color: var(--mint-700); border: 1px solid var(--mint-100); }
.mode-card.locked { filter: saturate(.55); }
.mode-card.locked .status { background: rgba(255, 255, 255, .05); color: var(--muted); border-color: var(--line-2); }
.mode-card.locked:hover { filter: none; }

/* worlds (subjects) */
.worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.world { position: relative; display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: 24px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--surface); border: 2px solid var(--line-2); box-shadow: 0 5px 0 rgba(0, 0, 0, .35); transition: transform .15s, border-color .15s, box-shadow .15s; text-decoration: none; }
.world:hover { transform: translateY(-3px); }
.world.on { border-color: var(--accent); box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 40px -10px var(--accent); }
.world .orb { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; flex: none; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent) 45%, color-mix(in srgb, var(--accent) 50%, #000)); box-shadow: 0 0 40px -6px var(--accent), inset -8px -10px 20px rgba(0, 0, 0, .35); }
.world h3 { font-size: 22px; margin: 0 0 2px; }
.world small { color: var(--muted); font-weight: 600; font-size: 14px; }
.world .bar { margin-top: 10px; height: 8px; }

/* level map */
.stage { margin-bottom: 16px; }
.stage-h { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.stage-h .badge-n { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(180deg, #5585ff, #2f62ef); box-shadow: 0 3px 0 #1d3fa8; flex: none; }
.stage-h b { display: block; font-size: 17px; }
.stage-h small { color: var(--muted); font-weight: 600; }
.stage-h .chev { margin-left: auto; transition: transform .2s; font-size: 18px; color: var(--muted); }
.stage.open .stage-h .chev { transform: rotate(90deg); }
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; padding: 14px 4px 6px; }
.level { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; text-decoration: none; color: var(--ink); background: var(--surface-2); border: 2px solid var(--line); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); transition: transform .12s, border-color .15s; min-height: 84px; }
.level:hover { transform: translateY(-3px); border-color: var(--navy-600); }
.level .lv { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 16px; flex: none; background: var(--surface); border: 3px solid var(--line-2); color: var(--ink-2); }
.level .t { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.level .stars { font-size: 12px; margin-top: 3px; }
.level.started .lv { border-color: var(--navy); color: #fff; background: var(--navy-100); }
.level.mastered { border-color: var(--mint-100); }
.level.mastered .lv { background: var(--mint); border-color: #7be3ab; color: var(--navy-900); box-shadow: 0 0 20px -4px var(--mint); }

/* level briefing (topic for visitors) */
.briefing { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .briefing { grid-template-columns: 1fr; } .briefing .sticky { position: static; } }
.level-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 900; letter-spacing: .06em; font-size: 14px; margin-bottom: 18px; }
.level-badge .lv { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #5585ff, #2f62ef); box-shadow: 0 0 20px -2px rgba(63, 116, 255, .8); }
.rewards { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.checkpoints { list-style: none; margin: 0; padding: 0; position: relative; }
.checkpoints::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 3px; background: var(--line-2); border-radius: 3px; }
.checkpoints li { position: relative; display: flex; gap: 14px; align-items: center; padding: 9px 0; }
.checkpoints .cp { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px; background: var(--surface-2); border: 3px solid var(--line-2); flex: none; position: relative; z-index: 1; color: var(--ink-2); }
.checkpoints li:first-child .cp { border-color: var(--mint); color: var(--mint-700); box-shadow: 0 0 18px -2px rgba(44, 206, 120, .7); }
.checkpoints .t { font-weight: 700; }
.checkpoints small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; }
.checkpoints .lock { margin-left: auto; opacity: .55; font-size: 14px; }
.start-card { text-align: center; padding: 26px; }
.start-card .big-emoji { font-size: 56px; filter: drop-shadow(0 0 20px rgba(44, 206, 120, .5)); }

/* join (sign-up) pop-up */
.join { width: min(460px, 100%); text-align: left; padding: 28px; max-height: calc(100vh - 32px); overflow: auto; }
.join .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin: 16px 0 20px; }
.join .tabs button { font: inherit; font-weight: 800; border: 0; border-radius: 10px; padding: 10px; background: none; color: var(--muted); cursor: pointer; }
.join .tabs button.on { background: var(--navy); color: #fff; }
.modal-top { display: flex; justify-content: flex-end; margin: -14px -10px 4px 0; } /* the close button on its own line */

/* home lobby */
.lobby { position: relative; padding: 56px 0 40px; }
.lobby-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 980px) { .lobby-grid { grid-template-columns: 1fr; gap: 36px; } .lobby { padding-top: 32px; } }
.lobby h1 { font-size: clamp(38px, 5.6vw, 66px); line-height: 1.04; letter-spacing: -.035em; }
.lobby .lead { max-width: 52ch; }
.badge-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.badge-wall .badge { background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.badge-wall .badge .i { filter: drop-shadow(0 0 14px rgba(255, 197, 61, .35)); }

/* home: one full screen, copy on the left, exam picker on the right */
.site-header.bare { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; position: absolute; left: 0; right: 0; }
.site-header.bare .site-actions { display: flex !important; }
.site-header.bare .menu-btn, .site-header.bare .mobile-menu { display: none !important; }
.home { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding: 92px 0 32px; }
.home-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.home h1 { font-size: clamp(36px, 4.6vw, 62px); line-height: 1.05; letter-spacing: -.035em; margin-bottom: 18px; }
.home .lead { max-width: 50ch; }
.home-ctas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 26px 0 30px; }
.exam-panel { padding: 22px; box-shadow: var(--shadow-lg); }
.exam-panel-h h2 { font-size: 22px; margin: 6px 0 14px; }
.exam-panel .searchbox { margin-bottom: 12px; }
.exam-list { display: grid; gap: 8px; max-height: min(430px, calc(100vh - 330px)); overflow-y: auto; padding: 2px; }
.exam-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--surface-2); border: 1.5px solid var(--line); transition: border-color .15s, transform .12s, box-shadow .15s; }
.exam-row:hover { border-color: var(--accent); transform: translateX(3px); box-shadow: 0 0 30px -12px var(--accent); }
.exam-row .emblem { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none; background: color-mix(in srgb, var(--accent) 30%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.exam-row b { display: block; font-size: 17px; }
.exam-row small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-row .state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--mint-700); white-space: nowrap; }
.exam-row.locked { opacity: .7; }
.exam-row.locked .state { color: var(--muted); }
.exam-row .go { font-size: 22px; color: var(--muted); }
.how { width: min(520px, 100%); text-align: left; padding: 30px; max-height: calc(100vh - 32px); overflow: auto; }
.how .close { position: absolute; top: 14px; right: 14px; }
.how-steps { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 14px; }
.how-steps li { display: flex; gap: 14px; }
.how-steps .n { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; flex: none; background: linear-gradient(180deg, #5585ff, #2f62ef); box-shadow: 0 3px 0 #1d3fa8; }
.how-steps p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
button.chip { color: inherit; font-family: inherit; cursor: pointer; }
.how-app { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; text-align: left; }
.how-app .eyebrow, .how-app h2 { text-align: center; }
.how-app .how-steps .n { font-size: 18px; }
.how-me { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.how-me > span { padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.how-xp { list-style: none; padding: 0; margin: 10px 0 8px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.how-xp li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 14px; color: var(--ink-2); }
.how-xp li + li { border-top: 1px solid var(--line); }
.how-xp b { color: var(--gold); white-space: nowrap; }
@media (max-width: 480px) {
  .how-app { padding: 26px 18px 18px; }
  .how-app .how-steps > li { display: block; }
  .how-app .how-steps .n { float: left; width: 32px; height: 32px; border-radius: 10px; font-size: 16px; margin: -4px 10px 6px 0; }
  .how-app .how-steps > li > div > b { display: block; padding-top: 2px; }
  .how-app .how-steps > li > div > p:first-of-type { clear: both; }
}
@media (max-width: 980px) {
  .home { align-items: flex-start; padding-top: 84px; }
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .exam-list { max-height: none; }
  .home-ctas { margin: 20px 0 22px; }
}
@media (max-width: 640px) {
  .mode-card { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; padding: 18px; min-height: 0; }
  .mode-card .emblem { width: 56px; height: 56px; font-size: 28px; margin: 0; grid-row: span 2; }
  .mode-card h3 { font-size: 22px; align-self: end; }
  .mode-card .full { grid-column: 2; }
  .mode-card .meta { grid-column: 1 / -1; padding-top: 12px; }
  .mode-card .status { top: 16px; right: 16px; }
}
@media (max-width: 640px) {
  .site-header.bare .site-actions button.btn-link { display: none; }
  .site-header.bare .site-actions .btn-link { padding-left: 8px; padding-right: 8px; }
}
.home-grid > * { min-width: 0; }
@media (max-width: 640px) {
  .home .hl { white-space: normal; }
  .home h1 { font-size: 38px; margin-bottom: 10px; }
  .home .lead, .home .trust, .home .pill { display: none; }
  .home-ctas { margin: 14px 0 0; }
  .home-ctas .btn-lg { min-height: 46px; padding: 10px 18px; font-size: 15px; }
  .exam-panel { padding: 16px; }
  .exam-row small { white-space: normal; }
}

/* exam logos: plain white tile, no glow */
.xlogo { width: 56px; height: 56px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; font-size: 28px; padding: 6px; }
.xlogo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.xlogo-lg { width: 88px; height: 88px; border-radius: 20px; font-size: 42px; padding: 8px; }

/* home exam list */
.exam-card-list { padding: 8px; }
.exam-line { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); transition: background .15s; }
.exam-line:last-of-type { border-bottom: 0; }
.exam-line:hover { background: rgba(255, 255, 255, .04); }
.exam-line b { display: block; font-size: 18px; }
.exam-line small { display: block; color: var(--muted); font-size: 14px; font-weight: 600; }
.exam-line .sub { display: block; color: var(--ink-2); font-size: 13px; font-weight: 600; margin-top: 2px; }
.exam-line.locked { opacity: .65; }
.exam-line .go { font-size: 24px; color: var(--muted); }
@media (max-width: 560px) { .exam-line .tag { display: none; } }

/* exam page + course outline */
.exam-head { display: flex; gap: 20px; align-items: center; margin-bottom: 8px; }
.exam-head h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); }
.exam-head p { margin: 2px 0 0; font-weight: 600; }
.list-h { font-size: 22px; margin: 32px 0 14px; }
.course-list { display: grid; gap: 12px; }
.course { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .12s; }
.course:hover { border-color: var(--accent); transform: translateY(-2px); }
.course b { display: block; font-size: 20px; }
.course small { color: var(--muted); font-weight: 600; }
.course-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; flex: none; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.outline { list-style: none; margin: 0; padding: 6px; }
.outline li + li { border-top: 1px solid var(--line); }
.outline-row { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); transition: background .15s; }
.outline-row:hover { background: rgba(255, 255, 255, .04); }
.outline-row .num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--navy-50); color: var(--navy-600); flex: none; }
.outline-row.started .num { background: var(--navy); color: #fff; }
.outline-row.done .num { background: var(--mint); color: var(--navy-900); }
.outline-row .t { display: block; font-weight: 700; line-height: 1.35; }
.outline-row small { color: var(--muted); font-size: 13px; font-weight: 600; }
.outline-row .go { font-size: 22px; color: var(--muted); }
@media (max-width: 560px) { .exam-head { align-items: flex-start; gap: 14px; } .exam-head > div { min-width: 0; } .exam-head .xlogo-lg { width: 64px; height: 64px; flex: none; } .course .btn { display: none; } }

/* home: one screen, exams in a horizontal row */
.home-hero { min-height: calc(100vh - 72px); min-height: calc(100dvh - 72px); display: flex; align-items: center; padding: 40px 0; }
.home-hero h1 { font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.03em; margin-bottom: 10px; }
.home-hero .lead { max-width: 60ch; margin-bottom: 26px; }
.home-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.home-tools .searchbox { max-width: 520px; }
.row-arrows { display: flex; gap: 6px; margin-left: auto; }
.row-arrows .icon-btn { background: var(--surface-2); border: 1px solid var(--line-2); }
.exam-row-scroll { display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; padding: 4px 2px 14px; scroll-padding-left: 2px; }
.exam-tile { flex: 0 0 240px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 22px; text-decoration: none; color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)), var(--surface); border: 1px solid var(--line-2); transition: transform .15s, border-color .15s; }
.exam-tile:hover { transform: translateY(-4px); border-color: var(--navy-600); }
.exam-tile .xlogo { margin-bottom: 12px; }
.exam-tile b { font-size: 20px; }
.exam-tile small { color: var(--muted); font-weight: 600; font-size: 13px; line-height: 1.4; min-height: 36px; }
.exam-tile .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; }
.exam-tile .go { font-size: 22px; color: var(--muted); }
.exam-tile.locked { opacity: .7; }
.home-stats { margin-top: 22px; }
@media (max-width: 640px) { .row-arrows { display: none; } .exam-tile { flex-basis: 78%; } .home-hero { align-items: flex-start; padding-top: 28px; } }

/* thin scrollbars that only show while in use */
.thin-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.thin-scroll:hover, .thin-scroll:focus-within, .thin-scroll.scrolling { scrollbar-color: rgba(150, 172, 255, .35) transparent; }
.thin-scroll::-webkit-scrollbar { height: 6px; width: 6px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
.thin-scroll:hover::-webkit-scrollbar-thumb, .thin-scroll.scrolling::-webkit-scrollbar-thumb { background: rgba(150, 172, 255, .35); }
html { scrollbar-width: thin; scrollbar-color: rgba(150, 172, 255, .25) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(150, 172, 255, .22); border-radius: 99px; }

/* topic: what to do */
@media (max-height: 780px) and (min-width: 641px) {
  .home-hero { padding: 20px 0; }
  .home-hero h1 { font-size: clamp(30px, 3.6vw, 44px); }
  .home-hero .lead { margin-bottom: 16px; }
  .exam-tile { padding: 16px; }
  .exam-tile .xlogo-lg { width: 64px; height: 64px; }
  .home-stats { margin-top: 12px; }
}

/* formulas and highlights in lesson text */
.prose .eq.eq-k { font-family: inherit; font-size: 17px; overflow-x: auto; overflow-y: hidden; padding: 12px 16px; }
.prose .eq .katex { color: var(--ink); font-size: 1.12em; }
.prose .eq .katex .mord.text { font-family: var(--font); }
.prose mark { background: linear-gradient(transparent 55%, rgba(63, 116, 255, .38) 55%); color: #fff; font-weight: 700; padding: 0 2px; border-radius: 2px; }
.prose strong { color: #fff; background: linear-gradient(transparent 60%, rgba(44, 206, 120, .3) 60%); padding: 0 2px; border-radius: 2px; }
.prose p.key { background: var(--mint-50); border-left: 4px solid var(--mint); padding: 12px 14px; border-radius: 0 12px 12px 0; color: var(--ink); font-weight: 600; }
.explain .prose p.key { background: rgba(255, 255, 255, .06); }

/* ---------- moving between pages in place (app.js Prep.go) ---------- */
.nav-progress { position: fixed; z-index: 90; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--mint), var(--navy-600)); box-shadow: 0 0 10px var(--mint); opacity: 0; transition: width .2s, opacity .3s; pointer-events: none; }
.nav-loading .nav-progress { opacity: 1; width: 75%; transition: width 6s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
#page:focus { outline: none; }

/* grouped side menu, help button */
.side-nav { overflow-y: auto; min-height: 0; }
.side-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 4px; }
.side-group:first-child { padding-top: 0; }
.side-nav a .nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--mint); color: var(--navy-900); font-size: 12px; display: grid; place-items: center; }
.help-btn { position: relative; }
.help-btn .dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--bg); }
.help-btn svg { stroke-width: 1.9; }
@media (max-width: 420px) { .chip-xp { display: none; } }

/* ---------- reading aloud ---------- */
.listen-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 800; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); padding: 6px 12px; border-radius: 999px; cursor: pointer; flex: none; }
.listen-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.listen-btn:hover { border-color: var(--mint); color: var(--ink); }
.listen-btn.on { background: var(--mint); color: var(--navy-900); border-color: var(--mint); }
.speaking { background: rgba(44, 206, 120, .12); border-radius: 8px; box-shadow: 0 0 0 4px rgba(44, 206, 120, .12); transition: background .2s; }
.voice-bar { position: fixed; z-index: 55; left: 50%; transform: translateX(-50%); bottom: 20px; display: flex; align-items: center; gap: 10px; width: min(420px, calc(100vw - 32px)); padding: 8px 8px 8px 16px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lg); }
.voice-bar b { display: block; font-size: 14px; line-height: 1.2; }
.voice-bar small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-wave { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.voice-wave i { width: 3px; height: 100%; background: var(--mint); border-radius: 2px; animation: wave 1s ease-in-out infinite; }
.voice-wave i:nth-child(2) { animation-delay: -.25s; } .voice-wave i:nth-child(3) { animation-delay: -.5s; } .voice-wave i:nth-child(4) { animation-delay: -.75s; }
.voice-wave.paused i { animation-play-state: paused; opacity: .5; }
@keyframes wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@media (max-width: 720px) { .shell-app .voice-bar { bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); } }
.tut-float { position: fixed; z-index: 40; right: 16px; bottom: 20px; display: flex; gap: 8px; transition: bottom .2s; }
.tut-float.up { bottom: 84px; }
.tut-float-btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-lg); cursor: pointer; -webkit-user-select: none; user-select: none; }
.tut-float-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tut-float-btn:hover { border-color: var(--navy); }
.tut-float-btn:active { opacity: .7; }
@media (max-width: 720px) {
  .shell-app .tut-float { bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); }
  .shell-app .tut-float.up { bottom: calc(var(--tab-h) + 76px + env(safe-area-inset-bottom)); }
}
.voice-set { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.voice-set input[type=range] { width: 100%; accent-color: var(--mint); }
.voice-set .btn { justify-self: start; }

/* ---------- tags and prices ---------- */
.tag-gold { background: rgba(255, 197, 61, .14); border-color: rgba(255, 197, 61, .35); color: var(--gold); }
.tag-lock { background: var(--navy-50); border-color: var(--navy-100); color: var(--navy-600); text-decoration: none; }
.tag-lock:hover { border-color: var(--navy-600); }
.price-line { color: var(--gold); }

/* ---------- dashboard ---------- */
.crows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.crows li { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.crows li:last-child { border-bottom: 0; }
.crow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 10px 6px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.crow:hover { background: rgba(255, 255, 255, .04); }
.crow .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--accent) 22%, transparent); flex: none; }
.crow b { display: block; }
.crow .bar { height: 6px; margin: 6px 0 4px; max-width: 280px; }
.crow small { font-size: 13px; font-weight: 600; }
.crow .go { font-size: 22px; color: var(--muted); }

.bundle-note { display: block; margin-top: 14px; text-decoration: none; color: var(--ink); }
.progress-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.progress-mini > span { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; }
.progress-mini b { display: block; font-size: 20px; line-height: 1.2; }
.progress-mini small { color: var(--muted); font-size: 12px; font-weight: 700; }

/* ---------- community ---------- */
.composer { display: grid; gap: 12px; }
.composer textarea, .reply-form textarea, .support-thread textarea { resize: vertical; min-height: 0; }
.pic-btn { cursor: pointer; gap: 6px; }
.pic-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pic-preview { position: relative; width: max-content; max-width: 100%; }
.pic-preview img { display: block; max-height: 220px; border-radius: 14px; }
.pic-preview .icon-btn { position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, .6); width: 34px; height: 34px; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.feed-filter { flex-wrap: wrap; justify-self: start; }
.post { display: grid; gap: 12px; padding: 18px 20px; }
.post-question { border-color: rgba(255, 197, 61, .3); }
.post-h { display: flex; align-items: center; gap: 12px; }
.post-h b { font-size: 15px; }
.lv { font-size: 11px; font-weight: 800; color: var(--navy-600); background: var(--navy-50); padding: 2px 7px; border-radius: 99px; vertical-align: 1px; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.post-body a { color: var(--mint-700); font-weight: 600; }
/* long posts and replies: first lines only, then "Read more" (Alpine data "more") */
.post-body.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.post-body.clamp-reply { -webkit-line-clamp: 4; line-clamp: 4; }
.post-body.clamp.open { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.read-more { background: none; border: 0; padding: 2px 0 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--mint-700); cursor: pointer; }
.read-more:hover { text-decoration: underline; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-img { display: block; }
.post-img img { display: block; max-height: 420px; max-width: 100%; border-radius: 14px; border: 1px solid var(--line); }
/* a shared leaderboard place: every value side by side on one row, phones included */
.rank-card { display: flex; gap: 4px; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-600) 100%); border-radius: 14px; padding: 10px 8px; }
.rank-card span { flex: 1 1 0; min-width: 0; text-align: center; color: #fff; line-height: 1.2; }
.rank-card b { display: block; font-size: 19px; line-height: 1.2; white-space: nowrap; }
.rank-card small { display: block; color: #dbe5ff; font-size: 11px; font-weight: 700; white-space: nowrap; }
@media (max-width: 400px) { .rank-card b { font-size: 16px; } .rank-card small { font-size: 10px; } }
.post-f, .reply-f { display: flex; gap: 6px; flex-wrap: wrap; }
.act { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); background: none; border: 0; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.act svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.act:hover { background: var(--navy-50); color: var(--ink); }
.act.on { color: #ff6b8b; }
.act.on svg { fill: currentColor; }
.act.sm { font-size: 13px; padding: 4px 8px; }
.act.sm svg { width: 16px; height: 16px; }
.act.good { color: var(--mint-700); }
.thread { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 12px; }
.reply { display: flex; gap: 10px; }
.reply.helpful { background: var(--mint-50); border: 1px solid var(--mint-100); border-radius: 14px; padding: 10px; }
.reply-h { font-size: 14px; }
.avatar.xs { width: 30px; height: 30px; font-size: 13px; }
.reply-form { display: grid; gap: 8px; }
.how-mini { margin: 0 0 12px; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.share-rank { margin-bottom: 16px; }
.share-form { display: grid; gap: 8px; max-width: 480px; }

/* ---------- support ---------- */
.ticket-link { color: inherit; text-decoration: none; }
.ticket-link:hover b { color: var(--mint-700); }
.support-thread { max-width: 760px; }
.msgs { display: grid; gap: 12px; }
.msg { max-width: 88%; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.msg.me { justify-self: end; background: var(--navy-50); border-color: var(--navy-100); }
.msg.staff { border-color: var(--mint-100); }
.msg-h { font-size: 14px; margin-bottom: 4px; }
.msg-b { overflow-wrap: anywhere; }
.msg .post-img { margin-top: 10px; }

/* ---------- prices and paying ---------- */
.paywall { max-width: 720px; margin: 0 auto; display: grid; gap: 20px; }
.paywall-card { text-align: center; padding: 30px 26px; }
.paywall-card h1 { font-size: clamp(24px, 3.2vw, 32px); margin: 14px 0 8px; }
.course-ic.big { width: 72px; height: 72px; font-size: 36px; margin: 0 auto; border-radius: 22px; }
.ck-list { list-style: none; margin: 18px auto 0; padding: 0; display: grid; gap: 8px; max-width: 360px; text-align: left; }
.ck-list li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--ink-2); }
.ck-list li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.offer { margin: 16px 0 0; font-weight: 800; color: var(--gold); }
.buy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.buy-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; background: var(--surface-2); font: inherit; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.buy-row.on { border-color: var(--mint); background: var(--mint-50); }
.buy-row.off { cursor: default; opacity: .75; }
.buy-row .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--accent) 22%, transparent); flex: none; }
.buy-row b { display: block; }
.buy-row small { font-size: 13px; font-weight: 600; }
.buy-row .price { text-align: right; white-space: nowrap; }
.buy-row s, .buy-sum s { color: var(--muted); font-size: 14px; }
.buy-sum { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.buy-sum .total { font-size: 26px; letter-spacing: -.02em; }
.bundle-hint { margin: 0 0 12px; color: var(--gold); font-weight: 700; }
@media (max-width: 560px) { .buy-sum .row-between { flex-direction: column; align-items: stretch; } }

/* ---------- small helpers ---------- */
.only-sm { display: none; }
@media (max-width: 640px) { .only-sm { display: flex; } }
@media (max-width: 420px) { .hide-xs { display: none !important; } }
.ellipsis { min-width: 0; overflow: hidden; }
.ellipsis b, .ellipsis small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-short { display: none; }
@media (max-width: 640px) { .nm-full { display: none; } .nm-short { display: inline; } }
.tag-xs { font-size: 11px; padding: 2px 8px; }
.exam-card .xlogo { margin-bottom: 18px; }

/* one row of tabs that scrolls sideways; the bar shows only while scrolling (thin-scroll) */
.scroll-row { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.scroll-row > * { flex: none; white-space: nowrap; }
@media (max-width: 640px) { .page-h .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; } .page-h .seg > * { flex: none; white-space: nowrap; } }

/* ---------- bell ---------- */
.bell-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ff4d6d; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.notes-page { max-width: 760px; }
.notes-card { padding: 8px; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; color: var(--ink-2); text-decoration: none; }
.notes li a:hover { background: rgba(255, 255, 255, .04); }
.notes li.unread a { color: var(--ink); background: var(--navy-50); }
.notes li + li { margin-top: 2px; }
.note-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 19px; flex: none; }
.note-t { display: block; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.note-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); flex: none; }
.np-table { display: grid; gap: 2px; margin-top: 8px; }
.np-table + .np-table { margin-top: 18px; }
.hour-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.hour-bars span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.hour-bars i { display: block; width: 100%; border-radius: 4px 4px 1px 1px; background: var(--navy-100); }
.hour-bars i.peak { background: var(--mint); }
.hour-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.remind-set { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.remind-set label { display: grid; gap: 2px; }
.remind-set label small { color: var(--muted); font-size: 13px; }
.remind-set select { max-width: 340px; }
.remind-set p { margin: 0; }
.np-row { display: grid; grid-template-columns: 1fr 56px 56px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.np-row:last-child { border-bottom: 0; }
.np-head { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 4px; }
.np-row > :not(:first-child) { justify-self: center; }
.switch.sm { width: 42px; height: 26px; }
.switch.sm span::after { width: 20px; height: 20px; }
.switch.sm input:checked + span::after { transform: translateX(16px); }

/* ---------- community on phones ---------- */
.post-h { align-items: flex-start; }
.who { display: grid; gap: 2px; min-width: 0; }
.who-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.who-line .nm { font-size: 15px; }
.who-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv.gold { color: var(--gold); background: rgba(255, 197, 61, .14); }
.lv.buddy { color: var(--mint); background: rgba(44, 206, 120, .14); } /* a study buddy (Buddies.php): always labelled */
.reply-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.reply-h .nm { max-width: 60%; }
.act.bell { margin-left: auto; }
.act.views { cursor: default; font-weight: 600; } /* how many times the post was seen; not a button */
.act.views:hover { background: none; color: var(--muted); }
.feed-end { height: 1px; }
.liked-by { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 2px 0 -2px; padding: 4px 2px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; text-align: left; }
.liked-by svg { flex: none; width: 15px; height: 15px; fill: #ff6b8b; stroke: #ff6b8b; stroke-width: 2; }
.liked-by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liked-by:hover span { color: var(--ink); text-decoration: underline; }
.act.who-liked { font-weight: 600; }
.likers-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: min(60vh, 420px); overflow-y: auto; }
.likers-list li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.likers-list li:last-child { border-bottom: 0; }
.likers-list .nm { color: var(--ink); min-width: 0; }
.act.bell.on { color: var(--mint-700); }
.act.bell.on svg { fill: none; }
.post.pinned { border-color: var(--mint); box-shadow: var(--glow-mint); }
.feed-filter { align-self: start; }
.helper-strip { gap: 8px; overflow-x: auto; flex-wrap: nowrap; align-items: center; padding-bottom: 2px; }
.helper-strip > * { flex: none; }
.hs-title { font-weight: 800; font-size: 13px; color: var(--gold); text-decoration: none; }
.hs-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 13px; }
.hs-chip small { color: var(--gold); font-weight: 800; }
.how-card summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.how-card summary::-webkit-details-marker { display: none; }
.how-card summary::after { content: "+"; font-size: 22px; font-weight: 700; color: var(--muted); }
.how-card[open] summary::after { content: "−"; }
.how-card summary h3 { margin: 0; }
.how-card[open] summary { margin-bottom: 12px; }
@media (max-width: 640px) {
  .post { padding: 14px; gap: 10px; border-radius: 18px; }
  .post-f { gap: 2px; }
  .act { padding: 7px 8px; font-size: 13px; }
  .composer { padding: 14px; gap: 10px; }
  .composer textarea { min-height: 0; }
  .composer .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } /* Share | Ask for help: full width, two equal halves */
  .composer .seg button { padding: 10px 8px; white-space: nowrap; }
  /* a moderator's three tabs: one row that scrolls sideways */
  .composer .seg-scroll { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .composer .seg-scroll::-webkit-scrollbar { display: none; }
  .composer .seg-scroll button { flex: 0 0 auto; padding: 10px 16px; }
  .reply { gap: 8px; }
  .thread { gap: 10px; }
  .msg { max-width: 100%; }
  .video, .post-img img { border-radius: 12px; }
  .stack { gap: 16px; }
}

/* ---------- prices on the pages ---------- */
.price-chip { display: grid; justify-items: end; text-align: right; line-height: 1.2; flex: none; }
.price-chip b { color: var(--gold); font-size: 18px; }
.price-chip s { color: var(--muted); font-size: 13px; }
.price-chip small { color: var(--muted); font-size: 12px; font-weight: 600; }
.pricing { max-width: 860px; }
.price-perks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.price-perks span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.price-exam { margin-bottom: 18px; }
.price-exam h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.price-exam .xlogo { width: 40px; height: 40px; border-radius: 10px; padding: 4px; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.price-list li:last-child { border-bottom: 0; }
.price-list .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--accent) 22%, transparent); flex: none; }
.price-list b { display: block; }
.price-list small { font-size: 13px; font-weight: 600; }
.price-tag { display: grid; justify-items: end; text-align: right; line-height: 1.2; }
.price-tag b { font-size: 19px; color: var(--gold); }
.price-tag b.free { color: var(--green-700); }
.price-tag s { color: var(--muted); font-size: 13px; }
.price-tag small { color: var(--muted); }
.bundle-line { margin: 14px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 15px; }
.bundle-line s { color: var(--muted); }
.bundle-line b { color: var(--gold); font-size: 18px; }
.faq-mini details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq-mini summary { cursor: pointer; font-weight: 700; }
.faq-mini details p { margin: 8px 0 0; color: var(--ink-2); }
/* names never push a row wider than the screen */
.list li .grow { min-width: 0; }
.list li .grow > b:first-child { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.pod b { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.push-box { display: flex; align-items: center; gap: 10px; background: var(--navy-50); border: 1px solid var(--navy-100); border-radius: 14px; padding: 10px 12px; margin: 4px 0 8px; }

/* leaderboard podium: 2nd · 1st · 3rd */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; max-width: 520px; margin: 4px auto 18px; text-align: center; }
.pod { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.pod .avatar { width: 52px; height: 52px; font-size: 20px; }
.pod.p1 .avatar { width: 64px; height: 64px; font-size: 24px; box-shadow: 0 0 0 3px #ffd43b; }
.pod b { font-size: 14px; }
.pod small { color: var(--gold); font-weight: 800; font-size: 13px; }
.pod .block { width: 100%; margin-top: 6px; border-radius: 14px 14px 6px 6px; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: var(--navy-900); }
.pod.p1 .block { height: 96px; background: linear-gradient(180deg, #ffd43b, #f2b705); }
.pod.p2 .block { height: 70px; background: linear-gradient(180deg, #e5e7eb, #b8bec9); }
.pod.p3 .block { height: 54px; background: linear-gradient(180deg, #f6c09a, #dd9360); }
@media (max-width: 420px) { .pod .avatar { width: 42px; height: 42px; font-size: 16px; } .pod.p1 .avatar { width: 52px; height: 52px; } .pod b { font-size: 13px; } }

/* ---------- pictures as avatars ---------- */
img.avatar { object-fit: cover; background: var(--surface-2); padding: 0; }
.avatar.xs { width: 30px; height: 30px; font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.avatar.xl { width: 96px; height: 96px; font-size: 38px; }
.my-av { position: relative; overflow: hidden; }
.my-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.my-av b { font-weight: 800; }
.top-avatar { text-decoration: none; display: none; }
@media (max-width: 1024px) { .top-avatar { display: block; } }
@media (max-width: 720px) { .top-avatar { display: none; } }
.side-user { text-decoration: none; color: inherit; border-radius: 14px; padding: 8px; margin: 0 -4px; }
.side-user:hover, .side-user[aria-current] { background: var(--bg-soft); }
.side-user .chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.tabbar .tab-av { width: 24px; height: 24px; font-size: 11px; }
.tabbar a[aria-current] .tab-av { box-shadow: 0 0 0 2px var(--navy); }
.board-name, .av-link { color: inherit; text-decoration: none; min-width: 0; }
.board-name:hover b, a.nm:hover b { color: var(--mint-700); }
a.nm { color: inherit; text-decoration: none; }
.pod-link { display: grid; justify-items: center; gap: 4px; color: inherit; text-decoration: none; min-width: 0; max-width: 100%; }
.list li .avatar.xs { flex: none; }

/* ---------- profile ---------- */
.me-page { display: grid; gap: 18px; }
.me-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.me-head h1 { font-size: clamp(22px, 3vw, 28px); margin: 0 0 8px; overflow-wrap: anywhere; }
.me-photo { position: relative; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; flex: none; }
.me-cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; font-size: 15px; box-shadow: 0 0 0 3px var(--surface); }
.me-level { min-width: 220px; flex: 1; max-width: 320px; }
.me-tabs { justify-self: start; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-actions .logout { margin-left: auto; color: var(--red-700); border-color: var(--red-50); }
.account-actions .logout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .me-head { gap: 14px; } .me-level { min-width: 100%; } .account-actions .logout { margin-left: 0; } }

/* ---------- a learner's activity page ---------- */
.person { display: grid; gap: 18px; max-width: 980px; }
.person-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.person-head h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 4px; overflow-wrap: anywhere; }
.person-head p { margin: 0 0 10px; }
.person-stats { gap: 14px; }
.cal-wrap { padding-bottom: 6px; min-width: 0; }
/* the 20-week calendar fits its card on any screen: squares share the width (no sideways scrolling on phones) */
.cal { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 6px; width: 100%; max-width: 620px; }
.cal-months { grid-column: 2; display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); gap: 3px; font-size: 11px; color: var(--muted); font-weight: 700; height: 16px; }
.cal-months span { white-space: nowrap; overflow: visible; }
.cal-days { display: grid; grid-template-rows: repeat(7, minmax(0, 1fr)); gap: 3px; font-size: 10px; color: var(--muted); font-weight: 700; align-self: stretch; }
.cal-days span { display: flex; align-items: center; line-height: 1; }
.cal-grid { display: grid; grid-auto-flow: column; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); gap: 3px; }
.cal-week { display: grid; grid-template-rows: repeat(7, auto); gap: 3px; }
.cal i { display: block; width: 100%; aspect-ratio: 1; border-radius: 3px; background: var(--line); }
.cal-legend i { display: block; width: 13px; height: 13px; border-radius: 3px; background: var(--line); }
.person .card, .person > * { min-width: 0; }
.cal i.l1, .cal-legend i.l1 { background: rgba(44, 206, 120, .3); }
.cal i.l2, .cal-legend i.l2 { background: rgba(44, 206, 120, .55); }
.cal i.l3, .cal-legend i.l3 { background: rgba(44, 206, 120, .8); }
.cal i.l4, .cal-legend i.l4 { background: var(--mint); box-shadow: 0 0 8px rgba(44, 206, 120, .5); }
.cal-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 8px; }
.tips h2 { font-size: 20px; }
.tips ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.tips li { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tips li span { font-size: 20px; line-height: 1.3; }
.tips li p { margin: 0; color: var(--ink-2); }

/* ---------- a closed support conversation ---------- */
.closed-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); }
.closed-banner > span { font-size: 26px; }
.closed-banner p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .person-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .person-stats .stat-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .person-stats .stat-card .ic { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
  .person-stats .stat-card b { font-size: 19px; }
  .person-stats .stat-card span { font-size: 12px; }
  .person-head { gap: 14px; }
  .person-head .avatar.xl { width: 72px; height: 72px; font-size: 28px; }
  /* phones: photo and name side by side, the rank badges across the full width under them */
  .person-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .person-head > .avatar { grid-row: 1 / span 2; }
  .person-head > .grow { display: contents; }
  .person-head h1 { grid-column: 2; align-self: end; }
  .person-head p { grid-column: 2; align-self: start; margin: 0; font-size: 14px; }
  .person-head .hud-row { grid-column: 1 / -1; margin-top: 14px; gap: 8px; }
  .person-head .hud { padding: 6px 10px; font-size: 13px; gap: 6px; }
  .person-head .hud b { font-size: 16px; }
}

/* ---------- phones and tablets: the ☰ menu ---------- */
.menu-open { display: none; position: relative; }
.menu-open .dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--bg); }
@media (max-width: 1024px) { .menu-open { display: grid; } .hide-md { display: none !important; } }
.drawer-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(2, 5, 15, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.drawer { position: absolute; inset: 0 0 0 auto; width: min(320px, 86vw); background: var(--surface); border-left: 1px solid var(--line); padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; animation: drawin .2s ease-out; }
@keyframes drawin { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .side-user { margin: 0; background: var(--bg-soft); }

/* ---------- phones: no page name in the top bar, and ? (help) instead of ☰ (the tab bar has the menus) ---------- */
@media (max-width: 720px) {
  .shell-app .app-title, .shell-focus .app-title { visibility: hidden; }
  .menu-open { display: none !important; }
  .app-top .help-btn.hide-md { display: grid !important; }
}

/* ---------- community: courses, tools, emoji and GIF pickers, replies ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* course filter: a funnel button at the top right of the page head, with a menu */
.comm-h { align-items: flex-start; flex-wrap: nowrap; }
/* the exam/course filter sits right beside the "Community" heading */
.comm-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.course-filter { position: relative; flex: none; }
.filter-btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 999px; padding: 8px 14px 8px 11px; cursor: pointer; max-width: 200px; }
.filter-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.filter-btn:hover { color: var(--ink); border-color: var(--navy); }
.filter-btn.on { color: #fff; background: var(--navy); border-color: var(--navy); }
.filter-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; min-width: 200px; max-height: 60vh; overflow-y: auto; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); }
.filter-group { display: block; padding: 8px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.filter-group:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.filter-menu button { font: inherit; font-size: 14px; font-weight: 600; text-align: left; color: var(--ink-2); background: none; border: 0; border-radius: 9px; padding: 9px 12px; cursor: pointer; }
.filter-menu button:hover { background: var(--navy-50); color: var(--ink); }
.filter-menu button.on { color: #fff; background: var(--navy); }
@media (max-width: 640px) { .comm-h { margin-bottom: 14px; } .filter-btn { max-width: 160px; padding: 7px 12px 7px 10px; } }
.filters { display: grid; gap: 8px; min-width: 0; }
/* the weekly top 10, posted by the Prep team (kind board) */
.avatar.team-av { background: #fff; padding: 5px; object-fit: contain; }
.top10 { margin: 4px 0 0; }
.top10 li { padding: 7px 0; }
.top10-xp { color: var(--mint-700); white-space: nowrap; }
.filters .seg { justify-self: start; }
.composer-bar { display: flex; align-items: center; gap: 8px; }
.composer-bar .tools { margin-right: auto; }
.course-pick { font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--surface-2); border: 1.5px solid var(--line-2); border-radius: 999px; padding: 7px 10px; max-width: 160px; cursor: pointer; }
.tools { display: inline-flex; align-items: center; gap: 2px; }
.tool { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); background: none; border: 0; cursor: pointer; font: inherit; }
.tool:hover { background: var(--navy-50); color: var(--ink); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gif-tool { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.gif-tool { border: 1.5px solid currentColor; width: auto; height: 22px; padding: 0 5px; border-radius: 6px; margin: 0 6px; }
.post-gif { max-width: 300px; border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.post-gif img { display: block; width: 100%; height: auto; }
.post-gif.sm { max-width: 220px; margin-top: 4px; }
.pic-preview.sm img { max-height: 120px; }
.thread { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.reply-bubble { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px; min-width: 0; }
.reply.helpful .reply-bubble { background: var(--mint-50); border-color: var(--mint-100); }
.reply.helpful { background: none; border: 0; padding: 0; }
.reply-f { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 2px 4px 0; }
.reply-f small { margin-right: 4px; }
.more-replies { justify-self: start; background: none; border: 0; color: var(--navy-600); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; padding: 4px 0 4px 40px; }
.more-replies:hover { color: var(--ink); }
.reply-box { display: flex; gap: 8px; align-items: flex-start; }
.mention-wrap { position: relative; }
.reply-field { position: relative; }
.at-tool { font-size: 18px; font-weight: 800; line-height: 1; }
.mention-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; display: grid; padding: 6px; max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); }
.reply-field .mention-list { top: auto; bottom: calc(100% + 4px); } /* reply boxes sit low on the screen: the list opens above */
.mention-list button { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; border-radius: 9px; padding: 7px 9px; cursor: pointer; }
.mention-list button.on, .mention-list button:hover { background: var(--navy-50); }
.mention-list b { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-list small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.post-body a.mention { color: var(--navy-600); font-weight: 700; text-decoration: none; }
.reply-field { background: var(--surface-2); border: 1.5px solid var(--line-2); border-radius: 22px; padding: 6px 8px 6px 14px; transition: border-color .15s, border-radius .15s; min-width: 0; }
.reply-field:focus-within { border-color: var(--mint); }
.reply-box.open .reply-field { border-radius: 16px; }
.reply-field textarea { width: 100%; resize: none; border: 0; outline: none; background: none; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.45; padding: 4px 0; display: block; }
.reply-tools { display: none; align-items: center; justify-content: space-between; margin-top: 4px; }
.reply-box.open .reply-tools { display: flex; }
.send-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--mint); color: var(--navy-900); cursor: pointer; }
.send-btn:disabled { opacity: .4; cursor: default; }
.send-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.picker-wrap { position: fixed; inset: 0; z-index: 75; background: rgba(2, 5, 15, .45); display: grid; place-items: center; padding: 16px; }
.picker { width: min(420px, 100%); max-height: min(560px, 82vh); display: grid; gap: 10px; align-content: start; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
/* the emoji picker (emoji-picker-element) in the app's colours */
.emoji-host emoji-picker { display: block; width: 100%; height: 400px; --num-columns: 8; --emoji-size: 1.55rem; --background: var(--surface); --border-color: transparent;
  --input-border-color: var(--line-2); --input-font-color: var(--ink); --input-placeholder-color: var(--muted); --input-border-radius: 12px; --input-padding: .5rem .75rem;
  --outline-color: var(--mint); --indicator-color: var(--mint); --button-hover-background: var(--navy-50); --button-active-background: var(--navy-100); --category-font-color: var(--ink-2); --category-font-size: .8rem; }
.emoji-host:has(emoji-picker) .emoji-loading { display: none; }
.picker > *, .emoji-host { min-width: 0; }
.emoji-host emoji-picker { max-width: 100%; --emoji-padding: .4rem; }
/* the GIF picker scrolls down (the two masonry columns sit inside), with an always-visible scrollbar */
.gif-scroll { max-height: 52vh; overflow-y: auto; margin-top: 10px; padding-right: 4px; scrollbar-color: auto; /* not the page's thin colour: it would switch off the bar below */ }
@supports not selector(::-webkit-scrollbar) { .gif-scroll { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; } }
.gif-scroll::-webkit-scrollbar { width: 6px; }
.gif-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.gif-scroll::-webkit-scrollbar-track { background: transparent; }
.gif-grid { columns: 2; column-gap: 6px; }
.gif-grid button { display: block; width: 100%; padding: 0; margin: 0 0 6px; border: 0; border-radius: 10px; overflow: hidden; background: var(--bg-soft); cursor: pointer; break-inside: avoid; }
.gif-grid img { display: block; width: 100%; height: auto; }
.gif-credit { margin: 0; text-align: right; font-size: 11px; color: var(--muted); font-weight: 700; }
@media (max-width: 640px) {
  .picker-wrap { place-items: end center; padding: 0; }
  .picker { width: 100%; border-radius: 20px 20px 0 0; max-height: 75vh; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .emoji-host emoji-picker { height: 52vh; --num-columns: 7; --emoji-size: 1.7rem; }
  .composer-bar { flex-wrap: wrap; }
  .composer-bar > .btn { flex: 1 0 100%; min-height: 46px; } /* Post / Ask: full width on its own row */
  .course-pick { max-width: 140px; }
  .more-replies { padding-left: 38px; }
}

/* ---------- feeling like an app (views/partials/native.php) ---------- */
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tabbar, .app-top, .side-nav, .drawer .side-nav, .seg, .btn, .act, .chip, .filter-btn, .filter-menu, .tool, .icon-btn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tabbar a:active, .side-nav a:active, .act:active, .icon-btn:active { opacity: .7; }
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }

.sheet-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(2, 5, 15, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.sheet { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; padding: 18px 20px 14px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.sheet-grip { display: none; }
.install-top { display: flex; gap: 14px; align-items: center; }
.install-top img { width: 56px; height: 56px; padding: 8px; border-radius: 14px; background: #fff; flex: none; }
.btn-mark { width: 20px; height: 20px; padding: 2px; border-radius: 5px; background: #fff; }
.install-btn img { width: 22px; height: 22px; padding: 2px; border-radius: 6px; background: #fff; }
.install-top h2 { font-size: 19px; margin: 0 0 2px; }
.install-top p { margin: 0; line-height: 1.45; }
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ist; }
.install-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 14px; font-size: 15px; line-height: 1.4; }
.ist-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--navy-50); color: var(--navy-600); }
.ist-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ist-ic svg circle { fill: currentColor; stroke: none; }
.ist-txt { font-size: 13px; font-weight: 800; }
@media (max-width: 640px) {
  .sheet-wrap { place-items: end center; padding: 0; }
  .sheet { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: sheetup .25s ease-out; }
  .sheet-grip { display: block; width: 40px; height: 4px; border-radius: 99px; background: var(--line-2); margin: -6px auto 0; }
}
@keyframes sheetup { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
/* the install guide's arrow at the browser's own button (owner, 2026-11-23): top right (Chrome ⋮, iPhone Chrome's Share, in-app •••)
   or bottom (Safari's Share, Samsung's ≡); for the bottom the sheet moves to the top so the arrow is not covered */
.install-arrow { position: fixed; z-index: 81; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; font-weight: 800; font-size: 13px; pointer-events: none; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.install-arrow svg { width: 40px; height: 40px; fill: none; stroke: var(--mint, #3fe08b); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.install-arrow.at-top { top: 6px; right: 10px; flex-direction: column-reverse; animation: arrowup 1s ease-in-out infinite; }
.install-arrow.at-bottom { bottom: calc(6px + env(safe-area-inset-bottom)); left: 50%; margin-left: -24px; animation: arrowdown 1s ease-in-out infinite; }
.install-arrow.at-bottom svg { transform: rotate(180deg); }
@keyframes arrowup { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes arrowdown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.install-note { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.install-do .install-steps { margin-top: 10px; }
/* the how-to video: a "Watch the steps" link, the video full screen over everything (portrait 1080x1920) */
.install-watch { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; font-weight: 800; font-size: 15px; border-width: 2px; border-color: var(--green); color: var(--green-700); }
.iw-play { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green); }
.iw-play svg { width: 13px; height: 13px; fill: #04220f; stroke: none; margin-left: 2px; }
.install-top { border: 0; cursor: pointer; font: inherit; }
.install-top .iw-play { width: 22px; height: 22px; }
.install-top .iw-play svg { width: 11px; height: 11px; }
.install-player { position: fixed; inset: 0; z-index: 90; background: #000; display: grid; place-items: center; }
.install-player video { width: 100%; height: 100%; object-fit: contain; }
.install-player-x { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
@media (max-width: 640px) {
  .sheet-wrap.arrow-bottom { place-items: start center; }
  .sheet-wrap.arrow-bottom .sheet { border-radius: 0 0 22px 22px; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 14px; }
  .sheet-wrap.arrow-bottom .sheet-grip { display: none; }
}

.modal.push-modal { width: min(440px, 100%); }
.push-bell { font-size: 56px; line-height: 1; margin-bottom: 8px; animation: push-ring 1.6s ease-in-out .3s 2; transform-origin: 50% 10%; }
@keyframes push-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .push-bell { animation: none; } }
.push-modal h2 { margin: 0; font-size: 24px; }
.push-lead { margin: 8px 0 12px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.push-list { text-align: left; margin: 0 0 18px; padding: 12px 14px 12px 32px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.push-list li + li { margin-top: 6px; }
.push-list b { color: var(--ink); }

/* ---------- "What are you looking for?" (views/partials/wish.php) ---------- */
.modal.wish { width: min(520px, 100%); text-align: left; max-height: calc(100dvh - 32px); overflow-y: auto; padding-top: 24px; }
.modal.wish h2 { font-size: 23px; margin: 0; }
.wish-lead { margin: 6px 0 14px; }
.wish-group { margin: 14px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wish-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-more { margin-top: 8px; }
.ct-subj { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.ct-subj p { margin: 0 0 8px; }
.modal.subj-modal { width: min(440px, 100%); }
/* "Add your WhatsApp number" pop-up (partials/phone.html, owner 2026-11-23) */
.modal.phone-modal { width: min(420px, 100%); text-align: center; }
.phone-modal form { display: grid; gap: 10px; }
.phone-modal h2 { margin: 0; }
.phone-modal p { margin: 0; }
.phone-modal .field { text-align: left; }
.phone-ico { font-size: 40px; line-height: 1; }
.subj-soon { font-size: 44px; line-height: 1; margin: 4px 0 10px; }
.buy-more { margin-top: 12px; }
.wish-chip { display: inline-flex; align-items: center; padding: 8px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: background .12s, border-color .12s; }
.wish-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wish-chip.on { background: var(--mint-50); border-color: var(--mint); color: var(--mint-700); }
.wish-chip:focus-within { outline: 2px solid var(--navy); outline-offset: 2px; }
.modal.wish .field { margin-top: 14px; }
.modal.wish textarea.input { resize: vertical; min-height: 64px; }
button.wish-chip { font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); gap: 8px; }
.wish-found { margin-top: 12px; }
.wish-own { border-style: dashed; }
.wish-x { font-size: 17px; line-height: 1; opacity: .8; }
.wish-next { margin-top: 18px; }
.wish-checking { padding: 22px 0 18px; }
.wish-spin { width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--line-2); border-top-color: var(--mint); animation: wish-spin .8s linear infinite; }
@keyframes wish-spin { to { transform: rotate(360deg); } }
.wish-result { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; gap: 8px; }
.wish-result li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.wish-result li > span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.wish-result li.yes > span { background: var(--mint-50); color: var(--mint-700); }
.wish-result li.soon > span { background: #fff4d6; color: #9a6a00; }
.wish-result li.unsure > span { background: var(--surface-3, var(--line)); color: var(--muted); }
.wish-result li.no > span { background: var(--red-50); color: var(--red-700); }
.wish-result b { flex: 1; min-width: 0; }
.wish-result small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.modal.wish .searchbox .input { height: 50px; }

/* ---------- topic ratings (views/topic.php) ---------- */
.rate-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.rate-chip b { color: var(--gold); }
.rate-avg { font-size: 14px; color: var(--muted); }
.rate-avg b { color: var(--gold); margin-right: 4px; }
.star-input { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.star-input button { font-size: 34px; line-height: 1; padding: 2px 3px; background: none; border: 0; cursor: pointer; color: var(--line-2); transition: transform .1s, color .1s; -webkit-tap-highlight-color: transparent; }
.star-input button.on { color: var(--gold); }
.star-input button:active { transform: scale(.9); }
.star-input.done button { cursor: default; }
.star-input.done button:active { transform: none; }
.rate-mine { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.star-word { margin-left: 10px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.reward .rate-card.compact, section > .rate-card.compact { max-width: 520px; margin: 22px auto 0; text-align: left; }
.rate-card.compact .star-input button { font-size: 30px; }
.rate-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.rate-card.compact .rate-title { font-size: 17px; }
.rate-card:not(.compact) .rate-title { font-size: 20px; }
/* a topic task won (stars() in app.js): a trophy, grey until earned, so stars only ever mean the rating */
.tick { font-style: normal; font-size: 20px; line-height: 1; flex: none; filter: grayscale(1); opacity: .25; }
.tick.on { filter: none; opacity: 1; animation: pop .4s; }
.tick.sm { font-size: 15px; }
.ticks { display: inline-flex; gap: 3px; flex: none; }
.rate-form { display: grid; gap: 10px; margin-top: 12px; }
.rate-list { display: grid; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rate-item { display: flex; gap: 10px; align-items: flex-start; }
.rate-item-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rate-stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; }
.rate-item p { margin: 2px 0 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

/* new community posts on the phone tab bar */
.tab-count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ff4d6d; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }

/* picture viewer (layout.php) */
.viewer { position: fixed; inset: 0; z-index: 90; background: rgba(2, 5, 15, .92); display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: var(--shadow-lg); }
.viewer-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; background: rgba(255, 255, 255, .12); color: #fff; }
html.viewing { overflow: hidden; }

/* community time (views/community.php, CommunityTime.php) */
.ct-left { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.ct-left.low { color: var(--gold); }
.ct-gate { padding: 28px 24px; }
.ct-gate h2 { font-size: 24px; margin: 8px 0 6px; }
.ct-tiers { list-style: none; padding: 0; margin: 14px auto; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ct-tiers li { display: grid; gap: 2px; min-width: 92px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.ct-tiers b { font-size: 20px; color: var(--mint-700); }
.ct-tiers span { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.ct-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.ct-review { margin-top: 20px; text-align: left; border-top: 1px solid var(--line); padding-top: 14px; }
.ct-review > summary { cursor: pointer; font-weight: 800; color: var(--navy-600); text-align: center; }
.ct-rev-nav { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0 6px; }
.ct-rev-nav button { width: 38px; height: 38px; border-radius: 50%; font: inherit; font-weight: 800; cursor: pointer; border: 2px solid; background: transparent; }
.ct-rev-nav button.ok { color: var(--mint-700); border-color: var(--mint-100); }
.ct-rev-nav button.no { color: var(--red-700); border-color: rgba(244, 63, 94, .35); }
.ct-rev-nav button.on.ok { background: var(--mint); border-color: var(--mint); color: var(--navy-900); }
.ct-rev-nav button.on.no { background: var(--red); border-color: var(--red); color: #fff; }
.ct-rev { padding: 12px 0 0; }
.ct-rev-move { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.ct-rev-q { font-weight: 600; line-height: 1.5; }
.ct-rev-q p { display: inline; margin: 0; }
.ct-rev-a { margin: 6px 0 4px; }
.ct-rev.ok .ct-rev-a > span:first-child { color: var(--mint-700); font-weight: 900; }
.ct-rev.no .ct-rev-a > span:first-child { color: var(--red-700); font-weight: 900; }
.ct-rev-x { color: var(--ink-2); }

/* confirming the email (partials/native.php, dashboard) */
.verify h2 { font-size: 24px; margin: 6px 0; }
.verify form { display: grid; gap: 12px; margin-top: 16px; }
.code-input { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .4em; padding-left: .4em; }
.code-input::placeholder { font-size: 16px; letter-spacing: normal; font-weight: 600; }
.verify-more { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.verify-note { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-color: var(--gold); }
.verify-note b { display: block; }
.verify-note small { color: var(--ink-2); }
/* a sum set out in columns in a lesson or an answer (Md: ``` block): digits stay lined up */
.prose pre.work, pre.work { display: inline-block; margin: 4px 0 12px; padding: 12px 18px; font: 600 17px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; white-space: pre; overflow-x: auto; max-width: 100%; }
.push-bar { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; margin-bottom: 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; font-size: 14px; }
.push-bar b { display: block; line-height: 1.25; }
.push-bar small { display: block; color: var(--ink-2); font-size: 12.5px; line-height: 1.3; }
.push-bar-bell { font-size: 20px; }
.push-bar .btn { flex-shrink: 0; }
.push-bar-x { width: 32px; height: 32px; flex-shrink: 0; }
.push-bar-x svg { width: 16px; height: 16px; }

/* Prep logo beside the back arrow on phones (layout.php) */

/* a form's buttons wrap onto two rows when a phone is too narrow for both (support) */
.form-actions { flex-wrap: wrap; }
.form-actions > * { flex: 1 1 auto; }
.dash > *, .stack > * { min-width: 0; }

/* course outline: the topic's trophies on their own line under its title (subject.php) */
.outline-row .grow .ticks { display: flex; gap: 4px; margin-top: 6px; }
.outline-row small { display: block; }

/* dashboard: "<logo> JAMB Study" heading */
.study-h { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 22px; }
.xlogo-sm { width: 36px; height: 36px; border-radius: 10px; padding: 4px; font-size: 18px; }

/* course outline: compact "Continue where you stopped" (subject.php) */
.continue-card.compact { gap: 14px; padding: 14px 16px; margin-bottom: 16px; }
.continue-card.compact .play { width: 40px; height: 40px; }
.continue-card.compact .play svg { width: 17px; height: 17px; }
.continue-card.compact small { display: block; font-size: 12px; font-weight: 800; color: #8fe8b8; }
.continue-card.compact b { display: block; color: #fff; font-size: 15px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-card.compact .go { font-size: 22px; color: #c9d3ea; }

/* topic page: Tutorial · Worked examples · Quiz (topic.php) */
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 980px; }
.task { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); padding: 18px; transition: border-color .15s, transform .12s; }
.task:hover { border-color: var(--accent); transform: translateY(-2px); }
.task:active { transform: translateY(1px); }
.task b { display: block; font-size: 17px; }
.task small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.task-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.task .go { font-size: 22px; color: var(--muted); }
@media (max-width: 860px) { .task-grid { grid-template-columns: 1fr; } }
.topic-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 980px; margin-top: 22px; }
.topic-pn-a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; color: inherit; min-width: 0; }
.topic-pn-a small { color: var(--mint-700); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.topic-pn-a b { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.topic-pn-a.next { grid-column: 2; text-align: right; }
@media (max-width: 380px) { .topic-pn { grid-template-columns: 1fr; } .topic-pn-a.next { grid-column: auto; } }

/* tutorial and worked examples: one long page, each step / example its own numbered card (learn.php, examples.php) */
.tut-part { padding: 26px 0 8px; scroll-margin-top: 84px; }
.tut-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--line-2); }
.tut-head h2 { font-size: clamp(20px, 3.8vw, 25px); font-weight: 800; color: #fff; margin: 2px 0 0; line-height: 1.3; letter-spacing: -.01em; }
.tut-label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-700); }
.tut-intro .tut-head { justify-content: space-between; }
.tut-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 16px; background: var(--navy); color: #fff; }
.tut-section { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 36px 0 0; }
.read-end { height: 1px; }
.tut-done { text-align: center; margin: 24px 0 28px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.tut-done .actions { display: grid; gap: 10px; margin: 16px auto 0; max-width: 420px; }
.tut-locked { margin-top: 8px; }
/* worked examples: one flowing page, examples split by a rule (examples.php) */
.ex-list { margin-bottom: 8px; }
.ex-item { padding: 8px 0 0; scroll-margin-top: 84px; }
.ex-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ex-h h2 { font-size: clamp(22px, 4vw, 26px); font-weight: 800; color: #fff; margin: 0; letter-spacing: -.01em; }
.ex-h small { font-size: 15px; font-weight: 700; color: var(--muted); }
.ex-q { font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.ex-a { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 18px 0 14px; padding: 12px 16px; border-radius: 14px; border: 2px dotted var(--green); }
.ex-a b { color: var(--green-700); font-size: 17px; }
.ex-tag { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--green-700); }
.ex-work { font-size: 16px; }
/* the options are only read, not picked: a plain list, no buttons */
.ex-opts { list-style: none; margin: 16px 0 18px; padding: 0; display: grid; gap: 10px; }
.ex-opts li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; font-weight: 600; color: var(--ink); }
.ex-opts .l { width: 28px; flex: none; font-weight: 800; color: var(--muted); }
.ex-opts .o { min-width: 0; }
.ex-show { max-width: 420px; }
.ex-nav { display: grid; gap: 10px; margin: 24px 0 28px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.ex-nav-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-nav-row .btn { white-space: normal; }
@media (max-width: 380px) { .ex-nav-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tut-head { gap: 10px; } .tut-num { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; } .tut-step .tut-head { flex-wrap: wrap; } .tut-step .tut-head > .grow { flex-basis: calc(100% - 46px); } .tut-step .tut-head .listen-btn { margin-left: 46px; } }
@media (max-width: 640px) { .tut-plain .tut-head > .grow { flex-basis: 100%; } .tut-plain .tut-head .listen-btn { margin-left: 0; } }

/* quiz: numbered buttons to move between questions (quiz.php) */
.quiz-step { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.quiz-nums { justify-content: center; margin-top: 18px; }
.quiz-nums button { width: 40px; height: 40px; font-size: 14px; }
.quiz-submit { display: flex; width: 100%; margin: 16px auto 0; max-width: 420px; }

/* locked steps / examples under the free first one (learn.php, examples.php) */
.locked-list { list-style: none; margin: 8px 0 24px; padding: 0; border-top: 1px solid var(--line-2); }
.locked-list li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.locked-list small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.locked-list .lk { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 14px; flex: none; }
.paywall-card h2 { font-size: clamp(22px, 3vw, 28px); margin: 14px 0 8px; }

/* community pictures and GIFs load lazily: a soft placeholder until the picture arrives, then it fades in */
.post-img img, .post-gif img { opacity: 0; transition: opacity .25s; }
.post-img img.ok, .post-gif img.ok { opacity: 1; }
.post-img:has(img:not(.ok)), .post-gif:has(img:not(.ok)) { min-height: 160px; max-width: 300px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--bg-soft) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* leaderboard rows: the name, then the place as a "#1" tag; the XP under the streak (partials/board.php) */
.board-xp { display: inline-block; margin-top: 2px; font-size: 14px; color: var(--gold); }
.rank-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.5; vertical-align: 1px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.rank-tag.r1 { background: #ffd43b; border-color: #f2b705; color: #2b1d00; }
.rank-tag.r2 { background: #e5e7eb; border-color: #c4c9d2; color: #111; }
.rank-tag.r3 { background: #f6c09a; border-color: #dd9360; color: #2a1200; }

/* pictures in lessons (Md: "![caption](address)" lines added in cpanel) */
.lesson-img { margin: 1em 0 1.2em; }
.lesson-img img { display: block; max-width: 100%; max-height: 520px; height: auto; border-radius: 12px; background: #fff; }
.lesson-img figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* every device: page text cannot be selected or copied (typing fields still can; app.js also blocks copy, cut,
   the right-click / long-press menu and dragging). Phones and tablets: the app never widens or zooms */
html, body { overflow-x: clip; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable], [contenteditable] * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; }
@media (hover: none) and (pointer: coarse) {
  html, body { touch-action: pan-x pan-y; } /* scrolling only: the browser itself refuses pinch and double-tap zoom */
  input, textarea, select { font-size: max(16px, 1em); } /* iOS zooms into fields with smaller text */
}

/* course outline while the course is locked: the free first topic, locks on the others (subject.php) */
.outline-row .free-tag { margin-left: 8px; vertical-align: 2px; font-size: 11px; }
.outline-row .go.lock { font-size: 15px; opacity: .8; }

/* polls in the community (2026-10-26), compact like the Skoolified one: thin choice rows, bars and % after voting */
.tool.on { background: var(--navy-50); color: var(--mint); }
.poll-edit { display: grid; gap: 6px; }
.poll-edit-row { display: flex; align-items: center; gap: 6px; }
.poll-edit-row .input { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.poll-edit-row .icon-btn { width: 34px; height: 34px; }
.poll-edit-row .icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.poll-edit-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 13px; }
.poll-link { padding: 4px 0; border: 0; background: none; color: var(--mint); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.poll-link.muted { color: var(--muted); margin-left: auto; }
.poll { display: grid; gap: 6px; margin: 10px 0 2px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; min-height: 38px; padding: 8px 12px; overflow: hidden; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.poll-opt:hover:not(:disabled) { border-color: var(--mint); }
.poll-opt:disabled { cursor: default; opacity: 1; }
.poll-opt.mine { border-color: var(--mint); }
.poll-opt.right { border-color: var(--mint); background: var(--mint-50); }
.poll-right { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--mint-700); position: relative; z-index: 1; }
.poll-why { margin: 8px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.poll-bar { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(44, 206, 120, .16); transition: width .4s ease; }
.poll-txt, .poll-tick, .poll-pct { position: relative; }
.poll-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.poll-tick { color: var(--mint); font-weight: 800; }
.poll-pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.poll-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }

/* "Show only JAMB syllabus" switch on the course outline (2026-10-26) */
.outline-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.outline-tools .searchbox { flex: 1; min-width: 0; }
.jamb-filter { display: inline-flex; align-items: center; gap: 10px; flex: none; height: 54px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.jamb-switch { position: relative; width: 36px; height: 20px; flex: none; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.jamb-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.jamb-filter.on { border-color: var(--mint); }
.jamb-filter.on .jamb-switch { background: var(--mint); }
.jamb-filter.on .jamb-switch::after { transform: translateX(16px); }
@media (max-width: 560px) {
  .outline-tools { flex-wrap: wrap; }
  .jamb-filter { flex: 1 0 100%; height: 46px; justify-content: space-between; flex-direction: row-reverse; }
}

/* ---------- the wallet (views/wallet.php, Wallet.php) ---------- */
.wallet { grid-template-columns: minmax(0, 1fr); }
.wallet > * { min-width: 0; }
.wallet-top { display: grid; gap: 16px; }
.wallet-bal small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.wallet-bal b { font-size: 38px; letter-spacing: -.02em; }
.wallet-list { position: relative; overflow-y: auto; padding-right: 4px; }
.wallet-row { padding: 10px 12px; }
.wallet-row .num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--navy-50); color: var(--navy-600); flex: none; }
.wallet-row b { font-weight: 700; font-size: 15px; }
.wallet-tick { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.wallet-row.on .wallet-tick { background: var(--mint); border-color: var(--mint); }
.wallet-short { margin: 10px 0 0; color: var(--gold); }
.wallet-short a { font-weight: 800; }
.wallet-amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.wallet-amounts .chip { cursor: pointer; font: inherit; font-weight: 700; color: var(--ink); padding: 10px 16px; }
.wallet-amounts .chip.on { border-color: var(--mint); background: var(--mint-50); color: var(--mint-700); }
.wallet-log { list-style: none; margin: 0; padding: 0; display: grid; }
.wallet-log li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wallet-log li:last-child { border-bottom: 0; }
.wallet-log small { display: block; font-size: 12px; }
.wallet-log b { white-space: nowrap; }
.wallet-log b.plus { color: var(--mint-700); }
@media (max-width: 520px) { .wallet-bal b { font-size: 32px; } }
/* Pricing is not in the menus on computers (owner, 2026-10-29); phones keep it */
@media (min-width: 881px) { .no-desk { display: none !important; } }
.sidebar .no-desk { display: none !important; }
.drawer .no-desk { display: flex !important; }
.wallet-use { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.wallet-use input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--mint); flex: none; }
.wallet-use small { display: block; font-size: 13px; margin-top: 2px; }
/* the wallet's topic picker (partials/unlock-topics.php): a drawer on the right, a sheet from the bottom on phones */
.pick-wrap { position: fixed; inset: 0; z-index: 85; background: rgba(2, 5, 15, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pick { position: absolute; inset: 0 0 0 auto; width: min(460px, 100%); background: var(--surface); border-left: 1px solid var(--line-2); padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: drawin .2s ease-out; }
.pick-head { display: flex; gap: 10px; align-items: flex-start; }
.pick-head h2 { font-size: 20px; margin: 0; }
.pick-head p { margin: 4px 0 0; }
.pick-bal { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; }
.pick .searchbox .input { height: 48px; }
.pick-list { flex: 1; min-height: 120px; max-height: none; }
.pick-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.pick-foot .total { font-size: 22px; }
@media (max-width: 640px) {
  .pick { inset: auto 0 0 0; width: 100%; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--line-2); border-radius: 22px 22px 0 0; animation: sheetup .22s ease-out; }
}
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* the drawer's first step: the course's normal price; then "Pay per topic with my wallet" (also under the prices' Pay button) */
.pick-price { flex: 1; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.pick-course { padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.pick-course-h { display: flex; align-items: center; gap: 12px; }
.pick-course-h .course-ic { width: 46px; height: 46px; font-size: 22px; border-radius: 14px; }
.pick-course-h b, .pick-course-h small { display: block; }
.pick-course-h .price { text-align: right; white-space: nowrap; font-size: 18px; }
.pick-course-h .price s { color: var(--muted); font-size: 14px; }
.pick-course .ck-list { margin: 14px 0 0; max-width: none; }
.pick-pay { margin-top: 16px; }
.alt-pay { margin-top: 16px; padding: 14px 16px; border-radius: 16px; border: 1px dashed var(--line-2); }
.pick .alt-pay { margin-top: 0; }
.pick-topics { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.pick-back { align-self: flex-start; padding-left: 0; }
.alt-pay-note { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.page-sub { color: var(--ink-2); font-size: 15px; margin: 4px 0 0; }
.wallet-how { display: inline-block; vertical-align: middle; position: relative; }
.wallet-how summary { list-style: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); display: inline-grid; place-items: center; font: italic 700 12px/1 Georgia, serif; cursor: pointer; user-select: none; }
.wallet-how summary::-webkit-details-marker { display: none; }
.wallet-how[open] summary { border-color: var(--mint); color: var(--mint-700); }
.wallet-how ul { margin: 8px 0 0; padding: 10px 14px 10px 28px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font: 600 13px/1.5 inherit; color: var(--ink-2); text-align: left; min-width: 240px; }
.wallet-how li + li { margin-top: 6px; }
.pay-failed .modal-top { min-height: 0; }
.pay-failed h2 { margin: 0 0 6px; font-size: 22px; }
.pay-failed .pf-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.pay-failed .btn-block + .btn-block { margin-top: 10px; }
/* a moderator's announcement, pinned at the top of the community (Community::ANNOUNCE_MAX) */
.post.post-pin { border-color: rgba(255, 197, 61, .45); box-shadow: 0 0 0 1px rgba(255, 197, 61, .2), var(--shadow); }
/* the community's "new posts" button (app.js community checkNew), floating under the top bar */
.new-pill { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--navy); color: #fff; font: inherit; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-lg); cursor: pointer; white-space: nowrap; }
@media (min-width: 1025px) { .new-pill { left: calc(50% + var(--side-w) / 2); } } /* centred on the page, beside the side menu */

/* Profile → Saved for offline: Re-sync downloads (2026-11-06) */
.off-bar { height: 6px; margin-top: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.off-bar span { display: block; height: 100%; background: var(--green, #2cce78); transition: width .3s; }

/* Challenges (2026-11-06): score posts in the community, the challenge pop-up (/c/<token>), quiz results */
.score-card { display: flex; align-items: center; gap: 14px; margin: 10px 0; padding: 14px 16px; border-radius: 16px; background: var(--green-50); border: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.score-card:hover { border-color: var(--green-700); }
.score-card .sc-go { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--green-700); }
.quiz-early { text-align: center; margin: 18px 0 0; font-size: 14px; }
.quiz-early .link-btn { color: var(--muted); font-weight: 500; }
.score-card .sc-pct { font-size: 30px; font-weight: 800; color: var(--green-700); line-height: 1; }
.score-card .sc-txt { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; }
.score-card .sc-txt small { color: var(--muted); }
.challenge-pop .ch-who { position: relative; width: 72px; margin: 0 auto 10px; }
.challenge-pop .ch-who .avatar { width: 72px; height: 72px; font-size: 28px; }
.challenge-pop .ch-badge { position: absolute; right: -8px; bottom: -4px; font-size: 26px; }
.ch-score { margin: 16px 0 18px; display: flex; flex-direction: column; gap: 2px; }
.ch-score b { font-size: 46px; font-weight: 800; color: var(--gold); line-height: 1; }
.ch-score small { color: var(--muted); font-weight: 700; }
.ch-takers { list-style: none; padding: 0; margin: 14px 0 0; }
.ch-takers li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.ch-takers li b.win { color: var(--green-700); }
.ch-banner { margin: 6px 0 14px; }
.ch-outcome { font-weight: 800; margin: 10px 0 0; }
.ch-outcome.win { color: var(--green-700); }
.ch-share { display: grid; gap: 10px; margin: 16px auto 4px; max-width: 420px; }

/* ---------- phone app (prep_app): the 🔒 page, Delete my account ---------- */
.applock-card { max-width: 520px; margin: 8px auto 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 20px; }
.applock-card h1 { font-size: 22px; line-height: 1.3; color: var(--ink); margin: 4px 0 0; }
.applock-card > p { margin: 0; }
.applock-mail { width: 100%; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; color: var(--ink-2); }
.applock-mail p { margin: 0 0 6px; }
.applock-mail b { color: var(--ink); word-break: break-word; }
.applock-ic { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.delete-account { background: transparent; border-style: dashed; box-shadow: none; }
.delete-open { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.delete-open:hover { color: var(--red-700); }
.delete-account h3 { color: var(--red-700); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 3px 0 #b4233f; }
.btn-danger:hover { filter: brightness(1.08); }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.off-warn { position: relative; z-index: 2; }
.g-native { width: 300px; max-width: 100%; gap: 10px; border-radius: 999px; background: #fff; color: #1f1f1f; border-color: #dadce0; box-shadow: none; }
.g-native:hover { background: #f8f9fa; color: #1f1f1f; }
/* saving courses for offline (views/partials/off-progress.php) */
.off-progress { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: 20px; width: min(420px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.off-progress b { display: block; font-size: 14px; line-height: 1.3; }
.off-progress small { display: block; color: var(--ink-2); font-size: 12.5px; line-height: 1.35; }
.off-progress .off-bar { margin-top: 8px; }
.off-progress-ic { font-size: 22px; line-height: 1; }
.off-progress.is-done { border-color: var(--mint-100); }
.quiz-playing ~ .off-progress, body:has(.quiz-playing) .off-progress { display: none !important; }
@media (max-width: 720px) { .shell-app .off-progress { bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom)); } }

/* the phone app: ask once to turn on study reminders (views/dashboard.php) */
.remind-ask { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.remind-ask .remind-ic { font-size: 1.6rem; line-height: 1; }
.remind-ask p { margin: 4px 0 10px; }

/* the community with no internet (views/community.php): the last posts saved on the phone */
.off-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(246, 163, 0, .14); border: 1px solid rgba(246, 163, 0, .45); font-size: .9rem; line-height: 1.4; }

/* The phone apps (views/layout.php html[data-app]), owner 2026-11-08: the bottom menu was too low to tap easily.
   iPhone: the page fills the screen, so the top bar keeps clear of the notch and the menu of the home bar.
   Both apps: a taller menu with bigger tap areas, never flush with the screen's bottom edge. */
html[data-app] { --tab-h: 70px; }
html[data-app="ios"] .app-top { padding-top: env(safe-area-inset-top); height: calc(68px + env(safe-area-inset-top)); }
@media (max-width: 720px) {
  html[data-app="ios"] .app-top { height: calc(60px + env(safe-area-inset-top)); }
  html[data-app] .tabbar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  html[data-app] .tabbar a { font-size: 12.5px; }
  /* the phone menu everywhere (app, website and PWA; owner 2026-11-08): the items grouped in the middle, the chosen one on
     a soft pill with a thin border */
  /* the chosen item on a soft box with a thin border (as first made, owner 2026-11-08), with room around the items and
     under the menu so it is not pressed against the screen's bottom edge */
  .tabbar { justify-content: center; align-items: center; gap: 6px; padding: 8px 10px max(12px, env(safe-area-inset-bottom)); }
  .shell-app { padding-bottom: calc(var(--tab-h) + 4px + max(12px, env(safe-area-inset-bottom))); }
  .tabbar a { flex: 1 1 0; max-width: 92px; height: calc(var(--tab-h) - 4px); border: 1px solid transparent; border-radius: 16px; transition: background .15s, border-color .15s; }
  .tabbar a[aria-current] { background: var(--navy-50); border-color: var(--navy-100); color: var(--navy-600); }
  html[data-app] .shell-app { padding-bottom: calc(var(--tab-h) + max(10px, env(safe-area-inset-bottom))); }
}

/* Help & support: "How Prep works" (the light bulb moved here from the top bar, owner 2026-11-08) */
.how-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.how-card .how-ic { font-size: 1.5rem; line-height: 1; }
.how-card .grow { display: grid; gap: 2px; }
.how-card .go { font-size: 1.4rem; color: var(--muted); }
/* the top bar (owner 2026-11-16): Get Help!, notifications and ⋮ with everything else */
.app-top-end { display: flex; align-items: center; gap: 4px; flex: none; }
.get-app-top { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; flex: none; margin-right: 2px; }
.get-app-top:hover { background: var(--navy-50); }
.get-app-top:active { opacity: .7; }
.get-app-ic { display: grid; place-items: center; }
.get-app-top svg.store-ic { width: 20px; height: 20px; stroke: none; }
.get-app-top .get-app-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top-more { position: relative; display: inline-flex; }
.top-more-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 230px; display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); }
.top-more-menu > a, .top-more-menu > button { position: relative; display: flex; align-items: center; gap: 10px; font: inherit; font-size: 15px; font-weight: 600; text-align: left; color: var(--ink-2); background: none; border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; text-decoration: none; }
.top-more-menu > a:hover, .top-more-menu > button:hover { background: var(--navy-50); color: var(--ink); }
.top-more-menu .dot { position: static; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-left: auto; }
.top-more-ic { width: 22px; height: 22px; display: grid; place-items: center; flex: none; }
.top-more-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top-more-ic .avatar { width: 22px; height: 22px; font-size: 11px; }
.top-more-stats { display: flex; gap: 8px; padding: 4px 4px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.top-more-stats .chip { flex: 1; justify-content: center; }
.top-more-stats .chip small { font-weight: 600; color: var(--muted); font-size: 12px; white-space: nowrap; }
.top-more-stats .chip { white-space: nowrap; padding: 7px 10px; }
.top-more-stats .chip-xp { display: inline-flex !important; }
/* All pages (the side menu) only where there is neither the sidebar (computers) nor the tab bar (phones) */
.top-more-all { display: none !important; }
@media (min-width: 721px) and (max-width: 1024px) { .top-more-all { display: flex !important; } }

/* the buy page (partials/buy.php): the bundle discounts in one line; bought and free courses tap to say so */
.bundle-tiers { margin: -4px 0 12px; color: var(--muted); }
.bundle-tiers b { color: var(--text, inherit); }
.buy-row.off { cursor: pointer; }

/* exam page (views/exam.php) and the dashboard's "JAMB Study" heading: the 🔍 at the right on phones, opening search for that exam only */
.study-h .exam-search { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: inherit; }
.study-h .exam-search svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.exam-head .exam-search { margin-left: auto; align-self: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: inherit; }
.exam-head .exam-search svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* the exam's full name under "JAMB Study" on its page (views/exam.php) */
.exam-full { margin: -6px 0 18px; font-weight: 600; font-size: 14px; }

/* the phone apps while the keyboard is open (app.js, Capacitor Keyboard): the bottom menu and floating bars step aside */
html.kb-open .tabbar, html.kb-open .tut-float, html.kb-open .voice-bar, html.kb-open .push-bar, html.kb-open .off-progress { display: none !important; }
html.kb-open .shell-app { padding-bottom: 12px !important; }

.ch-reward { margin: 0; font-size: 14px; text-align: left; }

/* Mathematics: tables (Md: "| a | b |" rows) and matrices written inside a sentence or an answer option (span.eq-in) */
.prose .tbl, .tbl { margin: 6px 0 14px; max-width: 100%; overflow-x: auto; }
.tbl table { border-collapse: separate; border-spacing: 0; min-width: 55%; font-size: 16px; font-variant-numeric: tabular-nums; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.tbl th, .tbl td { padding: 9px 16px; text-align: center; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); color: var(--ink); white-space: nowrap; }
.tbl th { background: var(--navy-50); font-weight: 700; }
.tbl tr > :last-child { border-right: 0; }
.tbl tr:last-child > * { border-bottom: 0; }
.tbl th[scope="row"] { text-align: left; }
.eq.eq-in, .prose .eq.eq-in { display: inline-block; vertical-align: middle; margin: 0 2px; padding: 0; background: none; border: 0; border-radius: 0; font-family: inherit; font-size: 1em; white-space: nowrap; overflow: visible; }
.eq.eq-in .katex { color: inherit; font-size: 1.1em; }

/* the general tests (views/test.php, 2026-11-13) */
.test-parts { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.test-parts li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.test-parts li small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.test-parts li > span:last-child { text-align: right; white-space: nowrap; color: var(--muted); font-weight: 700; }
.test-cost { margin: 0 0 14px; font-size: 15px; }
.test-cost small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.test-card .btn { margin-top: 6px; }
.test-parts li > span:first-child { text-align: left; }

.trophy-card { display: flex; align-items: center; gap: 14px; margin: 10px 0; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, #3a2a05, #1c1a10); border: 1px solid #f6a300; color: #fff3d0; }
.trophy-card .tr-cup { font-size: 42px; line-height: 1; }
.trophy-card .tr-txt b { display: block; font-size: 24px; font-weight: 900; color: #ffd36b; }
.trophy-card .tr-txt small { display: block; font-size: 12px; opacity: .85; margin-top: 2px; }
.trophy-card .tr-badge { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: #f6a300; color: #1a1200; font-size: 12px; font-weight: 800; }

/* the single-page app's shell (app.html): the logo while api/boot and the first page load */
/* The splash (app.html .boot-splash, owner 2026-11-28, "a little faster"): Prep's logo pops in (0-0.22 s), then "myprep.ng" is
   typed beside it, a letter every 40 ms (0.2-0.56 s), with a blinking cursor; app.js endSplash keeps it 1 s, then html.splash-out fades it.
   Plain loads (html.booting only): the logo and the name, still, while the app starts. */
.boot-splash { position: fixed; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; pointer-events: none; padding: 24px; }
html.booting .boot-splash { display: flex; }
html.splash .boot-splash { display: flex; z-index: 300; pointer-events: auto; background: radial-gradient(120% 80% at 50% 40%, #0c1a45 0%, var(--bg) 60%); }
html.splash-out .boot-splash { animation: sp-out .25s ease-in forwards; }
.sp-row { display: flex; align-items: center; gap: 14px; }
.sp-mark { width: 64px; height: 64px; border-radius: 18px; background: #fff; display: grid; place-items: center; flex: none;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .75), 0 0 34px -8px rgba(44, 206, 120, .55); }
.sp-mark img { width: 70%; height: 70%; object-fit: contain; }
.sp-word { display: inline-flex; align-items: center; font-size: 38px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.sp-ch.sp-ng { color: var(--mint, #2cce78); }
.sp-caret { display: inline-block; width: 3px; height: 34px; margin-left: 4px; border-radius: 2px; background: var(--mint, #2cce78); opacity: 0; }
html.splash .sp-mark { animation: sp-pop .22s cubic-bezier(.2, 1.4, .4, 1) both; }
html.splash .sp-ch { animation: sp-type .01s linear calc(.2s + var(--i) * .04s) both; }
html.splash .sp-caret { animation: sp-blink .4s steps(1) .2s infinite; }
@keyframes sp-pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sp-type { from { opacity: 0; } to { opacity: 1; } }
@keyframes sp-blink { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes sp-out { to { opacity: 0; visibility: hidden; } }
/* the phone app: everything waits on its first frame until the launch screen has gone (html.splash-go, app.js) */
html.splash:not(.splash-go) .boot-splash, html.splash:not(.splash-go) .boot-splash * { animation-play-state: paused !important; }
@media (max-width: 420px) { .sp-word { font-size: 32px; } .sp-mark { width: 54px; height: 54px; border-radius: 15px; } .sp-caret { height: 28px; } }
@media (prefers-reduced-motion: reduce) {
  html.splash .boot-splash *, html.splash-out .boot-splash { animation: none !important; }
}

.app-top-user { display: contents; }
#view:focus { outline: none; }

/* a page shown from a copy saved on the device (app.html): when it was saved, while the server is asked for a newer one */
.saved-note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.saved-note b { color: var(--ink); font-weight: 700; }
.site-main > .container > .saved-note { margin-top: 16px; }
/* it floats under the header instead of sitting above the page: showing and hiding it ("Updating…" goes when the
   server has answered, a moment after the page is in) used to push the whole page down and back up (2026-11-14 review) */
.saved-note { position: fixed; z-index: 24; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  margin: 0; box-shadow: var(--shadow); animation: note-in .2s ease-out both; }
.site-main > .container > .saved-note { margin-top: 0; }
/* its × (hides it for this visit: app.js $store.ui.hideSaved); a 32px target for a thumb */
.saved-note-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -6px -8px -6px 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
.saved-note-x:hover, .saved-note-x:focus-visible { background: var(--surface-2); color: var(--ink); }
@keyframes note-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* the community with no internet: the same note below the 5 saved posts (pages/community.html) */
.off-end { margin: 4px 0 16px; padding: 10px 14px; border-radius: 12px; background: rgba(246, 163, 0, .14); border: 1px solid rgba(246, 163, 0, .45); font-size: .9rem; line-height: 1.4; text-align: center; }
.off-end b { color: var(--ink); }

/* Moving between pages (app.js leave / skeleton / mount, owner 2026-11-14: smooth, the phone app above all). Only
   transform and opacity move, so the phone's graphics chip runs it even while the page is being built; the header, the
   side menu and the tab bar stay still.
   1. the page on screen slides a little and fades away (.page-out-*);
   2. the new screen slides in at once, as a shimmering skeleton (.page-in-*);
   3. the page is built into that screen hidden (.filling) and fades in over the skeleton (.filled), which fades away
      under it. Back/Forward: 1, then the page itself slides in from the other side. */
#view { position: relative; }
#view.page-pre { opacity: 0; }
#view.page-out-fwd { animation: page-out-left .14s cubic-bezier(.4, 0, 1, 1) both; pointer-events: none; }
#view.page-out-back { animation: page-out-right .14s cubic-bezier(.4, 0, 1, 1) both; pointer-events: none; }
#view.page-in-fwd { animation: page-in-right .28s cubic-bezier(.2, .8, .2, 1) both; }
#view.page-in-back { animation: page-in-left .28s cubic-bezier(.2, .8, .2, 1) both; }
#view.page-fade { animation: page-fade-in .26s ease-out both; }
#view.page-out-fwd, #view.page-out-back, #view.page-in-fwd, #view.page-in-back, #view.page-fade { will-change: transform, opacity; }
/* while it moves, the page's column clips the sideways slide (no sideways scroll; nothing else is laid out again) */
[data-view-slot].view-moving { overflow-x: clip; }
/* 3: the skeleton lies over the top of the screen while the page under it is built, hidden; then they swap by fading */
#view.filling > .skel-page { position: absolute; top: 0; left: 0; right: 0; z-index: 1; pointer-events: none; }
#view.filling > :not(.skel-page) { opacity: 0; }
#view.filled > :not(.skel-page) { opacity: 1; animation: page-fade-in .26s ease-out both; }
#view.filled > .skel-page { animation: skel-out .15s ease-in both; }
@keyframes page-out-left { to { opacity: 0; transform: translate3d(-20px, 0, 0); } }
@keyframes page-out-right { to { opacity: 0; transform: translate3d(20px, 0, 0); } }
@keyframes page-in-right { from { opacity: 0; transform: translate3d(28px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes page-in-left { from { opacity: 0; transform: translate3d(-28px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes page-fade-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
@keyframes skel-out { to { opacity: 0; } }
/* the skeleton: a title and a few cards; the shine is a stripe moving across each block (transform, not a repainted
   background, so it costs nothing per frame) */
.skel { position: relative; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(122, 160, 255, .16) 45%, rgba(44, 206, 120, .12) 55%, transparent 100%);
  transform: translate3d(-100%, 0, 0); animation: skel-shine 1.15s linear infinite; }
@keyframes skel-shine { to { transform: translate3d(100%, 0, 0); } }
.skel-page { padding-top: 6px; }
.skel-title { height: 30px; width: min(380px, 70%); margin-bottom: 12px; border-radius: 12px; }
.skel-line { height: 13px; width: 100%; margin: 10px 0; }
.skel-line.w40 { width: 40%; } .skel-line.w50 { width: 50%; } .skel-line.w60 { width: 60%; } .skel-line.w70 { width: 70%; } .skel-line.w80 { width: 80%; } .skel-line.w85 { width: 85%; }
.skel-card { margin-top: 16px; padding: 18px 20px; }
@media (prefers-reduced-motion: reduce) {
  #view.page-out-fwd, #view.page-out-back, #view.page-in-fwd, #view.page-in-back, #view.page-fade, #view.filled > *, .skel::after { animation: none; }
  #view.page-pre, #view.filling > :not(.skel-page) { opacity: 1; }
}

/* a test needs notifications on (pages/test.html .push-gate) */
.push-gate { margin: 0 0 14px; padding: 16px; border-color: var(--gold); display: grid; gap: 8px; }
.push-gate p { margin: 0; }

/* the voice chooser (app.html .voice-picker) and its buttons next to Listen and in the reading bar */
.voice-picker .sheet { width: min(460px, 100%); max-height: min(80vh, 640px); display: flex; flex-direction: column; padding: 18px; }
.vp-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.vp-list li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 12px; }
.vp-list li.on { background: var(--mint-50); }
.vp-name { flex: 1; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 6px 4px; cursor: pointer; }
.vp-name b { display: block; font-size: 15px; }
.vp-name small { color: var(--muted); font-size: 12px; }
.vp-tick { color: var(--mint); font-weight: 800; }
.vp-play svg { fill: currentColor; stroke: none; }
.vp-more { margin-top: 10px; }
.vp-more summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--navy-600); }
.voice-btn { margin-left: 6px; }
.voice-chip { display: inline-flex; align-items: center; gap: 4px; }
.voice-chip svg, .voice-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }


.card .more-subj { margin-top: 10px; }

.refer-card { cursor: pointer; font: inherit; }
.refer-modal .big-emoji { font-size: 44px; line-height: 1; margin-bottom: 4px; }
.refer-badges { font-size: 34px; letter-spacing: 8px; margin: 6px 0 2px; }

.get-app-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 16px; }
.get-app-card .get-app-ic { font-size: 28px; line-height: 1; }
.get-app-card .grow { display: flex; flex-direction: column; min-width: 140px; flex: 1; }

/* the payment problem page's offer (pages/paid.html) */
.comeback-offer { text-align: left; margin-top: 14px; }

/* the policy pages (pages/privacy.html, terms.html, refunds.html, guidelines.html, delete-account.html) */
.legal { max-width: 760px; }
.legal-body { padding: 22px 24px; }
.legal-body h2 { font-size: 20px; margin: 1.6em 0 .5em; }
.legal-body h2:first-of-type { margin-top: 1.2em; }
/* (the lesson text's own list style, .prose li::before, is switched off here: plain bullets and numbers) */
.legal-body li::before { content: none; display: none; }
.legal-list, .legal-steps { margin: 0 0 1em; padding-left: 24px; }
.legal-body ul.legal-list { list-style: disc; padding-left: 24px; }
.legal-body ol.legal-steps { list-style: decimal; padding-left: 24px; }
.legal-list li, .legal-steps li { margin: 0 0 .5em; padding-left: 4px; }
.legal-links { margin: 18px 4px 0; line-height: 1.9; }
.legal-body .btn { margin-top: 4px; }
.footer-legal { display: block; margin-top: 8px; }
.footer-legal a { color: inherit; opacity: .85; margin-right: 14px; text-decoration: underline; text-underline-offset: 3px; }
.consent { font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; margin: 12px 0 0; }
.consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* the announcement's pencil sits close to its bin (owner 2026-11-15) */
.post-h .icon-btn.post-edit { width: 30px; margin-right: -14px; }

/* unlocking a course, step 1 (partials/unlock-topics.html, owner 2026-11-18): picks on top, total and Continue pinned below */
.pick-price.unlock-step { display: flex; flex-direction: column; gap: 12px; overflow: hidden; min-height: 0; }
.unlock-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 10px; align-content: start; }
.unlock-list .buy-row.on .wallet-tick { background: var(--mint); border-color: var(--mint); }
.add-more { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-style: dashed; }
.btn-link-inline { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--navy-600, inherit); text-decoration: underline; cursor: pointer; }

/* "How would you like to pay?" (partials/pay-how.html, owner 2026-11-18) */
.payhow-wrap { z-index: 90; }
.payhow-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.payhow-total { padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.payhow-total .amt { display: block; font-size: 32px; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.payway { padding: 16px; border-radius: 18px; border: 1.5px solid var(--line-2); display: grid; gap: 8px; }
.payway.best { border-color: var(--mint); background: var(--mint-50); }
.payway-h { display: flex; align-items: center; gap: 10px; }
.payway-h .em { font-size: 24px; }
.payway-h b { flex: 1; font-size: 17px; }
.payway p { margin: 0; font-size: 14px; color: var(--ink-2); }
.payway .tip { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.pay-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: st; }
.pay-steps > li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; counter-increment: st; }
.pay-steps > li::before { content: counter(st); width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: #04210f; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.pay-steps p { margin: 2px 0 8px; font-size: 14px; color: var(--ink-2); }
.acct { text-align: left; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); padding: 4px 12px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.acct-row:last-child { border-bottom: 0; }
.acct-row small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.acct-row b { font-size: 16px; word-break: break-word; }
.acct-row .big { font-size: 22px; letter-spacing: .04em; }
.copy-btn { flex: none; border: 1px solid var(--line-2); background: var(--surface); color: inherit; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.btn-wa { background: #25d366; color: #fff; border-color: #25d366; }
.btn-wa:hover { background: #1ebe5b; color: #fff; }
.pay-steps b + .acct { margin-top: 8px; }
/* /pay/problem: "Do you prefer to pay into our bank account?" under the WhatsApp box (owner, 2026-11-23) */
.pp-bank { text-align: left; margin: 6px 0 10px; }
.pp-bank > .link-btn { font-size: 14px; }
.pp-bank-box { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pp-bank-box p { margin: 0; font-size: 14px; }
.pp-bank-proof { color: var(--ink-2); }

/* no pop-ups while paying (owner, 2026-11-19; app.js payingNow): the unlock drawer and "How would you like to pay?" (.pick-wrap) stay */
body.paying .modal-wrap, body.paying .sheet-wrap, body.paying .push-bar, body.paying .verify-note { display: none !important; }

/* /pay/problem after a cancelled payment: pay now and save (pages/paid.html) */
.deal-price { display: grid; gap: 4px; justify-items: center; margin: 6px 0 14px; padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.deal-price b { font-size: 34px; font-weight: 800; line-height: 1.1; }
.deal-price s { color: var(--muted); }
.deal-help { margin-top: 18px; text-align: left; }
.deal-help summary { cursor: pointer; font-weight: 700; color: var(--ink-2); text-align: center; }
.pay-note { margin: 0 0 12px; font-size: 13px; color: var(--muted); text-align: center; }

.btn-primary:disabled { opacity: .45; filter: grayscale(.8); cursor: not-allowed; }

/* /pay/problem: what happened, one choice (owner, 2026-11-22) */
.pp-reasons { display: grid; gap: 8px; margin: 8px 0 6px; text-align: left; }
.pp-reason { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); color: inherit; font: inherit; font-weight: 700; font-size: 15px; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pp-reason.on { border-color: var(--mint); background: var(--mint-50); color: var(--mint-700); }
.pp-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); }
.pp-reason.on .pp-dot { border-color: var(--mint); box-shadow: inset 0 0 0 4px var(--surface-2); background: var(--mint); }

/* 👍 / 👎 on community replies (owner, 2026-11-23) */
.act.thumb svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.act.thumb:disabled { opacity: .45; cursor: default; }
.act.thumb.up.on { color: var(--mint, #3fe08b); }
.act.thumb.up.on svg { fill: currentColor; fill-opacity: .25; }
.act.thumb.down.on { color: #ff8a8a; }
.act.thumb.down.on svg { fill: currentColor; fill-opacity: .25; }

/* ---------- study groups (pages/groups.html, partials/group-head.html, group-side.html, group-rules.html; owner 2026-11-26) ---------- */
.group-head { display: contents; }
.group-card { display: grid; gap: 12px; margin-bottom: 16px; }
.group-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.group-about { margin: 0; line-height: 1.5; }
.group-week { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.group-week > div { background: var(--surface-2); border-radius: 14px; padding: 10px 8px; text-align: center; }
.group-week b { display: block; font-size: 20px; letter-spacing: -.02em; }
.group-week span { font-size: 12px; color: var(--muted); font-weight: 600; }
.group-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.group-actions .btn { flex: 1 1 auto; }
.group-tabs { width: 100%; }
.group-tabs button { flex: 1; }
.group-join { display: grid; gap: 8px; }
.group-people li { gap: 10px; }
.group-people small { display: block; }
.group-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.group-stats > div { background: var(--surface-2); border-radius: 14px; padding: 10px; display: grid; gap: 2px; }
.group-stats b { font-size: 18px; }
.group-stats small { color: var(--muted); font-size: 12px; font-weight: 600; }
.group-list { display: grid; gap: 10px; margin-top: 14px; }
.group-row { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.group-row .grow { display: grid; gap: 2px; min-width: 0; }
.group-row .go { font-size: 22px; color: var(--muted); }
.group-board li.me { background: var(--navy-50); border-radius: 12px; }
.subj-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.subj-pick .chip { cursor: pointer; border: 1px solid var(--line-2); }
.subj-pick .chip.on { background: var(--green); color: #04150b; border-color: var(--green); font-weight: 800; }
.group-form { max-height: calc(100dvh - 32px); overflow-y: auto; text-align: left; }
.group-form h2 { text-align: center; }
.group-rules { max-height: calc(100dvh - 32px); overflow-y: auto; }
.rules-ok { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-weight: 700; cursor: pointer; }
.rules-ok input { width: 20px; height: 20px; }
.top-more-help { font-weight: 800; }
/* compact group header and its ⋯ menu; the subjects dropdown (owner 2026-11-26) */
.group-card { gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.group-line { display: flex; align-items: center; gap: 8px; }
.group-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.group-facts .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-more { position: relative; flex: none; }
.group-more-menu { right: 0; left: auto; top: calc(100% + 6px); min-width: 230px; }
.group-more-info { display: grid; gap: 2px; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.multi-pick { position: relative; margin-bottom: 6px; }
.multi-btn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; width: 100%; }
.multi-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; max-height: 240px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg); }
.multi-opt { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.multi-opt:hover { background: var(--surface-2); }
.multi-opt input { width: 18px; height: 18px; flex: none; }
/* the group's title row with its menu (owner 2026-11-26) */
.group-title { align-items: flex-start; margin-bottom: 12px; }
.group-title h1 { margin: 0; }
.group-menu-btn { width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.group-menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.group-more-menu button.on { background: var(--navy-50); color: var(--navy-600); font-weight: 800; }
.group-back { display: inline-block; margin: -4px 0 12px; padding: 0; border: 0; background: none; color: var(--navy-600); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.group-online { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.group-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.group-sec-h { margin-bottom: 12px; }
.group-sec-h h3 { margin: 0 0 2px; }
.group-more-note { margin: 0 12px 6px 44px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.group-more-note .link-btn { font-size: 12.5px; }
.how-uses li { display: block; }
.groups-h { align-items: center; }
.groups-h h1 { margin: 0; }
.groups-board { margin-top: 14px; }
.groups-tabs { display: flex; }
.groups-tabs button { flex: 1 1 auto; padding-left: 8px; padding-right: 8px; white-space: nowrap; }

/* study groups, 2026-11-27: green "New group", icons, nicer group cards, search, podium, invite pop-up, documents */
.groups-new { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.groups-new svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.g-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.g-icon.sm { width: 36px; height: 36px; border-radius: 10px; }
.g-icon.lg { width: 52px; height: 52px; border-radius: 16px; }
.g-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gi-tile { width: 100%; height: 100%; display: grid; place-items: center; }
.gi-tile svg { width: 58%; height: 58%; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.group-title { align-items: center; gap: 12px; }
.group-card-row { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; padding: 14px 16px; transition: border-color .15s, transform .15s; }
.group-card-row:hover { border-color: var(--line-2); transform: translateY(-1px); }
.g-main { display: grid; gap: 6px; min-width: 0; }
.g-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.g-name b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-subs { display: flex; flex-wrap: wrap; gap: 4px; }
.g-chip { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2, var(--ink)); }
.g-chip.g-exam { background: var(--navy-50); color: var(--navy-600); }
.g-about { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.g-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.group-card-row .go { font-size: 22px; color: var(--muted); }
.g-view { flex: none; font-size: 13px; font-weight: 800; color: #04220f; background: var(--green); border-radius: 999px; padding: 7px 14px; }
.group-search { display: flex; align-items: center; gap: 8px; position: relative; }
.group-search svg { position: absolute; left: 14px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.group-search .input { padding-left: 40px; }
.group-search small { position: absolute; right: 14px; }
.pod-gi { width: 52px; height: 52px; }
.pod.p1 .pod-gi { width: 64px; height: 64px; box-shadow: 0 0 0 3px #ffd43b; }
.groups-board .list li { gap: 10px; }
.gi-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.gi-opt { aspect-ratio: 1; border-radius: 12px; overflow: hidden; padding: 0; border: 2px solid transparent; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.gi-opt.on { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-50); }
.gi-own svg { width: 45%; height: 45%; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.gi-own img { width: 100%; height: 100%; object-fit: cover; }
.gp-name, .gp-name:hover, .plain-link, .plain-link:hover, .board-name, .board-name:hover { text-decoration: none; }
.gp-name b { color: var(--ink); }
.plain-link { font-weight: 700; }
.gp-tools { position: relative; flex: none; }
.gp-tools .icon-btn svg { fill: currentColor; stroke: none; }
.gp-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; min-width: 200px; display: grid; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; box-shadow: var(--shadow-lg); }
.gp-menu button { text-align: left; padding: 10px 12px; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; border-radius: 8px; cursor: pointer; }
.gp-menu button:hover:not(:disabled) { background: var(--surface-2); }
.gp-menu button:disabled { opacity: .55; cursor: default; }
.gp-menu .danger { color: var(--red, #ef4444); }
.group-join-info { display: grid; gap: 8px; margin-bottom: 4px; }
.invite-pop { text-align: center; }
.invite-perks { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 10px; text-align: left; }
.invite-perks li { display: flex; align-items: flex-start; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.invite-perks b { flex: none; min-width: 64px; color: var(--green-700); font-size: 15px; }
.invite-perks .link-btn { font-size: 14px; }
.doc-chip { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: inherit; text-decoration: none; min-width: 0; }
.doc-chip .grow { display: grid; min-width: 0; }
.doc-chip small { font-size: 12px; }
.doc-chip > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.doc-link:hover { border-color: var(--navy-600); }
.doc-ext { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 800; text-transform: uppercase; color: #fff; background: #2b579a; }
.doc-ext.x-pdf { background: #d93025; }
.checking { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--navy-50); font-size: 14px; }
.checking small { color: var(--muted); }
.spin { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 420px) { .gi-pick { grid-template-columns: repeat(4, 1fr); } .g-icon { width: 42px; height: 42px; } .group-card-row { padding: 12px; gap: 10px; } }
/* the Install video link in the header: phones only, and only its play icon on the narrowest screens */
@media (min-width: 641px) { .install-top { display: none !important; } }
@media (max-width: 400px) { .install-top { padding: 0 7px; } .install-top > span:last-child { display: none; } }
.gi-opt > * { grid-area: 1 / 1; }
.gi-own { position: relative; }
.gi-own > svg { position: absolute; inset: 0; margin: auto; }
/* Affiliate page and Ranks → Payouts (owner 2026-11-27) */
.aff { display: grid; gap: 14px; }
.aff-hero h1 { font-size: 26px; line-height: 1.2; margin: 6px 0 8px; }
.aff-amt { color: var(--green-700); }
.aff-link { display: flex; gap: 8px; margin-top: 14px; }
.aff-link .input { flex: 1; min-width: 0; font-size: 14px; }
.aff-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.aff-share .btn { flex: 1 1 160px; }
.aff-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.aff-stats .card { display: grid; gap: 2px; padding: 14px; margin: 0; }
.aff-stats b { font-size: 22px; letter-spacing: -.02em; }
.aff-stats small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.ok { color: var(--green-700); }
.aff-acct { display: flex; align-items: center; gap: 12px; }
.aff-acct .grow { display: grid; min-width: 0; }
.aff-bank { font-size: 26px; }
.aff-name { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.aff-earn li { gap: 10px; }
.aff-earn .grow { display: grid; min-width: 0; }
.aff-earn-r { display: grid; text-align: right; }
.aff-earn-r small { font-size: 12px; font-weight: 700; }
.aff-me { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; border-color: var(--green); }
.aff-me .grow { display: grid; gap: 2px; }
.aff-me-ic { font-size: 28px; }
.aff-me .go { font-size: 22px; color: var(--muted); }
.pay-total { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 16px; }
.pay-total-n { font-size: 40px; letter-spacing: -.03em; color: var(--green-700); line-height: 1.1; }
.pay-recent li { gap: 10px; }
.pay-recent .grow { min-width: 0; }
.seg-sm button { padding: 6px 10px; font-size: 13px; }
@media (min-width: 720px) { .aff-stats { grid-template-columns: repeat(4, 1fr); } }
.bank-opt { width: 100%; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; }
.bank-opt[aria-selected="true"] { background: var(--navy-50); }
.board-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; } .board-tabs::-webkit-scrollbar { display: none; } .board-tabs a { flex: 0 0 auto; white-space: nowrap; }
/* groups, 2026-11-28: the "+N subjects" button, Eligible, the plain group leaderboard */
.g-subs-btn { border: 1px solid var(--line-2); background: var(--navy-50); color: var(--navy-600); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.g-ok { color: var(--green-700); font-weight: 800; }
.group-top li { gap: 10px; }
.group-top .board-name { display: grid; min-width: 0; text-decoration: none; }
.group-top .board-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-logo { display: grid; place-items: center; width: 22px; height: 22px; }
.os-logo svg { width: 20px; height: 20px; }
.group-host-note { margin: 0; font-size: 14px; color: var(--muted); }
.group-join-info .g-ok { display: block; }
/* the share sheet (owner 2026-11-28): WhatsApp and social media only */
.share-sheet { padding-bottom: 12px; }
.share-h { display: block; text-align: center; margin: 4px 0 14px; font-size: 17px; }
.share-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.share-opt { display: grid; justify-items: center; gap: 6px; text-decoration: none; color: inherit; border: 0; background: none; font: inherit; cursor: pointer; padding: 4px 0; }
.share-opt small { font-size: 12px; font-weight: 700; }
.share-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.share-ic svg { width: 28px; height: 28px; }
.find-bar { display: flex; justify-content: flex-end; }
.find-open { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.find-open svg, .find-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.find-form { display: flex; align-items: center; gap: 8px; width: 100%; }
.find-form .input { flex: 1; min-width: 0; }
.find-go { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.find-x { flex: none; }
.g-join { flex: none; }
.g-joined { flex: none; font-size: 13px; font-weight: 800; color: var(--green-700); }
/* the search opens with a little animation from the Search button (owner 2026-11-28) */
.find-form { transform-origin: right center; animation: findopen .28s cubic-bezier(.2, .8, .2, 1); }
.find-form .input { animation: findfade .35s ease-out; }
@keyframes findopen { from { opacity: 0; transform: scaleX(.35); } to { opacity: 1; transform: none; } }
@keyframes findfade { from { opacity: 0; } to { opacity: 1; } }
/* the group pop-ups (new group, settings, rules) open below the top header, not over it (owner 2026-11-28); they scroll inside */
.modal-wrap:has(> .group-form), .modal-wrap:has(> .group-rules) { align-items: flex-start; padding-top: calc(var(--top-h, 68px) + 12px); padding-bottom: 16px; }
.group-form, .group-rules { max-height: calc(100dvh - var(--top-h, 68px) - 40px); }
@media (max-width: 640px) { .modal-wrap:has(> .group-form), .modal-wrap:has(> .group-rules) { --top-h: 60px; } }
.buy-faq { margin-top: 16px; }
/* Ranks (owner 2026-11-28: "no spacing"): even space between everything on the page and between the Payouts cards */
.ranks-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ranks-page > .share-rank { justify-self: start; max-width: 100%; }
.ranks-page > .page-h, .ranks-page > .notice, .ranks-page > .share-rank { margin-bottom: 0; }
.ranks-page > .card, .ranks-payouts > .card { margin: 0; }
.ranks-payouts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.group-top li { padding-top: 12px; padding-bottom: 12px; }
.g-unseen { flex: none; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--red, #ef4444); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.g-unseen.muted { background: var(--surface-2); color: var(--muted); }
.group-card-row .gp-tools { flex: none; }
.group-card-row .g-name span { font-size: 13px; }
.g-flag { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--muted); flex: none; }
.g-flag svg, .gp-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gp-menu button { display: flex; align-items: center; gap: 10px; }
.gp-ic { display: inline-grid; width: 18px; height: 18px; flex: none; color: var(--muted); }
