/* Sentinel v2 - insight-setup.css
   Setting up a review and changing it in place (the plan's "5 · Setting up a review", mockup s5; the build spec, stages 5 and 7): the
   pieces both use (v2/insight-pickers.js - the documents table, the rules by topic with switches, the sides to read as, a value's editor),
   the sheets the review's header opens (v2/insight-lens.js) and the composer in two panes (v2/insight-compose.js).
   THE SYSTEM (the plan's design system, ui2/foundation.css): an 8-point grid - 8 inside a control, 16 between related items, 24 inside a
   card, 32 between the panes, 40 the page's gutter (16 on a phone); rows people act on 56-68 px; buttons 36 (small 30, large 44); Source
   Serif to read (names, rules), Inter to operate, Plex Mono for versions. Three depths: flat, raised (a hairline and --e1), floating
   (--e3: the sheets). THE SOFT PALETTE (tokens only): a switch is on by its sage track AND its knob on the right; a step being set up and
   a side chosen are brand-soft fills (the current selection); the one primary button is the brand. No ring, outline or halo round a
   button, even on keyboard focus - the fill changes instead. Fields are sunken wells, not framed. Motion always on. */

/* ---------------------------------------------------------------- shared controls */
.dx .ipk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 9px;
  background: var(--surface-card); box-shadow: var(--e1); color: var(--ink-1); font: 500 13.5px/1 var(--font-ui); white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s;
}
.dx .ipk-btn .v2i { flex: none; color: var(--ink-3); }
.dx .ipk-btn:hover, .dx .ipk-btn:focus-visible { background: var(--surface-hover); outline: none; }
.dx .ipk-btn[aria-expanded="true"] { background: var(--surface-hover-2); }
.dx .ipk-btn:disabled { opacity: .5; cursor: default; }
.dx .ipk-btn.is-quiet { background: transparent; box-shadow: none; color: var(--ink-2); }
.dx .ipk-btn.is-quiet:hover, .dx .ipk-btn.is-quiet:focus-visible { background: var(--surface-hover); color: var(--ink-1); }
.dx .ipk-btn.is-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.dx .ipk-btn.is-lg { height: 44px; padding: 0 20px; border-radius: 11px; font-size: 14.5px; }
.dx .ipk-btn.is-primary { background: var(--brand); box-shadow: none; color: var(--on-brand); font-weight: 600; }
.dx .ipk-btn.is-primary .v2i { color: currentColor; }
.dx .ipk-btn.is-primary:hover:not(:disabled), .dx .ipk-btn.is-primary:focus-visible { background: var(--brand-hover); }
.dx .ipk-link { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; margin-left: -8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: 500 13px/1 var(--font-ui); cursor: pointer; }
.dx .ipk-link:hover, .dx .ipk-link:focus-visible { background: var(--surface-hover); color: var(--ink-1); outline: none; }
.dx .ipk-link .v2i { color: var(--ink-3); }
.dx .ipk-dot { padding: 0 8px; color: var(--ink-4); }
.dx .ipk-q { color: var(--ink-3); }
.dx .ipk-none { margin: 16px 0; font-size: 13.5px; line-height: 20px; color: var(--ink-3); }
.dx .ipk-eb { margin: 20px 0 8px; font: 600 11.5px/16px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dx .ipk-eb:first-child { margin-top: 4px; }

/* the field: a sunken well (components.css's framed field and its ring let go of here) */
/* (four .dx: components.css frames every field with .dx.dx :is(input[type=...]):not():not() - (0,5,1); these are bare) */
.dx.dx.dx.dx :is(.ipk-in, .ipk-num, .ipk-unit, .ipk-find input, .icp-describe input) {
  box-sizing: border-box; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--surface-sunken); box-shadow: none; color: var(--ink-1);
  font: 400 13.5px/1 var(--font-ui);
}
.dx.dx.dx.dx :is(input.ipk-in, input.ipk-num, .ipk-unit):focus { outline: none; box-shadow: none; background: var(--surface-hover-2); }
.dx.dx.dx.dx textarea.ipk-in { height: auto; min-height: 80px; padding: 10px 12px; line-height: 20px; resize: vertical; }
.dx.dx.dx.dx input.ipk-num { width: 120px; font-variant-numeric: tabular-nums; }
.dx.dx.dx .ipk-unit { width: auto; padding-right: 8px; cursor: pointer; }
.dx .ipk-unit-w { font-size: 13.5px; color: var(--ink-2); }
.dx .ipk-in::placeholder, .dx .ipk-find input::placeholder { color: var(--ink-3); }
.dx .ipk-find { display: flex; flex: 1 1 220px; align-items: center; gap: 8px; min-width: 180px; height: 36px; box-sizing: border-box; padding: 0 12px; border-radius: 9px; background: var(--surface-sunken); color: var(--ink-4); }
.dx .ipk-find:focus-within { background: var(--surface-hover-2); }
.dx.dx.dx .ipk-find input, .dx.dx.dx .ipk-find input:focus { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; }

