:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #d9e0ea;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #14b8a6;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(37, 99, 235, 0.14), transparent 36%),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.83rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.96;
}

.hero-copy {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 10px;
}

.stats span {
  display: grid;
  gap: 4px;
  min-height: 76px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  text-align: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.stats strong {
  font-size: 1.55rem;
}

.task-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.task-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.task-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.task-input-row input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  outline: none;
}

.task-input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.task-input-row button,
.filter-button,
.ghost-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

.task-input-row button {
  min-height: 48px;
  color: #ffffff;
  background: var(--primary);
}

.task-input-row button:hover {
  background: var(--primary-dark);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
}

.filter-button {
  padding: 0 16px;
  color: var(--muted);
  background: #eef2f7;
}

.filter-button.active {
  color: #ffffff;
  background: var(--ink);
}

.ghost-button {
  margin-left: auto;
  padding: 0 16px;
  color: var(--danger);
  background: #fff1f2;
}

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

.task-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.task-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.task-item span {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

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

.delete-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--danger);
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
}

.delete-button:hover {
  background: #fee2e2;
}

.empty-state {
  margin: 22px 0 4px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 22px, 960px);
    padding: 28px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-panel {
    padding: 16px;
  }

  .task-input-row {
    grid-template-columns: 1fr;
  }

  .ghost-button {
    margin-left: 0;
  }
}
