:root {
  --paper: #f4f1ea;
  --paper-deep: #eae5dc;
  --ink: #20221f;
  --muted: #777a72;
  --accent: #e6613f;
  --green: #405c49;
  --line: rgba(32, 34, 31, 0.14);
  --white: rgba(255, 255, 255, 0.48);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 10%, rgba(230, 97, 63, 0.09), transparent 28rem),
    radial-gradient(circle at 92% 62%, rgba(64, 92, 73, 0.1), transparent 30rem),
    var(--paper);
}

button, input { font: inherit; }
button { color: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.app-shell { width: min(100% - 36px, 920px); margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -0.8px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50% 50% 48% 42%; color: var(--paper); background: var(--ink); font-family: Georgia, serif; font-style: italic; }
.brand-dot { color: var(--accent); }
.date-pill { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }

.hero { padding: 76px 0 52px; }
.eyebrow, .section-kicker { margin: 0 0 14px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.19em; }
.hero h1 { margin: 0; max-width: 680px; font-size: clamp(54px, 9vw, 88px); line-height: 0.95; letter-spacing: -0.065em; font-weight: 600; }
.hero h1 em { color: var(--green); font-family: Georgia, "Noto Serif SC", serif; font-weight: 400; }
.hero-copy { max-width: 440px; margin: 28px 0 0 5px; color: var(--muted); font-size: 16px; line-height: 1.7; }

.task-board { padding: 32px; border: 1px solid var(--line); border-radius: 28px; background: var(--white); box-shadow: 0 25px 80px rgba(55, 50, 43, 0.08); backdrop-filter: blur(8px); }
.progress-wrap { display: flex; align-items: center; justify-content: space-between; }
.progress-wrap h2 { margin: 0; font-size: 24px; letter-spacing: -0.04em; }
.progress-ring { --size: 64px; position: relative; display: grid; width: var(--size); height: var(--size); place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--progress) * 1%), var(--paper-deep) 0); }
.progress-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #f7f4ee; }
.progress-ring span { position: relative; font-size: 12px; font-weight: 700; }

.add-form { display: flex; align-items: center; margin-top: 28px; padding: 7px 7px 7px 18px; border: 1px solid var(--ink); border-radius: 16px; background: rgba(255,255,255,.55); transition: box-shadow .2s, transform .2s; }
.add-form:focus-within { box-shadow: 0 0 0 4px rgba(230,97,63,.12); transform: translateY(-1px); }
.plus { color: var(--accent); font-size: 24px; font-weight: 400; }
.add-form input { width: 100%; min-width: 0; padding: 12px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.add-form input::placeholder { color: #9a9a92; }
.add-form button { flex: none; padding: 11px 18px; border: 0; border-radius: 11px; color: #fff; background: var(--ink); cursor: pointer; transition: background .2s, transform .2s; }
.add-form button:hover { background: var(--accent); transform: translateY(-1px); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 8px; }
.filters { display: flex; gap: 5px; }
.filter { padding: 7px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.filter.active { color: var(--paper); background: var(--green); }
.search { display: flex; align-items: center; width: 145px; padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }

.task-list { margin: 0; padding: 0; list-style: none; }
.task-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 17px 4px; border-bottom: 1px solid var(--line); animation: enter .28s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } }
.check { display: grid; width: 23px; height: 23px; place-items: center; border: 1.5px solid #989b93; border-radius: 50%; background: transparent; cursor: pointer; transition: .2s; }
.check::after { content: "✓"; opacity: 0; color: white; font-size: 13px; transform: scale(.5); transition: .2s; }
.completed .check { border-color: var(--green); background: var(--green); }
.completed .check::after { opacity: 1; transform: scale(1); }
.task-text { min-width: 0; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.completed .task-text { color: #989a94; text-decoration: line-through; text-decoration-color: rgba(152,154,148,.65); }
.task-text[contenteditable="true"] { padding: 5px 8px; outline: 1px solid var(--accent); border-radius: 6px; background: white; }
.actions { display: flex; opacity: 0; transition: opacity .2s; }
.task-item:hover .actions, .actions:focus-within { opacity: 1; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.icon-btn:hover { color: var(--accent); background: rgba(230,97,63,.08); }

.empty-state { padding: 48px 20px 38px; text-align: center; }
.empty-orbit { display: grid; width: 68px; height: 68px; margin: auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.empty-orbit span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.empty-state h3 { margin: 18px 0 5px; font-family: Georgia, "Noto Serif SC", serif; font-size: 22px; font-weight: 400; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }

.board-footer { display: flex; justify-content: space-between; padding: 18px 4px 0; color: var(--muted); font-size: 12px; }
.board-footer button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.board-footer button:hover { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; padding: 28px 2px 40px; color: var(--muted); font-size: 11px; letter-spacing: .05em; }

@media (max-width: 620px) {
  .app-shell { width: min(100% - 24px, 920px); }
  .site-header { padding: 20px 2px; }
  .date-pill { font-size: 11px; }
  .hero { padding: 54px 4px 38px; }
  .hero h1 { font-size: clamp(50px, 17vw, 70px); }
  .task-board { padding: 22px 16px; border-radius: 22px; }
  .add-form button { padding-inline: 13px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .search { width: 100%; }
  .actions { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
