:root {
  --bg: #f6f7f9; --card: #fff; --text: #111; --muted: #5b6270; --line: #d9dde3;
  --accent: #0b5cd5; --ok: #127a3a; --okbg: #e3f5ea; --bad: #b3261e; --badbg: #fbe6e4;
  --todo: #8a5a00; --todobg: #fff3cd;
}
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
.top { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: #111; }
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; white-space: nowrap; }
#search { flex: 1; min-width: 0; padding: 10px 12px; font-size: 16px; border: 0; border-radius: 8px; }
.home { min-height: calc(100dvh - 96px); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 20px; width: 100%; max-width: 760px; }
.tile { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 13rem; padding: 24px; background: #fff; border: 2px solid var(--text); border-radius: 16px; text-decoration: none; color: var(--text); }
.tile:hover, .tile:focus-visible { background: #111; color: #fff; }
.tile b { font-size: 1.6rem; line-height: 1.2; }
.tile small { font-size: .95rem; opacity: .75; }
.back { display: inline-block; margin: 0 0 10px; font-weight: 600; text-decoration: none; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 14px; }
h1 { font-size: 1.5rem; margin: 4px 0 12px; } h2 { font-size: 1.2rem; margin: 0 0 10px; }
.progress { height: 12px; background: #e6e9ee; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ok); }
.sec-link { display: flex; justify-content: space-between; gap: 12px; align-items: center; text-decoration: none; color: var(--text); font-weight: 600; }
.sec-link small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.btn { display: inline-block; min-height: 48px; padding: 12px 16px; font: inherit; font-weight: 600; border: 2px solid var(--text); background: #fff; color: var(--text); border-radius: 10px; cursor: pointer; text-align: left; }
.btn.primary { background: var(--text); color: #fff; }
.btn.block { display: block; width: 100%; margin: 8px 0; }
.btn.right { border-color: var(--ok); background: var(--okbg); }
.btn.wrong { border-color: var(--bad); background: var(--badbg); }
.btn:disabled { cursor: default; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-of-type { border-top: 0; }
.check input { width: 26px; height: 26px; flex: none; margin: 0; accent-color: var(--ok); }
ol.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 8px 0 8px 46px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 700; }
details.card summary { font-weight: 700; cursor: pointer; min-height: 32px; }
details.mistakes { border-left: 6px solid var(--bad); }
details.whatif { border-left: 6px solid var(--accent); }
.todo { background: var(--todobg); color: var(--todo); border: 2px dashed var(--todo); font-weight: 700; }
.note { padding: 12px; border-radius: 8px; margin-top: 10px; }
.note.good { background: var(--okbg); } .note.bad { background: var(--badbg); }
.hit { display: block; text-decoration: none; color: var(--text); }
.hit b { display: block; } .hit span { color: var(--muted); font-size: .95rem; }
mark { background: #ffe58a; }
.nav-bottom { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
