/* ============================================================================
   Results → Close and Results → Evidence: one purpose each (2026-10-20).

   Founder: «чем отличается Evidence от Close?» and «текст выходит за таблицы».
   * Close is the month-end PROCESS — the checklist, owners, sign-off, the
     close pack. Its four groups take the lane presentation Evidence used to
     carry: each step a chip coloured by its state.
   * Evidence is TRUST in the figures — the checklist is one line there.
   * Nothing in a lane, a tie box or a table spills out of its box: text
     wraps (long words break), a one-line value ends in an ellipsis and the
     full text is in the element's title tooltip.

   Own file on purpose: fpa-analyst.css (the kit's type scale) belongs to
   another stream of work. Phone: the kit's single breakpoint, 760px.
   ============================================================================ */

/* ── The page's purpose, one line, with the door to the other page ───────── */
.cer-purpose {
  margin: 0 0 12px; padding: 9px 14px; border-radius: 10px;
  background: #f4f7fb; border: 1px solid #e6ebf3;
  font-size: 13px; line-height: 1.5; color: var(--fa-ink2, #2b3a55);
  overflow-wrap: anywhere;
}
.cer-purpose b { color: var(--fa-ink, #17233d); font-weight: 600; }
.cer-purpose a { color: var(--fa-accent, #0b5cad); font-weight: 600; white-space: nowrap; margin-left: 4px; text-decoration: none; }
.cer-purpose a:hover { text-decoration: underline; }

/* ── Evidence: the close in one line ─────────────────────────────────────── */
.cer-cl {
  margin-top: 16px; border: 1px solid #e3e8f0; border-radius: 14px; background: #fff;
  padding: 12px 18px;
}
.cer-cl-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.cer-cl-t { margin: 0; font-size: 14px; font-weight: 600; color: var(--fa-ink, #17233d); min-width: 0; overflow-wrap: anywhere; }
.cer-cl-bar {
  display: grid; grid-template-columns: repeat(var(--cer-n, 16), minmax(0, 1fr)); gap: 2px;
  flex: 1 1 160px; max-width: 320px; min-width: 120px;
}
.cer-cl-bar i { height: 8px; border-radius: 2px; background: #e6ebf3; }
.cer-cl-bar i.done { background: #2f9a6a; }
.cer-cl-bar i.next { background: #9cc0ea; }
.cer-cl .cer-cl-go, .fd .cer-cl-go { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--fa-accent, #0b5cad); white-space: nowrap; text-decoration: none; }
.cer-cl-go:hover { text-decoration: underline; }
.cer-cl-next { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fa-line-soft, #eef1f6); }
.cer-cl-next-k { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fa-label, #7a879c); }
.cer-cl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.cer-cl-steps li { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.cer-cl-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--fa-accent, #0b5cad); color: #fff; font-size: 11.5px; font-weight: 700; }
.cer-cl-st { min-width: 0; font-size: 12px; color: var(--fa-muted, #5b6b85); overflow-wrap: anywhere; }
.cer-cl-steps .fa-btn { padding: 5px 10px; font-size: 12.5px; white-space: nowrap; }
.cer-cl-steps .fa-btn small { display: none; }

/* ── Evidence: tie boxes never spill (1024 px: «не подключено» ran past the
   box, «не сравнивалось» over its dashed edge). The label wraps; the figure
   stays whole on its own line when the two do not fit side by side. ───── */
.fd .ev-box { flex-wrap: wrap; min-width: 0; row-gap: 2px; }
.fd .ev-box > span { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.fd .ev-box > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; margin-left: auto; }
.fd .ev-tie-n, .fd .ev-diff, .fd .ev-next { min-width: 0; overflow-wrap: anywhere; }
.fd .ev-m-big { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; }
.fd .ev-m-big small { margin-left: 0; }
.fd .ev-by > div, .fd .ev-by b { min-width: 0; overflow-wrap: anywhere; }
.fd .ev-mini-v { overflow-wrap: anywhere; }

/* ── Close: the checklist's four groups as lanes ─────────────────────────── */
.fpa-close-page .fa-rl-grp-t { min-width: 0; overflow-wrap: anywhere; }
.fpa-close-page .fa-rl-grp-h > :last-child { flex: none; white-space: nowrap; }
.fpa-close-page .fa-rl-grp .fa-rl-grp-s { overflow-wrap: anywhere; }
.fpa-close-page .fa-rl-grps .fa-rl-items { gap: 6px; }
.fpa-close-page .fa-rl-grps .fa-rl-item {
  grid-template-columns: 16px minmax(0, 1fr) auto; gap: 7px;
  border: 1px solid #e3e8f0; background: #fff; border-radius: 9px; padding: 7px 9px;
  font-size: 13px;
}
.fpa-close-page .fa-rl-grps .fa-rl-item.done { background: var(--fa-good-tint, #ddf1e5); border-color: #bfe3cf; color: var(--fa-good-deep, #0e5a3c); }
.fpa-close-page .fa-rl-grps .fa-rl-item.done .cer-nm { font-weight: 600; }
.fpa-close-page .fa-rl-grps .fa-rl-item.na { background: #f6f8fb; border-style: dashed; color: var(--fa-muted, #5b6b85); }
.fpa-close-page .fa-rl-grps .fa-rl-item > span { min-width: 0; overflow-wrap: anywhere; }
.fpa-close-page .fa-rl-grps .fa-rl-item small { overflow-wrap: anywhere; font-size: 11.5px; }
.fpa-close-page .fa-rl-grps .cer-nm {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden;
}
.fpa-close-page .fa-rl-grps .fa-rl-link { white-space: nowrap; }

/* ── Close: every open step's controls wrap inside their row ─────────────── */
.fpa-close-page .fa-rl-ctl > div:first-child { min-width: 0; }
.fpa-close-page .fa-rl-ctl > div:first-child p { overflow-wrap: anywhere; }
.fpa-close-page .fa-rl-ctl-x { min-width: 0; }
.fpa-close-page .fa-rl-ctl-x :is(input, select) { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.fpa-close-page .fa-rl-ctl-x select { max-width: 220px; }

/* ── Tables and checks on both pages: no cell pushes past its box ──────── */
:is(.fpa-close-page, .fd) .cv5-grid td:not(.r), :is(.fpa-close-page, .fd) .cv5-grid th:not(.r) { overflow-wrap: anywhere; }
:is(.fpa-close-page, .fd) .cv5-grid td.r, :is(.fpa-close-page, .fd) .cv5-grid th.r { white-space: nowrap; }
.fpa-close-page :is(.fpa-cchk-name, .fpa-cchk-why, .fpa-cchk-lede, .fpa-cchk-fig, .fpa-cchk-hold-body) { min-width: 0; overflow-wrap: anywhere; }
.fpa-close-page .fa-tile-v { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .cer-purpose { font-size: 12.5px; padding: 8px 12px; }
  .cer-purpose a { white-space: normal; }
  .cer-cl { padding: 12px 14px; }
  .cer-cl-bar { flex-basis: 100%; max-width: none; order: 2; }
  .cer-cl-go { order: 1; }
  .cer-cl-steps { flex-direction: column; align-items: flex-start; }
  .cer-cl-steps li { flex-wrap: wrap; }
}
