/* Goals: Today's Toads, horizon goal cards, the toad picker. */
/* ==========================================================================
   DAILY TOAD — pick today's one must-do task (eat-the-frog).
   Lives on the Goals tab (hero + horizon goals) and as a dashboard strip
   plus a slide-in picker. kw-toad-* / kw-goal-* classes only.
   ========================================================================== */

.kw-toad-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-size: var(--text-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange-text);
}
.kw-toad-eyebrow .material-symbols-rounded { font-size: 14px; }
/* Streak chip inside the toad eyebrow — the streak belongs to the toad habit,
   so it reads as part of that card rather than a card of its own. */
.kw-toad-streak {
  display: inline-flex; align-items: center; gap: var(--space-xxs);
  margin-left: var(--space-xs); padding: 1px var(--space-xs) 1px var(--space-xxs);
  border-radius: var(--radius-full);
  background: var(--overdue-alpha);
  font-variant-numeric: tabular-nums;
}

/* ---- Dashboard slim strip (entry point) ---- */
.kw-toad-strip {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-md);
}
.kw-toad-strip .kw-toad-badge {
  width: 40px; height: 40px; border-radius: var(--radius-md); flex: 0 0 auto;
  background: var(--overdue-alpha); color: var(--orange);
  display: inline-flex; align-items: center; justify-content: center;
}
.kw-toad-strip .kw-toad-badge .material-symbols-rounded { font-size: 22px; }
.kw-toad-strip .kw-toad-strip-meta { flex: 1; min-width: 0; }
.kw-toad-strip .kw-toad-strip-title {
  font-size: var(--text-title-md); font-weight: 600; color: var(--fg); margin-top: var(--space-xxxs);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* One line per toad (#1177), in the strip and the Goals hero. */
.kw-toad-strip:not(.empty) { align-items: flex-start; }
.kw-toad-line { display: flex; align-items: center; gap: var(--space-sm); min-height: 34px; border-bottom: 1px solid var(--divider); }
.kw-toad-line:last-child { border-bottom: none; }
.kw-toad-line .t {
  flex: 1; min-width: 0; font-size: var(--text-title-md); font-weight: 600; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kw-toad-line .d { font-size: var(--text-body-md); color: var(--fg-muted); flex: 0 0 auto; }
.kw-toad-line .d.overdue { color: var(--orange-text); }
.kw-toad-play {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: var(--orange-solid); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
}
.kw-toad-play:hover { background: var(--orange-solid-hover); }
.kw-toad-play .material-symbols-rounded { font-size: 18px; }
.kw-toad-remove .material-symbols-rounded { font-size: 18px; color: var(--fg-muted); }
.kw-toad-hero .kw-toad-hero-lines { margin-top: var(--space-sm); max-width: 52ch; }
.kw-toad-hero .kw-toad-line { min-height: 44px; }
.kw-toad-hero .kw-toad-line .t { font-size: var(--text-title-row); font-weight: 700; }
.kw-toad-strip.empty { border-left-color: var(--border-strong); }
.kw-toad-strip.empty .kw-toad-badge { background: var(--bg-subtle); color: var(--fg-subtle); }
.kw-toad-strip.empty .kw-toad-strip-title { color: var(--fg-muted); font-weight: 500; }
.kw-toad-strip.empty .kw-toad-eyebrow { color: var(--fg-muted); }

/* Last day of a goal period: the critical band, so it borrows --error rather
   than the toad strip's orange. Colour is not the only signal — the strip's copy
   states the situation in words (#773). Text uses --error-text; plain --error is
   a fill/border colour and fails AA as text (see the countdown note below). */
.kw-toad-strip.period-ending { border-left-color: var(--error); }
.kw-toad-strip.period-ending .kw-toad-badge {
  background: color-mix(in srgb, var(--error) 18%, transparent);
  color: var(--error-text);
}
.kw-toad-strip.period-ending .kw-toad-eyebrow { color: var(--error-text); }

/* ---- Goals tab layout ---- */
/* vertical stack: today's row (toad + also-today) on top, 2x2 horizon quad below */
.kw-goals-stack { display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.kw-goals-stack > .kw-toad-hero { width: 100%; }
/* Today (toad + plate) on the left, horizons stacked on the right (#978). */
.kw-goals-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-md); align-items: start; }
.kw-goals-horizons { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-sm); }
@media (max-width: 839px) { /* below --bp-expanded */
  .kw-goals-layout { grid-template-columns: 1fr; }
}
.kw-section-label {
  font-size: var(--text-label-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-subtle); margin-bottom: var(--space-xxxs);
}

/* ---- Today's Toad hero ---- */
.kw-toad-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.kw-toad-hero .kw-toad-hero-empty { font-size: var(--text-body-lg); color: var(--fg-muted); line-height: 1.5; max-width: 42ch; margin-top: var(--space-sm); }
.kw-toad-hero .kw-toad-hero-actions { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-lg); flex-wrap: wrap; }
.kw-toad-hero .kw-toad-watermark { position: absolute; right: 14px; top: 12px; pointer-events: none; }

