:root {
  --bg: #fbfaf7; --fg: #1d1d1b; --muted: #6b6a65; --line: #dedbd2; --card: #ffffff;
  --accent: #1f5fae; --accent-fg: #ffffff; --ok: #1f7a4a; --bad: #b3261e; --chosen: #e5eefb;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --fg: #ecebe6; --muted: #a09f99; --line: #3a3934; --card: #1f1f1d;
    --accent: #79a8ef; --accent-fg: #0f1a2a; --ok: #6cc796; --bad: #f2867d; --chosen: #22324a; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; }
h1 { font-size: 1.5rem; margin: .4em 0; } h2 { font-size: 1.15rem; margin-top: 1.6em; }
a { color: var(--accent); }
code { font-size: .9em; overflow-wrap: anywhere; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .ok { color: var(--ok); }
.errors { color: var(--bad); border: 1px solid var(--bad); border-radius: 8px; padding: 8px 12px; }
.errors ul { margin: 0; padding-left: 1.2em; }
progress { width: 100%; height: 8px; accent-color: var(--accent); }
.bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .92rem; margin-bottom: 6px; }
.bar form { margin: 0; }
.crumbs { margin: 0; font-size: .92rem; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
dl { margin: 0; } dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 10px; }
dt:first-child { margin-top: 0; }
dd { margin: 2px 0 0; overflow-wrap: anywhere; }
dd.longtext, .prose { white-space: pre-wrap; }
dd.longtext { font-size: .95rem; }
dd.details { margin-top: 10px; }
dd.details .longtext { white-space: pre-wrap; font-size: .88rem; margin-top: 8px; color: var(--muted); }
dd.verdict strong { font-size: 1.1rem; }
details.instructions { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 12px 0; background: var(--card); }
details summary { cursor: pointer; font-weight: 600; }
.answer { display: grid; gap: 14px; }
label.text { display: grid; gap: 4px; }
label.text em { font-style: normal; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=password], input[type=email], input:not([type]), textarea, select {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; } legend { font-weight: 600; margin-bottom: 6px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.option { font: inherit; font-weight: 600; min-height: 52px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--fg); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.option:hover, .option:focus-within, .option:focus { border-color: var(--accent); }
.option.chosen, .option:has(input:checked) { background: var(--chosen); border-color: var(--accent); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
kbd { font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-weight: 400; }
@media (hover: none) { kbd { display: none; } }
.button, button.small { font: inherit; display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); text-decoration: none; cursor: pointer; }
button.small { padding: 4px 10px; font-size: .85rem; }
.button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 20px; }
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.grid a { display: block; text-align: center; padding: 8px 0; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--fg); background: var(--card); }
.grid a.done { background: var(--chosen); border-color: var(--accent); }
.grid a.started { border-style: dashed; border-color: var(--accent); }
.packs { list-style: none; padding: 0; display: grid; gap: 10px; }
.pack { display: grid; gap: 4px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; color: var(--fg); }
.pack.locked { opacity: .6; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.off td { color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 12px 0; display: grid; gap: 10px; background: var(--card); }
form.inline { display: inline; } label.check { display: inline-block; margin-right: 10px; white-space: nowrap; }
p.link code { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); user-select: all; }
.options.compact { grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); }
.about h2 { font-size: 1rem; margin: 18px 0 6px; }
.about h2:first-child { margin-top: 0; }
.about details { margin-top: 18px; }
.pre { white-space: pre-wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
