/* RM Login Tool - "night desk" theme.
   Vercel-style deep dark by default (light mode available), Linear-style hairlines and type,
   Stripe-style forms/tables, Notion-style toggle blocks, Attio-style tags/avatars, Revolut-style metric cards.
   Previous design: ui-versions/classic-2026-10-10 (restore-classic-ui.cmd). */
:root {
  --bg: #000000; --surface: #0a0a0a; --surface-2: #121212; --hover: #171717;
  --line: #1f1f1f; --line-strong: #2e2e2e;
  --ink: #ededed; --ink-2: #c7c7c7; --muted: #8f8f8f; --faint: #5c5c5c;
  --accent: #f2742b; --accent-ink: #ffffff; --glow: rgba(242, 116, 43, .35);
  /* pastel status (text / tint) */
  --mint: #7ee2b8; --mint-bg: rgba(126, 226, 184, .10);
  --butter: #f3d27a; --butter-bg: rgba(243, 210, 122, .10);
  --rose: #f49a9a; --rose-bg: rgba(244, 154, 154, .10);
  --sky: #8ec5ff; --sky-bg: rgba(142, 197, 255, .10);
  --lilac: #b9a7ff; --lilac-bg: rgba(185, 167, 255, .10);
  /* legacy names used by the screens */
  --brand: var(--accent); --brand-soft: rgba(242, 116, 43, .12); --brand-ink: #fff; --card: var(--surface);
  --ok: var(--mint); --ok-soft: var(--mint-bg); --warn: var(--butter); --warn-soft: var(--butter-bg);
  --bad: var(--rose); --bad-soft: var(--rose-bg); --info: var(--sky); --info-soft: var(--sky-bg);
  --radius: 10px; --radius-sm: 6px;
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --side: 232px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fafafa; --surface: #ffffff; --surface-2: #f5f5f5; --hover: #f0f0f0;
  --line: #ebebeb; --line-strong: #d9d9d9;
  --ink: #171717; --ink-2: #3d3d3d; --muted: #6b6b6b; --faint: #a3a3a3;
  --glow: rgba(242, 116, 43, .25);
  --mint: #127a52; --mint-bg: #e8f7f0; --butter: #8a6100; --butter-bg: #fdf4dc;
  --rose: #b42318; --rose-bg: #fdecec; --sky: #175cd3; --sky-bg: #eaf2ff; --lilac: #5b3fd1; --lilac-bg: #f1edff;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
::selection { background: var(--glow); }
:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--glow); border-radius: var(--radius-sm); }