/* flag-rail (default) — quiet white card with orange accent rail */
.kw-toad-hero.flag-rail { background: var(--surface); border: 1px solid var(--divider); border-left: 4px solid var(--orange); padding: var(--space-lg) var(--space-lg); }
.kw-toad-hero.flag-rail .kw-toad-watermark { color: var(--orange); opacity: 0.16; }

/* ---- Horizon goal cards ---- */
.kw-goal-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); }
.kw-goal-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); }
.kw-goal-head .period {
  font-size: var(--text-label-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-subtle);
}
.kw-goal-period-label { font-size: var(--text-label-sm); color: var(--fg-subtle); font-variant-numeric: tabular-nums; }

/* Timeline nav: prev/next through periods, plus a jump back to today. */
.kw-goal-nav { display: flex; align-items: center; gap: var(--space-xxxs); }
.kw-goal-nav-btn { padding: var(--space-xxxs); min-width: 0; color: var(--fg-subtle); }
.kw-goal-nav-btn:hover { color: var(--fg); }

/* Jump-to-period picker (#782). Deliberately not .kw-input: that is a 44px form
   control and this sits inside the compact card head, where it has to read as
   the period label it replaced — borderless until hovered or focused. */
.kw-goal-period-select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: var(--text-label-sm); font-variant-numeric: tabular-nums;
  color: var(--fg-subtle); background: transparent;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: var(--space-xxxs) var(--space-md) var(--space-xxxs) var(--space-xxs); max-width: 148px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-subtle) 50%),
                    linear-gradient(135deg, var(--fg-subtle) 50%, transparent 50%);
  background-position: calc(100% - 10px) calc(50% + 1px), calc(100% - 6px) calc(50% + 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.kw-goal-period-select:hover { color: var(--fg); border-color: var(--divider); }
.kw-goal-period-select:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; color: var(--fg); }
/* The options render in the OS menu, which does not inherit the transparent
   background above — without this they draw dark-on-dark in dark mode. */
.kw-goal-period-select option { background: var(--surface); color: var(--fg); }

/* Entry rows — one addressable intention per line (#931, ADR-0002). Replaces
   the single rendered-markdown blob: a period holds several lines now, each
   with its own tick, so there is nothing left to render as markdown. */
.kw-goal-entries { display: flex; flex-direction: column; gap: 1px; margin-top: var(--space-xs); }
.kw-goal-entry {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: var(--space-xxs) var(--space-xs); border-radius: var(--radius-sm);
}
.kw-goal-entry:hover { background: var(--bg-subtle); }
.kw-goal-entry-tick { display: flex; align-items: center; }
.kw-goal-entry-tick input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--success);
}
.kw-goal-entry-edit { flex: 1 1 auto; display: flex; min-width: 0; }
.kw-goal-entry-text {
  flex: 1 1 auto; font-size: var(--text-body-md); color: var(--fg);
  word-break: break-word; line-height: 1.35;
  background: none; border: none; padding: 0; font-family: inherit; text-align: left; cursor: text;
}
/* A ticked line is struck through as well as greyed: colour alone would not
   reach a colour-blind reader. */
