/* «Контент карточек товаров» (U6), screens 1–4 — port of docs/project/mockups/content-scenario/content.css over app.css.
   The one dense place is the run grid (batches × products × stages); everything else is the cabinet's calm list style.
   Scenario-local colours (channel brands, grid states) are named below; the rest comes from app.css :root. */
:root {
  --ct-ym: var(--amber); --ct-wb: #7a4fc9; --ct-kit: #c8321a; --ct-oz: var(--muted); --ct-on-dark: #fff;
  --ct-track: #e7ece9; --ct-pushed: #7fb79a; --ct-need: #d49a26; --ct-batch-bg: #f1f4f2;
  --ct-fresh-ink: #46705c; --ct-fresh-bg: #f1f7f3; --ct-quiet-bg: #f3f5f4; --ct-quiet-bg-2: #eef1f0;
  --ct-manual-ink: #4b3d78; --ct-manual-bg: #f1eef9; --ct-manual-line: #d9d1ef; --ct-strike: #9aa5a1;
  --ct-media-bg: #e9eeeb; --ct-video-bg: #111; --ct-play-bg: rgba(0, 0, 0, .55);
  --ct-fix-ink: #5e4209; --ct-fix-muted: #6b5a2c;
  --ct-scrim: rgba(20, 28, 26, .32); --ct-shadow: rgba(20, 28, 26, .18);
}
.ct-page { max-width: 1720px; }
/* the run state («Завершён: ошибка 2, нужно решение 1») is a sentence: on a phone it wraps inside its mark */
.ct-page .page-head .mark { white-space: normal; }

/* channel sign */
.ch { flex: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0; color: var(--ct-on-dark); white-space: nowrap; }
.ch-ym { background: var(--ct-ym); }
.ch-wb { background: var(--ct-wb); }
.ch-kit { background: var(--ct-kit); }
.ch-oz { background: var(--ct-oz); }

/* landing */
.ct-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 24px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ct-fact { padding: 14px 16px; background: var(--paper); }
.ct-fact b { display: block; font-size: 28px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.ct-fact span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.ct-fact small { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; color: var(--ink-2); font-size: 12.5px; }
.ct-chs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.ct-chcard { display: grid; gap: 6px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.ct-chcard.is-off { background: var(--tint); color: var(--muted); border-style: dashed; }
.ct-chcard header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; color: var(--ink); }
.ct-chcard.is-off header { color: var(--ink-2); }
.ct-chcard p { color: var(--muted); }
.ct-runs td { vertical-align: middle; }
.ct-runs .t-name { font-weight: 650; }
.ct-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 120px; }
.ct-bar { flex: 1 1 72px; height: 8px; display: flex; overflow: hidden; background: var(--ct-track); border-radius: 4px; }
.ct-bar i { display: block; height: 100%; }
.ct-bar .b-ok { background: var(--green-btn); }
.ct-bar .b-push { background: var(--ct-pushed); }
.ct-bar .b-fail { background: var(--red); }
.ct-bar .b-need { background: var(--ct-need); }
.ct-prog small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ct-chlist { display: inline-flex; flex-wrap: wrap; gap: 4px; }