/* ---------- app shell: sidebar + content ---------- */
body.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
#side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; padding: 12px 10px; gap: 2px; }
#side .brand { display: flex; gap: 10px; align-items: center; padding: 6px 8px 12px; font-weight: 600; letter-spacing: -.01em; cursor: pointer; }
.mark { width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; box-shadow: 0 0 18px var(--glow); }
.searchbtn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); cursor: pointer; text-align: left; }
.searchbtn:hover { border-color: var(--line-strong); color: var(--ink-2); }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--surface); }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink-2); cursor: pointer; border: 0; background: transparent; width: 100%; text-align: left; position: relative; }
.nav:hover { background: var(--hover); color: var(--ink); }
.nav.on { background: var(--hover); color: var(--ink); }
.nav.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.nav .ic { width: 16px; text-align: center; opacity: .8; }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.nav .count.hot { color: var(--accent); }
#side .foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.net { font-size: 12px; color: var(--mint); display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.net::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.net.off { color: var(--butter); }
.content { min-width: 0; }
main { max-width: 1120px; margin: 0 auto; padding: 24px 28px 64px; }
/* old top bar is kept for small screens only */
.top { display: none; }
@media (max-width: 860px) {
  body.shell { grid-template-columns: 1fr; }
  #side { display: none; }
  .top { display: block; position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
  .top .in { padding: 8px 14px; display: flex; gap: 8px; align-items: center; }
  main { padding: 16px 14px 48px; }
}
.logo { font-weight: 600; display: flex; gap: 8px; align-items: center; cursor: pointer; }
.iconbtn { border: 0; background: transparent; padding: 5px 7px; border-radius: var(--radius-sm); cursor: pointer; position: relative; color: var(--ink-2); }
.iconbtn:hover { background: var(--hover); color: var(--ink); }
.badge { position: absolute; top: -2px; right: -2px; background: var(--accent); color: #fff; font: 600 10px/16px var(--mono); border-radius: 99px; padding: 0 4px; min-width: 16px; text-align: center; box-shadow: 0 0 8px var(--glow); }

/* ---------- surfaces: hairlines, not heavy boxes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stack > * + * { margin-top: 12px; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 10px; }
h3 { font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
hr { border: 0; border-top: 1px solid var(--line); }

/* ---------- buttons ---------- */
.btn { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 13px; line-height: 20px; transition: border-color .12s, box-shadow .12s, background .12s; }
.btn:hover { border-color: var(--faint); background: var(--hover); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--glow); }
.btn.danger { color: var(--rose); }
.btn.sm { padding: 3px 9px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- forms (Stripe) ---------- */
label.f { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; height: 34px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink);
  transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; min-height: 72px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
input.invalid, select.invalid { border-color: var(--rose) !important; box-shadow: 0 0 0 3px var(--rose-bg); }
.ferr { color: var(--rose); font-size: 12px; margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

/* ---------- status tags (muted, pastel, with a dot) ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--ink-2); background: transparent; white-space: nowrap; line-height: 20px; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.chip.ok { color: var(--mint); background: var(--mint-bg); border-color: transparent; } .chip.ok::before { background: var(--mint); }
.chip.warn { color: var(--butter); background: var(--butter-bg); border-color: transparent; } .chip.warn::before { background: var(--butter); }
.chip.bad { color: var(--rose); background: var(--rose-bg); border-color: transparent; } .chip.bad::before { background: var(--rose); }
.chip.info { color: var(--sky); background: var(--sky-bg); border-color: transparent; } .chip.info::before { background: var(--sky); }
.chip.brand { color: var(--lilac); background: var(--lilac-bg); border-color: transparent; } .chip.brand::before { background: var(--lilac); }

/* avatars (Attio) */
.av { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 10px/1 var(--font); color: #0b0b0b; flex: none; }
.av.lg { width: 30px; height: 30px; font-size: 12px; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

/* ---------- case list as a table (Attio views + filters) ---------- */
.views { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 14px 0 0; overflow-x: auto; }
.views button { border: 0; background: transparent; color: var(--muted); padding: 8px 12px; cursor: pointer; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.views button:hover { color: var(--ink); }
.views button.on { color: var(--ink); border-bottom-color: var(--accent); }
.views .n { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-left: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 0; }
.filters select, .filters input { width: auto; height: 30px; font-size: 12.5px; }
.filters input { min-width: 220px; }
.ctable { width: 100%; border-collapse: collapse; }
.ctable th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ctable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ctable tr.r { cursor: pointer; }
.ctable tr.r:hover td { background: var(--surface); }
.ctable .name { font-weight: 500; color: var(--ink); }
.ctable .sub { font-size: 12px; color: var(--muted); }
.next { font-weight: 500; }
.next.urgent { color: var(--accent); }
@media (max-width: 860px) {
  .ctable thead { display: none; }
  .ctable, .ctable tbody, .ctable tr, .ctable td { display: block; width: 100%; }
  .ctable tr.r { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; padding: 6px 4px; background: var(--surface); }
  .ctable td { border: 0; padding: 4px 10px; }
  .ctable td.hide-sm { display: none; }
  .ctable td[data-l] { display: inline-block; width: auto; }
  .ctable td[data-l]::before { content: attr(data-l) ': '; color: var(--muted); font-family: var(--sans, inherit); font-size: 12px; }
}
/* old card list kept for compatibility */
.cases { display: grid; gap: 8px; }
.ccard { cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.ccard:hover { border-color: var(--line-strong); }
.bar { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--mint); border-radius: 99px; }
.bar.mid > i { background: var(--butter); } .bar.low > i { background: var(--rose); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 16px 0; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-color: var(--accent); }
.tabs .count { font: 500 11px/16px var(--mono); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-2); border-radius: 99px; padding: 0 6px; margin-left: 6px; }

/* ---------- drop zone ---------- */
.drop { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; cursor: pointer; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.drop:hover { border-color: var(--faint); }
.drop.over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.drop strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
/* Upload bar on a case: always first on the tab, tinted so it is found at a glance. */
.drop.addbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; border: 1.5px dashed var(--accent); background: var(--brand-soft); }
.drop.addbar:hover { box-shadow: 0 0 0 3px var(--glow); }
.drop.addbar strong { font-size: 15px; margin-bottom: 2px; }
.addbar-icon { width: 34px; height: 34px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 18px; font-weight: 700; }
@media (max-width: 600px) { .drop.addbar .grow { flex-basis: calc(100% - 50px); } }

.qitem { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.qitem:last-child { border-bottom: 0; }

/* checklist (credit view) */
.ck { display: grid; grid-template-columns: 20px 1fr; gap: 2px 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ck:last-child { border-bottom: 0; }
.ck .st { font-weight: 700; } .ck .st.OK { color: var(--mint); } .ck .st.ISSUE { color: var(--butter); } .ck .st.MISSING { color: var(--rose); }
.ck .notes { grid-column: 2; font-size: 12.5px; color: var(--muted); } .ck .docs { grid-column: 2; font-size: 12.5px; }

/* questions */
.question { border-left: 2px solid var(--accent); }
.opts { display: grid; gap: 6px; margin-top: 10px; }
.opts button { text-align: left; }
.mic { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); padding: 0 12px; cursor: pointer; }
.mic.on { background: var(--rose); color: #000; border-color: var(--rose); box-shadow: 0 0 12px var(--rose-bg); }

/* timeline */
.timeline { border-left: 1px solid var(--line-strong); padding-left: 16px; }
.timeline .ev { position: relative; padding: 4px 0 12px; }
.timeline .ev::before { content: ""; position: absolute; left: -20px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--glow); }

/* assistant */
.chat { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px; }
.msg { padding: 8px 12px; border-radius: 10px; max-width: 85%; white-space: pre-wrap; border: 1px solid var(--line); }
.msg.user { background: var(--surface-2); justify-self: end; }
.msg.assistant { background: transparent; }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th, table.t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.t td.num, table.t th.num { text-align: right; font-family: var(--mono); }
.scrollx { overflow-x: auto; }

/* ---------- metric cards (Revolut) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpi { position: relative; overflow: hidden; }
.kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-family: var(--font); line-height: 1.15; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi .spark { display: block; width: 100%; height: 34px; margin-top: 10px; }
.kpi.t-mint { background: linear-gradient(180deg, var(--mint-bg), transparent 70%), var(--surface); }
.kpi.t-sky { background: linear-gradient(180deg, var(--sky-bg), transparent 70%), var(--surface); }
.kpi.t-butter { background: linear-gradient(180deg, var(--butter-bg), transparent 70%), var(--surface); }
.kpi.t-rose { background: linear-gradient(180deg, var(--rose-bg), transparent 70%), var(--surface); }
.kpi.t-lilac { background: linear-gradient(180deg, var(--lilac-bg), transparent 70%), var(--surface); }
.hbar { display: grid; grid-template-columns: 170px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; margin: 6px 0; }
.hbar .b { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar .b i { display: block; height: 100%; background: var(--ink-2); border-radius: 99px; }
.hbar > span:last-child { font-family: var(--mono); text-align: right; color: var(--ink-2); }
@media (max-width: 640px) { .hbar { grid-template-columns: 110px 1fr 44px; } }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .dgrid { grid-template-columns: 1fr; } }

/* ---------- toggle blocks (Notion) ---------- */
details.card { padding: 0; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.block { border: 0; background: transparent; border-radius: var(--radius-sm); }
details.block > summary { display: flex; gap: 10px; align-items: center; padding: 9px 8px; border-radius: var(--radius-sm); cursor: pointer; user-select: none; }
details.block > summary:hover { background: var(--surface); }
details.block > summary .caret { color: var(--faint); transition: transform .15s; width: 12px; }
details.block[open] > summary .caret { transform: rotate(90deg); color: var(--ink-2); }
details.block > summary .grip { color: var(--faint); opacity: 0; cursor: grab; padding: 0 2px; }
details.block > summary:hover .grip { opacity: 1; }
details.block .blockbody { padding: 2px 8px 10px 30px; }
details.block.dragging { opacity: .4; }
details.block.drop-above { box-shadow: 0 -2px 0 var(--accent); }
.blocks { border-top: 1px solid var(--line); }
.blocks > details.block { border-bottom: 1px solid var(--line); border-radius: 0; }
.pill { font: 600 11.5px/18px var(--mono); padding: 0 8px; border-radius: 99px; min-width: 26px; text-align: center; }

/* ---------- command palette (Linear) ---------- */
.cmdk { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.cmdk .box { width: min(640px, 94vw); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 0 0 1px var(--line); overflow: hidden; }
.cmdk input { height: 48px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 15px; padding: 0 16px; box-shadow: none !important; }
.cmdk .list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.cmdk .grp { font-size: 11.5px; color: var(--faint); padding: 8px 10px 4px; }
.cmdk .it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-2); }
.cmdk .it.sel { background: var(--hover); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.cmdk .it .meta { margin-left: auto; color: var(--faint); font-size: 12px; }
.cmdk .foot { border-top: 1px solid var(--line); padding: 8px 12px; font-size: 12px; color: var(--faint); display: flex; gap: 14px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 10px; z-index: 99; max-width: 90vw; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 50; display: flex; justify-content: flex-end; }
.sheet .panel { background: var(--surface); border-left: 1px solid var(--line-strong); width: min(420px, 100%); height: 100%; overflow-y: auto; padding: 18px; }
.login { max-width: 360px; margin: 14vh auto; }
.empty { text-align: center; padding: 36px; color: var(--muted); }
.flags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.sev-high { color: var(--rose); font-weight: 600; } .sev-warn, .sev-medium { color: var(--butter); } .sev-info, .sev-low { color: var(--sky); }
.spin { display: inline-block; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } * { transition: none !important; } }

/* case table: keep names and next steps on one line */
.ctable td:first-child { min-width: 260px; }
.ctable .name, .ctable .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.ctable .next { white-space: nowrap; }
.ctable td .chip { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.ctable-wrap { overflow-x: auto; }
@media (max-width: 860px) { .ctable td:first-child { min-width: 0; } .ctable .name, .ctable .sub { max-width: none; white-space: normal; } }
@media (max-width: 1240px) { .ctable .hide-md { display: none; } .ctable td:first-child { min-width: 230px; } }
.dgrid { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.dgrid > * { min-width: 0; overflow-x: auto; }
main { overflow-x: clip; } /* clip, not hidden: hidden would stop the sticky case bar */

/* collapsible sidebar (icon strip) */
#side .brand .side-toggle { margin-left: auto; color: var(--faint); }
#side .brand .side-toggle:hover { color: var(--ink); }
body.side-min { --side: 60px; }
body.side-min #side { padding: 12px 8px; align-items: center; }
body.side-min #side .lbl, body.side-min #side .count, body.side-min #side .chip { display: none; }
body.side-min #side .brand { flex-direction: column; gap: 8px; padding: 6px 0 10px; }
body.side-min #side .brand .side-toggle { margin: 0; transform: rotate(180deg); }
body.side-min #side .searchbtn { justify-content: center; padding: 7px 0; }
body.side-min #side .nav { justify-content: center; padding: 8px 0; }
body.side-min #side .nav .ic { width: auto; font-size: 15px; }
body.side-min #side .net { font-size: 0; padding: 0; justify-content: center; }
body.side-min #side .foot { align-items: center; width: 100%; }
#side .brand .mark { cursor: pointer; }
:root { --pink: #f0a6e8; --pink-bg: rgba(240, 166, 232, .10); }
:root[data-theme="light"] { --pink: #a21caf; --pink-bg: #fbeefc; }

/* pending / requirement rows: short name | plain reason | (i) */
.prow { display: grid; grid-template-columns: minmax(180px, 34%) 1fr 30px; gap: 4px 16px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow-doc { font-weight: 500; color: var(--ink); }
.prow-why { font-size: 13px; color: var(--ink-2); }
.prow-i { padding: 0 6px; color: var(--faint); align-self: center; }
.prow-i:hover, .prow-i.on { color: var(--ink); }
.prow-more { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 4px; }
@media (max-width: 760px) { .prow { grid-template-columns: 1fr 30px; } .prow-why { grid-column: 1; } }
.prow.has-view { grid-template-columns: minmax(180px, 34%) 1fr auto 30px; }
.prow-view { align-self: center; }
@media (max-width: 760px) { .prow.has-view { grid-template-columns: 1fr auto 30px; } }

/* checks tab rows: name+summary | status | action | info */
.crow { display: grid; grid-template-columns: 1fr auto auto 30px; gap: 4px 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.crow:last-child { border-bottom: 0; }
.crow .prow-more { grid-column: 1 / -1; }
@media (max-width: 640px) { .crow { grid-template-columns: 1fr auto; } .crow > :nth-child(3) { grid-column: 1 / -1; } .crow > :nth-child(4) { display: none; } }
.tablewrap { overflow-x: auto; }

/* header timeline strip */
.tl-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--muted); cursor: pointer; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.tl-strip:hover, .tl-strip:focus-visible { border-color: var(--line-strong); color: var(--ink-2); outline: none; }
.tl-step { display: inline-flex; gap: 4px; align-items: baseline; white-space: nowrap; }
.tl-step.now { color: var(--ink); font-weight: 600; }
.tl-h { font-family: var(--mono); font-size: 11px; color: var(--faint); } .tl-h.late { color: var(--rose); }
.tl-sep { color: var(--faint); }
.tl-more { margin-left: auto; font-size: 11.5px; color: var(--sky); padding-left: 8px; }

/* form: per-field helper under the control */
.fhelp { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 4px 8px; border-radius: var(--radius-sm); }
.fhelp.ai { background: var(--sky-bg); color: var(--sky); }
.fhelp.sugg { background: var(--lilac-bg); color: var(--ink-2); }
.fhelp.miss { color: var(--rose); padding: 2px 0; }


/* "View as" bar: always visible while seeing the tool as someone else */
.viewas { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--butter-bg); color: var(--ink); border-bottom: 1px solid var(--butter); font-size: 13px; position: sticky; top: 0; z-index: 20; }
.viewas .av { width: 22px; height: 22px; font-size: 10px; }

/* Auto CAM */
.cam-sec > summary { list-style: none; cursor: pointer; }
.cam-sec > summary::-webkit-details-marker { display: none; }
.cam-sec > summary h2 { display: inline; margin: 0; }
.cam-sec > summary::after { content: '▾'; float: right; color: var(--muted); }
.cam-sec:not([open]) > summary::after { content: '▸'; }
.cam-body { margin-top: 10px; display: grid; gap: 10px; }
.cam-kv { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 6px 14px; font-size: 13px; }
.cam-kv .k { color: var(--muted); }
.cam-v { white-space: pre-wrap; }
.cam-empty { color: var(--faint); }
.cam-click { cursor: text; border-bottom: 1px dashed var(--line); }
.cam-click:hover { background: var(--surface-2); }
.cam-ed { color: var(--butter); margin-left: 4px; font-size: 11px; }
.cam-t td, .cam-t th { font-size: 12.5px; }
.cam-t tr.cam-pass td { opacity: .7; }
.cam-ul { margin: 0; padding-left: 18px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .cam-kv { grid-template-columns: 1fr; } .cam-kv .k { margin-top: 6px; } }
@media print {
  #side, #top, .tabs, #viewas-bar, .toast, .cam-top button, .cam-top select { display: none !important; }
  body, main, .card { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  main#view > .card:first-child { display: none; }
  .cam-sec { break-inside: avoid; border: 1px solid #ccc !important; }
  .cam-click { border: 0; }
  .cam-sec > summary::after { content: ''; }
}

/* View as: read-only */
body.viewas #view .btn.primary, body.viewas #view .cam-click, body.viewas .fab { opacity: .45; pointer-events: none; }

/* Case bar: tabs + upload, pinned to the top while scrolling. */
.casebar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-top: 6px; }
.casebar .tabs { margin-bottom: 0; border-bottom: 0; overflow-x: auto; }
.casebar > .row { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.casebar-name { display: none; font-weight: 600; font-size: 14px; padding: 2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.casebar.stuck { box-shadow: 0 6px 12px -10px rgba(0,0,0,.25); }
.casebar.stuck .casebar-name { display: block; }
@media (max-width: 700px) { .casebar > .row { flex-wrap: wrap; } }
.casebar .drop.addbar { margin-top: 8px; }
.casebar.stuck .drop.addbar { padding: 6px 12px; margin-top: 6px; }
.casebar.stuck .drop.addbar .small { display: none; }
.casebar.stuck .addbar-icon { width: 26px; height: 26px; font-size: 14px; }
.casebar.stuck .drop.addbar strong { font-size: 14px; margin: 0; }
.casebar { padding-bottom: 6px; }
.casebar .drop.addbar { background: linear-gradient(var(--brand-soft), var(--brand-soft)), var(--bg); } /* solid: text scrolling under it must not show through */
/* Product-fit note: lead line in full ink, rest on demand. */
/* Callout the RM should not skip: tinted by severity, heading + icon, verdict in large type, numbered to-collect list. */
.fitsum { --tone: var(--info); --tone-soft: var(--info-soft); border: 1px solid var(--tone); border-left-width: 5px; background: var(--tone-soft); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.fitsum.bad { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.fitsum.warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.fitsum.ok { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.fitsum-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--tone); }
.fitsum-icon { width: 20px; height: 20px; border-radius: 50%; background: var(--tone); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.fitsum-lead { font-size: 16px; line-height: 1.45; font-weight: 600; color: var(--ink); }
.fitsum-collect { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; }
.fitsum-sub { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.fitsum-collect ol { margin: 0; padding-left: 22px; columns: 3 200px; column-gap: 24px; }
.fitsum-collect li { font-size: 14px; line-height: 1.7; break-inside: avoid; }
.fitsum-full { font-size: 13px; line-height: 1.5; color: var(--ink-2); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 12px; }
.fitsum .linkbtn { justify-self: start; color: var(--tone); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }

/* RM view of product-fit points: plain heading per group, numbered points, title over action, no boxes. */
.rmpoints { --tone: var(--warn); display: grid; gap: 10px; }
.rmpoints.bad { --tone: var(--bad); }
.rmpoints-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rmpoints-head strong { color: var(--tone); }
.rmpoints-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); flex: none; align-self: center; }
.rmpoints-grid { display: grid; grid-template-columns: 1fr; gap: 14px 28px; }
@media (min-width: 900px) { .rmpoints-grid { grid-template-columns: 1fr 1fr; } }
.rmpoint { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.rmpoint-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.rmpoint-text { min-width: 0; display: grid; gap: 2px; }
.rmpoint-title { font-weight: 600; font-size: 14px; line-height: 24px; }
.rmpoint-do { font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.rmpoint-do .linkbtn { font-size: 12px; color: var(--muted); font-weight: 600; }
.rmpoint-more { margin-top: 4px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; line-height: 1.5; display: grid; gap: 3px; }
.rmpoint-more[hidden] { display: none; }
/* Numbered file list under a pending item: problem files first, with their reason. */
.filelist { margin: 0; padding-left: 24px; }
.filelist li { padding: 3px 0; }
.filelist li::marker { color: var(--muted); font-size: 13px; }
.filelist-row { display: flex; align-items: center; gap: 8px; }
.filelist-row .grow { min-width: 0; font-size: 14px; }
.filelist li.bad .filelist-row .grow { font-weight: 600; }
/* In-page document viewer. */
.docviewer { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.docviewer-panel { width: min(1100px, 100%); height: min(92vh, 100%); background: var(--surface); border-radius: var(--radius); display: grid; grid-template-rows: auto 1fr; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.docviewer-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.docviewer-bar .grow { min-width: 0; }
.docviewer-bar .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docviewer iframe { width: 100%; height: 100%; border: 0; background: #525659; }
.docviewer-img { overflow: auto; display: grid; place-items: center; background: var(--surface-2); }
.docviewer-img img { max-width: 100%; }
.filelist-prob { font-size: 13px; font-weight: 400; color: var(--warn); margin-top: 1px; }
.filelist-row { align-items: flex-start; }
.filelist-row .chip, .filelist-row .btn { flex: none; }
/* SWOT view of product fit (trial 13 Oct 2026): 2 x 2, each quadrant tinted by meaning. */
.swot { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.swot-q { --tone: var(--ok); --tone-soft: var(--ok-soft); padding: 12px 14px; background: linear-gradient(var(--tone-soft), var(--tone-soft)), var(--surface); }
.swot-q.w { --tone: var(--warn); --tone-soft: var(--warn-soft); border-left: 1px solid var(--line); }
.swot-q.o { --tone: var(--info); --tone-soft: var(--info-soft); border-top: 1px solid var(--line); }
.swot-q.t { --tone: var(--bad); --tone-soft: var(--bad-soft); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.swot-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.swot-h strong { color: var(--tone); font-size: 15px; }
.swot-n { font-size: 12px; font-weight: 700; color: #fff; background: var(--tone); border-radius: 99px; padding: 0 7px; line-height: 18px; }
.swot-sub { font-size: 12px; color: var(--muted); }
.swot-q ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.swot-q li::marker { color: var(--tone); font-weight: 700; }
.swot-t { font-weight: 600; font-size: 14px; }
.swot-d { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.swot-d .linkbtn { font-size: 12px; color: var(--muted); font-weight: 600; }
@media (max-width: 760px) { .swot { grid-template-columns: 1fr; } .swot-q.w, .swot-q.t { border-left: 0; } .swot-q.w { border-top: 1px solid var(--line); } }
.swot-q li[hidden] { display: none; }
.swot-more { margin-top: 8px; font-size: 13px; color: var(--tone); }

/* Grouped requirement list: one line per subject with a peek of what is inside. */
.reqgrp { border-bottom: 1px solid var(--line); }
.reqgrp > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 8px; padding: 8px 4px; min-width: 0; }
.reqgrp > summary::-webkit-details-marker { display: none; }
.reqgrp > summary:hover { background: var(--hover); }
.reqgrp .caret { font-size: 11px; color: var(--muted); transition: transform .12s; flex: none; }
.reqgrp[open] > summary .caret { transform: rotate(90deg); }
.reqgrp-name { font-weight: 600; font-size: 14px; flex: none; }
.reqgrp-n { font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.reqgrp-peek { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.reqgrp[open] .reqgrp-peek { visibility: hidden; }
.reqgrp-body { padding: 0 0 6px 20px; }

/* Now / later split and item tags in the pending lists. */
.keybadge { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; padding: 0 5px; margin-right: 6px; line-height: 17px; vertical-align: 1px; }
.whochip { display: inline-block; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 99px; padding: 0 7px; margin-left: 6px; line-height: 17px; vertical-align: 1px; }
.later { margin-top: 6px; border-top: 1px dashed var(--line-strong); }
.later > summary { list-style: none; cursor: pointer; display: flex; gap: 8px; align-items: baseline; padding: 8px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.later > summary::-webkit-details-marker { display: none; }
.later .caret { font-size: 11px; transition: transform .12s; }
.later[open] > summary .caret { transform: rotate(90deg); }
.later-n { font-weight: 400; }
.later-sec { padding-left: 16px; opacity: .85; }
.later-h { font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 0 2px; }
/* Case tabs: tighter, and no scrollbar under them (they can still be scrolled sideways on a small screen). */
.casebar .tabs { scrollbar-width: none; }
.casebar .tabs::-webkit-scrollbar { display: none; }
.casebar .tabs button { padding: 8px 9px; }

.typechip { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 99px; padding: 0 7px; margin-left: 6px; line-height: 17px; vertical-align: 1px; }
.typechip.miss { color: var(--bad); background: var(--bad-soft); }
.typechip.redo { color: var(--warn); background: var(--warn-soft); }
.blockbody > .later-h:first-child { margin-top: 0; }

/* Compact case header: two rows. */
.card.casehead { padding: 10px 14px; display: grid; gap: 8px; }
.casehead-r1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.casehead-who { flex: 1; min-width: 200px; }
.casehead-who h1 { font-size: 18px; line-height: 1.25; margin: 0; }
.casehead-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.casehead-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.casehead-r2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.casehead-prog { flex: 1 1 220px; min-width: 180px; }
.casehead-prog .bar { margin-top: 3px; }
.casehead-next { white-space: nowrap; font-size: 14px; }
.casehead-r2 .tl-strip { flex: 0 1 auto; padding: 3px 8px; }
.casehead-r2 .btn { padding-top: 4px; padding-bottom: 4px; }

/* File & pending: four boxes side by side, every list visible; a document's reason opens on click. */
.dcols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.dcol { border: 1px solid var(--line); border-top: 3px solid var(--fg); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.dcol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px 12px 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
.dcol-title { font-weight: 700; font-size: 14px; color: var(--fg); }
.dcol-sub { font-size: 12px; color: var(--muted); }
.dcol-n { font-weight: 800; font-size: 20px; line-height: 1; color: var(--fg); }
.dcol-list { padding: 2px 12px 8px; }
.dcol .later-h { margin: 8px 0 2px; }
/* rows inside a box: name only until clicked */
.dcol .prow { display: block; padding: 7px 0; }
.dcol .prow-doc { cursor: pointer; font-size: 13.5px; line-height: 1.4; padding-left: 14px; position: relative; }
.dcol .prow-doc::before { content: '▸'; position: absolute; left: 0; top: 1px; font-size: 10px; color: var(--muted); transition: transform .12s; }
.dcol .prow.open .prow-doc::before { transform: rotate(90deg); }
.dcol .prow-doc:hover { color: var(--fg); }
.dcol .prow > :not(.prow-doc) { display: none; }
.dcol .prow.open > .prow-why { display: block; margin: 4px 0 0 14px; font-size: 12.5px; }
.dcol .prow.open > .prow-view, .dcol .prow.open > .prow-i, .dcol .prow.open > .chip { display: inline-block; margin: 6px 6px 0 14px; }
.dcol .prow.open > .prow-more:not(.hidden) { display: block; margin: 6px 0 0 14px; }
.dcol .typechip, .dcol .whochip { font-size: 10.5px; }
.dcol .qitem { font-size: 13px; }
@media (max-width: 1100px) { .dcols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .dcols { grid-template-columns: 1fr; } }

/* Pinned case bar v2 (13 Oct 2026): one row, constant height, the name slides in without moving anything. */
.casebar { padding: 4px 0 0; box-shadow: none; transition: box-shadow .2s; }
.casebar.stuck { box-shadow: 0 6px 12px -10px rgba(0,0,0,.25); }
.casebar-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); min-height: 44px; }
.casebar > .row { display: none; }
.casebar .casebar-name, .casebar.stuck .casebar-name { display: block; flex: none; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-weight: 700; font-size: 14px; padding: 0; margin: 0; transition: max-width .25s ease, opacity .2s ease, margin .25s ease; }
.casebar.stuck .casebar-name { max-width: 140px; opacity: 1; margin-right: 4px; }
.casebar-row .tabs { margin: 0; border: 0; min-width: 0; }
.casebar-row .btn.sm { padding-top: 4px; padding-bottom: 4px; }
.casebar-row .tabs button { padding: 8px 7px; }
.casebar-row .tabs .count { margin-left: 4px; }

/* Follow-up send bar: recipients and channels as toggles, one row above the draft. */
.sendbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sendlbl { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.sendsep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 6px; }
.sendpill { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sendpill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sendpill[aria-pressed="true"]::before { content: '✓ '; }
.sendmob { width: 130px; padding: 4px 8px; font-size: 13px; }
.sendmob[hidden] { display: none; }
.sendbar input.sendmob { width: 130px; flex: 0 0 130px; padding: 4px 8px; font-size: 13px; }
.sendbar input.sendmob[hidden] { display: none; }

/* Follow-up preview: the full message, a tick per document line, Send locked until all are ticked. */
.msgnote { font-size: 13px; color: var(--ink-2); background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius-sm); padding: 6px 10px; margin-bottom: 8px; }
.msgprev { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.msgprev[hidden] { display: none; }
.msgline.gap { height: 8px; overflow: hidden; }
.msgitem { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; margin: 2px -8px; border-radius: var(--radius-sm); cursor: pointer; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 6%, transparent); }
.msgitem.ok { border-left-color: var(--ok); background: transparent; color: var(--ink-2); }
.msgitem input { margin-top: 3px; flex: none; }
.msgdel { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 13px; padding: 0 4px; }
.msgdel:hover { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
/* Inside the narrow document boxes: name on its own line, problem cut to 2 lines (hover for all), tag + Open on one line. */
.dcol .filelist { padding-left: 18px; }
.dcol .filelist-row { flex-wrap: wrap; gap: 4px 6px; }
.dcol .filelist-row > .grow { flex: 1 1 100%; font-size: 13px; }
.dcol .filelist-prob, .dcol .prow.open > .prow-why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dcol .filelist-row > .chip { font-size: 11px; }
.dcol .filelist-row > .btn { padding: 2px 8px; font-size: 12px; }
.dcol .prow-more { padding: 6px 8px; }
/* Use the screen (RKPF 13 Oct 2026): the working area grows when the sidebar is closed; only very wide screens are capped. */
main { max-width: 1680px; padding: 18px clamp(12px, 2vw, 24px) 48px; }
.casebar-back { flex: none; font-size: 16px; padding: 4px 8px; }
.sendcard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; }
/* AI note inside the product-fit box: same tinted background, readable size (RKPF 13 Oct 2026). */
.fitsum .fitsum-full { background: transparent; padding: 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
/* SWOT v2 (13 Oct 2026): four cards, icon headings, each point a small card with its own colour stripe. */
.swot { gap: 12px; border: 0; border-radius: 0; overflow: visible; }
.swot-q, .swot-q.w, .swot-q.o, .swot-q.t { border: 1px solid color-mix(in srgb, var(--tone) 25%, var(--line)); border-top: 4px solid var(--tone); border-radius: var(--radius); padding: 12px; box-shadow: 0 2px 10px -6px color-mix(in srgb, var(--tone) 60%, transparent); }
.swot-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: nowrap; }
.swot-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tone); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent); }
.swot-q.t .swot-ic { background: #fff; color: var(--tone); font-size: 16px; box-shadow: 0 0 0 2px var(--tone); }
.swot-ht { display: grid; flex: 1; min-width: 0; }
.swot-h strong { font-size: 16px; line-height: 1.2; }
.swot-sub { font-size: 12px; }
.swot-n { font-size: 15px; font-weight: 800; padding: 2px 10px; line-height: 22px; }
.swot-q ol { padding-left: 0; list-style: none; gap: 8px; }
.swot-item { display: grid; grid-template-columns: 24px 1fr; gap: 10px; background: var(--surface); border-radius: var(--radius-sm); padding: 9px 10px; border-left: 3px solid var(--tone); box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: transform .12s ease, box-shadow .12s ease; }
.swot-item:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--tone) 70%, transparent); }
.swot-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.swot-body { min-width: 0; display: grid; gap: 3px; }
.swot-t { font-weight: 700; font-size: 14px; display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.swot-d { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.swot-do { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.swot-do-l { flex: none; font-size: 11px; font-weight: 800; color: #fff; background: var(--tone); border-radius: 4px; padding: 0 6px; line-height: 17px; }
.swot-why { flex: none; border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); background: transparent; color: var(--tone); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 8px; line-height: 18px; cursor: pointer; }
.swot-why:hover { background: color-mix(in srgb, var(--tone) 12%, transparent); }
.swot .rmpoint-more { margin-top: 6px; }
.swot-q li[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .swot-item { transition: none; } .swot-item:hover { transform: none; } }
/* SWOT v2 compact (13 Oct 2026): same look, about a third less height. */
.swot { gap: 8px; }
.swot-q, .swot-q.w, .swot-q.o, .swot-q.t { padding: 8px 10px; border-top-width: 3px; }
.swot-h { margin-bottom: 6px; gap: 8px; }
.swot-ic { width: 22px; height: 22px; font-size: 12px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 18%, transparent); }
.swot-q.t .swot-ic { font-size: 12px; }
.swot-h strong { font-size: 14.5px; }
.swot-ht { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.swot-n { font-size: 13px; padding: 0 8px; line-height: 20px; }
.swot-q ol { gap: 5px; }
.swot-item { grid-template-columns: 18px 1fr; gap: 8px; padding: 5px 8px; }
.swot-num { width: 18px; height: 18px; font-size: 11px; margin-top: 1px; }
.swot-body { gap: 1px; }
.swot-t { font-size: 13.5px; line-height: 1.35; }
.swot-d, .swot-do { font-size: 13px; line-height: 1.4; }
.swot-do-l { font-size: 10px; line-height: 15px; padding: 0 5px; }
.swot-why { font-size: 10.5px; line-height: 16px; padding: 0 7px; }
.swot-more { margin-top: 4px; font-size: 12.5px; }
/* Title runs straight into its text (one line saved per point) so the AI note and all four boxes fit one screen. */
.swot-body { display: block; }
.swot-t { display: inline; font-size: 13.5px; margin-right: 6px; }
.swot-t .swot-why { float: right; margin-left: 8px; }
.swot-d, .swot-do { display: inline; }
.swot-do-l { display: inline-block; margin-right: 5px; vertical-align: 1px; }
.swot-body > .rmpoint-more { display: block; }
.swot-body > .rmpoint-more[hidden] { display: none; }
.fitsum { padding: 10px 14px; gap: 6px; }
/* "More" button in each SWOT box: full width, the box's colour, dashed like a card still to open. */
.swot-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 6px; padding: 6px 10px; border: 1.5px dashed var(--tone); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--tone) 10%, var(--surface)); color: var(--tone); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .12s; }
.swot-more:hover { background: color-mix(in srgb, var(--tone) 20%, var(--surface)); }
.swot-more-n { background: var(--tone); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 18px; font-size: 12px; }
.swot-more-ic { font-size: 11px; }
/* Product fit: everything above the AI note on one line. */
.fitline { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.fitline > strong { font-size: 15px; margin-right: 4px; }
.fitline-prog { font-weight: 600; font-size: 14px; }
.fitline-other { font-size: 11.5px; opacity: .85; }
.fitcard { padding-top: 10px; padding-bottom: 10px; }

/* Questions tab: who asks what. */
.qsec { margin: 14px 0 0; font-size: 16px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.qsec-n { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 99px; padding: 0 8px; }
.qsub { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.btn.notsure { border-style: dashed; color: var(--muted); }
/* Answer options as a compact grid, not one full line each (RKPF 13 Oct 2026). */
.question .opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 10px; }
.question .opts .btn { width: auto; text-align: left; justify-content: flex-start; padding: 8px 12px; white-space: normal; line-height: 1.3; }
@media (max-width: 600px) { .question .opts { grid-template-columns: 1fr 1fr; } }
/* Compact questions (RKPF 13 Oct 2026): buttons fit their text on one line, less padding - more questions per screen. */
.question .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.question .opts .btn { width: auto; padding: 4px 12px; line-height: 1.35; white-space: nowrap; font-size: 13.5px; }
.card.question { padding: 10px 14px; }
@media (max-width: 600px) { .question .opts .btn { white-space: normal; } }
/* Questions tab sized to the screen height (RKPF 13 Oct 2026): spacing, padding and text scale with the viewport
   so at least 6 questions are visible at a time, on a short laptop screen or a tall monitor. */
.qtab { gap: clamp(5px, 1.1vh, 14px); }
.qsec { margin: 2px 0 0; font-size: clamp(14px, 1.9vh, 17px); flex-wrap: wrap; row-gap: 2px; }
.qsec-sub { font-size: 12px; font-weight: 400; color: var(--muted); }
.qtab .card.question { padding: clamp(6px, 1.1vh, 14px) clamp(10px, 1.2vw, 16px); font-size: clamp(13px, 1.75vh, 15.5px); line-height: 1.35; }
.qtab .question .opts { margin-top: clamp(4px, .8vh, 10px); gap: clamp(4px, .7vh, 8px); }
.qtab .question .opts .btn { padding: clamp(2px, .45vh, 7px) clamp(10px, .9vw, 14px); font-size: clamp(12.5px, 1.65vh, 15px); }
.qtab .question textarea { min-height: clamp(34px, 5vh, 70px); }
.qtab .question .row { margin-top: clamp(4px, .8vh, 10px) !important; }
/* Questions in two columns on wide screens (RKPF 13 Oct 2026). */
.qgrid { display: grid; grid-template-columns: 1fr; gap: clamp(5px, 1.1vh, 14px); align-items: stretch; }
@media (min-width: 1100px) { .qgrid { grid-template-columns: 1fr 1fr; } }
.qgrid > .card.question { margin: 0; }

/* Document questions: open the document first (answers locked until then). */
.btn.docopen { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.btn.docopen.seen { border-color: var(--line-strong); color: var(--muted); font-weight: 500; }
.question .opts .btn:disabled { opacity: .45; cursor: not-allowed; }

/* "Open" sits right after the question text and keeps one look before and after opening. */
.qtext .btn.docopen, .qtext .btn.docopen.seen { display: inline-flex; padding: 1px 9px; font-size: 12.5px; line-height: 1.4; vertical-align: 1px; margin-left: 4px; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.qhint { font-size: 12px; color: var(--muted); margin-left: 2px; }
.qhint[hidden] { display: none; }

/* "Answers that don't match the documents": a calm comparison card (RKPF 13 Oct 2026). */
.mm-head { color: var(--ink); }
.mm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); flex: none; }
.mm-card { border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--bad) 5%, var(--surface)); padding: 10px 12px; display: grid; gap: 8px; }
.mm-top { display: flex; align-items: center; gap: 10px; }
.mm-ic { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.mm-q { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.btn.mm-again { flex: none; border-color: var(--bad); color: var(--bad); font-weight: 700; background: var(--surface); }
.btn.mm-again:hover { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.mm-cmp { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; gap: 12px; padding-left: 30px; }
.mm-col { min-width: 0; }
.mm-lbl { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .02em; margin-bottom: 3px; }
.mm-ans { display: inline-block; font-size: 13px; font-weight: 600; color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); border-radius: 99px; padding: 2px 10px; }
.mm-ev { font-size: 13px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mm-ev.open { display: block; }
.mm-more { font-size: 12px; color: var(--bad); }
@media (max-width: 600px) { .mm-cmp { grid-template-columns: 1fr; padding-left: 0; } }

/* "more" sits at the end of the 2nd line (no extra line); "less" follows the full text. */
.mm-evwrap { position: relative; }
.mm-more { position: absolute; right: 0; bottom: 0; line-height: 1.45; font-size: 13px; padding-left: 28px; font-weight: 700;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--bad) 5%, var(--surface)) 26px); }
.mm-more.open { position: static; padding-left: 0; background: none; }

/* Compact case form (RKPF 13 Oct 2026): 3+ fields per row, the check / suggestion inline beside the field. */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px 14px; }
.fgrid .ff.wide { grid-column: 1 / -1; }
.ff { min-width: 0; }
.ff label.f { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 3px; }
.ff label.f .chip { font-size: 10.5px; padding: 0 6px; line-height: 16px; }
.frow { display: flex; gap: 6px; align-items: center; }
.frow > input, .frow > select { flex: 1; min-width: 0; padding-top: 6px; padding-bottom: 6px; }
.frow > .btn { flex: none; white-space: nowrap; }
.btn.fok { border-color: var(--sky); color: var(--sky); font-weight: 700; }
.btn.fok:hover { background: color-mix(in srgb, var(--sky) 12%, var(--surface)); }
.btn.fuse { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ftogs { gap: 10px 18px; align-items: center; }
.ftog { display: flex; align-items: center; gap: 6px; }
.ftog.miss label { color: var(--bad); }

/* Case form v3 (13 Oct 2026): actions inside the field, equal widths, quiet colours. */
.fgrid { gap: 10px 16px; }
.ff label.f { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.frow { position: relative; display: block; }
.frow > input, .frow > select { width: 100%; padding-top: 7px; padding-bottom: 7px; }
.frow.is-ai > input, .frow.is-ai > select { border-color: color-mix(in srgb, var(--sky) 55%, var(--line)); background: color-mix(in srgb, var(--sky) 6%, var(--surface)); padding-right: 40px; }
.frow.is-ai > select { padding-right: 58px; background-position: right 34px center; }
.frow.is-miss > input, .frow.is-miss > select { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); border-width: 1.5px; }
.frow.has-sugg > input { padding-right: 150px; }
.fok { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--sky); background: var(--surface);
  color: var(--sky); font-weight: 800; font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.fok:hover { background: var(--sky); color: #fff; }
.frow > select ~ .fok { right: 26px; }
.fuse { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--lilac) 45%, transparent);
  background: color-mix(in srgb, var(--lilac) 12%, var(--surface)); color: var(--lilac); border-radius: 99px; padding: 2px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.fuse:hover { background: color-mix(in srgb, var(--lilac) 22%, var(--surface)); }
.ftog .fok { position: static; transform: none; }

/* Smooth tab switches: the new tab fades in; a bar that was already pinned shows without the slide-in. */
.tabfade { animation: tabfade .16s ease-out; }
@keyframes tabfade { from { opacity: 0; } to { opacity: 1; } }
.casebar.nofx .casebar-name { transition: none; }
@media (prefers-reduced-motion: reduce) { .tabfade { animation: none; } }
/* A tab is at least one screen tall (minus the pinned bar), so switching to a short tab never forces the collapsed header back open. */
.casebody-tall { min-height: calc(100vh - 64px); } /* only after scrolling down - see app.js (14 Oct 2026) */

/* Consent & checks, compact (RKPF 13 Oct 2026) */
.ckboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ctile { --c: var(--line-strong); display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); border-left: 3px solid var(--c);
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--c) 7%, var(--surface)); font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; text-align: left; }
.ctile:hover { background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.ctile-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctile-c { font-size: 11px; color: var(--muted); }
.ctile-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.ok { --c: var(--ok); } .warn { --c: var(--warn); } .bad { --c: var(--bad); } .info { --c: var(--info); } .todo { --c: var(--muted); } .off { --c: var(--line-strong); }
.ctile.off { color: var(--muted); border-left-style: dashed; background: var(--surface); }
.ctile.todo .ctile-dot { background: transparent; border: 1.5px solid var(--muted); }
.cklegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.cklegend .cl { display: inline-flex; align-items: center; gap: 5px; }
.cklegend .cl.todo .ctile-dot { background: transparent; border: 1.5px solid var(--muted); }
.cperson { display: grid; grid-template-columns: minmax(130px, 170px) 1fr; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cperson:last-of-type { border-bottom: 0; }
.cperson-cells { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.ccell { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.ccell-l { font-size: 12.5px; font-weight: 600; }
.ccell .chip { font-size: 11px; }
.ckgrid th, .ckgrid td { padding: 5px 8px; white-space: nowrap; }
.ckgrid-n { font-size: 13px; }
.cgcell { --c: var(--line-strong); display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.cgcell:hover { background: var(--hover); }
.cgcell.todo .ctile-dot { background: transparent; border: 1.5px solid var(--muted); }
.cgcell.off { color: var(--faint); }
tr.flash, .ccell.flash { animation: flashrow 1.4s ease-out; }
@keyframes flashrow { 0% { background: color-mix(in srgb, var(--accent) 25%, transparent); } 100% { background: transparent; } }
@media (max-width: 700px) { .cperson { grid-template-columns: 1fr; } }

/* status colours for grid cells (after .cgcell so they win) + tighter rows */
.cgcell.ok { --c: var(--ok); } .cgcell.warn { --c: var(--warn); } .cgcell.bad { --c: var(--bad); } .cgcell.info { --c: var(--info); } .cgcell.todo { --c: var(--muted); }
.cgcell.ok { color: var(--ok); font-weight: 600; } .cgcell.warn { color: var(--warn); font-weight: 600; } .cgcell.bad { color: var(--bad); font-weight: 600; }
.ckgrid th, .ckgrid td { padding: 3px 8px; }
.ckgrid tr:hover td { background: var(--hover); }

/* Check guide (13 Oct 2026): one card per person - state, the step that turns it green, the button. */
.sheet.ckcell .panel { max-width: 560px; }
.cguide { --c: var(--line-strong); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px;
  background: color-mix(in srgb, var(--c) 6%, var(--surface)); }
.cguide.ok { --c: var(--ok); } .cguide.warn { --c: var(--warn); } .cguide.bad { --c: var(--bad); } .cguide.info { --c: var(--info); } .cguide.todo { --c: var(--muted); } .cguide.off { --c: var(--line-strong); }
.cguide.todo .ctile-dot { background: transparent; border: 1.5px solid var(--muted); }
.cguide-h { display: flex; align-items: center; gap: 8px; }
.cguide-st { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--c); }
.cguide.todo .cguide-st, .cguide.off .cguide-st { color: var(--muted); }
.cguide-do { font-size: 14px; line-height: 1.45; }
.cguide-k { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 1px; }
.cg-found { margin-top: 4px; font-size: 13px; color: var(--ink-2); padding: 6px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.cguide-b .btn { min-width: 140px; }
.cg-facts summary { cursor: pointer; color: var(--muted); }

/* Consent & checks - always-open cards (14 Oct 2026): customer grid + to do, side by side on wide screens. */
.ckpanels { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .ckpanels { grid-template-columns: 1fr; } }
.ckpanel { display: grid; gap: 10px; }
.ckpanel-h { display: flex; align-items: center; gap: 10px; }
.ckpanel-h h2 { margin: 0; font-size: 15px; flex: 1; }
.ckbadge { --c: var(--muted); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); white-space: nowrap; }
.ckbadge.ok { --c: var(--ok); } .ckbadge.warn { --c: var(--warn); } .ckbadge.bad { --c: var(--bad); }
.cpanel-cust.flash { animation: flashrow 1.4s ease-out; }

/* the grid: a row per person, a column per step */
.cgrid { width: 100%; border-collapse: separate; border-spacing: 0; }
.cgrid th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 0 12px 6px 0; white-space: nowrap; }
.cgrid td { vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
.cgrid-p { width: 150px; }
.cgrid-p strong { font-size: 14px; }
.cstat { --c: var(--muted); display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--c); white-space: nowrap; }
.cstat .ctile-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.cstat.ok { --c: var(--ok); } .cstat.warn { --c: var(--warn); } .cstat.bad { --c: var(--bad); } .cstat.info { --c: var(--info); }
.cstat.todo { --c: var(--muted); font-weight: 500; } .cstat.todo .ctile-dot { background: transparent; border: 1.5px solid var(--muted); }
.cact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.cact:empty { display: none; }
.cact .chip, .cact .small.muted { display: none; } /* status is already shown above the buttons */
.btn.ghost { background: transparent; }

/* steps for the case as a whole */
.ccase { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 22px; padding-top: 10px; border-top: 1px solid var(--line); }
.ccase-l { font-size: 11.5px; font-weight: 600; color: var(--muted); padding-top: 2px; min-width: 138px; }
.ccase-i { display: grid; gap: 2px; }
.ccase-n { font-size: 13px; font-weight: 600; }

/* footer: optional steps + consent text */
.cfoot { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 8px; border-top: 1px solid var(--line); }
.cfoot details { font-size: 13px; }
.cfoot details[open] { flex-basis: 100%; }
.cfoot summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.copt { display: grid; gap: 6px; margin-top: 8px; }
.copt-i { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* to do list */
.todolist .qitem { padding: 9px 0; gap: 12px; }
.todolist .qitem:last-child { border-bottom: 0; }
.todolist .qitem .btn { flex: none; }
.cgrid { width: auto; }
.cgrid td:not(.cgrid-p), .cgrid th:not(:first-child) { min-width: 230px; padding-right: 28px; }
.ccase-l { min-width: 150px; }

/* Customer grid v3 (14 Oct 2026): one line per person, columns line up, status + button side by side. */
.ckpanels { align-items: stretch; }
.ckpanel { align-content: start; }
.chint { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; color: var(--muted); }
.chint b { color: var(--ink-2); font-weight: 600; }
.cg2 { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cg2-row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); min-height: 54px; }
.cg2-row:first-child { border-top: 0; }
.cg2-head { min-height: 0; padding-top: 8px; padding-bottom: 8px; background: var(--surface-2); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cg2-case { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.cg2-p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cg2-p strong { font-size: 14px; display: block; }
.cg2-role { font-size: 12px; color: var(--muted); }
.cg2-av.case { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.cg2-span { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.cc2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.cc2-n { font-size: 13px; font-weight: 600; color: var(--ink); }
.cc2 .cstat { white-space: nowrap; }
.cc2 .cact { display: inline-flex; gap: 6px; margin: 0 0 0 auto; }
.cc2-n + .cstat + .cact { margin-left: 4px; }
.cfoot2 { display: flex; flex-wrap: wrap; gap: 8px; }
.cfoot2 details { font-size: 13px; }
.cfoot2 details[open] { flex-basis: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.cfoot2 summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-2); font-weight: 500; background: var(--surface); }
.cfoot2 summary::-webkit-details-marker { display: none; }
.cfoot2 summary::before { content: '▸'; font-size: 10px; color: var(--muted); transition: transform .15s; }
.cfoot2 details[open] summary { border: 0; padding-left: 0; }
.cfoot2 details[open] summary::before { transform: rotate(90deg); }
.cfoot2 summary:hover { background: var(--surface-2); }
@media (max-width: 760px) { .cg2-row { grid-template-columns: 1fr; } .cg2-head { display: none; } .cg2-span { grid-column: auto; } .cc2 .cact { margin-left: 0; } }
.cc2 { flex-wrap: nowrap; }
.cc2 .cact { margin: 0; }
@media (max-width: 760px) { .cc2 { flex-wrap: wrap; } }

/* Customer step tracker (14 Oct 2026): person | steps joined by a line | Next (buttons always in the same column). */
.ckpanels { align-items: start; }
.ctrks { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ctrk { display: grid; grid-template-columns: 170px minmax(0, 1fr) 300px; align-items: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.ctrk:first-child { border-top: 0; }
.ctrk:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.ctrk-steps { display: flex; align-items: center; min-width: 0; }
.sn { --c: var(--muted); display: flex; align-items: center; gap: 9px; flex: none; }
.sn-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; color: #fff;
  background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.sn-l { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.sn-s { font-size: 12px; color: var(--c); white-space: nowrap; }
.sn.ok { --c: var(--ok); } .sn.bad { --c: var(--bad); } .sn.run { --c: var(--warn); } .sn.warn { --c: var(--warn); }
.sn.run .sn-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.sn.todo .sn-dot, .sn.wait .sn-dot { background: var(--surface); border: 2px solid var(--line-strong, var(--line)); box-shadow: none; }
.sn.wait .sn-s, .sn.todo .sn-s { color: var(--muted); }
.sn-line { flex: 1 1 24px; min-width: 18px; max-width: 70px; height: 2px; margin: 0 10px; background: var(--line); border-radius: 2px; }
.sn-line.ok { background: var(--ok); }
.cnext { justify-self: end; text-align: right; display: grid; gap: 6px; justify-items: end; }
.cnext-l { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cnext-b { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cnext-b .chip, .cnext-b .small.muted { display: none; }
.cnext-done { font-size: 12.5px; font-weight: 600; color: var(--ok); }
@media (max-width: 900px) { .ctrk { grid-template-columns: 1fr; } .cnext { justify-self: start; text-align: left; justify-items: start; } .ctrk-steps { flex-wrap: wrap; row-gap: 10px; } }
.sn { width: 168px; }
.sn-line { flex: none; width: 28px; margin: 0 12px 0 -4px; }
.sn-t { min-width: 0; } .sn-l, .sn-s { overflow: hidden; text-overflow: ellipsis; }

/* ===== Consent & checks v5 (14 Oct 2026): progress first, one "do this now", results grouped by meaning ===== */
.cv5 { gap: 14px; }
.chero { display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(0, 2fr); gap: 22px; align-items: center; padding: 18px 22px; }
.cring { position: relative; width: 84px; height: 84px; }
.cring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.cring-bg { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.cring-fg { fill: none; stroke: var(--ok); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.cring-n { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; font-weight: 800; color: var(--ink); }
.chero-t h2 { margin: 0 0 4px; font-size: 19px; }
.chero-t p { margin: 0 0 4px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.cjourney { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: none; }
.cjourney li { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 0 10px 0 0; }
.cjourney li:not(:last-child)::after { content: ''; position: absolute; top: 13px; left: 32px; right: 8px; height: 2px; background: var(--line); }
.cjourney li.done:not(:last-child)::after { background: var(--ok); }
.cjourney li > div { position: relative; z-index: 1; background: var(--surface); padding: 0 8px 0 0; margin-top: 30px; margin-left: -36px; }
.cj-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 800;
  border: 2px solid var(--line); background: var(--surface); color: var(--muted); }
.cjourney li.done .cj-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.cjourney li.now .cj-dot { border-color: var(--brand, var(--warn)); color: var(--brand, var(--warn)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand, var(--warn)) 18%, transparent); }
.cj-n { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.cjourney li.next .cj-n { color: var(--muted); }
.cj-s { font-size: 12px; color: var(--muted); }
.cjourney li.now .cj-s { color: var(--ink-2); }
.cfocus { display: grid; gap: 12px; border: 1.5px solid color-mix(in srgb, var(--brand, var(--warn)) 35%, var(--line)); }
.cfocus h2 { margin: 0; font-size: 16px; flex: 1; }
.calso h3 { margin: 4px 0 2px; font-size: 13px; color: var(--ink-2); }
.cresults { display: grid; gap: 12px; }
.cresults h2 { margin: 0; font-size: 16px; flex: 1; }
.rgroup { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--muted)) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 18%, var(--line)); }
.rgroup.look { --c: var(--bad); } .rgroup.done { --c: var(--ok); } .rgroup.run { --c: var(--info); } .rgroup.paid { --c: var(--lilac, var(--info)); } .rgroup.wait { --c: var(--muted); }
.rgroup-h { display: flex; align-items: center; gap: 10px; }
.rgroup-h strong { font-size: 13.5px; }
.rgroup-i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--c); flex: none; }
.rgroup.wait .rgroup-i { background: var(--surface); color: var(--muted); border: 1.5px solid var(--line); }
.rgroup-s { font-size: 12px; color: var(--muted); }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { --c: var(--muted); display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
  background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink); cursor: pointer; }
.rchip:hover { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.rchip.ok { --c: var(--ok); } .rchip.bad { --c: var(--bad); } .rchip.warn { --c: var(--warn); } .rchip.info { --c: var(--info); }
.rchip.todo .ctile-dot { background: transparent; border: 1.5px solid var(--muted); }
.rchip-c { font-size: 11px; color: var(--muted); }
.rsoon { font-size: 12.5px; color: var(--muted); padding: 2px 4px; }
.rsoon strong { color: var(--ink-2); }
@media (max-width: 1100px) { .chero { grid-template-columns: auto 1fr; } .cjourney { grid-column: 1 / -1; } }
@media (max-width: 640px) { .cjourney { grid-template-columns: repeat(2, 1fr); row-gap: 14px; } }

/* Minimal guide (14 Oct 2026): numbers, names, colours, buttons - the explanations live in tooltips. */
.chero { grid-template-columns: auto auto minmax(0, 1fr); gap: 18px 28px; padding: 14px 20px; }
.cring, .cring svg { width: 64px; height: 64px; }
.cring-n { font-size: 15px; }
.chero-t h2 { margin: 0; font-size: 24px; line-height: 1; }
.chero-s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.cj-s { font-variant-numeric: tabular-nums; }
.cfocus .ckpanel-h h2 { font-size: 15px; }
.cfocus { gap: 10px; }
.ctrk { padding: 12px 16px; min-height: 0; }
.cg2-p { gap: 10px; }
.sn { width: 190px; }
.todolist { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.rgroup { padding: 10px 14px; gap: 8px; }
.rgroup-h { cursor: help; }

/* One line per person (14 Oct 2026): name · current step · buttons */
.ctrk2 { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--line); }
.ctrk2:first-child { border-top: 0; }
.ctrk2.done { color: var(--muted); background: color-mix(in srgb, var(--ok) 4%, var(--surface)); }
.ctrk2-l { --c: var(--muted); justify-self: start; font-size: 12.5px; font-weight: 600; color: var(--c); padding: 2px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 10%, var(--surface)); cursor: help; }
.ctrk2-l.bad { --c: var(--bad); } .ctrk2-l.run, .ctrk2-l.warn { --c: var(--warn); } .ctrk2-l.todo, .ctrk2-l.wait { --c: var(--ink-2); }
.ctrk2-ok { justify-self: start; font-weight: 800; color: var(--ok); }
.ctrk2-w { font-size: 12px; color: var(--muted); }
.ctrk2 .cnext-b { justify-content: flex-end; }
@media (max-width: 640px) { .ctrk2 { grid-template-columns: 1fr auto; } .ctrk2 .cnext-b { grid-column: 1 / -1; justify-content: flex-start; } }

/* Consent card in two halves (14 Oct 2026) */
.cfocus-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cfocus-side { display: grid; gap: 10px; align-content: start; }
.cfocus-2 .ctrk2 { grid-template-columns: 130px auto 1fr; }
.cfocus-2 .ctrk2 .cnext-b { justify-content: flex-end; }
.cfocus-clear { font-size: 13px; font-weight: 600; color: var(--ok); padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.todolist .qitem { padding: 10px 0; }
@media (max-width: 1000px) { .cfocus-2 { grid-template-columns: 1fr; } }
.csoon { display: grid; gap: 8px; margin-top: 8px; }
.cfoot2 .csoon { flex-basis: 100%; margin-top: 4px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.csoon-h { font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: help; }

/* Consent card in three columns (14 Oct 2026): Consent | Missing | Can be done later */
.cfocus-3 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ccol { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ccol-h { font-size: 13px; font-weight: 700; color: var(--ink-2); padding-left: 2px; }
.cfocus-3 .ctrk2 { grid-template-columns: minmax(90px, 120px) auto 1fr; gap: 10px; padding: 10px 12px; }
.cfocus-3 .ctrk2 .cnext-b { justify-content: flex-end; }
.cfocus-3 .csoon { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.cfocus-3 .todolist .qitem { font-size: 13px; }
.cfocus-3 .cfoot2 { margin-top: 2px; }
@media (max-width: 1150px) { .cfocus-3 { grid-template-columns: 1fr 1fr; } .cfocus-3 > .ccol:first-child { grid-column: 1 / -1; } }
@media (max-width: 700px) { .cfocus-3 { grid-template-columns: 1fr; } }

/* four columns (14 Oct 2026): Consent | Missing | Can be done later | Optional */
.cfocus-3 { grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1fr); }
.copt4 .qitem { font-size: 13px; gap: 8px; }
.copt4 .qitem .small.muted { font-size: 11.5px; text-align: right; }
@media (max-width: 1300px) { .cfocus-3 { grid-template-columns: 1fr 1fr; } .cfocus-3 > .ccol:first-child { grid-column: auto; } }
@media (max-width: 700px) { .cfocus-3 { grid-template-columns: 1fr; } }
.cfocus-3 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cfocus-3 .ctrk2 { grid-template-columns: auto auto 1fr; gap: 8px; padding: 10px; }
.cfocus-3 .ctrk2 .cg2-p { min-width: 0; }
.cfocus-3 .cnext-b { flex-wrap: nowrap; }
.cfocus-3 .cnext-b .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.cfocus-3 .ctrk2-l { padding: 2px 8px; }

/* Checks as a grid of boxes (14 Oct 2026) - like the File & pending tiles */
.rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; align-items: stretch; }
.rgrid .rgroup { align-content: start; }
.rgrid .rchips { flex-direction: column; align-items: stretch; gap: 5px; }
.rgrid .rchip { justify-content: flex-start; border-radius: 8px; }
.rgrid .rchip .rchip-c { margin-left: auto; }
.rgrid .rgroup-h { flex-wrap: wrap; }
.rgrid .rgroup-h .btn { margin-left: auto; }
.rgrid { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
.rgrid .rgroup { padding: 10px; }
.rgrid .rgroup-h strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rgrid .rchip { font-size: 12px; padding: 5px 9px; min-width: 0; }
.rgrid .rchip > :not(.ctile-dot):not(.rchip-c) { overflow: hidden; text-overflow: ellipsis; }
.rgroup-act { margin-top: 2px; }
.rgroup-act .btn { width: 100%; }
@media (max-width: 1100px) { .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rgrid { grid-template-columns: 1fr; } }
.rgrid .rchip { text-align: left; line-height: 1.3; }
.mrow { align-items: center; }
.mcheck { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.mcheck input { margin: 0; }
.mstart .btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== Consent & checks v6 (14 Oct 2026): steps in the order of work ===== */
.fflow { display: grid; gap: 12px; }
.fflow .ckpanel-h h2 { font-size: 16px; }
.fsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fstep { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.fstep.now { border: 1.5px solid color-mix(in srgb, var(--brand, var(--warn)) 55%, var(--line)); box-shadow: 0 2px 10px color-mix(in srgb, var(--brand, var(--warn)) 10%, transparent); }
.fstep.done { background: color-mix(in srgb, var(--ok) 4%, var(--surface)); }
.fstep.locked { background: var(--surface-2); }
.fstep-h { width: 100%; display: grid; grid-template-columns: 30px auto auto minmax(0, 1fr) 16px; align-items: center; gap: 12px; padding: 11px 14px; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.fnum { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 2px solid var(--line); color: var(--muted); background: var(--surface); }
.fstep.done .fnum { background: var(--ok); border-color: var(--ok); color: #fff; }
.fstep.now .fnum { border-color: var(--brand, var(--warn)); color: var(--brand, var(--warn)); }
.fstep.locked .fnum { font-size: 12px; border-style: dashed; }
.ftitle { font-size: 14.5px; font-weight: 700; }
.fstep.locked .ftitle, .fstep.done .ftitle { color: var(--ink-2); font-weight: 600; }
.ftag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; letter-spacing: .02em; }
.ftag.now { color: #fff; background: var(--brand, var(--warn)); }
.ftag.next { color: var(--ink-2); background: var(--surface-2); }
.ftag.locked { color: var(--muted); background: transparent; border: 1px dashed var(--line); }
.ftag.done { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.fsum { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcaret { color: var(--muted); font-size: 12px; }
.fbody { padding: 2px 14px 14px 56px; display: grid; gap: 10px; }
.fsub { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.fpaid { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.falert { --c: var(--bad); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--c) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); }
.falert.warn { --c: var(--warn); } .falert.info { --c: var(--info); }
.falert-i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; background: var(--c); flex: none; }
.fsummary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.fsum-ok { font-weight: 700; color: var(--ok); } .fsum-bad { font-weight: 700; color: var(--bad); }
.fsoon { margin-left: auto; cursor: help; }
.fbody .ctrk2 { grid-template-columns: minmax(110px, 160px) auto 1fr; }
@media (max-width: 700px) { .fstep-h { grid-template-columns: 28px 1fr auto 14px; } .fsum { grid-column: 2 / -1; } .fbody { padding-left: 14px; } }
.mrow .mname { min-width: 110px; font-size: 13.5px; }
.mrow .mcheck { margin-top: 0; font-size: 12.5px; }
.fmobile .todolist .qitem { padding: 7px 0; }

/* step tiles in a grid of 2 (14 Oct 2026) */
.fsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ftile .fstep-h { cursor: default; grid-template-columns: 30px auto auto minmax(0, 1fr); }
.ftile .fbody { padding: 0 14px 14px 14px; }
.ftile.locked .fbody { opacity: .55; pointer-events: none; }
.ftile.now { grid-row: span 2; }
@media (max-width: 900px) { .fsteps { grid-template-columns: 1fr; } .ftile.now { grid-row: auto; } }
/* alerts side by side, grid of 4 (14 Oct 2026) */
.falerts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.falerts .falert { min-width: 0; }
.falerts .falert .grow { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1000px) { .falerts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .falerts { grid-template-columns: 1fr; } }
/* up to 4 alerts per row, stretched to fill (14 Oct 2026) */
.falerts { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
@media (max-width: 1000px) { .falerts { grid-template-columns: repeat(min(var(--n, 2), 2), minmax(0, 1fr)); } }
@media (max-width: 600px) { .falerts { grid-template-columns: 1fr; } }

/* Shorter step tiles (RKPF 14 Oct 2026): tighter spacing, nothing removed */
.ftile .fstep-h { grid-template-columns: 28px auto auto minmax(0, 1fr) auto; gap: 10px; padding: 8px 12px; }
.ftile .fnum { width: 24px; height: 24px; font-size: 12px; }
.ftile .fbody { padding: 0 12px 10px 12px; gap: 8px; }
.ftile .ctrk2 { padding: 6px 12px; }
.ftile .todolist .qitem { padding: 6px 0; }
.ftile .mrow { padding: 5px 12px; border-top: 1px solid var(--line); border-bottom: 0; }
.fmhead { padding: 6px 12px 2px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
.fmhead + .mrow { border-top: 0; background: var(--surface-2); }
.fmhead ~ .mrow { background: var(--surface-2); }
.flink { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--ink-2); text-decoration: underline; cursor: pointer; white-space: nowrap; }
.ftxt { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.ftile.locked .rchips { gap: 6px; }

/* Checks grid: heading folds it (RKPF 14 Oct 2026) */
.rtoggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.rtoggle:focus-visible { outline: 2px solid var(--brand, var(--warn)); outline-offset: 3px; border-radius: 6px; }
.rcaret { color: var(--muted); font-size: 12px; width: 12px; }
.cresults:has(.rgrid[hidden]) .ckpanel-h { margin-bottom: 0; }
.cresults .rgrid[hidden] { display: none !important; } /* the grid's display:grid was overriding [hidden] */
/* Step tiles in a grid of 3 (RKPF 14 Oct 2026) */
.fsteps { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; }
@media (max-width: 1100px) { .fsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .fsteps { grid-template-columns: 1fr; } }
.fsteps .ftile.now { grid-row: auto; }
.ftile .ctrk2 { grid-template-columns: auto auto 1fr; gap: 8px; }
.ftile .ctrk2 .cg2-p { min-width: 0; }
.ftile .cnext-b { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ftile .cnext-b .btn, .ftile .mrow .btn { white-space: nowrap; }
.ftile .mrow .mname { min-width: 70px; }

/* Step tiles: packed (masonry) - rows of 4px, tiles span their height (see packTiles in app.js) */
.fsteps { grid-auto-rows: 4px; row-gap: 0; align-items: start; }
.fsteps > .ftile { margin-bottom: 12px; }
@media (max-width: 900px) { .fsteps { grid-auto-rows: auto; } .fsteps > .ftile { grid-row-end: auto !important; } }

.casebar .tabs { overflow-y: hidden; } /* no 1px vertical scroll on the tab row */
main { padding-bottom: 20px; } /* less empty space at the bottom so a page that fits does not scroll (14 Oct 2026) */
.views { overflow-y: hidden; } /* no 1px vertical scroll on the Cases view tabs (14 Oct 2026) */

/* Form tab: fits more on one screen (RKPF 14 Oct 2026) */
.pcard .qitem { padding: 6px 0; }
.pcard h2 { margin: 0; }
.padd { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.paddgrid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr; gap: 8px 12px; }
@media (max-width: 1000px) { .paddgrid { grid-template-columns: 1fr 1fr; } }
.fhead { gap: 8px 16px; align-items: center; }
.fhead h2 { margin: 0; }
@media (min-width: 1200px) {
  .fgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 12px; }
  .fgrid .ff.wide { grid-column: span 3; }
}
.fgrid .frow > input, .fgrid .frow > select { padding-top: 5px; padding-bottom: 5px; }
@media (min-width: 1200px) { .fgrid .ff.w2 { grid-column: span 2; } }
/* number boxes: no spinner arrows (they ate the space and cut the amount) - 14 Oct 2026 */
.fgrid input[type=number]::-webkit-outer-spin-button, .fgrid input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fgrid input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.famt { font-size: 11.5px; color: var(--muted); margin-top: 2px; min-height: 0; }

/* Floating writing box for long text boxes (end use, addresses) - 14 Oct 2026 */
.fpop-src { cursor: text; text-overflow: ellipsis; }
.fpop { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line-strong, var(--line)); border-radius: 12px; padding: 12px; display: grid; gap: 8px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,.25); }
.fpop-h { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fpop textarea { width: 100%; min-height: 110px; font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
/* Form: boxes pack into every gap (no half-empty rows) and the "with credit" note sits on the heading line - 14 Oct 2026 */
@media (min-width: 1200px) { .fgrid { grid-auto-flow: row dense; } }
.fhead .fnote { flex-basis: 100%; color: var(--ink-2); margin-top: -2px; }
.fhead .fnote { flex-basis: auto; margin-left: auto; color: var(--warn-ink, var(--ink-2)); }

/* RM: Decisions link in the header, Defer / waive on pending rows (14 Oct 2026) */
.tl-dec { margin-left: 8px; }
.prow-defer { font-size: 12px; color: var(--ink-2); text-decoration: underline; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; }
/* Product fit: the four boxes in ONE row on a laptop, so the whole fit shows without scrolling (RKPF 14 Oct 2026) */
@media (min-width: 1200px) {
  .swot { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .swot-q, .swot-q.w, .swot-q.o, .swot-q.t { padding: 10px; }
  .swot-sub { display: none; }
  .swot-d { font-size: 13px; line-height: 1.4; }
  .swot-q ol { gap: 6px; }
}
.fitsum-lead { font-size: 15px; }
/* Product fit heading: one line - chips shrink (full text on hover), the buttons never wrap (14 Oct 2026) */
.fitline { flex-wrap: nowrap; min-width: 0; }
.fitline > * { flex-shrink: 0; }
.fitline > .chip, .fitline > .small { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fitline > .fitline-other { flex-shrink: 3; min-width: 28px; }
.fitline > .grow { flex: 1 1 0; min-width: 0; }
.fitline-acts { display: inline-flex; gap: 6px; align-items: center; flex-shrink: 0; }
@media (max-width: 760px) { .fitline { flex-wrap: wrap; } }
/* Questions: tighter cards - fits one screen unless there are many (RKPF 14 Oct 2026) */
.qtab .qgrid > .card.question { padding: 10px 12px; }
.qtab .qsec { margin: 4px 0 2px; }
.qtab.stack { gap: 8px; }
.qfill { display: grid; gap: 6px; align-content: start; } .qfill .mm-head { margin: 0; } .qfill .qsec-sub { display: none; }

/* File & pending: long lists capped, "Show all" under them (14 Oct 2026) */
.capwrap > .dcol-list { max-height: 250px; overflow: auto; }
.capwrap > .msgprev { max-height: 240px; overflow: auto; }
.capwrap.open > .dcol-list, .capwrap.open > .msgprev { max-height: none; overflow: visible; }
.capwrap { position: relative; }
.capwrap.capped::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; pointer-events: none; background: linear-gradient(transparent, var(--surface)); border-radius: 0 0 var(--radius) var(--radius); }
.capmore { display: block; width: 100%; border: 0; background: none; padding: 4px 12px 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fg, var(--ink-2)); cursor: pointer; text-align: left; }
.capmore[hidden] { display: none; }

/* Case tabs look like buttons (RKPF 14 Oct 2026): outlined; the open tab is filled dark. Same row height as before. */
.casebar-row .tabs { gap: 6px; padding: 4px 2px; align-items: center; }
.casebar-row .tabs button { padding: 5px 12px; margin: 0; border: 1px solid var(--line-strong, var(--line)); border-radius: 8px; background: var(--surface);
  color: var(--ink-2); font-weight: 600; box-shadow: 0 1px 0 rgba(0,0,0,.04); transition: background .12s, border-color .12s, color .12s; }
.casebar-row .tabs button:hover { background: var(--surface-2); border-color: var(--ink-2); color: var(--ink); }
.casebar-row .tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.casebar-row .tabs button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.casebar-row .tabs button.on .count { background: color-mix(in srgb, var(--bg) 20%, transparent); border-color: transparent; color: var(--bg); }

/* Case header redesign (RKPF 14 Oct 2026): row 1 who + status; row 2 a calm strip - progress | journey | next step button | actions */
.card.casehead { padding: 12px 16px 10px; gap: 10px; }
.casehead-who h1 { font-size: 19px; letter-spacing: -.01em; }
.casehead-meta { color: var(--muted); }
.casehead-r2 { gap: 10px; padding: 8px 10px; margin: 0 -4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: nowrap; }
.casehead-prog { flex: 0 1 300px; min-width: 180px; border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.casehead-prog:hover strong { text-decoration: underline; }
.chp-top { display: flex; gap: 8px; align-items: baseline; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chp-top strong { font-size: 13.5px; }
.casehead-prog .bar { margin-top: 5px; height: 6px; }
.casehead-r2 .tl-strip { flex: 1 1 auto; min-width: 0; padding: 4px 10px; background: var(--surface); border-radius: 8px; overflow: hidden; white-space: nowrap; }
.casehead-next { flex: none; background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; padding: 6px 14px; white-space: nowrap; }
.casehead-next:hover { filter: brightness(1.05); }
.casehead-next-txt { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.casehead-next-txt.urgent { color: var(--brand); font-weight: 700; }
.casehead-r2 > .row { flex: none; flex-wrap: nowrap; gap: 6px; }
@media (max-width: 900px) { .casehead-r2 { flex-wrap: wrap; } .casehead-prog { flex-basis: 100%; } }
/* Timeline / Decisions as small buttons, same style as the case tabs (RKPF 14 Oct 2026) */
.tl-strip .tl-more { flex: none; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-strong, var(--line)); border-radius: 7px; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.tl-strip .tl-more:hover { background: var(--surface-2); border-color: var(--ink-2); color: var(--ink); }
.tl-strip .tl-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-strip .tl-more + .tl-more { margin-left: 6px; }
.tl-strip .tl-dec { margin-left: 6px; }

/* File & pending: the four boxes are the same height; "Show all" sits at the bottom of each (14 Oct 2026) */
.dcols { align-items: stretch; }
.dcol { display: flex; flex-direction: column; }
.dcol > .dcol-list { flex: 1 1 auto; }
.dcol > .dcol-more { margin-top: auto; }
.dcol-list > [hidden] { display: none !important; }
.dcol-list [hidden] { display: none !important; }

/* File & pending boxes: all open, same height, scroll inside (14 Oct 2026) */
.dcol > .dcol-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* Big window for an item with many files (14 Oct 2026) */
.dset .dset-panel { width: min(1400px, 96vw); height: 92vh; display: flex; flex-direction: column; }
.dset-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 0; border-top: 1px solid var(--line); }
.dset-list { overflow-y: auto; border-right: 1px solid var(--line); padding: 6px; display: grid; align-content: start; gap: 4px; background: var(--surface-2); }
.dset-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; text-align: left; border: 1px solid transparent; border-radius: 8px; background: var(--surface); padding: 7px 8px; cursor: pointer; font: inherit; color: var(--ink); }
.dset-item:hover { border-color: var(--line-strong, var(--line)); }
.dset-item.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.dset-item.bad .dset-n { background: var(--warn-soft, var(--surface-2)); color: var(--warn); }
.dset-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.dset-txt { min-width: 0; display: grid; gap: 2px; }
.dset-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.dset-prob { font-size: 12px; color: var(--warn); line-height: 1.35; }
.dset-item .chip { font-size: 10.5px; white-space: nowrap; }
.dset-view { min-width: 0; min-height: 0; display: flex; background: var(--surface); }
.dset-view iframe { flex: 1; width: 100%; height: 100%; border: 0; }
.dset-view .docviewer-img { flex: 1; overflow: auto; display: grid; place-items: center; }
.dset-view .docviewer-img img { max-width: 100%; }
.dset-empty { margin: auto; color: var(--muted); font-size: 14px; padding: 20px; text-align: center; }
@media (max-width: 800px) { .dset-body { grid-template-columns: 1fr; grid-template-rows: 35% 1fr; } .dset-list { border-right: 0; border-bottom: 1px solid var(--line); } }

/* While the AI reads: what the RM can do now + Snake (14 Oct 2026) */
.wtasks { display: grid; gap: 8px; }
.wtasks-h { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.wtasks-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .wtasks-row { grid-template-columns: 1fr 1fr; } }
.wtask { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 9px 10px; border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.wtask:hover { border-color: var(--info); background: color-mix(in srgb, var(--info) 5%, var(--surface)); }
.wtask-n { flex: none; min-width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--info); padding: 0 6px; }
.wtask.done .wtask-n { background: var(--ok); }
.wtask.done { opacity: .7; }
.wtask-t { display: grid; gap: 1px; min-width: 0; }
.wtask-t strong { font-size: 13.5px; }
.wtask-t span { font-size: 12px; color: var(--muted); }
.wsnake { justify-self: start; font-size: 12.5px; color: var(--ink-2); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.snake-panel { background: var(--surface); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; width: min(420px, 94vw); box-shadow: 0 20px 50px -10px rgba(0,0,0,.4); }
.snake-cv { width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; touch-action: none; }
.snake-score { font-size: 12.5px; color: var(--muted); margin-right: 8px; }
.snake-msg { min-height: 18px; font-size: 13px; font-weight: 600; text-align: center; }
.snake-done { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: var(--ok-soft, #e6f6ee); color: var(--ok); }
.snake-done[hidden] { display: none; }

/* Doability verdict in the case header (14 Oct 2026) */
.dv { --c: var(--info); display: flex; align-items: flex-start; gap: 8px; max-width: 520px; min-width: 0; text-align: left; padding: 6px 12px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.dv:hover { border-color: var(--c); }
.dv.ok { --c: var(--ok); } .dv.warn { --c: var(--warn); } .dv.bad { --c: var(--bad); } .dv.info { --c: var(--info); } .dv.wait { --c: var(--muted); }
.dv-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.dv.wait .dv-dot { animation: dvpulse 1.4s ease-in-out infinite; }
@keyframes dvpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dv.wait .dv-dot { animation: none; } }
.dv-txt { display: grid; gap: 1px; min-width: 0; }
.dv-txt strong { font-size: 13.5px; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-lbl { font-weight: 500; color: var(--ink-2); }
.dv-why { font-size: 12px; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.casebar-name .dv-dot { --c: var(--info); display: inline-block; width: 9px; height: 9px; margin: 0 6px 1px 0; vertical-align: middle; }
.casebar-name .dv-dot.ok { --c: var(--ok); } .casebar-name .dv-dot.warn { --c: var(--warn); } .casebar-name .dv-dot.bad { --c: var(--bad); } .casebar-name .dv-dot.wait { --c: var(--muted); }
@media (max-width: 760px) { .dv { max-width: 100%; flex-basis: 100%; } }
.casehead-r1 .casehead-who { flex: 0 0 auto; min-width: 0; }
.casehead-r1 .casehead-meta { flex-wrap: nowrap; white-space: nowrap; }
.casehead-r1 .dv { flex: 1 1 320px; max-width: 600px; margin: 0 auto; }
@media (max-width: 1100px) { .casehead-r1 .casehead-meta { flex-wrap: wrap; white-space: normal; } }

/* AI verdict v2 (14 Oct 2026): a button after the case name + the whole header tinted by the verdict */
.casehead-r1 .dv { display: none; }
.cw-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card.casehead.dvh { --c: var(--info); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); border-top: 4px solid var(--c);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, var(--surface)) 0, var(--surface) 70%); }
.card.casehead.dvh.ok { --c: var(--ok); } .card.casehead.dvh.warn { --c: var(--warn); } .card.casehead.dvh.bad { --c: var(--bad); } .card.casehead.dvh.info { --c: var(--info); } .card.casehead.dvh.wait { --c: var(--muted); }
.aiv { --c: var(--info); display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px; font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
  color: var(--c); background: var(--surface); border: 1.5px solid var(--c); }
.aiv:hover { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.aiv:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.aiv.ok, .aiv-pop.ok { --c: var(--ok); } .aiv.warn, .aiv-pop.warn { --c: var(--warn); } .aiv.bad, .aiv-pop.bad { --c: var(--bad); } .aiv.info, .aiv-pop.info { --c: var(--info); } .aiv.wait, .aiv-pop.wait { --c: var(--muted); }
.aiv .dv-dot, .aiv-word .dv-dot { width: 9px; height: 9px; margin: 0; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); border-radius: 50%; display: inline-block; }
.aiv.wait .dv-dot { animation: dvpulse 1.4s ease-in-out infinite; }
.aiv-pop { --c: var(--info); position: absolute; z-index: 70; width: min(420px, calc(100vw - 24px)); padding: 12px 14px; display: grid; gap: 6px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); border-top: 4px solid var(--c); border-radius: 12px; box-shadow: 0 14px 34px -10px rgba(0,0,0,.3); }
.aiv-word { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--c); }
.aiv-lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.aiv-lead { font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.casehead-r1 .casehead-chips { margin-left: auto; }

/* Available docs tab (14 Oct 2026) */
.avdocs { gap: 10px; }
.av-top { gap: 10px; align-items: center; }
.av-find { width: min(320px, 100%); }
.av-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .av-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .av-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .av-grid { grid-template-columns: 1fr; } }
.av-tile { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-top: 3px solid var(--sky); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.av-tile.muted { border-top-color: var(--line-strong, var(--line)); opacity: .85; }
.av-tile.av-none { opacity: .4; }
.av-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.av-n { font-weight: 800; color: var(--sky); }
.av-tile.muted .av-n { color: var(--muted); }
.av-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 6px; display: grid; align-content: start; gap: 2px; scrollbar-width: thin; }
.av-doc { display: grid; gap: 1px; text-align: left; padding: 6px 8px; border: 0; border-radius: 7px; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.av-doc:hover { background: var(--surface-2); }
.av-doc[hidden] { display: none; }
.av-name { font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.av-meta { font-size: 11.5px; color: var(--muted); }
.av-flag { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--warn); color: #fff; font-size: 11px; font-weight: 800; }
/* verdict tint all round the header, not only from the top (14 Oct 2026) */
.card.casehead.dvh { border: 2px solid color-mix(in srgb, var(--c) 60%, var(--line)); background: color-mix(in srgb, var(--c) 8%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent); }
@media (min-width: 1250px) { .av-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.av-exp { flex: none; padding: 3px 9px; font: inherit; font-size: 12px; font-weight: 700; color: var(--sky); background: var(--surface); border: 1px solid color-mix(in srgb, var(--sky) 45%, var(--line)); border-radius: 7px; cursor: pointer; white-space: nowrap; }
.av-exp:hover { background: color-mix(in srgb, var(--sky) 10%, var(--surface)); border-color: var(--sky); }
.av-tile.muted .av-exp { color: var(--ink-2); border-color: var(--line-strong, var(--line)); }
.av-head { gap: 8px; } .av-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.casehead.dvh { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.card.casehead.dvh.ok, .card.casehead.dvh.bad { background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
/* AI verdict in traffic-light colours only - red / yellow / green (RKPF 14 Oct 2026) */
:root { --tl-green: #16a34a; --tl-yellow: #eab308; --tl-yellow-ink: #a16207; --tl-red: #dc2626; }
.card.casehead.dvh.ok, .aiv.ok, .aiv-pop.ok, .casebar-name .dv-dot.ok { --c: var(--tl-green); }
.card.casehead.dvh.warn, .card.casehead.dvh.info, .aiv.warn, .aiv.info, .aiv-pop.warn, .aiv-pop.info, .casebar-name .dv-dot.warn, .casebar-name .dv-dot.info { --c: var(--tl-yellow); }
.card.casehead.dvh.bad, .aiv.bad, .aiv-pop.bad, .casebar-name .dv-dot.bad { --c: var(--tl-red); }
.aiv.warn, .aiv.info, .aiv-pop.warn .aiv-word, .aiv-pop.info .aiv-word { color: var(--tl-yellow-ink); }
.card.casehead.dvh { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.card.casehead.dvh.warn, .card.casehead.dvh.info { background: color-mix(in srgb, var(--tl-yellow) 13%, var(--surface)); }
/* Upload box made quiet so the AI-verdict header is the only coloured block (RKPF 14 Oct 2026); it lights up only while files are dragged over it */
.drop.addbar { border: 1.5px dashed var(--line-strong, var(--line)); background: var(--surface); }
.drop.addbar:hover { border-color: var(--ink-2); box-shadow: none; }
.drop.addbar .addbar-icon { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-strong, var(--line)); }
.drop.addbar.over { border-color: var(--accent); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--glow); }
.drop.addbar.over .addbar-icon { background: var(--accent); color: #fff; border-color: var(--accent); }
/* File & pending boxes made quiet so the AI-verdict header is the only coloured block (RKPF 14 Oct 2026):
   neutral heads; each box keeps a small coloured dot so the four stay easy to tell apart */
.dcol { border-top: 1px solid var(--line); }
.dcol-head { background: var(--surface-2); align-items: center; }
.dcol-title { color: var(--ink); display: flex; align-items: center; gap: 8px; }
.dcol-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex: none; }
.dcol-n { color: var(--ink-2); font-size: 16px; }
.dcol .prow-doc:hover { color: var(--ink); text-decoration: underline; }
/* File & pending boxes - middle ground (RKPF 14 Oct 2026): colour back, but softer than the verdict header -
   a thin coloured top edge, a faint tint in the head and the count as a coloured pill; titles stay dark */
.dcol { border-top: 3px solid color-mix(in srgb, var(--fg) 60%, var(--line)); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.dcol-head { background: color-mix(in srgb, var(--fg) 6%, var(--surface)); }
.dcol-title { color: var(--ink); }
.dcol-title::before { display: none; }
.dcol-n { font-size: 13px; font-weight: 800; color: var(--fg); background: color-mix(in srgb, var(--fg) 13%, var(--surface)); border-radius: 99px; padding: 3px 10px; line-height: 1.2; }
.dcol .prow-doc:hover { color: var(--fg); text-decoration: none; }

/* Smoother tab switches (14 Oct 2026): a short fade with a 4px rise; the tab buttons ease their colour */
.tabfade { animation: tabfade2 .14s ease-out; }
@keyframes tabfade2 { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tabfade { animation: none; } }
.casebar-row .tabs button { transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
/* Upload box: a light orange tinge - noticeable, but quieter than the verdict header (RKPF 14 Oct 2026) */
.drop.addbar { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.drop.addbar .addbar-icon { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.drop.addbar:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }

/* Consent & checks fits one screen for most cases (14 Oct 2026): a tile with many people / items scrolls inside
   instead of making the page longer; the "all clear" strip keeps the layout the same on every case */
.ftile .fbody { max-height: clamp(150px, calc(100vh - 430px), 360px); overflow-y: auto; scrollbar-width: thin; }
.falert.ok { --t: var(--ok); }
.falert.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); color: var(--ink-2); }
.falert.ok .falert-i { background: var(--ok); color: #fff; }
/* let the page scroll on once a box has reached its end (the boxes used to trap the mouse wheel) - 14 Oct 2026 */
.dcol > .dcol-list, .av-list, .ftile .fbody, .capwrap > .msgprev { overscroll-behavior: auto; }
/* Consent rows the same for every person (RKPF 14 Oct 2026): buttons always side by side; a long name shortens with "..." */
.ftile .ctrk2 { grid-template-columns: minmax(0, 1fr) auto auto; }
.ftile .ctrk2 .cg2-p { min-width: 0; overflow: hidden; }
.ftile .ctrk2 .cg2-p strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftile .cnext-b { flex-wrap: nowrap; }
.ftile .ctrk2-l { font-size: 12px; padding: 2px 8px; white-space: nowrap; }
.ftile .cnext-b .btn { padding-left: 10px; padding-right: 10px; }
/* No black buttons (RKPF 14 Oct 2026): main buttons and the open tab use a soft orange - clear, but not loud */
:root { --accent-text: #f2742b; }
:root[data-theme="light"] { --accent-text: #c2410c; }
.btn.primary { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); font-weight: 700; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: var(--accent); box-shadow: none; }
.btn.primary:disabled { opacity: .55; }
.casebar-row .tabs button.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.casebar-row .tabs button.on .count { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent-text); }

/* full-name floating label + more room for names in the consent rows (14 Oct 2026) */
.ftip { position: absolute; z-index: 90; max-width: 340px; padding: 6px 10px; border-radius: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong, var(--line));
  box-shadow: 0 8px 22px -8px rgba(0,0,0,.3); font-size: 13px; font-weight: 600; pointer-events: none; }
.ftip[hidden] { display: none; }
.ftile .ctrk2 { grid-template-columns: minmax(96px, 1fr) auto auto; gap: 6px; }
.ftile[data-key="consent"] .ctrk2-l.bad { display: none; } /* "Consent" (not taken) is already said by the tile and the buttons */
.ftile .ctrk2 .cg2-p { cursor: default; }
/* Open tab in calm indigo - not orange, so it never looks like the red / yellow / green verdict (RKPF 14 Oct 2026) */
:root { --tab-on: #818cf8; --tab-on-text: #a5b4fc; }
:root[data-theme="light"] { --tab-on: #4f46e5; --tab-on-text: #4338ca; }
.casebar-row .tabs button.on { background: color-mix(in srgb, var(--tab-on) 12%, var(--surface)); color: var(--tab-on-text); border-color: color-mix(in srgb, var(--tab-on) 55%, var(--line)); }
.casebar-row .tabs button.on .count { background: color-mix(in srgb, var(--tab-on) 20%, var(--surface)); color: var(--tab-on-text); }
.casebar-row .tabs button:focus-visible { outline-color: var(--tab-on); }
/* Indigo is the go-to colour for actions (RKPF 14 Oct 2026): main buttons, the open tab, the upload box, focus rings.
   Red / yellow / green stay for the AI verdict only; the orange stays only in the RK logo. */
:root { --go: var(--tab-on); --go-text: var(--tab-on-text); }
.btn.primary { background: color-mix(in srgb, var(--go) 13%, var(--surface)); color: var(--go-text); border-color: color-mix(in srgb, var(--go) 55%, var(--line)); }
.btn.primary:hover { background: color-mix(in srgb, var(--go) 21%, var(--surface)); border-color: var(--go); }
.drop.addbar { background: color-mix(in srgb, var(--go) 5%, var(--surface)); border-color: color-mix(in srgb, var(--go) 35%, var(--line)); }
.drop.addbar .addbar-icon { background: color-mix(in srgb, var(--go) 12%, var(--surface)); color: var(--go-text); border-color: color-mix(in srgb, var(--go) 30%, var(--line)); }
.drop.addbar:hover { border-color: color-mix(in srgb, var(--go) 60%, var(--line)); }
.drop.addbar.over { border-color: var(--go); background: color-mix(in srgb, var(--go) 12%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 25%, transparent); }
.drop.addbar.over .addbar-icon { background: var(--go); color: #fff; border-color: var(--go); }
.tl-strip .tl-more:focus-visible, .btn:focus-visible, .aiv:focus-visible { outline-color: var(--go); }
.wtask:hover { border-color: var(--go); background: color-mix(in srgb, var(--go) 5%, var(--surface)); }
.wtask-n { background: var(--go); }
.av-exp { color: var(--go-text); border-color: color-mix(in srgb, var(--go) 45%, var(--line)); }
.av-exp:hover { background: color-mix(in srgb, var(--go) 10%, var(--surface)); border-color: var(--go); }
.capmore { color: var(--go-text); }

.snake-earn { display: grid; gap: 8px; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--go) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--go) 35%, var(--line)); font-size: 13px; }
.snake-earn[hidden] { display: none; }
.wsnake-earned { justify-self: start; }

/* Case list: search in the views line; sortable / filterable column headings (14 Oct 2026) */
.views { align-items: center; }
.views-search { width: min(300px, 40vw); margin: 0 0 4px 8px; padding-top: 6px; padding-bottom: 6px; }
.views-clear { font-size: 12.5px; color: var(--go-text); background: none; border: 0; cursor: pointer; text-decoration: underline; white-space: nowrap; }
.thc { display: inline-flex; align-items: center; gap: 2px; }
.ths { border: 0; background: none; padding: 2px 4px; font: inherit; color: inherit; font-weight: inherit; cursor: pointer; border-radius: 6px; white-space: nowrap; }
.ths:hover, .ths.on { color: var(--go-text); }
.thf { border: 0; background: none; padding: 1px 5px; font-size: 11px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.thf:hover { background: var(--surface-2); color: var(--ink); }
.thf.on { color: #fff; background: var(--go); }
.thmenu { position: absolute; z-index: 80; width: 250px; max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong, var(--line)); border-radius: 10px;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.3); padding: 6px; display: grid; gap: 4px; }
.thmenu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.thmenu button:hover { background: var(--surface-2); }
.thmenu button.on { background: color-mix(in srgb, var(--go) 12%, var(--surface)); color: var(--go-text); font-weight: 600; }
.thmenu-sort { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.thmenu-h { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 6px 8px 2px; }
@media (max-width: 700px) { .views-search { width: 100%; margin: 6px 0; } }

/* Case list: name in a capsule coloured by the AI verdict (14 Oct 2026) */
.vcap { --c: var(--line-strong, var(--muted)); display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 3px 12px 3px 9px; border-radius: 99px; margin-bottom: 3px;
  border: 1.5px solid color-mix(in srgb, var(--c) 70%, var(--line)); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.vcap .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcap-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.vcap.ok { --c: var(--tl-green); } .vcap.warn { --c: var(--tl-yellow); } .vcap.bad { --c: var(--tl-red); } .vcap.wait { --c: var(--muted); }
.vcap.none { --c: var(--line-strong, var(--line)); background: var(--surface); }
.vcap.wait .vcap-dot { animation: dvpulse 1.4s ease-in-out infinite; }

.vword { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--c); white-space: nowrap; }
.vword::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.vword.ok { --c: var(--tl-green); } .vword.warn { --c: var(--tl-yellow-ink); } .vword.warn::before { background: var(--tl-yellow); } .vword.bad { --c: var(--tl-red); }

/* Withdraw from the case list: quiet until the row is hovered (14 Oct 2026) */
.wd-cell { width: 1%; white-space: nowrap; text-align: right; }
.wd-btn { border: 1px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 7px; cursor: pointer; opacity: 0; transition: opacity .12s; }
tr.r:hover .wd-btn, .wd-btn:focus-visible { opacity: 1; }
.wd-btn:hover { color: var(--tl-red); border-color: color-mix(in srgb, var(--tl-red) 40%, var(--line)); background: color-mix(in srgb, var(--tl-red) 6%, var(--surface)); }
@media (hover: none) { .wd-btn { opacity: 1; } }
/* Case list fits the screen width - no sideways scrolling (RKPF 14 Oct 2026): fixed column shares; long names shorten with "..." (full name on hover) */
.ctable.clist { table-layout: fixed; width: 100%; }
.clist th, .clist td { padding-left: 8px; padding-right: 8px; overflow: hidden; }
.clist .col-case { width: 27%; } .clist .col-verdict { width: 9%; } .clist .col-stage { width: 14%; } .clist .col-next { width: 14%; }
.clist .col-ready { width: 10%; } .clist .col-tat { width: 11%; } .clist .col-rm { width: 10%; } .clist .col-start { width: 8%; } .clist th.wd-cell { width: 76px; }
.clist .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; }
.clist .next { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clist .who > div { min-width: 0; }
.clist .vcap { max-width: 100%; }
.clist .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist .thc { max-width: 100%; }
.clist .ths { overflow: hidden; text-overflow: ellipsis; }
.clist td.wd-cell { text-align: right; padding-left: 0; }
@media (max-width: 1100px) { .clist .col-case { width: 34%; } .clist .col-verdict { width: 12%; } .clist .col-stage { width: 18%; } .clist .col-next { width: 20%; } .clist .col-tat { width: 16%; } }
.clist .who { display: flex; min-width: 0; } .clist .who > div { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.clist .vcap { display: flex; width: fit-content; max-width: 100%; box-sizing: border-box; } .clist .vcap .name { min-width: 0; flex: 1 1 auto; }
.clist .col-case { width: 33%; } .clist .col-stage { width: 16%; } .clist .col-tat { width: 13%; }
@media (max-width: 1100px) { .clist .col-case { width: 38%; } .clist .col-stage { width: 20%; } .clist .col-tat { width: 18%; } }
/* Withdraw always visible as a small outlined button (RKPF 14 Oct 2026) - red only on hover so the AI verdict stays the only red */
.wd-btn { opacity: 1; color: var(--ink-2); border: 1px solid var(--line-strong, var(--line)); background: var(--surface); }
/* Case list - Option A (RKPF 14 Oct 2026): compact rows, the AI verdict as a thin stripe on the left, plain names */
.clist tr.r { --vc: transparent; }
.clist tr.r.v-bad { --vc: var(--tl-red); } .clist tr.r.v-warn { --vc: var(--tl-yellow); } .clist tr.r.v-ok { --vc: var(--tl-green); } .clist tr.r.v-wait { --vc: var(--muted); } .clist tr.r.v-none { --vc: var(--line-strong, var(--line)); }
.clist tr.r td:first-child { box-shadow: inset 4px 0 0 var(--vc); padding-left: 14px; }
.clist tr.r td { padding-top: 7px; padding-bottom: 7px; }
.clist .who > .av { display: none; }
.clist .vcap { border: 0; background: none; padding: 0; margin: 0 0 1px; gap: 0; }
.clist .vcap-dot { display: none; }
.clist .vcap .name { font-weight: 600; font-size: 14px; color: var(--ink); }
.clist .sub { font-size: 12px; }
.clist .chip { font-size: 11.5px; }

.snake-ask { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--go) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--go) 35%, var(--line)); font-size: 13.5px; }
.wtask.later { cursor: default; opacity: .6; }
.wtask.later .wtask-n { background: var(--muted); }

/* Deferral / waiver as a ticked list for the RM (14 Oct 2026) */
.dp { display: grid; gap: 10px; }
.dp-group { display: grid; gap: 4px; }
.dp-h { font-size: 12px; font-weight: 700; color: var(--muted); }
.dp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 14px; }
.dp-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.dp-row:hover { background: var(--surface-2); }
.dp-row input { margin: 0; accent-color: var(--go); }
.dp-row.done { cursor: default; color: var(--muted); }
.dp-tick { width: 16px; text-align: center; color: var(--ok); font-weight: 800; }
.dp-form { gap: 8px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-form .grow { min-width: 220px; }
.dp-form [hidden] { display: none; }

/* One upload button with a small Files / Folder menu (14 Oct 2026) */
.upmenu { position: absolute; z-index: 85; width: 250px; padding: 6px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; box-shadow: 0 14px 34px -10px rgba(0,0,0,.3); }
.upmenu button { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; border: 0; background: none; padding: 8px; border-radius: 7px; font: inherit; color: var(--ink); cursor: pointer; }
.upmenu button:hover { background: color-mix(in srgb, var(--go) 8%, var(--surface)); }
.upmenu strong { display: block; font-size: 13.5px; }
.upm-s { display: block; font-size: 12px; color: var(--muted); }
.upm-i { font-size: 18px; line-height: 1.2; }

/* Deferral / waiver - one line per ticked document (14 Oct 2026) */
.dp-selwrap { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-sel { display: grid; gap: 6px; }
.dp-sel[hidden] { display: none; }
.dp-line { display: grid; grid-template-columns: minmax(180px, 1.2fr) auto auto minmax(200px, 2fr); gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.dp-doc { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-by { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.dp-seg { display: inline-flex; border: 1px solid var(--line-strong, var(--line)); border-radius: 8px; overflow: hidden; }
.dp-seg button { border: 0; background: var(--surface); padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.dp-seg button + button { border-left: 1px solid var(--line-strong, var(--line)); }
.dp-seg button.on { background: color-mix(in srgb, var(--go) 14%, var(--surface)); color: var(--go-text); font-weight: 700; }
.dp-due { display: inline-flex; gap: 6px; }
.dp-due[hidden] { display: none; }
.dp-due input, .dp-due select, .dp-reason { padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 1000px) { .dp-line { grid-template-columns: 1fr 1fr; } .dp-doc, .dp-reason { grid-column: 1 / -1; } }

/* RM changes in one card for credit; withdrawal waiting for the BM (14 Oct 2026) */
.rmedits { display: grid; gap: 8px; }
.rme-row { display: flex; gap: 10px; align-items: flex-start; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.wreq { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--tl-yellow) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tl-yellow) 55%, var(--line)); }

.cteam { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 4px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.cteam-u { display: inline-flex; gap: 10px; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.cteam-u.away { background: var(--surface-2); opacity: .75; }
.cteam-l { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--ink-2); }
.cteam-l input { accent-color: var(--go); margin: 0; }

/* Credit desk tiles (CM, 14 Oct 2026) */
.desk-agency { padding-bottom: 10px; }
.xtgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .xtgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .xtgrid { grid-template-columns: 1fr; grid-auto-rows: auto !important; } }
.xt { min-width: 0; overflow: auto; overscroll-behavior: auto; scrollbar-width: thin; margin: 0; }
.xt .xt-exp { margin-left: auto; flex: none; }
.xt-head { position: sticky; top: 0; }
.xtview .xtview-panel { width: min(1300px, 96vw); height: 92vh; display: flex; flex-direction: column; }
.xtview-body { flex: 1; min-height: 0; overflow: auto; padding: 14px; }
.xt.xt-open { overflow: visible; height: auto; border: 0; box-shadow: none; }
.xt.xt-open .xt-exp { display: none; }
/* CAM reader (CM, 14 Oct 2026) */
.cam-read { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 12px; min-height: 320px; }
.cam-nav { display: grid; align-content: start; gap: 3px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cam-nav button { display: flex; gap: 8px; align-items: center; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.cam-nav button:hover { background: var(--surface-2); color: var(--ink); }
.cam-nav button.on { background: color-mix(in srgb, var(--go) 12%, var(--surface)); color: var(--go-text); font-weight: 700; }
.cam-n { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--ink-2); }
.cam-nav button.on .cam-n { background: var(--go); color: #fff; }
.cam-all { margin-top: 6px; border-top: 1px solid var(--line) !important; border-radius: 0 !important; justify-content: center; font-weight: 600; color: var(--go-text) !important; }
.cam-pane { min-width: 0; overflow-y: auto; scrollbar-width: thin; display: grid; gap: 12px; align-content: start; }
.cam-read .cam-sec { display: none; margin: 0; }
.cam-read .cam-sec.cam-on { display: block; }
.cam-showall .cam-read { height: auto !important; }
.cam-showall .cam-pane { overflow: visible; }
@media (max-width: 800px) { .cam-read { grid-template-columns: 1fr; height: auto !important; } .cam-nav { grid-auto-flow: column; overflow-x: auto; } .cam-pane { overflow: visible; } }
@media print { .cam-nav { display: none !important; } .cam-read { display: block; height: auto !important; } .cam-pane { overflow: visible; } .cam-read .cam-sec { display: block !important; } }
.agrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.agrid > * { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
@media (max-width: 1100px) { .agrid { grid-template-columns: 1fr 1fr; } }

/* short tab names when the bar is full; tile / agency headings get their own line (CM, 14 Oct 2026) */
.tabs .tab-short { display: none; }
.tabs.short .tab-long { display: none; }
.tabs.short .tab-short { display: inline; }
.tabs.short button { padding-left: 9px; padding-right: 9px; }
.xt > .row:first-child { flex-wrap: wrap; gap: 6px; }
.xt > .row:first-child > h2, .xt > .row:first-child > h3 { flex: 1 1 100%; font-size: 15px; }
.xt > .row:first-child .xt-exp { margin-left: auto; }
.agrid > .crow { display: grid; grid-template-columns: 1fr auto !important; gap: 6px; align-items: center; }
.agrid > .crow > div:first-child { grid-column: 1 / -1; }

/* Questions for credit in columns (14 Oct 2026) */
.qcols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; min-height: 320px; }
.qcol { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.qcol > h3.qsec { margin: 0; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.qcol > h3.qsec .qsec-sub { flex-basis: 100%; margin: 2px 0 0; }
.qcol-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: grid; gap: 8px; align-content: start; scrollbar-width: thin; }
.qcol-body .qgrid { grid-template-columns: 1fr !important; }
.qcol-body .card.question { margin: 0; }
/* CAM top card compact; policy table scrolls inside (CM, 14 Oct 2026) */
.cam-top > .row select { width: auto; flex: none; max-width: 260px; }
.cam-top > .row > .grow { min-width: 240px; }
.cam-top .kpi { padding: 8px 10px; }
.cam-top .kpi .v { font-size: 16px !important; }
.cam-top .kpi .l { font-size: 11.5px; }
.fitcard > .scrollx { overflow: auto; scrollbar-width: thin; }
.fitcard > .scrollx thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
/* Decisions in two columns (14 Oct 2026) */
.decgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; align-items: start; }
.decside { overflow-y: auto; scrollbar-width: thin; border-radius: var(--radius); }
.decside > .card { margin: 0; }
@media (max-width: 1000px) { .decgrid { grid-template-columns: 1fr; } }

.uw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.uw-chips .chip { cursor: help; }
.uw-docs { display: grid; gap: 6px; }
.uw-chips > .uw-chips { display: contents; } .uw-chips > .uw-chips[hidden] { display: none; }

/* Credit Product fit: the same 4 boxes as the RM, No-go and Deviations first, 4 in a row (RKPF 15 Oct 2026) */
@media (min-width: 900px) {
  .swot.swot-cm { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border: 0; border-radius: 0; overflow: visible; }
  .swot.swot-cm .swot-q { padding: 10px; border: 0; }
  .swot.swot-cm .swot-sub { display: none; }
}
.swot-pc { display: grid; gap: 2px; font-size: 13px; line-height: 1.4; }
.swot-pc > div { display: flex; gap: 6px; align-items: baseline; }
@media (min-width: 900px) {
  .swot.swot-cm .swot-q.wide { grid-column: span 2; }
  .swot.swot-cm .swot-q.wide ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 3 tiles (credit has no KYC tile, RKPF 15 Oct 2026) */
@media (min-width: 1101px) { .dcols.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* KYC check for Ops (RKPF 15 Oct 2026) */
.kycgate.bad { border-left: 3px solid var(--tl-red); }
.kycgate.warn { border-left: 3px solid var(--tl-yellow); }
.kycgate.ok { border-left: 3px solid var(--tl-green); }

/* Long pending lists (RKPF 15 Oct 2026): one compact line per document, the explanation in a floating card */
.dcol .prow { padding: 5px 0; }
.dcol .prow-doc { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; }
.dcol .prow-doc::before { top: 50%; transform: translateY(-50%); }
.dcol .prow-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcol .prow-doc .typechip, .dcol .prow-doc .whochip { flex: none; }
.dcol .prow.open { background: color-mix(in srgb, var(--go) 8%, transparent); border-radius: 6px; }
.dcol .prow.open .prow-doc::before { transform: translateY(-50%) rotate(90deg); }
.rowpop { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15,23,42,.18); padding: 10px 12px; max-height: min(70vh, 520px); overflow: auto; }
.rowpop-h { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.rowpop-h strong { flex: 1; font-size: 14px; line-height: 1.35; }
.rowpop-b { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.rowpop-b > .prow-why { flex: 1 1 100%; color: var(--ink-2); line-height: 1.45; }
.rowpop-b > .prow-more { flex: 1 1 100%; margin: 0; }
.rowpop-b > .prow-more.hidden { display: none; }

/* Credit: password box beside the upload bar, one line (RKPF 15 Oct 2026) */
.addrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.addrow > .drop { margin: 0; }
.pwbox { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border: 1px dashed color-mix(in srgb, var(--tl-yellow) 70%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--tl-yellow) 7%, var(--surface)); }
.pwbox .addbar-icon { flex: none; }
.pwlist { display: grid; gap: 6px; margin-top: 6px; max-height: 96px; overflow-y: auto; scrollbar-width: thin; }
.pwrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pwrow-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pwrow input { width: 130px; flex: none; padding: 4px 8px; font-size: 13px; }
@media (max-width: 900px) { .addrow { grid-template-columns: 1fr; } }

/* password box: fixed height, list in a window (RKPF 15 Oct 2026) */
.pwbox { align-items: center; }
.pwnames { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.pwlist-big { max-height: 60vh; gap: 8px; margin-top: 4px; }
.pwlist-big .pwrow { padding: 6px 0; border-bottom: 1px solid var(--line); }
.pwlist-big .pwrow input { width: 180px; }

/* Credit: + Add on each pending box, drag documents between boxes (RKPF 15 Oct 2026) */
.dcol-acts { display: flex; align-items: center; gap: 8px; }
.dcol-add { padding: 2px 9px; font-size: 12px; }
.dcol .prow[draggable="true"] { cursor: grab; }
.dcol .prow.dragging { opacity: .45; }
.dcol.dropon { outline: 2px dashed var(--go); outline-offset: 2px; }
.cmchip { background: color-mix(in srgb, var(--go) 12%, var(--surface)); color: var(--tab-on, var(--go)); border-color: transparent; }
.cmmatch { border: 1px solid color-mix(in srgb, var(--tl-yellow) 60%, var(--line)); background: color-mix(in srgb, var(--tl-yellow) 8%, var(--surface)); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }

.pwrow input.pwbad { border-color: var(--tl-red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tl-red) 20%, transparent); }

/* Add-a-document window (RKPF 15 Oct 2026) */
.ad-sheet .panel { display: flex; flex-direction: column; gap: 18px; }
.ad-head { display: flex; gap: 14px; align-items: flex-start; margin-top: -8px; }
.ad-head h2 { margin: 0 0 2px; font-size: 19px; }
.ad-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--tab-on, var(--go)); background: color-mix(in srgb, var(--go) 12%, var(--surface)); }
.ad-sec { display: flex; flex-direction: column; gap: 8px; }
.ad-lbl { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); }
.ad-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ad-in { width: 100%; box-sizing: border-box; font-size: 15px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); resize: vertical; }
.ad-in:focus { outline: none; border-color: var(--go); box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 18%, transparent); }
.ad-in.ad-need { border-color: var(--tl-red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tl-red) 15%, transparent); }
.ad-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ad-opt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.ad-opt:hover { border-color: color-mix(in srgb, var(--fg) 60%, var(--line)); }
.ad-opt.on { border-color: var(--fg); background: color-mix(in srgb, var(--fg) 14%, var(--surface)); box-shadow: 0 0 0 1px var(--fg) inset; }
.ad-opt strong { display: block; font-size: 13.5px; color: var(--ink); }
.ad-opt small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.ad-opt em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); border-radius: 99px; padding: 1px 8px; }
.ad-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--fg); }
.ad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-chip { font-size: 12.5px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.ad-chip:hover { border-color: var(--go); color: var(--tab-on, var(--go)); background: color-mix(in srgb, var(--go) 8%, var(--surface)); }
.ad-match { border: 1px solid color-mix(in srgb, var(--tl-yellow) 70%, var(--line)); background: color-mix(in srgb, var(--tl-yellow) 9%, var(--surface)); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; font-size: 13.5px; }
.ad-match-h { display: flex; gap: 10px; align-items: flex-start; }
.ad-match-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--tl-yellow); }
.ad-match-doc { font-weight: 600; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-where { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; color: var(--ink-2); border: 1px solid var(--fg); }
.ad-match-q { font-weight: 600; }
.ad-match-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-match.ad-pulse { animation: adPulse .5s ease 2; }
@keyframes adPulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tl-yellow) 35%, transparent); } }
.ad-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: auto; }
.ad-go { min-width: 190px; }
@media (max-width: 600px) { .ad-seg { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ad-match.ad-pulse { animation: none; } }
.ad-foot { position: sticky; bottom: -16px; background: var(--surface); padding-bottom: 6px; z-index: 2; }
.ad-opt { padding: 10px; gap: 8px; }
.ad-opt strong { white-space: nowrap; }
.ad-opt > span:nth-child(2) { min-width: 0; }
.ad-match[hidden] { display: none; }
.ftog-yn { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; } .ftog-yn .btn { padding: 2px 12px; }

/* Case brief for credit (RKPF 15 Oct 2026) - verdict colours are the traffic lights (AI verdict only) */
.brief { gap: 10px; }
.brief-v { border-left: 4px solid var(--vc, var(--line)); border-radius: 0 var(--radius) var(--radius) 0; display: grid; gap: 6px; }
.brief-v.go { --vc: var(--tl-green); } .brief-v.goif { --vc: var(--tl-yellow); } .brief-v.stop { --vc: var(--tl-red); } .brief-v.cant { --vc: #2563eb; }
.brief-pill { font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 99px; color: var(--vc); background: color-mix(in srgb, var(--vc) 13%, var(--surface)); white-space: nowrap; }
.brief-v.goif .brief-pill { color: var(--tl-yellow-ink, #a16207); }
.brief-line { font-size: 17px; }
.brief-why { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.brief-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.brief-nums > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 2px; }
.brief-nums span { font-size: 12px; color: var(--muted); }
.brief-nums strong { font-size: 21px; }
.brief-q { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.brief-q:first-of-type { border-top: 0; }
.brief-qt { font-weight: 600; }
.brief-out { font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.brief-cond { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.brief-qa { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.brief-rt { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.brief-rt.file { color: #15803d; background: color-mix(in srgb, #16a34a 12%, var(--surface)); }
.brief-rt.otp { color: #1d4ed8; background: color-mix(in srgb, #2563eb 12%, var(--surface)); }
.brief-rt.call { color: var(--tab-on, #4338ca); background: color-mix(in srgb, var(--go) 12%, var(--surface)); }
.brief-rt.locked, .brief-rt.visit { color: #a16207; background: color-mix(in srgb, #eab308 15%, var(--surface)); }
.brief-rt.none { color: #b91c1c; background: color-mix(in srgb, #dc2626 12%, var(--surface)); }
.brief-settled { font-size: 12.5px; color: #15803d; font-weight: 600; }
.brief-later { font-size: 13.5px; color: var(--ink-2); padding: 10px 14px; }
.brief-stale { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 13.5px; padding: 8px 12px; border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--go) 50%, var(--line)); background: color-mix(in srgb, var(--go) 6%, var(--surface)); }
.brief-acts { gap: 8px; align-items: center; padding-top: 4px; }
@media (max-width: 760px) { .brief-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .brief-q { grid-template-columns: 1fr; } .brief-qa { align-items: flex-start; flex-direction: row; } }

.brief-wait { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.brief-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--go) 25%, transparent); border-top-color: var(--go); animation: briefSpin .9s linear infinite; flex: none; }
@keyframes briefSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .brief-spin { animation: none; } }
.brief-less { font-style: normal; font-size: 11.5px; color: var(--tl-yellow-ink, #a16207); }

/* Brief on one page (RKPF 15 Oct 2026) */
.brief { gap: 8px; }
.brief-v { padding: 12px 16px; gap: 6px; }
.brief-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brief-line { font-size: 16px; line-height: 1.3; }
.brief-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.brief-why { font-size: 13.5px; line-height: 1.45; }
.brief-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.brief-nums > div { background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; }
.brief-nums > div:first-child { border-left: 0; padding-left: 0; }
.brief-nums span { font-size: 12px; color: var(--muted); flex-basis: 100%; }
.brief-nums strong { font-size: 19px; }
.brief-less { font-size: 11.5px; }
.brief-dh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.brief-qs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.brief-qs.n1 { grid-template-columns: minmax(0, 1fr); } .brief-qs.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brief-q { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.brief-q.done { background: color-mix(in srgb, #16a34a 4%, var(--surface)); }
.brief-qh { display: flex; align-items: center; gap: 8px; }
.brief-qh .btn { padding: 2px 10px; font-size: 12px; }
.brief-qt { font-weight: 600; font-size: 14px; line-height: 1.35; }
.brief-how { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.brief-out { font-size: 12.5px; line-height: 1.4; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.brief-later { font-size: 13px; color: var(--ink-2); padding: 2px 2px; }
@media (max-width: 1000px) { .brief-qs, .brief-qs.n2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .brief-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; } .brief-nums > div:nth-child(3) { border-left: 0; padding-left: 0; } }
.brief-q, .brief-q > * { text-align: left; align-items: stretch; }
.brief-q > .brief-qh { display: flex; align-items: center; justify-content: flex-start; }
.brief-qh > .grow { flex: 1 1 auto; }

/* Q&A column Expand (RKPF 15 Oct 2026) */
h3.qsec .qcol-x { margin-left: auto; font-size: 12px; font-weight: 600; }
.qcol-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .38); z-index: 69; }
.qcol.big { position: fixed; inset: 28px max(28px, calc((100vw - 980px) / 2)); z-index: 70; height: auto !important; max-height: none; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); display: flex; flex-direction: column; }
.qcol.big > .qcol-body { flex: 1 1 auto; overflow-y: auto; }
.qcol.big .qgrid { grid-template-columns: minmax(0, 1fr); }
.qcol.big .qcol-body { font-size: 15px; }
.qcol > h3.qsec .qsec-sub { flex-basis: 100%; }

/* Questions: the documents a question was framed from (RKPF 16 Oct 2026) - a quiet row of chips under the question */
.qsrc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; }
.qsrc-l { font-size: 11.5px; color: var(--muted); margin-right: 2px; }
.qsrc-c { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; max-width: 260px; padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; text-align: left; font: inherit; }
.qsrc-c:hover { border-color: var(--accent); background: var(--surface); }
.qsrc-d { font-size: 12px; font-weight: 600; color: var(--accent); }
.qsrc-s { font-size: 11.5px; color: var(--ink-2); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

/* CM opinions on analysers + Lessons (RKPF 16 Oct 2026) */
.op-box { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; display: grid; gap: 6px; }
.op-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 9px; display: grid; gap: 4px; background: var(--surface); }
.op-row.sev-high { border-left: 3px solid var(--bad); } .op-row.sev-medium { border-left: 3px solid var(--warn); }
.op-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-btns { display: inline-flex; gap: 6px; } .op-mine { font-size: 12px; color: var(--ink-2); }
.op-detail { color: var(--ink-2); line-height: 1.4; }
.op-why { display: grid; gap: 6px; } .op-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.chipbtn:hover { border-color: var(--accent); color: var(--accent); }
.op-contra { font-size: 12px; color: var(--bad); }
.op-low summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.op-q { display: grid; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.les-ops { display: grid; gap: 4px; border-left: 2px solid var(--line); padding-left: 8px; }
/* review rows in narrow cards: the check name keeps a readable width, the buttons wrap below */
.op-head > strong { flex: 1 1 150px; min-width: 150px; line-height: 1.3; }
.op-head .op-btns, .op-head .op-mine { margin-left: auto; }

/* Readable CAM (RKPF 20 Oct 2026, A-E): one verdict line, 4 key figures, three reading depths, exceptions first, short points */
.cam-vline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.cam-vline strong { font-size: 15.5px; }
.cam-vline.ok { background: var(--mint-bg); border-color: color-mix(in srgb, var(--mint) 35%, transparent); }
.cam-vline.warn { background: var(--butter-bg); border-color: color-mix(in srgb, var(--butter) 35%, transparent); }
.cam-vline.bad { background: var(--rose-bg); border-color: color-mix(in srgb, var(--rose) 35%, transparent); }
.cam-k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cam-k4 .kpi .l { font-size: 12px; color: var(--muted); }
.cam-k4 .kpi .v { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cam-depth .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.cam-depth .seg button { border: 0; background: var(--surface); padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.cam-depth .seg button.on { background: color-mix(in srgb, var(--go, #4f46e5) 14%, var(--surface)); color: var(--go-text, #3730a3); font-weight: 650; }
.cam-lines { padding: 4px; }
.cam-line { display: grid; grid-template-columns: 12px minmax(140px, 220px) minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 10px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.cam-lines > .cam-line:first-child { border-top: 0; }
.cam-line:hover, .cam-line.on { background: var(--surface-2); }
.cam-lt { font-weight: 600; }
.cam-lf { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cam-lbody { padding: 4px 8px 12px 30px; }
.cam-lbody > .cam-sec { border: 0; box-shadow: none; padding: 0; }
.cam-lbody > .cam-sec > summary { display: none; }
.cam-fold td { background: var(--surface-2); color: var(--muted); font-size: 12.5px; }
.cam-yi { display: inline-flex; margin-left: 6px; font-size: 11px; padding: 0 7px; border-radius: 10px; background: var(--sky-bg); color: var(--sky); font-weight: 600; vertical-align: middle; }
.cam-short { line-height: 1.6; }
.cam-short b { font-weight: 650; }
.cam-morebtn { font-size: 12px; }
.cam .cam-ul li { line-height: 1.6; margin: 3px 0; }

.cam .cam-kv { line-height: 1.55; }

.cam-t td.mono, .cam-t td.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .cam-k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cam-line { grid-template-columns: 12px minmax(0, 1fr) auto; } .cam-lf { grid-column: 2 / 4; } }

/* CAM top band + decision worksheet (RKPF 20 Oct 2026) */
.cam-band { display: grid; gap: 6px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.cam-band.ok { background: var(--mint-bg); border-color: color-mix(in srgb, var(--mint) 35%, transparent); }
.cam-band.warn { background: var(--butter-bg); border-color: color-mix(in srgb, var(--butter) 35%, transparent); }
.cam-band.bad { background: var(--rose-bg); border-color: color-mix(in srgb, var(--rose) 35%, transparent); }
.cam-band-v { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cam-band-v strong { font-size: 15.5px; }
.cam-band-f { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; font-size: 13.5px; }
.cam-fig b { font-variant-numeric: tabular-nums; }
.cam-ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.cam-ws { padding: 0; overflow: hidden; }
.cam-ws-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cam-ws-head h2 { margin: 0; font-size: 15px; }
.ws-prog { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.ws-track { width: 130px; height: 7px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.ws-track i { display: block; height: 100%; background: var(--go, #4f46e5); }
.ws-item { border-bottom: 1px solid var(--line); }
.ws-h { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; width: 100%; padding: 11px 16px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.ws-h:hover { background: var(--surface-2); }
.ws-t { font-weight: 550; line-height: 1.45; }
.ws-item.done .ws-t { color: var(--muted); font-weight: 500; }
.ws-k { font-size: 11px; font-weight: 650; border-radius: 5px; padding: 1px 6px; margin-right: 7px; background: var(--surface-2); color: var(--muted); }
.ws-k.nogo { background: var(--rose-bg); color: var(--rose); } .ws-k.deviation, .ws-k.risk { background: var(--butter-bg); color: var(--butter); } .ws-k.question { background: var(--sky-bg); color: var(--sky); }
.ws-src { font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 4px; padding: 0 6px; margin-left: 6px; white-space: nowrap; font-weight: 500; }
.ws-f { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; max-width: 260px; text-align: right; }
.ws-state { font-size: 12px; font-weight: 600; border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.ws-state.open { background: var(--surface-2); color: var(--muted); } .ws-state.done { background: var(--mint-bg); color: var(--mint); } .ws-state.ask { background: var(--sky-bg); color: var(--sky); }
.ws-b { display: grid; gap: 10px; padding: 0 16px 14px 38px; }
.ws-facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 4px 12px; font-size: 14px; line-height: 1.55; }
.ws-facts .k { color: var(--muted); }
.ws-detail { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.ws-note { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13.5px; resize: vertical; background: var(--surface); }
.ws-err { color: var(--rose); font-size: 12.5px; }
.ws-answer { display: grid; gap: 4px; background: var(--mint-bg); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; justify-items: start; }
.ws-answer.ask { background: var(--sky-bg); }
.ws-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.cam-ws-side { display: grid; gap: 12px; position: sticky; top: 64px; }
.ws-side { padding: 12px 14px; }
.ws-side h3 { margin: 0 0 6px; font-size: 13px; }
@media (max-width: 1100px) { .cam-ws-grid { grid-template-columns: 1fr; } .cam-ws-side { position: static; } }
@media (max-width: 700px) { .ws-h { grid-template-columns: 10px minmax(0, 1fr) auto; } .ws-f { grid-column: 2 / 4; text-align: left; } .ws-b { padding-left: 16px; } .ws-facts { grid-template-columns: 1fr; } }
.ws-group { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 16px 5px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 650; color: var(--ink-2); }

/* The full CAM as one document (RKPF 20 Oct 2026): sticky section bar, page scroll only, two-column fields on wide screens */
.cam-toc { position: sticky; top: 0; z-index: 15; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--line); } /* wraps - no scrollbar of its own */
.cam-toc button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 3px 10px; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.cam-toc button:hover { background: var(--surface-2); }
.cam-toc button.on { background: color-mix(in srgb, var(--go, #4f46e5) 12%, var(--surface)); border-color: color-mix(in srgb, var(--go, #4f46e5) 40%, transparent); color: var(--go-text, #3730a3); font-weight: 650; }
.cam-full > .cam-sec { padding: 16px 18px; }
.cam-full > .cam-sec > summary h2 { font-size: 16px; }
@media (min-width: 1200px) { .cam-full .cam-kv { grid-template-columns: minmax(140px, 210px) minmax(0, 1fr) minmax(140px, 210px) minmax(0, 1fr); gap: 8px 18px; } }
.brief-later .cam-ul { margin-top: 4px; }
@media print { .cam-toc { display: none !important; } }

/* existing loans - one block per loan (RKPF 20 Oct 2026) */
.loan-list { display: grid; gap: 8px; }
.loan-sum { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--ink-2); padding: 2px 0 4px; }
.loan { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; background: var(--surface); }
.loan-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.loan-h strong { font-size: 14px; }
.loan-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px 10px; } /* all nine figures on one line on a laptop; labels never cut */
.loan-l { font-size: 11.5px; color: var(--muted); }
.loan-v { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.loan-r { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.nowrap { white-space: nowrap; }

/* the 22-point full-CAM list (RKPF 20 Oct 2026) */
.cam .cam-click { border-bottom-color: transparent; } /* item 3: the edit underline only on hover */
.cam .cam-click:hover { border-bottom-color: var(--line-strong); }
.cam-miss { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); padding-top: 2px; } /* item 4 */
.cam-miss-i { white-space: nowrap; }
.cam-kv .k.wide { grid-column: 1; } .cam-kv .v.wide { grid-column: 2 / -1; } /* item 11: long values full width */
.cam-kv .kv-sub { grid-column: 1 / -1; font-size: 12px; font-weight: 650; color: var(--ink-2); text-transform: none; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.cam-kv .kv-sub:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.cam-full .cam-kv.one, .cam-kv.one { grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); } /* item 17 */
.cam-sline { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 2px; } /* item 8 */
.cam-calc-end { font-size: 13.5px; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; } /* item 10 */
.cam-full .cam-sec[data-sec="elig"] .cam-t { max-width: 760px; }
.hyg-ok { display: grid; gap: 4px; } .hyg-ok-i { font-size: 13px; line-height: 1.5; } .hyg-tick { color: var(--mint); font-weight: 700; margin-right: 6px; } /* item 13 */
.need-groups { display: grid; gap: 8px; } .need-gt { font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 4px; } /* item 18 */
.need-chips { display: flex; flex-wrap: wrap; gap: 6px; } .need-wrap { display: contents; }
.need-chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 16px; padding: 2px 10px; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; text-align: left; }
.need-chip.on { background: var(--surface-2); border-color: var(--ink-2); }
.need-full { flex-basis: 100%; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); padding: 4px 2px; }
.cam-reco { display: grid; gap: 2px; padding: 8px 12px; border-left: 3px solid var(--butter); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 13.5px; } /* item 1 */
.cam-reco-l { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.brief-lines .brief-line { border-top: 1px solid var(--line); padding: 8px 14px; } /* item 22 */
.brief-line > summary { cursor: pointer; font-weight: 550; list-style: none; }
.brief-line > summary::-webkit-details-marker { display: none; }
.brief-line[open] > summary { margin-bottom: 6px; }
.brief-line .brief-how, .brief-line .brief-out { font-size: 13px; margin: 2px 0 0 4px; }

/* Front-end review batch 1 (RKPF 20 Oct 2026) - credit's screens only (.cm-side) */
/* item 34: boxes grow with their content; only the page scrolls */
.cm-side .dcol > .dcol-list { overflow: visible; height: auto !important; }
.cm-side .qcols { height: auto !important; align-items: start; }
.cm-side .qcol { overflow: visible; }
.cm-side .qcol-body { overflow: visible; }
.cm-side .ftile .fbody { max-height: none; overflow: visible; }
.cm-side .ftile .ctrk2 .cg2-p { overflow: visible; }
.cm-side .cg2-p strong, .cm-side .cg2-p span { white-space: normal; overflow: visible; text-overflow: clip; }
.cm-side .av-grid { grid-auto-rows: auto !important; align-items: start; }
.cm-side .av-tile { overflow: visible; }
.cm-side .av-list { overflow: visible; }
.cm-side .decside { max-height: none !important; overflow: visible; }
.cm-side .fitcard > .scrollx { max-height: none !important; }
/* item 27: desk tiles - a summary (no scrolling inside), "Expand" opens the full page */
.cm-side .xtgrid { grid-auto-rows: auto !important; align-items: start; }
.cm-side .xt:not(.xt-open) { overflow: hidden; max-height: 280px; position: relative; }
.cm-side .xt:not(.xt-open)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
/* item 6: slim case header for credit - one line; "Details" opens the rest */
.cm-head.slim .casehead-r2 { display: none !important; }
.cm-head.slim { padding-top: 8px; padding-bottom: 8px; }
.headtoggle { margin-left: 4px; }
/* item 9: "More" tabs */
.tabmore-wrap { position: relative; display: inline-flex; }
.tabmore { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.tabmore-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; min-width: 180px; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .15); }
.tabmore-menu button { display: flex; justify-content: space-between; gap: 10px; border: 0; background: none; padding: 7px 10px; border-radius: 7px; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.tabmore-menu button:hover { background: var(--surface-2); }

/* Front-end review batch 2 (RKPF 20 Oct 2026): the case list for credit */
.quickf { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.quickf button { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 4px 12px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.quickf button.on { background: color-mix(in srgb, var(--go, #4f46e5) 12%, var(--surface)); border-color: color-mix(in srgb, var(--go, #4f46e5) 40%, transparent); color: var(--go-text, #3730a3); font-weight: 650; }
.quickf .n { margin-left: 6px; font-size: 11.5px; color: var(--muted); }
.wscell { min-width: 96px; } .wscell .bar { margin-bottom: 2px; }
.casepeek { position: fixed; z-index: 90; width: 300px; display: grid; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); font-size: 13px; pointer-events: none; }
.casepeek .cp-v { display: flex; align-items: center; gap: 6px; font-weight: 650; margin-top: 4px; }
.casepeek .cp-l { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 3px; }
/* item 1: no cut-off words in credit's list */
.cm-side .vword { white-space: nowrap; }
.cm-side .ctable-wrap td .chip { white-space: nowrap; }
.cm-side .ctable-wrap th:nth-child(2), .cm-side .ctable-wrap td:nth-child(2) { min-width: 104px; }

/* Front-end review batch 3 (RKPF 20 Oct 2026): the CAM worksheet */
.btn.locked { opacity: .75; border-style: dashed; } /* item 7 */
.aifloat { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: grid; justify-items: end; gap: 10px; } /* item 10 */
.aifab { border: 0; border-radius: 24px; padding: 11px 18px; font: inherit; font-weight: 650; background: var(--go, #4f46e5); color: #fff; box-shadow: 0 8px 24px rgba(79, 70, 229, .35); cursor: pointer; }
.aidrawer { width: min(440px, calc(100vw - 44px)); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, .2); padding: 14px; }
.aidrawer .card { border: 0; padding: 0; box-shadow: none; }
.ws-sug { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--sky-bg); border: 1px solid color-mix(in srgb, var(--sky) 25%, transparent); font-size: 13.5px; line-height: 1.5; } /* item 12 */
.ws-sug-i { font-size: 16px; line-height: 1.2; }
.ws-cond { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; padding: 4px 0; } /* item 15 */
.ws-cond input { margin-top: 3px; accent-color: var(--go, #4f46e5); }
.ws-foot .ws-prog { font-size: 13px; } /* item 14 */
.cm-side .toast button { pointer-events: auto; }

/* Front-end review batch 4 (RKPF 20 Oct 2026) - credit's tabs */
.psel { margin: 0 8px 0 0; accent-color: var(--go, #4f46e5); vertical-align: middle; } /* item 19 */
.pendsel { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .2); }
.cm-side .qcol > h3.qsec { position: sticky; top: 52px; z-index: 5; background: var(--surface); } /* item 22: the column headings stay */
.qtools { gap: 10px; align-items: center; } /* item 23 */
.fitnote { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--sky); font-size: 13.5px; } /* item 25 */
.chip-open { cursor: pointer; white-space: normal; } /* item 26 */
.dp-find { width: 100%; margin-bottom: 8px; } /* item 29 */
.ws-prev li.open { color: var(--muted); } /* item 30 */
.av-retry { display: grid; gap: 4px; justify-items: start; } /* item 32 */
body.split #view { margin-right: min(46vw, 760px); } /* item 33 */
.docside { position: fixed; top: 0; right: 0; bottom: 0; width: min(46vw, 760px); z-index: 50; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: -8px 0 24px rgba(15, 23, 42, .08); }
.docside select { max-width: 70%; }
.docside-view { flex: 1; min-height: 0; overflow: auto; background: var(--surface-2); border-radius: 8px; }
.docside-view iframe { width: 100%; height: 100%; border: 0; }
.bell-wrap { position: relative; display: inline-flex; } /* item 35 */
.bell .count { margin-left: 4px; background: var(--rose); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.bellmenu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 45; width: 340px; max-height: 60vh; overflow-y: auto; display: grid; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.bell-i { border-bottom: 1px solid var(--line); padding-bottom: 6px; font-size: 13px; }
.tourb { position: fixed; z-index: 95; width: 340px; display: grid; gap: 8px; padding: 12px 14px; background: var(--surface); border: 2px solid var(--go, #4f46e5); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 42, .22); font-size: 13.5px; line-height: 1.5; } /* item 36 */

/* Polish round 2 (RKPF 20 Oct 2026) - full width, readable sizes, no prose in narrow columns */
.cam { font-size: 14px; }
.cam .cam-t td, .cam .cam-t th { font-size: 13.5px; }
.cam .cam-t td.small, .cam .cam-kv { font-size: 13.5px; }
.cam .cam-t td.mono, .cam .cam-t td.num { white-space: nowrap; }
/* the recommendation and the conditions, side by side, normal size */
.cam-rc { display: grid; gap: 12px; }
.cam-rc.two { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.cam-reco, .cam-conds { font-size: 14.5px; line-height: 1.6; }
.cam-conds { display: grid; gap: 6px; align-content: start; padding: 10px 14px; border-left: 3px solid var(--go, #4f46e5); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.cam-cond { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cam-cond input { margin-top: 5px; accent-color: var(--go, #4f46e5); flex: none; }
.cam-reco-l { font-size: 12.5px; }
/* policy parameters / hygiene problems as rows */
.prws { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prw { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 1.5fr) minmax(0, 1.5fr) 170px 120px; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start; font-size: 14px; line-height: 1.5; }
.prw:first-child { border-top: 0; }
.prw.prw-head { background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 600; padding-top: 7px; padding-bottom: 7px; }
.prw-name { font-weight: 600; }
.prw-src { font-size: 12.5px; color: var(--muted); }
.prw-rem { grid-column: 1 / -1; font-size: 14px; line-height: 1.6; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.prw-l { font-size: 12px; color: var(--muted); font-weight: 600; margin-right: 8px; }
.prw.deviation { border-left: 3px solid var(--butter); } .prw.to_confirm { border-left: 3px solid var(--line-strong); } .prw.pass { border-left: 3px solid transparent; }
.prw-group { padding: 9px 14px; border-top: 1px solid var(--line); background: var(--sky-bg); font-size: 14px; line-height: 1.55; }
.prw-fold { padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.prw.hyg { grid-template-columns: minmax(150px, 1fr) 170px 140px; }
/* eligibility: the steps beside the summary */
.elig-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cam-full .cam-sec[data-sec="elig"] .cam-t { max-width: none; }
@media (max-width: 1000px) { .cam-rc.two, .elig-grid { grid-template-columns: 1fr; } .prw { grid-template-columns: 1fr 1fr; } .prw-head { display: none; } }

/* Polish round 3 (RKPF 20 Oct 2026) */
.bellmenu[hidden], .tabmore-menu[hidden], .aidrawer[hidden] { display: none !important; } /* the menus stayed open: a display rule beat "hidden" */
/* Ask AI sits in the case bar now */
.casebar-row .aifloat { position: relative; right: auto; bottom: auto; z-index: 30; display: inline-flex; flex-direction: column; align-items: flex-end; }
.casebar-row .aifab { padding: 6px 14px; font-size: 13.5px; box-shadow: none; }
.casebar-row .aidrawer { position: absolute; top: calc(100% + 8px); right: 0; }
/* the recommendation box: text from the top, not floating in the middle */
.cam-rc { align-items: start; } .cam-reco { align-self: stretch; display: grid; align-content: start; gap: 4px; padding: 10px 14px; }
/* worksheet: the whole width; title | figure | state */
.cam-ws-grid { grid-template-columns: minmax(0, 1fr) !important; }
.cam-ws-side { position: static !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.cam-ws-side > .ws-side:first-child { grid-column: 1 / -1; }
.cam-ws-side .need-groups { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px 24px; }
.need-groups { display: grid; }
.ws-h { grid-template-columns: 10px minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.ws-t { font-weight: 600; font-size: 14.5px; }
.ws-f { max-width: none; text-align: left; font-size: 14px; color: var(--ink); }
.ws-group { font-size: 13px; padding: 10px 16px 6px; }
/* "Not in the file": labels as small chips, one click to fill */
.cam-miss-i { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 1px 9px; cursor: pointer; }
.cam-miss-i:hover { background: var(--surface-2); }
.cam-miss-v { font-size: 0; } .cam-miss-v .cam-click::after { content: ' ✎'; font-size: 11px; color: var(--muted); }
.cam-top .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.cam-top .seg button { border: 0; background: var(--surface); padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.cam-top .seg button.on { background: color-mix(in srgb, var(--go, #4f46e5) 14%, var(--surface)); color: var(--go-text, #3730a3); font-weight: 650; }
.ws-t.wide { grid-column: 2 / 4; }
.cm-side .dcol .prow-name { white-space: normal; overflow: visible; text-overflow: clip; } /* nothing cut on credit's Pending */
.qtools { margin: 4px 0 8px; }

/* Reading round (RKPF 20 Oct 2026): long text set like a well-made report */
.cam .prose, .cam-reco .prose, .ws-detail .prose, .aidrawer .prose { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.prose li { position: relative; padding-left: 16px; font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif; font-size: 15.5px; line-height: 1.6; color: var(--ink); }
.prose li::before { content: ''; position: absolute; left: 3px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.prose li.lede { font-weight: 600; font-size: 16px; }
.prose li.lede::before { background: var(--go, #4f46e5); }
.prose1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 15px; line-height: 1.55; }
.prose b.fig, .prose1 b.fig, .cam b.fig { font-family: var(--font); font-weight: 650; font-size: .94em; color: var(--ink); background: var(--surface-2); padding: 0 4px; border-radius: 4px; white-space: nowrap; }
.tone-bad { color: var(--rose); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--rose) 35%, transparent); text-underline-offset: 3px; }
.tone-good { color: var(--mint); font-weight: 600; }
/* the recommendation reads as the headline of the CAM */
.cam-reco .prose li.lede { font-size: 17px; }
/* policy against this case: the case's value tinted by the result */
.prw-case.r-deviation, .wscase.k-deviation, .wscase.k-nogo { background: var(--rose-bg); border-radius: 6px; padding: 2px 8px; }
.prw-case.r-to_confirm, .wscase.k-confirm { background: var(--butter-bg); border-radius: 6px; padding: 2px 8px; }
.prw-case.r-pass { background: var(--mint-bg); border-radius: 6px; padding: 2px 8px; }
.prw-rem { background: transparent; border-left: 3px solid var(--line-strong); border-radius: 0; padding: 4px 0 4px 14px; }
/* section signs */
.sec-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 8px; background: var(--surface-2); font-size: 15px; vertical-align: -6px; }
.cam-full > .cam-sec > summary h2 { font-size: 17px; }
.cam-sline { margin-left: 38px; }

/* Reading round, pass 2 (RKPF 20 Oct 2026): quieter page - figures in bold ink, not boxes; trouble words red but not underlined;
   strengths / challenges as one paragraph per item with its point first */
.prose b.fig, .prose1 b.fig, .cam b.fig { background: none; padding: 0; font-family: inherit; font-size: 1em; font-weight: 650; font-variant-numeric: tabular-nums lining-nums; }
.tone-bad { text-decoration: none; font-weight: 600; }
.cam .cam-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cam .cam-points > li { position: relative; padding-left: 16px; margin: 0; font-family: 'Source Serif 4', Georgia, serif; font-size: 15.5px; line-height: 1.6; color: var(--ink); }
.cam .cam-points > li::before { content: ''; position: absolute; left: 3px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.cam-points .pt-head { font-weight: 600; }
.cam-points .pt-rest { color: var(--ink-2, var(--ink)); }
.ws-sug-t { font-family: 'Source Serif 4', Georgia, serif; font-size: 15px; line-height: 1.55; color: var(--ink); margin-top: 2px; }

/* Reading round, last pass (RKPF 20 Oct 2026; line length 45-90 characters, dark body text, headings that tell the story):
   long text in two book columns on wide screens instead of 170-character lines; no blank right side */
@media (min-width: 1280px) {
  .cam .prose.cols, .cam .cam-points.cols { display: block; columns: 2 30rem; column-gap: 44px; column-rule: 1px solid var(--line); }
  .cam .prose.cols > li, .cam .cam-points.cols > li { break-inside: avoid; margin-bottom: 7px; }
}
/* body text a touch larger with room between lines; no lonely last words */
.prose li, .cam .cam-points > li { font-size: 16px; line-height: 1.65; text-wrap: pretty; hanging-punctuation: first; }
.prose li.lede { font-size: 16.5px; }
.cam .prose, .cam-reco .prose { gap: 6px; }
.prose1, .ws-sug-t { text-wrap: pretty; }
/* labels you can read: darker, a little larger; each row of a section separated by a hairline */
.cam .cam-kv .k { color: var(--ink-2); font-size: 13px; font-weight: 550; }
.cam .cam-kv.one { row-gap: 0; }
.cam .cam-kv.one > .k, .cam .cam-kv.one > .v { padding: 11px 0; border-top: 1px solid var(--line); }
.cam .cam-kv.one > .k:first-child, .cam .cam-kv.one > .k:first-child + .v { border-top: 0; padding-top: 2px; }
/* the section's one-line story under its title - readable, not grey small print */
.cam-sline { font-size: 13.5px; color: var(--ink-2); }
/* "This case" tints softer - a hint of colour, not a wall of yellow */
.prw-case.r-to_confirm, .wscase.k-confirm { background: color-mix(in srgb, var(--butter-bg) 55%, transparent); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--butter, #c99a2e) 70%, transparent); }
.prw-case.r-deviation, .wscase.k-deviation, .wscase.k-nogo { background: color-mix(in srgb, var(--rose-bg) 70%, transparent); box-shadow: inset 3px 0 0 var(--rose); }
.prw-case.r-pass { background: color-mix(in srgb, var(--mint-bg) 60%, transparent); box-shadow: inset 3px 0 0 var(--mint); }
/* a policy rule reads as one quiet paragraph, not as findings */
.prw-pol .prose { gap: 2px; } .prw-pol .prose li { font-size: 15px; padding-left: 0; } .prw-pol .prose li::before { display: none; }
/* people and loan cards: labels you can read, values at reading size */
.cam .loan-l { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.cam .loan-v { font-size: 15px; color: var(--ink); }
.cam .loan-r { font-size: 14.5px; color: var(--ink); }
.cam .loan-h strong { font-size: 15px; }
.cam .loan-r .prose { display: inline-grid; } .cam .loan-r .prose li { font-size: 15px; padding-left: 0; } .cam .loan-r .prose li::before { display: none; }
.cam .loan-r { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: baseline; column-gap: 8px; }
.cam .loan-r .prose { display: grid; }

/* Fields (RKPF 20 Oct 2026: left and right sides must be told apart at a glance).
   Each label + value is one field. Labels are quiet (smaller, grey, regular); values are clear (larger, dark).
   On wide screens fields sit in two halves split by a vertical rule; each pair of halves shares a hairline row. */
.cam-fields { display: grid; grid-template-columns: minmax(0, 1fr); }
.kvf { display: grid; grid-template-columns: 180px minmax(0, 1fr); column-gap: 18px; align-items: baseline; padding: 10px 6px; border-top: 1px solid var(--line); }
.kvf > .k { color: var(--muted); font-size: 13px; font-weight: 450; line-height: 1.45; }
.kvf > .v { color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.kvf:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cam-fields .kv-sub { grid-column: 1 / -1; font-size: 13.5px; font-weight: 650; color: var(--ink); padding: 18px 6px 8px; border-top: 0; margin: 0; }
.cam-fields .kv-sub:first-child { padding-top: 2px; }
.cam-fields .kv-sub + .kvf, .cam-fields .kv-sub + .kvf.l + .kvf.r { border-top-color: var(--line-strong); }
@media (min-width: 1200px) {
  .cam-fields:not(.one) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kvf.w { grid-column: 1 / -1; }
  .kvf.l { padding-right: 24px; box-shadow: inset -1px 0 0 var(--line-strong); } /* the rule between the two halves */
  .kvf.r { padding-left: 24px; }
}
@media (max-width: 700px) { .kvf { grid-template-columns: 1fr; row-gap: 2px; } }

/* Tables (RKPF 20 Oct 2026): the eye follows a row across - soft alternate shading; figures right-aligned in even columns */
.cam .cam-t tr:nth-child(even) > td { background: color-mix(in srgb, var(--surface-2) 75%, transparent); }
.cam .cam-t td, .cam .cam-t th { padding-top: 8px; padding-bottom: 8px; }
.cam .cam-t th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.cam .cam-t.numtab th:not(:first-child), .cam .cam-t.numtab td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 17%; padding-left: 28px; }
.cam .cam-t.numtab td:first-child { color: var(--ink); }
.cam .cam-t.numtab td:not(:first-child) { font-size: 14px; color: var(--ink); }

/* Existing loans as one ledger (RKPF 20 Oct 2026) */
.ln-head { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; align-items: baseline; }
.ln-att { border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 16px; background: var(--surface-2); }
.ln-att-h { font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.ln-att ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ln-att li { position: relative; padding-left: 16px; font-family: 'Source Serif 4', Georgia, serif; font-size: 15.5px; line-height: 1.55; text-wrap: pretty; }
.ln-att li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.ln-att li.t-bad::before { background: var(--rose); } .ln-att li.t-warn::before { background: var(--butter); } .ln-att li.t-info::before { background: var(--muted); }
.cam .ln-t { border-collapse: separate; border-spacing: 0; }
.cam .ln-t th { white-space: nowrap; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.cam .ln-t th.num, .cam .ln-t td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cam .ln-t td { vertical-align: top; font-size: 14px; }
.cam .ln-t tr:nth-child(even) > td { background: none; } /* rows are grouped per loan instead of striped */
.cam .ln-t .ln-gh td { font-weight: 650; font-size: 14px; padding-top: 18px; border-bottom: 2px solid var(--line-strong); background: none; }
.cam .ln-t .ln-gh td .muted { font-weight: 400; }
.cam .ln-t .ln-row td { border-top: 1px solid var(--line); }
.cam .ln-t .ln-row:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cam .ln-t .ln-row.is-bad > tr:first-child > td:first-child { box-shadow: inset 3px 0 0 var(--rose); }
.cam .ln-t .ln-row.is-warn > tr:first-child > td:first-child { box-shadow: inset 3px 0 0 var(--butter); }
.cam .ln-t .ln-lender strong { font-size: 14.5px; margin-right: 6px; }
.ln-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cam .ln-t .ln-rem td { border-top: 0; padding-top: 0; padding-bottom: 12px; }
.cam .ln-t .ln-rem .prose { padding-left: 2px; } .cam .ln-t .ln-rem .prose li { font-size: 15px; color: var(--ink-2); }
.cam .ln-t .ln-rem .prose1 { color: var(--ink-2); }
.ln-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.ln-est i { font-style: italic; font-size: 11px; color: var(--muted); font-weight: 400; }
.cam .ln-t .ln-foot td { font-weight: 650; border-top: 2px solid var(--line-strong); padding-top: 10px; }
.ln-est { white-space: nowrap; }
.cam .ln-t td:nth-child(8) > div { white-space: nowrap; }
.cam .ln-t td:nth-child(9) { min-width: 150px; }
.cam .ln-t .ln-rem .prose1 { display: block; padding-left: 18px; }
.cam .ln-t .ln-flags { margin-top: 5px; }
.cam .ln-t td.ln-lender { min-width: 220px; }

/* ===== Rethink (RKPF 20 Oct 2026): people side by side; loans as a picture and a map ===== */
/* people */
.pp-t { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.pp-t th, .pp-t td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pp-t td + td, .pp-t th + th { border-left: 1px solid var(--line); }
.pp-t thead th { border-bottom: 2px solid var(--line-strong); padding-bottom: 12px; }
.pp-t thead th:first-child, .pp-t tbody th { width: 170px; }
.pp-t tbody th { font-weight: 450; font-size: 13px; color: var(--muted); }
.pp-t td { font-size: 15px; color: var(--ink); }
.pp-t tbody tr:hover td, .pp-t tbody tr:hover th { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.pp-head { display: flex; gap: 10px; align-items: flex-start; }
.pp-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 650; background: var(--sky-bg); color: var(--sky); }
.pp-name { font-size: 14.5px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.pp-role { font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.pp-role .first { color: var(--ink-2); font-weight: 500; }
.pp-num { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-num.bad { color: var(--rose); }
.pp-score { display: grid; gap: 6px; }
.pp-bar { position: relative; height: 6px; border-radius: 3px; background: var(--surface-2); max-width: 180px; }
.pp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.pp-bar i.ok { background: var(--mint); } .pp-bar i.warn { background: var(--butter); } .pp-bar i.bad { background: var(--rose); }
.pp-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }
.pp-age { font-size: 15px; font-weight: 600; } .pp-age.bad { color: var(--rose); } .pp-age.warn { color: var(--butter); }
.pp-age .muted { font-weight: 400; font-size: 12.5px; }
.pp-yes { font-weight: 500; } .pp-no { color: var(--ink-2); }
.pp-addr { font-family: 'Source Serif 4', Georgia, serif; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.pp-miss { display: inline-block; font-size: 12px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 99px; padding: 1px 9px; }

/* loans: the EMI burden over time */
.ob { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 30px; }
.ob-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-bottom: 12px; }
.ob-t { font-weight: 650; font-size: 14.5px; } .ob-s { font-size: 13px; color: var(--muted); margin-top: 2px; max-width: 70ch; }
.ob-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.ob-leg span { display: inline-flex; align-items: center; gap: 6px; } .ob-leg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; opacity: .75; }
.ob-plot { position: relative; height: 170px; margin-left: 70px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.ob-svg, .ob-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ob-y span { position: absolute; left: -70px; width: 62px; text-align: right; font-size: 11.5px; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.ob-drop { position: absolute; width: 0; height: 0; }
.ob-drop span { position: absolute; bottom: 4px; left: 4px; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 0 4px; border-radius: 4px; }
.ob-drop::before { content: ''; position: absolute; left: 0; top: -2px; width: 1px; height: 14px; background: var(--ink-2); }
.ob-x span { position: absolute; top: calc(100% + 4px); font-size: 11.5px; color: var(--muted); transform: translateX(-50%); }

/* loans: the map - one shared timeline */
.lm { border-top: 1px solid var(--line-strong); }
.lm-row { display: grid; grid-template-columns: minmax(200px, 250px) minmax(220px, 1fr) 118px 150px 92px 150px; column-gap: 18px; align-items: start; }
.lm-axis { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 8px 0 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.lm-track-ax { position: relative; height: 16px; }
.lm-track-ax span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.lm-track-ax .lm-now-l { top: 16px; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.lm-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.lm-g { padding-top: 6px; }
.lm-gh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 14px 0 8px; font-size: 13.5px; border-bottom: 2px solid var(--line-strong); }
.lm-gh i { width: 12px; height: 12px; border-radius: 3px; opacity: .8; margin-right: -10px; }
.lm-gh strong { font-size: 14.5px; }
.lm-loan { padding: 12px 0 12px 12px; border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 transparent; }
.lm-loan.is-bad { box-shadow: inset 3px 0 0 var(--rose); } .lm-loan.is-warn { box-shadow: inset 3px 0 0 var(--butter); }
.lm-loan.is-closed { opacity: .65; }
.lm-loan:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.lm-name { font-weight: 650; font-size: 15px; color: var(--ink); }
.lm-loan .ln-flags { margin-top: 6px; }
.lm-time { padding-top: 4px; }
.lm-track { position: relative; height: 14px; border-radius: 7px; background: var(--surface-2); }
.lm-bar { position: absolute; top: 0; bottom: 0; border-radius: 7px; overflow: hidden; }
.lm-bar.g0 { background: color-mix(in srgb, var(--sky) 30%, transparent); } .lm-bar.g0 i { background: var(--sky); }
.lm-bar.g1 { background: color-mix(in srgb, var(--lilac) 30%, transparent); } .lm-bar.g1 i { background: var(--lilac); }
.lm-bar.g2 { background: color-mix(in srgb, var(--butter) 30%, transparent); } .lm-bar.g2 i { background: var(--butter); }
.lm-bar.g3 { background: color-mix(in srgb, var(--mint) 30%, transparent); } .lm-bar.g3 i { background: var(--mint); }
.lm-bar.g4 { background: color-mix(in srgb, var(--muted) 30%, transparent); } .lm-bar.g4 i { background: var(--muted); }
.lm-bar.open { -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.lm-bar i { position: absolute; left: 0; top: 0; bottom: 0; opacity: .85; }
.lm-loan.is-bad .lm-bar { outline: 1.5px solid var(--rose); outline-offset: 1px; }
.lm-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.lm-dates { font-size: 12.5px; color: var(--ink-2); margin-top: 7px; line-height: 1.5; }
.lm-emi > .cam-v, .lm-emi > span:first-child { font-size: 15.5px; font-weight: 600; }
.lm-pos > div:first-child { font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.lm-rp { height: 4px; border-radius: 2px; background: var(--surface-2); margin: 6px 0 3px auto; width: 100%; max-width: 130px; position: relative; }
.lm-rp i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--ink-2); }
.lm-from { font-size: 13.5px; }
.lm-rem { margin-top: 8px; padding-right: 8px; max-width: 980px; }
.lm-rem p { margin: 0; font-family: 'Source Serif 4', Georgia, serif; font-size: 15px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 1400px) { .lm-row { grid-template-columns: minmax(180px, 210px) minmax(180px, 1fr) 108px 140px 80px 130px; column-gap: 12px; } }
.ob-drop.r span { left: auto; right: 4px; }

/* ===== Pictures for banking, financials, bureau, eligibility (RKPF 20 Oct 2026) ===== */
.ln-att li.t-good::before { background: var(--mint); }
.cc { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 34px; }
.cc-cap { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.cc-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; }
.cc-leg span { display: inline-flex; align-items: center; gap: 6px; }
.cc-leg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; opacity: .8; }
.cc-leg i.ln { height: 3px; border-radius: 2px; width: 16px; opacity: 1; }
.cc-plot { position: relative; margin-left: 74px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.cc-svg, .cc-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cc-y span { position: absolute; left: -76px; width: 68px; text-align: right; font-size: 11.5px; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.cc-x span { position: absolute; top: calc(100% + 5px); font-size: 11.5px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.cc-pt { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--c); transform: translate(-50%, -50%); }
.cc-val { position: absolute; transform: translate(-50%, -100%); font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap; padding-bottom: 2px; font-variant-numeric: tabular-nums; }
.cc-note { position: absolute; top: -2px; transform: translateX(-50%); }
.cc-note span { display: inline-block; font-size: 11px; font-weight: 600; white-space: nowrap; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-strong); }
.cc-note.bad span { background: var(--rose-bg); color: var(--rose); border-color: transparent; }
.cc-note.warn span { background: var(--butter-bg); color: var(--butter); border-color: transparent; }
.bk-warn { color: var(--butter); font-weight: 600; }
/* eligibility */
.el-line { font-size: 16px; font-family: 'Source Serif 4', Georgia, serif; line-height: 1.55; }
.cmpb { display: grid; gap: 8px; max-width: 980px; }
.cmpb-r { display: grid; grid-template-columns: 230px minmax(0, 1fr) 110px; gap: 14px; align-items: center; }
.cmpb-l { font-size: 14px; color: var(--ink); }
.cmpb-t { height: 14px; border-radius: 7px; background: var(--surface-2); position: relative; }
.cmpb-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: color-mix(in srgb, var(--ink-2) 45%, transparent); }
.cmpb-t .pp-miss { position: relative; top: -2px; }
.cmpb-v { text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmpb-r.is-mark .cmpb-t i { background: var(--mint); }
.cmpb-r.is-mark .cmpb-l::after { content: '  decides'; font-size: 12px; color: var(--mint); font-weight: 600; }
.el-use { display: grid; gap: 8px; max-width: 980px; }
.el-bar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.el-bar i { height: 100%; opacity: .75; }
.cam .cam-t.numtab .pp-score { justify-items: end; }
.cam .cam-t.numtab .pp-bar { width: 140px; }

/* ===== Collateral, PD, policy, schedule as pictures (RKPF 20 Oct 2026) ===== */
.col-need { border-left: 3px solid var(--butter); padding: 4px 0 4px 14px; }
.col-need ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.col-need li { font-family: 'Source Serif 4', Georgia, serif; font-size: 15px; line-height: 1.55; }
.pd-bal { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 6px; }
@media (max-width: 1100px) { .pd-bal { grid-template-columns: 1fr; } }
.pd-col { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; border-top: 3px solid var(--line-strong); }
.pd-col.good { border-top-color: var(--mint); } .pd-col.bad { border-top-color: var(--rose); }
.pd-col-h { display: flex; align-items: baseline; gap: 8px; font-weight: 650; font-size: 14.5px; margin-bottom: 8px; }
.pd-n { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pd-col.good .pd-n { color: var(--mint); } .pd-col.bad .pd-n { color: var(--rose); }
.pd-col .cam-points.cols { columns: 1; }
.pol-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; gap: 2px; max-width: 980px; }
.pol-bar i { height: 100%; opacity: .8; }
.pol-bar i.hatch { background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.35) 4px 7px) !important; }

/* ===== The recommendation with "Case at a glance" (RKPF 20 Oct 2026) ===== */
.cam-rc.three { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cam-rc.three > .cam-conds { grid-column: 1 / -1; }
.cam-rc.three > .cam-conds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.cam-rc.three > .cam-conds > .cam-reco-l { grid-column: 1 / -1; }
@media (max-width: 1100px) { .cam-rc.three, .cam-rc.three > .cam-conds { grid-template-columns: 1fr; } }
.cam-glance { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.gl-list { display: grid; gap: 2px; margin-top: 6px; }
.gl-row { display: grid; grid-template-columns: 12px 128px minmax(0, 1fr); gap: 8px; align-items: baseline; text-align: left; border: 0; background: transparent; padding: 6px 6px; border-radius: 6px; cursor: pointer; color: var(--ink); font: inherit; }
.gl-row:hover, .gl-row:focus-visible { background: var(--surface-2); outline: none; }
.gl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); align-self: center; }
.gl-row.t-bad .gl-dot { background: var(--rose); } .gl-row.t-warn .gl-dot { background: var(--butter); } .gl-row.t-good .gl-dot { background: var(--mint); }
.gl-k { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.gl-t { font-size: 14px; line-height: 1.45; }
.cmpb-r.is-over .cmpb-t i { background: var(--butter); }
.cmpb-r.is-over .cmpb-l { color: var(--butter); font-weight: 600; }

/* ===== Worksheet board (RKPF 20 Oct 2026) ===== */
.wsb { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0 6px; display: grid; gap: 10px; background: var(--surface); }
.wsb-line { font-family: 'Source Serif 4', Georgia, serif; font-size: 16px; line-height: 1.5; }
.wsb-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr) 90px; gap: 6px 14px; align-items: center; }
.wsb-l { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.wsb-tiles { display: flex; flex-wrap: wrap; gap: 5px; }
.wsb-t { width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--line-strong); background: transparent; cursor: pointer; padding: 0; }
.wsb-t.k-nogo { border-color: var(--rose); } .wsb-t.k-risk, .wsb-t.k-deviation { border-color: var(--butter); } .wsb-t.k-question { border-color: var(--sky); }
.wsb-t.s-ask { background: var(--sky); border-color: var(--sky); opacity: .75; }
.wsb-t.s-done { background: var(--mint); border-color: var(--mint); }
.wsb-t:hover, .wsb-t:focus-visible { transform: scale(1.12); outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--line-strong); }
.wsb-n { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.wsb-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.wsb-leg span { display: inline-flex; align-items: center; gap: 6px; }
.wsb-leg i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--line-strong); display: inline-block; }
.wsb-leg i.s-ask { background: var(--sky); border-color: var(--sky); } .wsb-leg i.s-done { background: var(--mint); border-color: var(--mint); }
/* credit desk overview (RKPF 20 Oct 2026) */
.desk-ov { padding: 12px 16px; }
.gl-row.dk { grid-template-columns: 12px 240px minmax(0, 1fr); }
.dk-st { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.q-glance { display: grid; gap: 8px; margin: 6px 0 10px; max-width: 1100px; } .q-glance:empty { display: none; }
/* filling a field that is not in the file: one row under the chips, normal-size text (RKPF 20 Oct 2026) */
.cam-fill { flex-basis: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 4px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 14px; color: var(--ink); }
.cam-fill input, .cam-fill select { font-size: 14px; flex: 1 1 260px; max-width: 460px; min-width: 160px !important; width: auto !important; }
.cam-fill textarea { font-size: 14px; flex: 1 1 100%; }
/* Ask AI floats bottom-right on every credit case page (RKPF 20 Oct 2026: "keep the AI button floating ... they don't have to look for it");
   the page keeps room at its foot so the button never sits over text */
body.cm-side #view { padding-bottom: 96px; }
.aifloat .aifab { padding: 12px 20px; font-size: 14.5px; }
.aifloat .aidrawer { max-height: calc(100vh - 140px); }
.rec-check { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--butter-bg); color: var(--ink); font-size: 13.5px; line-height: 1.5; }
/* Product fit for credit: the program labels in full - no "..." (RKPF 20 Oct 2026) */
body.cm-side .fitline { flex-wrap: wrap; overflow: visible; }
body.cm-side .fitline .chip { white-space: normal; overflow: visible; text-overflow: clip; max-width: none; height: auto; line-height: 1.4; padding-top: 3px; padding-bottom: 3px; }
/* Decisions: the worksheet as progress by group (RKPF 20 Oct 2026) */
.dec-ws { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) 60px; gap: 6px 12px; align-items: center; font-size: 13px; }
.dec-ws-l { color: var(--ink-2); }
.dec-ws-b { position: relative; display: flex; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.dec-ws-b i.d { background: var(--mint); } .dec-ws-b i.a { background: var(--sky); opacity: .8; }
.dec-ws-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ws-sug[hidden] { display: none !important; } /* no suggested reason (20 Oct 2026) - the empty box must not show */

/* ===== The Full CAM in chapters (RKPF 20 Oct 2026) ===== */
.ch-head { padding: 12px 16px; display: grid; gap: 8px; }
.ch-steps { position: sticky; top: var(--casebar-h, 56px); z-index: 20; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.ch-step { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: transparent; border-radius: 99px; padding: 4px 10px 4px 4px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.ch-step:hover { background: var(--surface-2); }
.ch-step .ch-n { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 650; border: 1.5px solid var(--line-strong); color: var(--muted); }
.ch-step.read .ch-n { background: var(--mint); border-color: var(--mint); color: #fff; }
.ch-step.on { background: color-mix(in srgb, var(--lilac) 12%, transparent); border-color: color-mix(in srgb, var(--lilac) 45%, transparent); color: var(--ink); font-weight: 600; }
.ch-step.on .ch-n { border-color: var(--lilac); color: var(--lilac); }
.ch-step.on.read .ch-n { background: var(--mint); color: #fff; border-color: var(--mint); }
.ch-count { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.ch-title { font-size: 20px; font-weight: 650; color: var(--ink); padding: 6px 2px 0; }
.ch-title .muted { font-size: 13px; font-weight: 500; margin-right: 6px; }
/* two sections read together: side by side on a wide screen */
.ch-pair { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 1280px) { .ch-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ch-pair > .cam-sec { min-width: 0; }
.ch-pair .scrollx { overflow-x: auto; }
.ch-end { height: 1px; }
.ch-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 4px; border-top: 1px solid var(--line); }
.ch-nav .btn { max-width: 46%; }
.ws-side.ws-unread { border-color: color-mix(in srgb, var(--butter) 55%, transparent); background: color-mix(in srgb, var(--butter-bg) 60%, transparent); }
/* inside a side-by-side chapter each half is narrow: fields in one column, strengths / challenges one under the other */
.ch-pair .cam-fields:not(.one) { grid-template-columns: minmax(0, 1fr) !important; }
.ch-pair .kvf.w { grid-column: auto; }
.ch-pair .kvf.l { padding-right: 6px; box-shadow: none; } .ch-pair .kvf.r { padding-left: 6px; }
.ch-pair .kvf { grid-template-columns: 150px minmax(0, 1fr); }
.ch-pair .pd-bal { grid-template-columns: 1fr; }
.ch-pair .prose.cols, .ch-pair .cam-points.cols { columns: 1; column-rule: none; }
.ch-pair .cmpb-r { grid-template-columns: 150px minmax(0, 1fr) 90px; }
/* the controls on every chapter in one slim row */
.ch-head { padding: 8px 14px; }
@media (min-width: 1280px) { .ch-pair.wide { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1800px) { .ch-pair.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* The chapter rail on the left (RKPF 20 Oct 2026): numbers and ticks; the names open over the page when the mouse is on it */
.ch-layout { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; }
.ch-rail { position: sticky; top: 70px; z-index: 40; width: 48px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; padding: 8px 5px;
  overflow: hidden; transition: width .16s ease, box-shadow .16s ease; }
.ch-rail:hover, .ch-rail:focus-within { width: 290px; box-shadow: 0 14px 34px rgba(15, 23, 42, .18); }
.ch-rail .ch-step { width: 100%; justify-content: flex-start; padding: 4px; white-space: nowrap; }
.ch-rail .ch-step .ch-n { flex: none; }
.ch-rail .ch-t { opacity: 0; transition: opacity .12s ease; }
.ch-rail:hover .ch-t, .ch-rail:focus-within .ch-t { opacity: 1; }
.ch-rail .ch-count { margin: 6px 0 0; padding: 6px 2px 2px; border-top: 1px solid var(--line); font-size: 11px; text-align: center; white-space: nowrap; }
.ch-rail:not(:hover):not(:focus-within) .ch-count { font-size: 0; }
.ch-rail:not(:hover):not(:focus-within) .ch-count::after { content: attr(data-short); font-size: 11px; }
.ch-main { min-width: 0; }
@media (max-width: 700px) { .ch-layout { grid-template-columns: 1fr; } .ch-rail { position: static; width: auto; flex-direction: row; flex-wrap: wrap; } .ch-rail .ch-t { opacity: 1; } }
/* the CAM controls row moved into the chapter header: the same look as before (RKPF 20 Oct 2026 - plain browser buttons) */
.ch-head .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.ch-head .seg button { border: 0; background: var(--surface); padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.ch-head .seg button + button { border-left: 1px solid var(--line-strong); }
.ch-head .seg button.on { background: color-mix(in srgb, var(--go, #4f46e5) 14%, var(--surface)); color: var(--go-text, #3730a3); font-weight: 650; }
.ch-head .seg button:hover:not(.on) { background: var(--surface-2); }
.ch-head > .row select { width: auto; flex: none; max-width: 260px; }
.ch-head > .row > .grow { min-width: 240px; }
.stale-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; height: auto; white-space: normal; line-height: 1.4; padding: 4px 4px 4px 10px; } .stale-line .btn { margin-left: auto; }
/* review #7: less above the CAM - the controls in one slim row, the chapter number lives in the rail */
.cam-ch .ch-title { display: none; }
.ch-head > .row { gap: 6px 10px; align-items: center; }
.ch-head > .row > .grow { min-width: 200px; }
.ch-head > .row > .grow h2 { display: inline; font-size: 14px !important; margin-right: 8px !important; }
.ch-head > .row > .grow .small { display: inline; font-size: 11.5px; }
.ch-head .btn.sm { padding: 4px 9px; font-size: 12.5px; }
/* review #9 (RKPF 20 Oct 2026): Questions for credit - one section under another at full width, no column boxes, no Expand */
.cm-side .qcols { grid-template-columns: minmax(0, 1fr) !important; }
.cm-side .qcol-x { display: none !important; }
.cm-side .qcol-body .qgrid { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)) !important; }
.cm-side .qcol { border: 0; background: transparent; }
.cm-side .qcol > h3.qsec { border-radius: 8px; border: 1px solid var(--line); }
/* review #11: loans with nothing to flag - one line each, every figure and the remark kept */
.lm-clean { padding: 4px 0 8px 12px; }
.lm-cl { display: grid; grid-template-columns: minmax(200px, 1.2fr) 130px 160px 70px 190px minmax(0, 2fr); gap: 4px 14px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.lm-cl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lm-cl-r { font-family: 'Source Serif 4', Georgia, serif; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 1300px) { .lm-cl { grid-template-columns: minmax(160px, 1fr) 120px 150px 64px; } .lm-cl > div:nth-child(5), .lm-cl-r { grid-column: 1 / -1; } }
/* the Full CAM as one page (RKPF 20 Oct 2026: credit managers choose chapters or one page) */
.ch-layout-pick { margin-left: 2px; }
.cam-scroll .ch-block { display: grid; gap: 12px; padding-bottom: 18px; border-bottom: 2px solid var(--line); scroll-margin-top: 70px; }
.cam-scroll .ch-block-h { font-size: 13px; font-weight: 650; color: var(--ink-2); padding-top: 6px; }
.cam-scroll .ch-block-h .muted { font-weight: 500; margin-right: 4px; }

/* ===== The worksheet, calmer (RKPF 20 Oct 2026: "more soothing to the eye ... thoroughly and with all of his heart") ===== */
/* the decision bar stays at the foot of the screen while the CM works (overflow:hidden on the box stopped it sticking) */
.cam-ws { overflow: visible; }
.ws-foot { z-index: 15; box-shadow: 0 -6px 18px rgba(15, 23, 42, .06); border-radius: 0 0 12px 12px; }
/* each group as a soft section with a colour by its weight; the rows breathe */
.ws-group { background: transparent; border-bottom: 0; padding: 18px 16px 6px; font-size: 13px; }
.ws-group > span:first-child { font-weight: 650; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.ws-group > span:first-child::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--line-strong); }
.ws-group:has(+ .ws-item .dv-dot.bad) > span:first-child::before { background: var(--rose); }
.ws-group:has(+ .ws-item .dv-dot.warn) > span:first-child::before { background: var(--butter); }
.ws-group:has(+ .ws-item .dv-dot.info) > span:first-child::before { background: var(--sky); }
.ws-item { border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); margin: 0 10px; }
.ws-h { padding: 12px 10px; border-radius: 8px; }
.ws-t { font-weight: 550; color: var(--ink); }
.ws-state { font-weight: 550; letter-spacing: .1px; }
.ws-state.open { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-2); }
.ws-item.done { background: color-mix(in srgb, var(--mint-bg) 45%, transparent); border-radius: 8px; border-bottom-color: transparent; margin-bottom: 2px; }
.ws-item.done .ws-t { color: var(--ink-2); }
.ws-item.asked { background: color-mix(in srgb, var(--sky-bg) 45%, transparent); border-radius: 8px; border-bottom-color: transparent; margin-bottom: 2px; }
/* the CM's own answer stays in view under the point - the worksheet reads as the CM's record */
.ws-said { padding: 0 12px 11px 32px; font-family: 'Source Serif 4', Georgia, serif; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
/* the open point: a calm card, room to think */
.ws-item.on { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; margin: 8px 6px 12px; box-shadow: 0 6px 22px rgba(15, 23, 42, .07); }
.ws-item.on .ws-h { border-radius: 12px 12px 0 0; }
.ws-item.on .ws-b { padding: 4px 18px 18px 40px; gap: 12px; }
.ws-note { min-height: 92px; font-family: 'Source Serif 4', Georgia, serif; font-size: 15px; line-height: 1.55; padding: 10px 12px; background: var(--surface); }
.ws-note:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lilac) 18%, transparent); }
/* before you answer: what has been looked at - quiet marks, green when done */
.ws-ev { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; }
.ws-ev-i { padding: 2px 10px; border-radius: 99px; border: 1px dashed var(--line-strong); color: var(--ink-2); }
.ws-ev-i.ok { border-style: solid; border-color: transparent; background: var(--mint-bg); color: var(--mint); font-weight: 600; }
/* what a good reason looks like */
.ws-guide { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ws-guide .ok { color: var(--mint); font-weight: 600; }
.ws-mit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ws-mit .chip { cursor: pointer; background: var(--surface); }
.ws-mit .chip:hover { background: var(--surface-2); }
/* the progress line in the decision bar; Ask AI sits above the bar, never on it */
.ws-foot .ws-track { width: 120px; margin-left: 4px; }
.ws-foot .ws-track i { background: var(--mint); }
body:has(.ws-foot) .aifloat { bottom: 86px; }

/* ===== The worksheet, easier to work through (RKPF 20 Oct 2026) ===== */
.ws-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; }
.ws-pick { width: 16px; height: 16px; margin: 0 0 0 8px; accent-color: var(--lilac); cursor: pointer; }
.ws-pick-sp { width: 16px; }
.ws-item.picked { background: color-mix(in srgb, var(--lilac) 8%, transparent); border-radius: 8px; }
.ws-group { flex-wrap: wrap; align-items: center; }
.ws-g-n { font-weight: 450; color: var(--muted); }
.ws-g-tools { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; margin-right: 10px; }
/* one reason for several ticked points: stays just above the decision bar */
.ws-batch { position: sticky; bottom: 62px; z-index: 16; margin: 10px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--lilac) 45%, transparent);
  border-radius: 12px; box-shadow: 0 10px 28px rgba(15, 23, 42, .16); }
.ws-batch-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.ws-batch-h .small { flex: 1 1 300px; }
.ws-batch .ws-note { min-height: 70px; }
.cam-ws-head .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.cam-ws-head .seg button { border: 0; background: var(--surface); padding: 4px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.cam-ws-head .seg button + button { border-left: 1px solid var(--line-strong); }
.cam-ws-head .seg button.on { background: color-mix(in srgb, var(--go, #4f46e5) 14%, var(--surface)); color: var(--go-text, #3730a3); font-weight: 650; }
/* the answer in plain prompts (RKPF 20 Oct 2026: "I don't know what to type in the box") */
.ws-decide { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--lilac) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--lilac) 22%, transparent); font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.ws-terms { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.ws-terms span::before { content: 'ⓘ '; color: var(--lilac); }
.ws-q3 { display: grid; gap: 3px; }
.ws-q3-l { font-size: 13px; font-weight: 600; color: var(--ink); }
.ws-note.ws-note3 { min-height: 52px; }
.ws-btn-help { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ===== The worksheet redone (RKPF 20 Oct 2026): the points on the left, the chosen one on the right as a decision card ===== */
.w2 { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; padding: 14px 16px 18px; align-items: start; }
@media (max-width: 1100px) { .w2 { grid-template-columns: 1fr; } }
.w2-list { display: grid; gap: 10px; }
.w2-prog { display: grid; gap: 6px; font-size: 13.5px; }
.w2-bar { display: flex; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.w2-bar i.d { background: var(--mint); } .w2-bar i.a { background: var(--sky); opacity: .8; }
.w2-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.w2-tools .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.w2-tools .seg button { border: 0; background: var(--surface); padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.w2-tools .seg button + button { border-left: 1px solid var(--line-strong); }
.w2-tools .seg button.on { background: color-mix(in srgb, var(--go, #4f46e5) 14%, var(--surface)); color: var(--go-text, #3730a3); font-weight: 650; }
.w2-g { display: grid; gap: 2px; }
.w2-gh { font-size: 12.5px; font-weight: 650; color: var(--ink-2); padding: 8px 4px 4px; }
.w2-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; text-align: left; border: 1px solid transparent; background: transparent; padding: 7px 8px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.w2-row:hover { background: var(--surface-2); }
.w2-row.on { background: color-mix(in srgb, var(--lilac) 10%, var(--surface)); border-color: color-mix(in srgb, var(--lilac) 40%, transparent); }
.w2-mark { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; border: 1.5px solid var(--line-strong); align-self: center; }
.w2-row.k-nogo .w2-mark { border-color: var(--rose); } .w2-row.k-deviation .w2-mark, .w2-row.k-risk .w2-mark { border-color: var(--butter); } .w2-row.k-question .w2-mark { border-color: var(--sky); }
.w2-row.s-done .w2-mark { background: var(--mint); border-color: var(--mint); color: #fff; }
.w2-row.s-ask .w2-mark { background: var(--sky); border-color: var(--sky); color: #fff; }
.w2-row.s-done .w2-t { color: var(--ink-2); }
.w2-t { font-size: 13.5px; line-height: 1.35; }
.w2-k { font-size: 11px; color: var(--muted); white-space: nowrap; }
/* the decision card */
.w2-card { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 26px rgba(15, 23, 42, .07); padding: 16px 20px 18px; display: grid; gap: 14px; border-top: 4px solid var(--line-strong); }
.w2-card.k-nogo { border-top-color: var(--rose); } .w2-card.k-deviation, .w2-card.k-risk { border-top-color: var(--butter); } .w2-card.k-question { border-top-color: var(--sky); } .w2-card.k-confirm { border-top-color: var(--muted); }
.w2-top { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.w2-kind { font-weight: 650; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); }
.w2-kind.k-nogo { background: var(--rose-bg); color: var(--rose); } .w2-kind.k-deviation, .w2-kind.k-risk { background: var(--butter-bg); color: var(--butter); } .w2-kind.k-question { background: var(--sky-bg); color: var(--sky); }
.w2-sec { display: grid; gap: 6px; }
.w2-h { font-size: 12px; font-weight: 700; letter-spacing: .3px; color: var(--muted); text-transform: none; }
.w2-problem { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; line-height: 1.5; color: var(--ink); }
.w2-todo { font-size: 15px; line-height: 1.55; color: var(--ink); padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--lilac) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--lilac) 22%, transparent); }
.w2-ev { display: grid; gap: 8px; }
.w2-pc { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; font-size: 14px; }
.w2-pc .k { color: var(--muted); font-size: 13px; }
.w2-decide { display: grid; gap: 10px; padding-top: 4px; border-top: 1px solid var(--line); }
.w2-outs { display: flex; flex-wrap: wrap; gap: 8px; }
.w2-out { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; color: var(--ink); }
.w2-out:hover { background: var(--surface-2); }
.w2-out.on { border-color: var(--lilac); background: color-mix(in srgb, var(--lilac) 12%, var(--surface)); color: var(--ink); }
.w2-out.ask { border-style: dashed; }
.w2-q { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.w2-note { min-height: 96px; }
.w2-note:disabled { background: var(--surface-2); }
.w2-done { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--mint-bg); font-size: 14.5px; line-height: 1.55; }
.w2-done.ask { background: var(--sky-bg); }

/* The worksheet by issue (RKPF 20 Oct 2026): the checks about one problem, decided once */
.w2-irow .w2-t { font-weight: 560; }
.w2-ititle { margin: 2px 0 4px; font-size: 19px; line-height: 1.3; }
.w2-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.w2-checks li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.w2-checks li .w2-kind { font-size: 12px; text-align: center; padding: 2px 8px; }
.w2-checks li.s-done { opacity: .7; }
.w2-cl { line-height: 1.5; }
.w2-ans { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--mint); } .w2-ans.ask { color: var(--sky); }
.w2-hows { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.w2-evd { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.w2-evd > summary { cursor: pointer; font-weight: 600; }
.w2-evd[open] > summary { margin-bottom: 6px; }
.w2-rec { display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.w2-recrow { display: grid; grid-template-columns: 112px minmax(0, 1fr) 230px; gap: 8px; align-items: center; font-size: 13px; }
.w2-recrow .w2-kind { font-size: 11.5px; text-align: center; padding: 1px 6px; }
.w2-recrow.ov .w2-sel { border-color: var(--lilac); }
.w2-sel { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
@media (max-width: 900px) { .w2-checks li, .w2-recrow { grid-template-columns: 1fr; } }

/* The worksheet: the questions for the RM, sent as one message; the deal-breaker first (RKPF 20 Oct 2026) */
.w2-bask { border: 1px solid color-mix(in srgb, var(--sky) 45%, transparent); background: var(--sky-bg); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.w2-bask-h { font-weight: 700; color: var(--sky); }
.w2-bask ol { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
.w2-bask a { color: var(--ink); font-weight: 600; }
.w2-row.s-queued .w2-mark { background: var(--sky-bg); border-color: var(--sky); color: var(--sky); font-size: 11px; }
.w2-start { border-left: 3px solid var(--rose); background: var(--rose-bg); padding: 8px 12px; border-radius: 6px; line-height: 1.5; }

/* Still needed on the CAM, one click into a question for the RM / customer (RKPF 20 Oct 2026) */
.w2-need .chip { text-align: left; white-space: normal; line-height: 1.4; max-width: 100%; }
.w2-need .chip.on { opacity: .6; }

/* The worksheet list as a floater (RKPF 20 Oct 2026: "make it like a floater which collapses ... so that the question gets a bigger
   part of the screen"): folded to numbered circles beside the card; it opens over the card when the mouse (or the keyboard) is on it */
@media (min-width: 1101px) {
  .w2.w2-float { grid-template-columns: 56px minmax(0, 1fr); }
  .w2-float .w2-list { position: sticky; top: 70px; z-index: 40; width: 56px; max-height: calc(100vh - 170px); overflow: hidden; align-content: start;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 8px 6px; transition: width .16s ease, box-shadow .16s ease; }
  .w2-float .w2-list:not(.w2-shut):is(:hover, :focus-within) { width: 360px; overflow-y: auto; box-shadow: 0 16px 38px rgba(15, 23, 42, .2); padding: 10px 10px; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) > :not(.w2-g):not(.w2-prog) { display: none; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-prog { font-size: 0; gap: 4px; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-prog > :not(.w2-bar) { display: none; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut)::before { content: attr(data-short); font-size: 11.5px; font-weight: 700; text-align: center; color: var(--ink-2); }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-prog .w2-bar { height: 5px; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-gh { font-size: 0; padding: 4px 0 0; border-top: 1px solid var(--line); }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-row { grid-template-columns: 1fr; padding: 6px 0; justify-items: center; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-row > :not(.w2-mark) { display: none; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-mark { width: 26px; height: 26px; font-size: 11.5px; }
  .w2-float .w2-list .w2-row { white-space: normal; }
  .w2-float .w2-list:is(:not(:hover):not(:focus-within), .w2-shut) .w2-row.on .w2-mark { box-shadow: 0 0 0 3px color-mix(in srgb, var(--lilac) 45%, transparent); }
  /* a number in each open circle, to find the issue again */
  .w2-float .w2-list { counter-reset: w2n; }
  .w2-float .w2-row { counter-increment: w2n; }
  .w2-float .w2-mark:empty::before { content: counter(w2n); color: var(--ink-2); }
  .w2-float .w2-list:not(.w2-shut):is(:hover, :focus-within)::before { content: none; }
}

/* The worksheet: documents docked beside the question; the RM's reply back on its issue (RKPF 20 Oct 2026) */
.wsd-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.wsd-tab { flex: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.wsd-tab.on { background: color-mix(in srgb, var(--lilac) 14%, var(--surface)); color: var(--ink); border-color: var(--lilac); font-weight: 600; }
.wsd-tab.new { border-color: var(--sky); color: var(--sky); }
body.split .w2.w2-float { padding-right: 8px; }
.w2-reply { border: 1px solid color-mix(in srgb, var(--sky) 50%, transparent); background: var(--sky-bg); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; margin-bottom: 4px; }
.w2-reply-t { font-size: 15px; line-height: 1.55; }
.w2-wait { border-left: 3px solid var(--sky); background: var(--surface-2); padding: 8px 12px; border-radius: 6px; line-height: 1.5; margin-bottom: 4px; }
.w2-replied-n { color: var(--sky); font-weight: 650; }
.w2-rtag { color: var(--sky); font-size: 11.5px; font-weight: 650; }
.w2-row.s-replied .w2-mark { background: var(--sky); border-color: var(--sky); color: #fff; }
body.split .aifloat:not(.casebar-row *) { right: calc(min(46vw, 760px) + 18px); } /* Ask AI stays clear of a document docked on the right */

/* The worksheet's side pieces in their places (RKPF 20 Oct 2026) */
.ws-foot .ws-readline { flex-basis: 100%; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.ws-foot .ws-readline.un strong { color: var(--butter); }
.ws-foot .ws-readline a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.cam-ws-head .ws-cmp { margin-left: auto; }
.ws-earlier { margin: 0 16px 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.ws-earlier > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }

/* Conditions ticked in the Recommend approval box (RKPF 20 Oct 2026) */
.dec-conds { border-left: 3px solid var(--lilac); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
.dec-conds-h { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.dec-cond { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.dec-cond input { margin-top: 3px; }

/* One screen for a question (RKPF 20 Oct 2026: "to answer, the person has to scroll down, and to refer to something, go back up"):
   on a wide card, the reading on the left and the decision on the right, which stays in view while the left scrolls with the page.
   A narrow card (a document docked beside, a small laptop) keeps one column, made compact. */
.w2-card { container-type: inline-size; gap: 10px; padding: 14px 18px 16px; }
.w2-cols { display: grid; gap: 14px; }
.w2-read { display: grid; gap: 12px; align-content: start; min-width: 0; }
.w2-act { min-width: 0; }
@container (min-width: 860px) {
  .w2-cols { grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr); gap: 20px; align-items: start; }
  .w2-act { position: sticky; top: 76px; max-height: calc(100vh - 190px); overflow-y: auto; padding: 0 2px 4px 18px; border-left: 1px solid var(--line); }
  .w2-act .w2-decide { border-top: 0; padding-top: 0; }
  .w2-act .w2-recrow { grid-template-columns: 96px minmax(0, 1fr); }
  .w2-act .w2-recrow .w2-sel { grid-column: 1 / -1; }
}
/* tighter reading */
.w2-ititle { font-size: 17px; margin: 0; }
.w2-start { padding: 6px 10px; font-size: 13px; }
.w2-checks { gap: 5px; }
.w2-checks li { padding: 6px 9px; font-size: 13.5px; grid-template-columns: 96px minmax(0, 1fr) auto; }
.w2-problem { font-size: 16.5px; line-height: 1.45; }
.w2-todo { font-size: 14px; line-height: 1.5; padding: 8px 11px; }
.w2-ev { gap: 6px; }
.w2-evd { padding: 4px 10px; margin-bottom: 0; }
.w2-evd > summary { font-size: 13.5px; }
.w2-terms > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.w2-terms[open] > summary { margin-bottom: 6px; }
.w2-note { min-height: 84px; }
.w2-outs { gap: 6px; }
.w2-out { padding: 6px 11px; font-size: 13.5px; }
.ws-foot .ws-readbtn { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-foot .ws-readbtn.un { border-color: color-mix(in srgb, var(--butter) 60%, transparent); color: var(--butter); }
.ws-foot { padding: 8px 16px; }
.ws-foot .ws-track { width: 70px; }
.w2-miss { display: grid; gap: 8px; }
.w2-miss-l { display: flex; flex-wrap: wrap; gap: 6px; }
.w2-miss-i { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.w2-miss-i.s-done { color: var(--mint); border-color: color-mix(in srgb, var(--mint) 50%, transparent); }
.w2-checks li .w2-lid { grid-column: 2 / -1; font-size: 13px; }
.w2-checks li .w2-lid > summary { cursor: pointer; color: var(--muted); font-size: 12px; width: max-content; }
.w2-checks li .w2-lid[open] > summary { margin-bottom: 4px; }
.w2-factbtn { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 12px; color: var(--lilac); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.w2-checks li .w2-lid[hidden] { display: none; }
.w2-checks li .w2-lid { padding-top: 4px; }

/* ===== The worksheet review fixes (RKPF 20 Oct 2026, docs/CM-WORKSHEET-REVIEW-20-OCT.md) ===== */
/* 1: the Save row always in view at the bottom of the decision column; the per-check list as one line */
.w2-saverow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: var(--surface); padding: 10px 0 2px; border-top: 1px solid var(--line); margin-top: 2px; }
.w2-kept { font-size: 11.5px; color: var(--mint); }
.w2-recsum { font-size: 12.5px; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
/* 2: Ask AI sits in the bottom bar's right end on the worksheet, never over the card */
body:has(.w2) .aifloat:not(.casebar-row *) { bottom: 12px; }
body:has(.w2) .aifloat:not(.casebar-row *) .aifab { padding: 8px 16px; font-size: 13.5px; }
.cam-ws .ws-foot { padding-right: 150px; }
/* 3: the top of the CAM made short on the worksheet */
.cam-work .cam-top { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.cam-work .cam-top .stale-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cam-work .cam-band { padding: 8px 12px; }
.cam-progs > summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.cam-progs[open] > summary { margin-bottom: 6px; }
/* 8: Reject in red, last */
.w2-out.stop { border-color: color-mix(in srgb, var(--rose) 55%, transparent); color: var(--rose); }
.w2-out.stop.on { background: var(--rose-bg); border-color: var(--rose); }
/* 11: what each check of a decided issue was saved as */
.w2-saved { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.w2-saved li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.w2-saved li .w2-kind { font-size: 11.5px; text-align: center; padding: 1px 6px; }
.w2-saved li strong { color: var(--mint); font-size: 12.5px; white-space: nowrap; }
/* 12: the close */
.w2-end { border: 1px solid color-mix(in srgb, var(--mint) 50%, transparent); background: color-mix(in srgb, var(--mint) 10%, var(--surface)); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
/* 15: still-needed chips one line each (the full text on hover and when added) */
.w2-need .chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; text-align: left; }
@container (min-width: 860px) { .w2-act .w2-saverow { position: sticky; bottom: 0; z-index: 2; } } /* sticky only inside the scrolling decision column */
/* 3 (more): the verdict band in one line on the worksheet; the folded list stays under the bottom bar */
.cam-work .cam-band { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.cam-work .cam-band .cam-band-v .small { display: none; }
.cam-work .cam-band .cam-band-f { flex: 1; }
.w2-float .w2-list { z-index: 14; }

/* ===== End-to-end CM review (RKPF 20 Oct 2026, docs/CM-END-TO-END-REVIEW-20-OCT.md) ===== */
/* TAT on two levels: the holder's clock and the case's */
.tat2 { display: grid; gap: 2px; font-size: 12px; line-height: 1.35; white-space: nowrap; }
.tat2-now { font-weight: 600; color: var(--ink-2); }
.tat2-now.mine.ok { color: var(--mint); } .tat2-now.mine.warn { color: var(--butter); } .tat2-now.mine.bad { color: var(--rose); }
.tat2-now:not(.mine).bad { color: color-mix(in srgb, var(--rose) 70%, var(--muted)); font-weight: 500; }
.tat2-co { color: var(--muted); } .tat2-co.bad { color: var(--rose); } .tat2-co.warn { color: var(--butter); } .tat2-co.none { font-style: italic; }
/* I2 / review #22 */
.fresh-chip { font-size: 11.5px; color: var(--sky); font-weight: 600; margin-top: 2px; }
.since-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--sky) 45%, transparent); background: var(--sky-bg); font-size: 13.5px; }
.doc-more { gap: 6px; margin-bottom: 10px; align-items: center; }
/* #10: one back arrow and one name - the bar's own only once the header has scrolled away */
body.cm-side .casebar:not(.stuck) .casebar-back { display: none; }
.head-tat2 .tat2 { padding: 2px 10px; border-left: 1px solid var(--line); }
.clist .vword { white-space: normal; display: inline-block; max-width: 120px; line-height: 1.3; } /* the full verdict words wrap (review #4) */
/* Integrations - the credit manager's view (20 Oct 2026) */
.integ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 20px; }
.integ-k { font-weight: 650; font-size: 13px; color: var(--ink-2); margin-bottom: 2px; }
.integ-cm ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
/* I5: what would make it work */
.w2-fix { border: 1px solid color-mix(in srgb, var(--sky) 45%, transparent); background: var(--sky-bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; }
.w2-fix ul { margin: 4px 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13.5px; line-height: 1.5; }
.prow[hidden] { display: none !important; }
.desk-need { padding: 8px 12px; border-radius: 8px; background: var(--butter-bg); font-size: 13.5px; } .desk-need[hidden] { display: none; }
.w2-back { border-left: 3px solid var(--rose); background: var(--rose-bg); padding: 8px 12px; border-radius: 6px; line-height: 1.5; }
.ai-src { margin-top: 6px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; } .ai-src .chip { font-size: 11.5px; }
.dec-flags { border-left: 3px solid var(--butter); background: var(--butter-bg); border-radius: 8px; padding: 8px 12px; } .dec-flags ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; } .dec-flags[hidden] { display: none; }
.w2-prec { font-size: 12.5px; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; background: var(--surface-2); margin-top: 4px; } .w2-prec ul { margin: 2px 0 0; padding-left: 16px; }
.tat-nudge { font-size: 13px; margin-bottom: 6px; } .tat-nudge .bad { color: var(--rose); font-weight: 650; } .tat-nudge a { font-weight: 650; }
.wsd-look { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12px; } .wsd-look .chip { font-size: 11.5px; cursor: pointer; }
.w2-said { font-size: 13px; padding: 6px 0 0; } .w2-said ul { margin: 2px 0 0; padding-left: 18px; }
.w2-counter { border-left: 3px solid var(--lilac); background: color-mix(in srgb, var(--lilac) 9%, var(--surface)); border-radius: 8px; padding: 8px 12px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }

/* ===== The credit desk as one board (RKPF 20 Oct 2026, docs/CM-CREDIT-DESK-REVIEW-20-OCT.md) ===== */
.dk-group { display: grid; gap: 6px; }
.dk-gh { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.dk-tile { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-left: 4px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; }
.dk-tile:hover { background: var(--surface-2); }
.dk-tile.on { outline: 2px solid var(--lilac); }
.dk-tile.t-bad { border-left-color: var(--rose); } .dk-tile.t-warn { border-left-color: var(--butter); } .dk-tile.t-good { border-left-color: var(--mint); } .dk-tile.t-info { border-left-color: var(--sky); }
.dk-t { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.dk-tile.t-bad .gl-dot { background: var(--rose); } .dk-tile.t-warn .gl-dot { background: var(--butter); } .dk-tile.t-good .gl-dot { background: var(--mint); } .dk-tile.t-info .gl-dot { background: var(--sky); }
.dk-s { font-size: 13px; }
.dk-sub { font-size: 12px; color: var(--muted); line-height: 1.45; }
.dkpanel { width: min(46vw, 760px); }
body.split:has(.dkpanel) #view { margin-right: min(46vw, 760px); }
.dkpanel-body { flex: 1; min-height: 0; overflow: auto; }
.dkpanel-body > .card, .dkpanel-body > .stack > .card { box-shadow: none; }
.dk-prev { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; background: var(--surface-2); }
.dk-skip { border-left: 3px solid var(--butter); padding: 6px 10px; background: var(--butter-bg); border-radius: 6px; } .dk-skip ul { margin: 4px 0; padding-left: 18px; }
.dk-pdq { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; } .dk-pdq > summary { cursor: pointer; font-weight: 600; } .dk-pdq ol { margin: 6px 0; padding-left: 20px; font-size: 13.5px; line-height: 1.5; }
.op-ws { opacity: .85; }
.w2-pd { border-left: 3px solid var(--lilac); padding: 6px 10px; border-radius: 6px; background: var(--surface-2); margin-bottom: 6px; } .w2-pd ul { margin: 2px 0 0; padding-left: 18px; font-size: 13px; } .w2-pd li.bad { color: var(--rose); }
/* the Worksheet column had no width left in the fixed table (light-mode recheck, 20 Oct 2026) */
.clist .col-case { width: 23%; } .clist .col-verdict { width: 10%; } .clist .col-ws { width: 9%; } .clist .col-stage { width: 12%; } .clist .col-tat { width: 12%; }
/* light-mode recheck (20 Oct 2026) */
.w2-ititle { color: var(--ink); font-weight: 650; }
.w2-note, .w2-note::placeholder, .ws-note::placeholder { font-family: inherit; }
.cam-ws .ws-foot { padding-right: 130px; gap: 8px; }

/* ===== The credit desk as a work list (RKPF 20 Oct 2026) ===== */
.dk2 { gap: 16px; }
.dk-sec { display: grid; gap: 6px; }
.dk-sec-h { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 14.5px; }
.dk-n { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.dkl-list { display: grid; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.dkl { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.dkl:first-child { border-top: 0; }
.dkl .gl-dot { align-self: start; margin-top: 6px; }
.dkl.t-bad .gl-dot { background: var(--rose); } .dkl.t-warn .gl-dot { background: var(--butter); } .dkl.t-info .gl-dot { background: var(--sky); } .dkl.t-good .gl-dot { background: var(--mint); }
.dkl-t { font-weight: 600; }
.dkl-w { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.dkl.opt .dkl-t { font-weight: 500; color: var(--ink-2); }
.dk-empty { padding: 4px 2px; }
.dk-all { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dk-row { display: grid; grid-template-columns: 14px 220px 260px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 0; border-top: 1px solid var(--line); padding: 7px 12px; cursor: pointer; }
.dk-row:first-child { border-top: 0; } .dk-row:hover, .dk-row.on { background: var(--surface-2); }
.dk-row.t-bad .gl-dot { background: var(--rose); } .dk-row.t-warn .gl-dot { background: var(--butter); } .dk-row.t-info .gl-dot { background: var(--sky); } .dk-row.t-good .gl-dot { background: var(--mint); }
.dk-row-t { font-weight: 600; } .dk-row-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.split .dk-row { grid-template-columns: 14px 150px minmax(0, 1fr); } body.split .dk-row-sub { display: none; }
/* with a panel or document docked on the right, Ask AI sits small in the panel's bottom corner - not over the page's buttons */
body.split .aifloat:not(.casebar-row *) { right: 16px !important; bottom: 12px !important; }
body.split .aifloat:not(.casebar-row *) .aifab { padding: 6px 12px; font-size: 12.5px; }
.dkpanel-body, .docside-view { padding-bottom: 48px; }
.kpis .kpi .v { font-size: clamp(20px, 1.9vw, 30px); white-space: nowrap; } /* a long amount fits its card (light-mode recheck) */

/* ===== The desk as the evidence for each issue (RKPF 20 Oct 2026) ===== */
.dk3 { gap: 12px; }
.dk-house { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.dki-list { display: grid; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--surface); }
.dki { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); border-left: 4px solid var(--mint); }
.dki:first-child { border-top: 0; }
.dki.r-0 { border-left-color: var(--butter); } .dki.r-1 { border-left-color: var(--sky); }
.dki-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.dki-t { font-weight: 650; font-size: 15px; }
.dki-ws { font-size: 12.5px; color: var(--muted); } .dki-ws.ok { color: var(--mint); font-weight: 600; }
.dki-st { margin-left: auto; font-size: 12.5px; font-weight: 650; } .dki-st.r-0 { color: var(--butter); } .dki-st.r-1 { color: var(--sky); } .dki-st.r-2 { color: var(--mint); }
.dki-ev { display: flex; flex-wrap: wrap; gap: 6px; }
.dkc { display: inline-flex; align-items: baseline; gap: 6px; font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.dkc:hover { background: var(--surface-2); }
.dkc-s { font-weight: 650; } .dkc-w { color: var(--ink-2); } .dkc-a { font-weight: 650; color: var(--go-text, #3730a3); }
.dkc.t-warn { border-color: color-mix(in srgb, var(--butter) 55%, transparent); background: var(--butter-bg); }
.dkc.t-bad { border-color: color-mix(in srgb, var(--rose) 55%, transparent); background: var(--rose-bg); }
.dkc.t-good { border-color: color-mix(in srgb, var(--mint) 45%, transparent); }
.dkc.t-info { border-color: color-mix(in srgb, var(--sky) 45%, transparent); background: var(--sky-bg); }
.dkc-new { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--sky); border-radius: 99px; padding: 0 6px; }
.dk-ref > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; } .dk-ref[open] > summary { margin-bottom: 6px; }
/* a finding (points the analyser raised here) is not a gap - neutral, the count in bold; a gap stays amber and dashed */
.dkc.t-pt { border-color: var(--line-strong); background: var(--surface); } .dkc.t-pt .dkc-w { color: var(--ink); font-weight: 600; }
.dkc.t-warn { border-style: dashed; }
.dk3 .dk-house .linkbtn { color: var(--ink-2); }

/* ===== Credit desk: outside checks + analysers with readable reports (RKPF 20 Oct 2026) ===== */
.dk5 { gap: 18px; }
.dk-part { display: grid; gap: 8px; }
.dk-ph { display: flex; align-items: baseline; gap: 12px; } .dk-ph h2 { margin: 0; font-size: 17px; }
.dko-list { display: grid; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--surface); }
.dko { border-top: 1px solid var(--line); } .dko:first-child { border-top: 0; }
.dko-r { display: grid; grid-template-columns: 14px 260px minmax(0, 1fr) auto 56px; gap: 12px; align-items: center; padding: 10px 14px; }
.dko.t-bad .gl-dot { background: var(--rose); } .dko.t-warn .gl-dot { background: var(--butter); } .dko.t-info .gl-dot { background: var(--sky); } .dko.t-good .gl-dot { background: var(--mint); }
.dko-s { font-size: 13.5px; color: var(--ink-2); }
.dko.t-warn .dko-s { color: var(--ink); } .dko.t-bad .dko-s { color: var(--rose); font-weight: 600; }
.dko-d { padding: 4px 16px 14px 40px; display: grid; gap: 8px; background: var(--surface-2); }
.dko.open { background: var(--surface-2); }
.dkr { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.dkr-i { display: grid; gap: 2px; min-width: 150px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.dkr-i.need { border-color: color-mix(in srgb, var(--butter) 60%, transparent); background: var(--butter-bg); }
.dkr-n { font-weight: 650; font-size: 13.5px; } .dkr-s { font-size: 12px; color: var(--muted); } .dkr-w { color: var(--butter); font-weight: 600; }
.dkr-i .btn, .dkr-i .linkbtn { justify-self: start; margin-top: 2px; }
.dkr-all { align-self: center; }
.dka-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-top: 6px; }
.dka-tabs button { font: inherit; font-size: 14px; border: 0; background: none; padding: 8px 14px; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.dka-tabs button.on { color: var(--ink); font-weight: 650; border-bottom-color: var(--go, #4f46e5); }
.dka-tabs .count { font-size: 11px; background: var(--surface-2); border-radius: 99px; padding: 0 6px; }
.dka { display: grid; gap: 16px; padding: 4px 2px; max-width: 1100px; }
.dka-top { display: grid; gap: 2px; } .dka-h { font-size: 18px; font-weight: 650; }
.dka-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.dka-fig { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.dka-fig .v { font-size: 19px; font-weight: 650; } .dka-fig .l { font-size: 12.5px; color: var(--ink-2); } .dka-fig .n { font-size: 11.5px; color: var(--muted); }
.dka-sec { display: grid; gap: 8px; }
.dka-st { font-size: 13px; font-weight: 700; color: var(--muted); cursor: default; }
details.dka-sec > summary.dka-st { cursor: pointer; }
.dka-sh { font-size: 13px; font-weight: 650; margin: 2px 0 4px; } .dka-sh.bad { color: var(--rose); } .dka-sh.warn { color: var(--butter); }
details > summary.dka-sh { cursor: pointer; }
.dkf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dkf { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 8px; padding: 8px 12px; background: var(--surface); display: grid; gap: 3px; }
.dkf.s-high { border-left-color: var(--rose); } .dkf.s-medium { border-left-color: var(--butter); }
.dkf-t { font-weight: 650; } .dkf-d { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.dkf-l { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.dkf-op { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; }
.dkf-yn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; width: 26px; height: 22px; cursor: pointer; font: inherit; font-size: 12px; color: var(--ink-2); }
.dkf-yn:hover { background: var(--surface-2); color: var(--ink); }
.dka-pol td { vertical-align: top; } .dka-pol td:first-child { width: 42%; }

/* ===== The analysers read question by question (RKPF 20 Oct 2026) - each question: a picture of the data, the facts, the policy, the flags ===== */
.dkq-wrap { max-width: 1240px; gap: 14px; }
.dkq-nav { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 6px 0; }
.dkq-nav button { font: inherit; font-size: 13px; display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 4px 12px 4px 10px; cursor: pointer; }
.dkq-nav button:hover { background: var(--hover); }
.dkq-nav .count { font-size: 11px; font-weight: 700; background: var(--surface-2); border-radius: 99px; padding: 0 6px; }
.dkq-nav .t-bad .count { background: var(--rose-bg); color: var(--rose); } .dkq-nav .t-warn .count { background: var(--butter-bg); color: var(--butter); }
.dkq-nav .t-bad .gl-dot, .dkq.t-bad > .dkq-h .gl-dot, .dkq-ck.t-bad .gl-dot { background: var(--rose); }
.dkq-nav .t-warn .gl-dot, .dkq.t-warn > .dkq-h .gl-dot { background: var(--butter); }
.dkq-nav .t-good .gl-dot, .dkq.t-good > .dkq-h .gl-dot, .dkq-ck.t-good .gl-dot { background: var(--mint); }
.dkq { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px 16px; display: grid; gap: 12px; scroll-margin-top: 54px; container-type: inline-size; }
.dkq.t-bad { border-top: 3px solid var(--rose); } .dkq.t-warn { border-top: 3px solid var(--butter); }
.dkq-h { display: flex; align-items: center; gap: 10px; }
.dkq-h h3 { margin: 0; font-size: 16.5px; font-weight: 650; flex: 1; letter-spacing: -.005em; }
.dkq-pill { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dkq-pill.t-bad { color: var(--rose); } .dkq-pill.t-warn { color: var(--butter); } .dkq-pill.t-good { color: var(--mint); }
.dkq-b { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dkq-b.nopic { grid-template-columns: 1fr; }
@container (max-width: 860px) { .dkq-b { grid-template-columns: 1fr; } }
.dkq-pic, .dkq-side { display: grid; gap: 12px; min-width: 0; }
.dkq-mini { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.dkq-sub { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.dkq-facts { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; }
.dkq-none { padding: 10px 0; }
.dkq-svg { width: 100%; height: auto; max-height: 230px; display: block; overflow: visible; }
.dkq-svg .gl { stroke: var(--line); stroke-width: 1; } .dkq-svg .ax { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.dkq-svg .hit { fill: transparent; } .dkq-svg .bar:hover .hit { fill: var(--hover); }
.dkq-svg .s1, .dkq-leg i.s1, .dkq-hbf.s1 { fill: var(--sky); background: var(--sky); }
.dkq-svg .s2, .dkq-leg i.s2, .dkq-hbf.s2 { fill: var(--mint); background: var(--mint); }
.dkq-svg .s3, .dkq-leg i.s3, .dkq-hbf.s3 { fill: var(--line-strong); background: var(--line-strong); }
.dkq-svg .s4, .dkq-leg i.s4, .dkq-hbf.s4 { fill: var(--lilac); background: var(--lilac); }
.dkq-svg .s5, .dkq-leg i.s5, .dkq-hbf.s5 { fill: var(--butter); background: var(--butter); }
.dkq-svg .ln.l1 { fill: none; stroke: var(--accent); stroke-width: 2; } .dkq-svg .pt.l1 { fill: var(--accent); }
.dkq-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.dkq-leg span { display: inline-flex; align-items: center; gap: 5px; }
.dkq-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.dkq-leg i.ln.l1 { height: 3px; width: 14px; background: var(--accent); }
.dkq-hb { display: grid; gap: 5px; }
.dkq-hbr { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; }
.dkq-hbl { display: flex; gap: 5px; align-items: center; min-width: 0; } .dkq-hbl .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dkq-hbt { background: var(--surface-2); border-radius: 4px; height: 12px; overflow: hidden; } .dkq-hbf { height: 100%; border-radius: 4px; }
.dkq-hbv { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; } .dkq-hbv .muted { font-weight: 400; }
.dkq-tag { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 99px; padding: 0 5px; white-space: nowrap; }
.dkq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @container (max-width: 640px) { .dkq-two { grid-template-columns: 1fr; } }
.dkq-tw { overflow-x: auto; }
.dkq-t { font-size: 12.5px; } .dkq-t td, .dkq-t th { padding: 4px 8px; } .dkq-t tr.dim td { color: var(--muted); }
.dkq-t.bad td:last-child, .dkq-t tr.bad td { color: var(--rose); } .dkq-t tr.warnrow td:last-child { color: var(--butter); font-weight: 600; }
.dkq-heat { font-size: 12px; border-collapse: separate; border-spacing: 2px; } .dkq-heat th { font-weight: 600; color: var(--muted); font-size: 11px; padding: 2px 6px; }
.dkq-heat td { padding: 3px 6px; text-align: right; font-variant-numeric: tabular-nums; border-radius: 4px; background: color-mix(in srgb, var(--sky) calc(var(--a, 0) * 100%), transparent); }
.dkq-heat td:first-child { text-align: left; background: none; color: var(--ink-2); white-space: nowrap; }
.dkq-cal { display: grid; gap: 3px; overflow-x: auto; }
.dkq-cal-r { display: grid; grid-template-columns: 150px repeat(var(--n), minmax(14px, 1fr)); gap: 3px; align-items: center; }
.dkq-cal-r .lb { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dkq-cal-r .mh { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: visible; }
.dkq-cal .c, .dkq-leg i.c { height: 18px; border-radius: 3px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.dkq-leg i.c { height: 10px; }
.dkq-cal .c.ok, .dkq-leg i.c.ok { background: var(--mint); border: 0; } .dkq-cal .c.lateish, .dkq-leg i.c.lateish { background: var(--butter); border: 0; opacity: .6; }
.dkq-cal .c.late, .dkq-leg i.c.late { background: var(--rose); border: 0; } .dkq-cal .c.nil, .dkq-leg i.c.nil { background: var(--line-strong); border: 0; }
.dkq-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.dkq-person { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; background: var(--bg); }
.dkq-person .nm { font-weight: 650; font-size: 13px; } .dkq-person .sc { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.dkq-pk { display: grid; gap: 1px; margin-top: 6px; font-size: 12px; } .dkq-pk > div { display: flex; justify-content: space-between; gap: 8px; } .dkq-pk .k { color: var(--muted); } .dkq-pk .bad span:last-child { color: var(--rose); font-weight: 600; }
.dkq-rules { display: grid; gap: 6px; }
.dkq-rule { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: start; font-size: 13px; } .dkq-rule .chip { justify-self: start; } .dkq-rule.r2 { opacity: .8; }
.dkq-rt { font-weight: 600; }
.dkq-flags { display: grid; gap: 6px; } .dkq-flags details > summary { cursor: pointer; margin: 2px 0 6px; }
.dkf-sev { font-size: 11px; font-weight: 700; margin-right: 8px; color: var(--muted); } .dkf.s-high .dkf-sev { color: var(--rose); } .dkf.s-medium .dkf-sev { color: var(--butter); }
.dkq-ev { margin: 2px 0; padding-left: 18px; font-size: 13px; display: grid; gap: 2px; }
.dkq-asks { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; }
.dkq-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.dkq-ck { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; gap: 3px; } .dkq-ck.t-bad { border-color: color-mix(in srgb, var(--rose) 45%, var(--line)); background: var(--rose-bg); }
.dkq-ck.t-n { opacity: .75; } .dkq-ck .top { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; } .dkq-ck .top strong { font-size: 13px; }
.dkq-t td { white-space: nowrap; } .dkq-t td:first-child { white-space: normal; min-width: 110px; }
.dkq-t td:nth-child(2) { white-space: normal; }
.dkq-rule { grid-template-columns: 78px 1fr; }
.dkq-cal-r.head .yr { font-size: 10.5px; font-weight: 650; color: var(--ink-2); border-left: 1px solid var(--line-strong); padding-left: 4px; white-space: nowrap; overflow: hidden; }
.dkq-cal-r.head .mh { text-align: center; }
.dkq-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; } .dkq-clamp.open { display: block; }
.dkq-clamp:not(.open)::after { content: ''; }
.dkf-t .chip { margin-right: 8px; font-size: 11px; vertical-align: 1px; }

/* ===== Decisions tab review (RKPF 20 Oct 2026): the call takes the main column; deferrals shrink to the side ===== */
.decgrid.dec2 { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
@media (max-width: 1000px) { .decgrid.dec2 { grid-template-columns: 1fr; } }
.dec-acts { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.dec-act { display: grid; gap: 3px; justify-items: start; }
.dec-wsline { font-size: 14px; line-height: 1.5; color: var(--ink); }
.dec-ws .dec-ws-n { font-size: 12px; color: var(--muted); }
.dec-devs { display: grid; gap: 6px; }
.dec-dev { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: start; font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 6px; }
.dec-dev .chip { justify-self: start; }
.dtr-list { display: grid; gap: 0; }
.dtr { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.dtr:first-child { border-top: 0; }
.dtr-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--line-strong); }
.dtr-decision .dtr-dot { background: var(--lilac); } .dtr-query .dtr-dot { background: var(--butter); } .dtr-reply .dtr-dot { background: var(--mint); } .dtr-stage .dtr-dot { background: var(--sky); }
.dec-goes { color: var(--ink-2); margin: -2px 0 4px; }
.dec-extra { display: grid; gap: 10px; }
.dec-sanc { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; background: var(--surface); }
.dec-sanc-g { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 13px; }
.dec-sanc-g > div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.dec-sanc-g .k { color: var(--muted); } .dec-sanc-g .bad span:last-child { color: var(--rose); font-weight: 600; } .dec-sanc-g .warn span:last-child { color: var(--butter); font-weight: 600; }
.dec-prec { border-left: 3px solid var(--sky); background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.dkq-track td.paid { background: color-mix(in srgb, var(--mint) 22%, transparent); color: var(--ink); }
.dkq-track td.miss { background: color-mix(in srgb, var(--rose) 22%, transparent); }
.dkq-track td.bnc { background: color-mix(in srgb, var(--butter) 30%, transparent); color: var(--ink); } .dkq-track td.bnc.miss { background: color-mix(in srgb, var(--rose) 30%, transparent); color: var(--rose); }
/* Full CAM one page, folded into chapter headers (RKPF 21 Oct 2026) */
.cam-scroll details.ch-fold { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 16px; gap: 0; }
.cam-scroll details.ch-fold[open] { padding-bottom: 16px; }
.cam-scroll details.ch-fold > summary.ch-block-h { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 0; font-size: 15px; font-weight: 650; color: var(--ink); }
.cam-scroll details.ch-fold > summary.ch-block-h::-webkit-details-marker { display: none; }
.cam-scroll details.ch-fold > summary.ch-block-h::after { content: '▸'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.cam-scroll details.ch-fold[open] > summary.ch-block-h::after { transform: rotate(90deg); }
.cam-scroll details.ch-fold > summary:hover .ch-fold-t { text-decoration: underline; }
.cam-scroll details.ch-fold[open] > summary.ch-block-h { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ch-fold-n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink-2); flex: none; }
.ch-fold-all { justify-self: end; }

/* ===== The worksheet rebuilt: read - check - decide (RKPF 21 Oct 2026) ===== */
.w3-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.w3-step { display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--ink); }
.w3-step.on { border-color: var(--tab-on, #4f46e5); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tab-on, #4f46e5) 18%, transparent); }
.w3-step.done { opacity: .75; }
.w3-step-n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--surface-2); color: var(--ink-2); }
.w3-step.on .w3-step-n { background: var(--tab-on, #4f46e5); color: #fff; } .w3-step.done .w3-step-n { background: var(--mint); color: #fff; }
.w3-step-t { display: block; font-weight: 650; font-size: 14px; } .w3-step-s { display: block; font-size: 12px; color: var(--muted); }
.w3 { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .w3 { grid-template-columns: 1fr; } }
.w3-list { position: sticky; top: 56px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 8px; max-height: calc(100vh - 140px); overflow-y: auto; }
.w3-lh { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 8px 6px 4px; }
.w3-row { display: grid; grid-template-columns: 16px 1fr; gap: 2px 6px; align-items: start; text-align: left; font: inherit; font-size: 13px; border: 0; background: none; border-radius: 7px; padding: 6px; cursor: pointer; color: var(--ink); }
.w3-row:hover { background: var(--hover); } .w3-row.on { background: color-mix(in srgb, var(--tab-on, #4f46e5) 10%, var(--surface)); font-weight: 600; }
.w3-row.s-done { color: var(--muted); }
.w3-mark { font-size: 12px; color: var(--mint); } .w3-row.s-ask .w3-mark, .w3-row.s-queued .w3-mark { color: var(--sky); } .w3-row.s-replied .w3-mark { color: var(--butter); }
.w3-rk { grid-column: 2; font-size: 11px; color: var(--muted); } .w3-row.brk.s-open .w3-rk { color: var(--rose); font-weight: 600; }
.w3-bask { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; display: grid; gap: 4px; }
.w3-card { display: grid; gap: 12px; }
.w3-top { display: flex; align-items: center; gap: 10px; } .w3-top h3 { margin: 0; font-size: 19px; font-weight: 650; }
.w3-brk { font-size: 11.5px; font-weight: 700; color: var(--rose); background: var(--rose-bg); border-radius: 99px; padding: 2px 9px; }
.w3-s { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px; display: grid; gap: 10px; }
.w3-sh { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; } .w3-sh .muted { margin-left: auto; font-weight: 400; }
.w3-sn { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex: none; }
.w3-finds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.w3-f { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; font-size: 13.5px; line-height: 1.5; }
.w3-f.s-done { opacity: .6; }
.w3-fk { font-size: 11.5px; font-weight: 650; border-radius: 6px; padding: 2px 6px; background: var(--surface-2); color: var(--ink-2); justify-self: start; }
.w3-fk.k-nogo { background: var(--rose-bg); color: var(--rose); } .w3-fk.k-risk, .w3-fk.k-deviation { background: var(--butter-bg); color: var(--butter); } .w3-fk.k-question { background: var(--sky-bg); color: var(--sky); }
.w3-more { display: inline; } .w3-more > summary { display: inline; cursor: pointer; color: var(--muted); font-size: 12px; margin-left: 6px; }
.w3-more[open] > .w2-pc { margin-top: 6px; }
.w3-how { font-size: 14px; line-height: 1.5; }
.w3-look { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.w3-docs { display: grid; gap: 4px; }
.w3-doc { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }
.w3-doc.seen { background: color-mix(in srgb, var(--mint) 8%, var(--surface)); } .w3-doc-m { color: var(--mint); font-weight: 700; }
.w3-new { font-size: 11px; font-weight: 650; color: var(--sky); margin-left: 6px; }
.w3-dec { border-width: 2px; }
.w3-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.w3-ch { display: grid; gap: 3px; text-align: left; font: inherit; border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--ink); }
.w3-ch strong { font-size: 14px; } .w3-ch span { font-size: 12px; color: var(--muted); }
.w3-ch:hover { background: var(--hover); }
.w3-ch.fine.on { border-color: var(--mint); background: color-mix(in srgb, var(--mint) 10%, var(--surface)); }
.w3-ch.w3-need.on { border-color: var(--sky); background: color-mix(in srgb, var(--sky) 10%, var(--surface)); }
.w3-ch.stop { border-color: color-mix(in srgb, var(--rose) 40%, var(--line)); } .w3-ch.stop strong { color: var(--rose); } .w3-ch.stop.on { border-color: var(--rose); background: var(--rose-bg); }
.w3-body { display: grid; gap: 10px; }
.w3-ta { width: 100%; font: inherit; font-size: 14px; }
.w3-warn { background: var(--butter-bg); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; }
.w3-na { display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.w3-save { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); padding-top: 6px; }
/* the worksheet on one screen (RKPF 21 Oct 2026): a strip of issues that opens on hover, one step open at a time,
   the path in the title row, the CAM header folded to its figures band */
.w3 { grid-template-columns: 52px minmax(0, 1fr); position: relative; }
@media (max-width: 1000px) { .w3 { grid-template-columns: 52px minmax(0, 1fr); } }
.w3-listcell { position: relative; align-self: stretch; }
.w3-list { width: 52px; padding: 6px 4px; transition: width .15s ease, box-shadow .15s ease; z-index: 30; overflow-x: hidden; }
.w3-list:hover, .w3-list:focus-within { width: 300px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.w3-list:not(:hover):not(:focus-within) .w3-rt, .w3-list:not(:hover):not(:focus-within) .w3-rk, .w3-list:not(:hover):not(:focus-within) .w3-bask,
.w3-list:not(:hover):not(:focus-within) .w3-lh { display: none; }
.w3-list:not(:hover):not(:focus-within) .w3-row { grid-template-columns: 1fr; justify-items: center; padding: 6px 0; }
.w3-mark { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); }
.w3-row { grid-template-columns: 26px 1fr; align-items: center; }
.w3-row.on .w3-mark { background: var(--tab-on, #4f46e5); color: #fff; }
.w3-row.brk.s-open .w3-mark { box-shadow: 0 0 0 2px var(--rose); }
.w3-row.s-done .w3-mark { background: var(--mint-bg); color: var(--mint); }
.w3-row .w3-rk { grid-column: 2; }
.cam-ws-head .w3-path { display: flex; gap: 6px; margin: 0; grid-template-columns: none; flex: 1; min-width: 0; }
.cam-ws-head .w3-step { padding: 4px 10px 4px 6px; border-radius: 99px; gap: 6px; }
.cam-ws-head .w3-step-n { width: 20px; height: 20px; font-size: 11px; }
.cam-ws-head .w3-step-t { font-size: 12.5px; } .cam-ws-head .w3-step-s { display: none; }
.cam-ws-head .w3-step.on .w3-step-s { display: inline; margin-left: 6px; font-size: 11.5px; }
.cam-ws-head .w3-step > span:last-child { display: flex; align-items: baseline; }
.w3-fold.shut > :not(.w3-sh) { display: none; }
.w3-fold.shut { padding: 10px 16px; background: var(--surface-2); }
.w3-fold .w3-sh { cursor: pointer; }
.w3-fold.shut .w3-sn { background: var(--line-strong); color: var(--ink-2); }
.w3-nextrow { display: flex; justify-content: flex-end; }
.w3-card { gap: 8px; } .w3-s { padding: 12px 16px; gap: 8px; }
.w3-fold:not(.shut) .w3-finds, .w3-fold:not(.shut) .w3-docs { max-height: 42vh; overflow-y: auto; }
.w3-topfold > :not(.cam-band) { display: none !important; }
.w3-topfold { padding-top: 8px; padding-bottom: 8px; }
.w3-toptg { margin-left: auto; white-space: nowrap; }
.w3-ta { min-height: 52px; resize: vertical; } .w3-body { gap: 8px; } .w3-body .ws-q3 { gap: 4px; }
.w3-ch { padding: 8px 12px; } .w3-warn { padding: 6px 12px; }
.cam-ws-head .w3-path { flex-wrap: nowrap; align-items: center; }
.cam-ws-head .w3-step { flex: none; white-space: nowrap; align-items: center; border-radius: 99px; }
.cam-ws-head .w3-step-t { display: inline; }
.w3-step-c { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.w3-step.on .w3-step-c { color: var(--ink-2); font-weight: 600; }

/* CAM worksheet - the issue bar (21 Oct 2026): replaces the hover strip; read and check side by side, decide below */
.w4-bar { position: sticky; top: 56px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--bg); padding: 8px 0; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.w4-cur { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; min-width: 0; text-align: left; font: inherit; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 7px 12px; cursor: pointer; color: var(--ink); }
.w4-cur:hover, .w4-cur.open { border-color: var(--tab-on, #4f46e5); }
.w4-ct { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.w4-of { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.w4-n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); }
.w4-n.on, .w4-row.on .w4-n { background: var(--tab-on, #4f46e5); color: #fff; }
.w4-pn { white-space: nowrap; }
.w4-prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.w4-dots { display: inline-flex; gap: 3px; }
.w4-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.w4-dots i.brk.s-open { background: var(--rose); } .w4-dots i.s-done { background: var(--mint); } .w4-dots i.s-ask, .w4-dots i.s-queued { background: var(--sky); } .w4-dots i.s-replied { background: var(--butter); }
.w4-dots i.on { outline: 2px solid var(--tab-on, #4f46e5); outline-offset: 1px; }
.w4-panel { flex-basis: 100%; display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .14); max-height: 60vh; overflow-y: auto; }
.w4-gh { font-size: 12.5px; font-weight: 650; color: var(--muted); margin-bottom: 4px; } .w4-gh.brk { color: var(--rose); }
.w4-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px; }
.w4-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; text-align: left; font: inherit; font-size: 13.5px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 6px 8px; cursor: pointer; color: var(--ink); }
.w4-row:hover { background: var(--hover); } .w4-row.on { border-color: var(--tab-on, #4f46e5); font-weight: 600; }
.w4-row.s-done { color: var(--muted); } .w4-row.s-done .w4-n { background: var(--mint-bg); color: var(--mint); }
.w4-row.brk.s-open .w4-n { box-shadow: 0 0 0 2px var(--rose); }
.w4-rs { font-size: 11.5px; color: var(--muted); white-space: nowrap; } .w4-row.s-replied .w4-rs { color: var(--butter); font-weight: 600; }
.w4-card { display: grid; gap: 10px; }
.w4-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.w4-two > .w3-s { max-height: 46vh; overflow-y: auto; }
@media (max-width: 1000px) { .w4-two { grid-template-columns: 1fr; } .w4-prog { display: none; } }
.w4-panel { position: absolute; top: calc(100% - 2px); left: 0; right: 0; z-index: 16; }

/* CAM worksheet as questions (21 Oct 2026): the few questions that decide the loan, each open in place; documents to get below */
.w5-wait { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px; display: grid; gap: 4px; }
.w5-intro { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; font-size: 14px; line-height: 1.5; margin: 2px 0 10px; }
.w5-prog { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.w5-prog .ws-track { width: 120px; }
.w5-list { display: grid; gap: 8px; }
.w5-q { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.w5-q.on { border: 2px solid var(--tab-on, #4f46e5); }
.w5-q.s-done:not(.on) { background: var(--surface-2); }
.w5-qh { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; background: none; border: 0; padding: 12px 16px; cursor: pointer; color: var(--ink); border-radius: 12px; }
.w5-qh:hover { background: var(--hover); }
.w5-n { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--surface-2); color: var(--ink-2); }
.w5-q.on .w5-n { background: var(--tab-on, #4f46e5); color: #fff; }
.w5-n.s-done { background: var(--mint-bg); color: var(--mint); } .w5-n.s-ask, .w5-n.s-queued { background: var(--sky-bg); color: var(--sky); }
.w5-qt { font-size: 15.5px; font-weight: 600; line-height: 1.45; }
.w5-q.s-done:not(.on) .w5-qt { font-weight: 500; color: var(--ink-2); }
.w5-qs { font-size: 12px; color: var(--muted); white-space: nowrap; } .w5-qs.s-ask, .w5-qs.s-queued { color: var(--sky); } .w5-qs.s-done { color: var(--mint); }
.w5-ans1 { padding: 0 16px 12px 56px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.w5-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; padding: 4px 16px 16px 56px; align-items: start; }
@media (max-width: 1100px) { .w5-in { grid-template-columns: 1fr; padding-left: 16px; } }
.w5-h { font-size: 12.5px; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.w5-ev ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; }
.w5-why { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.w5-docs { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 8px; }
.w5-doc { cursor: pointer; } .w5-doc.seen { background: var(--mint-bg); color: var(--mint); }
.w5-checks { margin-top: 8px; font-size: 12.5px; } .w5-checks > summary { cursor: pointer; color: var(--muted); }
.w5-checks ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; line-height: 1.45; }
.w5-dec { display: grid; gap: 8px; align-content: start; background: var(--surface-2); border-radius: 10px; padding: 12px; }
.w5-ch { display: flex; flex-wrap: wrap; gap: 6px; }
.w5-c { font: inherit; font-size: 13.5px; font-weight: 600; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.w5-c:hover { background: var(--hover); }
.w5-c.c-yes.on, .w5-c.c-cond.on { border-color: var(--mint); background: var(--mint-bg); color: var(--mint); }
.w5-c.c-need.on { border-color: var(--sky); background: var(--sky-bg); color: var(--sky); }
.w5-c.c-no { color: var(--rose); } .w5-c.c-no.on { border-color: var(--rose); background: var(--rose-bg); }
.w5-body { display: grid; gap: 6px; } .w5-body .ws-q3 { gap: 4px; }
.w5-save { display: flex; gap: 10px; align-items: center; }
.w5-docsbox { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: grid; gap: 6px; background: var(--surface); }
.w5-dk { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; padding: 6px 0; border-top: 1px solid var(--line); }
.w5-dk.s-done .w5-dk-t { color: var(--muted); text-decoration: line-through; }
.w5-send { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: 13px; padding-top: 6px; }

/* worksheet questions - the 30-point review (21 Oct 2026) */
.w5-in > .w5-dec { position: sticky; top: var(--w5top, 70px); max-height: calc(100vh - var(--w5top, 70px) - 90px); overflow-y: auto; } /* #23 the answer stays in view */
.w5-needs { font-size: 13px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 8px; padding: 6px 10px; line-height: 1.45; } /* #19 */
.w5-quick { color: var(--rose); font-weight: 600; } /* #16 */
.w5-dk { grid-template-columns: 1fr auto; }
.w5-dk-r { grid-column: 1 / -1; }
.w5-dk-r.w5-dec { margin-top: 4px; }
.w5-preview { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; background: var(--surface); } /* #27 */
.w5-preview > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.w5-preview pre { white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.5; margin: 8px 0 0; color: var(--ink-2); }
.w5-intro { display: grid; gap: 2px; justify-content: stretch; }
body:has(.ws-foot) .aifloat { bottom: 12px; right: 34px; } /* #24 in the bottom bar's empty right end - it covers nothing */
body:has(.ws-foot) .aifloat .aifab { padding: 9px 16px; font-size: 13.5px; }
.w5-line { width: 100%; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
/* a saved answer in its parts; a doubt is shown, not hidden (21 Oct 2026) */
.w5-av { display: grid; gap: 6px; }
.w5-av-main { line-height: 1.5; }
.w5-av-qa { font-size: 12.5px; color: var(--ink-2); border-left: 2px solid var(--line-strong); padding-left: 8px; display: grid; gap: 2px; line-height: 1.45; }
.w5-doubt { background: var(--butter-bg); border-left: 3px solid var(--butter); border-radius: 6px; padding: 6px 10px; font-size: 13px; line-height: 1.45; }
.w5-doubt1 { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--butter); }
.w5-qs.doubt { color: var(--butter); font-weight: 600; }
.w5-dk.s-done .w5-dk-t { color: var(--ink-2); text-decoration: none; }
.w5-dk-ok { color: var(--mint); font-weight: 700; } .w5-dk.doubt .w5-dk-ok { color: var(--butter); }
.w5-dk-ans > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); } .w5-dk.doubt .w5-dk-ans > summary { color: var(--butter); font-weight: 600; }
.w5-dk-ans[open] > .w5-av { margin-top: 6px; }
.w5-camasks { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.w5-camasks > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.w5-camasks ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 0; }
.w5-ca { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; line-height: 1.45; padding: 6px 0; border-top: 1px dashed var(--line); }

/* Credit desk: the analysers as clickable cards - one row, the chosen one joined to its findings below (21 Oct 2026) */
.dkr { gap: 10px; }
.dkr-i { cursor: pointer; flex: 1 1 170px; min-width: 170px; gap: 3px; padding: 10px 14px; border-width: 1.5px; transition: border-color .12s, box-shadow .12s; position: relative; }
.dkr-i:hover { border-color: var(--go, #4f46e5); box-shadow: 0 2px 10px rgba(79, 70, 229, .12); }
.dkr-i:focus-visible { outline: 2px solid var(--go, #4f46e5); outline-offset: 2px; }
.dkr-i.on { border-color: var(--go, #4f46e5); background: color-mix(in srgb, var(--go, #4f46e5) 8%, var(--surface)); box-shadow: 0 0 0 1px var(--go, #4f46e5); }
.dkr-i.on::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg); background: color-mix(in srgb, var(--go, #4f46e5) 8%, var(--surface)); border-right: 2px solid var(--go, #4f46e5); border-bottom: 2px solid var(--go, #4f46e5); }
.dkr-n { font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.dkr-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.dkr-v { font-size: 12.5px; font-weight: 650; color: var(--go, #4f46e5); }
.dkr-i.on .dkr-v { color: var(--ink-2); }
.dkr-i .dkr-f .btn, .dkr-i .dkr-f .linkbtn { margin-top: 0; }
.dka-under { border-top: 2px solid var(--go, #4f46e5); margin-top: 12px; padding-top: 6px; }
.dec-chip { cursor: pointer; font: inherit; font-size: 12.5px; border: 1px solid var(--line-strong); background: var(--surface); } /* the CM's Decisions trail in the header (21 Oct 2026) */
.dec-chip:hover { border-color: var(--go, #4f46e5); }
.w5-ccask { border-left-color: var(--sky); background: var(--sky-bg); margin-bottom: 8px; }

/* File & pending, credit (21 Oct 2026): the count in plain figures, what we can fetch ourselves, tick boxes only when selecting */
.pf-line { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.pf-figs { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); }
.pf-fig strong { font-size: 16px; color: var(--ink); } .pf-fig.go strong { color: var(--mint); }
.pf-fetch { display: grid; gap: 8px; border-left: 3px solid var(--mint); }
.pf-rows { display: grid; gap: 0; }
.pf-row { display: grid; grid-template-columns: minmax(160px, 1.1fr) 150px minmax(0, 2fr) auto; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.pf-t { font-weight: 600; } .pf-via { font-weight: 650; color: var(--mint); } .pf-row.r-off .pf-via { color: var(--muted); } .pf-how { color: var(--ink-2); line-height: 1.4; }
@media (max-width: 900px) { .pf-row { grid-template-columns: 1fr auto; } .pf-how { grid-column: 1 / -1; } }
.pf-credit:not(.pf-sel) .psel { display: none; }

/* Questions, credit (21 Oct 2026): one plain line that jumps; compact check cards; the multi-part question one per line */
.q-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; }
.q-jump { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13.5px; border: 0; background: none; cursor: pointer; color: var(--ink-2); padding: 2px 4px; border-radius: 6px; }
.q-jump:hover { background: var(--hover); } .q-jump i { width: 9px; height: 9px; border-radius: 50%; } .q-jump strong { color: var(--ink); }
.qtab .q-chk { display: grid; gap: 3px; padding: 10px 14px; }
.q-chk-q { font-size: 14px; line-height: 1.45; } .q-chk-ai { line-height: 1.45; } .q-chk-b { margin-top: 4px; }
.q-dates { font-size: 11.5px; }
.q-multi { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.q-verify textarea { width: 100%; }
.w5-qa { margin-top: 8px; font-size: 13px; } .w5-qa ul { margin: 2px 0 4px; padding-left: 18px; display: grid; gap: 4px; line-height: 1.45; } /* Q3 */
.pf-later { color: var(--ink-2); line-height: 1.5; border-top: 1px dashed var(--line); padding-top: 6px; } .pf-via-off { font-weight: 650; }
.pf-fetch:not(:has(.pf-rows)) { border-left-color: var(--line-strong); }

/* the answer check's reference from the file (21 Oct 2026) */
.w5-ref { font-size: 13px; background: var(--surface); border-left: 3px solid var(--rose); border-radius: 6px; padding: 6px 10px; margin: 4px 0; line-height: 1.45; }
/* Questions as a record for the CM (21 Oct 2026) */
.qr-sec > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.qr-row { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.qr-q { font-size: 14px; line-height: 1.45; }
