/* #695 The Checklist (the account owner only), on the Finances page's base (finances.css): same palette, 44px targets,
   text at least 14px. Stacked cards in one 720px column; on a phone every form control and button is full width. */

/* Several blocks here set their own display; hidden always wins (the #693 trap). */
[hidden] { display: none !important; }

main { max-width: 752px; }
.site-header { padding-left: max(16px, calc((100% - 720px) / 2)); padding-right: max(16px, calc((100% - 720px) / 2)); }

.cl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 16px 0; }
.cl-card h2 { margin: 0 0 12px; font-size: 21px; }
.cl-card > label[for] { display: block; margin: 16px 0 6px; }
.cl-card > h2 + label[for], #cl-back-form > label[for]:first-child { margin-top: 0; }
.cl-card textarea, .cl-card input[type="url"] { display: block; width: 100%; }
.cl-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 16px; }
.cl-models select, #cl-back-model { width: 100%; }

/* Buttons: finances.css draws every button as the filled primary; these are the others. */
.cl-secondary { background: #fff; color: var(--brand); }
.cl-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.cl-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; background: transparent; border: 0; border-radius: 6px; color: var(--brand);
  font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
#cl-add-btn, #cl-back-btn { margin-top: 18px; }

/* The images: a dashed drop zone that lights up while a picture is dragged over the form, then 96px thumbnails. */
.cl-drop { margin-top: 12px; padding: 10px 14px; border: 2px dashed #b9cbd4; border-radius: 12px; background: #f8fbfc; color: var(--muted); }
.cl-drop p { margin: 0; }
.cl-drop .cl-link { padding: 0 2px; }
.cl-drop.is-over { border-color: var(--brand); background: #e6f2f8; color: var(--ink); }
.cl-thumbs { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cl-thumbs:empty { display: none; }
.cl-thumb { width: 96px; display: grid; gap: 6px; }
.cl-thumb img { display: block; width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cl-remove { width: 96px; min-height: 44px; padding: 0 8px; font-size: 14px; background: #fff; color: var(--bad); border-color: #e3aab5; }

.cl-error { margin: 12px 0 0; color: var(--bad); font-weight: 600; }
.cl-done { margin: 10px 0 0; color: var(--good); font-weight: 600; }
.cl-models .cl-help { grid-column: 1 / -1; margin: -4px 0 0; color: var(--muted); font-size: 14px; }
#cl-defaults-status { margin: 10px 0 0; color: var(--good); font-size: 14px; font-weight: 600; }
#cl-defaults-status.error, .cl-action-msg.error { color: var(--bad); }

/* Whether the agents' PC is on. */
.cl-runner { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg);
  border: 1px solid #f0c98a; color: var(--warn); font-weight: 600; }
.cl-runner::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.cl-runner[data-online="true"] { background: var(--good-bg); border-color: #b5dcc4; color: var(--good); }
.cl-runner:empty { display: none; }

/* The filters wrap rather than scroll, so none is cut off on a phone. */
.cl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 10px; }
.cl-filters a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.cl-filters a:hover { border-color: #a9d3e6; }
.cl-filters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cl-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #eef1f3; color: var(--ink);
  font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cl-filters a[data-filter="needs_you"] .cl-count:not([data-zero]) { background: var(--warn-bg); color: var(--warn); }
.cl-filters a[data-filter="ready"] .cl-count:not([data-zero]) { background: var(--good-bg); color: var(--good); }
.cl-filters a[aria-current="page"] .cl-count { background: #fff; color: var(--ink); }

.cl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 4px 10px; min-height: 44px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.cl-row:hover { border-color: #a9d3e6; background: #fbfdfe; }
.cl-num { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.cl-title { font-weight: 700; overflow-wrap: anywhere; }
.cl-row .cl-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; justify-self: end; align-self: center; }
.cl-row .cl-note { grid-column: 2 / -1; font-size: 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-row .cl-meta { grid-column: 2 / -1; color: var(--muted); font-size: 14px; }
#cl-empty { margin: 0; padding: 14px 4px; color: var(--muted); font-style: italic; }

/* Status chips: the colour always comes with the words. */
.cl-chip { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 0; padding: 2px 10px; border-radius: 999px; font-size: 14px;
  font-weight: 700; white-space: nowrap; background: #eef1f3; color: #3f525c; }
.cl-chip::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cl-chip[data-status="ready"], .cl-chip[data-status="complete"], .cl-chip[data-verdict="pass"] { background: var(--good-bg); color: var(--good); }
.cl-chip[data-status="needs_you"] { background: var(--warn-bg); color: var(--warn); }
.cl-chip[data-status="working"], .cl-chip[data-status="checking"] { background: #e6f2f8; color: #075e82; }
.cl-chip[data-verdict="fail"] { background: var(--bad-bg); color: var(--bad); }
.cl-chip[data-verdict="blocked"] { background: #eef1f3; color: #3f525c; }
/* How big a fix is: an outlined tag beside the status chip, quieter than the chip. */
.cl-size { display: inline-flex; align-items: center; width: fit-content; margin: 0; padding: 1px 9px; border: 1px solid #b9cbd4; border-radius: 999px;
  background: #fff; color: #3f525c; font-size: 14px; font-weight: 650; white-space: nowrap; }
/* #697 An item the support loop started from customers' problems. */
.cl-size.cl-from { border-color: #a9d3e6; background: #e6f2f8; color: #075e82; }

/* One item. While it loads, or when there is no such item, only its title and the way back show. */
#cl-item { margin-top: 16px; }
#cl-back { margin-left: -6px; }
#cl-item.is-loading > :not(#cl-back, #cl-item-title, #cl-action-msg), #cl-item.is-missing > :not(#cl-back, #cl-item-title, #cl-action-msg) { display: none; }
#cl-item-title { margin: 8px 0; font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
#cl-item-title:focus { outline: none; }
#cl-item .cl-meta { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.cl-needs { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); border: 1px solid #f0c98a; font-weight: 600;
  white-space: pre-wrap; overflow-wrap: anywhere; }
#cl-item h3 { margin: 26px 0 8px; font-size: 18px; }
#cl-item h4 { margin: 16px 0 6px; font-size: 15px; color: var(--muted); }
#cl-item-body { margin: 0; padding: 10px 14px; border-left: 4px solid #a9d3e6; border-radius: 0 8px 8px 0; background: #f6fafc; white-space: pre-wrap; overflow-wrap: anywhere; }
#cl-item-page { margin: 10px 0 0; overflow-wrap: anywhere; }
#cl-item-page a { color: var(--brand); font-weight: 600; }
/* Impact: what the fix will touch, and the items this one waits on. File paths wrap anywhere, so a phone never scrolls sideways. */
.cl-waiting { margin: 0 0 12px; padding: 10px 14px 4px; border-radius: 12px; background: #e6f2f8; border: 1px solid #a9d3e6; color: #075e82; }
.cl-waiting p { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cl-waiting .cl-waiting-links { display: flex; flex-wrap: wrap; gap: 0 12px; margin-left: -6px; }
.cl-waiting .cl-link { color: inherit; }
.cl-impact-size { margin: 0 0 8px; }
.cl-files { list-style: none; margin: 0; padding: 8px 12px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: #f6f8f9;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.cl-files li { min-width: 0; overflow-wrap: anywhere; }
.cl-round { margin-top: 28px; border-top: 1px solid var(--line); }
.cl-muted { margin: 0; color: var(--muted); font-style: italic; }

/* Shots: a screenshot opens in the picture viewer on this page (#45); text evidence (a log, test output) wraps in its own box. */
.cl-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.cl-shots:empty { display: none; }
.cl-shot { margin: 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.cl-shot-text { grid-column: 1 / -1; }
.cl-shot figcaption { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.cl-img-link { display: block; width: 100%; min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f5f8fa;
  cursor: zoom-in; }
.cl-img-link:hover { border-color: #a9d3e6; }
.cl-img-link:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.cl-img-link img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; }
.cl-loading { margin: 0; min-height: 120px; display: grid; place-items: center; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted);
  font-size: 14px; text-align: center; }
.cl-loading.cl-failed { color: var(--bad); }
.cl-pre { margin: 0; max-height: 360px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f6f8f9;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-open { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); font-weight: 650; }

.cl-fix { display: grid; gap: 6px; margin: 0 0 10px; }
.cl-summary { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-fix-line { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.cl-fix-line a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); font-weight: 650; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.cl-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cl-check { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfe; }
.cl-check-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; }
.cl-check-notes { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The owner's moves sit under the evidence; the line saying what Check again does takes its own row under them. */
.cl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.cl-actions .cl-help { flex: 1 0 100%; margin: 0; color: var(--muted); font-size: 14px; }
/* A round checked again: no new fix, so this line stands in for its before and after. */
.cl-recheck { margin: 4px 0 0; padding: 10px 14px; border-radius: 12px; background: #e6f2f8; border: 1px solid #a9d3e6; color: #075e82; font-weight: 600;
  overflow-wrap: anywhere; }
.cl-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bad-bg);
  border: 1px solid #e3aab5; }
.cl-confirm p { margin: 0; flex: 1 1 240px; font-weight: 600; }
.cl-action-msg { margin: 12px 0 0; color: var(--good); font-weight: 600; }
#cl-back-form { margin: 14px 0 0; background: #f8fbfc; }
#cl-back-form > label:not([for]) { margin-top: 16px; }

.cl-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.cl-timeline li { position: relative; }
.cl-timeline li::before { content: ""; position: absolute; left: -26px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #7fa7b8; }
.cl-when { margin: 0; color: var(--muted); font-size: 14px; }
.cl-what { margin: 2px 0 0; font-weight: 600; }
.cl-timeline .cl-note { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* #45 The picture viewer: the whole screen, dark, the picture fitted; zoomed in, it scrolls and drags. Controls stay 44px. */
.cl-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #0f1a20; color: #fff; }
.cl-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.cl-viewer::backdrop { background: rgba(10, 18, 22, .85); }
.cl-viewer button { min-width: 44px; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); color: #fff; }
.cl-viewer button:hover:not(:disabled) { background: rgba(255, 255, 255, .2); }
.cl-viewer button:focus-visible { outline: 3px solid #8fd0ee; outline-offset: 2px; }
.cl-viewer button:disabled { opacity: .4; cursor: default; }
.cl-viewer-bar, .cl-viewer-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #0f1a20; }
.cl-viewer-count { margin: 0; flex: 1 1 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.cl-viewer-zoom { display: flex; align-items: center; gap: 6px; }
.cl-viewer-zoom button { padding: 8px 12px; font-size: 18px; line-height: 1; }
#cl-viewer-fit { font-size: 15px; }
#cl-viewer-zoom { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 650; }
.cl-viewer-stage { overflow: auto; display: grid; place-items: center; padding: 8px; touch-action: pinch-zoom; overscroll-behavior: contain; }
.cl-viewer-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; cursor: zoom-in; background: #fff; }
.cl-viewer-stage:focus-visible { outline: 3px solid #8fd0ee; outline-offset: -3px; }
.cl-viewer-stage.is-zoomed { place-items: start; touch-action: pan-x pan-y pinch-zoom; }
.cl-viewer-stage.is-zoomed img { max-width: none; max-height: none; margin: auto; cursor: grab; }
.cl-viewer-stage.is-dragging img { cursor: grabbing; }
.cl-viewer-caption { margin: 0; flex: 1 1 auto; min-width: 0; text-align: center; color: #d5e2e8; font-size: 14px; overflow-wrap: anywhere; }
#cl-viewer-prev, #cl-viewer-next { flex: none; }

@media (max-width: 640px) {
  .cl-card { padding: 16px; }
  .cl-models { grid-template-columns: minmax(0, 1fr); }
  .cl-card input, .cl-card select, .cl-card textarea { width: 100%; }
  #cl-add-btn, #cl-back-btn, .cl-actions button, .cl-confirm button { width: 100%; justify-content: center; }
  /* Stacked, the line saying what Check again does sits right under its button. */
  .cl-actions > * { order: 2; }
  #cl-complete, #cl-check-again { order: 0; }
  #cl-check-again-help { order: 1; }
  .cl-row { grid-template-columns: auto minmax(0, 1fr); }
  .cl-row .cl-tags { grid-column: 2; justify-self: start; justify-content: flex-start; }
  .cl-shots { grid-template-columns: minmax(0, 1fr); }
  #cl-item-title { font-size: 21px; }
  /* The viewer on a phone: counter and Close on top, zoom under them; the caption over Previous and Next. */
  .cl-viewer-bar { flex-wrap: wrap; padding: 8px 10px; }
  .cl-viewer-zoom { order: 3; flex: 1 0 100%; justify-content: center; }
  .cl-viewer-foot { flex-wrap: wrap; padding: 8px 10px; }
  .cl-viewer-caption { order: -1; flex: 1 0 100%; }
  #cl-viewer-prev, #cl-viewer-next { flex: 1 1 0; justify-content: center; }
}
