:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  color: #203029;
  background: #f7f6f2;
  --accent: #246248;
  --muted: #52655a;
  --line: #d9dfd8;
  --surface: #fffefa;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #387a5d; outline-offset: 3px; }
h1, h2, p { margin: 0; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .workspace {
  width: min(100% - 2rem, 43rem);
  margin-inline: auto;
}
.header-inner, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 4rem; }
.wordmark { font: 700 1.68rem Georgia, serif; letter-spacing: -.06em; }
.wordmark span { color: var(--accent); }
.workspace { padding-block: clamp(1.3rem, 4vw, 3rem) 4rem; }
.page-heading { align-items: end; }
.date {
  margin-bottom: .3rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
}
h1 { font: 400 clamp(2.55rem, 7vw, 4rem)/1.03 Georgia, serif; letter-spacing: -.055em; }

.quiet, .primary, .views a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem .9rem;
  border-radius: .5rem;
  font-weight: 650;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
}
.quiet { border: 1px solid var(--line); background: var(--surface); color: var(--accent); }
.quiet:disabled { opacity: .55; cursor: wait; }
.quiet:hover, .views a:hover { background: #eaf0e9; }
.primary { background: var(--accent); color: white; border: 1px solid var(--accent); }
.views { display: flex; gap: .4rem; margin-block: 1.3rem .65rem; }
.views a { min-width: 0; color: var(--muted); }
.views a[aria-current="page"] { background: #dfece2; color: #174b35; }
.search { display: block; }
.search input {
  display: block;
  min-height: 48px;
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  color: inherit;
  background: var(--surface);
}
.sync { min-height: 2rem; padding: .4rem 0; color: var(--muted); font-size: .83rem; }
.sync.warning { color: #834419; }
.sync-bar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.sync-bar .sync { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hide-completed { flex: none; padding-inline: .55rem; }
.group + .group { margin-top: 1.4rem; }
.group h2 { margin: 0 0 .5rem; font-size: .9rem; font-weight: 760; }
.rows { padding: 0; list-style: none; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; }
.row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 67px;
}
.row + .row { border-top: 1px solid var(--line); }
.row.reorderable { grid-template-columns: 50px minmax(0, 1fr) 44px 44px; }
.row.dragging { opacity: .55; }
.row.drop-before { box-shadow: inset 0 3px var(--accent); }
.row.drop-after { box-shadow: inset 0 -3px var(--accent); }
.task-copy { padding-block: .63rem; overflow-wrap: anywhere; }
.task-title { display: block; font-size: .96rem; line-height: 1.35; font-weight: 640; }
.task-meta { display: block; margin-top: .2rem; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.tick, .task-link, .grip {
  display: grid;
  place-items: center;
  width: 44px;
  height: 46px;
  margin: auto;
  border: 0;
  background: transparent;
  border-radius: .4rem;
}
.tick { color: var(--accent); cursor: pointer; }
.tick::before { content: ""; width: 1.16rem; height: 1.16rem; border: 1.6px solid currentColor; border-radius: .35rem; }
.tick:hover:not(:disabled)::before { background: #eaf3eb; }
.tick:disabled { opacity: .45; cursor: default; }
.tick.busy::before { border-radius: 50%; border-right-color: transparent; animation: rotate .8s linear infinite; }
.tick.done::before { content: "✓"; border: 0; font-size: 1.23rem; animation: none; }
.row.completed .task-title { color: var(--muted); text-decoration: line-through; }
.tick.dismiss::before { content: "×"; border: 0; font-size: 1.32rem; }
.tick.dismiss { color: var(--muted); }
.task-link.verify { cursor: pointer; color: var(--accent); font-size: .73rem; font-weight: 750; }
.task-link { color: var(--muted); font-size: 1.1rem; text-decoration: none; }
.task-link:hover { background: #eaf0e9; }
.grip { color: var(--muted); cursor: grab; font-size: 1.25rem; touch-action: none; user-select: none; }
.grip:hover:not(:disabled) { background: #eaf0e9; }
.grip:active:not(:disabled) { cursor: grabbing; }
.grip:disabled { opacity: .45; cursor: default; }
.empty, .boot, .sign-in p { color: var(--muted); }
.empty { padding: 1.5rem 0; }
.sign-in p { margin: .7rem 0 1.2rem; }
.sr-only { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
@keyframes rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tick.busy::before { animation: none; } }
