/* Checklists: list of open runs and templates, a run ticked off on a phone, template editor. */
.ck-page { max-width: 44rem; }

/* list rows: whole row is the tap target */
.ck-rows > li { padding-top: 0; padding-bottom: 0; }
.ck-rows > li:first-child, .ck-rows > li:last-child { padding-top: 0; padding-bottom: 0; }
.ck-link { display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .55rem 0; color: inherit; }
.ck-link:hover { text-decoration: none; }
.ck-link:hover .row-title { color: var(--tint); }
.ck-link .grow, .ck-tpl-link { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ck-count { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-count.all { color: var(--tint); font-weight: 600; }
.ck-chev svg { width: 16px; height: 16px; display: block; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.ck-tpl { display: flex; align-items: center; gap: .75rem; }
.ck-tpl-link { min-height: 56px; justify-content: center; padding: .55rem 0; color: inherit; }
.ck-tpl-link:hover { text-decoration: none; }
.ck-tpl-link:hover .row-title { color: var(--tint); }
button.ck-start { min-height: 44px; padding: .5rem 1.15rem; flex: none; }

.ck-group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.ck-group-head > .group-title { font-family: var(--sys); font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .55rem 1.25rem; }
.ck-date { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .45rem auto; font-size: .875rem; font-weight: 400; color: var(--muted); }
.ck-date input { width: auto; min-height: 44px; padding: .3rem .6rem; background: var(--surface); }

/* the run */
.ck-card { padding-top: .35rem; padding-bottom: .35rem; }
.ck-list { list-style: none; margin: 0 -1.25rem; padding: 0; }
.ck-item { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .5rem; padding: 0 1.25rem 0 0; }
.ck-item + .ck-item::before { content: ""; position: absolute; top: 0; inset-inline-start: 4rem; inset-inline-end: 0; height: .5px; background: var(--sep); }
button.ck-tick { display: flex; align-items: flex-start; justify-content: flex-start; gap: .9rem; width: 100%; padding: .9rem 0 .9rem 1.25rem;
  min-height: 64px; border-radius: 0; background: none; color: var(--ink); text-align: start; font-weight: 400; font-size: 1.05rem; }
button.ck-tick:hover { background: none; }
button.ck-tick:hover .ck-circle { box-shadow: inset 0 0 0 2px var(--tint); }
.ck-item.done button.ck-tick:hover .ck-circle { box-shadow: none; }
button.ck-tick:active { transform: none; }
button.ck-tick:active .ck-circle { transform: scale(.92); }
button.ck-tick:disabled { opacity: 1; cursor: default; }
button.ck-tick:disabled:hover .ck-circle { box-shadow: inset 0 0 0 2px var(--field-edge); }
/* Done steps (ticked by hand, or recorded by the app) keep their filled circle on hover. */
.ck-item.done button.ck-tick:disabled:hover .ck-circle { box-shadow: none; }
button.ck-tick:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; border-radius: var(--r-ctl); }
.ck-circle { flex: none; width: 1.85rem; height: 1.85rem; border-radius: 50%; display: grid; place-items: center; margin-top: -.1rem;
  box-shadow: inset 0 0 0 2px var(--field-edge); color: transparent; transition: background-color .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s, transform .1s; }
.ck-circle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  transform: scale(.6); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.ck-item.done .ck-circle { background: var(--tint); box-shadow: none; color: var(--tint-ink); }
.ck-item.done .ck-circle svg { transform: scale(1); }
.ck-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding-top: .1rem; }
.ck-item-title { overflow-wrap: anywhere; }
.ck-item.done .ck-item-title { color: var(--muted); }
.ck-who { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
button.ck-note-btn { min-height: 44px; padding: 0 .25rem; font-size: .875rem; align-self: start; margin-top: .55rem; }
.ck-note-row { grid-column: 1 / -1; padding: 0 0 .8rem 4rem; margin-top: -.35rem; }
.ck-note-row:empty { display: none; }
.ck-note { margin: 0; font-size: .9rem; color: var(--ink); background: var(--fill); padding: .45rem .7rem; border-radius: var(--r-ctl); overflow-wrap: anywhere; width: fit-content; max-width: 100%; }
.ck-note-form { width: 100%; }
.ck-note-form textarea { min-height: 64px; }
.ck-note-actions { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
.ck-note-actions button:not(.quiet) { min-height: 44px; }
.ck-note-actions .quiet { min-height: 44px; }

.ck-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.ck-foot .primary { min-width: 10rem; }
button.ck-finish-anyway { min-height: 44px; }
button.ck-finish-anyway.armed { padding: 0 1rem; }
.ck-done-note { width: 100%; }
.ck-done-note p { margin: 0; }
.ck-done-note p + p { margin-top: .35rem; }

/* template editor */
.ck-edit-list { list-style: none; margin: 0; padding: 0; }
.ck-edit-row { display: flex; align-items: center; gap: .5rem; }
.ck-edit-row + .ck-edit-row { margin-top: .5rem; }
.ck-num { flex: none; width: 1.4rem; text-align: end; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.ck-edit-row input { flex: 1; min-width: 0; }
.ck-edit-actions { display: flex; flex: none; }
button.ck-icon { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; background: none; color: var(--muted); border-radius: var(--r-ctl); }
button.ck-icon:hover { background: var(--fill); color: var(--ink); }
button.ck-icon.danger:hover { color: var(--red); background: var(--red-soft); }
button.ck-icon:disabled { opacity: .3; }
button.ck-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
button.ck-add { margin-top: .9rem; margin-inline-start: 1.9rem; min-height: 44px; }
.ck-form-foot { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }

@media (max-width: 520px) {
  /* Steps: the text gets the full width; move and remove sit under it. */
  .ck-edit-row { display: grid; grid-template-columns: 1fr; gap: 0; }
  .ck-num { display: none; }
  .ck-edit-actions { justify-self: end; margin: .1rem -.6rem 0 0; }
  .ck-edit-row + .ck-edit-row { margin-top: .35rem; }
  button.ck-add { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ck-circle, .ck-circle svg { transition: none; }
}
