:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #d9e0e8;
  --line-strong: #c5ceda;
  --text: #1d2939;
  --muted: #667085;
  --accent: #1769aa;
  --accent-weak: #e8f2fb;
  --green: #137a4b;
  --amber: #a15c07;
  --red: #b42318;
  --shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  height: 62px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: #101828;
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: #101828;
  font-weight: 800;
}
.brand-title { font-size: 15px; font-weight: 750; white-space: nowrap; }
.brand-subtitle { margin-top: 2px; color: #cbd5e1; font-size: 12px; }
.topnav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topnav button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 11px;
  background: transparent;
  color: #d0d5dd;
  font-size: 14px;
  cursor: pointer;
}
.topnav button:hover { background: rgba(255,255,255,0.08); color: #fff; }
.topnav button.active { background: #fff; color: #101828; }
.reviewer-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: max-content;
}
.account-label { color: #cbd5e1; font-size: 12px; white-space: nowrap; }
.current-user {
  min-width: 92px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 720;
  white-space: nowrap;
}
.logout-button {
  height: 34px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.logout-button:hover { background: rgba(255,255,255,0.08); }
select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
select, input { height: 34px; padding: 0 9px; }
textarea { min-height: 94px; padding: 9px; resize: vertical; }
textarea.auto-grow-textarea {
  overflow: hidden;
  resize: none;
}
input::placeholder,
textarea::placeholder {
  color: #c5ccd6;
  opacity: 1;
}

.layout {
  height: calc(100vh - 62px);
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 0;
}
.sidebar {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}
.main {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

.side-title {
  margin: 2px 0 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}
.filter-sidebar-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.filter-sidebar-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}
.filter-sidebar-actions {
  padding-top: 10px;
  background: #fff;
}
.sidebar-action-stack {
  display: grid;
  gap: 8px;
}
.sidebar-primary-button,
.sidebar-clear-button {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}
.sidebar-primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.sidebar-primary-button:hover {
  border-color: #0f5590;
  background: #0f5590;
}
.sidebar-clear-button:hover {
  border-color: #8bbce5;
  background: #f5f9fd;
  color: #0f5590;
}
.side-section { margin-bottom: 16px; }
.filter-search-section {
  margin-bottom: 12px;
}
.filter-search-input {
  height: 36px;
  border-color: var(--line);
  border-radius: 7px;
  padding: 0 9px;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  line-height: 36px;
}
.filter-search-input:hover {
  border-color: #8bbce5;
  background: #fdfefe;
}
.filter-search-input:focus {
  outline: none;
  border-color: #6aa8da;
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.10);
}
.filter-search-input::placeholder {
  color: #a9b3c1;
  font-weight: 600;
}
.filter-section { margin-bottom: 10px; }
.side-section label {
  display: block;
  margin: 0 0 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}
.filter-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}
.filter-head:hover {
  border-color: #8bbce5;
  background: #f5f9fd;
}
.filter-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.filter-head i {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--muted);
  transition: transform .15s ease;
}
.filter-section.open .filter-head i {
  transform: rotate(90deg);
}
.filter-head em {
  color: var(--muted);
  font-style: normal;
  font-weight: 650;
}
.filter-group {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}
.filter-group[hidden] {
  display: none;
}
.filter-option {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: #344054;
  text-align: left;
  cursor: pointer;
}
.filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-option b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.filter-option:hover {
  border-color: #8bbce5;
  background: #f5f9fd;
}
.filter-option.active {
  border-color: #6aa8da;
  background: var(--accent-weak);
  color: #0f5590;
}
.filter-option.active b {
  color: #0f5590;
}
.side-nav { display: grid; gap: 6px; }
.side-nav button {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.side-nav button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-nav button b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.side-nav button.active, .side-nav button:hover { border-color: #8bbce5; background: var(--accent-weak); color: #0f5590; }
.side-nav button.active b, .side-nav button:hover b { color: #0f5590; }

.page {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-height: 0;
}
.page.work-only-page {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}
.page.dashboard-page {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}
.page.dashboard-heatmap-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
h1 { margin: 0; font-size: 22px; letter-spacing: 0; }
.subtle { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 8px; }
.button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 11px;
  background: #fff;
  color: #344054;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  border-color: #8bbce5;
  background: #f5f9fd;
  color: #0f5590;
  text-decoration: none;
}
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { border-color: #0f5590; background: #0f5590; color: #fff; }
.button.danger { border-color: #fecdca; color: var(--red); }
.button.danger:hover { background: #fff5f4; }
.button.small { padding: 5px 8px; font-size: 12px; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.full-width { width: 100%; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}
.metric-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.metric-card b { display: block; font-size: 28px; line-height: 1; }
.metric-card span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }
.metric-button {
  width: 100%;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.metric-button:hover {
  border-color: #8bbce5;
  background: #f5f9fd;
}
.metric-button.active {
  border-color: #1769aa;
  background: #eef7ff;
  box-shadow: inset 0 0 0 1px rgba(23, 105, 170, .14);
}
.metric-button.active b,
.metric-button.active span {
  color: #0f5590;
}
.dashboard-panels {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  grid-template-areas:
    "research stage"
    "tier outreach"
    "heatmap heatmap";
  align-items: center;
  align-content: start;
  gap: 12px;
  overflow: auto;
}
.dashboard-panels .panel {
  align-self: start;
  min-height: 0;
  overflow: hidden;
}
.dashboard-chart-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.research-pool-panel { grid-area: research; }
.advisor-stage-panel { grid-area: stage; }
.school-tier-panel { grid-area: tier; }
.outreach-status-panel { grid-area: outreach; }
.dashboard-panels .dashboard-heatmap-panel { grid-area: heatmap; }
.dashboard-heatmap-page .dashboard-heatmap-panel {
  grid-area: auto;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}
.dashboard-panel-body {
  height: auto;
  max-height: clamp(260px, 32vh, 340px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.dashboard-panel-body.research-pool-chart,
.dashboard-panel-body.advisor-stage-chart,
.dashboard-panel-body.school-tier-chart {
  min-height: 0;
  max-height: none;
}
.dashboard-table {
  table-layout: fixed;
}
.dashboard-table th {
  position: static;
  top: auto;
  z-index: auto;
}
.dashboard-table tr {
  cursor: default;
}
.dashboard-table th:first-child,
.dashboard-table td:first-child {
  width: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}
.dashboard-table th:last-child,
.dashboard-table td:last-child {
  width: 72px;
  text-align: right;
  white-space: nowrap;
}
.research-pool-chart,
.advisor-stage-chart,
.school-tier-chart,
.outreach-status-chart {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 2px;
  padding-bottom: 8px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(112px, .9fr) minmax(168px, 2.25fr) 44px;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}
.bar-label {
  min-width: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #2f80c0;
}
.advisor-stage-chart .bar-fill {
  background: #1f8a70;
}
.school-tier-chart .bar-fill {
  background: #a15c07;
}
.outreach-status-chart .bar-fill {
  background: #6f5bb8;
}
.bar-value {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-align: right;
}
.heatmap-panel-title {
  position: static;
  min-height: 46px;
}
.heatmap-config {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.heatmap-config-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 11px 12px 12px;
}
.heatmap-range-section {
  border-right: 1px solid var(--line);
}
.heatmap-config-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 720;
}
.heatmap-config-head button {
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: #667085;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.heatmap-config-head button:hover:not(:disabled) {
  border-color: #8bbce5;
  color: #0f5590;
  background: var(--accent-weak);
}
.heatmap-config-head button:disabled {
  opacity: .42;
  cursor: default;
}
.heatmap-legend {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.heatmap-ramp {
  width: 118px;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(90deg, #fff7f5, #e8542b);
}
.heatmap-filter-panel {
  min-height: 0;
  max-height: 170px;
  display: grid;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}
.heatmap-filter-group {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.heatmap-filter-label {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #344054;
  font-size: 12px;
  font-weight: 720;
  line-height: 24px;
}
.heatmap-filter-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.heatmap-filter-options {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 5px;
}
.heatmap-filter-choice-list {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.heatmap-filter-chip {
  max-width: 100%;
  height: 24px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
  background: #fff;
  color: #475467;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.heatmap-filter-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.heatmap-filter-chip b {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}
.heatmap-filter-chip.active,
.heatmap-filter-chip:hover {
  border-color: #8bbce5;
  background: var(--accent-weak);
  color: #0f5590;
}
.heatmap-filter-chip.active b,
.heatmap-filter-chip:hover b {
  color: #0f5590;
}
.heatmap-filter-all-chip {
  color: #667085;
  background: #f8fafc;
}
.heatmap-dimension-section {
  gap: 10px;
}
.heatmap-dimension-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 12px;
}
.heatmap-dimension-field select {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 13px;
}
.heatmap-scroller {
  min-height: 0;
  height: 100%;
  max-width: 100%;
  overflow: auto;
  padding: 12px;
}
.heatmap-table {
  min-width: 760px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
  font-size: 13px;
}
.heatmap-table th,
.heatmap-table td {
  position: static;
  min-width: 86px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.heatmap-table th {
  background: #edf3f5;
  color: #49616c;
  font-size: 12px;
  font-weight: 720;
}
.heatmap-table th:first-child {
  width: 170px;
}
.heatmap-table tr,
.heatmap-table tr:hover {
  background: transparent;
  cursor: default;
}
.heatmap-value {
  background: #fff;
  color: #3a1711;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: box-shadow .12s ease;
}
.heatmap-value:hover {
  box-shadow: inset 0 0 0 999px rgba(245, 249, 253, .62);
}
.heatmap-value.zero {
  background: #f8fafc;
  color: #98a2b3;
  font-weight: 650;
}
.heatmap-empty {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}
@media (max-width: 1120px) {
  .heatmap-config {
    grid-template-columns: minmax(0, 1fr);
  }
  .heatmap-range-section {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .heatmap-dimension-section {
    grid-template-columns: auto minmax(140px, 1fr) minmax(140px, 1fr) auto;
    align-items: end;
  }
  .heatmap-dimension-section .heatmap-config-head {
    align-self: center;
  }
}
.task-list {
  display: grid;
  gap: 8px;
}
.task-row {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.task-row:hover {
  border-color: #8bbce5;
  background: #f5f9fd;
}
.task-row span {
  color: var(--muted);
  font-size: 12px;
}
.coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.coverage-grid h3 {
  margin: 0 0 8px;
  color: #344054;
  font-size: 14px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  min-height: 0;
}
.panel-title {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-weight: 760;
}
.panel-title.inner-title {
  position: static;
  min-height: 0;
  padding: 12px 14px;
  background: transparent;
}
.panel-body { padding: 14px; min-height: 0; }

.advisor-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(460px, .95fr) minmax(520px, 1.05fr);
  gap: 14px;
}
.advisor-workspace.with-ai {
  grid-template-columns: minmax(440px, .94fr) minmax(360px, .78fr) minmax(430px, .94fr);
}
.table-wrap { height: 100%; overflow: auto; }
.advisor-table-shell {
  min-height: 100%;
}
.advisor-loading-state {
  min-height: 180px;
}
.loading-block {
  color: var(--muted);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: #475467;
  text-align: left;
  font-size: 12px;
}
.table-wrap th {
  height: 46px;
  padding: 0 10px;
  vertical-align: middle;
}
th, td { padding: 9px 10px; border-bottom: 1px solid #edf1f5; vertical-align: top; }
.advisor-table-shell td,
.outreach-table td {
  vertical-align: middle;
}
.table-wrap th:first-child,
.table-wrap td:first-child {
  text-align: center;
  vertical-align: middle;
}
.table-wrap th:last-child,
.table-wrap td:last-child {
  vertical-align: middle;
}
.outreach-table th:nth-child(n+4),
.outreach-table td:nth-child(n+4) {
  vertical-align: middle;
}
.table-status-row {
  cursor: default;
}
.table-status-row:hover {
  background: transparent;
}
.table-status-row td {
  height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  vertical-align: middle;
}
tr { cursor: pointer; }
tr:hover { background: #f5f9fd; }
tr.selected { background: #e8f2fb; }
.name-cell { font-weight: 730; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}
.badge.green { background: #e7f6ee; color: var(--green); }
.badge.amber { background: #fff3df; color: var(--amber); }
.badge.red { background: #fee4e2; color: var(--red); }
.detail { height: 100%; overflow: auto; }
.detail h2 { margin: 0; font-size: 20px; }
.detail-heading,
.outreach-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.status-stack.align-right {
  justify-content: flex-end;
}
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.info-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.info-block h3 { margin: 0 0 6px; font-size: 13px; color: #344054; }
.info-block p { margin: 0; color: #475467; font-size: 13px; line-height: 1.45; }
.info-lines {
  display: grid;
  gap: 4px;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
}
.info-line {
  overflow-wrap: anywhere;
}
.info-line.muted {
  color: var(--muted);
}
.highlight-list {
  margin: 0;
  padding-left: 18px;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
}
.highlight-list li + li {
  margin-top: 4px;
}
.review-form { display: grid; gap: 10px; margin-top: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.choice-label {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}
.choice-button-row {
  min-width: 0;
  container-type: inline-size;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.choice-button {
  min-width: 0;
  flex: 1 1 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0 7px;
  background: #fff;
  color: #475467;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.choice-button-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.choice-button-text::before {
  content: attr(data-full);
}
@container (max-width: 320px) {
  .choice-button {
    padding: 0 5px;
    font-size: 12px;
  }
  .choice-button-text::before {
    content: attr(data-short);
  }
}
@container (max-width: 210px) {
  .choice-button-row {
    gap: 3px;
    padding: 3px;
  }
  .choice-button {
    min-height: 30px;
    padding: 0 3px;
    font-size: 11.5px;
  }
  .choice-button-text::before {
    content: attr(data-tiny);
  }
}
.choice-button:hover {
  background: #f2f4f7;
  border-color: #98a2b3;
  color: #344054;
}
.choice-button.green {
  color: var(--green);
}
.choice-button.neutral {
  color: #475467;
}
.choice-button.amber {
  color: var(--amber);
}
.choice-button.red {
  color: var(--red);
}
.choice-button.active {
  font-weight: 760;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.choice-button.active.green {
  border-color: var(--green);
  background: #e7f6ee;
  color: var(--green);
}
.choice-button.active.neutral {
  border-color: #667085;
  background: #eef2f6;
  color: #344054;
}
.choice-button.active.amber {
  border-color: var(--amber);
  background: #fff3df;
  color: var(--amber);
}
.choice-button.active.red {
  border-color: var(--red);
  background: #fee4e2;
  color: var(--red);
}
.save-state { min-height: 18px; color: var(--muted); font-size: 12px; }
.note-save-state {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  align-self: center;
  line-height: 1.3;
}
.save-state.dirty,
.save-state.saving,
.save-state.saved,
.save-state.error {
  color: var(--muted);
  font-weight: 400;
}
.outreach-save-toolbar .save-state {
  flex: 1;
  text-align: right;
}
.outreach-form {
  padding-top: 2px;
}
.outreach-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.advisor-marker-form {
  padding-top: 10px;
}
.advisor-marker-grid {
  margin-bottom: 10px;
}
.date-choice-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}
.date-choice-field input {
  min-height: 42px;
  border-color: var(--line);
  background: #fff;
}
.date-choice-field input:hover {
  border-color: var(--line-strong);
}
.outreach-detail-panel .panel-body,
.advisor-detail-panel .panel-body {
  font-size: 13px;
}
.outreach-detail-panel label,
.advisor-detail-panel label {
  font-size: 13px;
  color: #344054;
}
.outreach-detail-panel select,
.outreach-detail-panel input,
.outreach-detail-panel textarea,
.advisor-detail-panel select,
.advisor-detail-panel input,
.advisor-detail-panel textarea {
  font-size: 13px;
}
.outreach-detail-panel .button,
.advisor-detail-panel .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
  line-height: 1;
}
.outreach-detail-panel .save-state,
.outreach-detail-panel .small,
.advisor-detail-panel .save-state,
.advisor-detail-panel .small {
  font-size: 12px;
}
.link-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.link-list a { color: var(--accent); font-size: 13px; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.contact-block {
  min-width: 0;
}
.contact-list {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.contact-row {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.contact-row a {
  min-width: 0;
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-row a:hover {
  text-decoration: underline;
}
.contact-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.document-type-nav button {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
}
.document-type-nav span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-type-nav b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}
.document-type-nav button.active b,
.document-type-nav button:hover b {
  color: #0f5590;
}
.upload-side-action {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.documents-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(500px, .95fr) minmax(420px, 1.05fr);
  gap: 14px;
}
.documents-left {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: auto;
}
.documents-left.no-upload {
  grid-template-rows: minmax(0, 1fr);
}
.document-version-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.document-version-panel .panel-title {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.document-version-panel .panel-body {
  min-height: 0;
  overflow: auto;
}
.upload-form {
  display: grid;
  gap: 12px;
}
.drop-zone {
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1.5px dashed #98a2b3;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  text-align: center;
  cursor: pointer;
}
.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-weak);
}
.drop-zone strong,
.drop-zone span,
.drop-zone em {
  display: block;
}
.drop-zone strong {
  font-size: 15px;
}
.drop-zone span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.drop-zone em {
  margin-top: 10px;
  color: #344054;
  font-size: 13px;
  font-style: normal;
  font-weight: 720;
}
.doc-list {
  display: grid;
  align-content: start;
  gap: 8px;
}
.doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  background-clip: padding-box;
  overflow: hidden;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.doc-row:hover {
  border-color: #8bbce5;
  background-color: #f5f9fd;
}
.doc-row.selected {
  border-color: #8bbce5;
  background-color: #e8f2fb;
  box-shadow: none;
}
.doc-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.doc-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-title-row .badge {
  flex: 0 0 auto;
}
.doc-file-name,
.doc-meta-line,
.doc-note {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.doc-note {
  color: #475467;
}
.doc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.document-preview {
  min-height: 0;
  overflow: hidden;
}
.preview-body {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.preview-head > div {
  min-width: 0;
}
.preview-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.preview-file-button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.preview-frame {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.image-preview {
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 12px;
}
.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.outreach-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(460px, .95fr) minmax(520px, 1.05fr);
  gap: 14px;
}
.program-workspace,
.settings-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
  gap: 14px;
}
.outreach-workspace.with-ai {
  grid-template-columns: minmax(440px, .94fr) minmax(360px, .78fr) minmax(430px, .94fr);
}
.settings-workspace {
  grid-template-columns: minmax(520px, .95fr) minmax(420px, 1.05fr);
}
.outreach-scroll {
  height: 100%;
  overflow: auto;
}
.program-list {
  display: grid;
  gap: 9px;
}
.program-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.program-row:hover {
  border-color: #8bbce5;
  background: #f5f9fd;
}
.program-row.selected {
  border-color: #8bbce5;
  background: #e8f2fb;
}
.outreach-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.outreach-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}
.outreach-group-title span {
  color: var(--muted);
  font-size: 12px;
}
.outreach-events {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.outreach-section-title {
  margin: 0 0 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}
.event-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.event-list {
  display: grid;
  gap: 9px;
}
.event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.event-delete {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}
.event-row strong {
  display: block;
  margin-top: 6px;
}
.event-row p {
  margin: 8px 0 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.compact-empty {
  padding: 18px 10px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}
.checkbox-row input {
  width: 16px;
  height: 16px;
  padding: 0;
}
.settings-note {
  display: grid;
  gap: 10px;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}
.settings-note p {
  margin: 0;
}
.ai-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}
.ai-panel .panel-body {
  display: grid;
  overflow: hidden;
  min-height: 0;
  font-size: 13px;
}
.ai-panel .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
  line-height: 1;
}
.ai-conversation {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}
.ai-chat-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.ai-message-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-bottom: 2px;
}
.ai-message {
  width: fit-content;
  max-width: 92%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.ai-message.assistant {
  background: #f8fafc;
}
.ai-message.user {
  justify-self: end;
  background: #eef6ff;
  border-color: #c8def4;
}
.ai-message.pending {
  opacity: .78;
}
.ai-markdown {
  margin: 6px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ai-markdown > *:first-child {
  margin-top: 0;
}
.ai-markdown > *:last-child {
  margin-bottom: 0;
}
.ai-markdown p {
  margin: 8px 0;
}
.ai-markdown h3,
.ai-markdown h4,
.ai-markdown h5 {
  margin: 12px 0 7px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 750;
}
.ai-markdown h3 {
  font-size: 14px;
}
.ai-markdown ul,
.ai-markdown ol {
  margin: 8px 0;
  padding-left: 18px;
}
.ai-markdown li {
  margin: 4px 0;
}
.ai-markdown strong {
  color: #1f2937;
  font-weight: 750;
}
.ai-markdown em {
  font-style: italic;
}
.ai-markdown a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 105, 170, .28);
}
.ai-markdown a:hover {
  border-bottom-color: var(--accent);
}
.ai-markdown code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #eef2f7;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.ai-markdown pre {
  margin: 9px 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f6f8;
  overflow: auto;
}
.ai-markdown pre code {
  padding: 0;
  background: transparent;
  white-space: pre;
}
.ai-markdown hr {
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.markdown-table-wrap {
  max-width: 100%;
  margin: 10px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.ai-markdown table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  background: #fff;
}
.ai-markdown th,
.ai-markdown td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.ai-markdown th:last-child,
.ai-markdown td:last-child {
  border-right: 0;
}
.ai-markdown tr:last-child td {
  border-bottom: 0;
}
.ai-markdown th {
  background: #f1f5f9;
  color: #1f2937;
  font-weight: 700;
}
.typing-cursor {
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 2px;
  border-right: 2px solid #1769aa;
  vertical-align: -2px;
  animation: cursorBlink 1s steps(1) infinite;
}
@keyframes cursorBlink {
  50% { opacity: 0; }
}
.ai-input-form {
  display: grid;
  gap: 6px;
  padding-top: 6px;
}
.ai-composer {
  position: relative;
  display: grid;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.ai-composer:focus-within {
  border-color: #8bbce5;
  box-shadow: 0 0 0 3px rgba(23, 105, 170, .08);
}
.ai-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 160px;
  padding: 12px 48px 12px 14px;
  border: 0;
  background: transparent;
  font-size: 13px;
  resize: none;
  line-height: 1.5;
  outline: none;
}
.ai-send-button {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #1769aa;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.ai-send-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ai-send-button:not(:disabled):hover {
  background: #0f5590;
  box-shadow: 0 2px 6px rgba(15, 85, 144, .22);
}
.ai-send-button:not(:disabled):active {
  transform: translateY(1px);
}
.ai-send-button:disabled {
  background: #e4e7ec;
  color: #98a2b3;
  cursor: not-allowed;
}

.empty {
  padding: 34px 14px;
  color: var(--muted);
  text-align: center;
}

.login-mode .reviewer-box { visibility: hidden; }
.login-mode .layout {
  grid-template-columns: 1fr;
}
.login-mode .sidebar { display: none; }
.login-mode .main {
  display: grid;
  place-items: center;
  overflow: auto;
}
.login-shell {
  width: min(420px, 100%);
}
.login-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.login-panel h1 {
  font-size: 22px;
}
.login-message {
  min-height: 18px;
  color: var(--red);
  font-size: 13px;
}
.login-message.info {
  color: var(--muted);
}

@media (max-width: 1100px) {
  body { overflow: auto; height: auto; }
  .topbar { grid-template-columns: 1fr; height: auto; align-items: stretch; padding: 12px; }
  .topnav { flex-wrap: wrap; }
  .reviewer-box { justify-content: flex-start; flex-wrap: wrap; }
  .layout { grid-template-columns: 1fr; height: auto; }
  .main { overflow: visible; }
  .advisor-workspace, .advisor-workspace.with-ai, .dashboard-grid, .dashboard-panels, .coverage-grid, .documents-workspace, .outreach-workspace, .outreach-workspace.with-ai, .program-workspace, .settings-workspace { grid-template-columns: 1fr; }
  .dashboard-panels {
    grid-template-areas:
      "research"
      "stage"
      "tier"
      "outreach"
      "heatmap";
  }
  .documents-left { overflow: visible; }
  .doc-row { grid-template-columns: 1fr; align-items: stretch; }
  .doc-actions { justify-content: flex-start; }
  .program-row { grid-template-columns: 1fr; }
}
