:root {
  --paper: #f5f3ee;
  --paper-deep: #ece9e1;
  --ink: #1d211b;
  --muted: #6e7168;
  --line: #d8d5cc;
  --green: #214f3e;
  --green-soft: #dce8df;
  --lime: #d9e66c;
  --orange: #d66d36;
  --white: #fffefa;
  --shadow: 0 24px 60px rgba(28, 39, 30, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 2%, rgba(217, 230, 108, .22), transparent 23rem),
    var(--paper);
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 19px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 7px;
  background: var(--green);
  border-radius: 50%;
}

.brand-mark i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
}
.brand-mark i:nth-child(2) { width: 72%; }
.brand-mark i:nth-child(3) { width: 45%; }

.header-meta { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 13px; }
.connection { display: inline-flex; align-items: center; gap: 7px; }
.connection > span { width: 7px; height: 7px; border-radius: 50%; background: #4f956b; box-shadow: 0 0 0 4px rgba(79,149,107,.12); }
.date { padding-left: 24px; border-left: 1px solid var(--line); }

.hero {
  min-height: 375px;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: center;
  gap: 80px;
  padding: 58px 4% 50px;
}

.eyebrow, .section-kicker {
  margin: 0 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--orange);
}

.hero h1 {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  font-size: clamp(42px, 5.3vw, 69px);
  line-height: 1.16;
  letter-spacing: -.07em;
  font-weight: 700;
}

.hero h1 em { color: var(--green); font-style: normal; }
.hero-copy { max-width: 520px; margin: 24px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.progress-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 25px;
  background: rgba(255, 254, 250, .72);
  border: 1px solid rgba(216, 213, 204, .8);
  box-shadow: var(--shadow);
  border-radius: 8px 34px 8px 8px;
}

.progress-card::before {
  content: "";
  position: absolute;
  width: 25px;
  height: 3px;
  top: -1px;
  left: 27px;
  background: var(--orange);
}

.progress-ring {
  --value: calc(var(--progress) * 1%);
  flex: 0 0 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--value), var(--paper-deep) 0);
}

