@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Metropolis-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/static/fonts/Metropolis-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "Metropolis";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Metropolis-Italic.ttf") format("truetype");
}

:root {
  --font-sans: Arial, Helvetica, sans-serif;
  --ink: #172033;
  --ink-strong: #0d1424;
  --muted: #667085;
  --muted-strong: #475467;
  --line: #e4e7ec;
  --line-strong: #cfd4dc;
  --surface: #ffffff;
  --surface-subtle: #f7f8fa;
  --surface-hover: #f2f4f7;
  --accent: #2855d9;
  --accent-hover: #1f46bc;
  --success: #16794a;
  --warning: #9a5b13;
  --danger: #b42318;
  --shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
  --topbar-height: 58px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  background: var(--surface);
}

body {
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  transform: translateY(-150%);
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  height: var(--topbar-height);
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.viewer-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.viewer-control select {
  height: 32px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #ffffff;
  background: var(--ink-strong);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-name {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.theme-settings {
  position: relative;
  color: var(--muted-strong);
  font-size: 11px;
}

.settings-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted-strong);
  background: #ffffff;
  cursor: pointer;
}

.settings-button:hover {
  color: var(--ink-strong);
  background: var(--surface-hover);
}

.settings-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.theme-settings summary {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  list-style: none;
}

.theme-settings summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.theme-settings summary::-webkit-details-marker {
  display: none;
}

.theme-settings[open] summary,
.theme-settings summary:hover {
  color: var(--ink-strong);
  background: var(--surface-hover);
}

.settings-panel {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.theme-toggle strong,
.theme-toggle small {
  display: block;
}

.theme-toggle strong {
  color: var(--ink-strong);
  font-size: 12px;
}

.theme-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.theme-toggle input {
  position: relative;
  width: 34px;
  height: 19px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: var(--line-strong);
  appearance: none;
  cursor: pointer;
}

.theme-toggle input::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
  transition: transform 120ms ease;
}

.theme-toggle input:checked {
  background: var(--accent);
}

.theme-toggle input:checked::after {
  transform: translateX(15px);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, var(--assistant-width, 360px));
  width: 100%;
  max-width: 100vw;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}

