*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --brand: #4338ca;
  --accent: #db2777;
  --ink: #1e1b2e;
  --muted: #5b5873;
  --soft: #eef2ff;
}

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

.app {
  max-width: 560px;
  margin: 32px auto;
  padding: 24px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(30, 27, 46, 0.1);
}

h1 {
  margin: 0;
  color: var(--brand);
}

.subtitle {
  margin: 4px 0 20px;
  color: var(--muted);
}

form {
  display: flex;
  gap: 8px;
}

form input {
  flex: 1;
  padding: 10px 14px;
  font: inherit;
  border: 2px solid #c7c5dd;
  border-radius: 12px;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
}

.primary {
  padding: 10px 20px;
  color: white;
  background: var(--brand);
}

.filters {
  display: flex;
  gap: 6px;
  margin: 18px 0 8px;
}

.filters button {
  padding: 6px 14px;
  color: var(--brand);
  background: var(--soft);
}

.filters button[aria-pressed="true"] {
  color: white;
  background: var(--brand);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--soft);
}

li label {
  flex: 1;
}

li.done label {
  color: var(--muted);
  text-decoration: line-through;
}

li input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

form select {
  padding: 8px;
  font: inherit;
  border: 2px solid #c7c5dd;
  border-radius: 12px;
  background: white;
}

.badge {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge.high { color: #b91c1c; background: #fee2e2; }
.badge.normal { color: #4338ca; background: #e0e7ff; }
.badge.low { color: #4b5563; background: #f3f4f6; }

.delete {
  padding: 4px 12px;
  color: var(--accent);
  background: #fdf0f6;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 24px 0;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
}

footer button {
  padding: 4px 10px;
  color: var(--muted);
  background: none;
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
