:root {
  --bg: #f6f7fb; --card: #fff; --fg: #1d2330; --muted: #6b7385; --line: #e3e6ee;
  --accent: #87d03a; --accent-ink: #4d8a12; --on-accent: #1a2a08; --ok: #2f9e44; --ok-bg: #ebfbee; --bad: #e03131; --bad-bg: #fff0f0;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14161c; --card: #1d2029; --fg: #e6e8ee; --muted: #9aa1b2; --line: #2c3040;
    --accent: #87d03a; --accent-ink: #9ee05a; --on-accent: #1a2a08; --ok: #69db7c; --ok-bg: #1b2e20; --bad: #ff8787; --bad-bg: #351c1c; }
  .q-img, .opt-img { background: #fff; border-radius: 6px; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
header { display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--fg); text-decoration: none; }
.logo { width: 24px; height: 24px; color: var(--accent); flex: none; }
.tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tab { padding: 5px 14px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.tab:hover { color: var(--fg); }
.tab.on { background: var(--accent); color: var(--on-accent); }
.switch { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch .thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track .thumb { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .brand-text { display: none; } }
.back { color: var(--accent-ink); text-decoration: none; font-size: 14px; }
.years { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.yrow { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.yrow .y { font-size: 20px; font-weight: 700; min-width: 56px; }
main { max-width: 820px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--fg); display: block; }
a.card:hover, button.card:hover { border-color: var(--accent); }
.card .big { font-size: 24px; font-weight: 700; }
.card .best { font-size: 13px; color: var(--ok); }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.sec h3 { margin: 0 0 10px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px; text-decoration: none; }
.chip:hover { border-color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 8px; }
.badge { background: var(--line); color: var(--fg); font-size: 12px; font-weight: 600; padding: 0 7px; border-radius: 999px; line-height: 18px; }
.phead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.chip .done { color: var(--ok); font-size: 13px; }
.chip .resume { color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.chip.last { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.opts-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0 18px; }
.bar > div { height: 100%; background: var(--accent); transition: width .2s; }
.qhead { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.qtext { font-size: 18px; margin: 10px 0 12px; }
.note { color: var(--muted); font-size: 14px; margin: -4px 0 10px; }
.q-img { max-width: 100%; display: block; margin: 8px 0; }
.opt-img { max-width: 100%; max-height: 160px; display: block; margin-top: 6px; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { text-align: left; background: var(--card); color: var(--fg); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; cursor: pointer; display: flex; gap: 10px; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt:disabled { cursor: default; }
.opt .l { font-weight: 700; color: var(--muted); min-width: 1.2em; }
.opt.ok { border-color: var(--ok); background: var(--ok-bg); }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); }
.opt.ok .l { color: var(--ok); } .opt.bad .l { color: var(--bad); }
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.btn { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent-ink); border: 1px solid var(--line); }
.src { font-size: 13px; color: var(--muted); margin-left: auto; }
.src a { color: var(--muted); }
.score { font-size: 40px; font-weight: 800; }
.review { margin-top: 20px; }
.review .item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.review .ans { font-size: 14px; margin-top: 6px; }
.review .ans .y { color: var(--bad); } .review .ans .c { color: var(--ok); }
sub, sup { font-size: 70%; line-height: 0; }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.yrow .chips { margin-left: auto; justify-content: flex-end; }
.toprow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.back .ext { width: 14px; height: 14px; vertical-align: -2px; }
.actions .spacer { flex: 1; }
.btn:disabled { opacity: .4; cursor: default; }
