:root {
  color-scheme: light;
  --bg: #eef3f1;
  --surface: #fbfcfb;
  --surface-2: #f5f8f7;
  --panel: #fbfcfb;
  --ink: #10201d;
  --muted: #66736f;
  --soft: #8a9692;
  --line: #d9e2df;
  --line-strong: #c8d5d1;
  --accent: #0f766e;
  --accent-strong: #0b5f58;
  --accent-soft: #dff3ef;
  --accent-tint: #effaf8;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --warn: #936316;
  --warn-soft: #fff3d6;
  --ok: #0b6b4d;
  --ok-soft: #dff7ea;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(26, 57, 51, 0.08);
  --shadow-soft: 0 10px 28px rgba(26, 57, 51, 0.06);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, #f8fbfa 0%, #eef3f1 46%, #e8efec 100%);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

body,
button,
input,
select,
textarea {
  font: 14px/1.55 var(--font);
}

button,
input,
select,
textarea {
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

strong {
  font-weight: 720;
}

h1,
h2,
h3,
p {
  margin: 0;
}

#app {
  min-height: 100dvh;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted,
.subtle {
  color: var(--muted);
}

.empty,
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  padding: 18px;
}

.notice {
  border-color: #b7ddd6;
  background: var(--accent-tint);
  color: var(--accent-strong);
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px;
  background: #13231f;
  color: #edf6f4;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.brand-mark strong,
.brand-mark span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark strong {
  font-size: 17px;
  line-height: 1.2;
}

.brand-mark span {
  color: rgba(237, 246, 244, 0.68);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  height: 42px;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(237, 246, 244, 0.72);
  font-weight: 680;
  text-align: left;
  padding: 0 12px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.nav button:active,
.btn:active,
.text-btn:active {
  transform: translateY(1px);
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(237, 246, 244, 0.64);
  font-size: 12px;
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto 22px;
}

.topbar h1 {
  margin-top: 4px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

.topbar p:last-child {
  max-width: 680px;
  margin-top: 6px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius);
  font-weight: 720;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn {
  border: 1px solid transparent;
  padding: 0 14px;
}

.btn.primary {
  background: var(--accent);
  color: #f8fffd;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

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

.btn.secondary {
  background: var(--accent-tint);
  border-color: #b8ded8;
  color: var(--accent-strong);
}

.btn.secondary:hover {
  background: var(--accent-soft);
}

.btn.ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.btn.ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.text-btn {
  min-height: 32px;
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.text-btn:hover {
  color: var(--accent-strong);
}

.login-page,
.student-login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: stretch;
  padding: 28px;
}

.student-login {
  grid-template-columns: minmax(0, 0.95fr) 400px;
  max-width: 1180px;
  margin: 0 auto;
}

.login-hero,
.student-landing {
  min-height: calc(100dvh - 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 250, 248, 0.88)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.login-copy h1,
.student-landing h1 {
  margin-top: 10px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

.login-copy > p:not(.eyebrow),
.student-landing > div > p:not(.eyebrow) {
  max-width: 580px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.login-hero img,
.student-landing img {
  width: min(100%, 360px);
  aspect-ratio: 1;
  justify-self: center;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.student-landing {
  min-height: auto;
  align-self: center;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 28px;
  padding: 34px;
}

.student-landing h1 {
  max-width: 620px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.student-landing > div > p:not(.eyebrow) {
  max-width: 540px;
  font-size: 16px;
}

.student-landing img {
  width: 150px;
  align-self: start;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #bde1db;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-weight: 760;
  padding: 0 12px;
}

.login-card {
  align-self: center;
  display: grid;
  gap: 16px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-card h2 {
  font-size: 26px;
  line-height: 1.2;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  color: var(--ink);
  outline: none;
  padding: 9px 11px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--soft);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.hero-panel,
.stats,
.dashboard-grid,
.split {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #fbfcfb 0%, #f1faf7 100%);
  padding: 24px 28px;
  box-shadow: var(--shadow-soft);
}

.hero-panel h2 {
  max-width: 960px;
  margin-top: 8px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.08;
}

.hero-panel p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.hero-panel img {
  width: 150px;
  aspect-ratio: 1;
  justify-self: end;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.stat strong {
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1;
}

.stat p {
  color: var(--soft);
  font-size: 12px;
}

.dashboard-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.panel {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.admin-main > .panel + .panel,
.student-main > .panel + .panel {
  margin-top: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 19px;
  line-height: 1.25;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 8px;
}

.year-tile {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
}

.year-tile strong {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
}

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

.year-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.year-picker button {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.year-picker button:hover,
.year-picker button.active {
  border-color: #a8d8d1;
  background: var(--accent-tint);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.08);
}

.year-picker button:active {
  transform: translateY(1px);
}

.year-picker strong {
  font-variant-numeric: tabular-nums;
  font-size: 23px;
  line-height: 1;
}

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

.compose-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  margin-bottom: 14px;
}

.compose-summary p {
  color: var(--muted);
  margin-top: 3px;
}

.compose-toolbar {
  grid-template-columns: minmax(0, 1fr) 170px;
}

.cart-entry {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  border: 1px solid #a8d8d1;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent-strong);
  padding: 14px;
  text-align: left;
}

.cart-entry span,
.cart-entry strong,
.cart-entry small {
  display: block;
}

.cart-entry span {
  color: var(--ink);
  font-weight: 820;
}

.cart-entry strong {
  font-variant-numeric: tabular-nums;
  font-size: 24px;
}

.cart-entry small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.cart-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.cart-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  padding: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  cursor: grab;
  transition: border-color 140ms ease, background 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.cart-item:active {
  cursor: grabbing;
}

.cart-item.dragging {
  opacity: 0.46;
}

.cart-item.drag-over {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.cart-item > span,
.drag-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 820;
  user-select: none;
}

.cart-item strong {
  display: block;
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1.2;
}

.cart-item p {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cart-move {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.cart-item .text-btn {
  min-height: 26px;
  font-size: 12px;
}

.cart-item .danger-text {
  color: var(--danger);
}

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

.publish-title {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(9, 22, 19, 0.48);
  padding: 24px;
}

.cart-modal {
  width: min(1180px, 100%);
  max-height: min(820px, calc(100dvh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(9, 22, 19, 0.22);
  padding: 20px;
}

.cart-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cart-modal-head h2 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.18;
}

.cart-modal-head p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
}

.cart-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.cart-modal-meta span {
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  padding: 6px 9px;
}

.cart-modal-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.cart-organize,
.cart-publish {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.cart-publish {
  background: var(--surface-2);
}

.compact-title {
  margin-bottom: 12px;
}

.compact-title h3 {
  font-size: 18px;
  line-height: 1.25;
}

.modal-cart-list {
  max-height: none;
  min-height: 260px;
  height: 100%;
}

.cart-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.list-row p,
.paper-main p,
.question-card p {
  color: var(--muted);
}

.score {
  flex: 0 0 auto;
  min-width: 58px;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  text-align: center;
  padding: 7px 9px;
}

.status,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
  padding: 0 10px;
}

.status-toggle {
  border: 0;
  cursor: pointer;
}

.status-toggle:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.status.ok,
.tag {
  background: var(--ok-soft);
  color: var(--ok);
}

.status.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px auto;
  gap: 10px;
  align-items: end;
}

.inline-form.subtle {
  margin-top: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.code-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}

.code-card strong {
  font-variant-numeric: tabular-nums;
}

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 150px;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar .btn {
  height: 40px;
}

.question-list,
.paper-list,
.stack {
  display: grid;
  gap: 12px;
}

.question-card,
.paper-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.question-head,
.paper-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.question-title {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.question-title input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.cart-check-label {
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  padding: 6px 8px;
  white-space: nowrap;
}

.question-title strong {
  line-height: 1.65;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.meta span {
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  padding: 4px 8px;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
}

.options p {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 10px;
}

.answer-line {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.question-card > .actions,
.paper-card > .actions {
  justify-content: flex-start;
  margin-top: 14px;
}

.paper-main strong {
  font-size: 16px;
}

.split {
  align-items: start;
}

.sticky-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100dvh - 36px);
  overflow: auto;
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

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

.student-app {
  min-height: 100dvh;
}

.student-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 28px;
  background: rgba(238, 243, 241, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.student-top .brand-mark strong {
  color: var(--ink);
}

.student-top .brand-mark span {
  color: var(--muted);
}

.student-top .brand-mark img {
  border-color: var(--line);
}

.student-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px;
}

.student-hero-card,
.result-hero {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #fbfcfb 0%, #f0faf8 100%);
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 4vw, 38px);
}

.student-hero-card {
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 22px;
  padding: 24px 28px;
}

.student-hero-card h1,
.result-hero h1 {
  max-width: 680px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.student-hero-card p,
.result-hero p {
  color: var(--muted);
  font-size: 16px;
}

.student-portrait {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.student-portrait img {
  width: 116px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.student-portrait span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.student-main .stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.student-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
}

.student-paper-list .paper-card {
  padding: 14px;
}

.exam-shell {
  min-height: 100dvh;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.exam-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.exam-head h1 {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.12;
}

.exam-head p {
  color: var(--muted);
}

.exam-form {
  display: grid;
  gap: 14px;
}

.exam-question {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.exam-question h3 {
  font-size: 17px;
  line-height: 1.65;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.choice:hover {
  border-color: #afd7d0;
  background: var(--accent-tint);
}

.choice input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.submit-exam {
  position: sticky;
  bottom: 18px;
  justify-self: end;
  min-width: 148px;
  min-height: 44px;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.22);
}

/* Student product polish */
.student-public {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  gap: 24px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(239, 246, 243, 0.88) 56%, rgba(232, 239, 236, 0.96) 100%),
    linear-gradient(90deg, rgba(15, 118, 110, 0.07), transparent 1px) 0 0 / 36px 36px;
  padding: 0 0 34px;
}

.student-workbench {
  --student-ink: #24221d;
  --student-muted: #837b70;
  --student-soft: #a0978b;
  --student-line: rgba(73, 60, 44, 0.1);
  --student-panel: rgba(255, 253, 248, 0.86);
  --student-panel-solid: #fffdf8;
  --student-primary: #3d463a;
  --student-primary-hover: #2f382f;
  --student-primary-soft: #ece7dd;
  --student-warm: #a6782b;
  width: 100%;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  background:
    linear-gradient(180deg, #f8f4ed 0%, #f2ece2 100%);
  padding: 14px max(14px, calc((100% - 1240px) / 2)) 14px 0;
}

.student-workbench .eyebrow {
  color: #7e7866;
}

.student-workbench .btn.primary {
  background: var(--student-primary);
  color: #fffdf8;
  box-shadow: 0 10px 22px rgba(61, 70, 58, 0.14);
}

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

.student-workbench .btn.secondary {
  background: rgba(255, 253, 248, 0.72);
  border-color: #d8d0c2;
  color: #4f4b42;
  box-shadow: none;
}

.student-workbench .btn.secondary:hover {
  background: #f1eadf;
}

.student-rail {
  position: sticky;
  top: 14px;
  min-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(73, 60, 44, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.86);
  padding: 14px;
  box-shadow: 0 18px 46px rgba(56, 43, 28, 0.07);
}

.student-rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 8px;
}

.student-rail-brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(73, 60, 44, 0.12);
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
}

.student-rail-brand strong,
.student-rail-brand span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-rail-brand strong {
  color: #1d201a;
  font-size: 14px;
}

.student-rail-brand span {
  color: #8a8378;
  font-size: 11px;
}

.student-rail-nav {
  display: grid;
  gap: 8px;
}

.student-rail-nav a,
.student-rail-nav span {
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  color: #746d62;
  font-weight: 720;
  padding: 0 12px;
}

.student-rail-nav a:hover,
.student-rail-nav a.active {
  background: #e9e2d7;
  color: #201b16;
}

.student-rail-nav span {
  opacity: 0.58;
}

.student-rail-note {
  margin-top: auto;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(73, 60, 44, 0.09);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(239, 232, 219, 0.74));
  padding: 14px;
}

.student-rail-note span {
  color: #9a9286;
  font-size: 11px;
  font-weight: 760;
}

.student-rail-note strong {
  color: #1e201b;
  line-height: 1.35;
}

.student-rail-note p {
  color: #8a8378;
  font-size: 12px;
}

.student-dashboard {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 22px 0 28px;
}

.student-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 6px 4px 4px;
}

.student-dashboard-head h1 {
  margin-top: 4px;
  color: #1d201a;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}

.student-dashboard-head p:last-child {
  max-width: 620px;
  margin-top: 8px;
  color: #827b70;
  font-size: 15px;
}

.student-dashboard-meta {
  min-width: 96px;
  display: grid;
  justify-items: end;
  gap: 2px;
  color: #827b70;
}

.student-dashboard-meta strong {
  color: var(--student-primary);
  font-size: 32px;
  line-height: 1;
}

.student-focus-card,
.student-recent-row,
.paper-board {
  border: 1px solid rgba(73, 60, 44, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.84);
  box-shadow: 0 18px 42px rgba(56, 43, 28, 0.06);
}

.student-focus-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.student-focus-copy {
  display: grid;
  gap: 6px;
}

.student-focus-copy p,
.student-recent-card span {
  color: #9a9286;
  font-size: 12px;
  font-weight: 760;
}

.student-focus-copy h2 {
  color: #1f211c;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.18;
}

.student-focus-copy span,
.student-recent-card p {
  color: #827b70;
}

.student-focus-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.student-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.student-stats-row > div {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(73, 60, 44, 0.1);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
  padding: 16px;
}

.student-stats-row span {
  color: #9a9286;
  font-size: 12px;
  font-weight: 760;
}

.student-stats-row strong {
  color: #1f211c;
  font-size: 28px;
  line-height: 1;
}

.student-recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 12px;
  scroll-margin-top: 18px;
  padding: 14px;
}

.student-recent-card {
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(43, 48, 39, 0.96), rgba(75, 73, 58, 0.92));
  color: #fffdf8;
  padding: 20px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.student-recent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(27, 35, 29, 0.14);
}

.student-recent-card strong {
  display: block;
  max-width: 560px;
  margin-top: 6px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.18;
}

.student-recent-card p {
  margin-top: 8px;
  color: rgba(255, 253, 248, 0.72);
}

.student-recent-card em {
  align-self: flex-start;
  border-radius: 999px;
  background: #efe6d5;
  color: #8a5b10;
  font-style: normal;
  font-size: 12px;
  font-weight: 780;
  padding: 7px 10px;
}

.student-recent-card.is-empty {
  color: var(--ink);
  background: var(--surface-2);
}

.student-mini-papers {
  display: grid;
  gap: 10px;
}

.student-mini-papers a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(73, 60, 44, 0.1);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.8);
  padding: 14px;
}

.student-mini-papers a:hover {
  background: #f3eee5;
}

.student-mini-papers span {
  color: var(--student-warm);
  font-weight: 840;
}

.student-mini-papers strong {
  min-width: 0;
  overflow: hidden;
  color: #25241f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-loading {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background:
    linear-gradient(180deg, #f8f4ed 0%, #f2ece2 100%);
  color: #837b70;
}

.student-loading-shell {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(180deg, #f8f4ed 0%, #f2ece2 100%);
}

.student-loading-shell .student-loading {
  width: 100%;
}

.student-loading p {
  color: #837b70;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0;
}

.loading-line {
  width: min(300px, 68vw);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(73, 60, 44, 0.1);
  box-shadow: inset 0 1px 2px rgba(56, 43, 28, 0.06);
}

.loading-line::before {
  content: "";
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c8b89e, #3d463a);
  animation: loadingSlide 1.35s ease-in-out infinite;
}

@keyframes loadingSlide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(240%); }
}

.student-hero {
  width: 100%;
  min-height: min(650px, 74dvh);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
  margin: 0;
  padding:
    clamp(32px, 5vw, 64px)
    max(24px, calc((100% - 1180px) / 2))
    clamp(34px, 5vw, 68px);
  background:
    linear-gradient(115deg, rgba(255, 246, 225, 0.86) 0%, rgba(248, 253, 251, 0.94) 36%, rgba(222, 242, 237, 0.86) 100%),
    radial-gradient(circle at 12% 20%, rgba(15, 118, 110, 0.12), transparent 30%);
  border-bottom: 1px solid rgba(15, 118, 110, 0.1);
}

.student-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(38px, 7vw, 88px);
}

.student-wordmark img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 12px 26px rgba(16, 32, 29, 0.12);
}

.student-wordmark strong,
.student-wordmark em {
  display: block;
  font-style: normal;
  line-height: 1.25;
}

.student-wordmark strong {
  font-size: 17px;
}

.student-wordmark em {
  color: var(--muted);
  font-size: 12px;
}

.exam-head-polished .brand-mark img {
  border-color: var(--line);
}

.exam-head-polished .brand-mark strong {
  color: var(--ink);
}

.exam-head-polished .brand-mark span {
  color: var(--muted);
}

.student-hero h1 {
  max-width: 720px;
  margin-top: 10px;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1;
  letter-spacing: 0;
}

.student-hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.student-quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.student-quick-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  padding: 0 12px;
  font-weight: 680;
}

.student-quick-facts strong {
  margin-right: 4px;
  color: var(--accent-strong);
}

.student-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.student-brief {
  display: grid;
  align-self: center;
  gap: 14px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  padding: 16px;
  box-shadow: 0 18px 48px rgba(16, 32, 29, 0.08);
  backdrop-filter: blur(14px);
}

.brief-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brief-panel-head > span {
  border-radius: 999px;
  background: #fff3d6;
  color: #936316;
  font-size: 12px;
  font-weight: 760;
  padding: 5px 9px;
}

.brief-kicker {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 820;
}

.brief-latest {
  min-height: 168px;
  display: grid;
  align-content: end;
  gap: 10px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(16, 32, 29, 0.94), rgba(11, 95, 88, 0.92)),
    var(--accent-strong);
  color: #f8fffd;
  padding: 18px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.brief-latest:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(16, 32, 29, 0.16);
}

.brief-latest.is-empty {
  background: var(--surface-2);
  color: var(--ink);
}

.brief-latest.is-empty em {
  color: var(--muted);
}

.brief-latest span {
  width: max-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dff3ef;
  font-size: 13px;
  font-weight: 820;
  padding: 5px 9px;
}

.brief-latest strong {
  max-width: 100%;
  font-size: 24px;
  line-height: 1.22;
}

.brief-latest em {
  color: rgba(248, 255, 253, 0.72);
  font-style: normal;
  font-weight: 680;
}

.brief-note span {
  color: var(--muted);
}

.brief-shortcuts {
  display: grid;
  gap: 8px;
}

.brief-shortcuts a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 252, 251, 0.78);
  padding: 10px;
  transition: border-color 160ms ease, background 160ms ease;
}

.brief-shortcuts a:hover {
  border-color: rgba(15, 118, 110, 0.32);
  background: var(--accent-tint);
}

.brief-shortcuts span {
  color: var(--accent-strong);
  font-weight: 860;
}

.brief-shortcuts strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-note {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.brief-note strong {
  color: var(--ink);
}

.paper-board {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(73, 60, 44, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.84);
  padding: 20px;
  box-shadow: 0 18px 42px rgba(56, 43, 28, 0.06);
}

.paper-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.paper-board-head h2 {
  margin-top: 4px;
  color: #1d201a;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.paper-board-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #efe6d5;
  color: #8a5b10;
  font-weight: 760;
  padding: 8px 12px;
}

.public-paper-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.public-paper-card {
  min-height: 148px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid rgba(73, 60, 44, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.public-paper-card:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 91, 16, 0.24);
  background: #fffdf8;
  box-shadow: 0 14px 26px rgba(56, 43, 28, 0.08);
}

.paper-year {
  width: max-content;
  color: #9d7327;
  font-weight: 820;
  padding-bottom: 5px;
  border-bottom: 2px solid #d8b56d;
}

.public-paper-card strong {
  color: #25241f;
  font-size: 16px;
  line-height: 1.28;
}

.public-paper-card p {
  color: #827b70;
}

.paper-cta {
  color: #4f4b42;
  font-weight: 820;
}

.student-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 24px;
}

.student-empty p {
  margin-top: 4px;
  color: var(--muted);
}

.student-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  padding: 0 4px;
}

.student-footer a {
  color: #4f4b42;
  font-weight: 760;
}

.student-exam {
  --exam-ink: #24221d;
  --exam-muted: #837b70;
  --exam-line: rgba(73, 60, 44, 0.1);
  --exam-panel: rgba(255, 253, 248, 0.86);
  --exam-panel-solid: #fffdf8;
  --exam-primary: #3d463a;
  --exam-primary-hover: #2f382f;
  --exam-primary-soft: #ece7dd;
  --exam-warm: #9d7327;
  width: min(980px, calc(100% - 32px));
  max-width: none;
  padding: 22px 0 40px;
}

.student-exam::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, #f8f4ed 0%, #f2ece2 100%);
}

.student-exam .eyebrow {
  color: #7e7866;
}

.student-exam .btn.primary {
  background: var(--exam-primary);
  color: #fffdf8;
}

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

.student-exam .text-btn {
  color: #4f4b42;
}

.exam-head-polished {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--exam-line);
  border-radius: 20px;
  background: var(--exam-panel);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 18px 42px rgba(56, 43, 28, 0.06);
}

.exam-head-polished .brand-mark {
  grid-column: 1 / -1;
}

.exam-head-polished h1 {
  max-width: 760px;
  color: var(--exam-ink);
}

.exam-head-polished p {
  color: var(--exam-muted);
}

.exam-student-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  border: 1px solid var(--exam-line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 232, 219, 0.72));
  padding: 18px;
  box-shadow: 0 14px 32px rgba(56, 43, 28, 0.05);
}

