* { box-sizing: border-box; }
:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #687386;
    --line: #e4e8ef;
    --accent: #315de8;
    --surface: #ffffff;
    --page: #f5f7fb;
}
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.container { width: min(760px, calc(100% - 32px)); margin: 48px auto; }
.hero { margin-bottom: 28px; }
.eyebrow {
    color: var(--accent); font-size: .78rem; font-weight: 800;
    letter-spacing: .11em; text-transform: uppercase;
}
h1 { margin: 8px 0; font-size: clamp(2.2rem, 7vw, 3.5rem); line-height: 1.08; letter-spacing: -.05em; }
.hero p { max-width: 620px; color: var(--muted); margin: 12px 0 0; }
.panel {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 18px; padding: 22px; margin: 16px 0;
    box-shadow: 0 8px 30px rgba(26, 43, 75, .04);
}
h2 { margin: 0 0 16px; font-size: 1.1rem; }
.add-form { display: flex; gap: 10px; }
input[type="text"] {
    min-width: 0; flex: 1; padding: 13px 14px;
    border: 1px solid #cfd6e2; border-radius: 10px; font: inherit;
}
input:focus { outline: 3px solid #dce5ff; border-color: var(--accent); }
button {
    border: 0; border-radius: 10px; background: var(--accent); color: white;
    padding: 11px 15px; font: inherit; font-weight: 700; cursor: pointer;
}
button:hover { filter: brightness(.95); }
.secondary { background: #edf1ff; color: #2549c5; }
.danger { background: #fff0f0; color: #b4232c; }
.list-heading { display: flex; align-items: center; justify-content: space-between; }
.list-heading h2 { margin-bottom: 0; }
.count { color: var(--muted); font-size: .88rem; }
.tasks { list-style: none; padding: 0; margin: 14px 0 0; }
.task {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 16px 0; border-top: 1px solid var(--line);
}
.task-copy { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.task-title { font-weight: 650; }
.task.done .task-title { color: #788295; text-decoration: line-through; }
.task-meta { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.task-actions { display: flex; gap: 7px; flex-shrink: 0; }
.task-actions button { padding: 8px 10px; font-size: .85rem; }
.empty { color: var(--muted); margin-bottom: 0; }
.notice, .error { border-radius: 10px; padding: 11px 14px; margin: 12px 0; }
.notice { background: #e8f8ef; color: #17643b; }
.error { background: #fff0f0; color: #a51e29; }
.explainer {
    background: #edf1fa; border-radius: 14px; padding: 17px 20px; margin-top: 20px;
}
.explainer summary { font-weight: 750; cursor: pointer; }
.explainer li { margin: 8px 0; }
code { background: #e0e6f2; padding: 2px 5px; border-radius: 5px; }
footer { color: var(--muted); text-align: center; font-size: .85rem; padding: 24px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
    .container { margin: 28px auto; }
    .panel { padding: 17px; }
    .add-form { flex-direction: column; }
    .task { align-items: flex-start; flex-direction: column; }
    .task-actions { width: 100%; }
    .task-actions form { flex: 1; }
    .task-actions button { width: 100%; }
}
