/* — list header: the label on the left; the search control
     on the right, above the age column. Searching turns the bar into the search field, and the
     control becomes the x that closes it. — */
.todo-list__search, .todo-list__search-close { display: none; }
.todo-list__label { margin-right: auto; }
.todo-list__search-toggle { flex: none; justify-content: flex-end; margin-right: 36px; } /* over the age column: the tick column (28) + row gap (8) */

.todo-list.todo-list--searching .todo-list__label,
.todo-list.todo-list--searching .icon-btn--quiet { display: none; }
.todo-list.todo-list--searching .todo-list__search { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.todo-list.todo-list--searching .todo-list__search-close { display: flex; }
.todo-list__search svg { flex: none; color: var(--text-4); }
.todo-list__search-input:focus-visible { outline: none; }
.todo-list__search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }  /* our x clears and closes */
.todo-list__search-input { flex: 1 1 auto; min-width: 0; height: 20px; border: none; outline: none; background: transparent; padding: 0; font: inherit; font-size: 13px; color: var(--text); }

/* — rows. A 24px left gutter inside the scroll container keeps the drop line clear of the edge. — */
.todo-list__rows { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: 24px 0 0 -24px; padding: 0 12px 0 24px; display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.todo-list__rows::-webkit-scrollbar { width: 4px; }
.todo-list__rows::-webkit-scrollbar-track { background: transparent; }
.todo-list__rows::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.todo-list__rows--drop-end::after { content: ""; height: 1px; background: var(--text-4); animation: drop-mark 0.12s ease-out; }
.todo-list__empty { height: 36px; display: flex; align-items: center; font-size: 13px; color: var(--text-4); }
.todo-list__empty--nomatch { padding-left: 58px; }
/* Nothing in the list: the composer takes the first row's place, right under the heading. */
.todo-list__rows:not(:has(.todo-row)) + .todo-form .composer { margin-top: 0; }

.todo-row { position: relative; display: flex; align-items: center; gap: 8px; }
.todo-row__main { flex: 1 1 auto; min-width: 0; height: 36px; background: none; border: none; padding: 0; display: flex; align-items: center; gap: 14px; text-align: left; color: inherit; cursor: pointer; }
.todo-row__pos { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-4); width: 44px; flex: none; }
.todo-row__title { font-size: 13.5px; font-weight: 400; color: var(--text-3); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.todo-row__when { font-family: var(--font-mono); font-size: 11px; color: var(--text-4); min-width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.todo-row__when-time { width: 8ch; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }   /* 10:00 am and 8:30 pm the same width: icons and times line up */
/* From Scheduled: a small clock just before the age, not instead of it. */
.todo-row__sched { flex: none; display: flex; align-items: center; color: var(--text-4); margin-right: -8px; }
.todo-row__bell { flex: none; display: flex; align-items: center; gap: 4px; color: var(--text-3); }
.todo-row__bell-time { font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }   /* a reminder is set (delivery comes later) */
.todo-row__age { font-family: var(--font-mono); font-size: 11px; color: var(--text-4); width: 36px; text-align: right; flex: none; }
.todo-row__age > svg { display: inline-block; vertical-align: -2px; }  /* the alarm, in the age's place */
.todo-row:hover .todo-row__title { color: var(--text); }
.todo-row--current .todo-row__pos, .todo-row--current .todo-row__title { color: var(--text); }
.todo-row--current .todo-row__title { font-weight: 500; }
.todo-row__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.todo-row__action { opacity: 0; width: 28px; height: 36px; background: none; border: none; padding: 0; cursor: pointer; color: var(--text-3); display: flex; align-items: center; justify-content: flex-end; }
.todo-row:hover .todo-row__action, .todo-row:focus-within .todo-row__action { opacity: 1; }

.todo-row__action:hover { color: var(--text); }
.todo-row { transition: opacity 0.15s ease; }
.todo-row--dragging { opacity: 0.3; }
/* Where a dragged todo will land: one thin, muted line, never a block. */
.todo-row--drop-before::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--text-4); animation: drop-mark 0.12s ease-out; }
@keyframes drop-mark { from { opacity: 0; transform: scaleX(0.96); } }
@media (prefers-reduced-motion: reduce) { .todo-row, .todo-row--drop-before::before, .todo-list__rows--drop-end::after { transition: none; animation: none; } }

