:root {
  /* Stabilis light theme: frontend/src/index.css, :root.light. */
  --ink: hsl(220 15% 12%);
  --muted: hsl(220 5% 45%);
  --subtle: hsl(220 5% 45%);
  --icon: hsl(220 5% 60%);
  --accent: hsl(220 15% 12%);
  --accent-hover: hsl(220 15% 20%);
  --accent-soft: hsl(220 10% 93%);
  --accent-line: hsl(220 10% 88%);
  --line: hsl(220 10% 88%);
  --line-soft: hsl(220 10% 94%);
  --paper: #fff;
  --surface: hsl(220 12% 96%);
  --surface-hover: hsl(220 10% 94%);
  --bg: hsl(220 14% 97%);
  --positive: hsl(152 60% 42%);
  --amber: #a57225;
  --amber-light: #faf0dc;
  --red: #ad5b50;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
button svg,
a svg {
  flex-shrink: 0;
}
svg {
  vertical-align: middle;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 28px 22px 24px;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin-inline: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-align: left;
}
.brand-logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.brand-caption {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-top: 2px;
}
.core-version {
  display: block;
  max-width: 168px;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: -0.2px;
  color: var(--subtle);
}
.core-version::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}
.core-version[data-status="connected"]::before {
  background: var(--positive);
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--subtle);
  margin: 31px 12px 14px;
}
.nav-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 5px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}
.nav-link:hover {
  background: var(--surface-hover);
}
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-count {
  margin-left: auto;
  background: #f6ead0;
  color: #957035;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 0 0;
}
.organization-brand {
  display: block;
  width: fit-content;
  margin-inline: auto;
}
.organization-brand img {
  display: block;
  width: 128px;
  height: 64px;
}
.small-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  margin-right: 6px;
  vertical-align: middle;
}
.shell {
  margin-left: 232px;
}
.topbar {
  height: 80px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
}
.breadcrumb {
  color: var(--subtle);
  font-size: 12px;
}
.breadcrumb span {
  margin: 0 12px;
  color: var(--line);
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.account-menu {
  position: relative;
  font-size: 12px;
}
.account-menu[hidden] {
  display: none;
}
.account-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 7px 0 7px 8px;
}
.account-menu summary::-webkit-details-marker {
  display: none;
}
.account-menu summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 5px;
}
#account-label {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
.account-chevron {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--muted);
}
.account-menu[open] .account-chevron {
  transform: rotate(180deg);
}
.account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  width: min(300px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 0 12px 30px hsl(220 15% 12% / 0.12);
  overflow-wrap: anywhere;
}
.account-panel strong,
.account-email {
  display: block;
}
.account-caption {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.account-email {
  color: var(--muted);
  margin-top: 3px;
}
.account-mailbox {
  border-block: 1px solid var(--line);
  padding: 12px 0;
  margin: 14px 0 6px;
}
.account-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.account-panel a {
  display: block;
  padding: 9px 7px;
  margin-inline: -7px;
  border-radius: 5px;
}
.account-panel [hidden] {
  display: none;
}
.account-panel a:hover,
.account-panel a:focus-visible {
  background: var(--surface-hover);
}
.demo-label {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-hover);
  padding: 5px 9px;
}
.demo-label .small-dot {
  background: var(--icon);
}
main {
  max-width: 1540px;
  margin: auto;
  padding: 38px 42px 26px;
  min-height: calc(100vh - 140px);
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  color: var(--subtle);
  font-size: 9px;
  letter-spacing: 1.9px;
  font-weight: 600;
  margin: 0 0 8px;
}
h1 {
  font:
    36px/1.2 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -1px;
  margin: 0 0 10px;
  font-weight: 400;
}
h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
p {
  margin: 0;
}
.subtitle {
  color: var(--muted);
  font-size: 12px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 13px;
  background: white;
  font-size: 11px;
  font-weight: 500;
  min-height: 36px;
  white-space: nowrap;
}
.button:hover {
  background: var(--surface-hover);
  border-color: var(--accent-line);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 2px 3px hsl(220 15% 12% / 0.08);
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button .icon {
  width: 15px;
  height: 15px;
}
.period-label {
  font-size: 11px;
  padding: 8px 11px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 22px;
}
.stat-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-height: 142px;
}
.stat-label {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-label .icon {
  width: 16px;
  height: 16px;
  color: var(--icon);
}
.stat-value {
  font-size: 31px;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 13px 0 6px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-value .stat-unit {
  color: var(--subtle);
  font-size: 17px;
  letter-spacing: 0;
}
.stat-note {
  font-size: 10px;
  color: var(--muted);
}
.stat-note .positive {
  color: var(--positive);
}
.stat-card.attention {
  background: #fcfbf6;
}
.stat-card.attention .stat-value {
  color: #987639;
}
.stat-card button {
  padding: 0;
  border: 0;
  background: none;
  font-size: 10px;
  color: #987639;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 19px;
  margin-bottom: 26px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-body {
  padding: 23px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  gap: 10px;
}
.panel-heading .muted {
  font-size: 10px;
}
.text-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.text-link:hover {
  text-decoration: underline;
}
.text-link .icon {
  width: 13px;
  height: 13px;
}
.coverage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.coverage-number {
  font:
    39px/1 Georgia,
    serif;
  color: var(--accent);
}
.coverage-number span {
  color: var(--subtle);
  font-size: 21px;
}
.coverage-description {
  color: var(--muted);
  font-size: 11px;
  max-width: 170px;
}
.coverage-segments {
  display: flex;
  gap: 5px;
  margin: 19px 0 12px;
  height: 18px;
}
.coverage-segment {
  flex: 1;
  border-radius: 3px;
  background: var(--line);
  min-width: 0;
}
.coverage-segment.current {
  background: var(--accent);
}
.coverage-segment.review {
  background: #dbbd7e;
}
.legend {
  display: flex;
  gap: 16px;
  font-size: 9px;
  color: var(--muted);
}
.legend span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--line);
  margin-right: 5px;
}
.legend .verified::before {
  background: var(--accent);
}
.legend .review::before {
  background: #dbbd7e;
}
.insight-panel {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  position: relative;
}
.insight-kicker {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.3px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.insight-text {
  font:
    21px/1.5 Georgia,
    serif;
  margin: 13px 0 10px;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.insight-text strong {
  font-weight: 400;
  color: var(--accent);
}
.insight-foot {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 23px 17px;
  gap: 15px;
}
.table-title {
  display: flex;
  gap: 10px;
  align-items: center;
}
.count-pill {
  font-size: 9px;
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--accent-soft);
  color: var(--muted);
}
.table-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search {
  position: relative;
}
.search .icon {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 13px;
  height: 13px;
  color: var(--subtle);
}
.search input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px 8px 30px;
  width: 190px;
  font-size: 10px;
  color: var(--ink);
}
.search input::placeholder {
  color: var(--subtle);
}
.filter-select {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  border-radius: 5px;
  padding: 8px 24px 8px 10px;
  max-width: 180px;
}
.table-scroll {
  overflow: auto;
}
.crm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.crm-summary .panel { padding: 20px; }
.crm-summary span { display: block; color: var(--muted); font-size: 11px; }
.crm-summary strong { display: block; margin-top: 12px; font-size: 26px; font-weight: 500; }
.crm-toolbar, .crm-toolbar .table-tools { flex-wrap: wrap; gap: 12px; }
.crm-table { max-height: 65vh; }
.crm-table th { position: sticky; top: 0; z-index: 1; }
.crm-table td { white-space: normal; min-width: 145px; max-width: 300px; }
.crm-table td:first-child { min-width: 235px; }
.crm-table .row-title { text-align: left; line-height: 1.5; }
.crm-contacts { overflow-wrap: anywhere; max-width: 280px; }
.crm-caption { margin-top: 20px; line-height: 1.7; }
.crm-due { color: var(--warning, #a16c30); font-weight: 600; }
.crm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.crm-field span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 7px; }
.crm-field input, .crm-field select { width: 100%; min-width: 0; padding: 10px; font-size: 12px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 6px; }
.crm-field input:disabled { background: var(--page-bg, #f5f6f8); opacity: .6; }
.crm-history { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 11px; }
.crm-history summary { cursor: pointer; color: var(--muted); }
.crm-history p { margin: 14px 0; line-height: 1.7; }
@media (max-width: 650px) {
  .crm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-form-grid { grid-template-columns: 1fr; }
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}
th {
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.9px;
  font-weight: 500;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 11px 17px;
}
th:first-child,
td:first-child {
  padding-left: 23px;
}
td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--surface);
}
.fund-cell {
  display: flex;
  gap: 11px;
  align-items: center;
}
.fund-monogram {
  width: 32px;
  height: 34px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--muted);
  font:
    14px Georgia,
    serif;
  flex-shrink: 0;
}
.fund-monogram.alt {
  background: #f3eee6;
  border-color: #ece3d5;
  color: #978167;
}
.fund-monogram.blue {
  background: var(--accent-soft);
  border-color: var(--line);
  color: var(--muted);
}
.row-title {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  display: block;
}
.row-title:hover {
  color: var(--accent);
  text-decoration: underline;
}
.secondary-text {
  display: block;
  font-size: 9px;
  color: var(--subtle);
  margin-top: 4px;
}
.numeric {
  font-weight: 500;
}
.delta {
  font-size: 8px;
  display: block;
  color: var(--positive);
  margin-top: 3px;
}
.delta.negative {
  color: #b27860;
}
.delta.neutral {
  color: var(--subtle);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
  background: var(--accent-soft);
  color: var(--muted);
}
.badge::before {
  content: "";
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.badge.review {
  background: var(--amber-light);
  color: #a58643;
}
.badge.waiting {
  background: var(--surface-hover);
  color: var(--subtle);
}
.table-footer {
  border-top: 1px solid var(--line);
  padding: 13px 23px;
  display: flex;
  justify-content: space-between;
  color: var(--subtle);
  font-size: 9px;
}
.page-footer {
  max-width: 1540px;
  margin: auto;
  padding: 18px 42px 24px;
  display: flex;
  justify-content: space-between;
  color: var(--subtle);
  font-size: 9px;
  border-top: 1px solid var(--line);
}
.page-footer > span:first-of-type {
  letter-spacing: 1.2px;
}
.footer-brand {
  display: none;
}
.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state h3 {
  margin: 10px 0 7px;
  color: var(--ink);
}
.loading-state {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: var(--surface-hover);
  border-radius: 6px;
  width: fit-content;
  margin-bottom: 22px;
}
.tab {
  border: 0;
  background: none;
  padding: 8px 13px;
  font-size: 11px;
  border-radius: 4px;
  color: var(--muted);
}
.tab.active {
  background: white;
  color: var(--accent);
  box-shadow: 0 1px 4px hsl(220 15% 12% / 0.06);
}
.document-icon {
  color: var(--muted);
}
.document-icon .icon {
  width: 23px;
  height: 23px;
}
.sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.source-card {
  padding: 25px;
}
.source-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.source-icon {
  height: 42px;
  width: 42px;
  background: var(--accent-soft);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--icon);
}
.source-card h2 {
  margin-bottom: 10px;
  font-size: 16px;
}
.source-card p {
  color: var(--muted);
  font-size: 12px;
  min-height: 42px;
  margin-bottom: 22px;
  max-width: 400px;
}
.source-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 10px;
}
.info-banner {
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  padding: 15px 20px;
  color: var(--muted);
  background: var(--accent-soft);
  margin-top: 22px;
  font-size: 11px;
  display: flex;
  gap: 12px;
}
.email-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 24px;
  align-items: start;
}
.email-controls {
  padding: 24px;
}
.email-controls h3 {
  margin-bottom: 18px;
}
.meta-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
  font-size: 11px;
}
.meta-row span {
  color: var(--subtle);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.email-sheet {
  padding: 36px 42px;
}
.email-meta {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  font-size: 11px;
  color: var(--muted);
}
.email-meta p {
  margin-bottom: 7px;
}
.email-meta strong {
  color: var(--accent);
  font-weight: 500;
}
.email-brand {
  font:
    28px Georgia,
    serif;
  padding: 30px 0 6px;
  color: var(--accent);
}
.email-sheet h2 {
  font:
    28px/1.3 Georgia,
    serif;
  margin: 14px 0;
  color: var(--accent);
}
.email-intro {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  padding-bottom: 20px;
}
.email-item {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.email-item h3 {
  font-size: 12px;
  margin-bottom: 5px;
}
.email-item p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 8px 0;
}
.email-disclaimer {
  font-size: 9px;
  color: var(--subtle);
  margin-top: 25px;
}
.activity-list {
  padding: 12px 25px;
}
.activity-row {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.activity-row:last-child {
  border: 0;
}
.activity-marker {
  background: var(--accent-soft);
  color: var(--icon);
  height: 34px;
  width: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.activity-row h3 {
  font-size: 12px;
  margin-bottom: 5px;
}
.activity-row p {
  font-size: 11px;
  color: var(--muted);
  max-width: 600px;
}
.activity-time {
  margin-left: auto;
  font-size: 9px;
  color: var(--subtle);
  white-space: nowrap;
}
.activity-note {
  margin-top: 8px;
}
.section-caption {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 20px;
}
.status-note {
  font-size: 10px;
  color: #9e8c64;
  background: #f9f4e6;
  border-radius: 5px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
#chat-dialog {
  inset: 0 0 0 auto;
  margin: 0;
  width: min(580px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  overflow: hidden;
  background: var(--paper);
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
#chat-dialog[open] {
  display: flex;
  flex-direction: column;
}
#chat-dialog::backdrop {
  background: hsl(220 15% 12% / 0.12);
  backdrop-filter: none;
}
.chat-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-header h2 {
  margin: 0;
  font:
    23px/1.3 Georgia,
    serif;
}
.chat-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-header-actions .button {
  font-size: 11px;
  padding: 6px 10px;
}
.chat-conversation-title {
  padding: 10px 22px 0;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
}
.chat-history[hidden], .chat-history [hidden], .chat-conversation-title[hidden] { display: none; }
#chat-dialog.show-history > :not(.chat-header):not(.chat-history) { display: none; }
.chat-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.chat-history-heading h3 { margin: 0; font-size: 16px; }
#chat-history-search {
  width: 100%;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.chat-saved-drafts { margin-top: 14px; }
.chat-history-status { color: var(--muted); font-size: 12px; }
.chat-history-list { display: grid; gap: 6px; margin: 18px 0; }
.chat-history-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  padding: 14px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
}
.chat-history-item:hover, .chat-history-item[aria-current="true"] { background: var(--surface); }
.chat-history-item strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.chat-history-item span { color: var(--muted); font-size: 11px; }
.chat-history button:focus-visible, #chat-history-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-earlier { display: block; margin: 0 auto 20px; }
.chat-status {
  padding: 10px 22px;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px;
}
.chat-model-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
}
.chat-model-control[hidden] {
  display: none;
}
.chat-model-control label {
  font-size: 11px;
  color: var(--muted);
}
.chat-model-control select {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-size: 12px;
}
.chat-model-control select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chat-welcome {
  padding: 30px 8px;
}
.chat-welcome > .icon {
  width: 28px;
  height: 28px;
  color: var(--icon);
}
.chat-welcome h3 {
  font-weight: 500;
  margin: 18px 0 7px;
  font-size: 16px;
}
.chat-welcome p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.chat-welcome-example {
  margin-top: 24px;
  font-size: 12px !important;
}
.chat-message {
  margin-bottom: 22px;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.chat-message.user {
  margin-left: 35px;
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 15px;
}
.chat-author {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.chat-answer {
  white-space: pre-wrap;
}
.chat-coverage {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.chat-error {
  border-left: 2px solid var(--red);
  padding-left: 12px;
}
.chat-sources {
  margin-top: 14px;
}
.chat-source,
.chat-draft {
  border: 2px solid hsl(220 8% 76%);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 1px 3px hsl(220 15% 12% / 0.05);
}
.chat-source {
  padding: 14px;
  margin-top: 12px;
}
.chat-source-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.chat-source-title > span:nth-child(2) {
  flex: 1;
}
.chat-source-title > .icon {
  width: 14px;
  height: 14px;
  margin-top: 3px;
}
.chat-source-number {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 600;
}
.chat-source p {
  margin: 6px 0 0 30px;
  font-size: 11px;
  color: var(--muted);
}
.chat-source .chat-attachment {
  margin-top: 10px;
  padding-top: 10px;
  border-color: var(--line);
  font-size: 12px;
}
.chat-attachment {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.chat-attachment span {
  flex: 1;
}
.chat-attachment .icon {
  width: 14px;
  height: 14px;
}
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 12px;
}
.chat-suggestions button {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
}
.chat-suggestions button:hover {
  background: var(--surface);
}
.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 20px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.chat-form:focus-within {
  border-color: var(--ink);
}
.chat-form textarea {
  border: 0;
  outline: none;
  min-height: 44px;
  max-height: 220px;
  padding: 2px;
  resize: none;
  font-size: 13px;
  line-height: 1.6;
}
.chat-form button {
  width: 34px;
  height: 34px;
  padding: 7px;
  flex-shrink: 0;
}
.chat-input-count {
  color: var(--muted);
  font-size: 10px;
  margin: 6px 20px 0;
  text-align: right;
}
.chat-input-error {
  color: var(--ink);
  font-size: 11px;
  margin: 6px 20px 0;
}
.chat-note {
  color: var(--muted);
  font-size: 10px;
  margin: 10px 20px 16px;
}
.chat-draft-batch {
  margin-top: 16px;
}
.chat-draft {
  margin: 12px 0;
}
.chat-draft summary {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}
.chat-draft summary::-webkit-details-marker {
  display: none;
}
.chat-draft summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chat-draft-chevron {
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(-45deg);
}
.chat-draft[open] > summary .chat-draft-chevron {
  transform: rotate(45deg);
}
.chat-draft-heading {
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.chat-draft-heading strong {
  font-weight: 600;
}
.chat-draft-heading > span {
  color: var(--muted);
  font-size: 11px;
}
.chat-draft-badge {
  max-width: 90px;
  padding: 3px 7px;
  background: var(--accent-soft);
  border-radius: 4px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.chat-draft-badge[data-status="submitted"] {
  color: var(--ink);
}
.chat-draft-content {
  padding: 0 14px 14px;
}
.chat-draft dl {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0 0 12px;
  font-size: 12px;
}
.chat-draft dt {
  color: var(--muted);
}
.chat-draft dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.chat-draft-body {
  white-space: pre-wrap;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.chat-prepared-file {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.chat-form-review dl {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr);
  gap: 8px 12px;
  font-size: 12px;
}
.chat-form-review dt { font-weight: 600; }
.chat-form-review dd { margin: 0; white-space: pre-wrap; }
.chat-form-warning { font-size: 12px; line-height: 1.5; color: #8a5a17; }
.chat-draft-status, .chat-draft-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.chat-draft-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.chat-check {
  margin: 0 20px 12px;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 11px;
}
.chat-working {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 12px;
}
.chat-spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: chat-spin 0.8s linear infinite;
}
.email-source-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.8;
}
@keyframes chat-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 640px) {
  #chat-dialog {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    border-radius: 0;
    border: 0;
  }
  .topbar-right .demo-label {
    display: none;
  }
  .chat-header {
    padding-top: max(18px, env(safe-area-inset-top));
  }
  .chat-note {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
dialog {
  border: 0;
  padding: 0;
  width: min(650px, calc(100vw - 32px));
  max-height: 90vh;
  border-radius: 14px;
  color: var(--ink);
  box-shadow: 0 24px 90px hsl(220 15% 12% / 0.25);
  background: var(--surface);
}
dialog::backdrop {
  background: hsl(220 15% 12% / 0.4);
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 25px 28px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.dialog-header h2 {
  font:
    25px/1.3 Georgia,
    serif;
  margin: 6px 0;
}
.close-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 29px;
  height: 29px;
  background: white;
  flex-shrink: 0;
  font-size: 19px;
  display: grid;
  place-items: center;
  line-height: 1;
}
.dialog-body {
  padding: 25px 28px;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
.detail-meta dt {
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.detail-meta dd {
  margin: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.detail-metric {
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 13px;
}
.detail-metric span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 7px;
}
.detail-metric strong {
  font-weight: 500;
  font-size: 17px;
  color: var(--accent);
}
.detail-section-title {
  font-size: 11px;
  margin-top: 23px;
  margin-bottom: 9px;
}
.detail-history {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.note-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 18px;
  margin-bottom: 6px;
}
textarea {
  width: 100%;
  min-height: 75px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: white;
  font-size: 12px;
  resize: vertical;
}
.setup-list {
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.setup-list li {
  margin-bottom: 12px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 116px);
  transform: translate(-50%, 20px);
  background: var(--accent);
  color: #ffffff;
  padding: 13px 22px;
  border-radius: 8px;
  box-shadow: 0 8px 30px hsl(220 15% 12% / 0.19);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 50;
  font-size: 12px;
  max-width: calc(100vw - 32px);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  background: #8e5148;
}
.muted {
  color: var(--muted);
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 15px;
  padding: 10px;
  background: var(--accent);
  color: white;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.noscript {
  padding: 20px;
}
.visually-hidden {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (min-width: 1500px) {
  main {
    padding-top: 46px;
  }
  .stat-card {
    min-height: 152px;
  }
  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }
  .panel-body {
    padding: 27px;
  }
  .insight-text {
    font-size: 24px;
  }
  td {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 196px;
    padding: 28px 16px;
  }
  .shell {
    margin-left: 196px;
  }
  .topbar {
    padding: 0 27px;
  }
  main {
    padding: 28px 27px;
  }
  .page-footer {
    padding-left: 27px;
    padding-right: 27px;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-value {
    font-size: 27px;
  }
  .heading-actions {
    gap: 4px;
  }
  h1 {
    font-size: 30px;
  }
  .coverage-description {
    max-width: 140px;
  }
  .toast {
    left: calc(50% + 98px);
  }
  .email-layout {
    grid-template-columns: minmax(0, 1fr) 210px;
  }
}
@media (max-width: 900px) {
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .insight-text {
    max-width: 500px;
  }
  .email-layout {
    grid-template-columns: 1fr;
  }
  .email-controls {
    order: -1;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    padding: 18px;
  }
  .email-controls h3 {
    width: 100%;
    margin: 0;
  }
  .email-controls .meta-row {
    margin: 0;
  }
  .sources-grid {
    grid-template-columns: 1fr;
  }
  .table-header {
    flex-wrap: wrap;
  }
  .activity-time {
    white-space: normal;
    min-width: 70px;
    text-align: right;
  }
}
@media (max-width: 640px) {
  .sidebar {
    display: block;
    position: static;
    width: auto;
    padding: 18px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .workspace-label,
  .sidebar-bottom {
    display: none;
  }
  .organization-brand img {
    width: 112px;
    height: 56px;
  }
  #navigation {
    display: flex;
    overflow: auto;
    gap: 5px;
    margin-top: 20px;
  }
  .nav-link {
    padding: 10px 12px;
    margin: 0;
    border-radius: 6px 6px 0 0;
    gap: 7px;
    font-size: 11px;
    white-space: nowrap;
  }
  .nav-link .icon {
    width: 15px;
    height: 15px;
  }
  .nav-count {
    display: none;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 56px;
    padding: 0 20px;
  }
  .topbar-right {
    gap: 10px;
  }
  .topbar .breadcrumb {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
  }
  #account-label {
    max-width: 80px;
  }
  .account-menu summary {
    padding-left: 0;
    gap: 5px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    margin: 0 8px;
  }
  .demo-label {
    font-size: 8px;
  }
  main {
    padding: 25px 18px;
    min-height: 60vh;
  }
  .page-heading {
    gap: 16px;
    margin-bottom: 22px;
  }
  h1 {
    font-size: 30px;
  }
  .subtitle {
    font-size: 11px;
    max-width: 330px;
  }
  .heading-actions {
    justify-content: space-between;
    width: 100%;
  }
  .stats-grid {
    gap: 10px;
    margin-bottom: 17px;
  }
  .stat-card {
    min-height: 128px;
    padding: 15px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-note {
    font-size: 9px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-label .icon {
    display: none;
  }
  .overview-grid {
    gap: 15px;
    margin-bottom: 20px;
  }
  .panel-body {
    padding: 20px;
  }
  .insight-text {
    font-size: 21px;
  }
  .table-header {
    padding: 18px;
  }
  .table-tools {
    width: 100%;
    justify-content: space-between;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
  }
  .filter-select {
    max-width: 145px;
  }
  .table-footer {
    padding: 12px 18px;
    gap: 15px;
    font-size: 8px;
  }
  .page-footer {
    flex-direction: column;
    align-items: center;
    padding: 24px 18px;
    font-size: 8px;
    gap: 16px;
    text-align: center;
  }
  .footer-brand {
    display: flex;
    text-align: left;
  }
  .page-footer > span:first-of-type {
    display: none;
  }
  .toast {
    left: 50%;
    min-width: 240px;
    text-align: center;
  }
  .email-sheet {
    padding: 22px;
  }
  .tabs {
    max-width: 100%;
    overflow: auto;
  }
  .tab {
    white-space: nowrap;
    font-size: 10px;
    padding: 8px 10px;
  }
  .source-card {
    padding: 21px;
  }
  .activity-list {
    padding: 5px 18px;
  }
  .activity-row {
    gap: 10px;
  }
  .activity-row p {
    font-size: 10px;
  }
  .activity-time {
    font-size: 8px;
    min-width: 57px;
  }
  .dialog-header,
  .dialog-body {
    padding: 20px;
  }
  .dialog-header h2 {
    font-size: 23px;
  }
  .detail-metrics {
    gap: 7px;
  }
  .detail-metric {
    padding: 10px;
  }
  .detail-metric strong {
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Document preparation and evidence review */
.workflow-intro { color:var(--muted); line-height:1.6; margin:0 0 20px; }
.workflow-tabs { flex-wrap:wrap; gap:4px; }
.workflow-tabs .tab { font-size:12px; padding:10px 12px; }
.workflow-tabs .tab span { opacity:.7; margin-left:5px; }
.workflow-tools { flex-wrap:wrap; gap:12px; }
.workflow-tools select, .draft-pane select, .draft-pane input:not([type=checkbox]), .draft-pane textarea { font:inherit; color:var(--text); background:var(--surface,#fff); border:1px solid var(--border,#dce1e5); border-radius:6px; padding:9px 10px; max-width:100%; }
.workflow-tools .search { flex:1 1 250px; }
.document-review-dialog { width:min(1320px,96vw); max-width:1320px; }
.document-review-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,1fr); gap:24px; padding:24px; }
.original-pane { position:sticky; top:0; align-self:start; min-width:0; }
.original-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.original-image-scroll { width:100%; height:65vh; min-height:420px; border:1px solid var(--border,#ddd); background:#eceff1; border-radius:8px; }
.draft-pane { min-width:0; }
.draft-pane form > label { display:block; margin:15px 0 6px; font-size:13px; font-weight:600; }
.draft-pane form > input, .draft-pane form > select, .draft-pane form > textarea { width:100%; }
.draft-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:20px; }
.draft-field { min-width:0; display:flex; flex-direction:column; gap:6px; padding:12px; background:var(--background,#f6f8f9); border-radius:8px; }
.draft-field > label:first-child { font-size:12px; font-weight:600; }
.draft-field small, .evidence-page { font-size:11px; color:var(--muted); }
.evidence-page { display:flex; align-items:center; gap:8px; }
.evidence-page input { width:65px; }
.evidence-quote { margin:4px 0; font-size:11px; line-height:1.6; color:var(--muted); overflow-wrap:anywhere; }
.draft-save { display:flex; align-items:center; gap:12px; margin:20px 0; }
.draft-save span { font-size:12px; color:var(--muted); }
.draft-pane .review-confirm { display:flex; gap:10px; align-items:flex-start; padding:14px; background:#eef5f1; color:#214a38; line-height:1.6; }
.draft-pane .review-confirm input { margin-top:5px; }
.draft-pane details { font-size:12px; line-height:1.8; margin:16px 0; }
.review-notice ul { padding-left:20px; font-size:12px; line-height:1.7; }
.document-review-dialog .dialog-actions { flex-wrap:wrap; }
@media(max-width:850px) {
 .document-review-layout { grid-template-columns:1fr; padding:16px; }
 .original-pane { position:static; }
 .original-image-scroll { height:40vh; min-height:260px; }
 .draft-fields { grid-template-columns:1fr; }
 .original-toolbar { flex-wrap:wrap; }
}

.original-image-scroll img {display:block;width:100%;height:auto;background:white;}
.original-image-scroll {overflow:auto;}
.original-pages {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0;font-size:12px;}
.original-pages input {width:55px;padding:7px;border:1px solid var(--border);border-radius:5px;}

.fund-review { border: 1px solid var(--border, #d8dedb); border-radius: 12px; padding: 16px; margin: 14px 0; min-width: 0; }
.fund-review h3 { margin: 0 0 10px; }
.fund-review-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.fund-review-controls label { display: flex; gap: 8px; align-items: center; max-width: 100%; }
.fund-review-controls select { max-width: 100%; min-width: 0; padding: 7px; }
.fund-review-table { overflow-x: auto; margin: 12px 0; }
.fund-review-table table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.fund-review-table th, .fund-review-table td { padding: 8px; border-bottom: 1px solid #d8dedb; vertical-align: top; text-align: left; overflow-wrap: anywhere; white-space: normal; }
.fund-review-table tbody th { font-size: 13px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.fund-review-coverage { margin: 10px 0; font-size: 12px; }
.fund-review-coverage summary { cursor: pointer; }
.fund-review small, .fund-evidence q { display: block; margin-top: 6px; }
.fund-review-skipped { margin: 12px 0; overflow-wrap: anywhere; }
.fund-review-skipped h4 { margin-bottom: 8px; }
.fund-review-skipped ul { padding-left: 20px; max-height: 320px; overflow-y: auto; }
.fund-review-skipped li { margin: 12px 0; }
.fund-review-skipped button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.fund-evidence { margin: 12px 0; }
.fund-evidence .button { white-space: normal; text-align: left; }
@media (max-width: 700px) {
  .fund-review { padding: 10px; }
  .fund-review-table table, .fund-review-table tbody, .fund-review-table tr, .fund-review-table th, .fund-review-table td { display: block; }
  .fund-review-table thead { display: none; }
  .fund-review-table tr { border: 1px solid #d8dedb; border-radius: 8px; margin-bottom: 12px; }
  .fund-review-table td::before { content: attr(data-label); font-weight: 600; display: block; margin-bottom: 5px; }
  .fund-review-controls label { display: block; }
}
.fund-email-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; margin-bottom: 24px; }
.fund-email-panel h2 { margin: 6px 0; }
.fund-email-panel p { margin: 6px 0; }
.fund-email-list { list-style: none; padding: 0; }
.fund-email-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fund-email-list button { text-align: left; overflow-wrap: anywhere; }
.fund-email-body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 14px; line-height: 1.6; padding: 16px; background: var(--bg); border: 1px solid var(--line); }
@media (max-width: 640px) { .fund-email-panel { align-items: flex-start; flex-direction: column; } }
.chat-reply-target, .chat-reply-source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--border, #d8dedb); border-radius: 8px; margin-bottom: 12px; font-size: 12px; overflow-wrap: anywhere; }
.chat-reply-target[hidden] { display: none; }
.chat-reply-source .button { white-space: normal; text-align: left; }