.workspace-pane,
.assistant-pane {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.workspace-pane {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  border-right: 1px solid var(--line-strong);
}

.workspace-tabs {
  display: flex;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  padding: 0 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar {
  display: none;
}

.workspace-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 0;
  color: var(--muted-strong);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.workspace-tab:hover {
  color: var(--ink);
}

.workspace-tab::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  content: "";
}

.workspace-tab.is-active {
  color: var(--ink-strong);
  font-weight: 600;
}

.workspace-tab.is-active::after {
  background: var(--accent);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 9px;
  color: #ffffff;
  background: var(--danger);
  font-size: 11px;
  line-height: 18px;
}

.workspace-content {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.workspace-view {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.report-view {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.funds-view {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.files-view {
  position: relative;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.files-main {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  min-width: 0;
  flex: 1;
}

.files-toolbar {
  min-height: 68px;
}

.files-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connectors-control {
  position: relative;
}

.sync-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.sync-control .icon-button.is-spinning svg,
.settings-sync.is-spinning svg {
  animation: spin 800ms linear infinite;
}

.sync-control .icon-button {
  display: inline-flex;
  width: auto;
  gap: 6px;
  padding: 0 10px;
  white-space: nowrap;
}

.demo-sync-progress {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: #ffffff;
}

.demo-sync-progress[hidden] {
  display: none;
}

.demo-sync-heading,
.demo-sync-heading > div {
  display: flex;
}

.demo-sync-heading {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.demo-sync-heading > div {
  flex-direction: column;
  gap: 2px;
}

.demo-sync-heading strong {
  color: var(--ink);
  font-size: 14px;
}

.demo-sync-heading span,
.demo-sync-groups span,
.demo-discoveries span {
  color: var(--muted);
  font-size: 11px;
}

.demo-sync-heading b {
  color: var(--accent);
  font-size: 13px;
}

.demo-progress-track {
  height: 5px;
  margin: 10px 0 12px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-subtle);
}

.demo-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 800ms ease;
}

.demo-sync-groups,
.demo-discoveries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-sync-groups li {
  display: flex;
  align-items: start;
  gap: 7px;
}

.demo-sync-groups li > div,
.demo-discoveries li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sync-manager-check {
  color: var(--success) !important;
  font-size: 13px !important;
}

.demo-discoveries {
  grid-template-columns: 1fr;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.demo-discoveries strong {
  color: var(--ink);
  font-size: 11px;
}

.file-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.file-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.file-filter-chips[hidden] {
  display: none;
}

.file-filter-chips button,
.source-files-link,
.files-text-link,
.metric-source-link {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.file-filter-chips button {
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface-subtle);
  font-size: 11px;
  text-decoration: none;
}

.file-filter-chips .clear-all-file-filters {
  border-color: transparent;
  color: var(--muted-strong);
  background: transparent;
}

.file-filters label,
.form-dialog label,
.settings-content > section > label {
  display: grid;
  gap: 4px;
  color: var(--muted-strong);
  font-size: 11px;
}

.file-filters input,
.file-filters select,
.form-dialog input,
.form-dialog select,
.form-dialog textarea,
.settings-content select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
}

.form-dialog textarea {
  height: auto;
  resize: vertical;
}

.files-table-scroll {
  min-height: 0;
  overflow-x: hidden;
}

.files-table {
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.files-table tbody tr {
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -1px var(--line);
}

.files-table thead {
  position: sticky;
  z-index: 3;
  top: 0;
}

.files-table th button,
.related-table th button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-weight: inherit;
  cursor: pointer;
}

.sort-indicator {
  display: inline-block;
  flex: 0 0 10px;
  width: 10px;
  color: var(--accent);
  text-align: center;
}

th button:not(.is-active):hover .sort-indicator::after,
th button:not(.is-active):focus-visible .sort-indicator::after {
  color: var(--muted);
  content: "↕";
  opacity: 0.55;
}

.files-table th,
.files-table td {
  height: 44px;
  padding-right: 5px;
  padding-left: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.data-table.files-table td {
  border-bottom: 0;
}

.files-table th:nth-child(1) { width: 17%; }
.files-table th:nth-child(2) { width: 10%; }
.files-table th:nth-child(3) { width: 11%; }
.files-table th:nth-child(4) { width: 10%; }
.files-table th:nth-child(5) { width: 10%; }
.files-table th:nth-child(6) { width: 10%; }
.files-table th:nth-child(7) { width: 11%; }
.files-table th:nth-child(8) { width: 8%; }
.files-table th:nth-child(9) { width: 13%; }

.file-name-cell a,
.file-name-cell strong,
.file-location-cell .breadcrumb {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connector-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.connector-popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.connector-popover ul {
  display: grid;
  gap: 0;
  max-height: 330px;
  margin: 0 0 10px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.connector-popover li {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.connector-popover li div {
  display: grid;
  gap: 2px;
}

.connector-popover li span,
.connector-popover time {
  color: var(--muted);
  font-size: 10px;
}

.connector-popover time {
  max-width: 120px;
  text-align: right;
}

.file-row {
  cursor: pointer;
}

.file-row:hover,
.file-row.is-selected {
  background: var(--surface-hover);
}

.source-badge,
.manual-label {
  display: inline-flex;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 10px;
  white-space: nowrap;
}

.breadcrumb {
  color: var(--muted-strong);
  font-size: 11px;
}

.file-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(420px, 100%);
  min-width: 0;
  height: auto;
  overflow: hidden;
  border-left: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: -8px 0 24px rgba(16, 24, 40, 0.08);
}

.file-drawer[hidden] {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h1,
.drawer-header h2,
.drawer-header p {
  margin: 0;
}

.drawer-header p {
  color: var(--muted);
  font-size: 11px;
}

.file-drawer-body {
  min-height: 0;
  padding: 0 18px 28px;
  overflow-y: auto;
}

.file-drawer-body section,
.settings-content section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.file-drawer-body h3,
.settings-content h2 {
  margin: 0 0 12px;
  color: var(--ink-strong);
  font-size: 14px;
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 0 0;
}

.detail-list {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
}

.detail-stack,
.settings-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-stack li,
.settings-list li {
  display: grid;
  gap: 2px;
}

.detail-stack span,
.settings-list span,
.detail-stack p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.first-page-preview {
  max-height: 260px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
}

.first-page-preview p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}

.contact-log {
  display: grid;
  border-top: 1px solid var(--line);
}

.contact-log-row {
  display: grid;
  grid-template-columns: 88px minmax(100px, 0.9fr) minmax(100px, 0.9fr) minmax(180px, 1.4fr) auto;
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.contact-log-row time,
.contact-log-row span {
  color: var(--muted);
  font-size: 10px;
}

.contact-log-row div {
  display: grid;
}

.contact-log-row p {
  margin: 0;
}

.interaction-actions {
  display: flex !important;
  gap: 8px;
  white-space: nowrap;
}

.fund-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.drawer-scrim {
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(13, 20, 36, 0.28);
}

.settings-drawer {
  position: fixed;
  z-index: 110;
  top: 0;
  right: 0;
  width: min(520px, 94vw);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.settings-content {
  padding: 0 22px 32px;
}

.connections-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.connector-row-top,
.connector-actions,
.connector-statuses,
.watchlist-heading {
  display: flex;
  align-items: center;
}

.connector-row-top,
.watchlist-heading {
  justify-content: space-between;
  gap: 10px;
}

.connector-row-top > div:first-child {
  display: grid;
  gap: 2px;
}

.connector-statuses,
.connector-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.connector-row p {
  margin: 5px 0;
  color: var(--muted-strong);
  font-size: 11px;
}

.connector-row dl {
  display: flex;
  gap: 20px;
  margin: 8px 0;
}

.connector-row dl div {
  display: grid;
  gap: 2px;
}

.connector-row dt,
.connector-row dd {
  margin: 0;
  font-size: 10px;
}

.connector-row dt,
.connector-source {
  color: var(--muted);
}

.connector-status,
.connector-watching,
.demo-approval-label {
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--muted-strong);
  background: var(--surface-subtle);
  font-size: 10px;
  white-space: nowrap;
}

.connector-status.is-connected {
  border-color: #87b596;
  color: #246b3d;
  background: #f3faf5;
}

.connector-demo-note {
  color: var(--ink) !important;
  font-weight: 600;
}

.connector-note {
  font-style: italic;
}

.connector-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.sec-watchlist {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
}

.sec-watchlist ul {
  display: grid;
  gap: 8px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.sec-watchlist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px auto;
  gap: 7px;
  align-items: end;
  padding: 0;
  border: 0;
}

.sec-watchlist label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
}

.sec-watchlist input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
}

.match-confirmed {
  align-self: center;
  color: var(--muted-strong);
  font-size: 10px;
}

.connector-dialog-body {
  padding: 18px 20px 0;
}

.connector-dialog {
  overflow: hidden;
}

.connector-dialog.form-dialog .drawer-header {
  margin: 0;
}

.connector-dialog .dialog-actions {
  padding: 0 20px 18px;
}

.connector-dialog-body p {
  color: var(--ink);
  line-height: 1.5;
}

.connector-dialog-body .demo-approval-label {
  display: inline-block;
  margin: 0;
  color: var(--accent);
}

.check-row {
  grid-template-columns: auto 1fr !important;
  align-items: center;
  margin-top: 10px;
}

.check-row input {
  width: auto;
}

.allowance-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}

.allowance-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.usage-section.is-warning .allowance-bar span {
  background: var(--warning);
}

.usage-teams li {
  grid-template-columns: 1fr auto;
}

.admin-cost {
  color: var(--muted-strong);
}

.form-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.form-dialog::backdrop {
  background: rgba(13, 20, 36, 0.32);
}

.form-dialog form {
  display: grid;
  gap: 13px;
  padding: 0 18px 18px;
}

.add-document-dialog .drawer-header {
  align-items: flex-start;
}

.add-document-dialog .drawer-header h2,
.add-document-dialog .drawer-header p {
  margin: 0;
}

.add-document-dialog .drawer-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.add-document-dialog .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.document-drop-zone {
  align-items: center;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface-hover);
  text-align: center;
  cursor: pointer;
}

.document-drop-zone.is-dragging {
  border-color: var(--accent);
  background: #ffffff;
}

.document-drop-zone span {
  color: var(--muted);
  font-size: 11px;
}

.document-drop-zone input {
  max-width: 100%;
}

.paste-meeting-note {
  justify-self: start;
}

.add-fund-dialog .dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -18px 4px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.add-fund-dialog .dialog-header h2,
.add-fund-dialog .dialog-header p {
  margin: 0;
}

.add-fund-dialog .dialog-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.add-fund-dialog .dialog-header .icon-button {
  flex: 0 0 auto;
}

.action-dialog .dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -18px 4px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.action-dialog .dialog-header h2,
.action-dialog .dialog-header p {
  margin: 0;
}

.action-dialog .dialog-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.add-fund-dialog .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}

.add-fund-dialog .form-grid label {
  gap: 7px;
}

.form-dialog .drawer-header {
  margin: 0 -18px;
}

.dialog-actions,
.audit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.audit-actions label {
  color: var(--muted);
  font-size: 11px;
}

.audit-actions {
  flex-wrap: wrap;
}

.audit-actions select,
.audit-actions input {
  max-width: 130px;
  margin-left: 4px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .file-filters {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

  .contact-log-row {
    grid-template-columns: 80px 1fr 1fr;
  }

  .contact-log-row p {
    grid-column: 2 / -1;
  }
}

.funds-sidebar {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface-subtle);
}

.fund-list {
  padding: 2px 8px 18px;
}

.fund-list-controls {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.fund-search-label input,
.related-controls input {
  width: 100%;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-size: 11px;
}

.fund-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fund-quick-filters button,
.related-chips button {
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 10px;
  cursor: pointer;
}

.fund-quick-filters button:hover,
.fund-quick-filters button.is-active,
.related-chips button:hover,
.related-chips button.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.fund-list .loading-row {
  min-height: 80px;
  padding: 18px 8px;
}

.fund-button {
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  cursor: pointer;
}

.fund-button small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-button > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.fund-issue-count,
.issue-count {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  color: var(--muted-strong);
  background: var(--surface-hover);
  font-size: 10px;
  font-weight: 600;
}

.fund-button:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.fund-button.is-active {
  color: var(--ink-strong);
  background: #ffffff;
  box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line);
  font-weight: 600;
}

.fund-page {
  min-width: 0;
  min-height: 0;
  padding: 36px clamp(24px, 4vw, 58px) 70px;
  overflow-y: auto;
}

.fund-page-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.fund-page-header > div:first-child,
.entity-header-main {
  min-width: 0;
}

.fund-page-header.has-action,
.entity-header.has-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.manager-funds-table a {
  font-weight: 600;
}

.manager-funds-table {
  width: calc(100% - 24px);
  min-width: 0;
  table-layout: fixed;
}

.manager-funds-table th:nth-child(1) {
  width: 41%;
}

.manager-funds-table th:nth-child(2) {
  width: 20%;
}

.manager-funds-table th:nth-child(3) {
  width: 18%;
}

.manager-funds-table th:nth-child(4) {
  width: 21%;
}

.manager-funds-table th,
.manager-funds-table td {
  box-sizing: border-box;
  padding-right: 8px;
  overflow-wrap: anywhere;
  white-space: normal !important;
}

.manager-funds-table small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.fund-page-header h1 {
  margin: 0 0 7px;
  color: var(--ink-strong);
  font-size: 25px;
  letter-spacing: -0.025em;
}

.fund-page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.fund-page-header .fund-contact-summary {
  margin-top: 6px;
  color: var(--muted-strong);
}

.fund-section {
  margin-top: 26px;
}

.fund-section h2 {
  margin: 0 0 12px;
  color: var(--ink-strong);
  font-size: 15px;
}

.issues-list {
  border-top: 1px solid var(--line);
}

.issue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 9px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.issue-row:hover {
  background: var(--surface-hover);
}

.issue-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.issue-main strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-main small,
.issue-row time,
.issues-empty {
  color: var(--muted);
  font-size: 10px;
}

.issues-empty {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.related-heading,
.related-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.related-heading h2 {
  margin-bottom: 0;
}

.files-text-link {
  margin-top: 5px;
  font-size: 11px;
}

.related-controls {
  margin-top: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface-subtle);
}

.related-controls label {
  width: min(430px, 55%);
}

.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.related-table-scroll {
  border: 1px solid var(--line);
}

.related-table {
  min-width: 720px;
}

.related-table th button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-weight: inherit;
  cursor: pointer;
}

.related-table th button span {
  display: inline-block;
  width: 10px;
  color: var(--accent);
}

.related-table td:first-child {
  width: 112px;
  white-space: nowrap;
}

.related-table td:nth-child(2) {
  width: 132px;
}

.related-table td:nth-child(4) {
  max-width: 220px;
}

.related-table a,
.related-title {
  color: var(--ink-strong);
  font-weight: 600;
  text-decoration: none;
}

.related-table a:hover {
  text-decoration: underline;
}

.row-labels,
.related-snippet {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
}

.duplicate-notice {
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--warning);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.duplicate-notice strong {
  display: block;
  margin-bottom: 2px;
}

.duplicate-outreach-alert {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #b54708;
  border-left: 4px solid #b54708;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.duplicate-outreach-alert[hidden] {
  display: none;
}

.duplicate-outreach-alert strong {
  color: #7a2e0e;
  font-size: 13px;
}

.duplicate-outreach-alert span {
  font-weight: 600;
}

.duplicate-outreach-alert p {
  margin: 0;
}

.report-read-only-note {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 11px;
}

.timeline-month {
  margin: 22px 0 0;
}

.timeline-month h3 {
  margin: 0 0 5px;
  color: var(--muted-strong);
  font-size: 12px;
}

.timeline-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--muted);
  font-size: 11px;
}

.timeline-type {
  display: block;
  margin-top: 3px;
  color: var(--muted-strong);
  font-size: 10px;
}

.timeline-title {
  margin: 0 0 3px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 600;
}

.timeline-summary {
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.5;
}

.timeline-source {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
}

.fund-suggestions {
  display: grid;
  gap: 7px;
}

.fund-suggestion {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.fund-suggestion:hover {
  border-color: #b9c0ca;
  background: var(--surface-hover);
}

.report-sidebar {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface-subtle);
}

.sidebar-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 16px 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.sidebar-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.report-sections {
  padding: 2px 8px 16px;
}

.sidebar-empty {
  margin: 10px;
  color: var(--muted);
  font-size: 11px;
}

.report-section-button {
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 8px 9px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  text-overflow: ellipsis;
  cursor: pointer;
}

.report-section-button:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.report-section-button.is-active {
  color: var(--ink-strong);
  background: #ffffff;
  box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line);
  font-weight: 600;
}

