:root {
  --ink: #1f1d1a;
  --muted: #6c675f;
  --line: #dfddd6;
  --accent: #2f46c8;
  --paper: #f7f7f5;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.page h1 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.add {
  display: flex;
  gap: 0.5rem;
}

.add input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.btn {
  padding: 0.55rem 0.95rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.btn--primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

input:focus-visible,
.btn:focus-visible,
.remove:focus-visible,
.list input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.list label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  cursor: pointer;
}

.list span {
  overflow-wrap: anywhere;
}

.list .is-done span {
  color: var(--muted);
  text-decoration: line-through;
}

.remove {
  padding: 0 0.5rem;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
