:root {
  --bg: #f6f7fb; --card: #ffffff; --ink: #0f172a; --muted: #5b6474; --line: #e4e7ee;
  --red: #e0261b; --red-ink: #ffffff; --ok: #16a34a; --ok-bg: #e9f8ee;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1020; --card: #141a2e; --ink: #eef1f8; --muted: #a3acc0; --line: #252d47; --ok-bg: #12301f; --ok: #22c55e; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 24px; }
h1 { font-size: 1.45rem; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.lead { color: var(--muted); margin: 4px 0 12px; font-size: .95rem; }
.progress { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.bar { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 99px; transition: width .3s ease; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 9px 10px; }
.list img { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; }
.txt { flex: 1; min-width: 0; }
.txt h2 { font-size: .98rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt p { margin: 1px 0 0; color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { flex: none; background: var(--red); color: var(--red-ink); text-decoration: none; font-weight: 700;
  padding: 8px 13px; border-radius: 99px; font-size: .85rem; border: 2px solid var(--red); }
.sub:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
li.on { background: var(--ok-bg); }
li.on .sub { background: transparent; color: var(--ok); border-color: var(--ok); }
.done { text-align: center; font-weight: 700; margin: 16px 0 0; }
footer { text-align: center; margin-top: 14px; }
.reset { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: .8rem; cursor: pointer; }
