:root {
  --sky-top: #c5d8ef;
  --sky-mid: #e8eef6;
  --sky-bottom: #f7f4ee;
  --ink: #142033;
  --muted: #5b6b7f;
  --line: #b8c6d8;
  --panel: rgba(255, 252, 247, 0.72);
  --panel-solid: #fffaf3;
  --gold: #a67c1a;
  --gold-soft: #e8d4a0;
  --abyss: #1f5c6e;
  --done: #1f6b4a;
  --focus: #2a7a8c;
  --radius: 14px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --shadow: 0 18px 40px rgba(20, 32, 51, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  background: var(--sky-mid);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(255, 220, 140, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(120, 170, 210, 0.35), transparent 50%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-bottom) 100%);
  animation: sky-drift 28s ease-in-out infinite alternate;
}

@keyframes sky-drift {
  from { filter: hue-rotate(0deg) saturate(1); }
  to { filter: hue-rotate(8deg) saturate(1.08); }
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.25rem;
}

.brand-mark {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--abyss);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.resets {
  display: flex;
  gap: 0.75rem;
}

.reset-chip {
  min-width: 7.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}

.reset-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.reset-chip strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.jump {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 0.35rem;
  max-width: 820px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(180deg, rgba(232, 238, 246, 0.92), rgba(232, 238, 246, 0.75));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.jump a {
  flex: 1;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.jump a:hover,
.jump a:focus-visible {
  background: rgba(31, 92, 110, 0.12);
  outline: none;
}

main {
  display: grid;
  gap: 1.25rem;
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

.panel {
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid rgba(184, 198, 216, 0.75);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.panel-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.progress {
  min-width: 8.5rem;
  text-align: right;
}

.progress-text {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.progress-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(20, 32, 51, 0.1);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--abyss), var(--gold));
  transition: width 0.35s ease;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(184, 198, 216, 0.55);
}

.checklist li:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.task-check {
  position: relative;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  accent-color: var(--done);
  cursor: pointer;
  transform: scale(1.05);
}

.task-body {
  min-width: 0;
}

.task-label {
  display: block;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: rgba(31, 92, 110, 0.1);
  color: var(--abyss);
  font-size: 0.72rem;
  font-weight: 600;
}

.tag.priority-high {
  background: rgba(166, 124, 26, 0.16);
  color: #7a5a10;
}

.tag.priority-medium {
  background: rgba(91, 107, 127, 0.12);
  color: var(--muted);
}

.task-note {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.checklist li.is-done .task-label {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  opacity: 0.75;
}

.task-remove {
  margin-top: 0.1rem;
  padding: 0.15rem 0.4rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.checklist li:hover .task-remove,
.checklist li:focus-within .task-remove {
  opacity: 1;
}

.task-remove:hover,
.task-remove:focus-visible {
  background: rgba(20, 32, 51, 0.08);
  outline: none;
}

.add-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(184, 198, 216, 0.8);
}

.add-form input,
#notes-field {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--ink);
  font: inherit;
}

.add-form input:focus-visible,
#notes-field:focus-visible,
.ghost:focus-visible,
.add-form button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.add-form button {
  flex-shrink: 0;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fffaf3;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.add-form button:hover {
  background: var(--abyss);
}

.add-form button:active {
  transform: scale(0.98);
}

.panel-notes #notes-field {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.55;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.ghost {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 560px) {
  .top {
    padding-top: 1.75rem;
  }

  .resets {
    width: 100%;
  }

  .reset-chip {
    flex: 1;
  }

  .jump a {
    font-size: 0.82rem;
  }

  .task-remove {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sky {
    animation: none;
  }

  .progress-fill,
  .add-form button,
  .jump a,
  .task-label {
    transition: none;
  }
}