/* a filter's button, the segmented choice, the select box */
.dx .ipk-tb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dx .ipk-fb {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: 220px; padding: 0 10px 0 12px; border: 0; border-radius: 9px; background: var(--surface-card);
  box-shadow: var(--e1); color: var(--ink-1); font: 500 13px/1 var(--font-ui); white-space: nowrap; cursor: pointer; transition: background .15s;
}
.dx .ipk-fb:hover, .dx .ipk-fb:focus-visible, .dx .ipk-fb[aria-expanded="true"] { background: var(--surface-hover); outline: none; }
.dx .ipk-fb.is-on { background: var(--surface-sunken); box-shadow: none; }
.dx .ipk-fb-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.dx .ipk-fb .v2i { flex: none; color: var(--ink-4); }
.dx .ipk-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 11px; background: var(--surface-sunken); }
.dx .ipk-seg-b {
  display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3);
  font: 400 13px/1 var(--font-ui); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s;
}
.dx .ipk-seg-b b { font-weight: 500; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dx .ipk-seg-b:hover, .dx .ipk-seg-b:focus-visible { color: var(--ink-1); outline: none; }
.dx .ipk-seg-b.is-on { background: var(--surface-card); color: var(--ink-1); font-weight: 600; box-shadow: var(--e1); }
.dx .ipk-cb { position: relative; display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--on-brand); cursor: pointer; }
.dx .ipk-cb::before { content: ""; position: absolute; inset: 4px; border-radius: 5px; background: var(--line-2); transition: background .15s; }
.dx .ipk-cb:hover::before, .dx .ipk-cb:focus-visible::before { background: var(--line-3); }
.dx .ipk-cb:focus-visible { outline: none; }
.dx .ipk-cb.is-on::before { background: var(--brand); }
.dx .ipk-cb.is-some::before { background: var(--brand-soft-2); }
.dx .ipk-cb .v2i, .dx .ipk-cb i { position: relative; }
.dx .ipk-cb i { display: block; width: 8px; height: 2px; border-radius: 2px; background: var(--brand); }

/* a calm switch: a track and its knob (on: sage, knob right; off: grey, knob left) - never a ring */
.dx .ipk-sw { position: relative; display: inline-block; flex: none; width: 36px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: var(--line-3); cursor: pointer; transition: background .18s var(--ins-ease, ease); }
.dx .ipk-sw i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-card); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink-1) 28%, transparent); transition: transform .2s var(--ins-ease, ease); }
.dx .ipk-sw.is-on { background: var(--ins-meets-glyph); }
.dx .ipk-sw.is-on i { transform: translateX(16px); }
.dx .ipk-sw:focus-visible { outline: none; filter: brightness(.94); }
.dx .ipk-sw-l { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; margin-left: -10px; border: 0; border-radius: 9px; background: none; color: var(--ink-1); font: 400 13.5px/18px var(--font-ui); text-align: left; cursor: pointer; }
.dx .ipk-sw-l:hover, .dx .ipk-sw-l:focus-visible { background: var(--surface-hover); outline: none; }
.dx .ipk-sw-l[aria-checked="true"] .ipk-sw { background: var(--ins-meets-glyph); }
.dx .ipk-sw-l[aria-checked="true"] .ipk-sw i { transform: translateX(16px); }