.exam-student-card h2 {
  margin-top: 4px;
  font-size: 24px;
}

.exam-progress-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-progress-strip span {
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid var(--exam-line);
  color: var(--exam-muted);
  font-size: 12px;
  font-weight: 760;
  padding: 7px 10px;
}

.student-exam .exam-question {
  border-color: var(--exam-line);
  border-radius: 16px;
  background: var(--exam-panel);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: 0 14px 34px rgba(56, 43, 28, 0.05);
}

.student-exam .question-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.question-index {
  border-radius: 999px;
  background: var(--exam-primary-soft);
  color: #4f4b42;
  font-size: 12px;
  font-weight: 820;
  padding: 6px 9px;
  white-space: nowrap;
}

.student-exam .question-head strong {
  color: var(--exam-ink);
  font-size: 17px;
  line-height: 1.72;
}

.student-exam .choice {
  border-color: var(--exam-line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.64);
  padding: 13px 14px;
  cursor: pointer;
}

.student-exam .choice:hover {
  border-color: rgba(157, 115, 39, 0.24);
  background: #fffdf8;
}

.student-exam .choice:has(input:checked) {
  border-color: rgba(61, 70, 58, 0.42);
  background: #f1eadf;
  box-shadow: inset 3px 0 0 var(--exam-primary);
}