.kw-goal-entry.done .kw-goal-entry-text { text-decoration: line-through; color: var(--fg-subtle); }
/* A quiet marker, not a badge. An entry that has slid three periods running
   should be visible as that without shouting about it. */
.kw-goal-entry-carried {
  flex: 0 0 auto; font-size: var(--text-eyebrow); letter-spacing: 0.03em;
  color: var(--fg-subtle); font-family: var(--font-mono, monospace);
}
/* Remove stays hidden until the row is hovered or something inside it has
   focus, so the list reads as lines rather than a row of controls — but it is
   always reachable by keyboard. */
.kw-goal-entry-remove { flex: 0 0 auto; opacity: 0; transition: opacity .12s; }
.kw-goal-entry:hover .kw-goal-entry-remove,
.kw-goal-entry-remove:focus-within { opacity: 1; }

/* The line's task count doubles as the toggle for its well (#1379). Quieter
   than the "2/5 done" tally. At 0 it reads "+ task" and hides like Remove. */
.kw-goal-entry-tasks {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--space-xxxs);
  height: 24px; padding: 0 var(--space-xs); border: 0; border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; transition: opacity .12s;
}
.kw-goal-entry-count {
  display: inline-flex; align-items: center; gap: 2px; white-space: nowrap;
  font: 500 11px/1 var(--font-mono, monospace); letter-spacing: .02em;
  font-variant-numeric: tabular-nums; color: var(--fg-subtle);
}
.kw-goal-entry-tasks-chevron { color: var(--fg-subtle); }
.kw-goal-entry-tasks:has([data-empty]) { opacity: 0; }
.kw-goal-entry-tasks:has([data-empty])[aria-expanded="false"] .kw-goal-entry-tasks-chevron { display: none; }
.kw-goal-entry:hover .kw-goal-entry-tasks,
.kw-goal-entry-tasks:focus-visible,
.kw-goal-entry-tasks[aria-expanded="true"] { opacity: 1; }
.kw-goal-entry:hover .kw-goal-entry-count[data-empty] { color: var(--fg-muted); }
.kw-goal-entry.open { background: var(--bg-subtle); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.kw-goal-entry.open .kw-goal-entry-count { color: var(--fg); }
/* The well shares the open row's tint and starts at the text column, so it
   reads as that line's — no left rail. */
.kw-goal-entry-well {
  background: var(--bg-subtle); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: var(--space-xxs) var(--space-sm) var(--space-sm) 32px; margin-bottom: var(--space-xxs);
}

.kw-goal-entry-add {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: var(--space-xxs) var(--space-xs); margin-top: var(--space-xxxs); color: var(--fg-subtle);
}
.kw-goal-entry-add:focus-within { color: var(--orange); }
.kw-goal-entry-input {
  flex: 1 1 auto; border: none; background: transparent; color: var(--fg);
  font-family: inherit; font-size: var(--text-body-md); padding: var(--space-xxxs) 0;
}
.kw-goal-entry-input:focus { outline: none; }
.kw-goal-entry-input::placeholder { color: var(--fg-subtle); }

/* Carry strip — last period's unfinished lines, offered once that period has
   ended. Inline and dismissible by contract (ADR-0002): never a dialog,
   because writing this period's lines must not be blocked by resolving the
   last one. The checkboxes here select what to carry; they are not done-ticks. */
.kw-goal-carry {
  margin-top: var(--space-xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm);
  background: var(--bg-subtle); border: 1px solid var(--divider);
}
.kw-goal-carry-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs);
  font-size: var(--text-label-sm); color: var(--fg-muted); margin-bottom: var(--space-xs);
}
.kw-goal-carry-row {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: var(--space-xxs) 0; font-size: var(--text-body-sm); color: var(--fg); cursor: pointer;
}
.kw-goal-carry-row input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--orange); }
.kw-goal-carry-btn {
  width: 100%; margin-top: var(--space-xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm);
  border: 1px solid var(--divider); background: var(--surface);
  cursor: pointer; font-family: inherit; font-size: var(--text-label-md); font-weight: 600;
  color: var(--orange-text);
}
.kw-goal-carry-btn:hover { border-color: var(--orange); }