.report-document {
  min-width: 0;
  min-height: 0;
  padding: 42px clamp(28px, 5vw, 74px) 80px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.document-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.document-meta {
  margin: 10px 0 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.markdown-body {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.72;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--ink-strong);
  font-family: var(--font-sans);
  line-height: 1.25;
}

.markdown-body h1 {
  margin: 0 0 22px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.markdown-body h2 {
  margin: 34px 0 14px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.markdown-body h3 {
  margin: 28px 0 10px;
  font-size: 17px;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 22px 0 8px;
  font-size: 14px;
}

.markdown-body p {
  margin: 0 0 16px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 18px;
  padding-left: 23px;
}

.markdown-body li {
  margin: 6px 0;
  padding-left: 2px;
}

.markdown-body blockquote {
  margin: 20px 0;
  padding: 1px 0 1px 16px;
  border-left: 3px solid var(--line-strong);
  color: var(--muted-strong);
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #344054;
  background: var(--surface-subtle);
  font-family: var(--font-sans);
  font-size: 0.88em;
}

.markdown-body pre {
  margin: 20px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-subtle);
}

.markdown-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.markdown-body table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 12px;
}

.markdown-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.assistant-pane .markdown-body table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.assistant-pane .markdown-body th,
.assistant-pane .markdown-body td {
  min-width: 90px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.markdown-footnote {
  margin: 7px 0;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.55;
}

.task-item {
  list-style: none;
}

.task-item input {
  margin: 0 5px 0 -20px;
  vertical-align: -1px;
}

.markdown-body th,
.markdown-body td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  color: var(--muted-strong);
  background: var(--surface-subtle);
  font-weight: 600;
}

.markdown-body hr {
  height: 1px;
  margin: 30px 0;
  border: 0;
  background: var(--line);
}

.markdown-body sup a,
.citation-link {
  color: var(--accent);
  text-decoration: none;
}

.citation-link:hover {
  text-decoration: underline;
}

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.view-toolbar h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.view-toolbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.secondary-button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.primary-button:hover {
  border-color: var(--accent-hover);
  color: #ffffff;
  background: var(--accent-hover);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary-button:hover,
.back-button:hover {
  border-color: #aeb6c2;
  color: var(--ink-strong);
  background: var(--surface-hover);
}

.factsheet-view,
.sources-view,
.approvals-view,
.audit-view,
.schedule-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.client-format-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.factsheet-toolbar {
  justify-content: space-between;
}

.portfolio-picker-row {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 7px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.portfolio-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.portfolio-picker select,
.portfolio-overview-actions select {
  min-width: 220px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink-strong);
  font: inherit;
}

.format-switch,
.format-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-files-link {
  margin-right: 6px;
  font-size: 12px;
  font-weight: 700;
}

.download-menu {
  position: relative;
}

.download-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 14%);
}

.download-menu-panel[hidden] {
  display: none;
}

.download-menu-panel a {
  display: block;
  padding: 8px 9px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
}

.download-menu-panel a:hover,
.download-menu-panel a:focus-visible {
  background: var(--surface-hover);
  outline: none;
}

.format-switch button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

.format-switch button:hover,
.format-switch button.is-active {
  border-color: #778196;
  color: var(--ink-strong);
  background: #ffffff;
}

.format-switch button.is-active {
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 700;
}

.report-view {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.report-client-view {
  display: grid;
  grid-template-columns: 82px minmax(300px, 1fr) minmax(185px, 250px);
  min-width: 0;
  min-height: 0;
}

.report-lumient-view {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.report-page-list {
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.report-page-button {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
}

.report-page-button:hover,
.report-page-button.is-active {
  border-color: var(--line-strong);
  color: var(--ink-strong);
}

.report-page-button.is-active {
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 700;
}

.report-page-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.report-page-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 12px;
}

.report-page-controls .secondary-button {
  min-height: 30px;
}

.report-page-scroll {
  min-height: 0;
  padding: 16px;
  overflow: auto;
  text-align: center;
}

.report-page-scroll img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 190px);
  margin: 0 auto;
  border: 1px solid var(--line);
  background: #ffffff;
}

.manager-input-panel {
  min-height: 0;
  padding: 18px 14px 28px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #ffffff;
}

.manager-input-panel h2 {
  margin: 0 0 4px;
  color: var(--ink-strong);
  font-size: 15px;
}

.manager-input-panel > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
}

.manager-input-item {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.manager-input-item:hover,
.manager-input-item.is-current {
  border-color: #9aa3b2;
}

.manager-input-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 11px;
}

.factsheet-client-scroll {
  min-height: 0;
  overflow: auto;
  background: #ffffff;
}

.factsheet-paper {
  width: min(100%, 1000px);
  min-width: 760px;
  margin: 0 auto;
  padding: 36px 42px 44px;
  color: #050505;
  background: #ffffff;
  font-family: var(--font-sans);
}

.client-factsheet-title {
  margin: 0;
  color: #2e5dd1;
  font-size: 35px;
  font-weight: 400;
  line-height: 1.05;
}

.client-factsheet-subtitle {
  margin: 4px 0 22px;
  color: #050505;
  font-size: 20px;
  font-weight: 400;
}

.client-factsheet-description {
  max-width: 880px;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.25;
}

.client-sheet-section-title {
  margin: 16px 0 8px;
  color: #2e5dd1;
  font-size: 17px;
  line-height: 1.2;
}

.composition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin: 4px 40px 14px;
}

.composition-panel h3 {
  margin: 0 0 5px;
  color: #0a3477;
  font-size: 17px;
  text-align: center;
}

.composition-content {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.donut {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--donut);
  -webkit-mask: radial-gradient(circle, transparent 0 38%, #000 40%);
  mask: radial-gradient(circle, transparent 0 38%, #000 40%);
}

.composition-legend {
  display: grid;
  gap: 2px;
}

.composition-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.metric-number {
  padding: 0;
  border: 0;
  border-bottom: 1px dotted transparent;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  cursor: pointer;
}

.metric-number:hover,
.metric-number.is-selected {
  border-bottom-color: currentColor;
  color: #1f55d7;
}

.composition-row .metric-number {
  font-weight: 700;
}

.client-sheet-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.client-sheet-table th,
.client-sheet-table td {
  padding: 5px 6px;
  border-right: 1px solid #d9dfe9;
  border-bottom: 1px solid #d9dfe9;
  text-align: center;
}

.client-sheet-table th:last-child,
.client-sheet-table td:last-child {
  border-right: 0;
}

.client-sheet-table thead th {
  color: #ffffff;
  background: #050505;
  font-weight: 700;
}

.client-sheet-table tbody tr:nth-child(odd) {
  background: #f4f6f8;
}

.client-sheet-table .row-label {
  color: #2e5dd1;
  font-weight: 700;
  text-align: left;
}

.client-sheet-table .total-row th,
.client-sheet-table .total-row td {
  color: #ffffff;
  background: #2e5dd1;
  font-weight: 700;
}

.attribution-table {
  font-size: 11px;
}

.attribution-table thead tr:nth-child(2) th {
  background: #0a3477;
}

.attribution-table th:first-child {
  width: 19%;
}

.metric-popover {
  position: fixed;
  z-index: 160;
  width: min(330px, calc(100vw - 24px));
  max-height: min(430px, calc(100vh - 24px));
  padding: 14px;
  overflow-y: auto;
  border: 1px solid #aeb6c2;
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
  font-size: 11px;
}

.metric-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.metric-popover-header strong {
  font-size: 13px;
}

.metric-popover-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0 0 2px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.metric-popover-close:hover {
  border-color: var(--line);
  color: var(--ink-strong);
  background: var(--surface-hover);
}

.metric-popover p {
  margin: 6px 0;
}

.metric-popover .metric-formula-heading {
  margin-bottom: 2px;
  color: var(--ink-strong);
  font-weight: 700;
}

.metric-popover .metric-formula-description {
  margin-top: 0;
}

.metric-popover code {
  display: block;
  padding: 7px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #ffffff;
  font-family: var(--font-sans);
  font-size: 9px;
  line-height: 1.45;
}

.metric-source-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.metric-source-list li {
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.metric-source-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted-strong);
}

.metric-source-link {
  color: var(--accent);
  font-size: 11px;
  text-align: left;
}

.cited-page {
  scroll-margin-top: 8px;
  border: 1px solid var(--accent);
  background: var(--surface-subtle);
}

@media (max-width: 620px) {
  .client-format-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .format-switch {
    max-width: 100%;
    overflow-x: auto;
  }

  .report-client-view {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: minmax(420px, 1fr) 230px;
  }

  .manager-input-panel {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .report-lumient-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
}

.spreadsheet-view {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.portfolios-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
}

.portfolio-overview-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.portfolio-overview-actions label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.portfolios-table-scroll {
  min-height: 0;
  overflow: auto;
}

.portfolios-table td {
  vertical-align: top;
}

.portfolios-table td:first-child strong,
.portfolios-table td:first-child small,
.portfolios-table td:nth-child(4) small {
  display: block;
}

.portfolios-table td small {
  margin-top: 3px;
  color: var(--muted);
}

.portfolios-table td:last-child a {
  display: inline-block;
  margin-right: 12px;
  font-weight: 700;
}

.portfolio-status {
  font-weight: 700;
}

.portfolio-status.is-up_to_date {
  color: #17633a;
}

.portfolio-status.is-inputs_missing {
  color: #8a4d00;
}

.connect-portfolio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent);
  text-align: left;
  cursor: pointer;
}