.student-exam .submit-exam {
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(61, 70, 58, 0.18);
}

.result-exam {
  display: grid;
  gap: 14px;
}

.result-hero-polished {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  align-items: end;
  border: 1px solid var(--exam-line);
  border-radius: 20px;
  background: var(--exam-panel);
  box-shadow: 0 18px 42px rgba(56, 43, 28, 0.06);
}

.result-hero-polished h1 {
  color: var(--exam-ink);
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
}

.result-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.result-summary-grid div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--exam-line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.68);
  padding: 14px;
}

.result-summary-grid span,
.result-review-head > span {
  color: var(--exam-muted);
  font-size: 12px;
  font-weight: 760;
}

.result-summary-grid strong {
  color: var(--exam-primary);
  font-size: 24px;
  line-height: 1;
}

.result-review-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 4px 0;
}

.result-review-head h2 {
  margin-top: 4px;
  color: var(--exam-ink);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
}

.result-question {
  overflow: hidden;
}

.result-question summary {
  display: grid;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.result-question summary::-webkit-details-marker {
  display: none;
}

.result-question summary > p {
  color: var(--exam-muted);
  font-weight: 680;
}

.result-mark {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 820;
  padding: 6px 10px;
  white-space: nowrap;
}

.result-mark.ok {
  background: #e8eee2;
  color: #46563d;
}

.result-mark.warn {
  background: #f3e5d7;
  color: #8a4f2b;
}

.result-detail {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--exam-line);
}

