:root {
  --paper: #f4f1ea;
  --paper-deep: #e9e5dc;
  --ink: #17211e;
  --muted: #78817b;
  --line: #d6d4cb;
  --accent: #d56a47;
  --accent-dark: #a9462c;
  --mint: #b8d9c2;
  --white: #fffdf8;
  --shadow: 0 16px 50px rgba(32, 48, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(23, 33, 30, 0.11) 0.65px, transparent 0.65px);
  background-size: 6px 6px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
  padding: 38px 0 34px;
}

.topbar, .toolbar, .list-footer { display: flex; align-items: center; justify-content: space-between; }
.topbar { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; }
.brand-mark { width: 18px; height: 18px; position: relative; display: block; border: 2px solid var(--accent); border-radius: 50%; }
.brand-mark::after { position: absolute; right: -5px; bottom: -3px; width: 8px; height: 8px; content: ""; border-radius: 50%; background: var(--mint); }
.date-stamp, .eyebrow, .filter-tab, .list-footer, .privacy-note { font-family: "DM Mono", monospace; }
.date-stamp { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.hero { display: flex; align-items: flex-end; justify-content: space-between; padding: 74px 3.5% 68px; }
.eyebrow { margin: 0 0 15px; color: var(--accent-dark); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
h1 { max-width: 670px; margin: 0; font-size: clamp(42px, 7vw, 78px); line-height: 0.98; letter-spacing: -0.075em; }
h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; letter-spacing: -0.06em; }
.hero-note { max-width: 340px; margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.progress-orbit { position: relative; flex: 0 0 auto; width: 132px; height: 132px; margin: 0 3% 8px 30px; }
.progress-orbit svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.orbit-track, .orbit-progress { fill: none; stroke-width: 5; }
.orbit-track { stroke: var(--paper-deep); }
.orbit-progress { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 0.5s ease; }
.progress-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.progress-label strong { font-size: 24px; letter-spacing: -0.06em; }
.progress-label span { margin-top: 2px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; text-transform: uppercase; }

.workspace { padding: 0 3.5%; }
.task-form { display: flex; gap: 12px; padding: 8px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.task-form input { min-width: 0; flex: 1; padding: 13px 15px; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 14px; }
.task-form input::placeholder { color: #a6aaa2; }
.add-button { border: 0; padding: 0 21px; color: var(--white); background: var(--ink); font-size: 12px; font-weight: 700; transition: background 0.2s, transform 0.2s; }
.add-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.add-button span { margin-left: 8px; color: var(--mint); font-size: 18px; vertical-align: -1px; }
.toolbar { gap: 20px; margin: 40px 0 15px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.filter-tabs { display: flex; gap: 22px; }
.filter-tab { padding: 0; color: var(--muted); border: 0; background: transparent; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.filter-tab span { margin-left: 5px; color: #a8ada5; }
.filter-tab.is-active { color: var(--ink); }
.filter-tab.is-active::after { display: block; width: 17px; height: 2px; margin-top: 9px; content: ""; background: var(--accent); }
.search-box { display: flex; align-items: center; gap: 7px; width: 150px; padding-bottom: 5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-family: "DM Mono", monospace; font-size: 10px; }
.search-box input::placeholder { color: #a8ada5; }
.task-list { display: grid; }
.task-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: center; min-height: 68px; border-bottom: 1px solid var(--line); animation: appear 0.3s ease both; }
.task-check { display: grid; place-items: center; width: 19px; height: 19px; padding: 0; color: transparent; border: 1px solid #9ca59d; border-radius: 50%; background: transparent; transition: all 0.2s; }
.task-check:hover { border-color: var(--accent); }
.task-item.is-complete .task-check { color: var(--white); border-color: var(--accent); background: var(--accent); }
.task-check::after { content: "✓"; font-size: 11px; font-weight: 800; }
.task-text { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.task-item.is-complete .task-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 1px; }
.task-meta { color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; white-space: nowrap; }
.delete-task { padding: 5px; color: #a8ada5; border: 0; background: transparent; font-size: 18px; line-height: 1; opacity: 0; transition: opacity 0.2s, color 0.2s; }
.task-item:hover .delete-task, .delete-task:focus { opacity: 1; }
.delete-task:hover { color: var(--accent-dark); }
.empty-state { padding: 62px 20px 65px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 16px; color: var(--accent); border: 1px solid var(--line); border-radius: 50%; }
.empty-state h2 { margin: 0; font-size: 17px; letter-spacing: -0.04em; }
.empty-state p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.list-footer { min-height: 68px; color: var(--muted); font-size: 10px; }
.list-footer strong { color: var(--ink); font-weight: 500; }
#clearCompleted { padding: 0; color: var(--muted); border: 0; background: transparent; font-family: "DM Mono", monospace; font-size: 10px; }
#clearCompleted:hover { color: var(--accent-dark); }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 40px 0 0; color: #a3a69f; font-size: 9px; letter-spacing: 0.03em; }
.privacy-note span { color: var(--accent); font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .app-shell { width: min(100% - 30px, 540px); padding-top: 24px; }
  .hero { align-items: flex-start; gap: 34px; padding: 55px 0 50px; }
  .hero-note { font-size: 12px; }
  .progress-orbit { width: 92px; height: 92px; margin: 5px 0 0; }
  .progress-label strong { font-size: 18px; }
  .toolbar { align-items: flex-start; flex-direction: column-reverse; gap: 20px; margin-top: 30px; }
  .search-box { width: 100%; }
  .task-item { grid-template-columns: 24px 1fr 18px; gap: 10px; }
  .task-meta { display: none; }
  .delete-task { opacity: 1; }
  .list-footer { min-height: 62px; }
}