.connect-portfolio-row span,
.portfolio-connection-summary {
  color: var(--muted);
  font-size: 12px;
}

.portfolio-connection-summary {
  margin: 0;
  padding: 7px 18px 12px;
  background: #ffffff;
}

.sheet-name {
  color: var(--ink);
  font-weight: 600;
}

.toolbar-note {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.spreadsheet-layout {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.spreadsheet-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #ffffff;
}

.sheet-grid {
  border-spacing: 0;
  border-collapse: separate;
  min-width: 100%;
  table-layout: fixed;
  color: #253046;
  font-size: 12px;
  white-space: nowrap;
}

.sheet-grid th,
.sheet-grid td {
  position: relative;
  height: 31px;
  padding: 5px 8px;
  overflow: hidden;
  border-right: 1px solid #e8ebef;
  border-bottom: 1px solid #e8ebef;
  background: #ffffff;
  text-align: right;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.sheet-grid thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  color: var(--muted-strong);
  background: var(--surface-subtle);
  font-weight: 600;
  text-align: center;
}

.sheet-grid .corner-cell {
  left: 0;
  z-index: 6;
  width: 45px;
  min-width: 45px;
}

.sheet-grid .row-header {
  position: sticky;
  top: auto;
  left: 0;
  z-index: 3;
  width: 45px;
  min-width: 45px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-weight: 400;
  text-align: center;
}

.sheet-grid .data-cell {
  min-width: 106px;
  max-width: 180px;
  cursor: pointer;
}

.sheet-grid .data-cell.is-text {
  text-align: left;
}

.sheet-grid .data-cell:hover {
  box-shadow: inset 0 0 0 1px #9db2f2;
}

.sheet-grid .data-cell.is-selected {
  z-index: 2;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.sheet-grid .is-frozen-row {
  position: sticky;
  z-index: 2;
  background: #ffffff;
}

.sheet-grid .row-header.is-frozen-row {
  z-index: 5;
  background: var(--surface-subtle);
}

.sheet-grid .is-frozen-column {
  position: sticky;
  left: 45px;
  z-index: 3;
  box-shadow: 1px 0 0 #d9dee6;
  background: #ffffff;
}

.sheet-grid thead .is-frozen-column {
  z-index: 5;
  background: var(--surface-subtle);
}

.sheet-grid .is-frozen-row.is-frozen-column {
  z-index: 4;
}

.sheet-grid .data-cell.is-formula {
  background: #f8fafc;
}

.sheet-grid .data-cell.has-comment::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 7px solid var(--warning);
  border-left: 7px solid transparent;
  content: "";
}

.sheet-grid .data-cell.has-recent-change::before {
  position: absolute;
  bottom: 3px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  opacity: 0.55;
}

.sheet-grid .data-cell.is-history-target {
  z-index: 7;
  animation: history-cell-highlight 2.2s ease-out;
}

@keyframes history-cell-highlight {
  0%, 45% { box-shadow: inset 0 0 0 3px #d97706, 0 0 0 2px rgba(217, 119, 6, 0.2); }
  100% { box-shadow: inset 0 0 0 2px var(--accent); }
}

.sheet-grid .data-cell.has-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: #a9baf0;
  text-underline-offset: 2px;
}

.sheet-grid .data-cell.is-hand-entered {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #f59e0b;
}

.sheet-grid .data-cell.is-hand-entered::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d97706;
  content: "";
}

.cell-inspector {
  position: relative;
  z-index: 2;
  min-height: 98px;
  max-height: 190px;
  padding: 13px 18px;
  overflow-y: auto;
  border-top: 1px solid var(--line-strong);
  background: var(--surface-subtle);
}

.empty-inspector {
  color: var(--muted);
  font-size: 12px;
}

.empty-inspector strong {
  color: var(--muted-strong);
}

.empty-inspector p {
  margin: 4px 0 0;
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.cell-address {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-strong);
  background: #ffffff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
}

.cell-value {
  color: var(--ink-strong);
  font-weight: 600;
}

.inspector-grid {
  display: grid;
  grid-template-columns: minmax(65px, auto) minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 12px;
}

.inspector-label {
  color: var(--muted);
}

.inspector-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.inspector-value code {
  font-family: var(--font-sans);
  font-size: 11px;
}

.hand-entered-source {
  color: #9a3412;
  font-weight: 600;
}

.add-cell-source {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.metric-hand-entered {
  color: #9a3412;
  font-weight: 600;
}

.typed-input-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid #d97706;
  border-radius: 9px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 9px;
  font-weight: 700;
}

