@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap");

:root {
  --pad: #C9B98A;
  --pad-2: #BFAE7A;
  --rule: rgba(40, 32, 16, 0.14);
  --graphite: #2B2418;
  --faint: #6E644F;
  --red: #B42318;
  --red-soft: rgba(180, 35, 24, 0.12);
  --wait: #5C6B6A;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html, body {
  margin: 0;
  background: var(--pad);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.4;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% 32px;
  background-position: 0 0;
}

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.wrap {
  max-width: 28rem;
  margin: 0 auto;
  padding: 20px 18px 80px;
}

.back {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--faint);
}

.back:hover { color: var(--graphite); }

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 0.92;
  margin: 14px 0 8px;
}

.lede {
  color: var(--faint);
  max-width: 28ch;
  margin: 0 0 28px;
  font-size: 1.02rem;
}

.section { margin: 0 0 28px; }

.section h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin: 0 0 10px;
}

.section.soon h2 { color: var(--red); }

.item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px 12px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--rule);
  align-items: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.item:last-child { border-bottom: 1px solid var(--rule); }

.item.done .copy { opacity: 0.38; text-decoration: line-through; }

.check {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--graphite);
  background: transparent;
  border-radius: 2px;
  padding: 0;
  color: var(--graphite);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.item.done .check {
  background: var(--graphite);
  color: var(--pad);
}
.check svg { display: block; }

.title {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 4px;
}

.why { margin: 0 0 8px; color: var(--faint); font-size: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border: 1px solid var(--rule);
  color: var(--faint);
}

.chip.due { color: var(--red); border-color: rgba(180,35,24,0.28); background: var(--red-soft); }
.chip.when { color: var(--faint); }
.section.waiting .chip { color: var(--faint); border-color: var(--rule); background: transparent; }
.chip.wait { color: var(--wait); }

.empty {
  color: var(--faint);
  font-style: italic;
  margin: 0;
  padding: 8px 0 4px;
}

.done-wrap { margin-top: 36px; }
.done-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.done-wrap[hidden], .done-list[hidden] { display: none; }

.note {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--faint);
  max-width: 36ch;
}

.ask-wrap { margin: 28px 0 0; }
.ask-wrap h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin: 0 0 10px;
}
.ask-wrap textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--graphite);
  background: transparent;
  border: 1.5px solid var(--graphite);
  border-radius: 2px;
  padding: 12px;
  resize: vertical;
  -webkit-tap-highlight-color: transparent;
}
.ask-wrap textarea::placeholder { color: var(--faint); }
.ask-wrap textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.ask-wrap button {
  margin-top: 10px;
  min-height: 44px;
  min-width: 88px;
  padding: 0 18px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  background: var(--graphite);
  color: var(--pad);
  border: 1.5px solid var(--graphite);
  border-radius: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ask-wrap button:disabled { opacity: 0.45; cursor: default; }
.ask-status {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--faint);
}
.ask-status.is-fail { color: var(--red); }
.fail-note {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--red);
  max-width: 36ch;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
