/* Todo demo (namespaced under body.demo-todo).
   One white card holds the composer and the list; the facts sit beside it. */

.demo-todo .todo-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

.demo-todo .todo-main { flex: 999 1 520px; min-width: 0; }

.demo-todo .todo-lede { margin: 8px 0 28px; color: var(--ink-2); }

.demo-todo .todo-card { overflow: hidden; }

/* Composer: the field and its button inside the card's top row. */
.demo-todo .todo-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--accent);
}

.demo-todo .todo-form svg { flex: none; }

.demo-todo .todo-form input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0;
  box-shadow: none;
  background: transparent;
  font-size: 16px;
}

.demo-todo ul.issues {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.demo-todo ul.issues:not(:has(li))::before {
  content: "Nothing here yet. Add the first issue above.";
  display: block;
  padding: 18px 12px;
  color: var(--muted);
}

.demo-todo ul.issues li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 12px;
  border-radius: 10px;
}

.demo-todo ul.issues li:hover { background: var(--paper); }

.demo-todo ul.issues form.toggle {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 36px;
}

/* A rounded square tick in the demo's green. */
.demo-todo ul.issues input[type="checkbox"] {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 7px;
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px #C4B8A6;
  cursor: pointer;
  display: grid;
  place-content: center;
}

.demo-todo ul.issues input[type="checkbox"]:checked {
  background: var(--accent);
  box-shadow: none;
}

.demo-todo ul.issues input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border: solid #fff;
  border-width: 0 0 2.5px 2.5px;
  transform: rotate(-45deg);
}

.demo-todo ul.issues li .title {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  font-size: 16px;
  overflow-wrap: anywhere; /* long unbroken titles must not widen the page */
}

.demo-todo ul.issues li.done .title {
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-color: #C4B8A6;
}

.demo-todo ul.issues li > form:last-child { flex: none; }

.demo-todo ul.issues button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--faint);
  font-size: 18px;
  font-weight: 400;
}

.demo-todo ul.issues button:hover { background: var(--danger-bg); color: var(--danger); filter: none; }

/* --- Facts beside the list ------------------------------------------------- */

.demo-todo .todo-facts {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 104px;
}

.demo-todo .todo-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.demo-todo .todo-stat { padding: 18px; border-radius: 14px; box-shadow: var(--ring-1); }
.demo-todo .todo-stat p { margin: 0; font-size: 13px; color: var(--muted); }

.demo-todo .todo-stat .todo-stat-num {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.1;
  color: var(--ink);
}

.demo-todo .todo-runtime {
  margin: 0;
  padding: 6px 18px;
  border-radius: 14px;
  background: var(--paper-2);
}

.demo-todo .todo-runtime div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}

.demo-todo .todo-runtime div:last-child { border-bottom: 0; }
.demo-todo .todo-runtime dt { color: var(--muted); }
.demo-todo .todo-runtime dd { margin: 0; font-weight: 600; text-align: right; }

.demo-todo .todo-hint { margin: 4px 4px 0; font-size: 13px; color: var(--muted); }

@media (max-width: 820px) {
  .demo-todo .todo-page { padding-top: 32px; }
  .demo-todo .todo-facts { padding-top: 0; }
}
