:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #66707c;
  --line: #e2e6ec;
  --brand: #2f5fe0;
  --ok: #1f8a52;
  --bad: #c23b3b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.account { display: flex; align-items: center; gap: 0.75rem; }
.email { color: var(--muted); font-size: 0.9rem; }
.container { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
h1 { font-size: 1.6rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.1rem 1.2rem; margin-bottom: 1.1rem;
}
.card.narrow { max-width: 420px; margin: 3rem auto; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.stack { display: flex; flex-direction: column; gap: 0.6rem; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }
input[type=text], input[type=password], textarea {
  width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff;
}
label { display: block; font-size: 0.9rem; color: var(--muted); }
label input { margin-top: 0.25rem; }
.navlink { color: var(--brand); text-decoration: none; font-size: 0.9rem; }
datalist { display: none; }
.button {
  display: inline-block; padding: 0.55rem 0.95rem; border-radius: 8px;
  background: #eef1f6; color: var(--ink); border: 1px solid var(--line);
  text-decoration: none; font: inherit; cursor: pointer;
}
.button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.button.ghost { background: transparent; }
.button.primary[disabled], .button[disabled] { opacity: 0.5; cursor: not-allowed; }
.link { background: none; border: none; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }
.link.danger { color: var(--bad); }
.subject-list { list-style: none; padding: 0; margin: 0; }
.subject-row { display: flex; justify-content: space-between; align-items: center; }
.subject-name { font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.source-list { margin: 0 0 0.8rem; padding-left: 1.1rem; }
.error { color: var(--bad); font-weight: 600; }
.success { color: var(--ok); font-weight: 600; }
.success.big { font-size: 1.15rem; }
.option {
  display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.option:hover { border-color: var(--brand); }
.stem { line-height: 1.4; }
.options-review { list-style: none; padding: 0; margin: 0 0 0.8rem; }
.options-review li {
  padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.4rem;
}
.options-review li.is-correct { border-color: var(--ok); background: #eef8f1; }
.options-review li.is-wrong { border-color: var(--bad); background: #fbeeee; }
.tag { font-size: 0.75rem; padding: 0.1rem 0.4rem; border-radius: 5px; margin-left: 0.4rem; }
.tag.ok { background: var(--ok); color: #fff; }
.tag.bad { background: var(--bad); color: #fff; }
.verdict.ok { color: var(--ok); font-weight: 700; }
.verdict.bad { color: var(--bad); font-weight: 700; }
.rationale { background: #f3f6fb; border-left: 3px solid var(--brand); padding: 0.6rem 0.8rem; border-radius: 6px; }
.result { text-align: center; }
.result .score { font-size: 3rem; font-weight: 800; margin: 0.3rem 0; }
.result.pass .score { color: var(--ok); }
.result.fail .score { color: var(--bad); }
.danger-zone { border-color: #f0d4d4; }
