:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background: #f4f6f8;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
.app { width: min(100% - 2rem, 42rem); margin: 0 auto; padding: 3rem 0 4rem; }
.app-header { margin-bottom: 2rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -0.03em; }
h2 { font-size: 1.1rem; }
.subtitle, .count { color: #66737f; }
.subtitle { margin-top: .35rem; }
.add-form { display: flex; gap: .65rem; margin-bottom: 2rem; }
input, button { font: inherit; }
input { min-width: 0; flex: 1; border: 1px solid #b8c2cc; border-radius: .55rem; padding: .75rem .85rem; background: #fff; color: inherit; }
button { min-height: 2.75rem; border: 0; border-radius: .55rem; padding: .65rem 1rem; cursor: pointer; font-weight: 650; }
.add-form button { background: #2368d1; color: #fff; }
button:hover:not(:disabled) { filter: brightness(.94); }
button:focus-visible, input:focus-visible { outline: 3px solid #86b7ff; outline-offset: 2px; }
.list-section { background: #fff; border: 1px solid #dce2e7; border-radius: .75rem; padding: 1.25rem; box-shadow: 0 2px 8px rgb(31 41 51 / 5%); }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.secondary-button { background: transparent; color: #2368d1; padding-inline: .4rem; }
.secondary-button:disabled { color: #9aa5af; cursor: not-allowed; }
.count { margin-top: .35rem; font-size: .9rem; }
.checklist { list-style: none; margin: 1rem 0 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: .7rem; border-top: 1px solid #edf0f2; padding: .8rem 0; }
.checklist li:first-child { border-top: 0; }
.toggle { width: 1.3rem; height: 1.3rem; min-height: 0; flex: 0 0 1.3rem; padding: 0; accent-color: #2368d1; }
.item-text { flex: 1; overflow-wrap: anywhere; }
.completed .item-text { color: #6e7882; text-decoration: line-through; }
.delete-button { min-height: 2.25rem; padding: .35rem .55rem; color: #b42318; background: transparent; font-weight: 500; }
.empty-state { margin-top: 1rem; padding: 1.5rem 0 .5rem; color: #66737f; text-align: center; }
.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: 30rem) { .app { padding-top: 2rem; } }
@media (max-width: 28rem) { .app { width: min(100% - 1rem, 42rem); } .list-section { padding: 1rem; } .list-toolbar { align-items: flex-start; } .add-form { gap: .5rem; } }
