:root {
  color-scheme: light;
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #d7dde8;
  --ink: #172033;
  --muted: #637083;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
  --focus: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: #9aa7ba;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 30%, transparent);
  outline-offset: 2px;
}

.shell {
  width: min(960px, calc(100vw - 32px));
  margin: 48px auto;
}

.workspace {
  min-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 50px rgba(23, 32, 51, 0.12);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.account-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 700;
}

.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.ghost {
  padding: 9px 12px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}

.new-todo {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
}

.new-todo input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.new-todo button {
  min-width: 44px;
  min-height: 44px;
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
  font-size: 22px;
}

.filters {
  display: grid;
  grid-auto-flow: column;
  gap: 6px;
  align-items: center;
}

.filters button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
}

.filters button.active {
  background: #e7f4f2;
  border-color: #95c9c2;
  color: var(--accent-strong);
  font-weight: 700;
}

.status-line {
  min-height: 44px;
  padding: 14px 32px 0;
  color: var(--muted);
  font-size: 14px;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 12px 32px 32px;
}

.todo-item {
  display: grid;
  grid-template-columns: 28px 1fr 36px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid var(--border);
}

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

.todo-text {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

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

.delete-button {
  width: 36px;
  height: 36px;
  border-color: transparent;
  color: var(--danger);
}

.delete-button:hover {
  border-color: #f2b8b5;
  background: #fff5f5;
}

@media (max-width: 720px) {
  .shell {
    width: 100%;
    margin: 0;
  }

  .workspace {
    min-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .topbar,
  .toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-left: 20px;
    padding-right: 20px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .account {
    width: 100%;
    justify-content: space-between;
  }

  .status-line,
  .todo-list {
    padding-left: 20px;
    padding-right: 20px;
  }
}