/* Card footer — the tally on the left, the activity toggle on the right. */
.kw-goal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs);
  margin-top: var(--space-sm); padding-top: var(--space-xs); border-top: 1px solid var(--divider);
}
/* "1/4 done" is the only progress number, and nothing is computed from it: it
   counts lines the user wrote and ticked themselves (ADR-0002). */
.kw-goal-tally { font-size: var(--text-label-sm); color: var(--fg-subtle); }

/* Period countdown — how much of the horizon period is left. Colour bands are a
   fraction of the period elapsed, shared with mobile (hub docs/behavior-rules.md).
   Deliberately not the priority ramp: that one is blue->orange->red and means
   task priority. The number always renders, so colour is never the only signal.

   Uses the -text token variants, not plain --success/--orange/--error: those are
   fill/border colours and fail AA as text on light backgrounds (2.54:1 and
   3.76:1), which the axe-core gate in #577 would catch. */
.kw-goal-countdown { font-size: var(--text-label-sm); font-weight: 600; white-space: nowrap; }
/* Share of the period gone, in the countdown's band colour. */
.kw-goal-progress { height: 3px; margin-top: var(--space-xs); border-radius: var(--radius-xs); background: var(--divider); overflow: hidden; }
.kw-goal-progress > span { display: block; height: 100%; background: var(--success); }
.kw-goal-progress.closing > span { background: var(--orange); }
.kw-goal-progress.critical > span { background: var(--error); }
.kw-goal-countdown.calm { color: var(--success-text); }
.kw-goal-countdown.closing { color: var(--orange-text); }
.kw-goal-countdown.critical { color: var(--error-text); }

/* Period note (#762): tap-to-edit, always reachable — no locked-period or
   ended-period gate. It is the one thing entries cannot express, so it stayed
   when the period verdict went (ADR-0002). */
.kw-goal-note { margin-top: var(--space-sm); }
.kw-goal-note-view {
  cursor: text; border-radius: var(--radius-sm); padding: var(--space-xs) var(--space-xs);
  font-size: var(--text-body-sm); color: var(--fg-muted);
  white-space: pre-wrap; word-break: break-word;
}
.kw-goal-note-view:hover { background: var(--bg-subtle); }
.kw-goal-note-empty { color: var(--fg-subtle); }
.kw-goal-note-input {
  width: 100%; resize: vertical; border-radius: var(--radius-sm); padding: var(--space-xs) var(--space-xs);
  border: 1px solid var(--divider); background: var(--surface); color: var(--fg);
  font-family: inherit; font-size: var(--text-body-sm); line-height: 1.4;
}
.kw-goal-note-input:focus { outline: none; border-color: var(--orange); }
.kw-goal-note-actions { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); }
.kw-goal-note-cancel, .kw-goal-note-clear {
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: var(--text-label-md); font-weight: 600; padding: var(--space-xxs) var(--space-xs); color: var(--fg-muted);
}
.kw-goal-note-cancel:hover, .kw-goal-note-clear:hover { color: var(--fg); }

