/* Make your own test (practice.js) on mistakes.html. Same look as the teacher panel's Assign work, for students. */
.ct { margin: 8px 0 34px; }
.ct-head h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.01em; }
.ct-head p { margin: 0 0 16px; color: var(--muted); }
.ct-box { padding: 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.ct-box h3 { display: flex; gap: 8px; align-items: baseline; margin: 0 0 12px; font-size: 17px; }
.ct-box h3 small { color: var(--muted); font-size: 13px; font-weight: 600; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ct-grid > .ct-box { margin-bottom: 0; }
@media (max-width: 860px) { .ct-grid { grid-template-columns: 1fr; gap: 0; } .ct-grid > .ct-box { margin-bottom: 14px; } }

/* chapters by domain, folding */
.ct-doms { display: grid; gap: 8px; }
.ct-dom { border: 1px solid var(--line); border-radius: 12px; }
.ct-dom > summary { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 14px; list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.ct-dom > summary::-webkit-details-marker { display: none; }
.ct-dom > summary small { margin-left: auto; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.ct-dom > summary::after { content: ""; width: 7px; height: 7px; margin-left: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.ct-dom[open] > summary::after { transform: rotate(-135deg); }
.ct-dom[open] > summary { border-bottom: 1px solid var(--line); }
.ct-tag { padding: 1px 8px; border-radius: 99px; background: var(--accent-fill); color: #fff; font-size: 11.5px; }
.ct-chs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; padding: 8px; }
.ct-ck, .ct-row { display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 6px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.ct-ck span, .ct-row span { flex: 1; min-width: 0; }
.ct-ck input, .ct-row input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent-fill); }
.ct-ck:hover, .ct-row:hover { background: var(--bg); }
.ct-ck.on { background: var(--accent-soft); font-weight: 600; }

/* topics: one-line rows */
.ct-tch { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ct-tch-h { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.ct-tch-h b { flex: 1; }
.ct-row { border-radius: 0; border-top: 1px solid var(--line); }
.ct-tch-h + .ct-row { border-top: 0; }
.ct-row.on { background: var(--accent-soft); }
.ct-row small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ct-empty { margin: 0; color: var(--muted); }
.ct-mini { min-height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* settings: small boxes side by side */
.ct-set { display: flex; flex-wrap: wrap; gap: 10px; }
.ct-g { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ct-k { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ct-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ct-chip { display: inline-flex; gap: 7px; align-items: center; min-height: 34px; padding: 0 12px 0 9px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ct-chip::before { content: ""; flex: none; width: 15px; height: 15px; border: 1.6px solid var(--muted); border-radius: 4px; }
.ct-chip:hover { background: var(--accent-soft); }
.ct-chip.on { background: var(--accent-soft); }
.ct-chip.on::before { border-color: var(--accent-fill); background: var(--accent-fill) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M3.5 8.5l3 3 6-7%27 fill=%27none%27 stroke=%27white%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E") center/12px no-repeat; }
.ct-stp { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.ct-stp b { min-width: 26px; text-align: center; font-size: 16px; }
.ct-stp .ct-chip { width: 34px; padding: 0; justify-content: center; border: 1px solid var(--line); border-radius: 50%; font-size: 17px; }
.ct-stp .ct-chip::before { display: none; }

/* start */
.ct-go { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 16px 18px; margin-bottom: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ct-sum { margin: 0; font-size: 15.5px; }
.ct-sum small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.ct-sum.bad { color: #d93025; }
.ct-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 99px; background: var(--accent-fill); color: #fff; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; text-decoration: none; }
.ct-btn.big { min-height: 50px; padding: 0 28px; font-size: 16px; }
.ct-btn.plain { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ct-btn.plain.on { border-color: #f2a900; color: #b07a00; }
.ct-btn:disabled { opacity: .45; cursor: default; }
.ct-resume { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; margin-bottom: 14px; border-radius: 16px; border: 1.5px solid var(--accent-fill); background: var(--accent-soft); }
.ct-resume span { flex: 1; min-width: 180px; }
.ct-resume small { display: block; color: var(--muted); }
.ct-hrow { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ct-hrow:first-of-type { border-top: 0; }
.ct-hrow span { flex: 1; }
.ct-hrow small { display: block; color: var(--muted); font-size: 12.5px; }
.ct-hs { font-size: 17px; }

/* the test: full screen */
html.ct-on { overflow: hidden; }
.ct-run { position: fixed; inset: 0; z-index: 200; overflow-y: auto; background: var(--bg); color: var(--ink); }
.ct-load { display: grid; place-items: center; gap: 12px; min-height: 60vh; margin: 0; color: var(--muted); text-align: center; }
.ct-bar { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ct-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-clock { padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.ct-clock.low { background: #fde8e6; color: #d93025; }
.ct-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
.ct-q { min-width: 0; }
.ct-qh { margin: 0 0 10px; font-weight: 800; }
.ct-qh span { margin-left: 6px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.ct-stem { font-size: 16px; line-height: 1.55; overflow-x: auto; }
.ct-stem img { max-width: 100%; height: auto; }
.ct-opts { display: grid; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.ct-opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ct-opt:hover { border-color: var(--accent); }
.ct-opt.on { border-color: var(--accent-fill); background: var(--accent-soft); }
.ct-l { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); font-weight: 800; font-size: 13px; }
.ct-opt.on .ct-l { background: var(--accent-fill); color: #fff; }
.ct-ob { flex: 1; min-width: 0; overflow-x: auto; }
.ct-num { display: grid; gap: 6px; margin: 16px 0; font-weight: 600; }
.ct-num input { max-width: 240px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.ct-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-nav #ct-next { margin-left: auto; }
.ct-pal { position: sticky; top: 74px; align-self: start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ct-paltog { display: none; }
.ct-palg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ct-p { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.ct-p.ans { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.ct-p.skip { background: #fde8e6; border-color: #f2b8b2; color: #b3261e; }
.ct-p.flag { box-shadow: inset 0 0 0 2px #f2a900; }
.ct-p.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.ct-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.ct-key i { display: inline-block; width: 11px; height: 11px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }
.ct-key i.ans { background: #1f9d55; } .ct-key i.skip { background: #f2b8b2; } .ct-key i.flag { box-shadow: inset 0 0 0 2px #f2a900; }
@media (max-width: 820px) {
  .ct-body { grid-template-columns: 1fr; padding-bottom: 90px; }
  .ct-pal { position: fixed; left: 0; right: 0; bottom: 0; top: auto; border-radius: 16px 16px 0 0; padding: 8px 12px 12px; box-shadow: 0 -8px 24px -12px rgba(0,0,0,.4); }
  .ct-paltog { display: block; width: 100%; min-height: 40px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
  .ct-pal:not(.open) .ct-palg, .ct-pal:not(.open) .ct-key { display: none; }
  .ct-palg { grid-template-columns: repeat(8, 1fr); max-height: 40vh; overflow-y: auto; }
}
.ct-ask { position: fixed; inset: 0; z-index: 3; display: grid; place-items: center; padding: 16px; background: rgba(10, 8, 30, .55); }
.ct-ask > div { width: min(420px, 100%); padding: 22px; border-radius: 18px; background: var(--surface); }
.ct-ask h3 { margin: 0 0 8px; }
.ct-askb { display: flex; gap: 8px; margin-top: 16px; }

/* result */
.ct-res { max-width: 860px; margin: 0 auto; padding: 18px 16px 60px; }
.ct-note { padding: 10px 14px; border-radius: 12px; background: #fff4d6; color: #7a5300; }
.ct-score { display: flex; gap: 14px; align-items: baseline; margin: 6px 0 12px; }
.ct-score b { font-size: 46px; letter-spacing: -.02em; }
.ct-score b small { font-size: 22px; color: var(--muted); }
.ct-score span { color: var(--muted); font-weight: 600; }
.ct-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ct-stats span { display: grid; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.ct-stats b { color: var(--ink); font-size: 22px; }
.ct-stats .good b { color: #1f9d55; } .ct-stats .bad b { color: #d93025; }
.ct-res h3 { margin: 24px 0 10px; }
.ct-tops { display: grid; gap: 6px; }
.ct-top { display: grid; grid-template-columns: minmax(0, 1fr) 120px 44px; gap: 10px; align-items: center; font-size: 14px; }
.ct-top i { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.ct-top i b { display: block; height: 100%; background: var(--accent-fill); }
.ct-top small { text-align: right; color: var(--muted); }
.ct-again { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ct-rq { margin-bottom: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; }
.ct-rq.good { border-left-color: #1f9d55; } .ct-rq.bad { border-left-color: #d93025; } .ct-rq.skip { border-left-color: var(--line); }
.ct-opts.done .ct-opt { cursor: default; }
.ct-opt.right { border-color: #1f9d55; background: #e8f6ee; color: #10301e; }
.ct-opt.wrong { border-color: #d93025; background: #fde8e6; color: #3b0b07; }
.ct-ya { margin: 6px 0 0; font-size: 14px; }
.ct-sol { margin-top: 8px; }
.ct-sol summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.ct-sol > div { margin-top: 8px; font-size: 15px; line-height: 1.55; overflow-x: auto; }
@media (max-width: 560px) {
  .ct-chs { grid-template-columns: 1fr; }
  .ct-stats { grid-template-columns: repeat(2, 1fr); }
  .ct-top { grid-template-columns: minmax(0, 1fr) 80px 40px; }
  .ct-go .ct-btn.big { width: 100%; }
}
.ct-ob, .ct-stem, .ct-sol > div { overflow-y: hidden; padding-bottom: 2px; }
.ct-opt.right .ct-l { background: #1f9d55; color: #fff; } .ct-opt.wrong .ct-l { background: #d93025; color: #fff; }

.ct-pro { margin-left: 6px; padding: 3px 9px; border-radius: 7px; background: linear-gradient(120deg, #6a3fd1, #8b5cf6); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; vertical-align: 5px; }
