﻿:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --ink: #1f1c17;
  --muted: #6b6258;
  --line: #e6e1d8;
  --accent: #1d6f42;
  --accent-weak: #e3f1e7;
  --danger: #a93a2f;
  --shadow: 0 18px 40px rgba(31, 28, 23, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", "Palatino", "Georgia", serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff 0%, var(--bg) 55%, #efe9df 100%);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.app {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow: var(--shadow);
}

.header {
  margin-bottom: 22px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  font-size: 32px;
  margin: 0 0 8px;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 18px;
}

.composer input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  transition: border 150ms ease, box-shadow 150ms ease;
}

.composer input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 111, 66, 0.15);
}

.composer button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 15px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.composer button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(29, 111, 66, 0.18);
}

.list-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #faf8f4;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  transition: background 150ms ease, border 150ms ease;
}

.item.completed {
  background: var(--accent-weak);
  border-color: #cfe7d7;
}

.item label {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-auto-flow: column;
  cursor: pointer;
}

.item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.item .text {
  font-size: 16px;
}

.item.completed .text {
  text-decoration: line-through;
  color: var(--muted);
}

.delete {
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 14px;
  cursor: pointer;
  justify-self: end;
}

.empty {
  margin: 6px 4px;
  color: var(--muted);
  font-size: 14px;
}

.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: 520px) {
  .app {
    padding: 24px 18px;
  }

  h1 {
    font-size: 26px;
  }

  .composer {
    grid-template-columns: 1fr;
  }
}
