﻿:root {
  --ink: #172033;
  --muted: #677084;
  --line: #d8dee8;
  --soft: #f4f7fb;
  --panel: #ffffff;
  --primary: #2457d6;
  --primary-dark: #1743a9;
  --accent: #0f9f7a;
  --warn: #c67900;
  --danger: #c43d32;
  --shadow: 0 12px 30px rgba(23, 32, 51, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef2f7;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(500px, 1.1fr);
  background:
    linear-gradient(120deg, rgba(36, 87, 214, 0.96), rgba(15, 159, 122, 0.88)),
    url("https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.brand-side {
  color: #fff;
  padding: 54px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  font-size: 24px;
  font-weight: 800;
}

.brand-side h1 {
  max-width: 520px;
  margin: 0 0 18px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-side p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px;
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(12px);
}

.login-card {
  width: min(440px, 100%);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 36px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.login-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.subtle {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.field {
  margin: 16px 0;
}

.field label {
  display: block;
  color: #364156;
  font-size: 14px;
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  outline: none;
  background: #fff;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
}

.btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  background: #e9edf5;
  color: #263247;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.btn.ghost.active {
  border-color: var(--primary);
  background: #eef4ff;
  color: var(--primary);
}

.btn.ghost.danger {
  border-color: #f1b4ad;
  color: #a83228;
  background: #fff8f7;
}

.btn.ghost.danger:hover {
  border-color: #d94b40;
  color: #8f211a;
}

.btn.full {
  width: 100%;
  margin-top: 12px;
}

.btn.small {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.login-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
}

.alert {
  border: 1px solid #f0c36f;
  background: #fff7df;
  color: #7a4b00;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 14px 0;
  line-height: 1.5;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar {
  background: #101827;
  color: #cbd4e2;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  padding: 0;
  border-bottom: 0;
  flex: 0 0 auto;
}

.side-logo span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--primary);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-button {
  width: auto;
  min-height: 38px;
  border-radius: 6px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  color: #d7dfec;
  background: transparent;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}

.nav-button.active,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.content {
  min-width: 0;
  flex: 1;
  background: var(--soft);
}

.shell.review-focus {
  grid-template-columns: 1fr;
}

.shell.review-focus .sidebar,
.shell.review-focus .topbar {
  display: none;
}

.shell.review-focus .content {
  background: #fff;
}

.shell.review-focus .main {
  min-height: 100vh;
  padding: 0;
  background: #fff;
}

.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dce6ff;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.main {
  padding: 28px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.admin-card {
  min-height: 144px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.admin-card:hover {
  border-color: var(--primary);
  box-shadow: 0 14px 32px rgba(36, 87, 214, 0.12);
}

.admin-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.admin-card small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
}

.progress-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
}

.progress-card {
  min-width: 0;
}

.progress-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
}

.progress-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.progress-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.progress-summary strong {
  font-size: 24px;
}

.weak-tags {
  padding: 0 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-list {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.progress-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.progress-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.section-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.exam-list {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 18px 22px 24px;
  display: grid;
  gap: 14px;
}

.record-groups {
  padding: 18px 20px 24px;
  display: grid;
  gap: 22px;
}

.record-group h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  text-align: left;
}

.record-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.08);
}

.record-card strong,
.record-card small {
  display: block;
}

.record-card small {
  color: var(--muted);
  margin-top: 5px;
}

.record-score {
  font-weight: 800;
  font-size: 24px;
  text-align: right;
}

.record-score small {
  font-size: 13px;
  font-weight: 600;
}

.category-landing {
  padding: 24px 26px 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.category-landing.two {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.category-landing.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 28px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card.compact {
  min-height: 124px;
  padding: 24px 26px;
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.1);
  transform: translateY(-1px);
}

.category-card strong {
  display: block;
  font-size: 25px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-card strong small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.category-card span {
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-card.compact strong {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.category-card.compact span {
  font-size: 16px;
}

.category-kicker {
  color: var(--primary) !important;
  font-size: 13px;
  font-weight: 800;
}

.category-tabs {
  padding: 16px 16px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.category-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  text-align: left;
  color: var(--ink);
}

.category-tabs button.active {
  border-color: var(--primary);
  background: #eef3ff;
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.08);
}

.category-tabs strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.category-tabs span {
  color: var(--muted);
  font-size: 12px;
}

.search-row {
  width: min(860px, calc(100% - 52px));
  margin: 18px auto 4px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #f6f9fe;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.05);
}

.search-input-wrap {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.search-row input {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0 15px;
  outline: none;
  background: #fff;
  font-size: 15px;
}

.search-submit {
  height: 34px;
  min-width: 92px;
  margin-right: 4px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.search-row input:focus {
  box-shadow: none;
}

.search-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
}

.search-row .btn {
  height: 42px;
  min-width: 76px;
  background: #fff;
}

.search-results-head {
  padding: 16px 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.exam-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  background: #fff;
  display: block;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.exam-row h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.exam-row-main {
  max-width: 980px;
}

.exam-row-bottom {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.exam-row-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.exam-row-actions .btn {
  min-width: 88px;
  height: 42px;
  border-radius: 8px;
}

.student-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.student-form input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  outline: none;
}

.student-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
}

.stack-actions {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.student-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 20px;
  align-items: start;
}

.student-edit-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(190px, 1fr);
  gap: 12px;
  max-width: 620px;
  margin: 12px 0;
}

.student-edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.student-edit-grid input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.student-edit-grid input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3155a4;
  font-size: 12px;
  font-weight: 700;
}

.exam-screen {
  height: 100vh;
  display: grid;
  grid-template-rows: 62px 1fr 64px;
  background: #f7f8fa;
  overflow: hidden;
}

.exam-top {
  background: #fbfcff;
  border-bottom: 1px solid #d9dde5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 6px 18px;
  gap: 16px;
}

.exam-title {
  font-weight: 800;
  min-width: 0;
}

.exam-title span {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  max-width: 44vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-title small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  max-width: 48vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer {
  min-width: 128px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: #101827;
  padding: 2px 10px;
}

.timer small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.timer-value {
  display: block;
}

.timer.timer-hidden .timer-value {
  color: #8b95a7;
  letter-spacing: 1px;
}

.exam-actions {
  justify-self: end;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.exam-actions .btn {
  height: 36px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 8px;
}

.break-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(420px, 1.15fr);
  align-items: center;
  gap: 90px;
  padding: 56px min(9vw, 110px);
  background: #202020;
  color: #fff;
}

.break-panel {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.break-panel h1 {
  margin: 0 0 14px;
  font-size: 34px;
  font-weight: 800;
}

.break-timer {
  max-width: 320px;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 20px 18px;
  font-size: 58px;
  font-weight: 800;
  color: #fff;
  margin: 28px 0;
  text-align: center;
}

.break-panel .btn.primary {
  background: #ffd600;
  color: #111827;
  border-color: #ffd600;
  border-radius: 999px;
  min-width: 170px;
}

.break-panel .subtle {
  color: #e5e7eb;
  font-size: 17px;
  line-height: 1.55;
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.tool-head h3 {
  margin: 0;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.reference-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.reference-grid p {
  margin: 8px 0 0;
}

.reference-image {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.desmos-calculator {
  width: 100%;
  height: calc(100vh - 382px);
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.desmos-iframe {
  display: block;
}

.desmos-shell {
  display: grid;
  grid-template-rows: minmax(320px, 1fr);
  gap: 10px;
  min-height: 0;
}

.desmos-loading {
  height: 100%;
  display: grid;
  place-items: center;
  color: #5b667a;
  font-weight: 700;
}

.exam-body {
  display: grid;
  grid-template-columns: minmax(330px, 0.96fr) minmax(500px, 1.18fr);
  min-height: 0;
  height: 100%;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}

.exam-body.with-tool {
  grid-template-columns: minmax(320px, 420px) minmax(300px, 0.82fr) minmax(460px, 1.08fr);
  max-width: 1600px;
}

.exam-body.no-passage {
  grid-template-columns: minmax(520px, 1fr);
}

.exam-body.with-tool.no-passage {
  grid-template-columns: minmax(520px, 620px) minmax(520px, 1fr);
  max-width: 1540px;
}

.exam-body.with-tool.no-passage.tool-calculator {
  grid-template-columns: minmax(620px, 760px) minmax(520px, 1fr);
  max-width: 1600px;
}

.exam-body.check-work-open {
  display: block;
  max-width: none;
  background: #f8fafc;
}

.exam-tool-panel {
  overflow: auto;
  min-height: 0;
  padding: 18px;
  background: #f8fafc;
  border-right: 2px solid #d9dde5;
}

.exam-tool-panel.calculator-tool {
  padding: 12px;
}

.passage,
.question-panel {
  overflow: auto;
  min-height: 0;
  padding: 22px 28px;
}

.passage {
  background: #fff;
  border-right: 2px solid #d9dde5;
  font-size: 18px;
  line-height: 1.58;
  overflow-wrap: normal;
  word-break: normal;
}

.passage p {
  margin: 0 0 10px;
}

.passage ul,
.passage ol {
  margin: 8px 0 12px 22px;
  padding-left: 18px;
}

.passage li {
  margin: 4px 0;
}

.passage-title {
  margin: 0 0 10px;
  color: #526078;
  font-size: 13px;
  font-weight: 800;
}

.passage u,
.passage ins,
.question-text u,
.question-text ins {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: auto;
}

.directions-panel {
  border: 1px solid #cfd5df;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 18px;
}

.directions-panel summary {
  min-height: 46px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  color: #172033;
}

.directions-content {
  border-top: 1px solid #d9dde5;
  padding: 14px;
  background: #fff;
}

.directions-content h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.directions-content img {
  max-width: 100%;
  height: auto;
}

.question-panel {
  background: #fff;
}

.question-card {
  max-width: 720px;
  margin: 0 auto;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  color: #334155;
  margin-bottom: 16px;
  font-weight: 800;
  font-size: 15px;
  min-height: 42px;
  border-bottom: 2px dashed #111827;
  background: #f3f4f6;
}

.question-number-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.mark-review-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #1f2937;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.bookmark-icon {
  width: 15px;
  height: 22px;
  display: inline-block;
  border: 2px solid #1f2937;
  border-bottom: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}

.mark-review-button.active .bookmark-icon {
  background: #cf3450;
  border-color: #cf3450;
}

.question-text {
  font-size: 18px;
  line-height: 1.48;
  margin-bottom: 14px;
  overflow-wrap: normal;
  word-break: normal;
}

.passage mjx-container,
.question-card mjx-container,
.review-item mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.choice mjx-container {
  max-width: 100%;
}

.choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  margin: 8px 0;
}

.choice {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid #737b88;
  border-radius: 8px;
  padding: 10px 13px;
  margin: 0;
}

.choice-content {
  font-size: 17px;
  line-height: 1.34;
  overflow-wrap: normal;
  word-break: normal;
}

.choice-row.selected .choice {
  border-color: var(--primary);
  background: #eef4ff;
}

.choice-letter {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #8c96a8;
  background: #fff;
  font-weight: 800;
}

.choice-row.selected .choice-letter {
  background: var(--primary);
  color: #fff;
}

.choice-row.crossed .choice {
  opacity: 0.58;
}

.choice-row.crossed .choice-content {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.choice-crossout {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #1f2937;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.choice-crossout span {
  width: 27px;
  height: 27px;
  border: 2px solid #1f2937;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  position: relative;
}

.choice-crossout span::after {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  top: 50%;
  border-top: 2px solid #1f2937;
  transform: translateY(-50%);
}

.choice-crossout.active span {
  background: #eef4ff;
  border-color: var(--primary);
  color: var(--primary);
}

.choice-crossout.active span::after {
  border-color: var(--primary);
}

.grid-in-card {
  width: fit-content;
  max-width: 100%;
  border: 1px solid #c9d1df;
  border-radius: 6px;
  padding: 12px 16px;
  background: #fff;
  margin-top: 14px;
}

.grid-in-card label {
  display: block;
  color: #172033;
  font-weight: 800;
  margin-bottom: 10px;
  font-size: 14px;
}

.grid-in-answer-line {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.grid-in-card input {
  width: 238px;
  height: 38px;
  border: 0;
  border-bottom: 3px solid #1f2937;
  border-radius: 0;
  padding: 0 4px;
  font-size: 18px;
  font-weight: 700;
  outline: none;
  text-align: center;
  letter-spacing: 0;
  background: transparent;
}

.grid-in-card input:focus {
  border-color: var(--primary);
  box-shadow: none;
}

.grid-in-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}


.review-panel {
  background: #f8fafc;
  border-left: 2px solid #d9dde5;
}

.review-panel h3 {
  margin-top: 0;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.answer-dot {
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
  color: var(--ink);
}

.answer-dot.current {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.answer-dot.done {
  background: #e8f7f2;
  border-color: #8bd1bd;
}

.answer-dot.flagged {
  background: #fff6df;
  border-color: #e2b94a;
}

.module-progress {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.exam-bottom {
  background: #fff;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
}

.exam-bottom > div:last-child {
  justify-self: end;
}

.exam-question-center {
  justify-self: center;
}

.question-navigator {
  min-width: 174px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.question-navigator::after {
  content: "^";
  margin-left: 8px;
  font-size: 14px;
}

.question-navigator.active::after {
  content: "v";
}

.check-work-panel {
  height: 100%;
  overflow: auto;
  padding: 22px 24px 28px;
  background: #f8fafc;
}

.check-work-copy {
  text-align: center;
  margin-bottom: 18px;
}

.check-work-copy h2 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 650;
}

.check-work-copy p {
  margin: 0;
  color: #2d3748;
  font-size: 16px;
}

.check-work-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 34px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.check-work-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #cfd5df;
}

.check-work-card-head h3 {
  margin: 0;
  font-size: 22px;
}

.check-work-legend {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #2d3748;
  font-size: 16px;
}

.check-work-legend span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.legend-box {
  width: 22px;
  height: 22px;
  border: 2px dashed #111827;
  display: inline-block;
}

.legend-flag {
  width: 16px;
  height: 24px;
  display: inline-block;
  background: #cf3450;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}

.check-work-grid {
  grid-template-columns: repeat(10, minmax(42px, 1fr));
  gap: 18px 26px;
  padding: 24px 8px 10px;
}

.check-work-grid .answer-dot {
  position: relative;
  width: 44px;
  height: 44px;
  justify-self: center;
  border: 2px dashed #111827;
  border-radius: 0;
  color: #2d5bd8;
  font-size: 22px;
  background: #fff;
  overflow: visible;
}

.check-work-grid .answer-dot span {
  position: relative;
  z-index: 2;
}

.check-work-grid .answer-dot.done {
  border-style: solid;
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.check-work-grid .answer-dot.flagged {
  border-color: #cf3450;
}

.check-work-grid .answer-dot.flagged::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 22px;
  background: #cf3450;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  z-index: 1;
}

.check-work-grid .answer-dot.done.flagged::after {
  top: -8px;
  right: -8px;
}

.check-work-grid .answer-dot.current {
  box-shadow: 0 0 0 3px #2d5bd8;
}

.module-progress.compact {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 12px;
}

.result-saved-banner {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: #f8fbff;
}

.result-saved-banner h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.result-card-actions {
  display: grid;
  gap: 10px;
}

.result-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.score-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.score {
  font-size: 58px;
  font-weight: 900;
  color: var(--primary);
}

.breakdown {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: #e6ebf3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.mistake-summary {
  border: 1px solid #f0b4ac;
  background: #fff6f4;
  border-radius: 8px;
  padding: 14px;
  margin: 18px 0;
  text-align: left;
}

.mistake-summary.perfect {
  border-color: #a9dfc8;
  background: #f0fbf6;
}

.mistake-summary strong {
  display: block;
  margin-bottom: 6px;
}

.mistake-summary p {
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.mistake-group {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mistake-group > span {
  color: #364156;
  font-weight: 800;
  font-size: 13px;
}

.mistake-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mistake-dots a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  background: #c43d32;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.mistake-dots a.unanswered {
  background: #c67900;
}

.result-legend {
  display: grid;
  gap: 8px;
  margin: 18px 0 12px;
  text-align: left;
}

.result-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.result-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.result-legend i.correct {
  background: #28a879;
}

.result-legend i.wrong {
  background: #d94c41;
}

.result-legend i.unanswered {
  background: #d28a00;
}

.review-overview {
  padding: 18px;
  display: grid;
  gap: 22px;
}

.review-key {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.review-key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.review-key i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.review-key i.correct {
  background: #28a879;
}

.review-key i.wrong {
  background: #d94c41;
}

.review-key i.unanswered {
  background: #d28a00;
}

.review-module {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.review-module h3 {
  margin: 0 0 14px;
}

.review-number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 10px;
}

.review-number {
  height: 42px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.review-number b {
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
}

.review-number.correct {
  border-color: #8fd6bf;
  background: #eaf8f3;
  color: #126b50;
}

.review-number.wrong {
  border-color: #f0aaa2;
  background: #fff0ef;
  color: #af2f27;
}

.review-number.unanswered {
  border-color: #efc86d;
  background: #fff8e5;
  color: #8a5700;
}

.review-number:hover {
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.1);
  transform: translateY(-1px);
}

.review-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.review-list.single-review {
  gap: 18px;
}

.submitted-review {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.submitted-review-page {
  min-height: 100vh;
  background: #fff;
}

.submitted-review-page .submitted-review {
  min-height: 100vh;
  padding: 0;
  gap: 0;
  grid-template-rows: 70px minmax(0, 1fr) 76px;
}

.submitted-review-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 10px 28px;
  border-bottom: 1px solid #d9dde5;
  background: #f8fafc;
}

.submitted-review-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.submitted-review-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
}

.submitted-review-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.submitted-review-mode {
  justify-self: center;
  color: #4e5d75;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.submitted-review-status {
  justify-self: end;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 900;
}

.submitted-review-status.correct {
  background: #eaf8f3;
  color: #126b50;
}

.submitted-review-status.wrong {
  background: #fff0ef;
  color: #af2f27;
}

.submitted-review-body {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(390px, 1.05fr);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.submitted-review-page .submitted-review-body {
  min-height: 0;
  height: calc(100vh - 146px);
  border: 0;
  border-radius: 0;
}

.submitted-review-body.no-passage {
  grid-template-columns: 1fr;
}

.submitted-review-page .submitted-review-body.no-passage .submitted-question {
  width: min(920px, 100%);
  margin: 0 auto;
}

.submitted-passage,
.submitted-question {
  padding: 28px 34px;
  overflow: auto;
}

.submitted-passage {
  border-right: 2px solid #d9dde5;
  font-size: 18px;
  line-height: 1.65;
}

.submitted-passage h3 {
  margin: 0 0 18px;
}

.submitted-question {
  display: grid;
  align-content: start;
  gap: 18px;
}

.submitted-question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px dashed #1f2937;
  font-weight: 900;
}

.submitted-question-head strong {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.submitted-question-head strong.correct {
  background: #eaf8f3;
  color: #126b50;
}

.submitted-question-head strong.wrong {
  background: #fff0ef;
  color: #af2f27;
}

.submitted-choices {
  display: grid;
  gap: 12px;
}

.submitted-choice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 2px solid #cfd5df;
  border-radius: 8px;
  padding: 12px 14px;
}

.submitted-choice.correct {
  border-color: #28a879;
  background: #f0fbf6;
}

.submitted-choice.selected:not(.correct) {
  border-color: #d94c41;
  background: #fff6f4;
}

.submitted-choice em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.submitted-grid-in {
  border: 2px solid #cfd5df;
  border-radius: 8px;
  padding: 18px;
}

.submitted-grid-in span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.submitted-grid-in strong {
  display: block;
  margin: 12px 0;
  font-size: 28px;
}

.submitted-explanation {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.submitted-explanation p {
  color: var(--muted);
  line-height: 1.55;
}

.review-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.review-item.wrong {
  border-color: #efaaa4;
  background: #fff8f7;
}

.review-item.correct {
  border-color: #a7dccd;
}

.review-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.submitted-review-page .review-actions {
  min-height: 76px;
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  padding: 10px 28px;
  border-top: 2px solid #d9dde5;
  background: #eaf1fb;
}

.submitted-review-page .review-actions .btn:first-child {
  justify-self: start;
}

.submitted-review-page .review-actions .review-next {
  justify-self: end;
}

.review-question-chip {
  min-width: 180px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
}

.review-question-chip:hover {
  background: #1f2937;
}

.review-picker-panel {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 40;
  width: min(960px, calc(100vw - 48px));
  max-height: min(54vh, 440px);
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid #d6dce7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  padding: 18px 20px 20px;
}

.review-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.review-picker-head strong {
  font-size: 20px;
}

.review-picker-head span,
.review-picker-legend {
  color: var(--muted);
  font-weight: 800;
}

.review-picker-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 14px 0;
  font-size: 14px;
}

.review-picker-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.review-picker-legend i {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.review-picker-legend i.correct {
  background: #2eaf7d;
}

.review-picker-legend i.wrong {
  background: #df4b42;
}

.review-picker-legend i.unanswered {
  border: 2px dashed #111827;
}

.review-picker-legend i.flagged {
  width: 13px;
  height: 22px;
  border-radius: 0;
  background: #d33b59;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
}

.review-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 12px;
}

.review-picker-number {
  position: relative;
  min-height: 48px;
  border: 2px solid #cfd6e3;
  border-radius: 6px;
  background: #fff;
  color: #2f5bd8;
  font-size: 21px;
  font-weight: 900;
  cursor: pointer;
}

.review-picker-number.correct {
  border-color: #2eaf7d;
  background: #effbf6;
  color: #126b50;
}

.review-picker-number.wrong {
  border-color: #df4b42;
  background: #fff5f4;
  color: #a7332c;
}

.review-picker-number.unanswered {
  border-style: dashed;
  border-color: #111827;
  background: #fff;
  color: #2f5bd8;
}

.review-picker-number.current {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.review-picker-number.flagged::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, transparent 50%, #d33b59 50%);
  border-bottom-right-radius: 4px;
}

.review-picker-number:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.teacher-preview-top .exam-title {
  display: grid;
  gap: 2px;
}

.teacher-preview-top {
  grid-template-columns: minmax(0, 1fr) auto;
}

.teacher-preview-top .exam-title small {
  color: #5f6b80;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-choice .choice {
  cursor: default;
}

.teacher-answer-toggle:disabled {
  opacity: 0.62;
  cursor: default;
}

.teacher-question-mode {
  color: #5f6b80;
  font-size: 15px;
  font-weight: 800;
}

.teacher-choice.teacher-correct .choice {
  border-color: #22aa76;
  background: #eefbf5;
}

.teacher-choice.teacher-correct .choice-letter {
  border-color: #22aa76;
  background: #22aa76;
  color: #fff;
}

.teacher-choice-answer {
  color: #23845f;
  font-size: 13px;
  font-weight: 800;
  min-width: 96px;
}

.teacher-answer-panel {
  margin-top: 16px;
  border: 1px solid #b8ead4;
  border-radius: 8px;
  background: #effbf6;
  color: #0f5132;
  padding: 14px 16px;
}

.teacher-answer-panel p {
  margin: 8px 0 0;
  color: #315b48;
  line-height: 1.45;
}

.teacher-grid-answer input {
  color: #0f5132;
}

.teacher-preview-picker .review-picker-number.answered {
  background: #effbf6;
  border-color: #22aa76;
  color: #0f5132;
}

.table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.question-stats-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.analytics-grid {
  display: grid;
  gap: 16px;
}

.analytics-card {
  border-color: #b8c9f5;
  background: #f8fbff;
}

.weak-area-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.weak-area-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.weak-area-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-weight: 800;
}

.weak-area-row small {
  color: var(--muted);
  font-weight: 500;
}

.weak-area-row strong {
  color: #b2342b;
  text-align: right;
  font-size: 22px;
}

.question-stats-row {
  display: grid;
  grid-template-columns: 86px minmax(280px, 1fr) minmax(180px, 0.7fr) 96px 96px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.question-stats-row:last-child {
  border-bottom: 0;
}

.question-stats-row.head {
  background: #f2f5fa;
  font-weight: 900;
  color: #40506a;
}

.question-stats-row.hard {
  background: #fff7f5;
}

.question-stats-row.hard > span:first-child {
  color: #b23027;
  font-weight: 900;
}

.question-stats-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.table-row {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 0.6fr 0.7fr 1.2fr 0.6fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-head {
  background: #f3f6fb;
  color: #42506a;
  font-weight: 800;
}

.table small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 21, 35, 0.52);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal h3 {
  margin-top: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .login-shell,
  .shell,
  .exam-body,
  .progress-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .submitted-review-body {
    grid-template-columns: 1fr;
  }

  .submitted-passage {
    border-right: 0;
    border-bottom: 2px solid #d9dde5;
  }

  .brand-side {
    min-height: 42vh;
  }

  .sidebar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .top-nav {
    width: 100%;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .exam-body {
    grid-template-rows: auto auto auto;
    overflow: auto;
  }

  .exam-body.with-tool {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .exam-body.no-passage,
  .exam-body.with-tool.no-passage,
  .exam-body.with-tool.no-passage.tool-calculator {
    grid-template-columns: 1fr;
  }

  .exam-tool-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .desmos-calculator {
    height: 420px;
    min-height: 320px;
  }

  .exam-bottom {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 12px 14px;
  }

  .exam-bottom > *,
  .exam-bottom > div:last-child,
  .exam-question-center {
    justify-self: stretch;
  }

  .question-navigator {
  min-width: 174px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.question-navigator::after {
  content: "^";
  margin-left: 8px;
  font-size: 14px;
}

.question-navigator.active::after {
  content: "v";
}

.check-work-panel {
    padding: 32px 14px;
  }

  .check-work-card {
    padding: 24px 18px;
  }

  .check-work-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .check-work-grid {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 18px 16px;
  }

  .search-row {
    grid-template-columns: 1fr;
    width: calc(100% - 36px);
    margin: 16px auto 0;
  }

  .search-input-wrap {
    grid-template-columns: 1fr;
  }

  .search-submit {
    width: calc(100% - 8px);
    margin: 0 4px 4px;
  }
}

@media (max-width: 620px) {
  .brand-side {
    padding: 32px 24px;
  }

  .brand-side h1 {
    font-size: 34px;
  }

  .login-panel,
  .main {
    padding: 18px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .question-stats-row {
    grid-template-columns: 1fr;
  }

  .student-form {
    grid-template-columns: 1fr;
  }

  .student-row,
  .student-edit-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    grid-template-columns: 1fr;
  }

  .category-landing {
    grid-template-columns: 1fr;
  }

  .category-landing.two,
  .category-landing.four {
    grid-template-columns: 1fr;
  }

  .progress-summary,
  .progress-row {
    grid-template-columns: 1fr;
  }

  .exam-top {
    grid-template-columns: 1fr;
    height: auto;
    gap: 8px;
    padding: 10px 14px;
  }

  .timer,
  .exam-actions {
    justify-self: start;
  }

  .exam-screen {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto 1fr auto;
    overflow: visible;
  }

  .choice-row {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px;
  }
}

