:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #20233b;
  background: #f4f5fa;
  font-synthesis: none;
  --purple: #5143c9;
  --muted: #686d85;
  --line: #e1e3ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: var(--purple);
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #171b32;
  color: #dadcf1;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.brand {
  font-size: 25px;
  font-weight: 730;
  letter-spacing: -0.8px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.orbit {
  display: inline-block;
  width: 29px;
  height: 29px;
  border: 2px solid #a9a1ff;
  border-radius: 50%;
  transform: rotate(-30deg);
  position: relative;
}
.orbit:before {
  content: '';
  position: absolute;
  width: 38px;
  height: 13px;
  border: 1px solid #a9a1ff;
  border-radius: 50%;
  left: -7px;
  top: 6px;
}
.orbit:after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  background: #c3bcff;
  border-radius: 50%;
  right: -3px;
  top: 3px;
}
.sidebar label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9298bb;
}
.sidebar select {
  margin-top: 10px;
  width: 100%;
  background: #242941;
  color: #f1f1ff;
  border: 1px solid #383e5d;
}
.nav {
  display: grid;
  gap: 8px;
}
.nav a {
  color: #b8bdd9;
  text-decoration: none;
  padding: 13px 15px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 550;
}
.nav a:hover,
.nav a[aria-current='page'] {
  background: #333357;
  color: #fff;
}
.sidebar footer {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.8;
  color: #9298bb;
}
.sidebar footer strong {
  display: block;
  color: #cccfea;
}
.main {
  padding: clamp(24px, 2vw, 64px);
  width: 100%;
  min-width: 0;
  align-self: start;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar button {
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 700;
  margin: 0 0 12px;
}
h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -1.1px;
  margin: 0 0 12px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin: 0 0 18px;
}
h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
p {
  line-height: 1.65;
}
.intro {
  max-width: 680px;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 30px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: start;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 3px 14px #24264f03;
  min-width: 0;
  overflow-wrap: anywhere;
}
.stack {
  min-width: 0;
  display: grid;
  gap: 22px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  border: 0;
  border-radius: 8px;
  padding: 11px 17px;
  font-size: 13px;
  font-weight: 650;
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  display: inline-block;
}
.button.secondary {
  background: #edeafa;
  color: #443aa5;
}
.button.quiet {
  background: #f1f2f6;
  color: #585e76;
}
.button.danger {
  background: #fff0f0;
  color: #a42536;
}
.field {
  min-width: 0;
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
  font-size: 12px;
  font-weight: 650;
  color: #51566b;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-weight: 400;
  font-size: 14px;
  color: #242940;
}
input,
select,
textarea {
  border: 1px solid #d8dbe7;
  background: #fff;
  border-radius: 7px;
  padding: 10px 12px;
  min-width: 0;
}
input:not([type='checkbox']),
select {
  min-height: 44px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #7f71dc;
}
textarea {
  resize: vertical;
  min-height: 86px;
}
input[type='checkbox'] {
  width: 24px;
  height: 24px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  max-width: 75ch;
  line-height: 1.6;
}
.notice {
  background: #f1effb;
  color: #51458d;
  border-radius: 9px;
  padding: 13px 16px;
  font-size: 12px;
  line-height: 1.65;
}
.error {
  background: #fff0f0;
  color: #922c3b;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  white-space: pre-wrap;
}
.success {
  background: #eaf6f0;
  color: #266749;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
}
.empty {
  border: 1px dashed #d6d9e7;
  border-radius: 9px;
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.records {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.record {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.record:hover,
.record.selected {
  border-color: #9e92eb;
  background: #f7f5ff;
}
.record strong {
  font-size: 14px;
}
.record span {
  font-size: 12px;
  color: var(--muted);
}
.badge {
  font-size: 11px;
  border-radius: 5px;
  padding: 4px 7px;
  background: #eeedf8;
  color: #625396;
  display: inline-block;
}
.copy {
  max-width: 80ch;
  white-space: pre-wrap;
  font-size: 14px;
  color: #41475f;
  overflow-wrap: anywhere;
}
.result {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.result details {
  margin: 18px 0;
}
.result summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 20px;
}
th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
td,
th {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: #171b32;
  color: #fff;
  padding: clamp(40px, 7vw, 180px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-story h1 {
  font-size: 58px;
  line-height: 1.08;
  max-width: 500px;
  margin: 55px 0 22px;
}
.login-story p {
  color: #afb5d0;
  max-width: 420px;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form .card {
  width: 100%;
  max-width: 410px;
  padding: 38px;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
.pager {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}
.run-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.run-list p {
  margin: 0;
}
.run-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
/* ---------- CRM components ---------- */
.badge-ok {
  background: #e6f6ee;
  color: #1f6b47;
}
.badge-attention {
  background: #fdeeee;
  color: #a12a3b;
}
.badge-unknown {
  background: #f1f2f6;
  color: #5c6178;
}
.badge-stale {
  background: #fff4e3;
  color: #8a5a10;
}
.badge-neutral {
  background: #eeedf8;
  color: #625396;
}
.state {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.state[data-state='saving'] {
  color: #5c6178;
}
.state[data-state='saved'] {
  color: #266749;
}
.state[data-state='error'] {
  color: #a12a3b;
}
.state[data-state='conflict'] {
  color: #8a5a10;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.table-wrap table {
  margin-top: 0;
}
.table-wrap .empty {
  margin: 0;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stack-form {
  display: grid;
  gap: 2px;
}
.stack-form .field input,
.stack-form .field select,
.stack-form .field textarea,
.stack-form .button {
  min-height: 44px;
}
.stack-form .field input[type='checkbox'] {
  min-height: 0;
  width: 24px;
  height: 24px;
}
.form-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.kpi-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.kpi-value {
  font-size: 26px;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}
.kpi-foot {
  font-size: 12px;
  color: var(--muted);
}
.board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  align-items: flex-start;
}
.board-column {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: #eef0f6;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.board-column h3 {
  margin: 4px 4px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.board-column .record {
  padding: 13px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--line);
  display: grid;
  gap: 16px;
}
.timeline li {
  position: relative;
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.timeline li:before {
  content: '';
  position: absolute;
  left: -24px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9e92eb;
  border: 2px solid #fff;
}
.timeline time,
.timeline .hint {
  margin: 0;
}
.period {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: #51566b;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
}
.chip[aria-pressed='true'] {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f75a0;
  padding: 10px 15px 0;
}
.nav-label:first-child {
  padding-top: 0;
}
.sidebar-top {
  display: grid;
  gap: 36px;
}
@media (max-width: 1050px) {
  .main {
    padding: 28px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .login-story h1 {
    font-size: 42px;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 20px;
    gap: 20px;
  }
  .sidebar footer {
    display: none;
  }
  .sidebar {
    position: static;
    padding: 14px 16px 0;
    gap: 10px;
  }
  .sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .sidebar .brand {
    font-size: 20px;
  }
  .sidebar select {
    margin: 0;
    max-width: 46vw;
    min-height: 40px;
    font-size: 14px;
  }
  .sidebar label {
    font-size: 0;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0 -16px;
    padding: 0 12px 10px;
  }
  .nav-label {
    display: none;
  }
  .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .nav a[aria-current='page'] {
    box-shadow: inset 0 0 0 1px #a9a1ff;
  }
  .board-column {
    flex-basis: 82vw;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .main {
    padding: 24px 18px;
  }
  .topbar {
    overflow-wrap: anywhere;
    margin-bottom: 28px;
  }
  .card {
    padding: 21px;
  }
  .login-wrap {
    display: block;
  }
  .login-story {
    padding: 35px;
  }
  .login-story h1 {
    font-size: 36px;
    margin: 30px 0 0;
  }
  .login-story p {
    display: none;
  }
  .login-form {
    padding: 24px;
  }
  .login-form .card {
    padding: 28px;
  }
  h1 {
    font-size: 29px;
  }
}

/* Expand work surfaces, while keeping prose and data entry readable. */
.card form {
  max-width: 52rem;
}
.sidebar,
.topbar > *,
.row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sidebar label {
  min-width: 0;
}
@media (min-width: 1800px) {
  .workspace-grid {
    grid-template-columns: minmax(20rem, 0.8fr) minmax(0, 2fr);
    gap: 32px;
  }
  .workspace-grid > .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 32px;
  }
  .workspace-grid > .stack > :only-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 650px) {
  .field input,
  .field select,
  .field textarea,
  .sidebar select {
    font-size: 16px;
  }
  .login-form,
  .login-story {
    min-width: 0;
  }
}

/* shore view */
.shore-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
}
.shore-controls .field {
  margin-bottom: 0;
  min-width: 220px;
}
.shore-controls .period {
  margin-bottom: 0;
}
.shore-operator {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--purple);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}
.shore tbody tr[data-workspace] {
  cursor: pointer;
}
.shore tr.shore-selected td {
  background: #f3f1fd;
}
.shore-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.shore-bench-cell {
  display: inline-grid;
  gap: 4px;
  justify-items: end;
}
.shore-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 18px;
}
.shore-section {
  min-width: 0;
}
.shore-section .table-wrap + .shore-facts {
  margin-top: 14px;
}
.shore-scorecards {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.shore-scorecard {
  cursor: default;
}
.shore-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 16px;
  margin: 0;
  font-size: 13px;
}
.shore-facts dt {
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.shore-facts dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.shore-definitions summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
}
.shore-definitions-list {
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
}
.shore-definitions-list dt {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 650;
}
.shore-definitions-list dd {
  margin: 0 0 6px;
  font-size: 13px;
  color: #41475f;
  line-height: 1.55;
}
.shore-definitions-list .shore-definitions-list {
  margin: 6px 0 0 14px;
}
.shore .timeline .copy {
  margin: 0;
}
/* opportunities view */
.opps-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.opps-filters .period,
.opps-filters .tabs {
  margin-bottom: 0;
}
.tabs[role='tablist'] {
  background: #eef0f6;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}
.tab {
  border: 0;
  background: transparent;
  color: #51566b;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 650;
  border-radius: 8px;
  min-height: 40px;
}
.tab[aria-selected='true'] {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 1px 3px #24264f14;
}
.board-total {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.board .record {
  overflow-wrap: anywhere;
}
.board .record .badge {
  font-size: 11px;
}
.board .record .badge-attention {
  color: #a12a3b;
}
.board .record .badge-unknown {
  color: #5c6178;
}
.board .record .record-due {
  color: #51566b;
}
.board .record .record-blockers {
  color: #8a5a10;
}
.board .empty {
  padding: 18px 12px;
  margin: 0;
}
.opps-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.opp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.opp-head h2 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.opp-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}
.opp-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.opp-section h3 {
  margin-bottom: 12px;
}
.opp-section .copy {
  margin: 0 0 14px;
}
.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--purple);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
  overflow-wrap: anywhere;
}
.timeline li strong {
  font-size: 13px;
}
.timeline li .copy {
  margin: 0;
  font-size: 13px;
}
@media (max-width: 1050px) {
  .opps-lower {
    grid-template-columns: 1fr;
  }
}
/* today & tasks views */
.today .tabs .chip,
.tasks .tabs .chip {
  min-height: 44px;
}
.today-group {
  margin-bottom: 26px;
  min-width: 0;
}
.today-group h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 17px;
  margin: 0 0 10px;
}
.today-group h2 .count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.item-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.today-item,
.task-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.today-item strong,
.task-item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.item-reason {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #41475f;
}
.item-meta {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.item-meta .item-links {
  overflow-wrap: anywhere;
}
.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.item-actions .button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.item-actions .cancel-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
  width: 100%;
}
.item-actions .cancel-form .field {
  margin: 0;
  flex: 1 1 200px;
}
.item-actions .cancel-form .field input {
  min-height: 44px;
}
.today-body .hint {
  margin: 0;
}
.task-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.task-filters .field {
  margin: 0;
}
.task-filters select {
  min-height: 44px;
}
.task-detail .item-actions + .divider {
  margin-top: 20px;
}
@media (max-width: 650px) {
  .today-item,
  .task-item {
    padding: 14px;
  }
  .item-actions .button {
    flex: 1 1 auto;
  }
  .item-actions .cancel-form .button {
    flex: 1 1 auto;
  }
}

/* reports view */
.reports-kpis .kpi-foot {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reports-kpis .kpi-value {
  font-size: 24px;
  overflow-wrap: anywhere;
}
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
}
.reports-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--purple);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}
.reports tbody tr[data-user] {
  cursor: pointer;
}
.reports tr.reports-selected td {
  background: #f3f1fd;
}
.reports-section-title {
  margin-top: 22px;
}
.reports-drill {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.reports-drill h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.reports-drill .table-wrap {
  margin-top: 8px;
}
.reports-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.reports-bucket {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  text-align: left;
  min-height: 44px;
  min-width: 0;
  color: inherit;
}
.reports-bucket:hover,
.reports-bucket[aria-pressed='true'] {
  border-color: #9e92eb;
  background: #f7f5ff;
}
.reports-bucket strong {
  font-size: 22px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.reports-bucket span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.reports-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 16px;
  margin: 0;
  font-size: 13px;
}
.reports-facts dt {
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.reports-facts dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.reports-meter {
  display: grid;
  gap: 6px;
}
.reports-meter meter,
.reports-reasons meter {
  width: 100%;
  height: 12px;
  min-width: 0;
}
.reports-meter .hint {
  margin: 0;
}
.reports-reasons {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.reports-reasons li {
  display: grid;
  grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.reports-reasons b {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.reports-attention {
  display: grid;
  gap: 10px;
}
.reports-attention a {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.reports-attention a:hover {
  border-color: #9e92eb;
  background: #f7f5ff;
}
.reports-attention strong {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reports-attention .hint {
  margin: 0;
}
.reports-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.reports-definitions summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
}
.reports-definitions dl {
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
}
.reports-definitions dt {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 650;
}
.reports-definitions dd {
  margin: 0 0 6px;
  font-size: 13px;
  color: #41475f;
  line-height: 1.55;
}
.reports-foot {
  margin: 0;
}

/* prospects view */
.prospects [hidden] {
  display: none !important;
}
.prospect-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}
.prospect-controls .period,
.prospect-controls .field {
  margin-bottom: 0;
}
.prospect-search input {
  width: 100%;
  min-height: 44px;
  font-size: 15px;
}
.prospect-chips .chip {
  min-height: 44px;
  flex: 1 1 auto;
}
.prospect-row {
  min-height: 44px;
}
.prospect-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.prospect-head {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}
.prospect-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.prospect-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: start;
}
.outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.outcome {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #2f3450;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
}
.outcome[aria-pressed='true'] {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
.next-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 2px;
  margin: 0 0 17px;
  min-width: 0;
}
.next-step legend {
  font-size: 12px;
  font-weight: 650;
  color: #51566b;
  padding: 0 6px;
}
.radios {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  flex: 1 1 auto;
}
.radio input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--purple);
}
.radio:has(input:checked) {
  border-color: var(--purple);
  background: #f3f1fd;
}
.step-section .hint {
  margin: -8px 0 14px;
}
.person-add {
  margin: -6px 0 17px;
}
.person-entry {
  border: 1px dashed #c9c4ef;
  border-radius: 10px;
  padding: 16px 16px 6px;
  margin-bottom: 17px;
  background: #fbfaff;
}
.person-entry h3 {
  margin-bottom: 14px;
}
.person-entry .form-actions {
  margin-bottom: 10px;
}
.visit-conflict {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.visit-conflict .notice {
  margin: 0;
}
.visit-result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 9px;
  background: #eaf6f0;
  color: #266749;
  font-size: 14px;
  display: grid;
  gap: 4px;
}
.visit-result p {
  margin: 0;
  line-height: 1.5;
}
.prospect-edit summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.prospect-edit[open] summary {
  margin-bottom: 14px;
}
.person-row,
.agreement-row {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.person-row:last-child,
.agreement-row:last-child {
  border-bottom: 0;
}
.person-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.person-row .hint,
.agreement-row .hint {
  margin: 0;
  overflow-wrap: anywhere;
}
.person-row .button {
  justify-self: start;
  min-height: 44px;
}
.timeline-outcome {
  font-size: 13px;
  font-weight: 600;
  color: #2f3450;
}
.prospects .timeline .copy {
  margin: 0;
}
@media (max-width: 1050px) {
  .prospect-detail {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .outcomes {
    grid-template-columns: 1fr 1fr;
  }
  .prospect-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* accounts view */
.accounts-view [hidden] {
  display: none !important;
}
.accounts-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
}
.accounts-toolbar .tabs {
  margin-bottom: 0;
}
.accounts-search {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.accounts-search .field {
  flex: 1 1 180px;
  margin-bottom: 0;
}
.accounts-search .field input,
.accounts-search .button {
  min-height: 44px;
}
.accounts-view a.record {
  text-decoration: none;
  color: inherit;
}
.accounts-view .record .row {
  gap: 8px;
}
.account-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.accounts-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: -12px 0 26px;
  font-size: 13px;
  color: var(--muted);
}
.accounts-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (min-width: 1051px) {
  .accounts-detail {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.85fr);
  }
}
.scorecard {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.measure {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: grid;
  gap: 5px;
  min-width: 0;
}
.measure[data-state='attention'] {
  border-color: #f1c4cb;
  background: #fff8f8;
}
.measure[data-state='stale'] {
  border-color: #f0d9b0;
  background: #fffaf1;
}
.measure-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.measure-head strong {
  font-size: 14px;
}
.measure-value {
  font-size: 20px;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.measure-explanation {
  margin: 0;
  font-size: 13px;
  color: #41475f;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.measure .hint {
  margin: 0;
}
.accounts-view .commitment {
  cursor: default;
}
.accounts-view .commitment:hover {
  border-color: var(--line);
  background: #fff;
}
.accounts-view .card h3 {
  margin: 22px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.accounts-view .stack-form {
  margin-top: 10px;
}
.accounts-view .timeline .copy {
  margin: 0;
}
.accounts-view .timeline strong {
  font-size: 13px;
}
.accounts-view .record .badge-ok {
  color: #1f6b47;
}
.accounts-view .record .badge-attention {
  color: #a12a3b;
}
.accounts-view .record .badge-unknown {
  color: #5c6178;
}
.accounts-view .record .badge-stale {
  color: #8a5a10;
}
.accounts-view .record .badge-neutral {
  color: #625396;
}

/* ---------- Tiers, VMS evidence and onboarding (second pass, agent B) ---------- */
.tier-badge {
  font-weight: 600;
  letter-spacing: 0.2px;
}
.scorecard-group {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.scorecard-group[data-source] + .scorecard {
  margin-top: 8px;
}
.scorecard-vms-hint {
  margin: 8px 0 0;
}
.tier-card .tier-explanation {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.tier-card h3 {
  margin: 18px 0 8px;
  font-size: 13px;
}
.tier-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 16px;
  margin: 0;
  font-size: 13px;
}
.tier-facts dt {
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.tier-facts dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 0;
}
.tier-freshness {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-weight: 400;
}
.tier-freshness .hint {
  margin: 0;
}
.references-card .reference-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.references-card .reference-row:first-child {
  border-top: 0;
}
.references-card .reference-row strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.reports-tiers li {
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1fr) auto;
}
.reports-tiers li > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.reports-tiers small {
  font-size: 11px;
  line-height: 1.4;
}
.reports-vms {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 13px;
}
.reports-vms strong {
  font-size: 13px;
}
.reports-references small {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
  max-width: 48ch;
}
.shore-onboarding {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.shore-onboarding li {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.shore-onboarding li:first-child {
  border-top: 0;
  padding-top: 0;
}
.shore-onboarding-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.shore-onboarding .hint {
  margin: 0;
}
.shore-onboarding-section .hint:first-of-type {
  margin-bottom: 10px;
}
.shore-report > .row .shore-flags {
  flex: 1 1 auto;
}
/* imports view */
.imports > .copy {
  margin: 0 0 22px;
}
.imports-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1051px) {
  .imports-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: start;
  }
}
.imports .field-pair {
  display: grid;
  gap: 0 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.imports input[type='file'] {
  min-height: 44px;
  padding: 9px 12px;
}
.imports textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  min-height: 160px;
  white-space: pre;
  overflow: auto;
}
.import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 4px 0 8px;
}
.import-counts {
  font-size: 14px;
}
.imports h3 {
  margin: 22px 0 6px;
  font-size: 15px;
}
.map-control {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 240px;
}
.map-control select {
  min-height: 44px;
  flex: 1 1 auto;
  min-width: 0;
}
.map-control .hint {
  margin: 0;
}
.mapped {
  font-weight: 650;
  color: #1f6b47;
}
@media (max-width: 650px) {
  .stacked,
  .stacked tbody {
    display: block;
  }
  .stacked thead {
    display: none;
  }
  .stacked tr {
    display: grid;
    gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .stacked td {
    display: block;
    padding: 0;
    border: 0;
    white-space: normal;
  }
  .stacked td::before {
    content: attr(data-label) ': ';
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
  .stacked td[data-label='']::before {
    content: none;
  }
  .stacked td.control::before {
    display: block;
    margin-bottom: 6px;
  }
  .map-control {
    min-width: 0;
  }
}
