
/* Layout: exam frame — fixed-feel top bar (section · timer · tools), split passage/question body, bottom bar with question menu and Back/Next. Plain screens for start, break and results. */
:root {
  --bg: #FFFFFF; --soft: #F0F2F5; --ink: #1E1E1E; --muted: #5F6368; --line: #D9D9D9; --rule: #8C8C8C;
  --accent: #324DC7; --accent-ink: #FFFFFF; --amber: #B3741A; --amber-tint: #FFF6CC;
  --ok: #1A7F37; --ok-tint: #E4F4E8; --bad: #C8102E; --bad-tint: #FCE8EB; --chip: #EEF0F3; --sel: #E8ECFA;
  --navy: #000000; --navy2: #1E1E1E; --gold: #FEDB00; --teal: #324DC7; --cb-blue: #0077C8;
  --ui: "Roboto", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --read: "Noto Serif", Georgia, "Times New Roman", serif;
  --math: "STIX Two Text", "Cambria Math", Cambria, Georgia, serif;
  --display: "Roboto", "Segoe UI", system-ui, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121212; --soft: #1C1C1E; --ink: #EDEDED; --muted: #A0A4AA; --line: #333336; --rule: #6B6B70;
  --accent: #8C9EFF; --accent-ink: #0B1033; --amber: #E8B64C; --amber-tint: #3A3015;
  --ok: #4CC58A; --ok-tint: #173A2B; --bad: #FF7A84; --bad-tint: #43202A; --chip: #26262A; --sel: #1F2547; --navy: #000000; --navy2: #1C1C1E; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #121212; --soft: #1C1C1E; --ink: #EDEDED; --muted: #A0A4AA; --line: #333336; --rule: #6B6B70;
  --accent: #8C9EFF; --accent-ink: #0B1033; --amber: #E8B64C; --amber-tint: #3A3015;
  --ok: #4CC58A; --ok-tint: #173A2B; --bad: #FF7A84; --bad-tint: #43202A; --chip: #26262A; --sel: #1F2547; --navy: #000000; --navy2: #1C1C1E; color-scheme: dark }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 17px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.m { font-family: var(--math); font-size: 1.08em; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.err { color: var(--bad); font-size: 15px; margin: 0; }
.primary { background: var(--accent); color: var(--accent-ink); border: none; border-radius: 99px; padding: 11px 26px; font-weight: 700; cursor: pointer; min-height: 46px; }
.sec { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 99px; padding: 10px 24px; font-weight: 700; cursor: pointer; min-height: 46px; }
.sec:disabled { opacity: .4; cursor: not-allowed; }

/* exam frame */
#app.exam { min-height: 100%; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--soft); border-bottom: 2px dashed var(--rule);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tl { min-width: 0; display: flex; flex-direction: column; }
.secname { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link { background: none; border: none; padding: 0; color: var(--ink); font-size: 14px; cursor: pointer; align-self: flex-start; }
.tc { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.timer { font-family: var(--ui); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; min-height: 30px; }
.timer.low { color: var(--bad); }
.pill { border: 1.5px solid var(--ink); background: transparent; border-radius: 99px; font-size: 13px; padding: 1px 12px; cursor: pointer; }
.tr { display: flex; justify-content: flex-end; gap: 6px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 0; background: none; border: none; cursor: pointer; font-size: 12px; color: var(--ink); padding: 4px 6px; border-radius: 8px; }
.tool .ic { font-weight: 700; font-size: 16px; line-height: 1.2; }
.tool.on { background: var(--chip); color: var(--accent); }
.body { flex: 1; display: grid; width: 100%; }
.body.split { grid-template-columns: 1fr 1fr; }
.body.single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.pane { min-width: 0; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); }
.body.split .passage { border-right: 3px solid var(--line); }
.passage p { font-family: var(--read); font-size: 19px; line-height: 1.65; margin: 0; max-width: 62ch; }
.blank { letter-spacing: -1px; }
.qhead { display: flex; align-items: center; gap: 0; background: var(--soft); border-bottom: 2px dashed var(--rule); margin-bottom: 16px; }
.qnum { background: var(--ink); color: var(--bg); font-weight: 700; min-width: 38px; text-align: center; padding: 6px 8px; }
.mark { background: none; border: none; cursor: pointer; padding: 6px 12px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.mark .flag { font-size: 18px; color: var(--muted); }
.mark.on .flag { color: var(--bad); }
.stem { font-family: var(--read); font-size: 18px; margin: 0 0 16px; }
.sys { font-family: var(--math); font-size: 24px; text-align: center; margin: 4px 0 16px; line-height: 1.5; }
.sys.small { font-size: 19px; text-align: left; }
.choices { display: flex; flex-direction: column; gap: 12px; }
.crow { display: flex; gap: 8px; align-items: stretch; }
.choice { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; border: 1.5px solid var(--ink); background: var(--bg); border-radius: 10px; padding: 10px 14px; cursor: pointer; min-height: 52px; font-family: var(--read); font-size: 18px; }
.choice .L { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-family: var(--ui); font-weight: 700; font-size: 14px; }
.choice .ct { min-width: 0; }
.choice.sel { border: 3px solid var(--accent); background: var(--sel); padding: 8.5px 12.5px; }
.choice.sel .L { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.choice.struck { opacity: .45; }
.choice.struck .ct { text-decoration: line-through; }
.strike { flex: none; width: 56px; border: 1.5px solid var(--line); background: var(--soft); border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 700; }
.strike.on { color: var(--accent); }
.spr { display: flex; flex-direction: column; gap: 8px; max-width: 260px; }
.spr label { font-weight: 700; font-size: 15px; }
.spr input { font-family: var(--math); font-size: 24px; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--bg); color: var(--ink); width: 100%; }
.prev { font-size: 15px; color: var(--muted); }
.bot { position: sticky; bottom: 0; z-index: 20; background: var(--soft); border-top: 2px dashed var(--rule);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.who { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.navbtn { background: var(--ink); color: var(--bg); border: none; border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.car { font-size: 11px; }
.bb { display: flex; justify-content: flex-end; gap: 8px; }

/* modals */
.veil { position: fixed; inset: 0; z-index: 40; background: rgba(10, 14, 30, .45); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--bg); color: var(--ink); border-radius: 14px; width: min(620px, 100%); max-height: 86vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); }
.mh h2 { font-size: 18px; margin: 0; }
.x { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px 8px; }
.mb { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.mb p { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.lg { display: inline-grid; place-items: center; width: 16px; height: 16px; font-style: normal; }
.lg.cur { border-radius: 50%; background: var(--ink); width: 10px; height: 10px; }
.lg.un { border: 1.5px dashed var(--ink); }
.lg.mk { color: var(--bad); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 10px; }
.gq { position: relative; height: 44px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 6px; font-weight: 700; cursor: pointer; }
.gq.un { background: var(--bg); color: var(--accent); border-style: dashed; }
.gq.cur::after { content: ""; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.gq .fl { position: absolute; right: -4px; top: -8px; color: var(--bad); font-style: normal; font-size: 14px; }
.center { display: flex; justify-content: center; }
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.refgrid div { background: var(--soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.reviewp { display: flex; flex-direction: column; gap: 14px; }
.rvh { font-family: var(--display); font-size: 30px; margin: 0; text-align: center; }
.lede { color: var(--muted); margin: 0; }
.rvcard { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rvcard h2 { font-size: 18px; margin: 0; }
.warn { margin: 0; background: var(--amber-tint); border-radius: 10px; padding: 10px 12px; }

@media (max-width: 760px) {
  .body.split { grid-template-columns: 1fr; }
  .body.split .passage { border-right: none; border-bottom: 3px solid var(--line); padding-bottom: 18px; }
  .pane { padding-top: 18px; padding-bottom: 18px; }
  .passage p { font-size: 18px; }
  .top { grid-template-columns: 1fr auto auto; }
  .secname { font-size: 14px; }
  .bot { grid-template-columns: auto 1fr; }
  .who { display: none; }
  .bb .sec, .bb .primary { padding: 8px 16px; min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.scorecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.sc { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.sc.big { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sc .lab { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.sc .val { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sc .sub { font-size: 14px; opacity: .85; font-variant-numeric: tabular-nums; }
.track { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.fill { height: 100%; } .fill.hi { background: var(--ok); } .fill.mid { background: var(--amber); } .fill.lo { background: var(--bad); }
details.rv { border: 1px solid var(--line); border-left: 5px solid var(--ok); border-radius: 10px; }
details.rv.rv-no { border-left-color: var(--bad); }
details.rv summary { cursor: pointer; padding: 10px 12px; display: flex; gap: 12px; align-items: center; list-style: none; }
details.rv summary::-webkit-details-marker { display: none; }
.rn { font-weight: 700; min-width: 22px; } .rs { font-weight: 700; } .rv.rv-ok .rs { color: var(--ok); } .rv.rv-no .rs { color: var(--bad); }
.rt { margin-left: auto; font-size: 13px; color: var(--muted); background: var(--chip); border-radius: 99px; padding: 2px 10px; }
.rvb { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.rvb p { margin: 0; } .rvb > p:first-of-type { font-family: var(--read); }
.why { background: var(--soft); border-radius: 8px; padding: 10px 12px; }

/* ===== app shell (teacher + student pages) ===== */
#app.plain { padding: 0; background: var(--soft); min-height: 100%; }
a { color: var(--accent); }
.apphead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; color: #fff; text-decoration: none; letter-spacing: .02em; }
.bname { display: flex; flex-direction: column; line-height: 1.05; }
.bname small { font-family: var(--ui); font-weight: 700; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.logo { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--gold); color: var(--navy); display: inline-grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.badge { background: var(--gold) !important; color: var(--navy) !important; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 15px; opacity: .8; }
.nav a.on, .nav a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.nav a.on { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 8px 8px 0 0; }
.me { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.mename { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.badge { background: var(--amber); color: var(--ink); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 8px; margin-left: 4px; }
.apphead .linkbtn { color: #fff; }
.page { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  padding-block: 24px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.page.wide { max-width: 1160px; }
.page h1 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 6vw, 40px); line-height: 1.08; margin: 0; text-wrap: balance; }
.page h2 { font-size: 19px; margin: 0; }
h2.sect { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.narrow { max-width: 560px; width: 100%; margin: 24px auto 0; }
.card p { margin: 0; }
.center-t { text-align: center; align-items: center; }
.bigcheck { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); display: grid; place-items: center; font-size: 34px; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 1.5px solid var(--accent); border-radius: 99px; padding: 9px 20px; font-weight: 700; cursor: pointer; text-decoration: none; min-height: 42px; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { min-height: 34px; padding: 5px 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: wait; }
.linkbtn { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; font-weight: 700; font-size: 14px; }
.linkbtn.danger { color: var(--bad); }
.iconbtn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.iconbtn:disabled { opacity: .35; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.tight { gap: 6px; }
.row.between { justify-content: space-between; }
.back { font-weight: 700; text-decoration: none; font-size: 15px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 14px; margin: 0; }
.err { color: var(--bad); font-size: 15px; margin: 0; } .ok { color: var(--ok); margin: 0; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--chip); color: var(--ink); }
.chip.acc { background: var(--sel); color: var(--accent); } .chip.ok { background: var(--ok-tint); color: var(--ok); } .chip.warn { background: var(--amber-tint); color: var(--ink); } .chip.bad { background: var(--bad-tint); color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { font-size: 13px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.chipbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--sel); color: var(--accent); font-weight: 700; }
.form { background: none; border: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card.form { background: var(--bg); border: 1px solid var(--line); padding: 18px; }
.form label, .fcol label { font-weight: 700; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input[type=date], select, .ta {
  font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--soft); color: var(--ink); width: 100%; }
.ta { resize: vertical; } .ta.mono { font-family: var(--math); }
.form .btn { align-self: flex-start; margin-top: 6px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.fcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; } .fcol.full { grid-column: 1 / -1; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; z-index: 60; font-weight: 700; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }
.loading { display: grid; place-items: center; gap: 10px; padding: 80px 0; color: var(--muted); }
.spin { width: 34px; height: 34px; border: 4px solid var(--chip); border-top-color: var(--accent); border-radius: 50%; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* auth */
.authwrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; margin-top: 24px; }
.authside .lede { margin-top: 10px; font-size: 18px; }
.authcard { padding: 24px; }
@media (max-width: 760px) { .authwrap { grid-template-columns: 1fr; margin-top: 4px; } }

/* teacher */
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.classcard { text-decoration: none; color: var(--ink); gap: 6px; }
a.classcard:hover { border-color: var(--accent); }
.code { font-family: var(--math); font-size: 26px; font-weight: 600; letter-spacing: .12em; color: var(--accent); }
.newclass { border-style: dashed; }
.codebox { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); }
.tabs a { padding: 8px 14px; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.list { display: flex; flex-direction: column; gap: 10px; }
.hwrow { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hwmain { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 280px; }
.hwact { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.builder { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .builder { grid-template-columns: 1fr; } }
.blist, .plist { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.bq, .pq { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; }
.bq.in { background: var(--sel); border-color: var(--accent); }
.bqt, .pqt { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.bqt p, .pqt p { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; }
.bqa, .pqa { display: flex; gap: 6px; align-items: center; flex: none; }
.pn { font-weight: 700; min-width: 22px; }
.savebar { position: sticky; bottom: 0; background: var(--soft); border-top: 1px solid var(--line); padding: 12px 0 max(12px, env(safe-area-inset-bottom, 0px)); display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; }
.savebar .err { margin-right: auto; }
.chrow { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.radio { display: flex; align-items: center; gap: 4px; font-weight: 700; min-width: 44px; }
.psg { font-family: var(--read); font-size: 17px; }
.pvch { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pvch li { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
.pvch li.right { border-color: var(--ok); background: var(--ok-tint); }

/* results */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .lab { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile .val { font-family: var(--display); font-weight: 800; font-size: 30px; font-variant-numeric: tabular-nums; }
.val.hi { color: var(--ok); } .val.mid { color: var(--amber); } .val.lo { color: var(--bad); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.grid { border-collapse: collapse; font-size: 14px; min-width: 100%; }
table.grid th { background: var(--ink); color: var(--bg); text-align: left; padding: 8px 10px; white-space: nowrap; }
table.grid td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: middle; background: var(--bg); }
table.grid tbody tr:nth-child(even) td { background: var(--soft); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
th.sticky, td.sticky { position: sticky; left: 0; z-index: 1; min-width: 160px; }
th.qh { text-align: center; min-width: 32px; }
td.cell { text-align: center; font-weight: 700; font-family: var(--math); min-width: 32px; }
td.cell.y { color: var(--ok); } td.cell.n { color: var(--bad); background: var(--bad-tint) !important; } td.cell.skip { color: var(--muted); }
.qtab td.qtext { min-width: 260px; max-width: 440px; }
.mini { width: 90px; height: 6px; border-radius: 99px; background: var(--chip); overflow: hidden; margin-bottom: 4px; }
.minifill { height: 100%; } .minifill.hi { background: var(--ok); } .minifill.mid { background: var(--amber); } .minifill.lo { background: var(--bad); }
.review { display: flex; flex-direction: column; gap: 8px; }

/* student */
.joinform { display: flex; flex-direction: column; gap: 6px; }
.joinform label { font-weight: 700; font-size: 14px; }
.joinform input { width: 150px; text-transform: uppercase; letter-spacing: .1em; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.facts div { background: var(--soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.facts .lab { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.timer.untimed { font-size: 15px; color: var(--muted); }
svg.nl { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto 12px; color: var(--ink); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .mename { max-width: 30vw; } }

.nav a { white-space: nowrap; }
@media (max-width: 600px) { .apphead { gap: 8px 12px; } .nav { order: 3; flex-basis: 100%; } .me { margin-left: auto; } .bname small { display: none; } }

/* imported questions: pictures, tables, maths */
.qimg { text-align: center; margin: 4px 0 14px; }
.qimg img { max-width: min(100%, 420px); height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
table.vt { border-collapse: collapse; margin: 2px 0; font-family: var(--math); font-size: 16px; }
table.vt th, table.vt td { border: 1px solid currentColor; padding: 2px 14px; text-align: center; font-weight: 400; background: transparent !important; color: inherit; }
.choice .ct table.vt { font-size: 15px; }
.katex { font-size: 1.08em; }
.sys .katex { font-size: 1.15em; }
.pvbox { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--soft); }

/* ===== IBSAT additions ===== */
.sitefoot { max-width: 1160px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px;
  padding: 18px max(16px, env(safe-area-inset-left, 0px)) max(28px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.sitefoot > span { display: inline-flex; align-items: center; gap: 8px; }
.sitefoot .logo { width: 26px; height: 26px; font-size: 10px; letter-spacing: -.04em; border-radius: 7px; }
.splash { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 6px; background: var(--navy); color: #fff; font-family: system-ui, sans-serif; }
.splash b { font-size: 28px; letter-spacing: .04em; } .splash span:not(.logo) { color: var(--gold); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.splash .spin { margin-top: 18px; border-color: rgba(255,255,255,.15); border-top-color: var(--gold); }
.logo.big { width: 64px; height: 64px; font-size: 28px; border-radius: 16px; margin-bottom: 8px; }
.phsub { color: var(--muted); margin: 8px 0 0; max-width: 64ch; font-size: 16.5px; }
.ph-text { min-width: 0; flex: 1 1 380px; }
h1.hero { font-size: clamp(34px, 7vw, 54px) !important; letter-spacing: -.01em; margin-top: 8px !important; }
.hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--gold) 55%, transparent) 0); padding: 0 .06em; }
.feats { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 14px; }
.feats li { display: flex; gap: 12px; align-items: flex-start; }
.feats .fi { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 700; }
.feats b { display: block; } .feats span { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .feats { display: none; } h1.hero { font-size: 34px !important; } }
.chip.subj-math { background: #E3E9FF; color: #2F45C8; } .chip.subj-english { background: #FCEBD7; color: #9A4D00; }
:root[data-theme="dark"] .chip.subj-math { background: #262D57; color: #A8B2FF; } :root[data-theme="dark"] .chip.subj-english { background: #3A2A15; color: #F2B544; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.subj-math { background: #262D57; color: #A8B2FF; } :root:not([data-theme="light"]) .chip.subj-english { background: #3A2A15; color: #F2B544; } }
.setcard { text-decoration: none; color: var(--ink); gap: 8px; transition: border-color .15s, transform .15s; }
.setcard:hover { border-color: var(--accent); transform: translateY(-1px); }
.setnum { font-size: 15px; } .setnum b { font-family: var(--display); font-size: 22px; }
.classcard .codeline { font-size: 13px; color: var(--muted); display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.code.sm { font-size: 17px; }
button.classcard { font: inherit; text-align: left; cursor: pointer; align-items: flex-start; }
.plus { font-size: 30px; line-height: 1; color: var(--accent); font-weight: 700; }
.banner { background: var(--amber-tint); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-radius: 12px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { overflow-x: auto; scrollbar-width: none; } .tabs a { white-space: nowrap; }
.dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 12px; margin-left: 4px; }
.reqrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.reqrow:first-child { border-top: none; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.nowrap { flex-wrap: nowrap; } .nowrap input { min-width: 0; }
.setsettings { gap: 14px; }
.practicebox { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.practicebox.on { border-color: var(--ok); background: var(--ok-tint); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 16px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slider { flex: none; width: 46px; height: 26px; border-radius: 99px; background: var(--rule); position: relative; transition: background .15s; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .slider { background: var(--ok); } .switch input:checked + .slider::after { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--amber); outline-offset: 2px; }
.qrow { flex-direction: row; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.qrow .hwmain p { font-size: 15px; }
.mini-sel { width: auto !important; padding: 6px 8px !important; font-size: 14px !important; max-width: 180px; }
.seg { display: flex; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: none; background: none; padding: 8px 10px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--muted); font-size: 15px; }
.seg button[aria-selected="true"] { background: var(--bg); color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg.big button { padding: 11px; font-size: 16px; }
.rlist { display: flex; flex-direction: column; max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.rrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.rrow:first-child { border-top: none; }
.rinfo { display: flex; flex-direction: column; min-width: 0; } .rinfo b { font-size: 15.5px; }
.rinfo .val { font-family: inherit; font-size: inherit; }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper input { width: 56px !important; text-align: center; padding: 6px 4px !important; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .iconbtn { width: 36px; height: 36px; font-size: 18px; font-weight: 700; color: var(--accent); }
.rfoot { padding-top: 4px; }
.ptime { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tightgap { gap: 8px; }
.resume { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; border: 2px solid var(--accent); }
.emptyhero { padding: 28px; }
.dest { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; }
.dest legend { font-weight: 700; padding: 0 4px; }
.opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.opt input[type=text], .opt select { width: auto; flex: 1 1 200px; padding: 6px 10px; }
.opt.sub { color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.codeinput { text-transform: uppercase; letter-spacing: .14em; font-family: var(--math) !important; font-size: 20px !important; }
.pvch li span { display: inline-block; vertical-align: top; }

/* exam tools */
.tool .ic svg { width: 22px; height: 22px; display: block; }
.tool .ic { min-height: 22px; display: grid; place-items: center; }
.tool[aria-pressed="true"] { background: var(--chip); color: var(--accent); }
.morewrap { position: relative; }
.moremenu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 6px; min-width: 190px; z-index: 30; }
.moremenu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 10px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.moremenu button:hover { background: var(--soft); }
@media (max-width: 520px) { .tool .tlab { display: none; } .tool { padding: 6px; } .tr { gap: 2px; } .top { gap: 6px; } }
/* tables inside answer choices */
.choice .ct table.vt th, .choice .ct table.vt td { padding: 1px 12px; }

body:has(#app.exam) .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* ======================= UPDATE 3 ======================= */
/* ---- app layout: top bar + left drawer menu ---- */
#app.plain { background: var(--soft); }
.appwrap { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff;
  padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px)); box-shadow: 0 2px 12px rgba(10,14,30,.18); }
.tb-sp { flex: 1; }
.hamb { width: 42px; height: 42px; border-radius: 10px; border: none; background: rgba(255,255,255,.08); display: grid; place-content: center; gap: 4px; cursor: pointer; flex: none; }
.hamb:hover { background: rgba(255,255,255,.16); }
.hamb span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.menu-open .hamb span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .hamb span:nth-child(2) { opacity: 0; }
.menu-open .hamb span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.topbar .me { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.topbar .linkbtn { color: #fff; opacity: .85; }
.drawer { position: fixed; z-index: 29; top: calc(60px + env(safe-area-inset-top, 0px)); left: 0; bottom: 0; width: 272px; background: var(--bg); border-right: 1px solid var(--line);
  transform: translateX(-102%); transition: transform .22s ease; display: flex; flex-direction: column; overflow-y: auto; padding: 14px 10px; }
.menu-open .drawer { transform: none; box-shadow: 8px 0 30px rgba(10,14,30,.08); }
.menu { display: flex; flex-direction: column; gap: 2px; }
.mi { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15.5px; position: relative; }
.mi svg { width: 22px; height: 22px; flex: none; }
.mi:hover { background: var(--soft); color: var(--ink); }
.mi.on { background: var(--sel); color: var(--navy); font-weight: 800; }
:root[data-theme="dark"] .mi.on { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mi.on { color: var(--ink); } }
.mi.on::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.mi .mb { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 12px; display: grid; place-items: center; }
.drawer-foot { margin-top: auto; padding: 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.scrim { position: fixed; inset: 0; z-index: 28; background: rgba(10,14,30,.4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.menu-open .scrim { opacity: 1; pointer-events: auto; }
.content { transition: margin-left .22s ease; }
@media (min-width: 1100px) { .menu-open .content { margin-left: 272px; } .menu-open .scrim { display: none; } .menu-open .drawer { box-shadow: none; } }
@media (max-width: 600px) { .topbar .mename { display: none; } .bname small { display: none; } .topbar { gap: 8px; } }
.sitefoot { margin-top: 20px; }

/* ---- shared bits ---- */
.mutedeb { color: var(--muted) !important; }
.eyebrow.gold { color: var(--gold); }
.btn.big { min-height: 50px; padding: 12px 26px; font-size: 17px; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.chip.live { background: #E4F6EC; color: #137a46; }
.chip.diff-E { background: #E4F6EC; color: #137a46; } .chip.diff-M { background: var(--amber-tint); color: #8a5a00; } .chip.diff-H { background: var(--bad-tint); color: var(--bad); }
.pad { padding: 12px; }
.mini-h { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.cls-h { margin: 6px 0 0 !important; }
.pillseg { display: inline-flex; flex-wrap: wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 4px; gap: 4px; }
.pillseg button { border: 1.5px solid transparent; background: none; border-radius: 99px; padding: 8px 16px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 15px; }
.pillseg button[aria-pressed="true"] { background: var(--bg); border-color: var(--accent); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.pillseg.single { width: 100%; } .pillseg.single button { flex: 1; }
.pillseg.multi button { flex: 1; min-width: 90px; }

/* ---- question bank (student) ---- */
.qtabs { max-width: 520px; margin: 0 auto; width: 100%; }
.qbgrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .qbgrid { grid-template-columns: 1fr; } }
.qbleft .pillseg, .qbleft > .pillseg { width: 100%; } .qbleft .pillseg button { flex: 1; }
.domlist { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; padding-right: 2px; }
.dom { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.dom.open { box-shadow: 0 2px 10px rgba(10,14,30,.05); }
.domh, .skl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.skills { padding: 0 6px 8px 28px; }
.domname, .sklname { flex: 1; text-align: left; background: none; border: none; cursor: pointer; font: inherit; padding: 4px 0; color: var(--ink); }
.domname { font-weight: 700; font-size: 16px; } .sklname { font-size: 15px; color: var(--ink); }
.cnt { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.chev { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 16px; width: 28px; }
.tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule); background: var(--bg); cursor: pointer; position: relative; padding: 0; }
.tick.all { background: var(--accent); border-color: var(--accent); }
.tick.all::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tick.some { border-color: var(--accent); }
.tick.some::after { content: ""; position: absolute; left: 5px; right: 5px; top: 9px; height: 2.5px; background: var(--accent); border-radius: 2px; }
.fblock { display: flex; flex-direction: column; gap: 8px; }
.fgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .fgrid2 { grid-template-columns: 1fr; } }
.fsel { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.fsel select { border-radius: 99px; }
.matchbox { margin-top: 4px; background: var(--sel); border-radius: 14px; padding: 14px 16px; display: flex; align-items: baseline; gap: 10px; }
.matchbox .val { font-family: var(--display); font-weight: 800; font-size: 32px; color: var(--accent); }
.qbbar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; box-shadow: 0 -6px 24px rgba(10,14,30,.06); margin-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
.qbopt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qbl { font-weight: 700; }
.qbbar .pillseg button { padding: 6px 12px; }
#qbgo { margin-left: auto; }
@media (max-width: 700px) { #qbgo { width: 100%; margin: 0; } .qbopt { width: 100%; } }
.drill { gap: 10px; } .drill h3 { margin: 0; font-size: 18px; } .drill .val { font-family: var(--display); font-weight: 800; font-size: 30px; }
.redo-btn { align-self: flex-start; }

/* ---- dashboard ---- */
.hello { background: linear-gradient(135deg, var(--navy), #22356a); color: #fff; border-radius: 20px; padding: 24px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-end; position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(242,181,68,.12); }
.hello h1 { color: #fff; margin: 4px 0 6px !important; }
.hello p { margin: 0; opacity: .9; }
.hello-stats { display: flex; gap: 10px; position: relative; z-index: 1; flex-wrap: wrap; }
.hello-stats div { background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px 16px; min-width: 96px; display: flex; flex-direction: column; }
.hello-stats .lab { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; font-weight: 700; }
.hello-stats b { font-family: var(--display); font-size: 26px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.dgrid .wide2 { grid-column: 1 / -1; }
@media (max-width: 400px) { .dgrid { grid-template-columns: 1fr; } }
.hwline { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.card > h2 + .hwline, .row + .hwline { border-top: none; }
.hwline .hwmain { gap: 3px; flex: 1 1 180px; }
.goal { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.goal > div:last-child { flex: 1 1 160px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--chip) 0); display: grid; place-items: center; flex: none; }
.ring span { width: 80px; height: 80px; border-radius: 50%; background: var(--bg); display: grid; place-content: center; text-align: center; font-family: var(--display); font-weight: 800; font-size: 24px; }
.ring small { font-size: 13px; color: var(--muted); font-family: var(--ui); }
.tasklist { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.tasklist li { display: flex; gap: 8px; align-items: flex-start; }
.tasklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.tasklist input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ok); }
.tbox { width: 16px; height: 16px; border: 2px solid var(--rule); border-radius: 5px; flex: none; margin-top: 4px; }
.skillrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 48px; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.skillrow.dom { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.skillrow .val { font-family: inherit; text-align: right; font-size: 15px; }
.hbar { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; } .hfill { height: 100%; border-radius: 99px; }
.hfill.hi { background: var(--ok); } .hfill.mid { background: var(--amber); } .hfill.lo { background: var(--bad); }
.domblock { display: flex; flex-direction: column; }
.domblock .skillrow:not(.dom) { padding-left: 14px; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qcard { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-decoration: none; color: var(--ink); font-weight: 700; transition: transform .15s, border-color .15s; }
.qcard svg { width: 28px; height: 28px; color: var(--accent); }
.qcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.sbars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px; }
.sbar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; font-size: 11px; color: var(--muted); min-width: 0; }
.sbar i { width: 100%; max-width: 28px; border-radius: 6px 6px 2px 2px; display: block; }
.sbar i.hi { background: var(--ok); } .sbar i.mid { background: var(--amber); } .sbar i.lo { background: var(--bad); }
.sbars.act i.hi { background: var(--accent); }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; max-width: 280px; }
.heat i { aspect-ratio: 1; border-radius: 5px; background: var(--chip); }
.heat i.h1 { background: #c6dbff; } .heat i.h2 { background: #8fb3ff; } .heat i.h3 { background: #5b86f0; } .heat i.h4 { background: var(--accent); }
.val.hi { color: var(--ok); } .val.mid { color: var(--amber); } .val.lo { color: var(--bad); }
table.gb th.gbh { min-width: 110px; white-space: normal; } table.gb th a { color: #fff; }
table.grid td.skip { color: var(--muted); }
tr.avgrow td { background: var(--sel) !important; }

/* ---- study plan ---- */
.countdown { display: flex; align-items: baseline; gap: 10px; } .countdown b { font-family: var(--display); font-size: 54px; color: var(--accent); line-height: 1; }
.countdown.small { font-size: 20px; font-weight: 700; color: var(--accent); }
.weeks { display: flex; flex-direction: column; gap: 8px; }
.week { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.week summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; list-style: none; flex-wrap: wrap; }
.week summary::-webkit-details-marker { display: none; }
.week.now { border-color: var(--ok); background: color-mix(in srgb, var(--ok-tint) 50%, var(--bg)); }
.week.past { opacity: .75; }
.wdate { font-size: 13px; color: var(--muted); min-width: 56px; } .wprog { margin-left: auto; }
.week .tasklist { padding-bottom: 12px; }
.wedit { gap: 8px; }

/* ---- vocabulary ---- */
.vcard .track { margin-top: 2px; }
.row.center { justify-content: center; }

.quizcard { max-width: 640px; margin: 0 auto; width: 100%; }
.qword { font-size: 22px; margin: 4px 0; }
.vopts { display: flex; flex-direction: column; gap: 10px; }
.vopt { text-align: left; border: 1.5px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); }
.vopt:hover:not(:disabled) { border-color: var(--accent); }
.vopt.right { border-color: var(--ok); background: var(--ok-tint); font-weight: 700; } .vopt.wrong { border-color: var(--bad); background: var(--bad-tint); }

/* ---- contests, rankings, leaderboard ---- */
.contestcard.live { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }
.chk { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.contest-intro .lefty { text-align: left; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; max-width: 520px; margin: 8px auto 0; width: 100%; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.pod b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pav { width: 46px; height: 46px; border-radius: 50%; background: var(--sel); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.pod.p1 .pav { width: 58px; height: 58px; background: var(--gold); color: var(--navy); font-size: 18px; }
.pblock { width: 100%; border-radius: 12px 12px 0 0; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 24px; margin-top: 4px; }
.p1 .pblock { height: 92px; background: linear-gradient(var(--gold), #d99a1e); color: var(--navy); } .p2 .pblock { height: 68px; background: #9aa6c4; } .p3 .pblock { height: 52px; background: #c48a5a; }
.pod.me b { color: var(--accent); }
tr.meRow td { background: var(--sel) !important; font-weight: 700; }
.banner.mine { background: var(--sel); border-color: var(--accent); }
.av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); font-size: 11px; font-weight: 800; margin-right: 4px; }
.rank-card details summary { cursor: pointer; margin-top: 10px; }
.blist.short { max-height: 260px; }
.bpick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* ---- Desmos calculator: move with the title bar, resize with the corner ---- */
.calc { position: fixed; z-index: 35; background: var(--bg); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 0 18px 50px rgba(10,14,30,.3); display: flex; flex-direction: column; overflow: hidden; }
.calc.drag { user-select: none; } .calc.drag iframe { pointer-events: none; }
.calc-h { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; background: var(--navy); color: #fff; cursor: move; touch-action: none; flex: none; user-select: none; }
.calc-sp { flex: 1; }
.grip { width: 14px; height: 14px; background: radial-gradient(circle, rgba(255,255,255,.75) 1.3px, transparent 1.6px) 0 0/5px 5px; }
.calc-b { background: rgba(255,255,255,.12); color: #fff; border: none; border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.calc-b:hover { background: rgba(255,255,255,.22); }
.calc-body { flex: 1; position: relative; background: #fff; min-height: 0; }
.calc-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.calc-wait { position: absolute; inset: 0; display: grid; place-items: center; color: #5E6478; font-size: 15px; }
.calc-f { flex: none; font-size: 12px; color: var(--muted); padding: 4px 34px 4px 10px; border-top: 1px solid var(--line); background: var(--bg); }
.calc-rs { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; cursor: nwse-resize; touch-action: none; z-index: 2;
  background: linear-gradient(135deg, transparent 50%, var(--navy) 50%); border-radius: 0 0 10px 0; }
.calc-rs::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 10px; height: 10px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; }
.calc.big { left: 2vw !important; top: calc(70px + env(safe-area-inset-top, 0px)) !important; width: 96vw !important; height: calc(100vh - 160px) !important; }
.calc.big .calc-rs { display: none; } .calc.big .calc-h { cursor: default; }

/* ---- public pages (main page, sign in) ---- */
#app.public { background: var(--bg); min-height: 100vh; }
.pubnav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 12px max(16px, env(safe-area-inset-left, 0px)); padding-top: max(12px, env(safe-area-inset-top, 0px)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand.dark { color: var(--ink); }
.publinks { display: flex; gap: 4px; flex: 1; justify-content: center; }
.publinks a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 6px 12px; border-radius: 99px; }
.publinks a:hover { color: var(--ink); background: var(--soft); }
@media (max-width: 860px) { .publinks { display: none; } .pubnav { justify-content: space-between; } }
@media (max-width: 420px) { .pubnav .bname small { display: none; } .pubnav .btn.small { padding: 5px 10px; } }
.hero-sec { background: radial-gradient(1200px 500px at 85% -10%, rgba(242,181,68,.18), transparent 60%), linear-gradient(180deg, var(--soft), var(--bg)); }
.hero-in { max-width: 1160px; margin: 0 auto; padding: 56px 20px 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; padding-top: 32px; } }
.hero-copy h1 { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 6.4vw, 64px); line-height: 1.02; letter-spacing: -.02em; margin: 10px 0 14px; text-wrap: balance; }
.hero-copy .lede { font-size: 19px; max-width: 54ch; margin-bottom: 22px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ticks li { display: flex; gap: 8px; align-items: center; color: var(--muted); font-weight: 600; }
.ticks li::before { content: "✓"; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.tcard .ticks, .two-col .ticks { flex-direction: column; }
.hero-art { position: relative; min-height: 470px; }
@media (max-width: 900px) { .hero-art { min-height: 360px; max-width: 520px; width: 100%; margin: 0 auto; } }
.mock { position: absolute; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(20,33,61,.16); }
.mock.q { left: 0; top: 70px; width: 66%; overflow: hidden; z-index: 1; }
.mock-top { display: flex; align-items: center; gap: 10px; background: var(--soft); border-bottom: 2px dashed var(--rule); padding: 10px 14px; font-size: 13px; }
.mock-top span:nth-child(2) { margin-left: auto; font-weight: 800; font-size: 16px; }
.mt-tools svg { width: 18px; height: 18px; }
.mock-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; font-family: var(--read); font-size: 15px; }
.mock-n { background: var(--ink); color: var(--bg); width: 28px; text-align: center; font-family: var(--ui); font-weight: 700; border-radius: 4px; }
.mock-body p { margin: 0 0 4px; }
.mock-ch { border: 1.5px solid var(--ink); border-radius: 9px; padding: 7px 12px; font-size: 14px; }
.mock-ch.sel { border: 3px solid var(--accent); background: var(--sel); }
.mock.s { right: 0; top: 0; width: 40%; z-index: 2; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.mock.s .lab, .mock.r .lab { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mock.s b { font-family: var(--display); font-size: 26px; color: var(--ok); }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 60px; } .bars i { flex: 1; background: linear-gradient(var(--accent), #6f86ff); border-radius: 4px 4px 1px 1px; }
.mock.r { right: 0; bottom: 0; width: 46%; z-index: 2; padding: 14px 16px; background: var(--navy); color: #fff; border: none; }
.mock.r .lab { color: var(--gold); }
.mock.r ol { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.mock.r li { display: flex; gap: 10px; align-items: center; } .mock.r li b { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-size: 12px; }
.mock.r em { margin-left: auto; font-style: normal; opacity: .8; }
.strip { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.strip div { background: var(--bg); padding: 18px; display: flex; flex-direction: column; gap: 2px; } .strip span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .strip { grid-template-columns: 1fr 1fr; margin: 0 16px; } }
.lsec { max-width: 1160px; margin: 0 auto; padding: 64px 20px; }
.lsec.alt { max-width: none; background: var(--soft); } .lsec.alt > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.sec-h { text-align: center; margin-bottom: 28px; } .sec-h h2, .cta h2, .tcard h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4.4vw, 40px); margin: 6px 0 0; letter-spacing: -.01em; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.fcard { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: var(--bg); transition: transform .15s, box-shadow .15s; }
.fcard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20,33,61,.08); }
.ficon { width: 46px; height: 46px; border-radius: 12px; background: var(--navy); color: var(--gold); display: grid; place-items: center; }
.ficon svg { width: 24px; height: 24px; }
.fcard h3 { margin: 14px 0 6px; font-size: 18px; } .fcard p { margin: 0; color: var(--muted); }
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.steps li { counter-increment: s; background: var(--bg); border-radius: 18px; padding: 22px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(s); width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; display: grid; place-items: center; font-family: var(--display); font-size: 18px; margin-bottom: 4px; }
.steps span { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.tcard { border: 1px solid var(--line); border-radius: 22px; padding: 28px; background: var(--soft); }
.tcard.dark { background: var(--navy); color: #fff; border: none; } .tcard.dark .ticks li { color: rgba(255,255,255,.85); }
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; background: var(--bg); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 17px; }
.faq p { margin: 0 0 14px; color: var(--muted); }
.cta { margin: 0 16px; border-radius: 26px; background: var(--navy); color: #fff; text-align: center; padding: 56px 20px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
@media (min-width: 1200px) { .cta { max-width: 1160px; margin: 0 auto; } }
.pubfoot { max-width: 1160px; margin: 0 auto; padding: 40px 20px max(30px, env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.pubfoot .note { margin-top: 10px; max-width: 46ch; }
.pfl { display: flex; flex-direction: column; gap: 6px; } .pfl a { color: var(--muted); text-decoration: none; } .pfl a:hover { color: var(--accent); }
.copy { grid-column: 1 / -1; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 16px; margin: 0; }
@media (max-width: 700px) { .pubfoot { grid-template-columns: 1fr 1fr; } .pubfoot > div:first-child { grid-column: 1 / -1; } }
.authpage { max-width: 1100px; margin: 0 auto; padding: 32px 20px 48px; }
@media (max-width: 700px) { .qbbar { position: static; box-shadow: none; } .qbbar .qbl { min-width: 60px; } }
details.rv.rv-key { border-left-color: var(--accent); } .rv.rv-key .rs { color: var(--accent); }
.seg button { white-space: nowrap; }
@media (max-width: 600px) { .hero-art { min-height: 340px; } .mock.s { display: none; } .mock.q { top: 0; width: 88%; } .mock.r { width: 64%; } .fgrid { grid-template-columns: 1fr 1fr; } .fcard { padding: 14px; } .fcard p { font-size: 14px; } }
@media (max-width: 380px) { .fgrid { grid-template-columns: 1fr; } }
/* practice mode: instant feedback */
.checkrow { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.choice.right { border: 3px solid var(--ok) !important; background: var(--ok-tint) !important; padding: 8.5px 12.5px; }
.choice.right .L { background: var(--ok); border-color: var(--ok); color: #fff; }
.choice.wrong { border: 3px solid var(--bad) !important; background: var(--bad-tint) !important; padding: 8.5px 12.5px; }
.choice.wrong .L { background: var(--bad); border-color: var(--bad); color: #fff; }
.choice.dim { opacity: .55; } .choice:disabled { cursor: default; color: inherit; }
.fbbox { margin-top: 16px; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border: 1.5px solid; }
.fbbox.ok { background: var(--ok-tint); border-color: var(--ok); } .fbbox.ok > b { color: var(--ok); }
.fbbox.no { background: var(--bad-tint); border-color: var(--bad); } .fbbox.no > b { color: var(--bad); }
.fbwhy { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-family: var(--read); font-size: 16px; line-height: 1.55; }
.fbwhy .lab { display: block; font-family: var(--ui); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.gq.gok { background: var(--ok); border-color: var(--ok); } .gq.gno { background: var(--bad); border-color: var(--bad); }
.qbhint { flex-basis: 100%; margin: -4px 0 0; }
.qbhint { order: 10; }
/* founder note */
.welcome-veil { position: fixed; inset: 0; z-index: 70; background: rgba(10,14,30,.55); display: grid; place-items: center; padding: 16px; animation: wfade .25s ease; }
.welcome-veil.out { opacity: 0; transition: opacity .2s; }
@keyframes wfade { from { opacity: 0; } to { opacity: 1; } }
.welcome { width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--bg); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: wup .3s ease; }
@keyframes wup { from { transform: translateY(16px) scale(.98); } to { transform: none; } }
.welcome-top { background: linear-gradient(135deg, var(--navy), #22356a); color: #fff; padding: 26px 24px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; overflow: hidden; }
.welcome-top::after { content: ""; position: absolute; right: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 24px solid rgba(242,181,68,.14); }
.welcome-top h2 { font-family: var(--display); font-weight: 800; font-size: 30px; margin: 2px 0 0; color: #fff; }
.welcome-body { padding: 20px 24px 6px; display: flex; flex-direction: column; gap: 12px; font-size: 16.5px; line-height: 1.6; }
.welcome-body p { margin: 0; }
.welcome-quote { font-family: var(--read); font-style: italic; font-size: 18px; border-left: 4px solid var(--gold); padding: 4px 0 4px 14px; color: var(--ink); }
.welcome-sign { display: flex; flex-direction: column; align-items: flex-end; gap: 0; margin-top: 4px; }
.sig { font-family: "Caveat", "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive; font-size: 30px; color: var(--navy); line-height: 1.1; }
:root[data-theme="dark"] .sig { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sig { color: var(--gold); } }
.welcome-foot { padding: 14px 24px 22px; display: flex; justify-content: center; }
.welcome-foot .btn { min-width: 200px; }
.founder-card { display: flex; gap: 22px; align-items: flex-start; background: var(--soft); border: 1px solid var(--line); border-radius: 24px; padding: 28px; max-width: 900px; margin: 0 auto; }
.founder-card h2 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 4vw, 34px); margin: 6px 0 10px; }
.founder-card p { margin: 0 0 12px; color: var(--muted); font-size: 17px; }
.founder-card .welcome-quote { color: var(--ink); }
.founder-card .logo.big { flex: none; }
@media (max-width: 600px) { .founder-card { flex-direction: column; padding: 22px; } }

/* logo: always centred */
.logo { display: inline-flex !important; align-items: center; justify-content: center; text-align: center; line-height: 1; padding: 0; letter-spacing: 0; }
.sitefoot .logo { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }
.vcol { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.vcolbar { width: min(260px, 40vw); }
.mixcard { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 2px solid var(--accent); }
.mixcard > div:first-child { flex: 1 1 320px; } .mixcard h2 { margin: 2px 0 4px; }
.mixlist { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow: auto; }
.mixcol { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.mixh, .mixi { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.mixi { padding-left: 24px; font-size: 15px; } .mixi .note { margin-left: auto; }
.mixh input, .mixi input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---- flashcards ---- */
.fcwrap { max-width: 640px; width: 100%; margin: 4px auto 0; display: flex; flex-direction: column; gap: 18px; } .fcctrl { margin-top: 6px; }
.fctop { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fcstats { display: flex; gap: 6px; }
.fcprog { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.fcbar { flex: 1; height: 6px; border-radius: 99px; background: var(--chip); overflow: hidden; } .fcbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }
.flash { display: block; width: 100%; height: clamp(260px, 42vh, 340px); perspective: 1400px; background: none; border: none; cursor: pointer; position: relative; padding: 0; font: inherit; color: inherit; }
.flash:focus-visible { outline: none; } .flash:focus-visible .fface { box-shadow: 0 0 0 4px var(--amber), 0 18px 40px rgba(20,33,61,.18); }
.fface { position: absolute; inset: 0; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .5s cubic-bezier(.2,.7,.2,1); text-align: center; box-shadow: 0 18px 40px rgba(20,33,61,.16); }
.fface.front { background: radial-gradient(400px 220px at 85% 0%, rgba(242,181,68,.16), transparent 60%), linear-gradient(150deg, var(--navy), #24386e); color: #fff; }
.fface.back { background: var(--bg); border: 1px solid var(--line); transform: rotateY(180deg); }
.flash.flipped .front { transform: rotateY(-180deg); } .flash.flipped .back { transform: rotateY(0deg); }
.fstate { position: absolute; top: 16px; left: 18px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.fsrc { position: absolute; top: 16px; right: 18px; font-size: 12px; color: rgba(255,255,255,.65); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw { font-family: var(--display); font-size: clamp(34px, 8vw, 50px); font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.fw.small { font-size: 22px; color: var(--accent); }
.fpos { font-family: var(--read); font-style: italic; font-size: 17px; color: rgba(255,255,255,.75); }
.fhint { position: absolute; bottom: 16px; font-size: 13px; color: rgba(255,255,255,.55); } .fhint.dark { color: var(--muted); }
.fdef { font-size: clamp(19px, 4vw, 23px); font-weight: 700; line-height: 1.35; max-width: 30ch; color: var(--ink); }
.fex { font-family: var(--read); font-style: italic; color: var(--muted); font-size: 17px; max-width: 42ch; border-top: 1px solid var(--line); padding-top: 12px; }
.fcctrl { display: grid; grid-template-columns: 52px 1fr 1fr 52px; gap: 12px; align-items: center; }
.fcnav { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-size: 20px; cursor: pointer; display: grid; place-items: center; transition: border-color .15s, background .15s; }
.fcnav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); } .fcnav:disabled { opacity: .35; cursor: default; }
.fcbtn { height: 52px; border-radius: 14px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid; transition: transform .1s, background .15s; }
.fcbtn:active { transform: scale(.98); }
.fcbtn.learn { background: var(--amber-tint); border-color: color-mix(in srgb, var(--amber) 60%, transparent); color: #7a5200; }
.fcbtn.learn:hover { background: color-mix(in srgb, var(--amber) 22%, var(--bg)); }
.fcbtn.know { background: var(--ok); border-color: var(--ok); color: #fff; }
.fcbtn.know:hover { filter: brightness(1.06); }
.fcic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: rgba(255,255,255,.25); }
.fcbtn.learn .fcic { background: rgba(215,154,0,.18); }
:root[data-theme="dark"] .fcbtn.learn { color: var(--amber); } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fcbtn.learn { color: var(--amber); } }
.fcfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .fcctrl { grid-template-columns: 46px 1fr 1fr 46px; gap: 8px; } .fcnav { width: 46px; height: 46px; } .fcbtn { font-size: 15px; gap: 6px; padding: 0 6px; } .fckeys { display: none; } .fcic { display: none; } }
/* vocabulary homework */
.hwband { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-radius: 16px; padding: 14px 16px; background: var(--sel); border: 1.5px solid var(--accent); }
.hwband > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.hwband.done { background: var(--ok-tint); border-color: var(--ok); }
.hwic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 18px; flex: none; }
.hwband.done .hwic { background: var(--ok); }
.planner { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .planner { grid-template-columns: 1fr; } }
.chk2 { display: flex; align-items: center; gap: 8px; font-size: 15px; } .chk2 input { width: 18px; height: 18px; accent-color: var(--accent); }
.dayprev { display: flex; flex-direction: column; gap: 10px; }
.dayp { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.wordchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.wchip { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 3px 6px 3px 12px; font-size: 14px; font-weight: 600; }
.wchip:not(:has(button)) { padding-right: 12px; }
.wchip button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 12px; width: 20px; height: 20px; border-radius: 50%; }
.wchip button:hover { background: var(--bad-tint); color: var(--bad); }
.qzprog { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.qblank { font-family: var(--read); font-size: 19px; font-style: italic; margin: 0; }
.spellrow { display: flex; gap: 8px; } .spellrow input { font-size: 20px !important; letter-spacing: .03em; }
.bigcheck.meh { background: var(--amber-tint); color: #8a5a00; }
.quizdone .row.center { margin-top: 6px; }

/* teacher reports */
.rtabs { max-width: 720px; }
.misscard h2 { margin: 0; }
.misslist { margin: 4px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.misslist li { padding: 4px 0; } .misslist li b { margin-right: 8px; }
.fsel.inline { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.fsel.inline input { width: auto; }
td.cell.late { color: #8a5a00; background: var(--amber-tint) !important; }
.note.light { color: rgba(255,255,255,.7); font-weight: 400; }

/* ================= ibSAT brand: Bluebook style ================= */
body { -webkit-font-smoothing: antialiased; }
.eyebrow { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--accent); }
.eyebrow.gold { color: var(--accent); }
.hello .eyebrow, .welcome-top .eyebrow, .tcard.dark .eyebrow, .cta .eyebrow { color: var(--gold); }
h2.sect, .mini-h { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 700; }
.tile .lab, .sc .lab, .hello-stats .lab, .facts .lab, .fbwhy .lab, .mock.s .lab, .mock.r .lab { letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 500; }
.page h1, .rvh, .hello h1, .hero-copy h1, .sec-h h2, .cta h2, .tcard h2, .founder-card h2, .welcome-top h2, h1.hero { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.hero-copy h1 { line-height: 1.05; }
.page h2, .card h2 { font-family: var(--ui); font-weight: 700; letter-spacing: 0; }
.tile .val, .sc .val, .setnum b, .hello-stats b, .matchbox .val, .drill .val, .countdown b, .ring span, .fw, .pblock { font-family: var(--ui); font-weight: 700; letter-spacing: -.01em; }
.fstate { text-transform: none; letter-spacing: 0; font-size: 13px; }
/* logo */
.logo { width: 32px; height: 32px; background: none !important; border-radius: 0; padding: 0; display: inline-grid !important; }
.logo svg { width: 100%; height: 100%; display: block; }
.logo.big { width: 64px; height: 64px; }
.sitefoot .logo { width: 22px; height: 22px; }
.brand { font-family: var(--ui); font-weight: 700; font-size: 22px; letter-spacing: -.02em; gap: 10px; color: #fff; }
.bname { line-height: 1; } .bname small { font-family: var(--ui); font-weight: 400; font-size: 11px; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.75); margin-top: 3px; }
.brand.dark { color: var(--ink); } .brand.dark .bname small, .pubfoot .bname small { color: var(--muted); }
:root { --lm1: #324DC7; --lm2: #FFFFFF; --lm3: #FEDB00; }
/* black top bar, like the College Board site */
.topbar, .apphead { background: #000; color: #fff; border-bottom: none; box-shadow: none; }
.hamb { background: rgba(255,255,255,.1); } .hamb:hover { background: rgba(255,255,255,.18); }
.hamb span { background: #fff; }
.topbar .linkbtn { color: #fff; opacity: .9; }
.avatar { background: var(--gold); color: #000; }
.badge { background: var(--gold) !important; color: #000 !important; }
.pubnav { border-bottom: 1px solid var(--line); }
/* black bands with a yellow rule */
.hello, .welcome-top, .cta, .tcard.dark, .splash { background: #000 !important; color: #fff; }
.hello, .cta { box-shadow: inset 0 -6px 0 var(--gold); }
.welcome-top { box-shadow: inset 0 -5px 0 var(--gold); }
.hello::after, .welcome-top::after { display: none; }
.hello-stats > div { background: rgba(255,255,255,.09) !important; }
.hero-sec { background: var(--soft); border-bottom: 1px solid var(--line); }
.hl { background: none; padding: 0; }
.feats .fi, .ficon { background: #000; color: var(--gold); border-radius: 10px; }
.qcard svg { color: var(--accent); }
.mi.on { background: var(--sel); color: var(--accent); font-weight: 700; }
.mi.on::before { background: var(--accent); }
.nav a.on { box-shadow: inset 0 -3px 0 var(--gold); }
/* Bluebook pill buttons */
.btn, .primary, .sec { border-radius: 999px; font-weight: 700; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #000; }
.chip { border-radius: 4px; font-weight: 500; }
.chipbtn, .pillseg, .pillseg button { border-radius: 999px; }
.card, .tile, .sc, .setcard, .fcard, .steps li, .tcard, .qcard, .founder-card, .dom, .mixcol, .dayp, .welcome { border-radius: 8px; }
.sc.big { background: #000; border-color: #000; color: #fff; }
.code { font-family: var(--ui); font-weight: 700; letter-spacing: .14em; color: var(--accent); }
.steps li::before { background: #000; color: var(--gold); font-family: var(--ui); }
.mock.r { background: #000; } .mock.r li b { background: var(--gold); color: #000; }
.mock.s b { color: var(--accent); }
.p1 .pblock { background: var(--gold); color: #000; } .pod.p1 .pav { background: var(--gold); color: #000; }
.fface.front { background: #000 !important; }
.welcome-quote { border-left-color: var(--gold); }
.sig { color: var(--ink); }
.splash b { font-family: var(--ui); font-weight: 700; letter-spacing: -.02em; font-size: 32px; }
.splash span:not(.logo) { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; color: rgba(255,255,255,.75); }
.splash .spin { border-top-color: var(--gold); }
.calc-h { background: #000; }

/* ---- the test screen: as close to Bluebook as possible ---- */
#app.exam { background: #fff; }
.top { background: #fff; border-bottom: none; box-shadow: none; padding-block: 12px 14px; position: sticky; }
.top::after, .bot::before { content: ""; position: absolute; left: 0; right: 0; height: 3px;
  background: repeating-linear-gradient(90deg, #4B4B4B 0 12px, transparent 12px 16px); opacity: .55; }
.top::after { bottom: 0; } .bot::before { top: 0; }
.bot { background: #fff; border-top: none; position: sticky; }
.secname { font-family: var(--ui); font-weight: 700; font-size: 17px; }
.link { font-family: var(--ui); font-weight: 500; }
.timer { font-family: var(--ui); font-weight: 700; font-size: 20px; }
.pill { border: 1px solid #1E1E1E; font-weight: 500; }
.tool { font-family: var(--ui); font-weight: 500; color: #1E1E1E; }
.tool.on { background: none; color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.qhead { background: #F0F0F0; border-bottom: 3px dashed #8C8C8C; margin-bottom: 18px; }
.qnum { background: #000; color: #fff; font-family: var(--ui); font-weight: 700; min-width: 34px; padding: 6px 10px; }
.mark { font-family: var(--ui); font-weight: 500; color: #1E1E1E; }
.mark.on .flag { color: var(--bad); }
.body.split .passage { border-right: 4px solid #D9D9D9; }
.passage p, .stem, .psg { font-family: var(--read); color: #1E1E1E; }
.passage p { font-size: 18px; line-height: 1.7; }
.stem { font-size: 18px; line-height: 1.6; }
.choice { border: 1px solid #1E1E1E; border-radius: 8px; background: #fff; font-family: var(--read); font-size: 17px; min-height: 50px; }
.choice:hover { border-color: var(--accent); }
.choice .L { border: 1.5px solid #1E1E1E; font-family: var(--ui); font-weight: 700; font-size: 14px; width: 28px; height: 28px; }
.choice.sel { border: 3px solid var(--accent); background: #fff; padding: 8px 12px; }
.choice.sel .L { background: var(--accent); color: #fff; border-color: var(--accent); }
.strike { background: #fff; border: 1px solid #1E1E1E; border-radius: 8px; }
.spr input { border: 1px solid #1E1E1E; border-radius: 6px; }
.who { font-family: var(--ui); font-weight: 700; }
.navbtn { background: #000; color: #fff; border-radius: 6px; font-family: var(--ui); font-weight: 700; padding: 8px 16px; }
.bb .primary, .bb .sec { background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 999px; padding: 9px 26px; min-height: 42px; font-family: var(--ui); font-weight: 700; }
.bb .sec:disabled { background: #fff; color: #9AA0A6; border-color: #C4C7CC; opacity: 1; }
.gq { background: var(--accent); border-color: var(--accent); border-radius: 4px; }
.gq.un { background: #fff; color: var(--accent); border: 1.5px dashed #1E1E1E; }
.modal { border-radius: 10px; }
@media (max-width: 760px) { .bb .primary, .bb .sec { padding: 8px 16px; } .bb { gap: 6px; } .bot { gap: 8px; } }
/* public header: black like the app bar */
.pubnav { background: #000; border-bottom: none; }
.pubnav .brand.dark { color: #fff; } .pubnav .brand.dark .bname small { color: rgba(255,255,255,.75); }
.pubnav .publinks a { color: rgba(255,255,255,.85); } .pubnav .publinks a:hover { color: #fff; }
.pubnav .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); background: transparent; }

/* ================= Update 12 ================= */
/* wordmark: light "ib", bold "SAT" */
.wm { font-family: var(--ui); font-weight: 400; letter-spacing: -.02em; }
.wm b { font-weight: 800; letter-spacing: -.01em; }
.brand .wm { font-size: 22px; }
.splash b.wm { font-size: 34px; font-weight: 400; color: #fff; }
.sitefoot .wm { font-size: 14px; }
.logo { border-radius: 0; }
/* homework states and types */
.chip.st-draft { background: var(--chip); color: var(--muted); }
.chip.st-sched { background: #FFF6CC; color: #6B5300; }
.chip.st-open { background: var(--sel); color: var(--accent); }
.chip.st-closed { background: var(--chip); color: var(--ink); }
.chip.st-rel { background: var(--ok-tint); color: var(--ok); }
.chip.k-test { background: #000; color: #fff; } .chip.k-quiz { background: #EDE7FB; color: #4B2A9A; }
:root[data-theme="dark"] .chip.k-test { background: #EDEDED; color: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.k-test { background: #EDEDED; color: #111; } :root:not([data-theme="light"]) .chip.st-sched { background: #3A3015; color: #F2D36B; } }
/* difficulty on practice questions */
.qhead { display: flex; align-items: center; }
.qdiff { margin-left: auto; margin-right: 10px; font: 600 13px var(--ui); padding: 2px 10px; border-radius: 4px; }
.qdiff.d-E { background: #E4F6EC; color: #137a46; } .qdiff.d-M { background: #FFF1CC; color: #7a5200; } .qdiff.d-H { background: var(--bad-tint); color: var(--bad); }
/* library */
.libbar { align-items: center; } .libbar input[type=search] { max-width: 260px; }
.chips .sep { width: 1px; background: var(--line); margin: 0 4px; align-self: stretch; }
.librow { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.librow h2 { margin: 2px 0; }
.uses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.use { font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.use:hover { border-color: var(--accent); color: var(--accent); }
.libpick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.libpick > div { display: flex; flex-direction: column; gap: 3px; }
.pvlist { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; } .pvlist .linkbtn { text-align: left; }
.chk2 { display: flex; gap: 8px; align-items: center; font-size: 15px; }
/* materials */
.resrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.resrow:first-child { border-top: none; }
.resrow .hwmain { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.resrow.hid { opacity: .55; }
.resic { width: 34px; height: 34px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--sel); color: var(--accent); font-weight: 700; }
.resgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rescard { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--bg); }
a.rescard:hover { border-color: var(--accent); }
.rescard > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rescard .host { color: var(--accent); }
.rescard.note-r { flex-direction: column; gap: 4px; } .rescard.note-r p { margin: 0; }
.card > .rescard + .rescard { margin-top: 8px; }
/* student class pages */
.notice { border-left: 5px solid var(--gold); } .notice p { margin: 4px 0 0; font-size: 16.5px; line-height: 1.6; }
.sclass .enter { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--accent); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tabs .dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; margin-left: 4px; }
.val.sm { font-size: 15px; font-weight: 700; white-space: nowrap; }
/* coverage table */
.cov td, .cov th { padding: 7px 10px; } .cov .domrow td { background: var(--soft); padding-top: 10px; }
.cov tr.empty td:first-child { color: var(--muted); } .cov tr.empty td:first-child::after { content: " · needs questions"; font-size: 12px; color: var(--bad); }
.dest select, .dest input[type=text] { max-width: 100%; min-width: 0; }
.dest .opt { flex-wrap: nowrap; align-items: baseline; }
.dest .opt > input[type=radio], .dest .opt > input[type=checkbox] { flex: none; }

/* ================= Update 13: vocabulary ================= */
.vcwrap { position: relative; display: flex; }
.vcwrap > .card { flex: 1; }
.vdel { position: absolute; top: 10px; right: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--bad); font: 600 12px var(--ui); border-radius: 999px; padding: 3px 10px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.vcwrap:hover .vdel, .vdel:focus-visible, .vdel[data-sure] { opacity: 1; }
@media (hover: none) { .vdel { opacity: 1; } }
.vcwrap .vcard h2 { padding-right: 64px; }
.hidcol .grid3 { opacity: .55; }
.colact { flex-wrap: wrap; justify-content: flex-end; }
.mini-num { width: 76px !important; display: inline-block; padding: 6px 8px; margin: 0 4px; }
.splitnote { margin: 4px 0 0 26px; color: var(--accent); font-weight: 600; }
.vdays { display: flex; flex-direction: column; }
.vdayrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.vdayrow:first-child { border-top: none; }
.vdayrow .hwmain { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.vdaybar { display: flex; align-items: center; gap: 10px; } .vdaybar .track { flex: 1; max-width: 320px; }
.hwline.locked { opacity: .6; }
.vprog { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; } .vprog .track { max-width: 420px; }
/* ================= Update 14: vocabulary control ================= */
.vcwrap { flex-direction: column; gap: 6px; }
.vcact { display: flex; gap: 14px; padding: 0 4px; }
.vcard .share { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px; align-self: flex-start; }
.vcard .share.on { background: var(--ok-tint); color: var(--ok); } .vcard .share.off { background: var(--chip); color: var(--muted); }
.vcard.offlist { background: var(--soft); }
.acccls { display: flex; flex-direction: column; gap: 6px; padding-left: 26px; }
.todayv { border-left: 5px solid var(--gold); }
.todayv h2 { margin: 2px 0 0; }

/* ================= Update 15: bright & professional ================= */
:root:not([data-theme="dark"]) {
  --bg: #FFFFFF; --soft: #F4F7FE; --ink: #18213D; --muted: #5A6688; --line: #E2E8F5; --rule: #9AA6C4;
  --accent: #2F54EB; --sel: #EBF0FF; --chip: #EEF2FA; --gold: #FFC53D;
  --grad: linear-gradient(120deg, #2F54EB 0%, #4C6EF5 45%, #1FB5D1 100%);
  --shadow: 0 1px 2px rgba(24,33,61,.04), 0 6px 20px rgba(47,84,235,.07);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --grad: linear-gradient(120deg, #2440B8 0%, #3651D1 50%, #13839A 100%); --shadow: none; } }
#app.plain, body { background: var(--soft); }
/* white top bar */
.topbar, .apphead, .pubnav { background: rgba(255,255,255,.92) !important; color: var(--ink) !important; border-bottom: 1px solid var(--line) !important; box-shadow: 0 2px 14px rgba(24,33,61,.05) !important; backdrop-filter: saturate(1.4) blur(8px); }
.topbar .brand, .pubnav .brand, .pubnav .brand.dark { color: var(--ink) !important; }
.topbar .bname small, .pubnav .brand.dark .bname small { color: var(--muted) !important; }
.hamb { background: var(--sel) !important; } .hamb:hover { background: #DCE5FF !important; }
.hamb span { background: var(--accent) !important; }
.topbar .linkbtn { color: var(--accent) !important; font-weight: 600; }
.topbar .mename { color: var(--ink); }
.avatar { background: var(--gold); color: #3B2A00; }
.pubnav .publinks a { color: var(--muted) !important; } .pubnav .publinks a:hover { color: var(--accent) !important; }
.pubnav .btn.ghost { color: var(--accent) !important; border-color: var(--accent) !important; }
/* gradient banners instead of black */
.hello, .cta, .tcard.dark, .welcome-top, .splash { background: var(--grad) !important; color: #fff; box-shadow: 0 12px 32px rgba(47,84,235,.22) !important; position: relative; overflow: hidden; }
.hello::before, .cta::before, .welcome-top::before { content: ""; position: absolute; width: 360px; height: 360px; right: -90px; top: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 65%); pointer-events: none; }
.hello > *, .cta > *, .welcome-top > * { position: relative; }
.hello-stats > div { background: rgba(255,255,255,.18) !important; border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(4px); }
.hello .eyebrow, .welcome-top .eyebrow, .tcard.dark .eyebrow, .cta .eyebrow { color: #FFE58F !important; }
.splash { background: var(--grad) !important; }
/* cards float a little */
.card, .tile, .setcard, .fcard, .qcard, .classcard, .steps li, .tcard:not(.dark), .founder-card, .rescard { box-shadow: var(--shadow); border-color: var(--line); }
a.card:hover, a.setcard:hover, a.classcard:hover, a.qcard:hover { border-color: #B9C8FF; box-shadow: 0 2px 4px rgba(24,33,61,.05), 0 10px 28px rgba(47,84,235,.14); }
/* buttons */
.btn:not(.ghost):not(.danger):not(.gold) { background: linear-gradient(135deg, #3F63F3, #2F54EB); border-color: #2F54EB; box-shadow: 0 4px 12px rgba(47,84,235,.25); }
.btn:not(.ghost):not(.danger):not(.gold):hover { background: linear-gradient(135deg, #4A6CF7, #2647D6); }
.btn.gold { background: var(--gold) !important; color: #3B2A00 !important; border-color: var(--gold) !important; }
/* icons, steps, chips, numbers */
.ficon, .feats .fi { background: var(--grad) !important; color: #fff !important; }
.steps li::before { background: var(--grad) !important; color: #fff !important; }
.sc.big { background: var(--grad) !important; border: none !important; color: #fff; }
.chip.k-test { background: #F1E8FF; color: #6B2FD6; }
.chip.k-quiz { background: #E6F9FC; color: #0B7A91; }
.mock.r { background: var(--grad) !important; } .mock.r li b { background: #fff !important; color: var(--accent) !important; }
.fface.front { background: var(--grad) !important; }
.calc-h { background: var(--accent) !important; }
.welcome-quote { border-left-color: var(--accent) !important; }
.notice, .todayv { border-left-color: var(--accent) !important; }
.mi.on { background: var(--sel); color: var(--accent); }
.mi.on::before { background: var(--grad) !important; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.qnum { background: #18213D; }
/* bright landing hero */
.hero-sec { background: radial-gradient(900px 420px at 92% -10%, rgba(31,181,209,.18), transparent 60%), radial-gradient(800px 420px at 0% 0%, rgba(47,84,235,.12), transparent 55%), var(--soft) !important; border-bottom: 1px solid var(--line); }
.hero-copy h1 { background: linear-gradient(120deg, #18213D 30%, #2F54EB 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sitefoot, .pubfoot { background: transparent; }
.welcome-top, .splash, .hello, .cta, .tcard.dark { --lm1: #FFFFFF; --lm2: #2F54EB; --lm3: #FFC53D; }
.uses { flex-direction: column; align-items: flex-start; gap: 8px; }
.userow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.classcard .enter { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--accent); }
/* homework builder: Easy / Medium / Hard per set */
.rrow.drow { flex-direction: column; align-items: stretch; gap: 8px; }
.dgrid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dpick { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dpick span { display: flex; justify-content: space-between; } .dpick i { font-style: normal; font-weight: 500; }
.dpick input { width: 100% !important; text-align: center; padding: 7px 4px !important; font-variant-numeric: tabular-nums; }
.dpick.d-E span { color: #137a46; } .dpick.d-M span { color: #8a5a00; } .dpick.d-H span { color: var(--bad); }
.dpick.none { opacity: .45; }
.three { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 8px; }
@media (max-width: 600px) { .three { grid-template-columns: 1fr; } }
.bankp .domlist { max-height: 46vh; }
.skfoot { gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.skfoot input[type=number] { width: 80px; }
.bankp .fblock { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