.spreadsheet-source-link {
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cell-edit-history {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.cell-edit-history h3,
.cell-edit-history p {
  margin: 0 0 6px;
}

.cell-edit-history ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cell-edit-history li span {
  margin-left: 7px;
  color: var(--muted);
}

.cell-edit-history li p {
  margin: 2px 0 0;
  color: var(--muted-strong);
}

.cell-edit-history li button,
.history-entry-actions button,
.toast-action {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.spreadsheet-history {
  position: absolute;
  z-index: 12;
  top: 0;
  right: 0;
  bottom: 36px;
  width: min(360px, 48%);
  overflow-y: auto;
  border-left: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: -8px 0 24px rgba(24, 34, 52, 0.08);
}

.spreadsheet-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.spreadsheet-history-header h2,
.spreadsheet-history-header p {
  margin: 0;
}

.spreadsheet-history-header h2 {
  font-size: 14px;
}

.spreadsheet-history-header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.spreadsheet-history-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.spreadsheet-history-filters label {
  color: var(--muted);
  font-size: 10px;
}

.spreadsheet-history-filters select {
  width: 100%;
  margin-top: 3px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  font-size: 10px;
}

.spreadsheet-history-list {
  padding: 8px 12px 20px;
}

.spreadsheet-history-entry {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.spreadsheet-history-entry > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.spreadsheet-history-entry time,
.spreadsheet-history-entry span,
.spreadsheet-history-entry small {
  color: var(--muted);
}

.spreadsheet-history-entry span,
.spreadsheet-history-entry small {
  grid-column: 1 / -1;
}

.history-entry-actions {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.history-entry-actions a {
  color: var(--accent);
}

.sheet-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 36px;
  padding: 0 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
  background: #f3f5f8;
}

.sheet-tab {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  color: var(--muted-strong);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.sheet-tab:hover,
.sheet-tab:focus-visible {
  color: var(--ink-strong);
  background: #ffffff;
}

.sheet-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink-strong);
  background: #ffffff;
  font-weight: 600;
}

.pending-approval-link {
  margin: 5px 0 0;
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.sheet-edit-dialog {
  width: min(440px, calc(100vw - 32px));
}

.sheet-edit-dialog .dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -18px 4px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.sheet-edit-dialog h2,
.sheet-edit-dialog .dialog-header p {
  margin: 0;
}

.sheet-edit-close::before {
  content: "×";
}

.sheet-edit-dialog .dialog-header p,
.sheet-edit-dialog .form-help {
  color: var(--muted);
  font-size: 11px;
}

.formula-change-card {
  border-color: #d49a35;
  box-shadow: inset 3px 0 0 #d49a35;
}

.formula-change-card .approval-value-change {
  border-color: #e3bd75;
  background: #fff8e8;
}

.search-field {
  display: flex;
  align-items: center;
  width: min(240px, 36vw);
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
}

.search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(40, 85, 217, 0.1);
}

.search-field svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.search-field input::placeholder {
  color: #98a2b3;
}

.table-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  font-size: 12px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted-strong);
  background: var(--surface-subtle);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  vertical-align: top;
}

.data-table tbody tr:hover td {
  background: #fafbfc;
}

.source-document {
  display: block;
  max-width: 290px;
  overflow: hidden;
  color: var(--ink-strong);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-path {
  display: block;
  max-width: 290px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-links {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.source-links button,
.source-links a {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.source-links button:hover,
.source-links a:hover {
  text-decoration: underline;
}

.table-loading,
.loading-row,
.empty-state,
.error-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  gap: 9px;
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.empty-state,
.error-state {
  flex-direction: column;
}

.empty-state strong,
.error-state strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-state p,
.error-state p {
  max-width: 440px;
  margin: 0;
}

.error-state strong {
  color: var(--danger);
}

.spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.card-list {
  min-height: 0;
  padding: 18px 20px 50px;
  overflow-y: auto;
}

.approval-card {
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.review-section {
  margin-bottom: 24px;
}

.review-section > h2 {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-size: 15px;
}

.review-empty {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.review-person {
  margin: 7px 0 0;
  color: var(--muted-strong);
  font-size: 11px;
}

.approval-card.is-inline {
  margin: 8px 0 16px 34px;
  padding: 14px;
}

.approval-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.approval-card-header h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 13px;
}

.approval-card-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.decision-badge,
.schedule-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.decision-badge.approved {
  border-color: #87b99f;
  color: var(--success);
}

.decision-badge.rejected {
  border-color: #df9b95;
  color: var(--danger);
}

.pending-review-note,
.metric-pending-review {
  color: #8a5a00;
  font-weight: 700;
}

.sheet-grid .data-cell.is-pending-review::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d89a20;
  content: "";
}

.maker-checker-setting {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.maker-checker-setting > span,
.maker-checker-setting small {
  display: block;
}

.maker-checker-setting small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.maker-checker-setting small b {
  margin-right: 5px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--muted-strong);
  font-size: 9px;
}

.maker-checker-setting input {
  flex: 0 0 auto;
}

.approval-value-change {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 8px 13px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  font-size: 12px;
}

.approval-label {
  color: var(--muted);
}

.approval-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-strong);
  font-weight: 600;
}

.approval-quote,
.approval-reason {
  margin: 8px 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
}

.approval-quote {
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
}

.approval-reason-line {
  margin: 8px 0;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-details {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 12px;
}

.approval-details summary {
  width: fit-content;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}

.approval-details p {
  margin: 8px 0;
}

.approval-check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.approval-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.approval-check-row:first-child {
  border-top: 0;
}

.approval-check-main strong,
.approval-cell-address {
  display: block;
}

.approval-check-main strong {
  color: var(--ink-strong);
  font-size: 12px;
}

.approval-cell-address {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.approval-row-status {
  align-self: start;
  font-size: 11px;
  font-weight: 700;
}

.approval-row-status.match {
  color: var(--success);
}

.approval-row-status.change {
  color: #8a5a00;
}

.approval-old-new,
.approval-check-row .approval-reason-line,
.approval-check-row .approval-details,
.approval-row-actions,
.approval-row-decision {
  grid-column: 1 / -1;
}

.approval-old-new {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
}

.approval-row-actions {
  display: flex;
  gap: 7px;
}

.approval-row-actions .approve-button,
.approval-row-actions .reject-button {
  min-width: 68px;
  height: 29px;
}

.approval-row-actions .is-selected {
  box-shadow: 0 0 0 2px rgba(40, 85, 217, 0.2);
}

.approval-row-decision {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
}

.batch-actions {
  flex-wrap: wrap;
}

.approval-source {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.approve-button,
.reject-button {
  min-width: 76px;
  height: 33px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.approve-button {
  border: 1px solid var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.approve-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.reject-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #ffffff;
}

.reject-button:hover {
  border-color: #aeb6c2;
  background: var(--surface-hover);
}

.approve-button:disabled,
.reject-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.audit-list {
  min-height: 0;
  padding-bottom: 40px;
  overflow-y: auto;
}

.audit-event {
  display: grid;
  grid-template-columns: 90px 170px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.audit-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.audit-type {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-summary {
  min-width: 0;
  color: var(--muted-strong);
  overflow-wrap: anywhere;
}

.audit-event.audit-sentence {
  grid-template-columns: minmax(0, 1fr);
}

.audit-event.audit-sentence .audit-summary {
  grid-column: 1;
  color: var(--ink);
}

.audit-link {
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.audit-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.audit-event details {
  grid-column: 3;
}

.audit-event summary {
  color: var(--accent);
  cursor: pointer;
}

.audit-event pre {
  max-height: 260px;
  margin: 8px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-subtle);
  font-size: 10px;
  white-space: pre-wrap;
}

.schedule-content {
  min-height: 0;
  padding: 24px 20px 50px;
  overflow-y: auto;
}

.schedule-card {
  max-width: 680px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.schedule-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.schedule-card-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 14px;
}

.schedule-badge.paused {
  border-color: #d2a66b;
  color: var(--warning);
}

.schedule-details {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px 18px;
  padding: 18px;
  font-size: 12px;
}

.schedule-details dt {
  color: var(--muted);
}

.schedule-details dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.schedule-note {
  margin: 0 18px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 12px;
}

.file-preview {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #ffffff;
}

.file-preview-toolbar .back-button {
  min-height: 24px;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
}

.back-button svg {
  width: 15px;
  height: 15px;
  margin-right: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.file-preview-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.file-preview-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.file-preview-markdown {
  max-width: 820px;
  margin: 0 auto;
  padding: 38px 44px 70px;
}

.assistant-pane {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.assistant-resizer {
  position: absolute;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  cursor: col-resize;
  touch-action: none;
}

.assistant-resizer span {
  width: 3px;
  height: 38px;
  border-radius: 2px;
  background: transparent;
  transition: background 120ms ease;
}

.assistant-resizer:hover span,
.assistant-resizer:focus-visible span,
body.is-resizing-assistant .assistant-resizer span {
  background: var(--line-strong);
}

body.is-resizing-assistant {
  cursor: col-resize;
  user-select: none;
}

.assistant-header {
  min-width: 0;
  max-width: 100%;
  padding: 14px 18px 12px;
  overflow-x: hidden;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.assistant-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  max-width: 100%;
  gap: 18px;
}

.assistant-title-row h1 {
  display: inline;
  margin: 0 8px 0 0;
  color: var(--ink-strong);
  font-size: 16px;
  letter-spacing: -0.015em;
}

.assistant-status {
  color: var(--muted);
  font-size: 11px;
}

.assistant-cost {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.assistant-menu {
  position: relative;
}

.assistant-menu-panel {
  position: absolute;
  z-index: 40;
  top: 35px;
  right: 0;
  min-width: 120px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(24, 34, 52, 0.12);
}

.assistant-menu-panel button {
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 4px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.assistant-menu-panel button:hover {
  background: var(--surface-hover);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-hover);
}

.icon-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.download-icon-button {
  color: var(--ink);
  text-decoration: none;
}

.context-chip {
  display: flex;
  align-items: center;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  height: 28px;
  margin-top: 10px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 11px;
}

.context-chip svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.3;
}

.context-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-scroll {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  padding: 20px 18px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.conversation {
  width: 100%;
  min-width: 0;
  max-width: 760px;
  margin: 0 auto;
}

.message {
  margin: 0 0 22px;
}

.message-role {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.message-content {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.62;
}

.message-content.markdown-body {
  font-size: 13px;
  line-height: 1.62;
}

.message-content p {
  margin: 0 0 10px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content h1,
.message-content h2,
.message-content h3 {
  margin: 18px 0 8px;
  font-size: 14px;
}

.message-content ul,
.message-content ol {
  margin-bottom: 11px;
}

.user-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 28px;
}

.user-message .message-role {
  align-self: flex-end;
}

.user-message .message-content {
  max-width: 94%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px 8px 2px 8px;
  background: var(--surface-subtle);
}

.assistant-message {
  margin-right: 5px;
}

.assistant-message.is-streaming .message-content::after {
  display: inline-block;
  width: 5px;
  height: 14px;
  margin-left: 3px;
  background: var(--accent);
  content: "";
  vertical-align: -2px;
  animation: blink 900ms steps(1, end) infinite;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

.message-error .message-content {
  color: var(--danger);
}

.screen-action-note {
  margin: -8px 0 18px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-action-note a {
  margin-left: 5px;
  color: var(--accent);
  font-weight: 600;
}

.suggestions {
  margin: 24px 0 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.suggestions h2 {
  margin: 0 0 9px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.suggestions button {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.suggestions button:hover {
  border-color: #b9c0ca;
  background: var(--surface-hover);
}

.activity-feed {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.steps-group {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
}

.steps-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  border: 0;
  color: var(--muted-strong);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.steps-spinner {
  width: 12px;
  height: 12px;
  border: 1px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.steps-chevron {
  font-size: 13px;
  transition: transform 120ms ease;
}

.steps-toggle[aria-expanded="true"] .steps-chevron {
  transform: rotate(180deg);
}

.steps-list {
  display: grid;
  gap: 5px;
  margin: 5px 0 0 5px;
  padding: 4px 0 3px 11px;
  border-left: 1px solid var(--line);
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.4;
}

.step-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.step-item.is-error {
  color: var(--danger);
}

.composer-wrap {
  min-width: 0;
  max-width: 100%;
  padding: 11px 16px 10px;
  overflow-x: hidden;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.attachment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 7px;
}

.attachment-chips:empty {
  display: none;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted-strong);
  background: var(--surface-subtle);
  font-size: 10px;
}

.attachment-chip button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.attachment-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--muted-strong);
  background: transparent;
  cursor: pointer;
}

.attachment-button:hover {
  background: var(--surface-hover);
}

.attachment-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.assistant-pane.is-dragging-attachment::after {
  position: absolute;
  z-index: 50;
  inset: 8px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  content: "Drop files to attach";
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

#assistant-panel {
  position: relative;
}

.assistant-pane.is-dragging-document::after,
#assistant-panel.is-dragging-document::after {
  position: absolute;
  z-index: 51;
  inset: 8px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  content: "Drop documents for filing review";
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

.doc-drop-card {
  min-width: 0;
}

.doc-drop-record-flags {
  border-left: 3px solid #d89a20;
}

.doc-drop-card-header {
  margin-bottom: 10px;
}

.doc-drop-state-badge {
  flex: 0 0 auto;
}

.doc-drop-section-title {
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 650;
}

.doc-drop-files {
  margin-bottom: 13px;
}

.doc-drop-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-drop-file-chip {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 2px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-subtle);
}

.doc-drop-file-chip.is-blocked {
  border-color: #df9b95;
  background: #fff6f5;
}

.doc-drop-file-name {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-drop-file-status,
.doc-drop-file-reason {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.doc-drop-file-reason {
  color: var(--danger);
  white-space: normal;
}

.doc-drop-summary,
.doc-drop-progress,
.doc-drop-empty,
.doc-drop-complete p {
  margin: 8px 0 12px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.5;
}

.doc-drop-placement-list {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  border: 0;
}

.doc-drop-placement {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.doc-drop-placement.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(40, 85, 217, 0.08);
}

.doc-drop-placement-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.doc-drop-placement-choice input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.doc-drop-placement-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
  gap: 10px;
  color: var(--ink-strong);
  font-size: 12px;
}

.doc-drop-confidence {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.doc-drop-placement-target {
  margin: 7px 0 5px 23px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.45;
}

.doc-drop-record-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.doc-drop-record-link:hover {
  text-decoration: underline;
}

.doc-drop-reasons {
  margin: 6px 0 8px 39px;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.doc-drop-warnings {
  display: grid;
  gap: 5px;
  margin: 8px 0 7px 23px;
}

.doc-drop-warning {
  padding: 7px 8px;
  border-left: 3px solid #d89a20;
  border-radius: 3px;
  color: #694b05;
  background: #fff9e8;
  font-size: 10px;
  line-height: 1.45;
}

.doc-drop-next-actions {
  display: grid;
  gap: 5px;
  margin: 9px 0 5px 23px;
  padding: 0;
  border: 0;
}

.doc-drop-next-actions legend {
  margin-bottom: 4px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 600;
}

.doc-drop-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.4;
}

.doc-drop-check input {
  margin: 1px 0 0;
}

.doc-drop-change-target {
  margin: 7px 0 0 23px;
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.doc-drop-issues {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.doc-drop-issue {
  padding: 9px 10px;
  border: 1px solid #e7c66e;
  border-radius: 6px;
  background: #fffbef;
}

.doc-drop-issue.is-error,
.doc-drop-issue.is-critical,
.doc-drop-issue.is-blocking {
  border-color: #df9b95;
  background: #fff6f5;
}

.doc-drop-issue-code {
  color: var(--ink-strong);
  font-size: 10px;
  text-transform: capitalize;
}

.doc-drop-issue p {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.45;
}

.doc-drop-diff {
  margin-top: 7px;
  color: var(--muted-strong);
  font-size: 10px;
}

.doc-drop-diff summary {
  cursor: pointer;
}

.doc-drop-diff-list {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr);
  gap: 4px 9px;
  margin: 7px 0 0;
}

.doc-drop-diff-list dt {
  color: var(--muted);
  font-weight: 600;
}

.doc-drop-diff-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.doc-drop-resolution {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 600;
}

.doc-drop-resolution select {
  width: 100%;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.doc-drop-target-search {
  margin: 10px 0 0 23px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
}

.doc-drop-target-search h5 {
  margin: 0 0 7px;
  color: var(--ink-strong);
  font-size: 11px;
}

.doc-drop-target-form {
  display: flex;
  gap: 6px;
}

.doc-drop-target-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 31px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-size: 11px;
}

.doc-drop-target-status,
.doc-drop-request-status {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.doc-drop-target-status.is-error,
.doc-drop-request-status.is-error {
  color: var(--danger);
}

.doc-drop-request-status.is-warning {
  color: var(--warning);
}

.doc-drop-target-results {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.doc-drop-target-result {
  width: 100%;
  padding: 7px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-size: 10px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.doc-drop-target-result:hover {
  border-color: var(--accent);
}

.doc-drop-actions {
  margin-top: 13px;
}

.doc-drop-filed-target {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

@media (max-width: 520px) {
  .doc-drop-placement-heading,
  .doc-drop-target-form {
    align-items: stretch;
    flex-direction: column;
  }

  .doc-drop-confidence {
    white-space: normal;
  }
}

.composer {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
  gap: 9px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40, 85, 217, 0.1);
}

.composer textarea {
  display: block;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 29px;
  max-height: 132px;
  padding: 6px 0 4px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: #98a2b3;
}

.send-button {
  flex: 0 0 auto;
  width: 56px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.send-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.send-button:disabled {
  border-color: #98a2b3;
  background: #98a2b3;
  cursor: wait;
}

.assistant-stop-note {
  margin: 4px 18px 10px;
  color: #667085;
  font-size: 11px;
  line-height: 1.4;
}

.composer-note {
  margin: 6px 2px 0;
  color: #8a94a6;
  font-size: 10px;
  text-align: center;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 360px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
  font-size: 12px;
  pointer-events: auto;
  animation: toast-in 160ms ease-out;
}

.toast.is-error {
  border-color: #e4a9a4;
  color: var(--danger);
}

.toast-action:disabled {
  color: var(--muted);
  cursor: wait;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.skeleton {
  border-radius: 4px;
  background: linear-gradient(90deg, #eceff3 20%, #f7f8fa 40%, #eceff3 60%);
  background-size: 260% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.skeleton-line {
  height: 14px;
  margin: 11px 9px;
}

.skeleton-line.short {
  width: 58%;
}

.skeleton-line.medium {
  width: 76%;
}

.document-loading {
  max-width: 760px;
}

.skeleton-title {
  width: 65%;
  height: 34px;
  margin-bottom: 30px;
}

.skeleton-paragraph {
  width: 100%;
  height: 110px;
  margin-bottom: 18px;
}

.skeleton-paragraph.short {
  width: 82%;
  height: 78px;
}

html[data-theme="icapital"] {
  --font-sans: Arial, Helvetica, sans-serif;
  --ink: #000000;
  --ink-strong: #002c71;
  --muted: #627fa0;
  --muted-strong: #002c71;
  --line: #c9d6f4;
  --line-strong: #c9d6f4;
  --surface-subtle: #f4f6f8;
  --surface-hover: #f4f6f8;
  --accent: #2858d3;
  --accent-hover: #002c71;
  --icapital-cyan: #6ef0f9;
  --icapital-mint: #88f7ab;
  --icapital-pale-blue: #c9d6f4;
  --icapital-pale-cyan: #bbf8fc;
  --icapital-pale-mint: #c6fbd5;
  --shadow: 0 12px 28px rgba(0, 44, 113, 0.16);
}

html[data-theme="icapital"] .brand-mark {
  background: #2858d3;
}

html[data-theme="icapital"] .brand-name,
html[data-theme="icapital"] .assistant-title-row h1,
html[data-theme="icapital"] .view-toolbar h1,
html[data-theme="icapital"] .fund-page-header h1,
html[data-theme="icapital"] .fund-section h2,
html[data-theme="icapital"] .report-document h1,
html[data-theme="icapital"] .report-document h2,
html[data-theme="icapital"] .report-document h3 {
  color: #002c71;
}

html[data-theme="icapital"] a,
html[data-theme="icapital"] .timeline-source,
html[data-theme="icapital"] .sheet-grid .data-cell.has-link {
  color: #2858d3;
}

html[data-theme="icapital"] a:hover {
  color: #002c71;
}

html[data-theme="icapital"] .workspace-tab.is-active,
html[data-theme="icapital"] .report-section-button.is-active,
html[data-theme="icapital"] .fund-button.is-active {
  color: #002c71;
}

html[data-theme="icapital"] .workspace-tab.is-active::after {
  background: #2858d3;
}

html[data-theme="icapital"] .secondary-button,
html[data-theme="icapital"] .back-button,
html[data-theme="icapital"] .icon-button,
html[data-theme="icapital"] .fund-suggestion {
  border-color: #c9d6f4;
  color: #002c71;
}

html[data-theme="icapital"] .format-switch button.is-active {
  border-color: #2858d3;
  color: #ffffff;
  background: #2858d3;
  box-shadow: none;
}

html[data-theme="icapital"] .format-switch button.is-active:hover {
  border-color: #002c71;
  color: #ffffff;
  background: #002c71;
}

html[data-theme="icapital"] .client-factsheet-title,
html[data-theme="icapital"] .client-sheet-section-title,
html[data-theme="icapital"] .client-sheet-table .row-label {
  color: #2858d3;
}

html[data-theme="icapital"] .client-factsheet-subtitle,
html[data-theme="icapital"] .client-factsheet-description {
  color: #000000;
}

html[data-theme="icapital"] .composition-panel h3 {
  color: #002c71;
}

html[data-theme="icapital"] .metric-number:hover,
html[data-theme="icapital"] .metric-number.is-selected {
  color: #2858d3;
}

html[data-theme="icapital"] .client-sheet-table thead th {
  color: #ffffff;
  background: #000000;
}

html[data-theme="icapital"] .attribution-table thead tr:nth-child(2) th {
  background: #002c71;
}

html[data-theme="icapital"] .client-sheet-table .total-row th,
html[data-theme="icapital"] .client-sheet-table .total-row td {
  color: #ffffff;
  background: #2858d3;
}

html[data-theme="icapital"] .client-sheet-table tbody tr:nth-child(odd),
html[data-theme="icapital"] .data-table tbody tr:hover td {
  background: #f4f6f8;
}

html[data-theme="icapital"] .data-table th,
html[data-theme="icapital"] .sheet-grid th,
html[data-theme="icapital"] .sheet-grid .row-header,
html[data-theme="icapital"] .sheet-grid .corner-cell {
  border-color: #002c71;
  color: #ffffff;
  background: #002c71;
}

html[data-theme="icapital"] .context-chip svg {
  stroke: #2858d3;
}

html[data-theme="icapital"] .context-chip {
  box-shadow: inset 3px 0 0 #6ef0f9;
}

html[data-theme="icapital"] .theme-toggle input:checked {
  background: #2858d3;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(320px, var(--assistant-width, 44%));
  }

  .report-view {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .workspace-tab {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 12px;
  }

  .report-document {
    padding-right: 34px;
    padding-left: 34px;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(620px, 64vh) minmax(620px, auto);
    height: auto;
    min-height: calc(100vh - var(--topbar-height));
    overflow: visible;
  }

  .workspace-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .assistant-pane {
    min-height: 620px;
    min-width: 0;
  }

  .assistant-resizer {
    display: none;
  }

  .assistant-scroll {
    max-height: 700px;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 0 12px;
  }

  .brand-name {
    display: none;
  }

  .viewer-control span {
    display: none;
  }

  .viewer-control select {
    max-width: 128px;
  }

  .workspace-tabs {
    padding: 0 8px;
  }

  .report-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .funds-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .funds-sidebar {
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .funds-sidebar .sidebar-heading {
    display: none;
  }

  .fund-list {
    display: flex;
    gap: 4px;
    padding: 7px 8px;
  }

  .fund-button {
    width: auto;
    min-width: 130px;
    max-width: 190px;
    margin: 0;
  }

  .fund-button.is-active {
    box-shadow: inset 0 -2px 0 var(--accent), 0 0 0 1px var(--line);
  }

  .fund-page {
    padding: 28px 20px 60px;
  }

  .report-sidebar {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-heading {
    display: none;
  }

  .report-sections {
    display: flex;
    gap: 4px;
    padding: 7px 8px;
  }

  .report-section-button {
    width: auto;
    max-width: 180px;
    margin: 0;
    white-space: nowrap;
  }

  .report-section-button.is-active {
    box-shadow: inset 0 -2px 0 var(--accent), 0 0 0 1px var(--line);
  }

  .report-document {
    padding: 28px 20px 60px;
  }

  .view-toolbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .toolbar-note {
    display: none;
  }

  .audit-event {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 7px 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .audit-summary,
  .audit-event details {
    grid-column: 2;
  }

  .schedule-details {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .schedule-details dd {
    margin-bottom: 8px;
  }

  .file-preview-markdown {
    padding: 28px 20px 60px;
  }
}

/* v27 fund and portfolio navigation */
.workspace-pane {
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.workspace-pane.is-sidebar-collapsed {
  grid-template-columns: 56px minmax(0, 1fr);
}

.app-sidebar {
  display: block;
  min-width: 0;
  padding: 10px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  background: #ffffff;
}

.app-sidebar .workspace-tab,
.sidebar-collapse {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  margin: 1px 0;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--muted-strong);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.app-sidebar .workspace-tab::after {
  display: none;
}

.app-sidebar .workspace-tab:hover,
.sidebar-collapse:hover {
  color: var(--ink-strong);
  background: var(--surface-hover);
}

.app-sidebar .workspace-tab.is-active {
  color: var(--accent);
  background: #eef3fc;
  font-weight: 700;
}

.sidebar-collapse {
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.nav-icon {
  display: inline-grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  font-size: 15px;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar .kbd {
  margin-left: auto;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 10px;
}

.sidebar-separator {
  height: 1px;
  margin: 9px 5px;
  background: var(--line);
}

.sidebar-group-label {
  margin: 16px 10px 5px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-manager {
  margin: 8px 9px 2px 31px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar .sidebar-fund,
.app-sidebar .sidebar-portfolio {
  padding-left: 30px;
  font-size: 12px;
}

.sidebar-not-connected,
.sidebar-loading {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 6px 9px 6px 30px;
  color: var(--muted);
  font-size: 12px;
}

.workspace-pane.is-sidebar-collapsed .nav-label,
.workspace-pane.is-sidebar-collapsed .kbd,
.workspace-pane.is-sidebar-collapsed .sidebar-group-label,
.workspace-pane.is-sidebar-collapsed .sidebar-manager,
.workspace-pane.is-sidebar-collapsed .sidebar-not-connected,
.workspace-pane.is-sidebar-collapsed .sidebar-loading {
  display: none;
}

.workspace-pane.is-sidebar-collapsed .workspace-tab,
.workspace-pane.is-sidebar-collapsed .sidebar-collapse {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.workspace-pane.is-sidebar-collapsed .sidebar-fund,
.workspace-pane.is-sidebar-collapsed .sidebar-portfolio {
  padding-left: 0;
}

.workspace-content {
  grid-column: 2;
}

.page-shell {
  height: 100%;
  padding: 18px 22px;
  overflow: auto;
}

.lifecycle-table-scroll {
  max-height: calc(100% - 76px);
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lifecycle-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 11px;
}

.lifecycle-table th,
.lifecycle-table td {
  min-width: 0;
  padding-right: 8px;
  padding-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lifecycle-table th {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.lifecycle-table th:first-child {
  width: 24%;
}

.lifecycle-table th:nth-child(2) {
  width: 14%;
}

.lifecycle-table th:nth-child(3) {
  width: 13%;
}

.lifecycle-table th:nth-child(4) {
  width: 11%;
}

.lifecycle-table th:nth-child(5),
.lifecycle-table th:nth-child(6) {
  width: 9%;
}

.lifecycle-table th:last-child {
  width: 20%;
}

.fund-name-line {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 6px;
}

.fund-name-line strong {
  flex: 0 0 auto;
}

.fund-name-line > span {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.25;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lifecycle-table td small {
  margin-top: 2px;
  color: var(--muted);
}

.entity-header h1 {
  margin: 0;
  color: #002c71;
  font-size: 22px;
}

.entity-meta {
  margin: 4px 0 14px;
  color: var(--muted);
}

.entity-meta button,
.text-link {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.entity-tabs {
  display: flex;
  gap: 22px;
  margin-bottom: 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.entity-tabs a,
.entity-tabs button {
  flex: 0 0 auto;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.entity-tabs .is-active {
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.summary-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.summary-box h2 {
  margin: 0 0 9px;
  color: #002c71;
  font-size: 14px;
}

.summary-box h3 {
  margin: 12px 0 2px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f2f5;
}

.summary-row:last-child {
  border-bottom: 0;
}

.warning-text {
  color: var(--warning);
}

.context-page-header {
  padding: 16px 20px 0;
}

.report-view.has-context-header,
.factsheet-view.has-context-header {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.spreadsheet-view.has-context-header {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.files-view.has-context-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.files-view.has-context-header > .context-page-header {
  grid-column: 1 / -1;
}

.files-view.has-context-header > .files-main {
  height: auto;
  min-height: 0;
}

.files-view.has-context-header > .file-drawer {
  grid-row: 2;
}

.quiet-setting-link {
  margin-top: 12px;
  padding: 0;
  border: 0;
  color: var(--muted-strong);
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.monthly-update-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.monthly-update-form .check-row,
.monthly-update-form button {
  grid-column: 1 / -1;
}

.context-page-header + .client-format-toolbar,
.context-page-header + .portfolio-picker-row,
.context-page-header + .files-main {
  padding-top: 0;
}

.portfolio-funds-table,
.performance-table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-update-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 14px 20px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 12px;
}

.portfolio-update-progress[hidden] {
  display: none;
}

.portfolio-update-progress .spinner {
  margin-right: 5px;
}

.portfolio-update-progress a {
  margin-left: auto;
  font-weight: 700;
}

.batch-match-summary {
  margin: 10px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
}

.portfolio-funds-table th,
.portfolio-funds-table td,
.performance-table th,
.performance-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.automatic-update-line {
  margin: 10px 20px 14px;
  color: var(--muted);
  font-size: 12px;
}

.automatic-update-line button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.portfolio-update-setting {
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--line);
}

.portfolio-update-setting h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.portfolio-update-enabled {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.portfolio-update-enabled span,
.portfolio-update-enabled small {
  display: block;
}

.portfolio-update-enabled small {
  margin-top: 3px;
  color: var(--muted);
}

.portfolio-update-enabled input {
  flex: 0 0 auto;
}

.portfolio-update-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.portfolio-update-fields label {
  display: grid;
  gap: 4px;
  color: var(--muted-strong);
  font-size: 11px;
}

.search-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.search-dialog::backdrop {
  background: rgba(16, 24, 40, 0.28);
}

.global-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.global-search-header h2 {
  margin: 0;
  color: #002c71;
  font-size: 16px;
}

.global-search-field {
  display: block;
  padding: 0 16px 12px;
}

.global-search-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.global-search-results {
  max-height: 460px;
  padding: 0 16px 16px;
  overflow: auto;
}

.search-result {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.search-result small {
  color: var(--muted);
}

.metric-popover {
  width: min(520px, calc(100vw - 24px));
  max-height: min(600px, calc(100vh - 24px));
  font-size: 12px;
}

.metric-explanation {
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.45;
}

.metric-inputs summary,
.metric-formula-details summary {
  padding: 7px 0;
  color: var(--ink-strong);
  font-weight: 700;
  cursor: pointer;
}

.metric-formula-details .metric-formula-heading {
  display: none;
}

.metric-input-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.metric-input-table th,
.metric-input-table td {
  padding: 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.metric-input-table th {
  color: var(--muted-strong);
  background: #ffffff;
}

@media (max-width: 900px) {
  .workspace-pane {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .app-sidebar .nav-label,
  .app-sidebar .kbd,
  .sidebar-group-label,
  .sidebar-manager,
  .sidebar-not-connected,
  .sidebar-loading {
    display: none;
  }

  .app-sidebar .workspace-tab,
  .sidebar-collapse {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 620px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* v28 report editor */
.report-view {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
}

.report-view.has-context-header {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.report-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.report-version-summary,
.report-editor-actions,
.report-section-actions,
.report-section-pager,
.report-gap-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-version-summary {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  font-size: 12px;
}

.report-version-summary span {
  color: var(--muted);
  font-size: 11px;
}

.report-editor-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-editor-actions .secondary-button,
.report-editor-actions .primary-button {
  min-height: 32px;
  white-space: nowrap;
}

.report-editor-actions .download-icon-button {
  width: auto;
  min-width: 62px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--accent);
  font: 600 12px/1 var(--font-sans);
}

html[data-theme="icapital"] .report-editor-actions .download-icon-button {
  border-color: #2858d3;
  color: #ffffff;
  background: #2858d3;
}

.report-editor-actions .is-active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.report-change-summary {
  display: flex;
  gap: 12px;
  padding: 9px 20px;
  border-bottom: 1px solid #cfdcf8;
  color: var(--ink);
  background: #f7f9fe;
  font-size: 12px;
}

.report-change-summary strong {
  flex: 0 0 auto;
  color: #002c71;
}

.report-editor-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.report-outline {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fafbfc;
}

.report-section-button span,
.report-section-button small {
  display: block;
}

.report-section-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.report-document {
  padding: 28px clamp(24px, 4vw, 58px) 56px;
  background: #ffffff;
}

.report-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.report-section-header h1 {
  max-width: 620px;
  margin: 0;
  color: #002c71;
  font-size: 24px;
  line-height: 1.18;
}

.report-section-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 430px;
}

.reviewed-badge,
.report-index-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #a7d5bd;
  border-radius: 999px;
  color: #12663d;
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.report-rich-text {
  max-width: 820px;
}

.report-sentence-row {
  position: relative;
  margin: 0 0 18px;
  padding: 1px 0 0;
}

.report-sentence-row.is-saving::before {
  position: absolute;
  top: 8px;
  left: -14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.report-sentence {
  min-height: 26px;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.68;
}

.report-sentence[contenteditable="true"]:hover {
  border-color: #e7eaf0;
}

.report-sentence[contenteditable="true"]:focus {
  border-color: #9bb2ed;
  outline: 2px solid #e7edfc;
}

.report-sentence-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding-left: 6px;
}

.report-source-chip,
.report-analyst-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #cfd6e3;
  border-radius: 999px;
  color: #344054;
  background: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

.report-source-chip {
  cursor: pointer;
}

.report-source-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.report-analyst-chip {
  border-style: dashed;
  color: var(--muted-strong);
}

.report-edited-mark {
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
}

.report-gap-list {
  display: grid;
  gap: 14px;
  max-width: 850px;
}

.report-gap {
  margin: 12px 0 20px;
  padding: 11px 13px;
  border: 1px solid #e5d29b;
  border-left: 4px solid #c88913;
  border-radius: 5px;
  background: #fffdf6;
}

.report-gap.is-resolved {
  border-color: var(--line);
  border-left-color: #8b96a8;
  background: #ffffff;
  color: var(--muted);
}

.report-gap p {
  margin: 0 0 9px;
  line-height: 1.5;
}

.report-gap-section {
  display: block;
  margin-bottom: 6px;
  color: #002c71;
  font-size: 12px;
}

.report-gap-actions .text-link {
  font-size: 12px;
}

.report-add-sentence {
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

.report-section-pager {
  justify-content: space-between;
  max-width: 820px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.report-source-popover {
  position: fixed;
  z-index: 90;
  width: min(370px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.report-source-popover h2 {
  margin: 0 28px 10px 0;
  color: #002c71;
  font-size: 15px;
}

.report-source-popover dl {
  margin: 0 0 14px;
  font-size: 12px;
}

.report-source-popover dt {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.report-source-popover dd {
  margin: 2px 0 0;
}

.report-source-popover .metric-popover-close {
  position: absolute;
  top: 9px;
  right: 9px;
}

.report-source-popover .secondary-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.report-dialog {
  width: min(600px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.report-dialog::backdrop {
  background: rgba(16, 24, 40, 0.3);
}

.report-dialog label {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.report-dialog input,
.report-dialog select,
.report-dialog textarea {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 400;
}

.manager-email-dialog textarea {
  min-height: 320px;
  resize: vertical;
  line-height: 1.5;
}

.report-empty-state {
  max-width: 500px;
  margin: 70px auto;
  text-align: center;
}

.lifecycle-table td:last-child small {
  display: block;
  margin-top: 3px;
}

@media (max-width: 1120px) {
  .report-view {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-editor-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .report-editor-toolbar,
  .report-section-header {
    align-items: flex-start;
  }

  .report-section-header {
    flex-direction: column;
  }

  .report-section-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .report-editor-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-editor-actions {
    justify-content: flex-start;
  }

  .report-editor-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .report-outline {
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .report-outline .sidebar-heading {
    display: none;
  }

  .report-outline .report-sections {
    display: flex;
    gap: 5px;
    padding: 7px;
  }

  .report-outline .report-section-button {
    flex: 0 0 190px;
  }
}
.sec-suggestions {
  grid-column: 1 / -1;
  border: 1px solid var(--border-color, #d8d8d8);
  border-radius: 6px;
  max-height: 180px;
  overflow: auto;
}

.sec-suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.sec-suggestion-row:last-child {
  border-bottom: 0;
}

.sec-suggestion-row > a {
  padding: 10px 12px;
  color: var(--accent);
  font-size: 11px;
  white-space: nowrap;
}

.sec-suggestion {
  align-items: flex-start;
  background: #fff;
  border: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.sec-suggestion.is-selected {
  background: #eef5ff;
}

.inline-field {
  display: flex;
  gap: 8px;
}

.inline-field input {
  flex: 1;
}

.full-width {
  grid-column: 1 / -1;
}

/* Inline report prose */
.report-sentence-row {
  display: inline;
  margin: 0 4px 0 0;
  padding: 0;
}

.report-sentence-row.is-saving::before {
  position: static;
  display: inline-block;
  margin-right: 3px;
  vertical-align: 2px;
}

.report-sentence {
  display: inline;
  min-height: 0;
  padding: 1px 2px;
}

.report-sentence-meta {
  display: inline;
  min-height: 0;
  margin-left: 2px;
  padding-left: 0;
  vertical-align: baseline;
}

.report-source-chip,
.report-analyst-chip {
  min-height: 0;
  padding: 0 5px;
  font-size: 9px;
  vertical-align: 2px;
}

.report-gap {
  display: block;
}
