.cw-export-choice {
  display: flex; flex-direction: column; gap: 5px; width: 100%;
  margin-top: 12px; padding: 14px 16px; text-align: left; font: inherit;
  color: #26364c; background: #f5f8fb; border: 1px solid #dce3e9;
  border-radius: 8px; cursor: pointer;
}
.cw-export-choice span { font-size: 12px; color: #526176; }
.cw-export-choice:hover:not(:disabled) { background: #eaf0f7; border-color: #8399b4; }
.cw-export-choice:disabled { opacity: .5; cursor: wait; }
.cw-export-dialog p:empty { display: none; }
.cw-export-dialog p { margin-top: 14px; }
.cw-lender-search {
  position: fixed; inset: auto; margin: 0; padding: 12px;
  width: min(300px, calc(100vw - 24px)); box-sizing: border-box;
  border: 1px solid #dce3e9; border-radius: 12px;
  background: #fffffff5; color: #26364c;
  box-shadow: 0 12px 36px #26364c26; backdrop-filter: blur(16px);
  font: inherit;
}
.cw-lender-search-input {
  width: 100%; box-sizing: border-box; padding: 9px 10px;
  border: 1px solid #dce3e9; border-radius: 7px; font: inherit;
}
.cw-lender-search-list { max-height: min(300px, 40vh); overflow-y: auto; margin-top: 8px; }
.cw-lender-search-result {
  display: block; width: 100%; border: 0; background: transparent;
  color: inherit; text-align: left; padding: 9px 10px; border-radius: 6px;
  font: inherit; cursor: pointer;
}
.cw-lender-search-result:hover, .cw-lender-search-result:focus-visible { background: #edf2f6; }
.cw-shell .cc-aff-success-icon {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  vertical-align: -4px;
  fill: none;
  stroke: #278548;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cw-shell .cc-aff-confirmation {
  flex-shrink: 0;
  overflow: hidden;
  transition: opacity 200ms ease, height 250ms ease 200ms, margin 250ms ease 200ms, padding 250ms ease 200ms;
}
.cw-shell .cc-chat-output > .cc-msg { flex-shrink: 0; }
.cw-shell .cc-aff-confirmation-leaving {
  opacity: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* Workspace views inherit the original tucked-under chat and elevated results
   layout, toolbar, fonts and responsive behaviour from kbAssist.css. */
.cw-shell {
  --cw-paper: #fcfcfa;
  --cw-ink: #26364c;
  --cw-muted: #66758a;
  --cw-line: #dce3e9;
  --cw-tint: #edf2f6;
  --cw-accent: #a62c55;
}
.cw-shell [hidden] { display: none !important; }
.cw-shell .cc-chat { margin-block: 18px; }
/* Relocated shared controls retain their IDs, styling and event handlers.
   Keep the chat's original lower stacking layer and the resize seam intact. */
.cw-shell .cc-chat-head { flex-wrap: nowrap; gap: 8px; flex: 0 0 auto; }
.cw-lending-select { flex: 1 1 auto; min-width: 0; width: 100%; padding: 9px 36px 9px 12px; appearance: none; border: 1px solid #dce1e8; border-radius: 8px; background-color: #ffffffb3; color: #344054; font: inherit; font-size: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 16px 16px; background-position: right 12px center; }
.cw-lending-select:disabled { opacity: .65; cursor: not-allowed; }
.cw-shell select.cw-lending-select:focus,
.cw-shell select.cw-lending-select:focus-visible { outline: none; box-shadow: none; }
.cw-shell select.cw-lending-select:focus-visible { background-color: #edf2f8; }
[data-theme="dark"] .cw-shell select.cw-lending-select:focus-visible { background-color: #26344b; }
[data-theme="dark"] .cw-lending-select { background-color: #1b2338; color: #e4e7ec; border-color: #344054; }
.cw-shell .cc-mode-toggle { flex: 1 1 auto; width: auto; min-width: 0; }
.cw-shell .cc-mode-toggle .cc-mode-opt { font-size: 12px; padding: 6px 3px; }
/* Shared mode handlers retain all three nodes, but only two occupy the track.
   Use the panel class, not the shared three-mode index, for its geometry. */
.cw-shell .cc-mode-glider { width: calc((100% - 8px) / 2); transform: translateX(0); }
.cw-shell .cc-view-browse .cc-mode-glider { transform: translateX(calc(100% + 2px)); }
.cw-shell .cc-view-recent .cc-mode-glider { opacity: 0; }
.cw-shell .cc-chat-head .cc-newsearch {
  flex: 0 0 34px; width: 34px; height: 34px; padding: 7px; margin-left: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.cw-shell .cc-chat-head .cc-newsearch svg { width: 20px; height: 20px; }
.cw-shell .cc-chat-head .cw-recent-toggle {
  flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border: 1px solid transparent;
  border-radius: 7px; color: #475467;
}
.cw-shell .cw-recent-toggle svg { width: 20px; height: 20px; }
.cw-shell .cw-recent-toggle:hover { color: var(--cw-ink); background: var(--cw-tint); }
.cw-shell .cc-recent-q { overflow-wrap: anywhere; }
.cw-recent-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 7px; color: var(--cw-muted); font-size: 11px; }
.cw-ask-again { padding: 2px 0; border: 0; background: transparent; color: var(--cw-ink); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cw-ask-again:hover { color: #334e74; }
.cw-shell .cw-recent-toggle.cc-mode-active {
  color: var(--cw-ink); background: var(--cw-paper); border-color: var(--cw-line);
}
.cw-shell .cc-input { border-color: #b7c4d5; }
.cw-shell .cc-input:focus-within {
  border-color: #b7c4d5;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
}
.cw-shell .cc-input-field { min-height: 42px; }
.cw-shell .cc-input-field::placeholder { color: #69788d; }
.cw-shell .cc-input-actions { flex-wrap: nowrap; gap: 8px; }
.cw-shell .cc-input-actions .cc-toolbar-opt {
  min-width: 0; flex: 1 1 auto; white-space: normal; padding: 0; gap: 5px; font-size: 11px; line-height: 1.4;
}
.cw-shell .cc-input-actions .cc-opt-label { overflow-wrap: anywhere; }
/* Show/Hide chat stays visible at the left of the results toolbar in both states. */
.cw-shell #ccReopen { position: static; flex: 0 0 auto; white-space: nowrap; }
.cw-shell .cc-table-wrap { padding-top: 0; container: cw-results / inline-size; }
.cw-shell .cc-toolbar {
  position: static; display: flex; flex: 0 0 auto; flex-wrap: wrap;
  align-items: center; gap: 6px 12px; padding: 12px 16px;
  border-bottom: 0; min-width: 0;
}
.cw-shell .cc-toolbar > * { min-width: 0; }
.cw-control, .cw-select {
  font: inherit; font-size: 12px; line-height: 1.35; color: var(--cw-ink); background: var(--cw-paper);
  border: 1px solid #ccd6df; border-radius: 6px; min-height: 32px; padding: 6px 10px;
}
.cw-control { cursor: pointer; }
.cw-control:hover { background: var(--cw-tint); }
.cw-control:disabled, .cw-select:disabled { opacity: .55; cursor: not-allowed; }
.cw-control[aria-pressed="true"], .cw-primary { color: #f8fafc; background: #334e74; border-color: #334e74; }
.cw-primary:hover { background: #294366; }
.cw-view-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.cw-view-actions .cw-selection { flex-wrap: nowrap; }
.cw-view-actions .cw-selection { gap: 0; }
.cw-selection > .cw-control:first-child { border-radius: 6px 0 0 6px; }
.cw-selection > .cw-clear-selection { border-radius: 0 6px 6px 0; border-left-color: rgba(255,255,255,.3); min-width: 32px; font-size: 18px; line-height: 1; align-self: stretch; }
.cw-view-actions .cw-control { white-space: nowrap; }
.cw-view-switch { display: inline-flex; border: 1px solid #ccd6df; border-radius: 6px; }
.cw-view-switch .cw-control { border: 0; border-radius: 0; }
.cw-view-switch .cw-control:first-child { border-radius: 5px 0 0 5px; }
.cw-view-switch .cw-control:last-child { border-radius: 0 5px 5px 0; }
.cw-view-switch .cw-control + .cw-control { border-left: 1px solid #ccd6df; }
.cw-select { max-width: min(200px, 100%); }
.cw-shell:not(.cw-table-mode) #ccTable { display: none !important; }
.cw-shell .cc-table { border-spacing: 0 6px; }
.cw-shell .cc-table-empty { padding: 32px; box-sizing: border-box; min-height: 280px; }
.cw-shell .cc-table-empty-title { color: var(--cw-ink); font-size: 20px; letter-spacing: -.3px; }
.cw-shell .cc-table-empty-sub { max-width: 370px; line-height: 1.7; color: var(--cw-muted); }
.cw-region { padding: 0 16px 20px; }
.cw-criteria { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.cw-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; background: #edf2f6; border: 1px solid var(--cw-line); padding: 4px 7px; border-radius: 5px; font-size: 11px; }
.cw-chip .cw-control { min-height: 24px; padding: 2px 6px; background: transparent; border: none; font-size: 11px; }
.cw-chip-label { overflow-wrap: anywhere; }
.cw-status { color: var(--cw-muted); font-size: 12px; line-height: 1.5; margin: 0; padding: 9px 0; }
.cw-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; padding: 0; background: transparent; border: 0; }
.cw-selection-text { font-size: 11px; color: var(--cw-muted); white-space: nowrap; }
.cw-list-head { display: grid; grid-template-columns: minmax(108px, 150px) 105px minmax(80px, 1fr) auto; gap: 14px; padding: 5px 12px; color: var(--cw-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--cw-line); }
.cw-list-head > :last-child { width: 240px; }
.cw-list-head { align-items: baseline; }
.cw-list-head { color: #526176; font-size: 11px; font-weight: 600; }
.cw-aff-heading { display: flex; flex-direction: column; align-items: flex-start; }
.cw-aff-heading .cw-aff-add { text-transform: none; letter-spacing: normal; font-size: 11px; padding-bottom: 4px; }
.cw-actions-heading { padding: 4px 0; line-height: inherit; }
.cw-sort-heading { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.cw-sort-heading:hover, .cw-sort-heading[data-active="true"] { color: var(--cw-ink); }
.cw-sort-arrow { font-size: 13px; }
.cw-sort-heading[data-active="true"],
.cw-shell .cc-sort-btn[data-active="true"] { background: transparent; color: #3759a6; font-weight: 700; }
.cw-lender { border-bottom: 1px solid var(--cw-line); scroll-margin-top: 14px; }
.cw-lender:focus { outline: 2px solid #7188aa; outline-offset: -2px; }
.cw-lender-row { display: grid; grid-template-columns: minmax(108px, 150px) 105px minmax(80px, 1fr) auto; align-items: center; gap: 14px; padding: 13px 12px; }
.cw-lender-row:hover { background: #f5f7f9; }
.cw-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cw-lender-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.cw-check { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; line-height: 1.3; color: var(--cw-ink); cursor: pointer; white-space: nowrap; }
.cw-check input { accent-color: #334e74; width: 16px; height: 16px; margin: 0; flex-shrink: 0; cursor: inherit; }
.cw-notify { color: var(--cw-muted); cursor: not-allowed; }
.cw-shell .cw-notify, .cw-shell .cw-table-notify {
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 11px; line-height: 1.3; color: var(--cw-muted); cursor: not-allowed;
}
.cw-shell :is(.cw-notify input, .cc-notify-check) {
  appearance: none; width: 16px; height: 16px; margin: 0; flex: 0 0 16px;
  border: 1.5px solid #b22c57; border-radius: 3px; background: var(--cw-paper);
  accent-color: #b22c57; opacity: 1; cursor: not-allowed;
}
.cw-shell :is(.cw-notify input, .cc-notify-check):checked {
  background: #b22c57; box-shadow: inset 0 0 0 3px var(--cw-paper);
}
.cw-brand { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cw-brand img { object-fit: contain; object-position: left center; max-width: 108px; height: 29px; }
.cw-brand strong { font-size: 12px; line-height: 1.35; }
.cw-aff { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 650; }
.cw-aff small { color: var(--cw-muted); font-size: 10px; font-weight: 400; }
.cw-aff-na { color: var(--cw-muted); opacity: .65; font-size: 12px; font-weight: 400; }
.cw-shell td.cw-aff-na { color: var(--cw-muted); }
.cw-aff-add { align-self: flex-start; padding: 0; border: 0; background: transparent; color: var(--cw-ink); font: inherit; font-size: 10px; font-weight: 400; text-decoration: underline; cursor: pointer; }
.cw-aff-add:disabled { color: var(--cw-muted); cursor: wait; }
.cw-grade-summary { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cw-ai-button { flex: 0 0 auto; font-weight: 700; color: #3759a6; }
.cw-ai-button:disabled { opacity: .45; cursor: default; }
.cw-ai-summary { grid-column: 3 / -1; min-width: 0; }
.cw-ai-summary-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; color: var(--cw-ink); }
.cw-ai-summary-error { color: #a12c38; }
.cw-shell .cc-table { border-spacing: 0; }
/* Width lock affects only the full table, not the summary or comparison views. */
.cw-toolbar-separator { width: 1px; height: 20px; flex: 0 0 1px; background: var(--cw-line); }
.cw-shell .cc-toolbar .cw-action-icon:disabled { opacity: .35; cursor: default; }
.cw-shell.cw-width-locked .cc-table { width: 100%; min-width: 0; table-layout: fixed; }
.cw-shell.cw-width-locked .cc-table thead th:first-child,
.cw-shell.cw-width-locked .cc-table tbody tr[data-lender-id] > td:first-child { width: 150px; }
.cw-shell.cw-width-locked .cc-table thead th:nth-child(2),
.cw-shell.cw-width-locked .cc-table tbody tr[data-lender-id] > td:nth-child(2) { width: 150px; }
.cw-shell .cc-table .cc-col-notify { width: 140px; }
.cw-shell .cc-table { min-width: calc(290px + var(--cc-aff-width) + var(--cc-criteria-count, 0) * 180px); }
.cw-shell.cw-width-locked .cc-table { min-width: 0; }
.cw-table-actions { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cw-table-action-choices { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.cw-table-summarise { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; padding: 5px 3px; font-size: 11px; font-weight: 600; white-space: nowrap; color: #334e74; background: transparent; }
.cw-table-summarise svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; flex-shrink: 0; }
.cw-table-summarise:focus-visible { outline: 2px solid #637da3; outline-offset: 2px; }
[data-theme="dark"] .cw-table-summarise { color: #a8c4ef; }
.cw-shell.cw-width-locked .cc-table .cc-sort-btn,
.cw-shell.cw-width-locked .cc-table .cc-readmore,
.cw-shell.cw-width-locked .cc-table .cc-cell-aff { white-space: normal; overflow-wrap: anywhere; }
.cw-shell.cw-width-locked .cc-table .cw-ai-table-row > td { width: auto; }
/* Separate lenders, not the criteria and summary belonging to one lender.
   A top border also spans the logo/AffCalc cells when they span two rows. */
.cw-shell .cc-table tbody tr[data-lender-id] > td { border-top: 8px solid #edf0f4; }
.cw-shell .cc-table .cw-ai-table-row > td {
  vertical-align: top; width: auto; text-align: left;
  padding: 10px 16px 16px; border: 0; background: #fff;
}
.cw-shell .cc-table .cw-ai-table-row { height: auto; }
.cw-shell .cc-table tbody tr[data-lender-id]:hover + .cw-ai-table-row > td,
.cw-shell .cc-table tbody tr[data-lender-id]:has(+ .cw-ai-table-row:hover) > td,
.cw-shell .cc-table .cw-ai-table-row:hover > td { background: #eef1f6; }
[data-theme="dark"] .cw-shell .cc-table tbody tr[data-lender-id] > td { border-top-color: #141922; }
[data-theme="dark"] .cw-shell .cc-table .cw-ai-table-row > td { background: #141922; }
.cw-grade-info { font: 600 11px Georgia, serif; }
.cw-grade-info span { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border: 1px solid currentColor; border-radius: 50%; }
.cw-grade-info:focus-visible { outline: 2px solid #637da3; outline-offset: 2px; border-radius: 4px; }
.cw-grade-help { position: fixed; inset: auto; margin: 0; padding: 12px 14px; max-width: calc(100vw - 48px); border: 1px solid #dce1e8; border-radius: 8px; background: #fcfcfa; color: #26364c; box-shadow: 0 5px 20px #26364c26; font: 12px/1.5 system-ui, sans-serif; }
.cw-grade-help .cw-legend-item { display: flex; gap: 8px; padding: 3px 0; }
.cw-grade-bar {
  display: flex; align-items: stretch; gap: 2px; width: 100%; min-width: 0; max-width: 420px;
  border-radius: 7px;
}
/* Each criterion owns an equal share; the coloured band is slimmer than its
   hit area. Do not clip the container: keyboard focus must remain visible. */
.cw-grade-segment {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 28px;
  padding: 10px 0; border: 0; border-radius: 0; background: transparent;
  font: inherit; cursor: pointer;
}
.cw-grade-segment::before {
  content: ""; display: block; height: 8px; width: 100%;
  background-color: var(--cw-grade-colour, #99a2ae);
}
.cw-grade-segment:first-child::before { border-radius: 7px 0 0 7px; }
.cw-grade-segment:last-child::before { border-radius: 0 7px 7px 0; }
.cw-grade-segment:only-child::before { border-radius: 7px; }
.cw-grade-info, .cw-evidence-toggle { display: inline-flex; flex: 0 0 32px; justify-content: center; align-items: center; width: 32px; height: 32px; box-sizing: border-box; border-radius: 8px; padding: 6px; }
.cw-evidence-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cw-grade-segment:hover::before { filter: brightness(.92); }
.cw-shell .cw-grade-segment:focus-visible {
  z-index: 1; outline: 2px solid #637da3; outline-offset: 2px; border-radius: 4px;
}
/* Solid fills use the brighter face of the corresponding two-tone SVG icon. */
.cw-grade-segment[data-tone="green"], .cw-legend-swatch[data-tone="green"] { --cw-grade-colour: #00B400; }
.cw-grade-segment[data-tone="yellow"], .cw-legend-swatch[data-tone="yellow"] { --cw-grade-colour: #F1CB02; }
.cw-grade-segment[data-tone="amber"], .cw-legend-swatch[data-tone="amber"] { --cw-grade-colour: #E46800; }
.cw-grade-segment[data-tone="red"], .cw-legend-swatch[data-tone="red"] { --cw-grade-colour: #B91900; }
.cw-grade-segment[data-tone="purple"], .cw-legend-swatch[data-tone="purple"] { --cw-grade-colour: #A227AC; }
.cw-grade-segment[data-tone="grey"], .cw-legend-swatch[data-tone="grey"] { --cw-grade-colour: #969696; }
/* Information remains solid grey; unresolved states carry a static pattern. */
.cw-grade-segment[data-state="unknown"]::before {
  background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(38, 54, 76, .22) 4px 5px);
}
.cw-grade-segment[data-state="loading"]::before {
  background-image: repeating-linear-gradient(90deg, transparent 0 3px, rgba(252, 252, 250, .55) 3px 5px);
}
.cw-grade-segment[data-state="error"]::before {
  background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(38, 54, 76, .25) 4px 5px), repeating-linear-gradient(135deg, transparent 0 4px, rgba(38, 54, 76, .25) 4px 5px);
}
.cw-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.cw-legend-heading { margin: 0 0 6px; font-weight: 650; }
.cw-action-icon { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cw-action-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cw-icon-only { width: 34px; padding: 6px; }
.cw-shell :is(.cw-action-icon, .cw-grade-info, .cw-evidence-toggle, .cc-newsearch, .cw-recent-toggle) { border: 0; }
.cw-shell :is(.cw-action-icon, .cw-grade-info, .cw-evidence-toggle, .cc-newsearch, .cw-recent-toggle):focus-visible { outline: 2px solid #637da3; outline-offset: 2px; }
.cw-export-status { flex: 1 0 100%; margin: 0; color: var(--cw-muted); font-size: 12px; line-height: 1.5; }
.cw-export-status:empty { display: none; }
.cw-save-dialog {
  position: fixed; inset: 0; margin: auto;
  box-sizing: border-box; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 24px; border: 1px solid var(--cw-line); border-radius: 12px;
  color: var(--cw-ink); background: var(--cw-paper); box-shadow: 0 16px 60px #26364c33;
  font: inherit; overflow-y: auto;
}
.cw-save-dialog::backdrop { background: #18283c66; }
.cw-save-dialog h2 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.2px; }
.cw-save-dialog p { color: var(--cw-muted); font-size: 12px; line-height: 1.6; margin: 0 0 20px; }
.cw-save-dialog label { display: block; font-size: 12px; font-weight: 600; margin-top: 16px; }
.cw-save-dialog label span { color: var(--cw-muted); font-weight: 400; }
.cw-save-dialog :is(input, textarea) {
  display: block; box-sizing: border-box; width: 100%; margin-top: 7px; padding: 9px 10px;
  border: 1px solid #b7c4d5; border-radius: 6px; color: var(--cw-ink); background: var(--cw-paper); font: inherit; font-size: 13px;
}
.cw-save-dialog textarea { resize: vertical; min-height: 90px; }
.cw-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.cw-dialog-actions > .cw-control { width: 80px; }
.cw-dialog-actions > .cw-save-close { width: 120px; }
.cw-save-dialog .cw-save-close { background: #334e74; border-color: #334e74; color: #f8fafc; }
.cw-save-dialog .cw-save-close:hover { background: #294366; }
.cw-print-frame { position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; border: 0; }
.cw-legend-swatch { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--cw-grade-colour, #99a2ae); }
.cw-shell :is(.cw-evidence, .cw-compare-cell) .cc-grade-icon { height: 21px; width: 21px; margin: 0; }
.cw-unknown { font-size: 13px; font-weight: 650; color: var(--cw-muted); }
.cw-evidence { padding: 3px 16px 18px 36px; background: #f5f7f9; }
.cw-evidence-item { padding: 17px 0; border-bottom: 1px solid var(--cw-line); scroll-margin-top: 12px; }
.cw-evidence-item:last-child { border: 0; }
.cw-evidence-title { display: flex; align-items: center; gap: 9px; margin: 0 0 9px; font-size: 13px; font-weight: 650; }
.cw-evidence-text { font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.cw-comparison { overflow: auto; }
.cw-compare-grid { display: grid; grid-template-columns: 145px repeat(var(--cw-compare-count), minmax(210px, 1fr)); min-width: calc(145px + var(--cw-compare-count) * 210px); width: 100%; }
.cw-compare-cell { min-width: 0; padding: 16px; border-right: 1px solid var(--cw-line); border-bottom: 1px solid var(--cw-line); }
.cw-compare-label { font-size: 12px; font-weight: 650; background: #edf2f6; }
.cw-compare-head { background: #f5f7fa; display: flex; flex-direction: column; gap: 12px; }
.cw-compare-cell .cw-evidence-title { align-items: flex-start; font-weight: 400; font-size: 11px; color: var(--cw-muted); }
.cw-compare-cell .cw-control { align-self: flex-start; }
.cw-shell :is(button, input, select, [tabindex]):focus-visible { outline: 2px solid #637da3; outline-offset: 3px; }
.cw-shell select.cw-select:focus { outline: none; box-shadow: none; border-color: #334e74; }
.cw-shell select.cw-select:focus-visible { outline: none; box-shadow: inset 0 0 0 1px #334e74; border-color: #334e74; }
[data-theme="dark"] .cw-shell { --cw-paper: #17212d; --cw-ink: #dce6ee; --cw-muted: #a1b0c1; --cw-line: #344354; --cw-tint: #243348; --cw-accent: #e199b1; }
[data-theme="dark"] .cw-shell :is(.cw-lender-row:hover,.cw-evidence,.cw-compare-head) { background: #1c2939; }
[data-theme="dark"] .cw-shell :is(.cw-chip,.cw-compare-label) { background: #243348; }
@container cw-results (max-width: 760px) {
  .cw-lender-row { grid-template-columns: minmax(0, 1fr) 105px; gap: 10px; }
  .cw-list-head { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .cw-list-head > .cw-actions-heading { display: none; }
  .cw-lender-row > .cw-grade-summary, .cw-lender-actions, .cw-ai-summary { grid-column: 1 / -1; }
  .cw-lender-actions { justify-content: flex-start; }
}
@container cw-results (max-width: 460px) {
  .cw-shell .cc-toolbar-divider { display: none; }
  .cw-view-actions { flex: 1 0 100%; }
  .cw-lender-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .cw-shell .cc-toolbar { padding: 10px; }
  .cw-select { max-width: 170px; }
  .cw-region { padding: 0 10px 16px; }
  .cw-evidence { padding-left: 16px; }
}
