:root {
  color-scheme: light;
  --bg: #f6f3eb;
  --surface: #fbf9f3;
  --ink: #303631;
  --muted: #626655;
  --bronze: #76613f;
  --control: #384c40;
  --on-control: #f4f1e7;
  --boundary: #7b806d;
  --line: #d1cabb;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.6 Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, input, textarea, .todo__label { min-height: 44px; min-width: 44px; }
button:disabled { cursor: wait; }
:is(button, input, textarea):focus-visible {
  outline: 3px solid var(--control);
  outline-offset: 4px;
}
textarea:focus, #next-step:focus {
  outline: 3px solid var(--control);
  outline-offset: 3px;
}
.app {
  width: min(42.75rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3.75rem 0 2.5rem;
}
.app__header { text-align: center; margin-bottom: 3.25rem; }
.app__mark { display: block; margin: 0 auto 2rem; stroke: #b2a184; }
.app__eyebrow {
  color: var(--bronze);
  font-size: .875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}
.app__title {
  margin: 0;
  font: normal 3.25rem/1.15 var(--serif);
  letter-spacing: -.025em;
}
.app__title em { display: block; color: var(--bronze); font-weight: normal; }
.app__lede { color: var(--muted); margin: 1.5rem 0 0; }
.sorter { position: relative; }
.sorter__label {
  display: block;
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
textarea, #next-step {
  display: block;
  width: 100%;
  border: 1.5px solid var(--boundary);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  padding: 1rem 1.25rem;
}
textarea {
  resize: vertical;
  min-height: 8rem;
  font: 1.25rem/1.6 var(--serif);
}
::placeholder { color: var(--muted); opacity: 1; }
.field-hint { color: var(--muted); font-size: 1rem; margin: .75rem 0 0; }
.field-error { color: var(--ink); margin: .75rem 0 0; }
[aria-invalid="true"] { border-width: 2px; border-color: var(--ink); }
.sorter__question { color: var(--muted); margin: 1.5rem 0 .25rem; }
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .5rem .75rem;
  margin-left: -.75rem;
  border: none;
  border-radius: 4px;
  color: var(--bronze);
  background: var(--bg);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.text-button:hover { color: var(--ink); }
.disclosure-arrow { width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-left: .25rem; }
[aria-expanded="true"] .disclosure-arrow { transform: rotate(225deg); }
.decision-guide {
  margin: 1rem 0 1.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--boundary);
  background: var(--surface);
}
.decision-guide section + section { margin-top: 1.25rem; }
.decision-guide h2 { font: 600 1rem/1.6 Arial, Helvetica, sans-serif; margin: 0; }
.decision-guide p { margin: .2rem 0 0; }
.decision-guide__example { color: var(--muted); }
.sorter__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.btn {
  min-height: 3.75rem;
  padding: .85rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: 4px;
  background: var(--bg);
  white-space: normal;
}
.btn--control { color: var(--on-control); background: var(--control); }
.btn--control:hover { background: #2d4034; }
.btn--release { color: var(--bronze); border-color: var(--bronze); }
.btn--release:hover { background: #eee9dc; }
.btn[aria-pressed="true"] { border-color: var(--control); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--control); }
.action-editor {
  margin-top: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--boundary);
}
.action-editor h2 { margin: 0; font: normal 1.65rem/1.3 var(--serif); }
.action-editor__hint { color: var(--muted); margin: .65rem 0 1.5rem; }
#next-step { min-height: 3.75rem; }
.action-editor__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 1.25rem; }
.action-editor__actions .btn { min-height: 3rem; }
.action-editor__actions .text-button { margin-left: 0; }
.reminder { margin: 1.5rem 0 0; text-align: center; color: var(--bronze); font: 1.5rem/1.5 var(--serif); }
.reminder:empty { display: none; }
.storage-status { margin: 1.5rem 0 0; color: var(--ink); }
.list { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.list__title { font: normal 1.65rem/1.3 var(--serif); margin: 0 0 1rem; }
.list__empty { color: var(--muted); margin: 0; }
.todos { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: .5rem 0; }
.todo__label { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; padding: .5rem 0; cursor: pointer; }
.todo__label input { appearance: none; flex: none; width: 1.25rem; height: 1.25rem; min-width: 0; min-height: 0; border: 1.5px solid var(--boundary); border-radius: 50%; margin: 0; background: var(--surface); }
.todo__label input:checked { background: var(--control); border-color: var(--control); box-shadow: inset 0 0 0 4px var(--surface); }
.todo__text { overflow-wrap: anywhere; }
.todo--done .todo__text { color: var(--muted); text-decoration: line-through; }
.todo__remove { flex: none; width: 44px; height: 44px; padding: .5rem; border: none; background: var(--bg); color: var(--muted); font-size: 1.5rem; border-radius: 4px; }
.todo__remove:hover { color: var(--ink); }
.app__footer { text-align: center; color: var(--muted); font-size: .875rem; margin-top: 3rem; }
.app__footer p { margin: 0; }
.app__footer a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--bronze); padding: .5rem; font-size: 1rem; text-underline-offset: .2em; }
.app__footer a:hover { color: var(--ink); }
.app__footer a:focus-visible { outline: 3px solid var(--control); outline-offset: 3px; }
p, h1, h2, button, label { overflow-wrap: anywhere; }

/* The words lose their edges, break into dust, and leave empty space. */
.release-layer { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.release-thought { position: absolute; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; animation: thought-to-dust 2.8s ease forwards; }
.is-releasing textarea { color: transparent; -webkit-text-fill-color: transparent; }
.dust-particle { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: var(--bronze); opacity: 0; animation: dust-scatter 2.1s ease-out var(--delay) forwards; }
@keyframes thought-to-dust {
  0%, 10% { opacity: 1; filter: blur(0); }
  32% { opacity: .3; filter: blur(2px); }
  45%, 100% { opacity: 0; filter: blur(4px); }
}
@keyframes dust-scatter {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  12% { opacity: .9; }
  55% { opacity: .4; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.15); }
}

@media (max-width: 36rem) {
  .app { width: calc(100% - 2.5rem); padding-top: 2.5rem; }
  .app__title { font-size: 2.5rem; }
  .app__header { margin-bottom: 2.5rem; }
  .sorter__actions { grid-template-columns: 1fr; gap: .75rem; }
  .action-editor { padding-left: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
