:root {
  color-scheme: light;
  --background: #f4f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --border: #d7dee8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16803c;
  --danger: #c2410c;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
}

button,
input {
  font: inherit;
}

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

.hero {
  margin-bottom: 28px;
}

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

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
}

.hero p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.task-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 18px 45px rgba(31, 41, 55, 0.08);
}

.task-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.task-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
}

input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: var(--primary);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

.task-form button {
  background: var(--primary);
  color: #ffffff;
}

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

.summary,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.summary span,
.filter-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
}

.summary span {
  background: #eef4ff;
  color: #1849a9;
  font-weight: 700;
}

.filter-button {
  background: #eef2f6;
  color: var(--text);
}

.filter-button.active {
  background: #d1fadf;
  color: #05603a;
}

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

.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}

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

.task-check {
  width: 22px;
  height: 22px;
  accent-color: var(--success);
}

.task-text {
  overflow-wrap: anywhere;
}

.remove-button {
  background: #fff1ed;
  color: var(--danger);
}

.empty-state {
  margin: 22px 0 0;
  color: var(--muted);
  text-align: center;
}

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

  .task-panel {
    padding: 18px;
  }

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

  .task-item {
    grid-template-columns: auto 1fr;
  }

  .remove-button {
    grid-column: 1 / -1;
  }
}