/* ---------------------------------------------------------------- DOCUMENTS: the table to pick from */
.dx .ipk-docs { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.dx .ipk-docs.is-loading { display: grid; gap: 10px; padding: 8px 0; }
.dx .ipk-docs.is-loading i { display: block; height: 40px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-hover) 0%, var(--surface-hover-2) 50%, var(--surface-hover) 100%); background-size: 200% 100%; animation: insShim 1.4s linear infinite; }
.dx .ipk-tw { overflow: auto; max-height: min(56vh, 560px); border-radius: 10px; }
.dx .ipk-docs.is-compact .ipk-tw { max-height: min(46vh, 440px); }
.dx .ipk-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.dx .ipk-tbl thead th { position: sticky; top: 0; z-index: 1; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line-2); background: var(--surface-card); text-align: left; font: 600 12px/16px var(--font-ui); color: var(--ink-3); white-space: nowrap; }
.dx .ipk-th { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px; margin-left: -6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; }
.dx .ipk-th:hover, .dx .ipk-th:focus-visible { background: var(--surface-hover); color: var(--ink-1); outline: none; }
.dx .ipk-th.is-on { color: var(--ink-1); }
.dx .ipk-tbl td { height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line-1); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 1px; }
.dx .ipk-dr { transition: background .15s; }
.dx .ipk-dr:hover { background: var(--surface-hover); }
.dx .ipk-dr.is-on { background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface-card)); }
.dx .ipk-tbl .ipk-c-box { width: 40px; max-width: none; padding: 0 4px 0 8px; }
.dx .ipk-tbl .ipk-c-name { width: 32%; }
.dx .ipk-tbl .ipk-c-type { width: 15%; }
.dx .ipk-tbl .ipk-c-par { width: 22%; }
.dx .ipk-tbl .ipk-c-sig { width: 16%; } /* room for "Unsigned" / "Не подписан" whole */
.dx .ipk-tbl .ipk-c-end { width: 11%; font-variant-numeric: tabular-nums; }
.dx .ipk-dn { display: block; max-width: 100%; padding: 0; border: 0; background: none; color: var(--ink-1); font: 500 13.5px/20px var(--font-ui); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.dx .ipk-dn:focus-visible { outline: none; text-decoration: underline; text-decoration-color: var(--ink-4); }
.dx .ipk-wait { display: block; font-size: 12px; line-height: 16px; color: var(--ins-info); }
.dx .ipk-sig { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 12px/1 var(--font-ui); background: var(--surface-sunken); color: var(--ink-2); }
.dx .ipk-sig.is-signed { background: var(--ins-meets-soft); color: var(--ins-meets); }
.dx .ipk-sig.is-unsigned { background: var(--sev-low-soft); color: var(--sev-low); }
.dx .ipk-more { align-self: flex-start; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--surface-sunken); color: var(--ink-1); font: 500 13px/1 var(--font-ui); cursor: pointer; }
.dx .ipk-more:hover, .dx .ipk-more:focus-visible { background: var(--surface-hover-2); outline: none; }
.dx .ipk-count { display: flex; align-items: baseline; margin: 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dx .ipk-count b { color: var(--ink-1); font-weight: 600; }

/* ---------------------------------------------------------------- RULES: by topic, with switches */
.dx .ipk-rules { display: flex; flex-direction: column; min-height: 0; }
.dx .ipk-rules > .ipk-tb { padding: 0 24px 16px; }
.dx .ipk-list { border-top: 1px solid var(--line-1); }
.dx .ipk-topic-h {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 24px 0 18px; border: 0; border-bottom: 1px solid var(--line-1); background: var(--surface-pane);
  color: var(--ink-1); font: 600 13.5px/1 var(--font-ui); text-align: left; white-space: nowrap; cursor: pointer;
}
.dx .ipk-topic-h:hover, .dx .ipk-topic-h:focus-visible { background: color-mix(in srgb, var(--surface-pane) 70%, var(--surface-hover-2)); outline: none; }
.dx .ipk-chev { display: inline-grid; place-items: center; color: var(--ink-4); transition: transform .18s var(--ins-ease, ease); }
.dx .ipk-chev.is-open { transform: rotate(90deg); }
.dx .ipk-topic-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dx .ipk-on { margin-left: auto; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ins-meets-soft); color: var(--ins-meets); font: 600 12px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.dx .ipk-on.is-none { background: var(--surface-sunken); color: var(--ink-3); }
.dx .ipk-rule { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 8px 20px; min-height: 56px; padding: 10px 24px; border-bottom: 1px solid var(--line-1); transition: background .15s; animation: ipkRise .24s var(--ins-ease, ease) both; }
@keyframes ipkRise { from { opacity: 0; transform: translateY(3px); } }
.dx .ipk-rule:hover, .dx .ipk-rule.is-open { background: var(--surface-app); }
.dx .ipk-q-t { margin: 0; font: 500 15px/22px var(--font-doc); color: var(--ink-1); }
.dx .ipk-rule.is-off .ipk-q-t { color: var(--ink-3); }
.dx .ipk-q-t .ins-val { border-bottom: 1.5px dotted var(--ink-3); text-decoration: none; }
.dx .ipk-val { display: inline; padding: 0 1px; margin: 0; border: 0; border-radius: 4px; border-bottom: 1.5px dotted var(--brand); background: none; color: var(--brand-ink); font: inherit; cursor: pointer; }
.dx .ipk-val:hover, .dx .ipk-val:focus-visible { background: var(--brand-soft); outline: none; }
.dx .ipk-val.is-own, .dx .ins-val.is-own { font-weight: 600; }
.dx .ipk-rt { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.dx .ipk-kind, .dx .ipk-yours { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--surface-sunken); color: var(--ink-2); font: 500 12px/1 var(--font-ui); white-space: nowrap; }
.dx .ipk-kind .v2i { color: var(--ink-3); }
.dx .ipk-kind.is-measured { background: var(--ins-info-soft); color: var(--ins-info); }
.dx .ipk-kind.is-measured .v2i { color: var(--ins-info-glyph); }
.dx .ipk-yours { background: var(--ins-eye-soft); color: var(--ins-eye); font-weight: 600; }
.dx .ipk-yours .v2i { color: var(--ins-eye-glyph); }
.dx .ipk-offl { font-size: 13px; color: var(--ink-3); }
/* "Try on one document" waits for the row's hover or focus (and stays for the open one; always on a touch screen) */
.dx .ipk-trybtn { opacity: 0; transition: opacity .15s; }
.dx .ipk-rule:hover .ipk-trybtn, .dx .ipk-rule:focus-within .ipk-trybtn, .dx .ipk-rule.is-open .ipk-trybtn { opacity: 1; }
@media (hover: none) { .dx .ipk-trybtn { opacity: 1; } }
.dx .ipk-ved, .dx .ipk-try { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 4px 0 6px; animation: ipkRise .2s var(--ins-ease, ease) both; }
.dx .ipk-try-l { font-size: 13px; color: var(--ink-3); }
.dx.dx.dx .ipk-try .ipk-unit { max-width: 320px; }
.dx .ipk-try-r { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex-basis: 100%; margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-sunken); font-size: 13px; line-height: 20px; color: var(--ink-2); }
.dx .ipk-try-r.is-load { color: var(--ink-3); animation: ipkPulse 1.4s ease-in-out infinite; }
.dx .ipk-try-r b { font-weight: 600; color: var(--ink-1); }
@keyframes ipkPulse { 50% { opacity: .55; } }