.kw-goal-save, .kw-goal-note-save {
  border: none; cursor: pointer; font-family: inherit; font-size: var(--text-label-md); font-weight: 600;
  padding: var(--space-xxs) var(--space-sm); border-radius: var(--radius-sm); background: var(--orange-solid); color: var(--white);
}
.kw-goal-save:hover, .kw-goal-note-save:hover { background: var(--orange-solid-hover); }
.kw-goal-save:disabled { opacity: 0.5; cursor: not-allowed; }
.kw-goal-cancel {
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: var(--text-label-md); font-weight: 600; padding: var(--space-xxs) var(--space-xs); color: var(--fg-muted);
}
.kw-goal-cancel:hover { color: var(--fg); }

/* Past / Finished toggle row */
.kw-goal-toggles { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-xxs); }
.kw-goal-toggle {
  display: inline-flex; align-items: center; gap: var(--space-xxs); border: none; background: transparent;
  cursor: pointer; font-family: inherit; font-size: var(--text-label-sm); font-weight: 600; padding: var(--space-xxs) 0;
  color: var(--fg-subtle);
}
.kw-goal-toggle:hover { color: var(--fg); }
.kw-goal-finished-row { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xxs) 0; min-width: 0; }
.kw-goal-finished-row .fin-text {
  flex: 1; min-width: 0; font-size: var(--text-body-sm); color: var(--fg-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kw-goal-history { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--divider); }
.kw-goal-history-label {
  font-size: var(--text-eyebrow); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-subtle); margin-bottom: var(--space-xs);
}
/* Linked tasks on the goal card (#926). Deliberately not styled like
   .kw-goal-history above: period activity is a flat record of what finished in
   the window, this is what the user committed to the goal, and the card must not
   let the two read as the same list. The progress meter and the per-row
   checkbox/unlink affordances are what separate them visually. */
.kw-goal-links-progress {
  margin: 2px 0 var(--space-xs); font: 500 11px/1.4 var(--font-mono, monospace);
  color: var(--fg-muted); font-variant-numeric: tabular-nums;
}
.kw-goal-link-row {
  display: flex; align-items: center; gap: 9px; padding: 5px 0; min-width: 0;
  font-size: 13px; border-radius: var(--radius-sm);
}
.kw-goal-link-title { flex: 1; min-width: 0; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kw-goal-link-row.done .kw-goal-link-title { color: var(--fg-subtle); text-decoration: line-through; }
.kw-goal-link-due { font: 500 11px var(--font-mono, monospace); color: var(--fg-subtle); white-space: nowrap; }
/* A task just made from the box flashes once, so the eye finds where it went. */
.kw-goal-link-row.added { margin: 0 -6px; padding: 5px 6px; animation: kw-goal-link-added 1.6s ease-out forwards; }
@keyframes kw-goal-link-added { from, 40% { background: var(--orange-wash); } to { background: transparent; } }
.kw-goal-link-unlink {
  width: 26px; height: 26px; display: grid; place-items: center; padding: 0;
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; color: var(--fg-subtle);
}
.kw-goal-link-unlink:hover { color: var(--fg); }
.kw-goal-link-new { display: flex; gap: var(--space-xs); align-items: center; margin-top: var(--space-xs); }
.kw-goal-link-new-box {
  flex: 1; min-width: 0; height: 34px; display: flex; align-items: center; gap: var(--space-xs);
  padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--fg-subtle);
}
.kw-goal-link-new-box:focus-within { border-color: var(--orange); }
.kw-goal-link-new-box:focus-within > .material-symbols-rounded { color: var(--orange); }
.kw-goal-link-new-box input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0;
  font-family: inherit; font-size: 13px; color: var(--fg);
}
.kw-goal-link-new-box input:focus { outline: none; }
.kw-goal-link-new-box input::placeholder { color: var(--fg-subtle); }
.kw-goal-link-new-key {
  font: 500 10px var(--font-mono, monospace); color: var(--fg-subtle);
  border: 1px solid var(--border); border-radius: 3px; padding: 2px 4px;
}
.kw-goal-link-full {
  height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--fg-muted); cursor: pointer;
}
.kw-goal-link-full:hover { color: var(--fg); }
.kw-goal-link-add {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; color: var(--orange-text);
}
/* A select dressed as a text link: the native picker still lists the tasks. */
.kw-goal-link-existing {
  appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--orange-text);
}
.kw-goal-link-existing option { background: var(--surface); color: var(--fg); }