/* — meetings: in the user's order like todos (today's arrive on top), read only; a quieter title, and the
     tick column links out to the event. — */
.todo-row--meeting:not(.todo-row--current) .todo-row__title { color: var(--text-4); }
.todo-row--meeting:hover .todo-row__title { color: var(--text); }

/* — notice: a quiet word in the bottom-right corner when something can't be done, gone on its own — */
.notice { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: 320px; padding: 10px 14px; font-size: 12.5px; color: var(--text-2);
  background: var(--bg); border: 1px solid var(--border); box-shadow: 0 6px 22px rgba(38, 37, 30, 0.08);
  opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; }
.notice--shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .notice { transition: none; } }

/* — done today: it stays where it stands, so nothing below moves, and every row keeps its number (a voice can say "number
     three"). The title and age step back (even selected); the tick on the right says it's done, and turns into reopen. — */
.todo-row--closed .todo-row__pos { color: var(--text-4); }
.todo-row--closed .todo-row__age,
.todo-row--closed .todo-row__sched, .todo-row--closed .todo-row__bell { color: var(--border); }
.todo-row--closed .todo-row__title,
.todo-row--closed:hover .todo-row__title,
.todo-row--closed.todo-row--current .todo-row__title { color: var(--text-4); opacity: 0.6; font-weight: 400; }

/* — the tick column, right of the age and alarm — */
.todo-row__actions { display: flex; align-items: center; flex: none; }
.todo-row__tick { width: 28px; height: 36px; padding: 0; background: none; border: none; cursor: pointer; color: var(--text-3);
  display: flex; align-items: center; justify-content: flex-end; opacity: 0; }
.todo-row:hover .todo-row__tick, .todo-row__tick:focus-visible { opacity: 1; }
.todo-row__tick:hover { color: var(--text); }
/* Done: its tick stays, dark; hovered, it turns into reopen. */
.todo-row__tick--done { opacity: 1; color: var(--text); }
.todo-row__tick--done > span { display: flex; }
.todo-row__tick--done { display: flex; align-items: center; justify-content: center; }
:is(.todo-row__tick--reopen, .todo-row__tick--swap) .tick-reopen { display: none; }
:is(.todo-row__tick--reopen, .todo-row__tick--swap):is(:hover, :focus-visible) .tick-done { display: none; }
:is(.todo-row__tick--reopen, .todo-row__tick--swap):is(:hover, :focus-visible) .tick-reopen { display: flex; }
span.todo-row__tick--done { cursor: default; }   /* an ended meeting's: shown, not clicked */

/* — done rows: the last few closed todos end the list, quieter than the active ones — */

@media (max-width: 760px) {
  .todo-list__rows { overflow: visible; margin-left: 0; padding-left: 0; }
  .todo-row__action { opacity: 1; }
  .todo-row__tick { opacity: 1; }  /* no hover on touch: the tick is always there */
}

/* — recorder: a quiet corner, bottom left (notices take the right), while a meeting records — */
.recorder { position: fixed; left: 24px; bottom: 24px; z-index: 30; max-width: 420px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.recorder[hidden] { display: none; }
.recorder__line { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
/* Listening: three hairline bars rising and falling like a sound level, in the text's own colour. */
.level { display: inline-flex; align-items: center; gap: 2px; height: 10px; flex: none; }
.level i { display: block; width: 1.5px; height: 100%; background: currentColor; border-radius: 1px; transform-origin: center; animation: level 1s ease-in-out infinite; }
.level i:nth-child(2) { animation-delay: -0.35s; }
.level i:nth-child(3) { animation-delay: -0.7s; }
@keyframes level { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.recorder__note { flex-basis: 100%; font-size: 10.5px; color: var(--text-4); }
.recorder__stop { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .level i { animation: none; transform: scaleY(0.6); } }
.recorder__dismiss { color: var(--text-4); }

/* A meeting's call, recording: its state sits in the meeting's own thread, just above the composer. */
.thread__call { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; padding-top: 12px; flex: none;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.thread__call[hidden] { display: none; }
.thread__record.is-recording { display: none; }
.todo-row__when .level { color: var(--text); }
