:root {
  color-scheme: light;
  --ink: #17233d;
  --muted: #53617a;
  --blue: #244ac4;
  --pale: #eef3ff;
  --line: #dce4f0;
  --paper: #fff;
  --surface: #f5f7fc;
  --green: #14664a;
  --red: #a52a38;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--surface); }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #5a7deb; outline-offset: 3px; }
.wrap { width: min(100% - 44px, 1104px); margin-inline: auto; }
.actions { display: flex; align-items: center; gap: 12px; }
.text-button {
  border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font-weight: 700; white-space: nowrap;
}
.text-button:hover { background: var(--pale); color: var(--blue); }
main { padding-block: 36px 60px; }
h1, h2, h3, p { margin-top: 0; }
h1 { line-height: 1.18; font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 14px; letter-spacing: -.05em; }
h2 { font-size: 1.35rem; margin-bottom: 14px; }
h3 { font-size: 1.07rem; margin-bottom: 8px; }
.muted, .loading, .hint { color: var(--muted); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 19px; padding: clamp(20px, 4vw, 34px); }
.login-dialog { color: var(--ink); width: min(calc(100% - 26px), 420px); }
.login-dialog::backdrop { background: rgb(15 27 53 / .58); }
.login-actions { display: grid; gap: 10px; margin-top: 16px; }
.notice { margin-top: 16px; margin-bottom: 0; padding: 11px 16px; border: 1px solid #ccd8ef; border-radius: 10px; background: var(--pale); }
label { display: block; font-weight: 700; margin-bottom: 13px; }
input { width: 100%; border: 1px solid #bfcbe0; border-radius: 10px; padding: 10px 12px; margin-top: 5px; color: var(--ink); background: white; }
.form-error, .error { color: var(--red); margin: 8px 0; }
.primary, .secondary {
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 750; min-height: 44px;
}
.primary { color: white; background: var(--blue); }
.primary:hover { background: #1a3899; }
.secondary { color: var(--blue); background: white; border-color: #ccd8ef; }
.secondary:hover { background: var(--pale); }
form .primary { width: 100%; }
.actions { flex-wrap: wrap; }
.actions .primary { width: auto; flex: 1; }
progress { width: 100%; height: 7px; accent-color: var(--blue); }
.workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.rail { padding: 19px; }
.question-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.question-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; min-width: 0; }
.question-head h1 { font-size: 1.2rem; margin: 0; letter-spacing: 0; }
.question-tools { display: flex; flex: none; gap: 6px; align-items: center; }
.question-result {
  display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 9px;
  font-size: 2.35rem; font-weight: 800; line-height: 1;
}
.question-result.correct { color: var(--green); background: #edf9ef; }
.question-result.incorrect { color: var(--red); background: #fff0f1; }
.question-result.pending { color: #694a20; background: #fff5e2; font-size: 1.85rem; }
.passage { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.57; margin-bottom: 18px; }
.blank { color: var(--blue); font-weight: 700; }
.options { border: 0; min-inline-size: 0; margin: 0 0 17px; padding: 0; display: grid; gap: 7px; }
.option {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px;
  border: 1px solid #d6e0ef; border-radius: 10px; background: white; padding-inline-end: 5px;
}
.option-choice {
  display: flex; align-items: center; gap: 11px; margin: 0; padding: 6px 9px; min-height: 44px;
  font-weight: 600; cursor: pointer; overflow-wrap: anywhere;
}
.option-choice:has(:disabled) { cursor: default; }
.option:has(:checked) { border-color: var(--blue); background: var(--pale); }
.option:has(:focus-visible) { outline: 3px solid #5a7deb; outline-offset: 3px; }
.option.correct { border-color: #77b891; background: #edf9ef; color: var(--green); }
.option.incorrect { border-color: #da8c95; background: #fff0f1; color: var(--red); }
.option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.letter { flex: 0 0 31px; aspect-ratio: 1; display: grid; place-content: center; border: 1px solid #d2dcf0; border-radius: 7px; background: #f6f8fe; }
.feedback { margin-top: 16px; padding: clamp(10px, 1.7vw, 18px); container-type: inline-size; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 750px) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 26px); }
  main { padding-top: 19px; }
}
