:root {
  --etea-blue: #0b57b5;
  --etea-blue-dark: #0a4a9a;
  --time-blue: #2c6cb8;
  --card-grey: #f3f3f3;
  --skip-grey: #8f8f8f;
  --result-red: #a3141c;
  --ok-green: #3fae1f;
  --bar-green: #4b8a21;
  --ink: #1d1d1d;
  --muted: #666;
  --line: #e2e2e2;
  --bg: #ffffff;
  --app-bg: #f5f7fb;
  --ahead: #0b3d1f;
  --ahead-green: #4f9a2c;
  --ahead-orange: #f29a1f;
  --ahead-soft: #e9f3e4;
  --right: #1e8e3e;
  --wrong: #c5221f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--app-bg);
  -webkit-tap-highlight-color: transparent;
}
.ur { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; direction: rtl; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

/* ---------- App (AHEAD) screens ---------- */
.app-top {
  background: var(--ahead); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.app-top .mark { width: 40px; height: 43px; flex: none; }
.app-top .ttl { flex: 1; }
.app-top h1 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: .2px; }
.app-top small { display: block; font-weight: 400; opacity: .85; font-size: 12px; }
.app-top .link { background: none; border: 0; color: #fff; text-decoration: underline; font-size: 14px; }
.page { max-width: 640px; margin: 0 auto; padding: 16px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 12px;
}
.card h2 { font-size: 16px; margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.tile {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 12px; color: var(--ink);
}
.tile:active { background: var(--ahead-soft); }
.tile .ico {
  width: 44px; height: 44px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 22px; background: var(--ahead-soft);
}
.tile b { display: block; font-size: 16px; }
.tile span { color: var(--muted); font-size: 13px; }
.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 12px 18px;
  background: var(--ahead); color: #fff; font-weight: 600; font-size: 15px;
}
.btn.block { display: block; width: 100%; }
.btn.ghost { background: #fff; color: var(--ahead); border: 1px solid var(--ahead); }
.btn:disabled { opacity: .45; }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input.f, select.f {
  width: 100%; padding: 12px; border: 1px solid #cfd5dc; border-radius: 10px; background: #fff; font-size: 16px;
}
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid #cfd5dc; background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px;
}
.chip.on { background: var(--ahead); color: #fff; border-color: var(--ahead); }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--wrong); font-size: 14px; min-height: 20px; margin-top: 8px; }
.bars .bar { margin: 8px 0; }
.bars .bar > div:not(.row) { height: 8px; background: #e7ebef; border-radius: 4px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--ahead); }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist td, .hist th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.hist td.n { text-align: right; font-variant-numeric: tabular-nums; }

/* Welcome page */
.wel-hero {
  position: relative; overflow: hidden; color: #fff; text-align: center; padding: 22px 16px 20px;
  background:
    radial-gradient(circle at 85% -10%, rgba(242,154,31,.55) 0, rgba(242,154,31,0) 45%),
    radial-gradient(circle at 0% 110%, rgba(79,154,44,.7) 0, rgba(79,154,44,0) 55%),
    linear-gradient(160deg, #0f5a2c 0%, #0b3d1f 60%, #072914 100%);
}
.logo-card { background: #fff; border-radius: 18px; padding: 10px 14px; display: inline-block; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 340px; width: 88%; }
.logo-card img { width: 100%; height: auto; display: block; }
.wel-hero .org { margin: 14px auto 0; max-width: 460px; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: #cfe8c2; font-weight: 600; }
.wel-hero h1 { font-size: 34px; line-height: 1.1; margin: 8px 0 0; font-weight: 800; letter-spacing: .2px; }
.wel-hero h1 span { color: var(--ahead-orange); }
.wel-hero .pitch { max-width: 460px; margin: 10px auto 0; font-size: 16px; line-height: 1.45; color: #eaf5e4; }
.wel-hero .quote { max-width: 460px; margin: 12px auto 0; font-style: italic; color: #ffd28a; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 480px; margin: 18px auto 0; }
.stats div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 8px 4px; }
.stats b { display: block; font-size: 18px; }
.stats span { font-size: 11px; color: #cfe8c2; }
.wel-tabs { display: flex; max-width: 640px; margin: 0 auto; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.wel-tabs button { flex: 1; background: none; border: 0; padding: 14px; font-weight: 700; font-size: 15px; color: var(--muted); border-bottom: 3px solid transparent; }
.wel-tabs button.on { color: var(--ahead); border-bottom-color: var(--ahead-orange); }
.btn.big { padding: 15px 18px; font-size: 16px; text-align: center; text-decoration: none; background: var(--ahead-orange); color: #fff; box-shadow: 0 4px 12px rgba(242,154,31,.35); }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 4px; }
.feats > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.feats i { font-style: normal; font-size: 22px; }
.feats b { display: block; font-size: 14px; margin-top: 4px; color: var(--ahead); }
.feats span { font-size: 12px; color: var(--muted); }
.about p { margin-top: 8px; line-height: 1.5; color: var(--ink); }
.prongs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; text-align: center; }
.prongs div { background: var(--ahead-soft); border-radius: 10px; padding: 10px 4px; }
.prongs i { font-style: normal; font-size: 22px; display: block; }
.prongs b { font-size: 12px; color: var(--ahead); }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.nums div { background: var(--ahead); color: #fff; border-radius: 12px; padding: 14px 12px; }
.nums b { display: block; font-size: 22px; color: var(--ahead-orange); }
.nums span { font-size: 13px; color: #d9ecd0; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin: 22px 0 8px; line-height: 1.5; }
.hero { background: var(--ahead); color: #fff; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.hero p { margin: 0; font-size: 16px; font-style: italic; }
.goal { display: flex; align-items: center; gap: 12px; margin-top: 12px; background: rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px; }
.goal b { font-size: 32px; color: var(--ahead-orange); }
.goal span { font-size: 14px; }
.goal small { opacity: .8; font-size: 12px; }
.badge { font-style: normal; background: var(--wrong); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 13px; margin-left: 4px; }
.ok { color: var(--right); font-size: 14px; margin: 8px 0 0; }
.bad { color: var(--wrong); font-size: 14px; margin: 8px 0 0; }
.revq { border-top: 1px solid var(--line); padding: 12px 0; }
.revq .ans { color: var(--right); font-weight: 600; margin: 6px 0 2px; }
.card h2 + .f, .card h2 + label { margin-top: 4px; }

/* Scholarships */
.prog { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.schol p { margin: 6px 0 0; color: var(--ink); }
.schol.cur { border: 2px solid var(--ahead-green); }
.schol .btn { margin-top: 12px; }
.soon { font-style: normal; font-size: 12px; background: var(--ahead-orange); color: #fff; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }

/* Teacher review */
.teacher-link { display: block; margin: 18px auto 0; background: none; border: 0; color: var(--ahead); font-weight: 600; font-size: 15px; text-decoration: underline; }
.mini { height: 6px; background: #e7ebef; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.mini i { display: block; height: 100%; background: var(--ahead-green); }
.rep { font-style: normal; color: var(--wrong); }
.rv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rv-top .muted { margin: 0; }
.flag { flex: none; background: #fff; color: var(--wrong); border: 1.5px solid var(--wrong); border-radius: 8px; padding: 6px 10px; font-size: 14px; font-weight: 600; }
.status { border-radius: 8px; padding: 8px 10px; font-size: 14px; margin: 10px 0 0; }
.status.ok { background: #e8f5ec; color: var(--right); }
.status.report { background: #fdecea; color: var(--wrong); }
.ok-btn { background: var(--right); }
textarea.f { width: 100%; padding: 12px; border: 1px solid #cfd5dc; border-radius: 10px; font: inherit; font-size: 15px; }

.note { background: #fff4e0; color: #8a5300; border-radius: 8px; padding: 8px 10px; font-size: 14px; margin: 10px 0 0; }

.popt .ur, .explain .ur, .revq .ur { display: block; text-align: right; font-size: 18px; line-height: 2; }

/* Practice */
.pq { font-size: 17px; line-height: 1.5; margin: 4px 0 14px; }
.popt {
  display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid #cfd5dc;
  border-radius: 10px; padding: 13px 14px; margin-bottom: 10px; font-size: 16px; color: var(--ink);
}
.popt.right { border-color: var(--right); background: #e8f5ec; }
.popt.wrong { border-color: var(--wrong); background: #fdecea; }
.explain { background: #fff8e1; border-radius: 10px; padding: 12px; font-size: 14px; margin: 6px 0 14px; }

/* ---------- ETEA-style exam screens ---------- */
.ex { min-height: 100vh; background: #fff; display: flex; flex-direction: column; }
.ex-head {
  background: linear-gradient(180deg, var(--etea-blue) 0%, var(--etea-blue-dark) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 16px; min-height: 72px;
}
.ex-head .seal {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; flex: none; overflow: hidden;
  display: grid; place-items: center;
}
.ex-head .seal img { width: 46px; height: auto; }
.ex-head .t1 { font-size: 16px; font-weight: 600; }
.ex-head .t2, .ex-head .t3 { font-size: 12px; opacity: .95; }
.ex-body { flex: 1; display: grid; grid-template-columns: 250px 1fr 260px; gap: 12px; padding: 0 16px 16px; }
.ex-times {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center;
  padding: 14px 0 8px; color: var(--time-blue); font-size: 18px;
}
.ex-times .rem { text-align: center; }
.ex-times .comp { justify-self: end; display: flex; align-items: center; gap: 10px; color: #333; font-size: 16px; }
.pbar { width: 170px; height: 22px; background: #cfd6de; position: relative; }
.pbar i { position: absolute; inset: 0 auto 0 0; background: var(--etea-blue); }
.pbar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: #333; }
.cand { border: 1px solid #eee; border-radius: 6px; padding: 16px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); align-self: start; }
.cand .av { width: 150px; height: 150px; margin: 0 auto 26px; display: block; }
.cand dt { font-weight: 700; font-size: 15px; margin-top: 14px; }
.cand dd { margin: 8px 0 0; color: #555; font-size: 14px; }
.qcard { background: var(--card-grey); border-radius: 6px; padding: 26px 24px; min-height: 480px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.qcard .qno { text-align: center; font-size: 26px; margin-bottom: 14px; }
.qcard .qtext { text-align: center; font-size: 20px; line-height: 1.55; margin: 0 auto 30px; max-width: 760px; }
.qcard .qtext.ur, .opts .ur { font-size: 22px; }
.opts { display: flex; flex-direction: column; gap: 20px; padding-left: 8px; }
.opt { display: flex; align-items: center; gap: 14px; font-size: 18px; cursor: pointer; }
.opt input { width: 24px; height: 24px; margin: 0; accent-color: #2f7cf6; flex: none; }
.skp { border: 1px solid #eee; border-radius: 6px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); align-self: start; min-height: 480px; }
.skp h3 { text-align: center; margin: 0 0 14px; font-size: 19px; }
.skp .circles { display: flex; flex-wrap: wrap; gap: 10px; }
.skp .circles button {
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--skip-grey); color: #fff; font-size: 15px;
}
.ex-actions { display: flex; justify-content: center; gap: 22px; padding: 18px 16px 26px; background: #fff; }
.b-skip { background: #1557b0; color: #fff; border: 0; border-radius: 3px; width: 160px; height: 46px; font-size: 20px; font-weight: 600; box-shadow: 0 2px 3px rgba(0,0,0,.25); }
.b-save { background: #fff; color: #1557b0; border: 1.5px solid #b9b9b9; border-radius: 3px; width: 160px; height: 46px; font-size: 20px; font-weight: 600; box-shadow: 0 2px 3px rgba(0,0,0,.18); }
.b-save:disabled { color: #8aa7d3; }

/* Candidate details (امیدوار کی معلومات) */
.det { flex: 1; padding: 10px 24px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }
.det h2 { text-align: center; font-size: 30px; margin: 10px 0 30px; font-weight: 600; }
.det .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; }
.det .fld {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 26px 18px; box-shadow: 0 0 8px rgba(0,0,0,.06); font-size: 19px; min-height: 90px;
}
.det .fld .tick { color: #e52d1d; font-size: 38px; line-height: 1; margin-right: auto; margin-left: 30px; }
.det .fld .ur { font-size: 22px; }
.green {
  display: block; margin: 50px auto 0; background: var(--ok-green); color: #fff; border: 0;
  width: 210px; height: 52px; font-size: 22px;
}
.count { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 20px; text-align: center; }
.count .ur { font-size: 28px; }
.count .num { font-size: 64px; font-weight: 700; }

/* Result card */
.rc { flex: 1; background: #e9ecef; padding: 0 0 20px; }
.rc h2 { text-align: center; color: var(--result-red); font-size: 40px; margin: 0; padding: 14px 0; border-bottom: 1px solid #d0d4d8; }
.rc .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 60px; padding: 16px 36px; }
.rc label { display: block; font-weight: 700; font-size: 17px; margin: 10px 0 8px; }
.rc .box { background: #fff; padding: 22px 12px; font-size: 18px; }
.rc .box.blue { background: var(--etea-blue); color: #fff; }
.rc .done { display: block; width: 60%; margin: 10px auto 0; background: var(--bar-green); color: #fff; text-align: center; font-size: 26px; padding: 14px; }
.rc .after { text-align: center; margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Phone layout ---------- */
@media (max-width: 820px) {
  .ex-head { min-height: 58px; padding: 8px 12px; justify-content: flex-start; }
  .ex-head .seal { width: 42px; height: 42px; }
  .ex-head .seal img { width: 34px; }
  .ex-head .t1 { font-size: 13px; }
  .ex-head .t2 { font-size: 11px; }
  .ex-head .t3 { display: none; }
  .ex-body { grid-template-columns: 1fr; gap: 10px; padding: 0 12px 12px; }
  .ex-times { grid-template-columns: 1fr 1fr; font-size: 14px; padding: 10px 0 2px; row-gap: 8px; }
  .ex-times .rem { text-align: right; }
  .ex-times .comp { grid-column: 1 / -1; justify-self: stretch; font-size: 13px; }
  .pbar { flex: 1; height: 16px; }
  .cand { display: flex; align-items: center; gap: 12px; padding: 8px 10px; order: -1; }
  .cand .av { width: 40px; height: 40px; margin: 0; }
  .cand dl { display: flex; gap: 14px; margin: 0; font-size: 13px; }
  .cand dt { margin: 0; font-size: 11px; color: var(--muted); font-weight: 600; }
  .cand dd { margin: 0; font-size: 13px; color: var(--ink); }
  .cand .hide-sm { display: none; }
  .qcard { min-height: 0; padding: 16px 14px 20px; }
  .qcard .qno { font-size: 18px; margin-bottom: 10px; }
  .qcard .qtext { font-size: 17px; margin-bottom: 20px; }
  .opts { gap: 16px; padding-left: 0; }
  .opt { font-size: 16px; padding: 4px 0; }
  .skp { min-height: 0; padding: 10px 12px; }
  .skp h3 { font-size: 15px; text-align: left; margin-bottom: 8px; }
  .skp .circles button { width: 38px; height: 38px; font-size: 13px; }
  .ex-actions { position: sticky; bottom: 0; padding: 12px; gap: 12px; box-shadow: 0 -2px 6px rgba(0,0,0,.08); }
  .b-skip, .b-save { flex: 1; width: auto; font-size: 17px; }
  .det { padding: 10px 14px 20px; }
  .det h2 { font-size: 22px; margin: 6px 0 16px; }
  .det .grid { grid-template-columns: 1fr; gap: 12px; }
  .det .fld { padding: 14px; min-height: 0; font-size: 16px; }
  .det .fld .tick { font-size: 26px; margin-left: 14px; }
  .det .fld .ur { font-size: 17px; }
  .green { margin-top: 26px; }
  .count .ur { font-size: 20px; }
  .rc h2 { font-size: 28px; }
  .rc .grid { grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 8px 12px; }
  .rc label { font-size: 13px; }
  .rc .box { padding: 12px 10px; font-size: 16px; }
  .rc .done { width: auto; margin: 10px 12px 0; font-size: 18px; }
}

/* Other admissions */
.adm-head { margin: 22px 0 4px; font-size: 18px; color: var(--ahead); }
.adm-tag { font-style: normal; font-size: 12px; background: var(--ahead-green); color: #fff; border-radius: 999px; padding: 2px 8px; vertical-align: middle; white-space: nowrap; }
.adm-tag.hot { background: var(--ahead-orange); }
.adm-tag.shut { background: #999; }
.adm.past { opacity: .6; }
.fits { color: var(--ahead); font-weight: 600; }

/* Today's 20, starting test, on-track */
.tile.today { border: 2px solid var(--ahead-orange); }
.tile.today.done { border-color: var(--ahead-green); }
.tile.first { border: 2px dashed var(--ahead-green); }
.tile .week { display: block; margin-top: 4px; font-size: 12px; color: var(--ahead-green); font-weight: 600; }
.hero .last { margin: 10px 0 0; font-size: 14px; font-style: normal; }
.track { display: flex; align-items: center; gap: 14px; background: #fff4e5; border-radius: 12px; padding: 12px; }
.track.on { background: #e8f5ec; }
.track b { font-size: 40px; color: var(--ahead); line-height: 1; }
.track span { font-size: 14px; }
.trend { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 14px; }
.trend div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: 11px; }
.trend i { display: block; width: 100%; background: var(--ahead-green); border-radius: 4px 4px 0 0; }
.list { margin: 6px 0 0; padding-left: 20px; }
.list li { margin: 6px 0; }
.list .ur { display: inline; font-weight: 600; }
.bars .row span:last-child { text-align: right; }

/* Laptop / desktop: welcome splits into two halves, home tiles two per row */
@media (min-width: 900px) {
  .wel { display: grid; grid-template-columns: minmax(420px, 1.1fr) 1fr; min-height: 100vh; }
  .wel-hero { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 48px; }
  .stats { width: 100%; }
  .wel-hero h1 { font-size: 48px; }
  .wel-hero .pitch { font-size: 18px; }
  .logo-card { max-width: 380px; }
  .wel-right { background: var(--app-bg); }
  .wel-right .page { max-width: 560px; padding: 24px 28px; }
  .wel-tabs { max-width: none; }
  .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .tiles .tile { margin-bottom: 0; height: 100%; }
  .page.wide { max-width: 860px; }
}

/* Donation */
.give { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; padding: 14px; border-radius: 14px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, #fff4e5, #ffe7c2); border: 1px solid #f6cf8f; }
.give-ico { font-size: 26px; flex: none; }
.give b { display: block; color: var(--ahead); font-size: 15px; margin-bottom: 2px; }
.give span:nth-child(2) { font-size: 13px; line-height: 1.4; color: #5a4a2f; }
.give-go { flex: none; background: var(--ahead-orange); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 999px; }
.give-card { border: 2px solid #f6cf8f; background: #fffaf2; }
.give-card .btn { margin-top: 12px; }
.give-card .muted { margin-top: 8px; }
.row.dob { gap: 8px; }
.row.dob select.f { padding: 12px 6px; }

/* Waiting for approval, admin */
.wait { text-align: center; padding: 24px 16px; }
.wait .big-ico { font-size: 48px; }
.wait h2 { margin-top: 8px; }
.wait p { margin-top: 8px; }
.adm-row h2 .muted { font-weight: 400; margin-left: 6px; }
.adm-row p { margin-top: 4px; color: var(--ink); }
.adm-nums b { font-size: 26px; }
.foot a { color: var(--muted); }

/* =====================================================================
   Polish layer (Oct 2026): one icon set, softer cards, clearer hierarchy
   ===================================================================== */
:root {
  --app-bg: #f3f6f1;
  --line: #e4e9e1;
  --muted: #5f6b62;
  --shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 4px 14px rgba(16, 40, 24, .06);
  --shadow-up: 0 2px 4px rgba(16, 40, 24, .08), 0 10px 24px rgba(16, 40, 24, .10);
}
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
.i { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.center { text-align: center; }

/* top bar */
.app-top { position: sticky; top: 0; z-index: 5; background: linear-gradient(135deg, #0f5a2c, #0b3d1f 70%); padding: 10px 14px; min-height: 60px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.app-top .mark { width: 34px; height: 37px; border-radius: 8px; }
.app-top h1 { font-size: 18px; }
.nav-back { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; flex: none; }
.nav-back:active { background: rgba(255,255,255,.25); }

/* cards and tiles */
.card { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.tile { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); transition: transform .08s, box-shadow .15s; }
.tile:active, .sq:active, .cta:active { transform: scale(.985); }
.tile > div:not(.ico) { flex: 1; min-width: 0; }
.tile .chev, .cta .chev { width: 20px; height: 20px; color: #a3ada5; }
.tile.alert { border: 2px solid var(--ahead-orange); }
.tile.first { border: 2px dashed var(--ahead-green); background: #fbfdf9; }
.ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.ico .i { width: 24px; height: 24px; }
.t-green { background: #e6f3df; color: #2e7a1c; }
.t-orange { background: #fff0d9; color: #c46a00; }
.t-blue { background: #e2edfc; color: #1c5cbd; }
.t-purple { background: #eee7fb; color: #6a3dbf; }
.t-red { background: #fde6e4; color: #c0281f; }

/* buttons */
.btn { border-radius: 14px; padding: 13px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.block { display: flex; }
.btn.go { background: linear-gradient(135deg, #17763a, #0b3d1f); box-shadow: 0 4px 12px rgba(11,61,31,.25); padding: 15px; font-size: 16px; }
.btn .i { width: 20px; height: 20px; }
.btn.ghost { border-width: 1.5px; }
input.f, select.f, textarea.f { border-radius: 12px; border: 1.5px solid #d5ddd3; transition: border-color .15s, box-shadow .15s; }
input.f:focus, select.f:focus, textarea.f:focus { outline: none; border-color: var(--ahead-green); box-shadow: 0 0 0 3px rgba(79,154,44,.18); }
input.pin { letter-spacing: 10px; font-size: 22px; text-align: center; }
.chip { border-radius: 999px; border: 1.5px solid #d5ddd3; transition: background .15s; }

/* home */
.hero2 { background: radial-gradient(circle at 100% 0, rgba(242,154,31,.35), transparent 45%), linear-gradient(150deg, #13643a, #0b3d1f 65%); color: #fff; border-radius: 20px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-up); }
.hello { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--ahead-orange); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 17px; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.who { flex: 1; min-width: 0; }
.who small { display: block; color: #cfe8c2; font-size: 13px; }
.who b { display: block; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero2 .prog { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.hero2 .prog .i { width: 16px; height: 16px; }
.hero2 .quote { margin: 12px 0 0; font-style: italic; color: #ffd28a; font-size: 15px; }
.goal2 { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 12px; margin-top: 12px; }
.g-top { display: flex; justify-content: space-between; align-items: baseline; }
.g-top span { color: #cfe8c2; font-size: 13px; }
.g-top b { font-size: 28px; color: var(--ahead-orange); }
.g-top small { font-size: 14px; color: #cfe8c2; }
.g-bar { height: 8px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.g-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f6b24c, #f29a1f); border-radius: 99px; }
.goal2 p { margin: 4px 0 0; font-size: 13px; color: #e5f2de; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mini-stats div { background: rgba(0,0,0,.14); border-radius: 12px; padding: 8px; text-align: center; }
.mini-stats b { display: block; font-size: 20px; }
.mini-stats small { font-size: 12px; opacity: .75; }
.mini-stats span { font-size: 11px; color: #cfe8c2; }
.cta { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 0; border-radius: 18px; padding: 16px; margin-bottom: 12px; color: #fff; background: linear-gradient(135deg, #f6a93a, #ef8a12); box-shadow: 0 6px 18px rgba(239,138,18,.35); transition: transform .08s; }
.cta.done { background: linear-gradient(135deg, #3b9a3a, #1f7a35); box-shadow: 0 6px 18px rgba(31,122,53,.3); }
.cta-ico { width: 50px; height: 50px; border-radius: 16px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.cta-ico .i { width: 28px; height: 28px; }
.cta > div:nth-child(2) { flex: 1; }
.cta b { display: block; font-size: 18px; }
.cta span { font-size: 13px; opacity: .95; }
.cta .chev { color: rgba(255,255,255,.85); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.sq { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); color: var(--ink); min-height: 118px; transition: transform .08s; }
.sq .ico { margin-bottom: 6px; }
.sq b { font-size: 15px; }
.sq span { font-size: 12px; color: var(--muted); }
.give.slim { margin: 14px 0 6px; }

/* question screen */
.qprog { height: 6px; background: #dfe7dc; border-radius: 99px; overflow: hidden; margin: 2px 0 12px; }
.qprog i { display: block; height: 100%; background: linear-gradient(90deg, #4f9a2c, #17763a); border-radius: 99px; transition: width .3s; }
.qmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.pill { background: var(--ahead); color: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.qchap { flex: 1; min-width: 0; }
.qdiff { border-radius: 999px; padding: 3px 9px; font-weight: 700; }
.qdiff.d1 { background: #e6f3df; color: #2e7a1c; }
.qdiff.d2 { background: #fff0d9; color: #b56200; }
.qdiff.d3 { background: #fde6e4; color: #b3261e; }
.qbox { padding: 18px 16px; }
.qbox .pq { font-size: 18px; line-height: 1.5; font-weight: 600; margin-bottom: 14px; color: #17231a; }
.popt { display: flex !important; align-items: center; gap: 12px; text-align: left; border-radius: 14px !important; padding: 12px !important; border: 1.5px solid #dbe3d8 !important; background: #fff; transition: border-color .15s, background .15s; }
.popt:not(:disabled):active { background: var(--ahead-soft); }
.popt .letter { width: 32px; height: 32px; border-radius: 10px; background: #eef2ec; color: #44524a; font-weight: 800; display: grid; place-items: center; flex: none; font-size: 14px; }
.popt .letter .i { width: 18px; height: 18px; }
.popt .otext { flex: 1; font-size: 16px; }
.popt.right { border-color: #2e9e4a !important; background: #ecf8ef !important; }
.popt.right .letter { background: #2e9e4a; color: #fff; }
.popt.wrong { border-color: #d93025 !important; background: #fdecea !important; }
.popt.wrong .letter { background: #d93025; color: #fff; }
.popt:disabled { opacity: 1; color: inherit; }
.explain2 { border-radius: 16px; padding: 14px; margin-bottom: 12px; font-size: 15px; line-height: 1.5; border: 1px solid; }
.explain2.good { background: #ecf8ef; border-color: #b9e3c4; }
.explain2.miss { background: #fff7e6; border-color: #f6d79a; }
.ex-h { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 4px; }
.explain2.good .ex-h { color: #1e7e34; }
.explain2.miss .ex-h { color: #a35a00; }
.explain2 .ur { display: block; text-align: right; }

/* score */
.score-card { text-align: center; padding: 24px 16px; }
.ring { --p: 0; width: 150px; height: 150px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ahead-green) calc(var(--p) * 1%), #e5ece2 0); }
.ring > div { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: grid; place-content: center; }
.ring b { font-size: 40px; color: var(--ahead); line-height: 1; }
.ring span { font-size: 13px; color: var(--muted); }
.score-card h2 { font-size: 20px; }
.score-card p { margin-top: 6px; }

/* misc icons in text */
.h-ic { display: flex; align-items: center; gap: 8px; color: var(--ahead); }
.h-ic .i { color: var(--ahead-green); }
.big-ico { width: 72px; height: 72px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: #fff0d9; color: #c46a00; }
.big-ico .i { width: 36px; height: 36px; }
.big-ico.ok { background: #e6f3df; color: #2e7a1c; }
.big-ico.bad { background: #fde6e4; color: #c0281f; }
.bad .i, .note .i, .fits .i { width: 16px; height: 16px; margin-right: 4px; }
.feats > div { box-shadow: var(--shadow); border-radius: 14px; }
.feats .ico { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 6px; }
.feats .ico .i { width: 22px; height: 22px; }
.prongs .i { display: block; margin: 0 auto 4px; color: var(--ahead-green); width: 26px; height: 26px; }
.give-ico { color: #e0412f; display: grid; place-items: center; }
.give-ico .i { width: 28px; height: 28px; fill: #e0412f; stroke: #e0412f; }
.i.red { color: #e0412f; fill: #e0412f; }
.give-card h2 { display: flex; align-items: center; gap: 8px; }
.adm-row h2 { display: flex; align-items: center; gap: 8px; }
.adm-row h2 .i { color: var(--ahead-green); }

@media (min-width: 900px) {
  .grid2 { grid-template-columns: repeat(3, 1fr); }
  .page.wide { max-width: 760px; }
}
.sec { font-size: 15px; color: var(--ahead); margin: 18px 2px 8px; }
.g-head { font-size: 13px; color: #cfe8c2; font-weight: 700; margin-bottom: 6px; }
.g-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: 14px; color: #e5f2de; }
.g-row b { font-size: 18px; color: #fff; }
.g-row span:first-child { font-weight: 700; color: #fff; }
.g-row span:last-child { text-align: right; }
.g-row.me { background: rgba(255,255,255,.12); }
.g-row.me span:last-child b { color: var(--ahead-orange); }

/* Teacher results */
.stu-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.stu-chips em { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #eef2ec; color: #44524a; }
.c-ok { background: #e6f3df !important; color: #2e7a1c !important; }
.c-mid { background: #fff0d9 !important; color: #b56200 !important; }
.c-bad { background: #fde6e4 !important; color: #b3261e !important; }
.t-ok { color: #2e7a1c; } .t-mid { color: #b56200; } .t-bad { color: #b3261e; }
.bars .bar i.mid { background: #e0901a; }
.bars .bar i.low { background: #d93025; }
.tile .score { font-size: 17px; color: var(--ahead); flex: none; }
.revq .ans { margin-top: 8px; }
.mq .pq { margin-top: 6px; font-weight: 600; }
.mq .ans { margin-top: 8px; color: var(--right); font-weight: 700; }
.mq .muted { margin-top: 6px; }
.mq .muted .ur, .mq .ans .ur { display: inline; }

/* Class codes */
.codecard { text-align: center; background: linear-gradient(180deg, #fff, #f6faf3); }
.code-big { font-size: 34px; font-weight: 800; letter-spacing: 6px; color: var(--ahead); margin: 4px 0 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.codecard p { margin-top: 4px; }
.btn.wa { background: #1f9d55; margin-top: 12px; text-decoration: none; }
input.code { text-transform: uppercase; letter-spacing: 3px; font-weight: 700; }
#codeinfo p { margin-top: 6px; }
#codeinfo .i { width: 16px; height: 16px; }