/* ==========================================================================
   Toad picker — centered modal over the shared .kw-modal shell (#786).
   ========================================================================== */
/* The swap affordance on the toad strip: orange marks it as changing an existing
   commitment rather than making a new one. Was an inline style before the button
   became a shared component (#784). */
.kw-toad-strip .kw-btn-swap .material-symbols-rounded { color: var(--orange); }

/* The toad picker is the shared centered modal (.kw-modal), only wider than the
   560px default so a task title, its priority and an overdue pill fit on one
   row. It was a right-hand drawer until #786. */
.kw-toad-modal { max-width: 620px; }

/* The htmx-swapped body has to carry the column flex itself: .kw-modal's only
   child is this wrapper, so without it .kw-toad-list has no constrained parent
   to scroll inside and the list runs off the bottom of the dialog (#786). */
.kw-toad-pk { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.kw-toad-filter {
  display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-md);
  padding: 0 var(--space-sm); height: 38px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
}
.kw-toad-filter:focus-within { border-color: var(--orange); }
.kw-toad-filter .material-symbols-rounded { font-size: 18px; color: var(--fg-subtle); flex: 0 0 auto; }
.kw-toad-filter input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-family: inherit; font-size: var(--text-body-md); color: var(--fg);
}
.kw-toad-filter input::-webkit-search-cancel-button { cursor: pointer; }

.kw-toad-pk-head { padding: var(--space-lg) var(--space-lg) var(--space-md); border-bottom: 1px solid var(--divider); flex-shrink: 0; }
.kw-toad-pk-badge {
  width: 38px; height: 38px; border-radius: var(--radius-md); flex: 0 0 auto;
  background: var(--overdue-alpha); color: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.kw-toad-pk-badge .material-symbols-rounded { font-size: 22px; }
.kw-toad-pk-title { font-size: var(--text-title-row); font-weight: 700; letter-spacing: -0.01em; margin-top: 1px; color: var(--fg); }
.kw-toad-pk-sub { font-size: var(--text-body-md); color: var(--fg-muted); margin-top: var(--space-xs); line-height: 1.5; }

.kw-toad-list { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-sm) var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs); }
.kw-toad-sectlabel {
  font-size: var(--text-eyebrow); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-subtle); padding: var(--space-sm) var(--space-xs) var(--space-xxs);
}
/* position/overflow so the row can host the task card's absolute .kw-task-bar,
   and 20px of leading padding to clear it — the same offset .kw-task-head uses
   for the same strip (#791). */
.kw-toad-row {
  display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-lg);
  border: 1px solid var(--divider); border-radius: var(--radius-md); background: var(--surface);
  cursor: pointer; text-align: left; font-family: inherit; width: 100%;
  position: relative; overflow: hidden;
  /* overflow:hidden zeroes the flex min-height, so without this the rows
     squash to fit .kw-toad-list instead of scrolling it (#1002). */
  flex-shrink: 0;
  transition: background 120ms, border-color 120ms, box-shadow 120ms;
}
.kw-toad-row:hover { border-color: var(--border-strong); }
/* No inset leading bar on the selected row any more: the priority strip now
   occupies that edge, and the two stacked into a muddle (#791). The tint plus
   the filled flag button carry the selection on their own. */
.kw-toad-row.on {
  background: rgba(255, 107, 53, 0.06);
  border-color: rgba(255, 107, 53, 0.45);
}
.kw-toad-row .ttitle { font-size: var(--text-label-lg); font-weight: 500; line-height: 1.3; color: var(--fg); }
.kw-toad-row .kw-meta-row { margin-top: var(--space-xxs); }