.result-options {
  display: grid;
  gap: 8px;
}

.result-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--exam-line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.58);
  padding: 11px 12px;
}

.result-option > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--exam-primary-soft);
  color: #4f4b42;
  font-size: 12px;
  font-weight: 820;
}

.result-option p {
  color: var(--exam-ink);
}

.result-option em {
  color: var(--exam-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.result-option.is-answer {
  border-color: rgba(61, 70, 58, 0.3);
  background: #f1eadf;
}

.result-option.is-picked:not(.is-answer) {
  border-color: rgba(138, 79, 43, 0.24);
  background: #f7ece1;
}

.result-explanation {
  display: grid;
  gap: 6px;
  border-radius: 14px;
  background: rgba(239, 232, 219, 0.52);
  padding: 14px;
}

.result-explanation strong {
  color: var(--exam-ink);
}

.result-explanation p {
  color: var(--exam-muted);
  line-height: 1.75;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101917;
    --surface: #14201d;
    --surface-2: #192724;
    --panel: #16231f;
    --ink: #eef7f5;
    --muted: #a9b7b3;
    --soft: #82908d;
    --line: #2b3a36;
    --line-strong: #3b4d48;
    --accent: #39b7a6;
    --accent-strong: #78d8cb;
    --accent-soft: #183d38;
    --accent-tint: #12302c;
    --danger-soft: #3a1b1b;
    --warn-soft: #3a2d15;
    --ok-soft: #14382b;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.18);
  }

  body {
    background:
      linear-gradient(180deg, #111d1a 0%, #101917 100%);
  }

  input,
  select,
  textarea,
  .options p {
    background: #111d1a;
  }

  .login-card,
  .login-hero,
  .student-landing,
  .hero-panel,
  .student-hero-card,
  .result-hero {
    background: linear-gradient(135deg, #172622 0%, #10201d 100%);
  }

  .student-top {
    background: rgba(16, 25, 23, 0.9);
  }
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav button {
    text-align: center;
  }

  .login-page,
  .student-login {
    grid-template-columns: 1fr;
  }

  .login-hero,
  .student-landing,
  .hero-panel,
  .student-hero-card {
    grid-template-columns: 1fr;
  }

  .hero-panel img,
  .login-hero img,
  .student-landing img {
    justify-self: start;
  }

  .dashboard-grid,
  .split,
  .student-workspace {
    grid-template-columns: 1fr;
  }

  .cart-modal-body {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .admin-main,
  .student-main,
  .exam-shell,
  .login-page,
  .student-login {
    padding: 16px;
  }

  .topbar,
  .student-top,
  .section-title,
  .cart-modal-head,
  .cart-modal-actions,
  .compose-summary,
  .question-head,
  .paper-main,
  .list-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar .actions,
  .student-top .actions,
  .section-title .actions,
  .question-card > .actions,
  .paper-card > .actions {
    justify-content: flex-start;
  }

  .stats,
  .form-grid,
  .toolbar,
  .options,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .cart-modal-actions {
    align-items: stretch;
  }

  .cart-modal-actions .btn {
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .cart-modal {
    max-height: calc(100dvh - 24px);
    padding: 14px;
  }

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

  .login-hero,
  .student-landing {
    min-height: auto;
    padding: 24px;
  }

  .login-copy h1,
  .student-landing h1 {
    font-size: 44px;
  }

  .hero-panel img,
  .login-hero img,
  .student-landing img {
    width: 180px;
  }

  .student-portrait {
    justify-self: start;
    grid-template-columns: 72px auto;
    align-items: center;
  }

  .student-portrait img {
    width: 72px;
  }

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

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  body,
  button,
  input,
  select,
  textarea {
    font-size: 13px;
  }

  .sidebar,
  .panel,
  .hero-panel,
  .student-hero-card,
  .result-hero,
  .exam-question,
  .login-card {
    padding: 14px;
  }

  .btn {
    width: 100%;
  }

  .actions,
  .hero-actions,
  .hero-metrics {
    width: 100%;
  }

  .student-top {
    padding: 12px 16px;
  }
}

@media (max-width: 980px) {
  .student-workbench {
    grid-template-columns: 1fr;
  }

  .student-rail {
    position: static;
    min-height: auto;
  }

  .student-rail-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .student-rail-note {
    display: none;
  }

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

  .student-hero,
  .exam-student-card {
    grid-template-columns: 1fr;
  }

  .public-paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-brief {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brief-panel-head,
  .brief-latest,
  .brief-shortcuts,
  .brief-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .student-public {
    width: 100%;
    padding-top: 12px;
  }

  .student-workbench {
    gap: 12px;
    padding: 10px 10px 26px;
  }

  .student-rail {
    border-radius: 16px;
    padding: 12px;
  }

  .student-rail-nav a,
  .student-rail-nav span {
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
    font-size: 12px;
  }

  .student-dashboard {
    gap: 12px;
    padding: 0;
  }

  .student-dashboard-head,
  .student-focus-card {
    align-items: stretch;
    flex-direction: column;
  }

  .student-dashboard-meta {
    justify-items: start;
  }

  .student-focus-actions,
  .student-focus-actions .btn {
    width: 100%;
  }

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

  .student-recent-card {
    min-height: 170px;
    flex-direction: column;
    align-items: flex-start;
  }

  .student-mini-papers strong {
    white-space: normal;
  }

  .result-hero-polished,
  .result-summary-grid {
    grid-template-columns: 1fr;
  }

  .result-review-head {
    align-items: stretch;
    flex-direction: column;
  }

  .result-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .result-option em {
    grid-column: 2;
  }

  .student-hero {
    min-height: auto;
    width: 100%;
    padding: 22px 12px 18px;
  }

  .student-hero h1 {
    font-size: 40px;
  }

  .student-hero-actions .btn,
  .student-exam .submit-exam {
    width: 100%;
  }

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

  .brief-latest {
    min-height: 142px;
  }

  .paper-board {
    width: min(100% - 24px, 1180px);
  }

  .paper-board-head,
  .student-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .exam-head-polished,
  .student-exam .question-head {
    grid-template-columns: 1fr;
  }

  .public-paper-grid {
    grid-template-columns: 1fr;
  }

  .public-paper-card {
    min-height: 154px;
  }

  .student-exam {
    width: min(100% - 24px, 980px);
  }

  .student-exam .submit-exam {
    justify-self: stretch;
  }
}
