:root {
  --bg: #f7f8f6; --card: #ffffff; --ink: #14181f; --muted: #5d6673; --line: #e3e6e8;
  --accent: #0f766e; --accent-soft: #e3f3f1; --warn: #b45309; --good: #15803d;
  --radius: 14px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1215; --card: #171b20; --ink: #e8ebee; --muted: #9aa3ad; --line: #2a3038;
    --accent: #2dd4bf; --accent-soft: #10302d; --warn: #f59e0b; --good: #4ade80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: .88em; background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; }
.brand small { font-weight: 500; font-size: 13px; color: var(--muted); }
.mark { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); align-self: center; }
.top nav a { text-decoration: none; font-weight: 600; }
main { max-width: 960px; margin: 0 auto; padding: 28px 16px 60px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
h2 { font-size: 20px; margin: 0 0 4px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 24px; max-width: 640px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
a.card { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card.soon { opacity: .6; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

.progress { margin: 14px 0 4px; }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.progress p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
button, .btn { font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { button.primary { color: #062421; } }
button:disabled { opacity: .5; cursor: not-allowed; }

.item { margin-bottom: 14px; }
.item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.item > summary::-webkit-details-marker { display: none; }
.num { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 28px; }
.item h2 { flex: 1; font-size: 17px; margin: 0; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 13px; color: #fff; }
.done .check { background: var(--good); border-color: var(--good); }
.item .body { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.pill { font-size: 13px; }
.pill.off { color: var(--muted); cursor: default; }
.pill.off:hover { border-color: var(--line); }

.q { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.q h3 { font-size: 15px; margin: 0 0 10px; }
.q textarea { width: 100%; min-height: 84px; font: inherit; font-size: 15px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical; }
.q textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.q .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.q .hint { font-size: 13px; color: var(--muted); }
.answer { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.answer b.label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 4px; }
.mark-row { margin-top: 16px; display: flex; justify-content: flex-end; }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
