* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f5f7;
  color: #111827;
}

button, input { font: inherit; }

.app {
  width: min(100%, 42rem);
  margin: 0 auto;
  padding: 1.25rem;
}

.header { padding: 1.2rem 0 .7rem; }

.eyebrow {
  margin: 0 0 .3rem;
  color: #2563eb;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 9vw, 3.25rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.status {
  min-height: 1.25rem;
  margin: .65rem 0 0;
  color: #6b7280;
  font-size: .86rem;
}

.add-form {
  position: sticky;
  top: .75rem;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  margin: .8rem 0 .85rem;
  padding: .5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
}

.add-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: .72rem .7rem;
  background: transparent;
  color: #111827;
  font-size: .92rem;
}

.add-form button {
  border: 0;
  border-radius: .75rem;
  padding: .72rem .85rem;
  background: #2563eb;
  color: white;
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
}

.list-card {
  min-height: 12rem;
  padding: .45rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
}

.items {
  display: grid;
  gap: .38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  display: grid;
  grid-template-columns: 2.15rem 1fr auto;
  align-items: center;
  gap: .52rem;
  padding: .34rem .45rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: .82rem;
}

.item .text {
  overflow-wrap: anywhere;
  font-size: .875rem;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: .04em;
  line-height: 1.15;
}

.item.is-done .text {
  color: #6b7280;
  text-decoration: line-through;
}

.check {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  color: #2563eb;
  font-size: .9rem;
  font-weight: 900;
  cursor: pointer;
}

.delete {
  border: 0;
  border-radius: .65rem;
  padding: .48rem .62rem;
  background: #fee2e2;
  color: #dc2626;
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
}

.empty {
  margin: 2.5rem 0;
  text-align: center;
  color: #6b7280;
  font-size: .9rem;
}

.sr-only { position: absolute; left: -9999px; }

@media (max-width: 420px) {
  .app { padding: .85rem; }
  .add-form { grid-template-columns: 1fr; }
  .add-form button { width: 100%; }
  .item { grid-template-columns: 2.15rem 1fr auto; }
  .delete { grid-column: auto; }
}