/* ---------------------------------------------------------------- READ AS: the sides, nothing chosen for the reader */
.dx .ipk-ra { display: flex; flex-direction: column; gap: 4px; }
.dx .ipk-ra-h { margin: 0 0 8px; font-size: 13.5px; line-height: 20px; color: var(--ink-2); }
.dx .ipk-ra-o {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; border-radius: 11px;
  background: none; color: var(--ink-1); font: inherit; text-align: left; cursor: pointer; transition: background .15s;
}
.dx .ipk-ra-o:hover, .dx .ipk-ra-o:focus-visible { background: var(--surface-hover); outline: none; }
.dx .ipk-ra-o.is-on { background: var(--brand-soft); }
.dx .ipk-ra-dot { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--line-2); transition: background .15s; }
.dx .ipk-ra-o.is-on .ipk-ra-dot { background: var(--brand); }
.dx .ipk-ra-o.is-on .ipk-ra-dot::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--on-brand); }
.dx .ipk-ra-m { display: flex; flex-direction: column; min-width: 0; }
.dx .ipk-ra-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/20px var(--font-ui); color: var(--ink-1); }
.dx .ipk-ra-o.is-on .ipk-ra-n { color: var(--brand-ink); }
.dx .ipk-ra-s { font-size: 12.5px; line-height: 18px; color: var(--ink-3); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx .ipk-ra-bar { display: block; width: 72px; height: 6px; border-radius: 999px; background: var(--line-1); overflow: hidden; }
.dx .ipk-ra-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ink-4); }
.dx .ipk-ra-o.is-on .ipk-ra-bar i { background: var(--brand); }
.dx .ipk-ra-other { display: flex; gap: 8px; padding: 6px 0 4px; }
.dx.dx.dx.dx .ipk-ra-other input.ipk-in { flex: 1; min-width: 0; }
.dx .ipk-ra-sep { height: 1px; margin: 8px 0; background: var(--line-1); }