.progress-ring::before { content: ""; grid-area: 1/1; width: 72px; height: 72px; border-radius: 50%; background: var(--white); }
.progress-ring div { position: relative; display: flex; align-items: baseline; }
.progress-ring strong { font-size: 25px; letter-spacing: -.06em; }
.progress-ring span { font-size: 11px; color: var(--muted); }
.progress-card > div:last-child { min-width: 0; }
.progress-label { display: block; margin-bottom: 6px; color: var(--orange); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.progress-card strong { display: block; font-size: 16px; }
.progress-card small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.flash-stack { position: fixed; z-index: 20; top: 96px; right: max(24px, calc((100vw - 1180px) / 2)); display: grid; gap: 8px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--ink); color: white; font-size: 13px; border-radius: 7px; box-shadow: 0 12px 36px rgba(0,0,0,.18); animation: slide-in .28s ease-out; }
.flash > span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--lime); color: var(--green); font-size: 11px; font-weight: 700; }
.flash-error > span { background: #f3b096; color: #6b2917; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } }

.composer, .task-section {
  display: grid;
  grid-template-columns: 84px 1fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-number {
  padding-top: 38px;
  text-align: center;
  color: #999a91;
  font-size: 11px;
  letter-spacing: .12em;
  border-right: 1px solid var(--line);
}

.composer-content { padding: 35px 42px 30px; }
.section-heading, .list-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.section-heading h2, .list-toolbar h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.section-heading .section-kicker, .list-toolbar .section-kicker { margin-bottom: 6px; color: #8b8d84; }
.shortcut-hint { color: var(--muted); font-size: 11px; }
kbd { padding: 2px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--paper); font-size: 10px; }

.task-form { margin-top: 26px; }
.title-input-wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 0 20px; border: 1px solid var(--line); border-radius: 6px; background: #faf9f5; transition: border-color .2s, box-shadow .2s; }
.title-input-wrap:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33,79,62,.08); }
.input-bullet { flex: 0 0 13px; width: 13px; height: 13px; border: 2px solid var(--green); border-radius: 50%; }
.title-input-wrap input { min-width: 0; flex: 1; padding: 20px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.title-input-wrap input::placeholder, textarea::placeholder { color: #a4a49c; }
.expand-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.expand-button span { margin-left: 5px; color: var(--green); font-size: 18px; vertical-align: -1px; }
.expand-button:hover { color: var(--ink); }

.task-extras { grid-template-columns: 1fr 210px 210px; gap: 18px; padding: 20px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; }
.task-extras:not([hidden]) { display: grid; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field legend { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.field label small { float: right; font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 10px 12px; background: var(--white); outline: none; color: var(--ink); font-size: 13px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33,79,62,.07); }
.field textarea { resize: vertical; line-height: 1.6; }
.priority-field { margin: 0; padding: 0; border: 0; }
.priority-options { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 1px solid var(--line); background: var(--paper); border-radius: 5px; }
.priority-options input { position: absolute; opacity: 0; pointer-events: none; }
.priority-options span { display: block; padding: 7px; text-align: center; border-radius: 3px; color: var(--muted); font-size: 12px; cursor: pointer; }
.priority-options input:checked + span { background: var(--white); color: var(--green); box-shadow: 0 1px 4px rgba(0,0,0,.08); font-weight: 600; }
.field-wide { min-width: 0; }
.form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.form-footer p { margin: 0; color: #999a91; font-size: 11px; }
.form-footer p span { color: var(--orange); margin-right: 4px; }
.primary-button { display: inline-flex; align-items: center; gap: 32px; border: 0; border-radius: 5px; padding: 13px 18px; background: var(--green); color: white; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .2s, background .2s; }
.primary-button:hover { transform: translateY(-1px); background: #173e30; }
.primary-button span { color: var(--lime); font-size: 17px; }

.task-section { margin-top: 18px; box-shadow: none; background: transparent; }
.list-content { min-width: 0; padding: 38px 42px 32px; }
.list-toolbar h2 span { margin-left: 7px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.search-form { width: 230px; height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.search-form:focus-within { border-color: var(--green); }
.search-form span { color: var(--muted); font-size: 20px; transform: rotate(-20deg); }
.search-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 12px; }
.search-form a { color: var(--muted); text-decoration: none; }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 25px 0 6px; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 28px; }
.filters a { position: relative; display: flex; gap: 7px; padding: 0 0 13px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500; }
.filters a::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; transform: scaleX(0); background: var(--green); transition: transform .2s; }
.filters a.active { color: var(--ink); }
.filters a.active::after { transform: scaleX(1); }
.filters a span { display: grid; place-items: center; min-width: 19px; height: 18px; padding: 0 5px; background: var(--paper-deep); border-radius: 9px; font-size: 9px; }
.filters a.active span { background: var(--green-soft); color: var(--green); }
.clear-button { padding: 0 0 12px; border: 0; background: transparent; color: #8f8f88; font-size: 11px; cursor: pointer; }
.clear-button:hover { color: var(--orange); }

.task-list { display: grid; }
.task-item { position: relative; display: grid; grid-template-columns: 38px 1fr auto; gap: 16px; padding: 22px 6px; border-bottom: 1px solid var(--line); transition: background .2s, padding .2s; }
.task-item:hover { margin: 0 -12px; padding-left: 18px; padding-right: 18px; background: rgba(255, 254, 250, .7); }
.task-item::before { content: ""; position: absolute; left: -43px; top: 0; bottom: 0; width: 2px; background: transparent; }
.task-item.is-overdue::before { background: var(--orange); }
.toggle-form { padding-top: 1px; }
.check-button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 1.5px solid #a8aaa1; border-radius: 50%; background: transparent; color: transparent; cursor: pointer; transition: all .2s; }
.check-button:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.check-button span { font-size: 12px; font-weight: 700; }
.is-completed .check-button { border-color: var(--green); background: var(--green); color: var(--lime); }
.task-main { min-width: 0; }
.task-title-row { display: flex; align-items: center; gap: 10px; }
.task-title-row h3 { min-width: 0; margin: 1px 0 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.is-completed .task-title-row h3 { color: #92948c; text-decoration: line-through; text-decoration-thickness: 1px; }
.priority { flex: 0 0 auto; padding: 3px 7px; border-radius: 3px; font-size: 9px; font-weight: 600; }
.priority-low { background: #e7ebe4; color: #697367; }
.priority-medium { background: #eee9d6; color: #826f30; }
.priority-high { background: #f2dfd7; color: #a24f2c; }
.task-notes { max-width: 720px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.is-completed .task-notes { opacity: .65; }
.task-meta { display: flex; align-items: center; gap: 15px; margin-top: 10px; color: #999b92; font-size: 10px; }
.due { display: inline-flex; align-items: center; gap: 6px; }
.due i { width: 5px; height: 5px; border-radius: 50%; background: #839187; }
.due-overdue { color: var(--orange); font-weight: 600; }
.due-overdue i { background: var(--orange); }
.due-today { color: #a66b22; font-weight: 600; }
.due-today i { background: #d69c49; }
.no-date { color: #b0b1aa; }
.task-actions { display: flex; gap: 4px; align-self: start; opacity: 0; transition: opacity .2s; }
.task-item:hover .task-actions, .task-actions:focus-within { opacity: 1; }
.task-actions form { display: flex; }
.icon-button { width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8b8d84; cursor: pointer; }
.icon-button:hover { background: var(--paper-deep); color: var(--ink); }
.delete-button:hover { background: #f5e1da; color: var(--orange); }

.edit-panel { margin-top: 0; }
.edit-panel > summary { display: none; }
.edit-panel[open] { margin-top: 18px; padding-top: 17px; border-top: 1px dashed var(--line); }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edit-grid .field-wide { grid-column: 1 / -1; }
.edit-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.save-button { padding: 9px 14px; border: 0; border-radius: 4px; background: var(--green); color: white; font-size: 11px; font-weight: 600; cursor: pointer; }

.empty-state { display: grid; place-items: center; padding: 70px 20px 60px; text-align: center; }
.empty-illustration { width: 76px; height: 76px; display: grid; align-content: center; gap: 8px; margin-bottom: 20px; padding: 19px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); }
.empty-illustration span { height: 2px; border-radius: 2px; background: #bec4ba; }
.empty-illustration span:nth-child(2) { width: 75%; }
.empty-illustration span:nth-child(3) { width: 48%; }
.empty-state h3 { margin: 0; font-size: 17px; }
.empty-state p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.empty-state a { margin-top: 14px; color: var(--green); font-size: 12px; font-weight: 600; }

footer { display: flex; justify-content: space-between; padding: 27px 0 38px; color: #92948c; font-size: 10px; letter-spacing: .04em; }
footer p { margin: 0; }
footer span { color: var(--orange); }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-left: 0; padding-right: 0; }
  .progress-card { max-width: 380px; }
  .task-extras { grid-template-columns: 1fr 1fr; }
  .task-extras .field-wide { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 28px, 1180px); }
  .site-header { height: 72px; }
  .header-meta .connection { display: none; }
  .date { padding-left: 0; border: 0; }
  .hero { min-height: 340px; padding: 47px 6px 42px; }
  .hero h1 { font-size: clamp(38px, 12vw, 52px); letter-spacing: -.08em; }
  .hero-copy { font-size: 13px; }
  .progress-card { gap: 18px; padding: 20px; }
  .composer, .task-section { grid-template-columns: 1fr; }
  .section-number { display: none; }
  .composer-content, .list-content { padding: 28px 20px 24px; }
  .shortcut-hint { display: none; }
  .title-input-wrap { padding: 0 14px; }
  .expand-button { width: 32px; overflow: hidden; white-space: nowrap; color: transparent; }
  .expand-button span { color: var(--green); }
  .task-extras { grid-template-columns: 1fr; }
  .task-extras .field-wide { grid-column: auto; }
  .form-footer p { display: none; }
  .form-footer { justify-content: flex-end; }
  .list-toolbar { align-items: start; flex-direction: column; }
  .search-form { width: 100%; }
  .filter-row { align-items: end; }
  .filters { gap: 18px; overflow-x: auto; }
  .filters a { white-space: nowrap; }
  .clear-button { font-size: 0; }
  .clear-button::after { content: "清理"; font-size: 11px; }
  .task-item { grid-template-columns: 32px 1fr auto; gap: 10px; padding: 19px 0; }
  .task-item:hover { margin: 0; padding-left: 0; padding-right: 0; background: transparent; }
  .task-actions { opacity: 1; flex-direction: column; }
  .task-meta { flex-wrap: wrap; gap: 7px 12px; }
  .edit-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: center; gap: 7px; }
  .flash-stack { left: 14px; right: 14px; top: 80px; }
}

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