:root {
  font-family: system-ui, sans-serif;
  color: #17213c;
  background: #f5f6fb;
  line-height: 1.5;
  --ink: #17213c;
  --muted: #46546d;
  --indigo: #3831a4;
  --line: #7b86a0;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 42rem; margin: auto; padding: 2rem 1rem; }
header { margin-bottom: 1.5rem; }
header p, footer { color: var(--muted); margin: .4rem 0; }
.kicker { color: var(--indigo); font-size: .8rem; font-weight: 750; letter-spacing: .12em; }
h1 { font-size: clamp(2rem, 7vw, 3rem); line-height: 1.1; margin: 0; }
h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
form, section { background: #fff; padding: 1rem; border: 1px solid #dce1ee; border-radius: 1rem; }
form label { display: block; font-weight: 650; margin-bottom: .4rem; }
.add-row { display: flex; gap: .5rem; }
button, #title { font: inherit; min-height: 44px; border-radius: .6rem; padding: .5rem .75rem; }
button { background: #fff; color: var(--ink); font-weight: 650; border: 1px solid var(--line); cursor: pointer; }
button:hover { background: #edf0ff; }
button:disabled { cursor: not-allowed; opacity: .65; }
.primary, button[aria-pressed="true"] { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.primary:hover, button[aria-pressed="true"]:hover { background: #292480; }
#title { border: 1px solid var(--line); min-width: 0; flex: 1; }
#title[aria-invalid="true"] { border: 2px solid #a3122a; }
:focus-visible { outline: 3px solid #006aad; outline-offset: 2px; }
#notice { margin: .55rem 0; min-height: 1.5rem; color: #a3122a; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
#summary, #empty { color: var(--muted); }
#tasks { list-style: none; padding: 0; margin: 0; }
#tasks li { display: flex; align-items: start; gap: .5rem; border-top: 1px solid #dce1ee; padding: .45rem 0; }
#tasks label { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; min-height: 44px; cursor: pointer; }
#tasks input { inline-size: 1.25rem; block-size: 1.25rem; margin: .25rem; flex: none; accent-color: var(--indigo); }
#tasks span { overflow-wrap: anywhere; }
#tasks input:checked + span { text-decoration: line-through; color: var(--muted); }
.remove { color: #a3122a; }
footer { margin-top: .85rem; font-size: .9rem; }
@media (min-width: 38rem) {
  main { padding-block: 3rem; }
  form, section { padding: 1.25rem; }
}
@media (max-width: 21rem) {
  .add-row { flex-direction: column; }
}
