:root {
  color-scheme: dark;
  --background: #0a0a0a;
  --foreground: #ededed;
  --muted: #a1a1a1;
  --faint: #6b6b6b;
  --line: #2a2a2a;
  --hover: #151515;
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foreground);
  background: var(--background);
  font-family: Geist, "Geist Fallback", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-color: #666; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--foreground); }

.shell {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0 40px 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 144px;
  font-size: 14px;
}

.brand { font-weight: 600; text-decoration: none; }
.site-header > a:last-child { color: var(--muted); }

.intro { margin-bottom: 44px; }
h1 { margin: 0 0 12px; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.intro p { margin: 0; color: var(--foreground); line-height: 28px; }
.intro .date { margin-top: 8px; color: var(--muted); font-size: 14px; }

.composer { margin-bottom: 40px; }
form { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: 0;
  outline: 0;
  color: var(--foreground);
  background: transparent;
}
input::placeholder { color: var(--faint); }
form:focus-within { border-color: #6f6f6f; }
form button {
  padding: 8px 0 8px 20px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: #555;
  text-underline-offset: 3px;
}
form button:hover { color: var(--foreground); text-decoration-color: var(--foreground); }

.tasks { border-top: 1px solid var(--line); }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}
.toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbar strong { color: var(--foreground); font-weight: 500; }
.filters { display: flex; gap: 14px; }
.filter, footer button, .delete {
  padding: 0;
  border: 0;
  color: var(--faint);
  background: transparent;
}
.filter { font-size: 13px; }
.filter:hover, .filter.active { color: var(--foreground); }
.filter.active { text-decoration: underline; text-underline-offset: 3px; }

ul { margin: 0; padding: 0; list-style: none; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  animation: arrive .18s ease-out;
}
.check {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #555;
  border-radius: 2px;
  color: transparent;
  background: transparent;
  font-size: 11px;
  line-height: 14px;
}
.check:hover { border-color: var(--foreground); }
.todo-text { flex: 1; overflow-wrap: anywhere; }
.todo-item.completed .check { border-color: #666; color: var(--background); background: #aaa; }
.todo-item.completed .todo-text { color: var(--faint); text-decoration: line-through; }
.delete { padding: 8px; opacity: 0; font-size: 18px; }
.todo-item:hover .delete, .delete:focus-visible { opacity: 1; }
.delete:hover { color: var(--foreground); }

.empty { padding: 56px 0; border-bottom: 1px solid var(--line); }
.empty p { margin: 0 0 4px; color: var(--muted); }
.empty small { color: var(--faint); font-size: 13px; }
.empty[hidden] { display: none; }

footer { display: flex; justify-content: space-between; padding-top: 18px; color: var(--faint); font-size: 12px; }
footer p { margin: 0; }
footer button { font-size: inherit; }
footer button:hover { color: var(--foreground); }

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

@keyframes arrive { from { opacity: 0; transform: translateY(-4px); } }

@media (max-width: 560px) {
  .shell { padding-inline: 24px; }
  .site-header { min-height: 112px; }
  .intro { margin-bottom: 36px; }
  .filters { gap: 10px; }
  .delete { opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
