:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #25362e;
  background: #edf2ef;
  --paper: #fffefa;
  --ink: #25362e;
  --muted: #54685e;
  --green: #235c47;
  --line: #cbd8cf;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
.top {
  padding: .9rem max(1rem, calc((100vw - 1120px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
}
.brand { font-size: 1.2rem; font-weight: 750; color: var(--ink); white-space: nowrap; text-decoration: none; }
nav, .actions, .inline { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
nav button { color: var(--ink); background: transparent; }
nav button[aria-current] { background: #daeadf; color: #164e3a; }
main, .status { width: min(1120px, calc(100% - 2rem)); margin: 1.2rem auto; }
.status { background: #fff9e2; padding: .7rem 1rem; border-radius: .55rem; white-space: pre-wrap; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .7rem; }
h1 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h2 { font-size: 1.2rem; }
p { margin: .4rem 0 1rem; }
.muted, small { color: var(--muted); }
.card, fieldset {
  border: 1px solid var(--line); border-radius: .85rem; background: var(--paper);
  padding: clamp(.85rem, 2vw, 1.5rem); margin: 0 0 .85rem; min-width: 0;
}
.row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); gap: 1rem; }
label { display: block; margin: .45rem 0; }
input:not([type=radio], [type=checkbox]), select, textarea {
  border: 1px solid var(--line); border-radius: .45rem; padding: .55rem; color: inherit; background: #fff;
  max-width: 100%; font: inherit;
}
textarea { width: 100%; min-height: 6rem; display: block; }
input[type=number] { width: 7rem; }
input[type=radio], input[type=checkbox] { accent-color: var(--green); }
button {
  min-height: 42px; cursor: pointer; font: inherit; color: white; background: var(--green);
  padding: .38rem .8rem; border: 1px solid transparent; border-radius: .5rem;
}
button.secondary { background: #f0f5f1; color: #214e3d; border-color: var(--line); }
button:disabled { opacity: .55; cursor: default; }
a { color: var(--green); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #387872; outline-offset: 2px;
}
.body { font-family: "Source Serif 4", Georgia, serif; font-size: clamp(1.1rem, 2vw, 1.28rem); line-height: 1.8; }
.body p { margin-bottom: 1.05rem; }
.option { border: 1px solid var(--line); padding: .5rem; border-radius: .55rem; }
.option:has(:checked), .evidence { background: #deefe2; }
.evidence { scroll-margin-top: 4rem; }
.timer { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.choices { max-height: 14rem; overflow: auto; display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.choices label { margin: 0; }
details { margin: .7rem 0; }
summary { cursor: pointer; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
dialog { width: min(480px, calc(100% - 1rem)); padding: 1.1rem; border: 1px solid var(--line); border-radius: 1rem; }
dialog::backdrop { background: #172e2566; }
@media (max-width: 720px) {
  .top { flex-direction: column; align-items: flex-start; gap: .3rem; padding: .55rem .8rem; }
  nav { flex-wrap: nowrap; width: 100%; overflow-x: auto; gap: .12rem; }
  nav button { flex-shrink: 0; padding-inline: .55rem; }
  .split { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  main, .status { width: calc(100% - 1rem); margin: .7rem auto; }
  dialog { margin: auto .5rem .5rem; }
}