/* Timer task picker row — the same leading strip and meta pills as a board
   card, in a dropdown-sized row. Separate from .kw-toad-row because these sit
   flush in a scrolling listbox: no border, no radius, no gap between rows, so
   the strip runs to the row's edges (#791). */
.kw-picker-row {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-lg);
  width: 100%; text-align: left; font-family: inherit;
  background: none; border: 0; cursor: pointer;
  position: relative; overflow: hidden;
  transition: background 120ms;
}
.kw-picker-row:hover { background: var(--bg-subtle); }
.kw-picker-row.on { background: var(--lavender-surface); }
/* The strip is square-ended here: a borderless row in a list has no rounded
   corner for it to follow. */
.kw-picker-row .kw-task-bar { border-radius: 0; }
.kw-picker-body { display: block; flex: 1; min-width: 0; }
.kw-picker-title {
  display: flex; align-items: center; gap: var(--space-xs);
  font-size: var(--text-label-lg); font-weight: 500; line-height: 1.3; color: var(--fg);
}
.kw-picker-row .kw-meta-row { margin-top: var(--space-xxs); }
/* Settled tasks stay listed so a session can be tagged against work that just
   finished; struck through, as on mobile. */
.kw-picker-settled { text-decoration: line-through; color: var(--fg-muted); }

.kw-toad-pick {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--bg);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--fg-subtle); transition: background 150ms, border-color 150ms, transform 120ms;
}
.kw-toad-row:hover .kw-toad-pick { border-color: var(--orange); }
/* The slot disc: an empty ring, or orange carrying the toad's number in the
   order it was checked (#1177). */
.kw-toad-pick.on { background: var(--orange-solid); border-color: var(--orange-solid); color: var(--white); font-size: var(--text-title-sm); font-weight: 700; }
/* At three picked the rest wait until one is unchecked. */
.kw-toad-row.dim { opacity: 0.38; cursor: default; }
.kw-toad-row.dim:hover { border-color: var(--divider); }
.kw-toad-row.dim:hover .kw-toad-pick { border-color: var(--border-strong); }
.kw-toad-count { font-variant-numeric: tabular-nums; opacity: 0.85; font-weight: 500; }

.kw-toad-foot {
  border-top: 1px solid var(--divider); padding: var(--space-md) var(--space-md);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
  background: var(--bg); flex-shrink: 0;
}
.kw-toad-foot .summary { font-size: var(--text-body-md); color: var(--fg-muted); min-width: 0; flex: 1; }

/* Page-level classes (#1231): one class per element, replacing the Tailwind
   utilities the templates used to carry. Kept after this sheet's component
   rules so they win equal-specificity ties on the same element. */
/* ---------- pages/goals.templ ---------- */
.kw-goals-plate { padding: 0; }
.kw-goals-plate-head { padding: 14px var(--space-md) 10px; margin-bottom: 0; }
.kw-goals-plate-head .kw-card-title { font-size: 13px; }
.kw-goals-plate-tasks { padding: 0 var(--space-sm) var(--space-sm); }
.kw-goal-activity { min-height: 0; }
.kw-goal-history-empty { padding: var(--space-xxs) 0; font-size: var(--text-body-sm); color: var(--fg-subtle); }
.kw-goals-page-actions { display: flex; gap: var(--space-xs); }
.kw-goals-page-done-icon { color: var(--success); }
.kw-goals-page-open-icon { color: var(--fg-subtle); }

/* ---------- pages/toad_picker.templ ---------- */
.kw-toad-pk-head-row { display: flex; align-items: flex-start; gap: var(--space-sm); }
.kw-toad-pk-head-main,
.kw-toad-pk-task-main { flex: 1; min-width: 0; }
.kw-toad-pk-head-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
