:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #182946;
  background: #f3f6fb;
  --navy: #12305d;
  --blue: #2154b3;
  --line: #d9e3f1;
  --muted: #51617b;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #194b9e; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #2a72e8; outline-offset: 3px; }
.shell { width: min(100% - 36px, 1050px); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { min-height: 74px; display: flex; align-items: center; gap: 18px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand small { display: block; font-size: .78rem; color: var(--muted); }
nav { display: flex; gap: 6px; }
nav a { padding: 9px 15px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; }
nav a[aria-current] { background: #e9f1fe; color: var(--navy); }
main { padding: 30px 0 65px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.55rem); line-height: 1.16; letter-spacing: -.035em; }
h2 { font-size: 1.13rem; }
p { line-height: 1.55; }
h1 + p, h2 + p { margin-top: 7px; }
.muted { color: var(--muted); }
.overline { font-size: .81rem; font-weight: 650; margin-bottom: 5px; color: #45638b; }
.heading, .exam-card, .work-header, .actions { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.heading { margin-bottom: 21px; }
.heading a + h1 { margin-top: 8px; }
.panel { padding: 23px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.login-shell { max-width: 464px; padding-top: clamp(36px, 11vh, 124px); }
.login-panel { padding: clamp(22px, 6vw, 42px); }
.login-panel h1 { font-size: clamp(1.52rem, 5vw, 2rem); }
.student-shell { max-width: 770px; }
.fields { display: grid; gap: 14px; margin-top: 15px; }
.columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; }
.fields input, .fields select { width: 100%; min-width: 0; padding: 10px 12px; min-height: 43px; border: 1px solid #bac9de; border-radius: 8px; color: #182946; background: white; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; min-height: 40px; border-radius: 9px; padding: 8px 13px; cursor: pointer; text-decoration: none; font-size: .91rem; line-height: 1.25; font-weight: 650; }
.primary { color: #fff; background: var(--blue); }
.primary:hover { background: #173d85; }
.quiet { color: var(--navy); background: #f2f6fd; border-color: #dce6f4; }
.notice, .status { padding: 10px 13px; background: #eaf1fb; border-radius: 9px; color: #1d436c; }
.notice { margin-bottom: 14px; }
.notice.error { color: #90231f; background: #fff0ee; }
.notice.success { color: #135941; background: #e9f7ef; }
.login-panel .notice { margin-top: 12px; }
.status { font-size: .84rem; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #eef3fa; color: var(--navy); }
tr:last-child td { border-bottom: 0; }
.work-header { position: sticky; z-index: 1; top: 0; padding: 13px 0; background: #f3f6fb; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
#clock { display: block; font-size: 1.65rem; font-variant-numeric: tabular-nums; }
#sync { font-size: .9rem; }
fieldset { min-width: 0; }
legend { font-weight: 650; font-size: .9rem; padding-inline: 6px; }
.prompt { font-size: 1.06rem; font-weight: 650; margin-bottom: 10px; white-space: pre-wrap; }
.choice { display: flex; align-items: baseline; gap: 9px; padding: 9px 10px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; margin-top: 7px; cursor: pointer; overflow-wrap: anywhere; }
.choice:has(input:checked) { background: #edf4ff; border-color: #4077cb; }
.choice input { accent-color: var(--blue); }
.score strong { display: block; font-size: 2.65rem; color: var(--navy); }
@media(max-width: 580px) {
  .top-inner { flex-wrap: wrap; padding-block: 9px; gap: 8px; }
  nav { order: 3; flex-basis: 100%; }
  nav a { padding-inline: 12px; }
  .columns { grid-template-columns: 1fr; }
  .heading, .exam-card, .actions { flex-wrap: wrap; }
  .panel { padding: 15px; }
  main { padding-top: 20px; }
}