/* new run */
.ct-gobar { display: none; }
.ct-new { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.ct-side { position: sticky; top: calc(var(--top) + 16px); display: grid; gap: 14px; max-height: calc(100vh - var(--top) - 32px); overflow-y: auto; overscroll-behavior: contain; }
/* REQ-07: the aside of six channels is taller than a laptop screen; its own scroll keeps «Запустить» pinned at its bottom */
.ct-side > .ct-go { position: sticky; bottom: 0; }
.ct-box { padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.ct-box h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 15px; font-weight: 650; }
.ct-box h2 svg.lucide { width: 16px; height: 16px; color: var(--ink-2); }
.ct-chpick { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); gap: 6px 8px; }
.ct-chpick label { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.ct-chpick label:has(input:checked) { background: var(--green-soft); border-color: var(--green-line); }
.ct-chpick label:has(input:checked) small { color: var(--ink-2); } /* --muted on --green-soft is 4.46:1 */
.ct-chpick label.is-off { cursor: not-allowed; color: var(--muted); background: var(--tint); border-style: dashed; }
.ct-chpick input { width: 18px; height: 18px; accent-color: var(--green-btn); }
.ct-chpick label > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.ct-chpick span small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.ct-est { display: grid; gap: 0; margin: 0; }
.ct-est div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.ct-est div:first-child { border-top: 0; }
.ct-est dt { color: var(--ink-2); }
.ct-est dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.ct-est dd small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.ct-plan-sum { display: grid; gap: 4px; margin: 0 0 12px; font-size: 13.5px; }
.ct-plan-sum li { display: flex; justify-content: space-between; gap: 10px; list-style: none; }
.ct-plan-sum b { font-variant-numeric: tabular-nums; }
.ct-run-btn { width: 100%; min-height: 44px; font-size: 15px; }
.ct-side .info-line, .ct-hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 8px; }
.ct-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 12px; }
.ct-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.ct-search svg.lucide { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--muted); }
.ct-search input { width: 100%; min-height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--field); border-radius: var(--radius); background: var(--paper); font-size: 14px; }
.ct-sel { min-height: 38px; padding: 0 8px; border: 1px solid var(--field); border-radius: var(--radius); background: var(--paper); font-size: 13.5px; color: var(--ink-2); }
/* REQ-06: the search of the runs list and of a run grid; the hits under a run read as a quiet list */
.ct-runsearch, .ct-gridsearch { flex: 0 1 320px; max-width: 320px; margin-left: auto; }
.ct-gridsearch { margin-left: 0; }
.ct-hits { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 12.5px; color: var(--ink-2); }
.ct-hits li { overflow-wrap: anywhere; }
.ct-hit-key { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
/* REQ-08: the style version of the channel next to its name */
.ct-kitv { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.ct-logch .ct-kitv { display: inline; margin-left: 4px; }
.ct-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; color: var(--ink-2); font-size: 13.5px; }
.ct-selbar b { font-variant-numeric: tabular-nums; }
.ct-selbar .ct-warn { color: var(--ink); background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius); padding: 2px 8px; }
.ct-pick td { vertical-align: middle; overflow-wrap: anywhere; }
.ct-pick .t-name { max-width: 520px; }
.ct-pick th, .ct-pick td { padding-left: 8px; padding-right: 8px; }
.ct-pick th:first-child, .ct-pick td:first-child { padding-left: 12px; }
.ct-pick td.ct-pname { min-width: 250px; }
.ct-pick .t-sku .ct-nb { white-space: nowrap; }
.ct-pick td[data-label="Категория и бренд CRM"] { min-width: 104px; }
.ct-pick td[data-label="План"] { min-width: 262px; }
.ct-pick td[data-label="Есть сейчас"] { min-width: 124px; }
.ct-pick .t-name span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-pick tr.is-off td { color: var(--muted); background: var(--tint); }
.ct-cb { width: 24px; height: 24px; margin: 0; accent-color: var(--green-btn); }
.ct-plans { display: flex; flex-wrap: wrap; gap: 4px; }
.ct-plans .mark { white-space: normal; overflow-wrap: break-word; font-size: 12px; min-height: 22px; padding: 0 6px; font-weight: 600; }
.ct-have { color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* card rating per channel: «ЯМ 100 · WB — · Ozon 87» under «Есть сейчас»; twin channels carry their name */
.ct-rates { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.ct-rate { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; font-size: 12.5px; white-space: nowrap; }
.ct-rate .mark { min-height: 22px; padding: 0 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ct-rmp { color: var(--ink-2); font-weight: 600; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.ct-rnone { color: var(--muted); }
.ct-rate.is-twin { flex-direction: column; align-items: flex-start; gap: 0; } /* «Hell Phone» over its value: the cell stays 124 px at 1440 */
.ct-have b { color: var(--ink); }

/* run view */
.ct-runhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -12px 0 16px; color: var(--ink-2); font-size: 13.5px; }
.ct-runhead > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.ct-runhead .ch-tag-name { min-width: 0; overflow-wrap: anywhere; }
.ct-runhead svg.lucide { width: 15px; height: 15px; }
.ct-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; color: var(--ink-2); font-size: 12.5px; }
.ct-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ct-gridwrap { overflow-x: auto; scroll-padding-left: 272px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
/* auto layout: a column never gets narrower than its longest word, so pills wrap only between words; when the
   words do not fit, the grid scrolls inside .ct-gridwrap with the product column sticky */
.ct-grid { width: 100%; table-layout: auto; border-collapse: separate; border-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ct-grid th, .ct-grid td { padding: 5px 4px; border-top: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.ct-grid thead th { position: sticky; top: 0; z-index: 1; background: var(--tint); border-top: 0; color: var(--ink-2); font-size: 12px; font-weight: 650; line-height: 1.25; hyphens: manual; overflow-wrap: normal; word-break: normal; }
.ct-grid thead tr:first-child th:first-child { width: 240px; min-width: 180px; }
.ct-grid thead th.ct-sth { width: 168px; }
/* «Выгрузка» over a row of channel signs, each sign alone and inline in its header (scorecard r2 item 1) */
.ct-grid thead tr + tr th { border-top: 1px solid var(--line-2); }
.ct-grid thead th.ct-chh { text-align: left; white-space: nowrap; }
/* sign + channel name; the name is cut, the full one is in the sign's title */
.ch-tag { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.ch-tag-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-grid thead th.ct-chh .ch-tag-name { max-width: 16ch; }
.ct-runhead > span.ct-runchs { flex-wrap: wrap; gap: 6px 12px; }
/* marketplace columns: «v1 · попытка 2» stays one line (scorecard r1 item 7) */
.ct-grid td.ct-chc { min-width: 96px; }
.ct-grid td.ct-chc .ct-c > span { white-space: nowrap; }
.ct-grid .ct-sep { border-left: 2px solid var(--line); }
.ct-grid tr.ct-batch th { padding: 9px 10px; background: var(--ct-batch-bg); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink); text-align: left; }
.ct-batch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ct-batch-row small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.ct-grid td.ct-prod { position: sticky; left: 0; z-index: 1; background: var(--paper); min-width: 180px; max-width: 260px; padding-left: 10px; }
/* «Этапы»: the seven stages as the legend squares + one word about the worst stage (scorecard r2 item 1) */
.ct-stg { display: grid; gap: 3px; width: 100%; min-width: 0; padding: 3px 4px; color: inherit; text-align: left; background: none; border: 1px solid transparent; border-radius: 4px; font: inherit; }
button.ct-stg { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { button.ct-stg:hover { background: var(--tint); border-color: var(--line); } }
.ct-steps { display: flex; gap: 2px; }
.ct-steps .ct-c { width: 20px; min-height: 20px; padding: 0; justify-content: center; }
.ct-steps .ct-c > span:empty { display: none; }
.ct-stg .ct-stg-word { min-width: 0; font-size: 11.5px; font-weight: 600; line-height: 1.25; background: none; border: 0; }
.ct-stg .ct-stg-word.ct-c-wait { color: var(--ink-2); }
.ct-prod a { display: block; width: 100%; padding: 2px 0; text-align: left; color: var(--ink); background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ct-prod a span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-prod a:hover span { text-decoration: underline; }
.ct-prod small { display: block; color: var(--muted); font-size: 12px; }
.ct-prod small.ct-why { margin-top: 2px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-prod small.ct-why.is-bad { color: var(--red); }
.ct-prod .ct-retry-stage { margin-top: 6px; }
.ct-c { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; width: 100%; min-width: 0; padding: 2px 4px; gap: 3px; border-radius: 4px; border: 1px solid transparent; font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: left; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.ct-c svg.lucide { flex: none; width: 13px; height: 13px; }
.ct-c > span { min-width: 0; }
.ct-c .ct-nb { white-space: nowrap; }
.ct-c .spin { width: 11px; height: 11px; border-width: 2px; border-color: color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; }
.ct-c-done { color: var(--green); background: var(--green-soft); }
.ct-c-fresh { color: var(--ct-fresh-ink); background: var(--ct-fresh-bg); border: 1px dashed var(--green-line); }
.ct-c-run { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-line); }
.ct-c-wait { color: var(--muted); background: var(--ct-quiet-bg); }
.ct-c-fail { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
.ct-c-need { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.ct-c-manual { color: var(--ct-manual-ink); background: var(--ct-manual-bg); border-color: var(--ct-manual-line); }
.ct-c-skip, .ct-c-na { color: var(--muted); background: transparent; border: 1px dashed var(--line); }
button.ct-c { cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600; }
button.ct-c:hover { filter: brightness(.97); border-color: currentColor; }
.ct-more { color: var(--muted); font-size: 12.5px; }
.ct-queued td { color: var(--muted); }
.ct-onlyerr { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ct-onlyerr input { width: 24px; height: 24px; margin: 0; font-size: 16px; accent-color: var(--graphite); }
.ct-errlist { display: grid; gap: 8px; margin: 18px 0 0; }

.ct-dh { position: sticky; top: 0; z-index: 2; display: grid; gap: 8px; padding: 16px 20px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.ct-dh-top { display: flex; gap: 12px; align-items: flex-start; }
.ct-dh h2 { flex: 1; min-width: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }
.ct-dh-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 13px; }
.ct-tabs { display: flex; gap: 2px; margin: 4px -4px 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.ct-tab { min-height: 40px; padding: 0 12px; color: var(--ink-2); background: none; border: 0; border-bottom: 2px solid transparent; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ct-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--green-btn); }
.ct-tab-s { display: none; }
.ct-tab b { margin-left: 4px; color: var(--muted); font-weight: 600; }
.ct-tab { position: relative; }
.ct-tab-dot { display: none; }
/* a strip wider than the modal fades at the edge that has more tabs (views-content-actions.mjs syncTabStrip sets the
   classes from the scroll position), so a cut tab reads as «scroll for more», not as a broken label */
.ct-tabs.is-more { mask-image: linear-gradient(to right, black calc(100% - 56px), transparent); }
.ct-tabs.is-back { mask-image: linear-gradient(to right, transparent, black 56px); }
.ct-tabs.is-back.is-more { mask-image: linear-gradient(to right, transparent, black 56px, black calc(100% - 56px), transparent); }
.ct-db { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 22px; align-content: start; }
.ct-sec h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 15px; font-weight: 650; }
.ct-sec h3 small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.ct-rows { display: grid; grid-template-columns: minmax(134px, max-content) minmax(0, 1fr) auto; column-gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.ct-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; gap: 10px 14px; align-items: start; padding: 11px 14px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.ct-row:first-child { border-top: 0; }
.ct-row > b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 220px; font-weight: 650; overflow-wrap: anywhere; }
.ct-row p { line-height: 1.5; }
.ct-row .ct-len { white-space: nowrap; }
.ct-cat-id { font-size: 12.5px; white-space: nowrap; }
.ct-cat-note { white-space: normal; } /* «название из CRM не получено» wraps at 390 with 1.3x text; the id stays whole */
.ct-was { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.ct-was s { text-decoration-color: var(--ct-strike); }
.ct-manual { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; color: var(--ct-manual-ink); background: var(--ct-manual-bg); border: 1px solid var(--ct-manual-line); border-radius: var(--radius); font-size: 13px; }
.ct-manual .btn { min-height: 32px; margin-left: auto; }
/* channel cards: as many columns as fit at ≥ 500px each (a values table needs that width), stacked below it. CSS columns,
   not a grid: each channel has its own field set, the cards differ in height, and a grid row left a hole beside a short card. */
/* channel cards: a grid of ≥ 500px tracks that collapse to the cards present — CSS columns balanced by height and left a
   fourth column empty beside one tall card at 2560; a short card leaves space under itself instead */
.ct-attrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 12px; align-items: start; }
.ct-attrs[data-n="1"] { max-width: 960px; }
.ct-held { margin-bottom: 12px; }
.ct-attr-saved { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; color: var(--green); font-size: 12.5px; }
.ct-attr-saved svg.lucide { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.ct-val-hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.ct-attr { break-inside: avoid; min-width: 0; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.ct-attr header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 650; }
.ct-attr dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 4px 10px; margin: 0; }
.ct-attr dt { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.ct-attr dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ct-attr p { margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.ct-kv { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.ct-kv-n { width: 32%; }
.ct-kv-s { width: 10rem; }
.ct-kv th, .ct-kv td { padding: 7px 12px; border-top: 1px solid var(--line-2); text-align: left; vertical-align: top; line-height: 1.45; overflow-wrap: break-word; word-break: normal; }
.ct-kv thead th { padding-block: 6px; color: var(--muted); background: var(--tint); border-top: 0; font-size: 12px; font-weight: 600; }
.ct-kv tbody th { color: var(--ink-2); font-weight: 500; }
.ct-kv tbody td:nth-child(2) { color: var(--ink); }
.ct-kv tbody td:last-child { color: var(--muted); font-size: 12px; }
/* The source link stays one line: a long host ends in «…», the icon never wraps under it (panel r1). */
.ct-kv a { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; min-height: 24px; padding-block: 3px; margin-block: -3px; line-height: 18px; color: var(--blue); white-space: nowrap; }
.ct-kv a .ct-link-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ct-kv a svg { flex: none; width: 12px; height: 12px; margin-left: 4px; }
.ct-more-attrs, .ct-empty { margin-top: 10px; }
.ct-more-attrs summary, .ct-empty summary { min-height: 28px; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink-2); font-size: 12.5px; font-weight: 600; list-style: none; }
.ct-more-attrs summary::-webkit-details-marker, .ct-empty summary::-webkit-details-marker { display: none; }
.ct-more-attrs[open] .more-chev, .ct-empty[open] .more-chev { transform: rotate(90deg); }
.ct-more-attrs .ct-kv { margin-top: 6px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.ct-chips li small { color: var(--muted); }
.ct-chips .ct-chips-more { padding: 0; background: none; border: 0; }
.ct-chip-btn { min-height: 24px; padding: 0 8px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 12px; font-weight: 600; cursor: pointer; }
.ct-chip-btn:hover { border-color: var(--ink-2); }
/* A person decides a characteristic: «Нужна проверка», the value form, «изменено вручную · кто», required gaps. */
.ct-attr header { flex-wrap: wrap; }
.ct-attr-name { min-width: 0; overflow-wrap: anywhere; }
.ct-attr header .ct-gap { margin-left: auto; }
.ct-attr.has-gap { border-left: 3px solid var(--red); }
.ct-review { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.ct-review h4 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--amber); font-size: 13.5px; font-weight: 700; }
.ct-review h4 svg.lucide { width: 16px; height: 16px; }
.ct-attr .ct-review-hint { margin-top: 4px; }
.ct-review ul { margin: 6px 0 0; padding: 0; list-style: none; }
.ct-review-item { padding: 10px 0; border-top: 1px solid var(--line-2); }
.ct-review-item:first-child { border-top: 0; }
.ct-review-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink); }
.ct-review-name b { font-weight: 650; overflow-wrap: anywhere; }
.ct-req { min-height: 20px; padding: 0 6px; font-size: 12px; }
.ct-attr .ct-review-val { margin-top: 4px; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.ct-attr .ct-review-val b { color: var(--ink); font-weight: 650; }
.ct-attr .ct-review-why { margin-top: 2px; color: var(--ink-2); }
.ct-attr .ct-review-src { margin-top: 2px; }
.ct-review-src a { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; margin-right: 8px; color: var(--blue); }
.ct-review-src a svg { width: 12px; height: 12px; }
.ct-attr-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ct-attr-form { margin-top: 8px; gap: 4px; }
.ct-attr-form label { font-size: 13px; }
.ct-attr-form select { width: 100%; min-height: 42px; padding: 0 10px; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius); font-size: 15px; }
.ct-attr-form input[aria-invalid="true"], .ct-attr-form select[aria-invalid="true"] { border-color: var(--red); }
/* `.ct-attr p` is a muted hint: the refusal under the field stays red (app.css .field-error) */
.ct-attr .field-error { margin-top: 2px; color: var(--red); font-size: 13px; }
.ct-attr-form .ct-attr-acts { margin-top: 4px; }
/* The pencil sits inside the value cell (no negative offset: build-4 measured it 8px out of the cell at every width);
   the cell's block padding gives the 28px button room, so the row is as tall as one of plain text. */
.ct-kv-edit tbody td:nth-child(2) { padding-block: 3px; }
.ct-val { display: flex; align-items: flex-start; gap: 6px; }
.ct-val-text { flex: 1; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; }
.ct-kv .ct-val-edit { width: 28px; height: 28px; color: var(--muted); }
.ct-kv .ct-val-edit svg.lucide { width: 15px; height: 15px; }
.ct-val-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; }
.ct-by { display: inline-flex; align-items: center; gap: 4px; color: var(--ct-manual-ink); font-size: 12px; font-weight: 600; }
.ct-by svg.lucide { width: 12px; height: 12px; }
.ct-kv .ct-val-back { padding: 0 10px; font-size: 12.5px; }
.ct-kv tbody tr.is-changed { background: var(--ct-manual-bg); }
.ct-req-dot { margin-left: 2px; color: var(--red); font-weight: 700; }
.ct-chips li.is-req { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
/* The owner's empty fields: one row each — the name, then a plain «Заполнить»; the value form opens in the row. */
.ct-fill-rows { margin: 6px 0 0; padding: 0; list-style: none; }
.ct-fill-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.ct-fill-row:first-child { border-top: 0; }
.ct-fill-name { flex: 1 1 12em; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.ct-fill-name small { color: var(--muted); font-size: 12px; }
.ct-fill-row.is-req .ct-fill-name small { color: var(--red); }
.ct-fill-row .ct-fill { flex: none; }
.ct-fill-row.is-editing .ct-attr-form { flex: 1 1 100%; margin-top: 0; }
.ct-fill-rows .ct-chips-more { padding: 6px 0 0; }
.ct-attr-stale { margin: 8px 0 0; }
.ct-attr-stale .ct-was { display: flex; align-items: flex-start; gap: 6px; margin: 0; }
.ct-attr-stale .ic { flex: none; margin-top: 2px; }
.ct-attr-stale .btn { margin-top: 8px; }
.ct-chips li.is-req small { color: var(--red); }
.ct-chips li { padding: 2px 8px; color: var(--ink-2); background: var(--ct-quiet-bg); border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.ct-gal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ct-gal figure { min-width: 0; margin: 0; display: grid; gap: 4px; }
.ct-gal img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--ct-media-bg); border: 1px solid var(--line); border-radius: var(--radius); }
.ct-gal figcaption { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ct-cause { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px; }
.ct-cause svg.lucide { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.ct-nomedia { display: grid; place-items: center; aspect-ratio: 3 / 4; color: var(--muted); background: repeating-linear-gradient(-45deg, var(--ct-quiet-bg) 0 8px, var(--ct-quiet-bg-2) 8px 16px); border: 1px dashed var(--field); border-radius: var(--radius); font-size: 12px; text-align: center; padding: 8px; }
/* Two videos side by side; the channel pills are one row under both (critic r2: they floated beside the 2nd video at 1440). */
.ct-vids { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; align-items: start; }
.ct-vid { display: grid; gap: 6px; font-size: 13px; }
.ct-vid video, .ct-vid .ct-poster { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--ct-video-bg); border-radius: var(--radius); }
.ct-poster { position: relative; display: block; overflow: hidden; }
/* tiles open the media viewer */
.ct-tile { display: block; width: 100%; padding: 0; color: inherit; background: none; border: 0; border-radius: var(--radius); cursor: zoom-in; }
.ct-tile:focus-visible { outline: 2px solid var(--green-btn); outline-offset: 2px; }
.ct-vid .ct-tile { background: var(--ct-video-bg); cursor: pointer; }
.ct-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.ct-poster span { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; display: grid; place-items: center; color: var(--ct-on-dark); background: var(--ct-play-bg); border-radius: 50%; }
.ct-vid b { font-weight: 650; }
.ct-vid small { color: var(--muted); font-size: 12px; }
.ct-vidwho { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ct-vidch { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.ct-vidch div { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* «видео не поддерживается площадкой» is wider than half a 390 modal: the pill wraps here instead of pushing the list out. */
.ct-vidch .mark { min-width: 0; white-space: normal; }
/* Tall blocks fold (fold-block.mjs), decided from the data before render (no measuring, no jump). Rows: the first whole
   rows, no fade over them (the button names the count). Text: clamped to 12 whole lines of its own line height (+ its
   vertical padding), so no line is cut; the fade lies on the last line only. Then «Показать все (…)» / «Свернуть».
   Overflow clips at the padding box, so a padded block (.ct-body) moves its bottom padding into a border of the same
   colour while folded: line 13 never peeks out under line 12 (panel r2, 1440-push). */
.fold { position: relative; }
.fold-text.is-folded > * { max-height: calc(12lh + var(--fold-pad, 0px)); overflow: hidden; mask-image: linear-gradient(to bottom, black calc(100% - 1lh - var(--fold-pad, 0px)), transparent); }
.fold-text > .ct-body { --fold-pad: 12px; }
.fold-text.is-folded > .ct-body { padding-bottom: 0; border-bottom: 6px solid var(--ct-quiet-bg); }
.fold-btn { margin-top: 8px; }
.ct-call > .fold, .ct-call > .fold-btn { grid-column: 2 / 4; }
.ct-call > .fold-btn { justify-self: start; margin: 0 0 4px; }
.ct-log { display: grid; gap: 12px; }
.ct-logch { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.ct-logch > header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-weight: 650; }
.ct-logch > header .mark { margin-left: auto; }
.ct-att { padding: 10px 14px 12px; border-top: 1px solid var(--line-2); }
.ct-att:first-of-type { border-top: 0; }
.ct-att h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13.5px; font-weight: 650; }
.ct-calls { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ct-call { display: grid; grid-template-columns: 170px minmax(0, 1fr) 54px; gap: 4px 10px; align-items: start; font-size: 12.5px; }
.ct-call > b { font-weight: 600; color: var(--ink-2); }
.ct-call code { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.ct-code { display: inline-flex; justify-content: center; min-width: 40px; padding: 1px 6px; border-radius: 4px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); } /* 2xx is the norm: neutral; colour only for waiting and errors */
.ct-code.is-wait { background: var(--blue-soft); color: var(--blue); }
.ct-body { grid-column: 2 / 4; margin: 2px 0 4px; padding: 6px 8px; background: var(--ct-quiet-bg); border-radius: 4px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ct-body.is-hidden { font-family: inherit; color: var(--muted); background: transparent; padding: 0; }
.ct-errline { grid-column: 2 / 4; color: var(--red); font-weight: 600; }
.ct-fix { margin-top: 8px; padding: 10px 12px; background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius); font-size: 13px; }
.ct-fix > b { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--ct-fix-ink); }
.ct-fix table { width: 100%; border-collapse: collapse; }
.ct-fix td { padding: 4px 8px 4px 0; vertical-align: top; }
.ct-fix td:first-child { font-weight: 650; width: 26%; }
.ct-fix .was { color: var(--muted); text-decoration: line-through; }
.ct-fix .now { font-weight: 650; }
.ct-fix small { color: var(--ct-fix-muted); }
.ct-fix p { margin-top: 6px; color: var(--ct-fix-muted); font-size: 12.5px; }
.ct-idgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

@media (max-width: 1279px) {
  /* REQ-07: the aside is below the whole product table here; «Запустить» is pinned to the bottom of the screen instead */
  .ct-side { max-height: none; overflow: visible; }
  .ct-go { display: none; }
  .ct-gobar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: row-reverse; align-items: center; gap: 10px 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
  .ct-gobar .ct-hint { flex: 1 1 0; min-width: 0; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ct-gobar .ct-run-btn { width: auto; flex: none; padding-inline: 20px; }
  /* 1024: four channel columns fit when a long push word breaks after «·» (the dot stays with the word before it) */
  .ct-grid td.ct-chc .ct-c > span { white-space: normal; }
  .ct-grid td.ct-prod, .ct-grid thead tr:first-child th:first-child { min-width: 168px; }
  .ct-steps .ct-c { width: 18px; min-height: 18px; }
  .ct-new { grid-template-columns: minmax(0, 1fr); }
  .ct-side { position: static; }
  .ct-chs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .ct-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-attrs { grid-template-columns: minmax(0, 1fr); }
  .ct-vids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .ct-runsearch, .ct-gridsearch { flex: 1 1 100%; max-width: none; margin-left: 0; }
  .ct-pick td.ct-pname, .ct-pick td[data-label="Категория и бренд CRM"] { min-width: 0; }
  .ct-grid td.ct-prod { position: static; }
  .ct-chs { grid-template-columns: minmax(0, 1fr); }
  .ct-gal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ct-rows, .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-row > b { max-width: none; }
  .ct-row > .mark { min-width: 0; white-space: normal; } /* one column: a long status wraps, not the page */
  .ct-call { grid-template-columns: minmax(0, 1fr) 54px; }
  .ct-call code { grid-column: 1 / -1; grid-row: 2; }
  .ct-body, .ct-errline, .ct-call > .fold, .ct-call > .fold-btn { grid-column: 1 / -1; }
  .ct-idgrid { grid-template-columns: minmax(0, 1fr); }
  .ct-search input, .ct-sel { font-size: 16px; min-height: 44px; }
  /* a filter select sizes to its longest option (539 px at 390, ui-qa 01.12): it may never push the page sideways */
  .ct-filters > label { max-width: 100%; min-width: 0; }
  .ct-filters .ct-sel { max-width: 100%; min-width: 0; }
  .ct-c { min-height: 44px; }
  .ct-prod a[data-action="ct-open"] { display: flex; align-items: center; min-height: 44px; }
  .ct-tab { min-height: 44px; }
  /* run grid becomes per-product cards */
  .ct-gridwrap { overflow: visible; border: 0; background: transparent; }
  .ct-grid { min-width: 0; display: block; }
  .ct-grid thead { display: none; }
  .ct-grid tbody, .ct-grid tr { display: block; }
  .ct-grid tr.ct-batch th { display: block; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
  .ct-grid tr.ct-p { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-top: 0; }
  .ct-grid tr.ct-p td { display: grid; gap: 2px; padding: 0; border: 0; }
  .ct-grid tr.ct-p td.ct-prod { grid-column: 1 / -1; min-width: 0; max-width: none; padding-bottom: 4px; }
  .ct-grid tr.ct-p td.ct-stc { grid-column: 1 / -1; }
  .ct-stg { min-height: 44px; }
  .ct-grid tr.ct-p { min-width: 0; }
  .ct-prod a, .ct-prod small { min-width: 0; overflow-wrap: anywhere; }
  .ct-prod .ct-retry-stage { justify-self: start; min-height: 44px; }
  .ct-grid tr.ct-p td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; }
  .ct-grid .ct-sep { border-left: 0; }
  .ct-grid tr.ct-queued { display: block; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-top: 0; }
  .ct-grid tr.ct-queued td { display: block; padding: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .ct-c .spin { animation: none; } }
.ct-legend .ct-c { width: auto; min-width: 26px; min-height: 20px; }
/* a finger on a tablet gets the same 44 px stage cells as a phone */
@media (pointer: coarse) { button.ct-c { min-height: 44px; } }

.ct-new > *, .ct-content > .sec, .tbl-wrap { min-width: 0; }
i[data-lucide] { display: inline-block; width: 1em; height: 1em; flex: none; }
.ct-chpick label.is-off .ch { min-width: 0; }
.ct-chpick input { width: 24px; height: 24px; margin: 0; flex: none; }
.ct-c svg.lucide { width: 12px; height: 12px; }

/* product modal: part of the page (re-rendered with it), fixed full-screen over a scrim; own scroll under a fixed header */
body:has(.ct-drawer) { overflow: hidden; }
.ct-scrim { position: fixed; inset: 0; z-index: calc(var(--z-toast) - 2); background: var(--ct-scrim); }
.ct-drawer { position: fixed; inset: 16px; z-index: calc(var(--z-toast) - 1); display: flex; flex-direction: column; width: calc(100% - 32px); max-height: calc(100dvh - 32px); margin: 0 auto; overflow: hidden; color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px var(--ct-shadow); outline: none; }
.ct-drawer .ct-dh { padding: 18px 28px 0; }
/* the drawer covers all but a 16px rim under the scrim: the run page under it is not painted, so it cannot shift behind it */
.ct-page:has(~ .ct-drawer) { visibility: hidden; overflow-x: clip; } /* inert layer under the drawer: its own overflow never scrolls the page */
.ct-drawer .ct-db { padding: 22px 28px 32px; }
.ct-drawer .ct-row p, .ct-drawer .ct-hint { max-width: 110ch; }
.ct-drawer .ct-gal { max-width: 1280px; }
@media (max-width: 600px) {
  .ct-drawer { inset: 0; width: 100%; max-height: none; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .ct-drawer .ct-dh { padding: 12px 16px 0; }
  /* the sticky head's height is fixed by the data before the names arrive (CLS at 390, build-4): the name up to 3 lines;
     the meta wraps whole items, the stable ones first, the category (its name arrives later) alone on the last line, so
     a name replacing «название загружается» never changes the line count and nothing is hidden behind «…» (panel r2) */
  .ct-dh h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .ct-dh-meta { row-gap: 0; line-height: 20px; }
  .ct-dh-meta > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ct-dh-meta > .ct-dh-cat { order: 1; flex-basis: 100%; }
  .ct-drawer .ct-db { padding: 16px 16px 24px; }
  /* name | value | source as one stacked record per row: the name on top, the value and its source below */
  .ct-kv, .ct-kv tbody { display: block; }
  .ct-kv colgroup, .ct-kv thead { display: none; }
  .ct-kv tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 12px; border-top: 1px solid var(--line-2); }
  .ct-kv tbody tr:first-child { border-top: 0; }
  .ct-kv tbody th { grid-column: 1 / -1; padding: 0; border: 0; color: var(--muted); font-size: 12px; }
  .ct-kv tbody td { padding: 0; border: 0; }
  .ct-more-attrs summary, .ct-empty summary { min-height: 44px; }
  /* 44px finger targets inside the product window (ui-qa build-5: «Вернуть генерацию» was 32px) */
  #ct-drawer .btn-sm, .ct-chip-btn { min-height: 44px; }
  .ct-kv-edit tbody td:nth-child(2) { padding-block: 0; }
  .ct-val { align-items: center; }
  .ct-val-text { padding-top: 0; }
  .ct-kv .ct-val-edit { width: 44px; height: 44px; }
  /* the by-line under the value says «изменено вручную · …» next to the pencil: no second «вручную» beside the value */
  .ct-kv tbody td.ct-src-manual { display: none; }
  /* «Выгрузка · ошибка N» does not fit the 390 strip: the error is a red dot before the label (the words stay for screen
     readers), so the dot stays in view when larger text cuts the label (panel r2); «Изображения и видео» reads «Фото и видео». */
  .ct-tab { padding: 0 10px; }
  .ct-tab-l { display: none; }
  .ct-tab-s { display: inline; }
  .ct-tab .ct-tab-dot { display: inline-block; width: 8px; height: 8px; margin: 0 6px 1px 0; vertical-align: middle; background: var(--red); border-radius: 50%; }
  .ct-tab b.ct-tab-err { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* a source link at most this wide in the stacked record: a long host ends in «…» */
  .ct-kv tbody td:last-child { max-width: 11rem; }
  .ct-kv .ct-val-back { min-height: 44px; }
  .ct-attr-form input:not([type="radio"]), .ct-attr-form select { min-height: 44px; font-size: 16px; }
  .ct-attr-acts .btn { flex: 1 1 auto; }
}

/* media viewer (views-content-viewer.mjs): a native dialog over the modal, one item at a time, contained on dark */
.ct-viewer { width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; color: var(--ct-on-dark); background: var(--ct-video-bg); border: 0; }
.ct-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.ct-viewer::backdrop { background: var(--ct-video-bg); }
.ct-vw-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 20px; }
.ct-vw-cap { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 500; }
.ct-vw-count { flex: none; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ct-vw-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-viewer .icon-btn { width: 44px; height: 44px; color: var(--ct-on-dark); }
.ct-vw-stage { display: grid; place-items: center; min-height: 0; padding: 0 80px 20px; }
.ct-vw-media { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
.ct-vw-nav { position: absolute; top: 50%; width: 48px; height: 48px; display: grid; place-items: center; margin-top: -24px; color: var(--ct-on-dark); background: var(--ct-play-bg); border: 0; border-radius: 50%; cursor: pointer; }
.ct-vw-prev { left: 16px; }
.ct-vw-next { right: 16px; }
.ct-vw-nav:disabled { opacity: .3; cursor: default; }
.ct-viewer :focus-visible { outline: 2px solid var(--ct-on-dark); outline-offset: 2px; }
@media (max-width: 600px) {
  .ct-vw-top { padding: 4px 4px 4px 16px; }
  .ct-vw-stage { padding: 0 0 76px; }
  .ct-vw-nav { top: auto; bottom: 14px; margin-top: 0; }
  .ct-vw-prev { left: calc(50% - 60px); }
  .ct-vw-next { right: calc(50% - 60px); }
}
.ct-dh .icon-btn { flex: none; }
.ct-gap { height: 12px; }
.ct-db > .empty, .ct-db > .msg { margin: 0; }
.ct-manual.is-back { color: var(--green); background: var(--green-soft); border-color: var(--green-line); }
.ct-manual > svg.lucide, .ct-manual > i { flex: none; }
.ct-hint-top { margin-top: 0; }
.ct-hidden { margin-left: 0; }
.ct-code.is-bad { background: var(--red-soft); color: var(--red); }
.ct-db .msg .btn, .ct-df .msg .btn { margin-left: auto; }
/* the failed read of the category names (views-content-drawer.mjs namesErrorRow): a row under the scroll area, so it
   shrinks the body instead of moving it (CLS 0) and stays in view on every tab */
.ct-df { flex: none; padding: 12px 28px; background: var(--paper); border-top: 1px solid var(--line); }
.ct-df > .msg { margin: 0; }
@media (max-width: 600px) { .ct-df { padding: 10px 16px; } }
.ct-vid video { display: block; }

/* screens glue */
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--tint); }
.ct-fxnote { margin-bottom: 14px; }
.ct-est-spin { width: 13px; height: 13px; margin-left: auto; }
.ct-err { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--red); font-size: 13px; font-weight: 600; }
.ct-batch-mark { margin-left: 4px; }
.ct-notice { margin-top: 14px; }
.ct-seg { margin-bottom: 12px; max-width: 100%; }
/* a long label wraps inside its own button, never widens the row past the page (stress 390/768) */
.ct-seg .seg-btn, .ct-selbar .btn { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.ct-seg .seg-btn b { min-width: 0; overflow-wrap: anywhere; }
.ct-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.ct-nums { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); margin: 0 0 16px; }
/* after the rule above: at ≤767 the counters stack like every .nums (app.css), the count must not keep them in a row */
@media (max-width: 767px) { .ct-nums { grid-template-columns: minmax(0, 1fr); } }
.ct-stale { margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
.ct-stale > span { flex: 1 1 240px; min-width: 0; }
.ct-stale .btn { flex: none; }
.ct-stale .btn svg.lucide { margin-top: 0; color: inherit; }
.ct-prod a { display: block; padding: 2px 0; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.ct-fact small .ch { display: inline-flex; margin-top: 0; color: var(--ct-on-dark); font-size: 11.5px; }
.ct-manual > span { flex: 1 1 240px; min-width: 0; }
.ct-box.is-invalid { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.ct-box .ct-err { margin: 8px 0 0; line-height: 1.4; }
.ct-fact .ct-bych { display: inline-flex; margin-top: 0; align-items: center; gap: 4px; margin-right: 8px; white-space: nowrap; }
.ct-fact .ct-bych > span:not(.ch) { color: var(--ink-2); }
.ct-fact .ct-bych > span:not(.ch) { display: inline; margin: 0; font-size: inherit; }
.ct-fact .ct-bych > b { display: inline; font-size: inherit; line-height: inherit; font-weight: 650; }
.ct-runs .mark { white-space: normal; overflow-wrap: anywhere; margin: 2px 0; }
.ct-page .tbl-wrap { position: relative; } /* contains the absolutely placed .sr-only labels: they would otherwise sit outside the local scroller and widen the page */
.ct-pick thead th, .ct-runs thead th { white-space: normal; overflow-wrap: anywhere; }

/* Raw server code under a human error sentence: for the developer, quiet for the owner. */
.msg .msg-code { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
