:root {
  --navy: #1F3A5F; --teal: #2C7A7B; --ink: #1d2733; --muted: #5b6b7d; --bg: #f4f6fa; --card: #ffffff;
  --eq: #EAF1FB; --hing: #E3F4E8; --hingbar: #2E8B57; --term: #F3EEFB; --termbar: #7E57C2;
  --tip: #FFF6DB; --tipbar: #E0B33A; --exam: #FDECEC; --red: #9B2C2C; --mech: #FFFBF5; --mechbar: #E8C9A0;
  --ans: #EEF6F6; --mark: #FFE873; --grid: #d5deea;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 -apple-system, "Segoe UI", Arial, "Kohinoor Devanagari", "Noto Sans Devanagari", sans-serif;
       color: var(--ink); background: var(--bg); }
a { color: #1F4E9A; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px; }

/* header (desktop: brand + search + link row; phones: app bar + bottom tab bar, see "mobile app" below) */
.top { background: var(--navy); color: #fff; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; position: sticky; top: 0; z-index: 10; }
.appbar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 18px; white-space: nowrap; }
.days { background: rgba(255,255,255,.15); border-radius: 20px; padding: 2px 10px; font-size: 14px; white-space: nowrap; }
.iconbtn { display: none; border: 0; background: none; color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; place-items: center; }
.iconbtn:active { background: rgba(255,255,255,.16); }
svg.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.top nav a { color: #fff; text-decoration: none; padding: 4px 10px; border-radius: 6px; font-size: 15px; background: rgba(255,255,255,.08); }
.top nav a:hover { background: rgba(255,255,255,.22); }
.langbar { background: #fff; border-bottom: 1px solid var(--grid); padding: 6px 16px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.langbar button { border: 1px solid var(--grid); background: #fff; border-radius: 16px; padding: 3px 12px; font-size: 14px; cursor: pointer; color: var(--ink); }
.langbar button.on { background: var(--hingbar); color: #fff; border-color: var(--hingbar); }
.tabbar, .sheet { display: none; }

/* language switching */
.lang-en .box.hing, .lang-en .gl-hing { display: none; }
.lang-hinglish .lang-hindi, .lang-hindi .lang-hinglish { display: none; }
.lang-hindi .box.hing .lang-hindi, .lang-both .box.hing .lang-hindi { font-size: 1.05em; }
.lang-both .box.hing .lang-hindi { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #9fd0b0; }
.gl-hing { display: block; background: var(--hing); color: #1E6B43; border-radius: 4px; padding: 2px 6px; margin-top: 4px; }

/* generic */
h1 { color: var(--navy); font-size: 26px; line-height: 1.25; margin: 8px 0; }
h2 { color: var(--navy); }
.card { background: var(--card); border-radius: 12px; padding: 14px 16px; margin: 12px 0; box-shadow: 0 1px 3px rgba(20,40,80,.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--card); border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(20,40,80,.08); }
.stat b { display: block; font-size: 26px; color: var(--navy); }
.stat span { color: var(--muted); font-size: 13px; }
.btn { display: inline-block; background: var(--navy); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-size: 16px; text-decoration: none; cursor: pointer; margin: 3px 2px; }
.btn.alt { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.btn.green { background: var(--hingbar); }
.btn.small { padding: 5px 10px; font-size: 14px; }
.pill { display: inline-block; border-radius: 12px; padding: 1px 9px; font-size: 13px; background: #e8edf4; color: var(--muted); }
.lv1 { background: #E3F4E8; color: #1E6B43; } .lv2 { background: #FFF1D6; color: #8a5a00; } .lv3 { background: #FDECEC; color: var(--red); }
.muted { color: var(--muted); }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list td, table.list th { border-bottom: 1px solid var(--grid); padding: 6px 4px; text-align: left; vertical-align: top; }

/* suggestions */
.sugg { border-left: 5px solid; border-radius: 8px; background: #fff; padding: 8px 12px; margin: 8px 0; }
.sugg.red { border-color: #C0392B; } .sugg.orange { border-color: #D69E2E; } .sugg.green { border-color: #2F855A; } .sugg.blue { border-color: #1F4E9A; }
.sugg .h { color: #1E6B43; font-size: 14px; }

/* charts */
svg.chart { width: 100%; height: auto; }
svg.chart .cl { font-size: 13px; fill: var(--ink); } svg.chart .cv { font-size: 13px; fill: var(--ink); }
svg.chart .cx { font-size: 11px; fill: var(--muted); text-anchor: middle; } svg.chart .grid { stroke: #e3e8f0; }

/* chapter notes (exported from the PDF builder) */
.notes h1 { text-align: center; }
.notes .subtitle { text-align: center; color: var(--teal); }
.notes h2.sec { background: var(--navy); color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 20px; scroll-margin-top: 110px; }
.notes h3 { color: var(--navy); margin: 18px 0 6px; }
.notes mark { background: var(--mark); padding: 0 2px; border-radius: 2px; }
.notes .box { border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.box.card { background: var(--eq); border-left: 4px solid var(--navy); }
.box.hing { background: var(--hing); border-left: 4px solid var(--hingbar); color: #1E4D33; font-size: 0.96em; }
.box.term { background: var(--term); border-left: 4px solid var(--termbar); }
.box.tip { background: var(--tip); border: 1px solid var(--tipbar); }
.box.exam { background: var(--exam); border-left: 4px solid var(--red); }
.box.info { background: #DCE6F2; }
.box.mech { background: var(--mech); border: 1px solid var(--mechbar); }
.box.answer { background: var(--ans); }
.box p { margin: 4px 0; }
.notes .note { color: #2C5F5F; font-size: 0.95em; }
.notes .eq { font-size: 1.02em; }
.notes .caption { text-align: center; color: #2C5F5F; font-size: 0.9em; }
.notes .q { font-weight: 700; margin-top: 14px; }
.notes details.ans summary { cursor: pointer; color: #1F4E9A; font-size: 15px; padding: 4px 0; }
.notes .fig { margin: 8px auto; }
.notes .fig svg { width: 100%; height: auto; }
.notes .scheme { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; margin: 6px 0; }
.notes .scheme .sc .fig { margin: 0; }
.notes .scheme .sc p { margin: 0; }
.notes .tablewrap { overflow-x: auto; }
.notes table.data { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; }
.notes table.data th { background: #DCE6F2; color: var(--navy); }
.notes table.data td, .notes table.data th { border: 1px solid #c6d3e3; padding: 5px 6px; vertical-align: top; }
.cond { color: #1F4E9A; font-style: italic; font-size: .85em; }
.toc { columns: 2; font-size: 15px; } .toc a { display: block; }
@media (max-width: 600px) { .toc { columns: 1; } body { font-size: 16px; } h1 { font-size: 22px; } }

/* tests */
.qcard { background: #fff; border-radius: 10px; padding: 12px 14px; margin: 12px 0; box-shadow: 0 1px 3px rgba(20,40,80,.08); }
.qcard .meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.qcard label.opt { display: block; border: 1px solid var(--grid); border-radius: 8px; padding: 8px 10px; margin: 6px 0; cursor: pointer; }
.qcard label.opt:has(input:checked) { border-color: var(--navy); background: var(--eq); }
.qcard input[type=text], .qcard textarea, .form input, .form select, .form textarea { width: 100%; font-size: 16px; padding: 8px; border: 1px solid #b9c6d6; border-radius: 8px; }
.ok { color: #2F855A; font-weight: 700; } .bad { color: #C0392B; font-weight: 700; } .pend { color: #8a5a00; font-weight: 700; }
.timer { position: sticky; top: 96px; float: right; background: var(--navy); color: #fff; border-radius: 16px; padding: 2px 12px; font-size: 14px; }
.chk { display: block; padding: 6px 4px; }
.explain { background: var(--ans); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.explain .h { background: var(--hing); color: #1E6B43; border-radius: 6px; padding: 4px 8px; margin-top: 6px; }
.lang-en .explain .h { display: none; }
.big { font-size: 44px; font-weight: 800; color: var(--navy); }
.box.const, .vbox { background: #FFF4E5; border: 2px solid #E07A1F; border-radius: 10px; }
.vbox { padding: 10px 12px; margin: 12px 0; }
.vbox h3, .box.const > p:first-child { color: #B5520F; margin-top: 0; }
.vbox table { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; }
.vbox th { background: #FDE3C4; color: #7a3a08; text-align: left; }
.vbox td, .vbox th { border: 1px solid #f0c79a; padding: 5px 6px; vertical-align: top; }
.vbox mark, .box.const mark { background: var(--mark); }
.vtabs a { display: inline-block; margin: 3px; }

/* ---------- professional site ---------- */
.sbox { flex: 1; min-width: 180px; }
.sbox input { width: 100%; border: 0; border-radius: 18px; padding: 6px 12px; font-size: 15px; }
.top nav a.cta { background: #E0B33A; color: #1d2733; font-weight: 700; }
.flash { background: #FFF6DB; border: 1px solid #E0B33A; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.hero { text-align: center; padding: 26px 8px 10px; }
.hero h1 { font-size: 30px; }
.hero p { font-size: 18px; max-width: 680px; margin: 10px auto; }
.big-btn { font-size: 18px; padding: 12px 22px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.features .card { margin: 0; } .features h3 { margin: 4px 0; color: var(--navy); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.price .amt, .amt { font-size: 38px; font-weight: 800; color: var(--navy); } .amt span { font-size: 15px; color: var(--muted); font-weight: 400; }
.price.best { border: 2px solid var(--navy); }
.narrow { max-width: 520px; margin: 20px auto; }
.planday { border-top: 1px solid #e3e8f0; padding: 6px 0; font-size: 15px; }
.planday b { color: var(--navy); }
.upsell { background: #EAF1FB; border-left: 5px solid var(--navy); }
.legal li { margin: 6px 0; }
.chk.muted { color: #9aa7b6; }
@media (max-width: 600px) { .hero h1 { font-size: 24px; } .hero p { font-size: 16px; } }
/* matrices in question text: [a b; c d] */
.mx { display: inline-block; vertical-align: middle; position: relative; margin: 2px 4px; padding: 1px 6px; }
.mx::before, .mx::after { content: ""; position: absolute; top: 0; bottom: 0; width: 5px; border: 1.5px solid #14213D; }
.mx::before { left: 0; border-right: none; }
.mx::after { right: 0; border-left: none; }
.mx table { border-collapse: separate; border-spacing: 9px 1px; font-family: "Times New Roman", serif; font-size: 1.05em; }
.mx td { text-align: center; padding: 0; }

/* ================= mobile app (phones and small tablets) ================= */
@media (max-width: 760px) {
  :root { --surface: #eef2f7; --shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.07); }
  body { background: var(--surface); font-size: 16px; -webkit-tap-highlight-color: transparent;
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  /* app bar */
  .top { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 0; padding: env(safe-area-inset-top, 0px) 0 0;
    box-shadow: 0 2px 10px rgba(16,33,58,.18); }
  .appbar { height: 54px; padding: 0 6px 0 max(14px, env(safe-area-inset-left, 0px)); }
  .brand { font-size: 17px; flex: 1; overflow: hidden; text-overflow: ellipsis; }
  .days { font-size: 12.5px; }
  .iconbtn { display: grid; flex: none; }
  .top nav.topnav { display: none; }
  .sbox { display: none; padding: 0 12px 10px; min-width: 0; }
  .sbox.open { display: block; }
  .sbox input { padding: 10px 14px; font-size: 16px; }
  /* language chips: one row that scrolls sideways */
  .langbar { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 8px 12px; gap: 6px; background: var(--surface); border: 0; }
  .langbar::-webkit-scrollbar { display: none; }
  .langbar .lb-label { display: none; }
  .langbar button { flex: none; padding: 6px 14px; border-radius: 18px; font-size: 13.5px; font-weight: 600; background: #fff; }
  /* page */
  main { padding: 4px 12px 12px; }
  h1 { font-size: 23px; margin: 6px 4px 10px; }
  main > p.muted, main > .muted { margin-left: 4px; margin-right: 4px; }
  .card, .qcard, .stat { border-radius: 18px; box-shadow: var(--shadow); border: 0; }
  .card { padding: 16px; margin: 12px 0; }
  .card h2 { font-size: 19px; margin: 0 0 8px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .btn { border-radius: 12px; padding: 11px 16px; font-weight: 600; min-height: 44px; }
  .btn.small { min-height: 0; padding: 7px 12px; border-radius: 10px; }
  .flash { border-radius: 14px; }
  .notes h2.sec { border-radius: 14px; scroll-margin-top: 70px; }
  .notes .box { border-radius: 12px; }
  .timer { top: 64px; }
  footer { padding-bottom: 12px; }
  .hero { padding-top: 14px; }
  .features { gap: 10px; }
  /* chapter lists as app rows */
  table.list.stack, table.list.stack tbody, table.list.stack tr, table.list.stack td { display: block; width: auto !important; }
  table.list.stack tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--grid); }
  table.list.stack tr:last-child { border-bottom: 0; }
  table.list.stack td { border: 0; padding: 0; }
  table.list.stack td:first-child { grid-column: 1 / -1; }
  table.list.stack td:first-child a { font-weight: 600; text-decoration: none; color: var(--navy); }
  /* bottom tab bar */
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid rgba(20,40,80,.1); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border: 0; background: none;
    color: var(--muted); font: 600 11px/1.2 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-decoration: none; cursor: pointer; border-radius: 12px; }
  .tabbar .ic { width: 25px; height: 25px; }
  .tabbar .on { color: var(--navy); }
  .tabbar .on .ic { background: var(--eq); border-radius: 12px; width: 52px; padding: 1px 13px; box-sizing: border-box; }
  /* "More" bottom sheet */
  .sheet { position: fixed; inset: 0; z-index: 40; background: rgba(16,33,58,.45); display: flex; align-items: flex-end; }
  .sheet[hidden] { display: none; }
  .sheetbox { background: #fff; width: 100%; border-radius: 22px 22px 0 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 2px;
    animation: sheet-up .22s ease-out; }
  .sheetbox::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--grid); margin: 2px auto 8px; }
  .sheetbox a { display: block; padding: 13px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 16px; }
  .sheetbox a:active { background: var(--surface); }
  .sheetbox a.cta { background: #FFF6DB; font-weight: 700; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .sheetbox { animation: none; } }

/* chapters page: one card per chapter with app-style actions */
.chcard { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid #e3e8f0; }
.chcard:first-of-type { border-top: 0; }
.chcard .chtitle { font-weight: 700; color: var(--navy); }
.chcard .acts, .chcard .tests { display: flex; flex-wrap: wrap; gap: 6px; }
.chcard .acts .btn, .chcard .tests .btn { margin: 0; }
.chcard .tests span { align-self: center; font-size: 14px; color: var(--muted); margin-right: 2px; }
@media (max-width: 760px) {
  .chcard .acts { display: grid; grid-template-columns: 1fr 1fr; }
  .chcard .acts .btn { text-align: center; }
  .chcard .acts .btn.pdf { grid-column: 1 / -1; }
  .chcard .tests { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 6px; }
  .chcard .tests .btn { text-align: center; padding: 8px 4px; font-size: 14px; }
}

/* ================= simple chapter list (Chapters page + dashboard) ================= */
.feedtitle { margin: 18px 4px 4px; color: var(--navy); }
.ctip { margin: 0 4px 6px; font-size: 14px; }
.csub { margin: 18px 4px 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.clist { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); }
.clist.cont { margin: 12px 0; }
.crow { --c: #1F3A5F; display: flex; align-items: center; gap: 14px; padding: 14px 14px; text-decoration: none; color: var(--ink); }
.crowwrap + .crowwrap { border-top: 1px solid #e8edf4; }
.crow:hover, .crow:active { background: #f6f8fb; }
.crow.chem { --c: #1E6B5A; } .crow.phys { --c: #2A55A8; } .crow.math { --c: #5B3A9E; } .crow.eng { --c: #B5520F; }
.cnum { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 17px; }
.cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cmain b { font-size: 16.5px; line-height: 1.3; }
.clabel { font-size: 12px; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .04em; }
.cmeta { font-size: 13px; color: var(--muted); }
.cmeta em { font-style: normal; color: #2F855A; font-weight: 700; }
.cbar { display: block; height: 4px; border-radius: 2px; background: #e6ebf2; margin-top: 4px; overflow: hidden; max-width: 260px; }
.cbar i { display: block; height: 100%; background: #2E8B57; }
.cgo { flex: none; font-size: 26px; color: #a9b6c6; line-height: 1; }
.clist.cont .crow { padding: 16px; }
.clist.cont .cmain b { font-size: 18px; }
@media (min-width: 761px) { main:has(.clist) { max-width: 760px; } }

/* phones show the colourful cards; desktop shows the simple list */
.phone-only { display: none; }
@media (max-width: 760px) { .phone-only { display: block; } .desk-only { display: none; } }

/* ================= news-feed cards (Chapters page + dashboard) ================= */
.feedtitle { margin: 18px 4px 8px; color: var(--navy); }
.fseclabel { margin: 14px 4px 6px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 10px; position: sticky; top: 0; z-index: 2; }
.fchips::-webkit-scrollbar { display: none; }
.fchips button { flex: none; border: 1px solid var(--grid); background: #fff; color: var(--ink); border-radius: 20px; padding: 7px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; }
.fchips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 14px; }
.feed.one { grid-template-columns: 1fr; }
.fsec { grid-column: 1 / -1; margin: 10px 4px -4px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fsec[hidden], .fcard[hidden] { display: none; }
.fcard { --c1: #1F3A5F; --c2: #2C5F8A; background: #fff; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 6px 18px rgba(20,40,80,.08); transition: transform .12s, box-shadow .12s; }
.fcard:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,40,80,.08), 0 10px 26px rgba(20,40,80,.12); }
.fcard.chem { --c1: #1E6B5A; --c2: #2E9B7A; }
.fcard.phys { --c1: #1F3A7A; --c2: #3567B8; }
.fcard.math { --c1: #4B2E83; --c2: #7A55C2; }
.fcard.eng  { --c1: #9A4A12; --c2: #D9792B; }
.fcover { position: relative; display: block; height: 118px; text-decoration: none; color: #fff; overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.18) 0 22px, transparent 23px),
    radial-gradient(circle at 70% 75%, rgba(255,255,255,.10) 0 40px, transparent 41px),
    radial-gradient(circle at 15% 110%, rgba(255,255,255,.08) 0 60px, transparent 61px),
    linear-gradient(135deg, var(--c1), var(--c2)); }
.fnum { position: absolute; right: 14px; bottom: -14px; font-size: 92px; font-weight: 800; line-height: 1; opacity: .28; letter-spacing: -.04em; }
.fsub { position: absolute; left: 14px; top: 14px; background: rgba(255,255,255,.2); border-radius: 12px; padding: 3px 10px; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; }
.ffree { position: absolute; left: 14px; bottom: 14px; background: #FFE873; color: #4a3b00; border-radius: 10px; padding: 2px 9px; font-size: 11.5px; font-weight: 800; }
.ffree.lock { background: rgba(0,0,0,.35); color: #fff; }
.fbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.25); }
.fbar i { display: block; height: 100%; background: #7fe0a8; }
.fbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.fkicker { font-size: 12px; font-weight: 700; color: var(--c2); text-transform: uppercase; letter-spacing: .05em; }
.fhead { margin: 0; font-size: 19px; line-height: 1.25; text-wrap: balance; }
.fhead a { color: var(--ink); text-decoration: none; }
.fmeta { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.facts { display: flex; gap: 6px; margin-top: auto; }
.fbtn { flex: 1; text-align: center; border: 1px solid var(--grid); border-radius: 10px; padding: 8px 4px; font-size: 14px; font-weight: 600;
  color: var(--navy); text-decoration: none; background: #fff; white-space: nowrap; }
.fbtn.main { flex: 1.7; background: var(--c1); border-color: var(--c1); color: #fff; }
.fbtn.icon { flex: .8; }
.fcard.big .fcover { height: 150px; }
.fcard.big .fnum { font-size: 120px; }
.fcard.big .fhead { font-size: 22px; }
@media (max-width: 760px) {
  .feed { grid-template-columns: 1fr; gap: 12px; }
  .fchips { top: calc(54px + env(safe-area-inset-top, 0px)); background: var(--surface); margin: 0 -12px; padding: 6px 12px 10px; }
  .fcover { height: 128px; }
  .fbtn { padding: 10px 4px; }
}

/* ================= chapter topics page ================= */
.thero { position: relative; display: block; margin: 12px 0 18px; border-radius: 22px; overflow: hidden; color: #fff; padding: 22px 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.16) 0 40px, transparent 41px),
    radial-gradient(circle at 75% 95%, rgba(255,255,255,.10) 0 70px, transparent 71px),
    linear-gradient(135deg, var(--c1), var(--c2)); }
.thero:hover { transform: none; }
.thero .fsub { position: static; display: inline-block; }
.thero h1 { color: #fff; font-size: 30px; margin: 10px 0 4px; max-width: 75%; text-wrap: balance; }
.thero p { margin: 0 0 14px; opacity: .9; }
.thero .fnum { font-size: 150px; bottom: -30px; right: 10px; opacity: .14; }
.thero-in { position: relative; z-index: 1; }
.thero-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tbtn { background: rgba(255,255,255,.18); color: #fff; text-decoration: none; border-radius: 12px; padding: 9px 14px; font-weight: 600; font-size: 15px; }
.tbtn.main { background: #fff; color: var(--c1); }
.tring { position: absolute; z-index: 1; right: 18px; top: 18px; width: 74px; height: 74px; border-radius: 50%;
  background: conic-gradient(#7fe0a8 calc(var(--p) * 1%), rgba(255,255,255,.22) 0); display: grid; place-items: center; }
.tring div { width: 58px; height: 58px; border-radius: 50%; background: var(--c1); display: grid; place-items: center; align-content: center; line-height: 1.05; }
.tring b { font-size: 17px; } .tring span { font-size: 10.5px; opacity: .85; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tcard { --k1: #1F3A5F; --k2: #3567B8; display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 6px 18px rgba(20,40,80,.08); transition: transform .12s, box-shadow .12s; }
.tcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,40,80,.08), 0 12px 28px rgba(20,40,80,.14); }
.tcard:active { transform: scale(.985); }
.k-intro { --k1: #44546A; --k2: #6B7F99; } .k-words { --k1: #5B3A9E; --k2: #8A63D2; } .k-values { --k1: #B5520F; --k2: #E58A2E; }
.k-concept { --k1: #1F3A7A; --k2: #3F78C9; } .k-reactions { --k1: #12675A; --k2: #23A08A; } .k-numericals { --k1: #0E5A8A; --k2: #2A8FD0; }
.k-reasons { --k1: #9B2C4B; --k2: #D2557A; } .k-bank { --k1: #2E3A8C; --k2: #5867D6; } .k-check { --k1: #2F7A3E; --k2: #4DB463; }
.tcover { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.16) 0 26px, transparent 27px),
    radial-gradient(circle at 10% 105%, rgba(255,255,255,.10) 0 55px, transparent 56px),
    linear-gradient(140deg, var(--k1), var(--k2)); }
.tno { position: absolute; left: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--k1);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; z-index: 1; }
.tkind { position: absolute; right: 12px; top: 14px; background: rgba(0,0,0,.22); color: #fff; border-radius: 10px; padding: 2px 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; z-index: 1; }
.tthumb { background: #fff; border-radius: 12px; padding: 8px 12px; max-width: 78%; max-height: 104px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.18); transform: rotate(-1.5deg); margin-top: 12px; }
.tthumb > svg { width: 230px; max-width: 100%; height: auto; max-height: 88px; display: block; }
.tthumb .scheme { display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: nowrap; min-width: 0; }
.tthumb .sc { min-width: 0; flex: 0 1 auto; }
.tthumb .sc p { margin: 0; font-size: 13px; }
.tthumb .fig { margin: 0; }
.tthumb .fig svg { width: 100%; height: auto; max-height: 80px; display: block; }
.tglyph { font-size: 64px; font-weight: 800; color: rgba(255,255,255,.9); line-height: 1; text-shadow: 0 4px 18px rgba(0,0,0,.18); }
.tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.25); }
.tbar i { display: block; height: 100%; background: #7fe0a8; }
.tbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tlabel { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--k2); }
.tbody h3 { margin: 0; font-size: 18.5px; line-height: 1.25; color: var(--ink); text-wrap: balance; }
.tdek { margin: 2px 0 0; font-size: 14px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tmeta { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.tgo { margin-left: auto; color: var(--k1); font-size: 14px; }
.tcard.isdone .tgo { color: #2F855A; }
.tcard.isnext { outline: 3px solid #7fe0a8; outline-offset: 2px; }
@media (max-width: 760px) {
  .thero { margin: 8px 0 14px; padding: 18px 16px; }
  .thero h1 { font-size: 25px; max-width: 70%; }
  .tring { width: 64px; height: 64px; right: 14px; top: 14px; } .tring div { width: 50px; height: 50px; }
  .tgrid { grid-template-columns: 1fr; gap: 14px; }
  .tcover { height: 140px; }
}

/* ================= swipe rows (phones): cards slide right → left ================= */
.fsec span { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.frow { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.frow[hidden] { display: none; }
.tswipehead, .tdots, .tswipehint { display: none; }
@media (max-width: 760px) {
  .swipe { position: relative; display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    gap: 12px; margin: 0 -12px; padding: 4px 12px 16px; scroll-padding-left: 12px; -webkit-overflow-scrolling: touch; }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > * { flex: 0 0 86%; scroll-snap-align: start; scroll-snap-stop: always; }
  .frow.swipe > .fcard:only-child { flex-basis: 100%; }
  /* topic deck: one tall card at a time */
  .tgrid.swipe { margin-bottom: 4px; }
  .tgrid.swipe > .tcard { flex-basis: 88%; min-height: 58vh; }
  .tgrid.swipe .tcover { height: 210px; }
  .tgrid.swipe .tthumb { max-width: 86%; max-height: 150px; }
  .tgrid.swipe .tthumb .fig svg, .tgrid.swipe .tthumb > svg { max-height: 120px; }
  .tgrid.swipe .tglyph { font-size: 88px; }
  .tgrid.swipe .tbody h3 { font-size: 22px; }
  .tgrid.swipe .tdek { -webkit-line-clamp: 4; font-size: 15px; }
  .tgrid.swipe .tmeta { font-size: 13.5px; }
  .tgrid.swipe .tgo { background: var(--k1); color: #fff; border-radius: 12px; padding: 8px 14px; }
  .tgrid.swipe .isdone .tgo { background: #2F855A; }
  .tgrid.swipe .tcard.isnext { outline-offset: -3px; }
  .tswipehead { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 4px 6px; color: var(--navy); }
  .tswipehead b { font-size: 18px; } .tswipehead span { font-size: 13px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
  .tdots { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0 0 6px; }
  .tdots i { width: 7px; height: 7px; border-radius: 4px; background: #c7d2e0; transition: width .2s, background .2s; }
  .tdots i.on { width: 20px; background: var(--navy); }
  .tswipehint { display: block; text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
}


/* ================= home dashboard (matches slides + chapter list) ================= */
.hhero { margin: 10px 0 6px; border-radius: 22px; padding: 20px 18px; color: #fff;
  background: radial-gradient(circle at 92% 8%, rgba(255,255,255,.13) 0 46px, transparent 47px),
              radial-gradient(circle at 8% 110%, rgba(255,255,255,.08) 0 70px, transparent 71px), linear-gradient(150deg, #1F3A5F, #2C5F8A);
  box-shadow: 0 6px 20px rgba(16,33,58,.18); }
.hhero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hhi { margin: 0; font-size: 22px; font-weight: 700; }
.hdays { margin: 2px 0 0; opacity: .85; } .hdays b { color: #7fe0a8; }
.hhero .tring { position: static; flex: none; --c1: #234a73; }
.tring { width: 74px; height: 74px; border-radius: 50%; background: conic-gradient(#7fe0a8 calc(var(--p) * 1%), rgba(255,255,255,.22) 0);
  display: grid; place-items: center; }
.tring div { width: 58px; height: 58px; border-radius: 50%; background: var(--c1, #234a73); display: grid; place-items: center; align-content: center; line-height: 1.05; }
.tring b { font-size: 17px; } .tring span { font-size: 10.5px; opacity: .85; }
.hstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.hstats div { background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; }
.hstats b { font-size: 22px; } .hstats span { font-size: 12px; opacity: .8; line-height: 1.2; }
.hbtn { display: block; text-align: center; background: #fff; color: #1F3A5F; border-radius: 14px; padding: 13px 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsec { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 4px 8px; font-size: 13px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hsec a { font-size: 13px; letter-spacing: 0; text-transform: none; text-decoration: none; font-weight: 700; }
.hcard { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); }
.hupsell { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 0; padding: 14px 16px; border-radius: 16px; background: #FFF6DB;
  border: 1px solid #f0d27a; color: #5c4600; text-decoration: none; }
.hupsell span { font-size: 14px; }
.alist { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); }
.arow { display: flex; align-items: center; gap: 12px; padding: 13px 14px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.4; }
.arow + .arow { border-top: 1px solid #e8edf4; }
.arow:hover, .arow:active { background: #f6f8fb; }
.atext { flex: 1; min-width: 0; display: block; }
.atext > b.at { display: block; }
.atext small { display: block; color: var(--muted); font-size: 13px; }
.atext .ahing { color: #1E6B43; }
.lang-en .atext .ahing { display: none; }
.aic { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--eq); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.arow.warn .aic { background: #FFF1D6; }
.aday { flex: none; width: 40px; text-align: center; font-size: 12px; font-weight: 800; color: var(--navy); text-transform: uppercase; line-height: 1.1; }
.aday small { display: block; font-size: 16px; color: var(--ink); }
.adot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #1F4E9A; }
.adot.red { background: #C0392B; } .adot.orange { background: #D69E2E; } .adot.green { background: #2F855A; }
.achip { flex: none; background: var(--eq); color: var(--navy); border-radius: 14px; padding: 5px 11px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ago { flex: none; color: #a9b6c6; font-size: 24px; line-height: 1; }
.ascore { flex: none; min-width: 52px; text-align: center; border-radius: 10px; padding: 6px 4px; font-weight: 800; font-size: 14px; }
.ascore.good { background: #E3F4E8; color: #1E6B43; } .ascore.mid { background: #FFF1D6; color: #8a5a00; } .ascore.low { background: #FDECEC; color: #9B2C2C; }
.hweek { margin-top: 8px; }
.hweek summary { cursor: pointer; color: #1F4E9A; font-weight: 700; font-size: 14px; padding: 6px 4px; }
.hweek .alist { margin-top: 4px; }
@media (min-width: 761px) {
  main:has(.hhero) { max-width: 760px; }
  .hhero { padding: 26px 26px; }
  .hhi { font-size: 26px; }
}

/* chapter rows: "Full notes" next to each row */
.crowwrap { display: flex; align-items: center; }
.crowwrap .crow { flex: 1; min-width: 0; }
.cnotes { flex: none; margin-right: 12px; padding: 6px 12px; border-radius: 14px; background: var(--eq); color: var(--navy); font-size: 13px; font-weight: 700; text-decoration: none; }
.cnotes:hover { background: #dbe6f5; }

/* search bar on the full notes page */
.nsearch { position: sticky; top: 92px; z-index: 5; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 2px 10px rgba(20,40,80,.12); margin: 10px 0; }
.nsearch input { flex: 1; min-width: 0; border: 0; padding: 8px 10px; font-size: 16px; background: transparent; }
.nsearch input:focus { outline: none; }
.nsearch button { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--eq); color: var(--navy); font-size: 16px; font-weight: 700; cursor: pointer; }
.ncount { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
mark.fm { background: #FFE873; border-radius: 3px; }
mark.fm.on { background: #FF9F1C; color: #000; box-shadow: 0 0 0 2px #FF9F1C; }
@media (max-width: 760px) { .nsearch { top: calc(58px + env(safe-area-inset-top, 0px)); } }


/* ================= subjects + topic search ================= */
.backlink { display: inline-block; margin: 12px 4px 0; color: #1F4E9A; text-decoration: none; font-weight: 700; font-size: 14px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 10px 0 18px; }
.stile { --c1: #1F3A5F; --c2: #2C5F8A; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; min-height: 150px;
  padding: 18px; border-radius: 20px; color: #fff; text-decoration: none; justify-content: flex-end;
  background: radial-gradient(circle at 88% 14%, rgba(255,255,255,.14) 0 34px, transparent 35px), linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: 0 6px 18px rgba(16,33,58,.14); transition: transform .12s; }
.stile:hover { transform: translateY(-2px); } .stile:active { transform: scale(.98); }
.stile.chem { --c1: #1E6B5A; --c2: #2E9B7A; } .stile.phys { --c1: #1F3A7A; --c2: #3567B8; }
.stile.math { --c1: #4B2E83; --c2: #7A55C2; } .stile.eng { --c1: #9A4A12; --c2: #D9792B; }
.sglyph { position: absolute; right: 16px; top: 8px; font-size: 64px; font-weight: 800; opacity: .3; line-height: 1; }
.sname { font-size: 24px; font-weight: 800; }
.smeta { font-size: 14px; opacity: .9; }
.sbar { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin-top: 8px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: #7fe0a8; }
.tsearch { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 6px 12px 6px 6px; margin: 0 0 12px;
  box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); }
.tsearch input { flex: 1; min-width: 0; border: 0; padding: 10px; font-size: 16px; background: transparent; }
.tsearch input:focus { outline: none; }
.tmatch { margin: 4px 0 0; font-size: 14px; color: var(--ink); background: #FFFBE6; border-radius: 8px; padding: 6px 8px; }
.tmatch mark { background: #FFE873; border-radius: 3px; }
.tcard[hidden] { display: none; }
@media (max-width: 760px) { .sgrid { grid-template-columns: 1fr 1fr; gap: 12px; } .stile { min-height: 132px; padding: 14px; } .sname { font-size: 20px; } .sglyph { font-size: 52px; } }
@media (min-width: 761px) { main:has(.tgrid) { max-width: 1100px; } main:has(.sgrid) { max-width: 900px; } }

/* ================= topic page: topic blocks with subtopic cards ================= */
.tblocks { display: grid; gap: 18px; margin-bottom: 24px; }
.tblock { --k1: #1F3A5F; --k2: #3567B8; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 6px 18px rgba(20,40,80,.08); }
.tblock[hidden] { display: none; }
.tblock.isnext { outline: 3px solid #7fe0a8; outline-offset: 2px; }
.thead { display: grid; grid-template-columns: 240px 1fr; text-decoration: none; color: var(--ink); }
.thead:hover .tinfo h3 { color: var(--k1); }
.thead .tcover { height: auto; min-height: 150px; }
.tinfo { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tinfo h3 { margin: 0; font-size: 19px; line-height: 1.25; text-wrap: balance; }
.tsolved { align-self: flex-start; background: #E3F4E8; color: #1E6B43; border-radius: 12px; padding: 4px 10px; font-size: 13.5px; font-weight: 800; margin-top: 2px; }
.srow { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 10px; padding: 0 14px 14px; }
.scard { --sc: var(--k1); display: flex; flex-direction: column; gap: 3px; min-height: 104px; padding: 10px 12px; border-radius: 14px; text-decoration: none;
  color: var(--ink); background: #f5f7fb; border: 1px solid #e3e9f2; border-top: 4px solid var(--sc); transition: transform .1s, box-shadow .1s; }
.scard:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(20,40,80,.1); background: #fff; }
.scard:active { transform: scale(.98); }
.scard[hidden] { display: none; }
.scard.s-q { --sc: #2E8B57; } .scard.s-example { --sc: #0E5A8A; } .scard.s-values { --sc: #B5520F; }
.scard.s-quiz { --sc: #9B2C4B; } .scard.s-head { --sc: var(--k2); }
.skind { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sc); }
.skind em { font-style: normal; color: #B5520F; margin-left: 4px; }
.stitle { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scard.s-q .stitle { font-size: 20px; }
.snote { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.smatch { font-size: 12.5px; line-height: 1.35; background: #FFFBE6; border-radius: 6px; padding: 3px 6px; }
.smatch mark { background: #FFE873; }
.sfoot { margin-top: auto; padding-top: 4px; font-size: 12px; font-weight: 700; color: var(--sc); }
@media (max-width: 760px) {
  .thead { grid-template-columns: 1fr; }
  .thead .tcover { min-height: 130px; height: 130px; }
  .tinfo h3 { font-size: 20px; }
  .srow.swipe { display: flex; margin: 0; padding: 0 14px 14px; scroll-padding-left: 14px; gap: 10px; }
  .srow.swipe > .scard { flex: 0 0 44%; scroll-snap-stop: normal; }
  .srow.swipe > .scard.s-q { flex-basis: 36%; }
}
.srowhint { display: none; margin: -4px 16px 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
@media (max-width: 760px) { .srowhint { display: block; } }


/* ================= no sideways page scrolling on phones ================= */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.vbox, .card { max-width: 100%; }
@media (max-width: 760px) {
  .vbox { overflow-x: auto; }
  main table.list:not(.stack) { display: block; overflow-x: auto; }
  html, body { overflow-x: hidden; }
}

/* ================= colourful shortcut tiles ================= */
.qgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.qtile { --a: #1F3A5F; --b: #2C5F8A; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding: 14px 12px 12px;
  border-radius: 18px; color: #fff; text-decoration: none; min-height: 96px; justify-content: flex-end;
  background: radial-gradient(circle at 92% 12%, rgba(255,255,255,.18) 0 22px, transparent 23px), linear-gradient(140deg, var(--a), var(--b));
  box-shadow: 0 4px 14px rgba(16,33,58,.14); transition: transform .12s; }
.qtile:hover { transform: translateY(-2px); } .qtile:active { transform: scale(.97); }
.qtile b { font-size: 16px; } .qtile small { font-size: 12px; opacity: .88; line-height: 1.25; }
.qic { font-size: 22px; line-height: 1; margin-bottom: auto; padding-bottom: 8px; }
.q1 { --a: #1E6B5A; --b: #2E9B7A; } .q2 { --a: #1F3A7A; --b: #3567B8; } .q3 { --a: #4B2E83; --b: #7A55C2; }
.q4 { --a: #B5520F; --b: #E58A2E; } .q5 { --a: #9B2C4B; --b: #D2557A; } .q6 { --a: #0E5A8A; --b: #2A8FD0; }
@media (max-width: 420px) { .qgrid { gap: 8px; } .qtile { min-height: 88px; padding: 12px 10px 10px; } .qtile b { font-size: 14.5px; } .qtile small { font-size: 11px; } }

/* suggestions as colour-coded cards */
.arow.sg { border-left: 5px solid #1F4E9A; }
.arow.sg.red { border-left-color: #C0392B; background: #FFF7F6; } .arow.sg.orange { border-left-color: #D69E2E; background: #FFFBF0; }
.arow.sg.green { border-left-color: #2F855A; background: #F4FBF6; } .arow.sg.blue { border-left-color: #1F4E9A; background: #F5F8FE; }

/* ================= admin: student cards ================= */
.ucards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ucard { background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 6px 18px rgba(20,40,80,.08);
  border-top: 5px solid #D69E2E; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ucard.paid { border-top-color: #2E8B57; }
.utop { display: flex; align-items: center; gap: 10px; min-width: 0; }
.uav { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px; }
.uav.c0 { background: linear-gradient(140deg, #1E6B5A, #2E9B7A); } .uav.c1 { background: linear-gradient(140deg, #1F3A7A, #3567B8); }
.uav.c2 { background: linear-gradient(140deg, #4B2E83, #7A55C2); } .uav.c3 { background: linear-gradient(140deg, #B5520F, #E58A2E); }
.uav.c4 { background: linear-gradient(140deg, #9B2C4B, #D2557A); }
.uname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.uname small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upill { flex: none; border-radius: 12px; padding: 3px 10px; font-size: 12px; font-weight: 800; background: #FFF1D6; color: #8a5a00; }
.ucard.paid .upill { background: #E3F4E8; color: #1E6B43; }
.ustats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ustats div { background: var(--eq); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; }
.ustats b { font-size: 17px; color: var(--navy); } .ustats span { font-size: 11.5px; color: var(--muted); }
.unote { margin: -4px 2px 0; font-size: 13px; color: var(--muted); }
.uacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.uacts .btn { margin: 0; }
.ugrant { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.ugrant input { flex: 1 1 100px; min-width: 0; border: 1px solid var(--grid); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
@media (min-width: 761px) { main:has(.ucards) { max-width: 1000px; } }

/* ================= fun: confetti, +XP pops, toasts ================= */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; width: 100%; height: 100%; }
.xppop { position: fixed; z-index: 101; transform: translate(-50%, 0); font-weight: 900; font-size: 18px; color: #2E8B57; pointer-events: none;
  text-shadow: 0 2px 0 #fff, 0 0 8px #fff; animation: xpup 1.1s ease-out forwards; white-space: nowrap; }
.xppop.xp { color: #B5520F; font-size: 20px; }
@keyframes xpup { from { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); }
  to { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
.xptoast { position: fixed; z-index: 101; left: 50%; top: calc(80px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); background: #1F3A5F; color: #fff;
  padding: 12px 20px; border-radius: 18px; font-size: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toastin .35s ease; white-space: nowrap; transition: opacity .4s; }
.xptoast b { color: #FFE873; }
.xptoast.out { opacity: 0; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -20px) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .xppop, .xptoast { animation: none; } }

/* ================= Speed Round game ================= */
.game { max-width: 620px; margin: 10px auto 20px; }
.gscreen { display: flex; flex-direction: column; gap: 14px; }
.gscreen[hidden] { display: none; }
.ghero { text-align: center; color: #fff; border-radius: 24px; padding: 26px 18px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 10%, rgba(255,255,255,.18) 0 40px, transparent 41px), radial-gradient(circle at 10% 100%, rgba(255,255,255,.1) 0 70px, transparent 71px),
  linear-gradient(140deg, #4B2E83, #9B2C4B 60%, #E58A2E); box-shadow: 0 10px 30px rgba(75,46,131,.3); }
.ghero h1 { color: #fff; margin: 4px 0; font-size: 32px; }
.ghero p { margin: 6px 0 0; opacity: .95; }
.gbolt { font-size: 54px; display: block; animation: wobble 2s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-8deg) scale(1.08); } }
.gbest b, .gbig b { color: #FFE873; }
.gchips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gchips a { padding: 8px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--grid); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.gchips a.on { background: #4B2E83; border-color: #4B2E83; color: #fff; }
.gbtn { display: block; text-align: center; border: 0; border-radius: 18px; padding: 16px; font-size: 19px; font-weight: 800; cursor: pointer; text-decoration: none;
  background: linear-gradient(140deg, #2E8B57, #23A08A); color: #fff; box-shadow: 0 6px 18px rgba(46,139,87,.35); transition: transform .1s; }
.gbtn:active { transform: scale(.97); }
.gbtn.alt { background: #fff; color: var(--navy); box-shadow: none; border: 1px solid var(--grid); font-size: 16px; padding: 13px; }
.gtop { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.gtime { position: relative; height: 34px; border-radius: 17px; background: #e3e9f2; overflow: hidden; }
.gtime i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2E8B57, #7fe0a8); transition: width 1s linear; border-radius: 17px; }
.gtime i.hurry { background: linear-gradient(90deg, #C0392B, #E58A2E); }
.gtime span { position: relative; display: block; text-align: center; line-height: 34px; font-weight: 900; color: #1d2733; }
.gscore { text-align: center; line-height: 1; } .gscore b { display: block; font-size: 26px; color: var(--navy); } .gscore span { font-size: 11px; color: var(--muted); }
.gcombo { min-width: 54px; text-align: center; border-radius: 14px; padding: 8px 10px; font-weight: 900; font-size: 18px; background: #eef2f7; color: var(--muted); transition: all .2s; }
.gcombo.m2 { background: #FFE873; color: #6b4c00; } .gcombo.m3 { background: linear-gradient(140deg, #E58A2E, #D2557A); color: #fff; }
.gcombo.bump { transform: scale(1.25); }
.gfrom { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.gq { background: #fff; border-radius: 20px; padding: 18px; font-size: 19px; font-weight: 650; line-height: 1.45; box-shadow: 0 4px 14px rgba(20,40,80,.08); min-height: 90px; }
.gopts { display: grid; gap: 10px; }
.gopts button { display: flex; gap: 12px; align-items: center; text-align: left; border: 2px solid var(--grid); background: #fff; border-radius: 16px; padding: 14px;
  font-size: 17px; cursor: pointer; color: var(--ink); transition: transform .08s; }
.gopts button:active { transform: scale(.98); }
.gopts button span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #eef2f7; display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.gopts button.right { border-color: #2F855A; background: #E3F4E8; } .gopts button.right span { background: #2F855A; color: #fff; }
.gopts button.wrong { border-color: #C0392B; background: #FDECEC; animation: shake .35s; } .gopts button.wrong span { background: #C0392B; color: #fff; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.gfb { background: #EEF6F6; border-radius: 14px; padding: 12px; font-size: 15px; }
.gbig { margin: 8px 0; } .gbig b { display: block; font-size: 64px; line-height: 1; } .gbig span { opacity: .85; }
.gxp { display: inline-block; background: rgba(255,255,255,.2); border-radius: 14px; padding: 6px 14px; font-weight: 800; }
@media (min-width: 761px) { .gopts { grid-template-columns: 1fr 1fr; } }

/* ================= home: level, streak, goal, badges ================= */
.lvrow { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; }
.lvbadge { flex: none; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(140deg, #FFE873, #E58A2E); color: #4a3200; display: grid; place-items: center;
  font-weight: 900; line-height: 1; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.lvbadge small { display: block; font-size: 9px; letter-spacing: .06em; }
.lvinfo { flex: 1; min-width: 0; } .lvinfo b { font-size: 16px; } .lvinfo span { font-size: 12.5px; opacity: .85; }
.lvbar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; margin-top: 5px; }
.lvbar i { display: block; height: 100%; background: linear-gradient(90deg, #FFE873, #7fe0a8); border-radius: 4px; }
.goalring { flex: none; width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#FFE873 calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.goalring div { width: 64px; height: 64px; border-radius: 50%; background: #234a73; display: grid; place-items: center; align-content: center; line-height: 1.05; text-align: center; }
.goalring b { font-size: 16px; } .goalring span { font-size: 9.5px; opacity: .85; }
.goalring.done { background: conic-gradient(#7fe0a8 100%, transparent 0); }
.bstrip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; }
.bstrip::-webkit-scrollbar { display: none; }
.badge { flex: none; width: 92px; text-align: center; background: #fff; border-radius: 16px; padding: 10px 6px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 12px rgba(20,40,80,.06); }
.badge .bi { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 6px; border-radius: 50%; font-size: 26px;
  background: radial-gradient(circle at 35% 30%, #fff8c9, #FFE873 60%, #E58A2E); box-shadow: 0 3px 8px rgba(229,138,46,.4); }
.badge b { display: block; font-size: 12px; line-height: 1.2; } .badge small { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.2; margin-top: 2px; }
.badge.locked .bi { background: #e8edf4; filter: grayscale(1); opacity: .45; box-shadow: none; }
.badge.locked b { color: var(--muted); }
.qtile.qplay { --a: #4B2E83; --b: #D2557A; }
.qtile.qplay .qic { animation: wobble 2s ease-in-out infinite; display: inline-block; }

/* ================= student home: mission, today, tips, reminders, week ================= */
.mbar { height: 8px; border-radius: 4px; background: #dfe6ef; overflow: hidden; margin: -2px 4px 12px; }
.mbar i { display: block; height: 100%; background: linear-gradient(90deg, #2E8B57, #7fe0a8); border-radius: 4px; transition: width .4s; }
.mtopic { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.mtopic small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.ucard.mtest { border-top-color: #D2557A; }
.ucard.mtest.paid { border-top-color: #2E8B57; }
.ucards.mission .uacts .btn { flex: 1; text-align: center; }
.ucards.mission .uacts form { display: flex; width: 100%; }
.tgrid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tstat { --a: #1F3A5F; --b: #2C5F8A; border-radius: 18px; padding: 14px 12px; color: #fff; display: flex; flex-direction: column; min-height: 84px; justify-content: flex-end;
  background: radial-gradient(circle at 90% 12%, rgba(255,255,255,.18) 0 18px, transparent 19px), linear-gradient(140deg, var(--a), var(--b)); box-shadow: 0 4px 14px rgba(16,33,58,.14); }
.tstat b { font-size: 26px; line-height: 1.1; } .tstat span { font-size: 12px; opacity: .9; }
.tstat.q1 { --a: #1E6B5A; --b: #2E9B7A; } .tstat.q2 { --a: #1F3A7A; --b: #3567B8; } .tstat.q3 { --a: #4B2E83; --b: #7A55C2; } .tstat.q4 { --a: #B5520F; --b: #E58A2E; }
.week7 { margin-top: 10px; }
.w7title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.w7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 120px; align-items: end; }
.w7d { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.w7d i { display: block; width: 70%; min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #7fe0a8, #2E8B57); }
.w7d.today i { background: linear-gradient(180deg, #FFE873, #E58A2E); }
.w7v { font-size: 11px; font-weight: 800; color: var(--navy); min-height: 14px; }
.w7l { font-size: 11px; color: var(--muted); font-weight: 700; }
.ucard.tip { border-top-color: #1F4E9A; }
.ucard.tip.red { border-top-color: #C0392B; } .ucard.tip.orange { border-top-color: #D69E2E; } .ucard.tip.green { border-top-color: #2E8B57; }
.uav.tipav { font-size: 22px; background: linear-gradient(140deg, #1F3A7A, #3567B8); }
.uav.tipav.red { background: linear-gradient(140deg, #9B2C4B, #D2557A); } .uav.tipav.orange { background: linear-gradient(140deg, #B5520F, #E58A2E); }
.uav.tipav.green { background: linear-gradient(140deg, #1E6B5A, #2E9B7A); }
.ttext { font-weight: 600; font-size: 15px; line-height: 1.4; }
.ucard.tip .uname small.ahing { white-space: normal; color: #1E6B43; margin-top: 3px; }
.ucard.tip .utop { align-items: flex-start; }
.ucard.remind { margin-top: 14px; border-top-color: #3567B8; }
.ucard.remind[hidden] { display: none; }
.ucard.remind .uname small { white-space: normal; }
.wkrow { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 10px; }
.wkrow::-webkit-scrollbar { display: none; }
.wk { flex: none; width: 118px; background: #fff; border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 5px;
  box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 12px rgba(20,40,80,.06); border-top: 4px solid #c7d2e0; }
.wk.today { border-top-color: #2E8B57; background: #F4FBF6; }
.wk b { font-size: 15px; } .wk small { font-size: 11.5px; color: var(--muted); margin-top: -4px; }
.wks { border-radius: 10px; padding: 4px 8px; font-size: 12.5px; font-weight: 700; color: #fff; }
.wks.c0 { background: linear-gradient(140deg, #1E6B5A, #2E9B7A); } .wks.c1 { background: linear-gradient(140deg, #1F3A7A, #3567B8); }
.wks.c2 { background: linear-gradient(140deg, #4B2E83, #7A55C2); } .wks.c3 { background: linear-gradient(140deg, #B5520F, #E58A2E); }
.wks.c4 { background: linear-gradient(140deg, #9B2C4B, #D2557A); }
.uav { font-size: 20px; }
@media (max-width: 760px) {
  .tgrid4 { grid-template-columns: 1fr 1fr; }
  .ucards { grid-template-columns: 1fr; }
}
table.daylog td, table.daylog th { text-align: center; } table.daylog td:first-child, table.daylog th:first-child { text-align: left; }
table.daylog tr.zero td { color: #a9b6c6; }

/* ================= landing page (before login) ================= */
.lhero { padding: 26px 20px; }
.lhero h1 { color: #fff; font-size: 32px; line-height: 1.15; margin: 12px 0 8px; text-wrap: balance; text-align: left; }
.lhero p { margin: 0; opacity: .92; font-size: 16.5px; }
.lchip { display: inline-block; background: rgba(255,255,255,.16); border-radius: 14px; padding: 4px 12px; font-size: 12.5px; font-weight: 700; }
.lacts { display: grid; gap: 8px; }
.hbtn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.freefeed { margin-bottom: 4px; }
.lfeat { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lf { --a: #1F3A5F; --b: #2C5F8A; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; color: #fff; min-height: 150px;
  background: radial-gradient(circle at 90% 12%, rgba(255,255,255,.16) 0 24px, transparent 25px), linear-gradient(140deg, var(--a), var(--b));
  box-shadow: 0 4px 14px rgba(16,33,58,.14); }
.lf span { font-size: 28px; } .lf b { font-size: 17px; } .lf small { font-size: 13.5px; opacity: .92; line-height: 1.4; }
.lf.q1 { --a: #1E6B5A; --b: #2E9B7A; } .lf.q2 { --a: #1F3A7A; --b: #3567B8; } .lf.q3 { --a: #4B2E83; --b: #7A55C2; }
.lf.q4 { --a: #B5520F; --b: #E58A2E; } .lf.q5 { --a: #9B2C4B; --b: #D2557A; } .lf.q6 { --a: #0E5A8A; --b: #2A8FD0; }
.lsteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ls { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); }
.ls b { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 18px; background: linear-gradient(140deg, #2E8B57, #23A08A); }
.ls span { font-size: 14px; color: var(--muted); } .ls strong { display: block; color: var(--ink); font-size: 15.5px; }
.lprice { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 8px; padding: 20px; border-radius: 20px; color: #fff;
  background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.16) 0 34px, transparent 35px), linear-gradient(140deg, #4B2E83, #9B2C4B 60%, #E58A2E);
  box-shadow: 0 8px 24px rgba(75,46,131,.25); }
.lprice b { display: block; font-size: 22px; } .lprice span { font-size: 14px; opacity: .92; }
.lprice .hbtn { flex: none; }
@media (min-width: 761px) {
  main:has(.lhero) { max-width: 1000px; }
  .lhero { padding: 36px 34px; } .lhero h1 { font-size: 44px; }
  .lacts { grid-template-columns: auto auto; justify-content: start; }
}
@media (max-width: 760px) {
  .lsteps { grid-template-columns: 1fr; }
  .lprice { flex-direction: column; align-items: stretch; text-align: center; }
  .lfeat { grid-template-columns: 1fr 1fr; gap: 10px; } .lf { min-height: 0; padding: 14px; } .lf small { font-size: 12.5px; }
}
@media (min-width: 761px) { .freefeed { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }

/* ================= colourful page headers (every page) ================= */
.phero { --a: #1F3A5F; --b: #2C5F8A; margin: 12px 0 14px; border-radius: 22px; padding: 20px 18px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.16) 0 42px, transparent 43px), radial-gradient(circle at 6% 110%, rgba(255,255,255,.1) 0 70px, transparent 71px),
  linear-gradient(140deg, var(--a), var(--b)); box-shadow: 0 8px 22px rgba(16,33,58,.18); }
.phero-top { display: flex; align-items: center; gap: 14px; }
.pico { flex: none; width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 28px; }
.ptext { min-width: 0; } .phero h1 { color: #fff; margin: 0; font-size: 26px; line-height: 1.15; text-align: left; } .phero p { margin: 4px 0 0; opacity: .9; font-size: 15px; }
.phero.small { padding: 14px 16px; } .phero.small h1 { font-size: 20px; } .phero.small .pico { width: 44px; height: 44px; font-size: 22px; }
.phero .hstats, .phero .lvrow { margin-bottom: 0; }
.t-green { --a: #1E6B5A; --b: #2E9B7A; } .t-blue { --a: #1F3A7A; --b: #3567B8; } .t-purple { --a: #4B2E83; --b: #7A55C2; }
.t-orange { --a: #B5520F; --b: #E58A2E; } .t-pink { --a: #9B2C4B; --b: #D2557A; } .t-teal { --a: #0E5A8A; --b: #2A8FD0; } .t-navy { --a: #1F3A5F; --b: #2C5F8A; }
.cstripe { border-top: 5px solid #3567B8; border-radius: 18px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 6px 18px rgba(20,40,80,.08); }
.cstripe.c1 { border-top-color: #2E8B57; } .cstripe.c2 { border-top-color: #3567B8; } .cstripe.c3 { border-top-color: #7A55C2; }
.cstripe.c4 { border-top-color: #E58A2E; } .cstripe.c5 { border-top-color: #D2557A; } .cstripe.c6 { border-top-color: #2A8FD0; }
.cstripe h2 { margin-top: 0; }
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 14px; }
.ccards .card { margin: 0; }
.bigstart { display: block; width: 100%; text-align: center; border: 0; border-radius: 18px; padding: 15px; font-size: 18px; font-weight: 800; cursor: pointer; text-decoration: none;
  background: linear-gradient(140deg, #2E8B57, #23A08A); color: #fff; box-shadow: 0 6px 18px rgba(46,139,87,.32); transition: transform .1s; margin: 6px 0; }
.bigstart:active { transform: scale(.98); }

/* ================= take a test: set-up ================= */
.tform { display: flex; flex-direction: column; gap: 10px; }
.tstep { display: flex; align-items: center; gap: 10px; margin: 10px 2px 2px; font-size: 17px; }
.tsn { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 900; background: linear-gradient(140deg, #1F3A7A, #3567B8); }
.chgroup { --c: #1F3A5F; background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); border-left: 5px solid var(--c); }
.chgroup.g-chem { --c: #2E9B7A; } .chgroup.g-phys { --c: #3567B8; } .chgroup.g-math { --c: #7A55C2; } .chgroup.g-eng { --c: #E58A2E; }
.chsub { margin: 0 0 8px; font-weight: 800; color: var(--c); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.chchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.chchip { position: relative; cursor: pointer; }
.chchip input { position: absolute; opacity: 0; }
.chchip span { display: block; border: 2px solid #e3e9f2; border-radius: 14px; padding: 10px 12px; font-size: 15px; line-height: 1.3; background: #f7f9fc; transition: all .12s; }
.chchip span small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.chchip input:checked + span { border-color: var(--c); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.chchip input:checked + span::after { content: "✓"; position: absolute; right: 10px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.chchip input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
.chchip.locked span { opacity: .5; cursor: not-allowed; }
.lvtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lvtile { position: relative; cursor: pointer; }
.lvtile input { position: absolute; opacity: 0; }
.lvtile span { --a: #1F3A5F; --b: #2C5F8A; display: flex; flex-direction: column; justify-content: flex-end; min-height: 84px; padding: 12px; border-radius: 16px; color: #fff;
  background: linear-gradient(140deg, var(--a), var(--b)); opacity: .55; transition: all .12s; }
.lvtile b { font-size: 18px; } .lvtile small { font-size: 12px; opacity: .9; }
.lvtile input:checked + span { opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16,33,58,.25), 0 0 0 3px #fff, 0 0 0 5px var(--a); }
.lvtile input:focus-visible + span { outline: 2px solid #000; }
.lv-mix span { --a: #4B2E83; --b: #D2557A; } .lv-e span { --a: #1E6B5A; --b: #2E9B7A; } .lv-m span { --a: #B5520F; --b: #E58A2E; } .lv-b span { --a: #9B2C2C; --b: #C0392B; }
.cntpills { display: flex; gap: 8px; flex-wrap: wrap; }
.cntpills label { cursor: pointer; } .cntpills input { position: absolute; opacity: 0; }
.cntpills span { display: grid; place-items: center; width: 58px; height: 46px; border-radius: 14px; background: #fff; border: 2px solid #e3e9f2; font-weight: 800; font-size: 17px; }
.cntpills input:checked + span { background: linear-gradient(140deg, #1F3A7A, #3567B8); color: #fff; border-color: transparent; }
.wtoggle { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; margin: 4px 2px; }
.wtoggle input { position: absolute; opacity: 0; }
.wtoggle span { flex: none; width: 44px; height: 26px; border-radius: 13px; background: #cfd8e3; position: relative; transition: background .15s; }
.wtoggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.wtoggle input:checked + span { background: #2E8B57; } .wtoggle input:checked + span::after { left: 21px; }

/* ================= taking a test ================= */
.tbar { position: sticky; top: 92px; z-index: 6; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 8px 12px; margin: 10px 0;
  box-shadow: 0 4px 14px rgba(20,40,80,.12); }
.ttimer { flex: none; font-size: 14px; } .ttimer b { font-variant-numeric: tabular-nums; }
.tprog { flex: 1; height: 10px; border-radius: 5px; background: #e3e9f2; overflow: hidden; }
.tprog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2E8B57, #7fe0a8); border-radius: 5px; transition: width .3s; }
.tcount { flex: none; font-size: 14px; color: var(--muted); } .tcount b { color: var(--navy); font-size: 17px; }
.timer { display: none; }
.qcard.qc { border-radius: 18px; border-left: 5px solid #c7d2e0; padding: 14px; transition: border-color .2s; }
.qcard.qc.done { border-left-color: #2E8B57; }
.qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.qno { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, #1F3A7A, #3567B8); color: #fff; font-weight: 900; font-size: 14px; }
.qc.done .qno { background: linear-gradient(140deg, #1E6B5A, #2E9B7A); }
.qtext { font-size: 17px; font-weight: 600; line-height: 1.45; margin-bottom: 10px; }
.qopts { display: grid; gap: 8px; }
.qcard label.opt { display: flex; gap: 10px; align-items: center; border: 2px solid #e3e9f2; border-radius: 14px; padding: 11px 12px; margin: 0; cursor: pointer; background: #fff; }
.qcard label.opt input { position: absolute; opacity: 0; }
.qcard label.opt .ol { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #eef2f7; display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.qcard label.opt:has(input:checked) { border-color: #3567B8; background: #EAF1FB; }
.qcard label.opt:has(input:checked) .ol { background: #3567B8; color: #fff; }
.qcard label.opt:has(input:focus-visible) { outline: 2px solid #3567B8; outline-offset: 2px; }
.tsubmit { background: #fff; border-radius: 18px; padding: 14px; margin: 14px 0; text-align: center; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); }
.tsubmit p { margin: 0 0 6px; color: var(--muted); font-weight: 600; }
@media (min-width: 761px) { .qopts { grid-template-columns: 1fr 1fr; } }

/* ================= result ================= */
.rhero { --a: #1F3A7A; --b: #3567B8; display: flex; align-items: center; gap: 18px; margin: 12px 0; border-radius: 24px; padding: 20px 18px; color: #fff;
  background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.16) 0 42px, transparent 43px), linear-gradient(140deg, var(--a), var(--b)); box-shadow: 0 8px 24px rgba(16,33,58,.2); }
.rhero.good { --a: #1E6B5A; --b: #2E9B7A; } .rhero.mid { --a: #B5520F; --b: #E58A2E; } .rhero.low { --a: #9B2C4B; --b: #D2557A; }
.rring { flex: none; width: 112px; height: 112px; border-radius: 50%; background: conic-gradient(#FFE873 calc(var(--p) * 1%), rgba(255,255,255,.22) 0); display: grid; place-items: center; }
.rring div { width: 90px; height: 90px; border-radius: 50%; background: var(--a); display: grid; place-items: center; align-content: center; line-height: 1.05; }
.rring b { font-size: 28px; } .rring span { font-size: 11px; opacity: .85; }
.rinfo { min-width: 0; } .rinfo h1 { color: #fff; margin: 8px 0 4px; font-size: 26px; text-align: left; } .rinfo p { margin: 0; opacity: .92; }
.rxp { color: #FFE873; }
.rstats { margin-top: 2px; }
.tstat.q5 { --a: #9B2C4B; --b: #D2557A; }
.qcard.qr { border-radius: 16px; border-left: 5px solid #c7d2e0; }
.qcard.qr.rk-ok { border-left-color: #2E8B57; } .qcard.qr.rk-bad { border-left-color: #C0392B; } .qcard.qr.rk-pend { border-left-color: #D69E2E; }
svg.chart { max-width: 560px; display: block; }
.rbtns { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: center; margin: 16px 0; }
.rbtns .btn { margin: 0; text-align: center; }
@media (max-width: 760px) { .rhero { flex-direction: column; text-align: center; } .rinfo h1 { text-align: center; } .rbtns { grid-template-columns: 1fr 1fr; } .rbtns .bigstart { grid-column: 1 / -1; } }

/* ================= progress ================= */
.w14 { grid-template-columns: repeat(14, 1fr); gap: 4px; }
.wk .wkt { display: block; font-size: 12px; line-height: 1.3; color: var(--ink); text-decoration: none; background: var(--eq); border-radius: 8px; padding: 5px 7px; }
.wk { width: 150px; }
.adel { border: 0; background: none; cursor: pointer; font-size: 16px; padding: 4px; opacity: .55; } .adel:hover { opacity: 1; }
.arow form { display: inline; }
@media (max-width: 760px) { .ccards { grid-template-columns: 1fr; } }

/* ================= values / search / auth / pricing ================= */
.vtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.vt { padding: 9px 16px; border-radius: 20px; color: #fff; font-weight: 800; text-decoration: none; }
.vt.phys, .vsec.phys { background: linear-gradient(140deg, #1F3A7A, #3567B8); } .vt.chem, .vsec.chem { background: linear-gradient(140deg, #1E6B5A, #2E9B7A); }
.vt.math, .vsec.math { background: linear-gradient(140deg, #4B2E83, #7A55C2); }
.vsec { color: #fff !important; border-radius: 16px; padding: 12px 16px; margin: 22px 0 10px; scroll-margin-top: 100px; }
.vbox { border-radius: 16px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.06); }
.psearch { display: flex; gap: 8px; margin-top: 14px; }
.psearch input { flex: 1; min-width: 0; border: 0; border-radius: 14px; padding: 12px 14px; font-size: 16px; }
.psearch button { border: 0; border-radius: 14px; padding: 0 18px; font-weight: 800; background: #FFE873; color: #4a3b00; cursor: pointer; }
.authwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 16px auto; align-items: stretch; }
.authside { --a: #1F3A7A; --b: #3567B8; border-radius: 24px; padding: 24px; color: #fff;
  background: radial-gradient(circle at 90% 10%, rgba(255,255,255,.16) 0 46px, transparent 47px), radial-gradient(circle at 10% 100%, rgba(255,255,255,.1) 0 80px, transparent 81px),
  linear-gradient(140deg, var(--a), var(--b)); box-shadow: 0 8px 24px rgba(16,33,58,.2); }
.authside h1 { color: #fff; margin: 12px 0 6px; text-align: left; } .authside p { opacity: .92; }
.authside ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.authside li { background: rgba(255,255,255,.14); border-radius: 12px; padding: 9px 12px; font-weight: 600; }
.authform { background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 6px 18px rgba(20,40,80,.08); display: flex; flex-direction: column; gap: 4px; }
.authform h2 { margin: 0 0 8px; color: var(--navy); }
.authform label { display: block; font-weight: 600; font-size: 14px; margin: 4px 0; }
.authform input:not([type=checkbox]), .authform select, .ucard.form input { display: block; width: 100%; margin-top: 4px; border: 1.5px solid #d5deea; border-radius: 12px; padding: 11px 12px; font-size: 16px; background: #f7f9fc; }
.authform input:focus, .ucard.form input:focus { outline: none; border-color: #3567B8; background: #fff; }
.authform p { margin: 6px 0; font-size: 14px; }
.authform .chk { font-size: 14px; font-weight: 400; }
.ucard.form p { margin: 0; font-size: 14px; font-weight: 600; }
.prices .price { border-radius: 22px; padding: 22px; position: relative; overflow: hidden; }
.prices .pfree { border-top: 6px solid #2E8B57; }
.prices .pfull { color: #fff; border: 0; background: radial-gradient(circle at 92% 8%, rgba(255,255,255,.16) 0 46px, transparent 47px), linear-gradient(140deg, #4B2E83, #9B2C4B 60%, #E58A2E);
  box-shadow: 0 10px 28px rgba(75,46,131,.3); }
.prices .pfull h2, .prices .pfull .amt { color: #fff; } .prices .pfull .amt span, .prices .pfull .muted { color: rgba(255,255,255,.85); } .prices .pfull a { color: #FFE873; }
.prices .pfull .bigstart { color: #fff; }
.pbest { position: absolute; right: 16px; top: 16px; background: #FFE873; color: #4a3b00; border-radius: 12px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
@media (max-width: 760px) { .authwrap { grid-template-columns: 1fr; } .authside { padding: 18px; } .lvtiles { grid-template-columns: 1fr 1fr; } .tbar { top: calc(58px + env(safe-area-inset-top, 0px)); } }

/* ================= my timetable ================= */
.tcard .tpair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tcard label { font-size: 13px; font-weight: 700; color: var(--muted); }
.tcard input[type=time] { display: block; width: 100%; margin-top: 4px; border: 1.5px solid #d5deea; border-radius: 12px; padding: 10px; font-size: 17px; background: #f7f9fc; font-weight: 700; color: var(--ink); }
.dpills { display: flex; flex-wrap: wrap; gap: 6px; }
.dpills label, .ttsubs label { cursor: pointer; } .dpills input, .ttsubs input { position: absolute; opacity: 0; }
.dpills span { display: inline-block; padding: 6px 10px; border-radius: 12px; background: #eef2f7; font-size: 13px; font-weight: 800; color: var(--muted); }
.dpills input:checked + span { background: linear-gradient(140deg, #1F3A7A, #3567B8); color: #fff; }
.ttgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ttday { background: #fff; border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(20,40,80,.06), 0 4px 12px rgba(20,40,80,.06); }
.ttday small { color: var(--muted); font-size: 12px; }
.ttsubs { display: flex; flex-wrap: wrap; gap: 5px; }
.tts span { display: inline-block; padding: 5px 9px; border-radius: 10px; font-size: 12.5px; font-weight: 700; background: #eef2f7; color: var(--muted); }
.tts.c0 input:checked + span { background: linear-gradient(140deg, #1E6B5A, #2E9B7A); color: #fff; } .tts.c1 input:checked + span { background: linear-gradient(140deg, #1F3A7A, #3567B8); color: #fff; }
.tts.c2 input:checked + span { background: linear-gradient(140deg, #4B2E83, #7A55C2); color: #fff; } .tts.c3 input:checked + span { background: linear-gradient(140deg, #B5520F, #E58A2E); color: #fff; }
.tts.c4 input:checked + span { background: linear-gradient(140deg, #9B2C4B, #D2557A); color: #fff; }
.dpills input:focus-visible + span, .ttsubs input:focus-visible + span { outline: 2px solid #3567B8; outline-offset: 2px; }
.wkline { font-size: 12px; background: var(--eq); border-radius: 8px; padding: 4px 7px; }
.mtimes { margin: -2px 4px 8px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* search: jump to an NCERT question by number */
.exhit { border-radius: 20px; padding: 18px; margin: 4px 0 16px; color: #fff;
  background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.16) 0 40px, transparent 41px), linear-gradient(140deg, #4B2E83, #7A55C2);
  box-shadow: 0 8px 22px rgba(75,46,131,.28); }
.exhit h2 { color: #fff; margin: 10px 0 4px; } .exhit h2 em { font-style: normal; font-size: 14px; color: #FFE873; }
.exnote { margin: 0 0 6px; opacity: .9; font-size: 14px; }
.exq { background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 12px; margin: 6px 0 10px; font-size: 15px; line-height: 1.45; }
.exbtns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .exbtns .bigstart { flex: 1 1 220px; width: auto; }
.exbtns .btn.alt { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }
.exqs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.exqs a { min-width: 46px; text-align: center; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.16); color: #fff; text-decoration: none; font-weight: 800; font-size: 13.5px; }
.exqs a.on { background: #FFE873; color: #4a3b00; }

/* Physical Education (teal) */
.crow.pe { --c: #0F766E; } .fcard.pe { --c1: #0F766E; --c2: #2BB3A3; } .stile.pe { --c1: #0F766E; --c2: #2BB3A3; }
.chgroup.g-pe { --c: #14A098; }