/* ---------------------------------------------------------------- the review's header, changed in place (v2/insight-lens.js) */
/* a measured value in a region's question: a button that keeps the value's look (v2/insight-review.css's dotted brand underline) */
.dx .irv-rh-q .irl-val { display: inline; padding: 0 1px; margin: 0; border: 0; border-radius: 4px; border-bottom: 1.5px dotted var(--brand); background: none; color: var(--brand-ink); font: inherit; text-decoration: none; cursor: pointer; transition: background .15s; }
.dx .irv-rh-q .irl-val:hover, .dx .irv-rh-q .irl-val:focus-visible, .dx .irv-rh-q .irl-val[aria-expanded="true"] { background: var(--brand-soft); outline: none; }
.dx .irv-rh-q .irl-val.is-own { font-weight: 700; }
.dx .irv-ib.irl-more { width: 30px; height: 30px; border-radius: 8px; }
/* a line read again: its old reading on screen while the review is read, marked */
.dx .irv-flag.is-stale { background: var(--surface-sunken); color: var(--ink-2); }
.dx .irv-reg .irv-flag.is-stale { animation: ipkPulse 1.6s ease-in-out infinite; }

/* the sheet: floating beside its button (a sheet at the foot on a phone) */
.irl-sheet.v2-menu {
  display: flex; flex-direction: column; box-sizing: border-box; width: 460px; min-width: 300px; max-width: calc(100vw - 16px); padding: 0; overflow: hidden;
  border: 1px solid var(--line-1); border-radius: 14px; background: var(--surface-card); color: var(--ink-1); box-shadow: var(--e3);
  /* under the menus it opens (a filter's, the kit's: --z-palette) and the toasts, over the page */
  z-index: calc(var(--z-palette, 80) - 1);
  font: 400 14px/20px var(--font-ui);
}
.irl-sheet.ins-menu { max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: hidden; }
.irl-sheet.is-sheet { width: auto !important; border-radius: 16px; }
.irl-sheet :focus-visible, .irl-sheet:focus, .irl-sheet:focus-visible, .irl-sheet:focus-within { outline: none; } /* the sheet itself takes the focus when it has no field: never a ring round it (the owner) */
.irl-sheet .irl-h { display: flex; align-items: center; gap: 12px; flex: none; padding: 16px 12px 12px 20px; }
.irl-sheet .irl-t { font: 600 15px/22px var(--font-ui); color: var(--ink-1); white-space: nowrap; }
.irl-sheet .irl-note { min-width: 0; font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.irl-sheet .irl-link { margin-left: auto; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; white-space: nowrap; }
.irl-sheet .irl-link:hover, .irl-sheet .irl-link:focus-visible { color: var(--ink-1); text-decoration-color: currentColor; }
.irl-sheet .irl-x { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; margin-left: auto; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
.irl-sheet .irl-link + .irl-x { margin-left: 4px; }
.irl-sheet .irl-x:hover, .irl-sheet .irl-x:focus-visible { background: var(--surface-hover); color: var(--ink-1); }
.irl-sheet .irl-b { flex: 1 1 auto; min-height: 0; padding: 0 20px 16px; overflow-y: auto; overscroll-behavior: contain; }
.irl-sheet .irl-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex: none; padding: 12px 16px 16px 20px; border-top: 1px solid var(--line-1); }
.irl-sheet .irl-sum { display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.irl-sheet .irl-acts { display: inline-flex; gap: 8px; margin-left: auto; }
.irl-sheet .irl-busy { display: flex; align-items: center; gap: 8px; flex: none; margin: 0; padding: 10px 20px; background: var(--ins-info-soft); color: var(--ins-info); font-size: 13px; }
.irl-sheet .irl-busy .v2i { color: var(--ins-info-glyph); }
.irl-sheet .irl-pbs { display: grid; gap: 2px; }
.irl-sheet .irl-pb { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 10px 4px 4px; border: 0; border-radius: 9px; background: none; color: var(--ink-1); font: inherit; text-align: left; cursor: pointer; }
.irl-sheet .irl-pb:hover, .irl-sheet .irl-pb:focus-visible { background: var(--surface-hover); }
.irl-sheet .irl-pb.is-on { background: var(--brand-soft); }
.irl-sheet .irl-pb-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/20px var(--font-doc); }
.irl-sheet .irl-pb-g { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.irl-sheet .irl-pb-c { margin-left: auto; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.irl-sheet .ipk-rules > .ipk-tb { padding: 0 0 12px; }
.irl-sheet .ipk-rule { padding: 8px 4px; grid-template-columns: 36px minmax(0, 1fr) auto; }
.irl-sheet .ipk-topic-h { padding: 0 8px 0 4px; }
.irl-sheet .ipk-q-t { font-size: 14px; line-height: 20px; }
.irl-sheet .ipk-kind { display: none; }
.irl-sheet .irl-confirm { display: grid; gap: 8px; padding-top: 4px; }
.irl-sheet .irl-big { margin: 0; font: 500 17px/26px var(--font-doc); color: var(--ink-1); }
.irl-sheet .irl-name { font-weight: 600; }
.irl-sheet .irl-meta { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.irl-sheet .irl-form, .dx .icp-form { display: grid; gap: 20px; }
.dx .irl-lf { display: grid; gap: 8px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.dx .irl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dx .irl-hint { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.irl-sheet .irl-q { margin: 0; font: 500 15px/22px var(--font-doc); color: var(--ink-1); }
.irl-sheet .irl-q .ins-val { border-bottom: 1.5px dotted var(--ink-3); text-decoration: none; }
.irl-sheet .irl-ta { width: 100%; }
.irl-sheet .irl-err { margin: 0; font-size: 13px; color: var(--ins-short); }
.irl-sheet .irl-wait { color: var(--ink-3); animation: ipkPulse 1.4s ease-in-out infinite; }
.irl-sheet .irl-qi { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-1); }
.irl-sheet .irl-qi:first-child { padding-top: 4px; }
.irl-sheet .irl-qi-m { display: grid; gap: 6px; min-width: 0; }
.irl-sheet .irl-qi .ipk-eb { margin: 0; }
.irl-sheet .irl-check { display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; margin: 0; padding: 4px 10px 4px 6px; border-radius: 8px; font-size: 12.5px; background: var(--surface-sunken); color: var(--ink-2); }
.irl-sheet .irl-check-g { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--surface-card); font: 700 11px/1 var(--font-ui); }
.irl-sheet .irl-check.is-meets { background: var(--ins-meets-soft); color: var(--ins-meets); }
.irl-sheet .irl-check.is-meets .irl-check-g { color: var(--ins-meets-glyph); }
.irl-sheet .irl-check.is-partly { background: var(--ins-partly-soft); color: var(--ins-partly); }
.irl-sheet .irl-check.is-partly .irl-check-g { color: var(--ins-partly-glyph); }
.irl-sheet .irl-check.is-short { background: var(--ins-short-soft); color: var(--ins-short); }
.irl-sheet .irl-check.is-short .irl-check-g { color: var(--ins-short-glyph); }
.irl-sheet .irl-check.is-eye { background: var(--ins-eye-soft); color: var(--ins-eye); }
.irl-sheet .irl-check.is-eye .irl-check-g { color: var(--ins-eye-glyph); }

/* ---------------------------------------------------------------- THE COMPOSER in two panes (v2/insight-compose.js) */
.dx .v2p.ins.icp { max-width: 1240px; padding-bottom: 0; }
.dx .icp :focus-visible { outline: none; }
.dx .icp-head { display: flex; align-items: flex-end; gap: 32px; }
.dx .icp-head-l { flex: 1; min-width: 0; }
.dx .icp-eb { margin: 0; font: 600 11.5px/16px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dx .icp-name-w { margin-top: 8px; }
.dx.dx.dx.dx input.icp-name {
  field-sizing: content; box-sizing: border-box; min-width: 14ch; max-width: 100%; width: 100%; height: auto; padding: 0 0 6px; border: 0; border-bottom: 2px dotted var(--ink-4);
  border-radius: 0; background: none; box-shadow: none; color: var(--ink-1); font: 600 30px/38px var(--font-doc); letter-spacing: -.01em;
}
@supports (field-sizing: content) { .dx.dx.dx.dx input.icp-name { width: auto; } }
.dx.dx.dx.dx input.icp-name:focus { outline: none; box-shadow: none; border-bottom-color: var(--brand); }
.dx .icp-name::placeholder { color: var(--ink-3); }
.dx .icp-head-r { display: flex; align-items: center; gap: 12px; flex: none; }
.dx .icp-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.dx .icp-saved .v2i { color: var(--ins-meets-glyph); }
.dx .icp-deal-l { font-size: 13px; color: var(--ink-3); }
.dx .icp-deal:empty { display: none; }
.dx .icp-panes { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 32px; }
/* left: the four steps */
.dx .icp-steps { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dx .icp-step {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; width: 100%; min-height: 116px; box-sizing: border-box; padding: 22px 24px; border: 1px solid var(--line-1);
  border-radius: var(--radius-lg, 14px); background: var(--surface-card); box-shadow: var(--e1); color: var(--ink-1); font: inherit; text-align: left; cursor: pointer;
  transition: background .18s var(--ins-ease, ease), box-shadow .18s, border-color .18s;
}
.dx .icp-step:hover, .dx .icp-step:focus-visible { background: var(--surface-hover); }
.dx .icp-step.is-on { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
.dx .icp-no { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-sunken); color: var(--ink-2); font: 600 15px/1 var(--font-ui); transition: background .18s, color .18s; }
.dx .icp-step.is-on .icp-no { background: var(--brand); color: var(--on-brand); }
.dx .icp-sx { display: flex; flex-direction: column; min-width: 0; }
.dx .icp-sl { display: flex; align-items: center; gap: 10px; height: 22px; font: 600 15px/22px var(--font-ui); color: var(--ink-1); white-space: nowrap; }
.dx .icp-step.is-on .icp-sl { color: var(--brand-ink); }
.dx .icp-ok { margin-left: auto; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ins-meets-soft); color: var(--ins-meets-glyph); }
.dx .icp-go { margin-left: auto; display: grid; place-items: center; color: var(--brand); }
.dx .icp-sv { margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--ink-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx .icp-ss { display: block; margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx .icp-ss .ipk-dot { padding: 0 6px; }
.dx .icp-n { font-variant-numeric: tabular-nums; }
.dx .icp-step.is-unset .icp-sv { color: var(--ink-3); }
.dx .icp-step.is-need .icp-sv { color: var(--ins-partly); font-weight: 500; }
.dx .icp-note { display: flex; gap: 12px; margin: 8px 0 0; padding: 0 24px; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.dx .icp-note .v2i { flex: none; margin-top: 2px; color: var(--ink-4); }
/* right: the step's pane */
.dx .icp-pane {
  display: flex; flex-direction: column; min-width: 0; min-height: 520px; max-height: calc(100dvh - var(--modebar-h, 52px) - 250px); border: 1px solid var(--line-1);
  border-radius: var(--radius-lg, 14px); background: var(--surface-card); box-shadow: var(--e1); overflow: hidden; animation: ipkRise .24s var(--ins-ease, ease) both;
}
.dx .icp-ph { flex: none; padding: 24px 24px 20px; }
.dx .icp-pt { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.dx .icp-ph:not(.is-check) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.dx .icp-h2 { margin: 0; font: 600 18px/26px var(--font-ui); color: var(--ink-1); }
.dx .icp-h2.is-serif { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 22px/30px var(--font-doc); }
.dx .icp-ph:not(.is-check) .ipk-seg { margin-left: auto; }
.dx .icp-ps { margin: 0; flex-basis: 100%; font-size: 13.5px; line-height: 20px; color: var(--ink-3); }
.dx .icp-vtag { display: inline-flex; align-items: center; flex: none; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--surface-sunken); color: var(--ink-2); font: 500 12px/1 var(--font-mono); }
.dx .icp-more { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.dx .icp-pbbtn { margin-left: auto; flex: none; }
.dx .icp-pm { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-3); white-space: nowrap; }
.dx .icp-pm span { display: inline-flex; align-items: center; gap: 6px; }
.dx .icp-pm b { color: var(--ink-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.dx .icp-pm .v2i { color: var(--ink-4); }
.dx .icp-pb { flex: 1 1 auto; min-height: 0; padding: 0 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
.dx .icp-pb.is-rules { padding: 0; }
.dx .icp-pb .ipk-tw { max-height: none; overflow: visible; }
.dx .icp-pb .ipk-tbl thead th { top: 0; }
.dx .icp-pf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; flex: none; padding: 12px 24px 14px; border-top: 1px solid var(--line-1); }
.dx .icp-pf-m { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.dx .icp-say { margin: 4px 0 0; font-size: 14px; line-height: 22px; color: var(--ink-2); }
.dx .icp-folders { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--ink-3); }
.dx .icp-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--surface-sunken); color: var(--ink-1); font-size: 13px; }
.dx .icp-chip .v2i { color: var(--ink-3); }
.dx .icp-chip-x { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; }
.dx .icp-chip-x:hover, .dx .icp-chip-x:focus-visible { background: var(--surface-hover-2); color: var(--ink-1); }
.dx .icp-describe { display: flex; gap: 8px; }
.dx.dx.dx .icp-describe input { flex: 1; min-width: 0; height: 40px; }
.dx .icp-card { display: grid; gap: 8px; margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--surface-pane); }
.dx .icp-card-w { font: 500 15px/22px var(--font-doc); color: var(--ink-1); }
.dx .icp-check { justify-self: start; padding: 2px 8px; border-radius: 6px; background: var(--ins-partly-soft); color: var(--ins-partly); font-size: 12.5px; }
.dx .icp-card-m { margin: 0; font-size: 13px; color: var(--ink-3); }
.dx .icp-card-a { display: flex; flex-wrap: wrap; gap: 8px; }
.dx .icp-chosen { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ins-meets); }
.dx .icp-chosen .v2i { color: var(--ins-meets-glyph); }
.dx .icp-empty { display: grid; justify-items: start; gap: 8px; margin: 8px 24px 24px; padding: 24px; border-radius: 12px; background: var(--surface-pane); }
.dx .icp-empty b { font: 600 15px/22px var(--font-ui); color: var(--ink-1); }
.dx .icp-empty p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.dx .icp-empty-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dx .icp-agent { margin: 16px 24px 24px; }
/* the run line: held at the page's foot, across both panes */
.dx .icp-run {
  position: sticky; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 80px; box-sizing: border-box; margin: 32px -40px 0;
  padding: 12px 40px; border-top: 1px solid var(--line-2); background: var(--surface-card); box-shadow: 0 -12px 28px -20px color-mix(in srgb, var(--ink-1) 30%, transparent);
}
.dx .icp-sum { display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0; font-size: 14px; line-height: 20px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dx .icp-sum b { color: var(--ink-1); font-weight: 600; }
.dx .icp-sum > span:first-child { color: var(--ink-1); }
.dx .icp-ask { height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--ins-partly-soft); color: var(--ins-partly); font: 600 13px/1 var(--font-ui); cursor: pointer; }
.dx .icp-ask:hover, .dx .icp-ask:focus-visible { background: color-mix(in srgb, var(--ins-partly-glyph) 24%, var(--surface-card)); }
.dx .icp-muted { color: var(--ink-3); }
.dx .icp-acts { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.dx .icp-th { margin-left: 0; }
.dx .icp-th-m { display: flex; flex-direction: column; }
.dx .icp-th-l { font: 500 14px/20px var(--font-ui); color: var(--ink-1); }
.dx .icp-th-h { font-size: 12.5px; line-height: 18px; color: var(--ink-3); white-space: nowrap; }
.dx .icp-vr { width: 1px; height: 32px; background: var(--line-2); flex: none; }

/* ---------------------------------------------------------------- narrower windows, then a phone */
@container main (max-width: 1080px) {
  .dx .icp-panes { grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
  .dx .icp-step { min-height: 0; padding: 16px 18px; gap: 12px; }
  .dx .icp-th-h { display: none; }
  .dx .ipk-tbl .ipk-c-par { display: none; }
}
@container main (max-width: 760px) {
  .dx .v2p.ins.icp { padding-left: 16px; padding-right: 16px; }
  .dx .icp-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .dx.dx.dx.dx input.icp-name { font-size: 24px; line-height: 30px; }
  .dx .icp-panes { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 20px; }
  .dx .icp-steps { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } /* minmax: never wider than the phone */
  .dx .icp-step > * { min-width: 0; }
  .dx .icp-sx { min-width: 0; }
  .dx .icp-sl { height: auto; min-height: 22px; white-space: normal; } /* "As of · matters above" wraps in a half-width card */
  /* a switch wider than the phone scrolls inside its own row instead of running off the page */
  .dx .ipk-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .dx .icp-ph:not(.is-check) .ipk-seg { margin-left: 0; }
  .dx .icp-step { grid-template-columns: 28px minmax(0, 1fr); padding: 12px; min-height: 0; }
  .dx .icp-no { width: 28px; height: 28px; font-size: 13px; }
  .dx .icp-ss, .dx .icp-note { display: none; }
  .dx .icp-pane { max-height: none; min-height: 0; }
  .dx .icp-run { margin: 20px -16px 0; padding: 12px 16px; }
  .dx .icp-acts { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .dx .icp-vr { display: none; }
  .dx .ipk-rule { grid-template-columns: 36px minmax(0, 1fr); }
  .dx .ipk-rt { grid-column: 2; flex-wrap: wrap; }
  .dx .ipk-tbl .ipk-c-type, .dx .ipk-tbl .ipk-c-sig { display: none; }
  .dx .ipk-sw, .dx .ipk-cb { min-height: 20px; }
  .dx .ipk-cb { width: 40px; height: 40px; }
  .dx .ipk-cb::before { inset: 12px; }
}
