:root {
  color-scheme: light;
  --navy-1000: #07101d;
  --navy-950: #0b1628;
  --navy-900: #10203a;
  --navy-800: #1a3153;
  --workspace: #edf1f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-tint: #f0f5ff;
  --ink: #142033;
  --ink-soft: #39485f;
  --muted: #5f6b7e;
  --line: #d9e0ea;
  --line-strong: #bdc8d8;
  --cobalt: #2459e0;
  --cobalt-strong: #1745bd;
  --cobalt-soft: #eaf0ff;
  --teal: #067268;
  --teal-soft: #e2f5f1;
  --amber: #985300;
  --amber-soft: #fff0d6;
  --coral: #b8323e;
  --coral-soft: #ffe8e9;
  --violet: #6b50d8;
  --violet-soft: #eeeafd;
  --slate-soft: #edf1f5;
  --focus: #397fd5;
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-float: 0 18px 50px rgba(7, 16, 29, 0.16);
  --shadow-menu: 0 14px 36px rgba(7, 16, 29, 0.22);
  --header-height: 72px;
  --motion-fast: 140ms;
  --motion-base: 170ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 80px);
  scroll-padding-bottom: 104px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--workspace);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-is-open {
  overflow: hidden;
}

::selection {
  background: #bfd2ff;
  color: var(--navy-950);
}

* {
  scrollbar-color: #a8b6c9 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #a8b6c9;
  background-clip: padding-box;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
select {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.68;
}

img,
svg {
  display: block;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

svg:not(.icon-sprite) {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3,
strong,
b {
  font-weight: 680;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

a,
button,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: rgba(36, 89, 224, 0.16);
  touch-action: manipulation;
}

code,
time,
.numeric-value,
.metric-ribbon strong,
.deal-pulse strong,
.signal-field strong,
.pipeline-rail strong,
.kanban-heading > span {
  font-variant-numeric: tabular-nums;
}

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

.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: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy-950);
  box-shadow: var(--shadow-menu);
  transform: translateY(-150%);
  transition: transform var(--motion-fast) ease;
}

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

.app-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--navy-950);
  color: #dce6f5;
}

.app-header__inner {
  display: flex;
  align-items: center;
  width: min(100%, 1600px);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 28px;
  gap: 22px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  min-height: 48px;
}

.brand-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  background: linear-gradient(145deg, #2f69f0, #1741af);
  color: #fff;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.08em;
}

.brand-mark.large {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  font-size: 16px;
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1.2;
}

.brand-copy strong {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: #8495ae;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  color: #96a7c0;
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.nav-link svg {
  display: none;
  width: 17px;
  height: 17px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.is-current {
  background: rgba(66, 119, 240, 0.17);
  color: #fff;
}

.nav-link.is-current::after {
  position: absolute;
  right: 10px;
  bottom: -16px;
  left: 10px;
  height: 2px;
  background: #4b83ff;
  content: "";
}

.user-area {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 9px;
}

.user-area form {
  margin: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 3px 6px 3px 3px;
  border-radius: 8px;
  color: #c8d4e5;
  font-size: 12px;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.user-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--navy-800);
  color: #a9c4ff;
  font-weight: 720;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #899ab2;
  gap: 5px;
  font-size: 12px;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.logout-button svg {
  width: 16px;
  height: 16px;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #fff;
}

.nav-toggle svg {
  width: 21px;
  height: 21px;
}

.nav-toggle__close {
  display: none;
}

.mobile-nav-account {
  display: none;
}

.nav-is-open .nav-toggle__open {
  display: none;
}

.nav-is-open .nav-toggle__close {
  display: block;
}

.environment-banner,
.warning-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 24px;
  gap: 8px;
  font-size: 12px;
}

.environment-banner {
  border-bottom: 1px solid #9bdacb;
  background: #ddf4ee;
  color: #075f55;
}

.warning-banner {
  border-bottom: 1px solid #f1c46f;
  background: #fff0d3;
  color: #754000;
}

.environment-banner svg,
.warning-banner svg {
  width: 16px;
  height: 16px;
}

.page-shell {
  width: min(100%, 1540px);
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 36px clamp(22px, 3vw, 48px) 72px;
}

.page-shell.login-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.messages {
  display: grid;
  margin-bottom: 20px;
  gap: 8px;
}

.message {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cobalt-soft);
  color: var(--cobalt-strong);
}

.message.success {
  border-color: #a7dacf;
  background: var(--teal-soft);
  color: #08675e;
}

.message.error {
  border-color: #efb6ba;
  background: var(--coral-soft);
  color: #a82f39;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 24px;
}

.page-heading h1 {
  max-width: 860px;
  margin-bottom: 7px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
}

.page-heading p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  gap: 7px;
  font-size: 13px;
  font-weight: 660;
  line-height: 1;
  white-space: nowrap;
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, color var(--motion-fast) ease, transform 80ms ease;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button:hover {
  border-color: #8ea0b8;
  background: var(--surface-soft);
  color: var(--ink);
}

.button:active {
  transform: scale(0.97);
}

.button.primary {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
}

.button.primary:hover {
  border-color: var(--cobalt-strong);
  background: var(--cobalt-strong);
  color: #fff;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
}

.button.full {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--cobalt);
  gap: 5px;
  font-size: 12px;
  font-weight: 660;
}

.text-link svg,
.external-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--motion-fast) ease;
}

.text-link:hover svg,
.external-link:hover svg {
  transform: translateX(2px);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2 {
  margin-bottom: 0;
  font-size: 21px;
  line-height: 1.2;
}

.panel-heading p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.icon-box {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #cbd8ee;
  border-radius: 9px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
}

.icon-box svg {
  width: 18px;
  height: 18px;
}

.icon-box--risk {
  border-color: #f2bec2;
  background: var(--coral-soft);
  color: var(--coral);
}

.icon-box--pending {
  border-color: #ecd09e;
  background: var(--amber-soft);
  color: var(--amber);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  gap: 5px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.badge svg {
  width: 12px;
  height: 12px;
}

.badge i,
.signal-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-active,
.task-done {
  border-color: #a7dacf;
  background: var(--teal-soft);
  color: #08675e;
}

.status-paused,
.task-open {
  border-color: #e9c88f;
  background: var(--amber-soft);
  color: #885000;
}

.status-rejected {
  border-color: #efb6ba;
  background: var(--coral-soft);
  color: #a82f39;
}

.status-archived,
.task-cancelled {
  border-color: #cdd5df;
  background: var(--slate-soft);
  color: #586578;
}

.task-in_progress {
  border-color: #bdccf3;
  background: var(--cobalt-soft);
  color: var(--cobalt-strong);
}

.stage {
  border-color: #c8d4ee;
  background: #f0f4fd;
  color: #36527f;
}

.stage-lead,
.stage-screening {
  --stage-color: var(--teal);
}

.stage-initiation,
.stage-due_diligence {
  --stage-color: var(--cobalt);
}

.stage-investment_committee {
  --stage-color: var(--violet);
}

.stage-closing {
  --stage-color: var(--amber);
}

.badge.stage {
  color: var(--stage-color, var(--cobalt));
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 42px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  color: var(--muted);
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.empty-state p {
  margin-bottom: 10px;
  font-size: 13px;
}

.empty-state.compact {
  min-height: 100px;
  padding: 24px 14px;
}

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

/* Dashboard */
.page-heading--dashboard {
  margin-bottom: 22px;
}

.metric-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.metric-ribbon > a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 92px;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
  align-content: center;
  transition: background-color var(--motion-fast) ease;
}

.metric-ribbon > a:last-child {
  border-right: 0;
}

.metric-ribbon > a:hover {
  background: var(--surface-soft);
}

.metric-ribbon span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric-ribbon strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  margin-left: 14px;
  color: var(--navy-900);
  font-size: 32px;
  line-height: 1;
}

.metric-ribbon small {
  color: var(--muted);
  font-size: 10px;
}

.metric-ribbon > .metric-ribbon__alert {
  background: #fff8f7;
}

.metric-ribbon__alert strong {
  color: var(--coral);
}

.dashboard-lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  margin-bottom: 18px;
  gap: 18px;
}

.signal-panel,
.insight-panel,
.activity-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.deal-pulse-panel {
  min-width: 0;
  padding: 24px;
}

.panel-intro {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.deal-pulse {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.deal-pulse__step {
  position: relative;
  min-width: 0;
}

.deal-pulse__step::after {
  position: absolute;
  z-index: 0;
  top: 17px;
  right: -1px;
  left: 33px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.deal-pulse__step:last-child::after {
  display: none;
}

.deal-pulse__step a {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  padding-right: 13px;
  gap: 5px;
}

.deal-pulse__index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--stage-color) 45%, white);
  border-radius: 50%;
  background: var(--surface);
  color: var(--stage-color);
  font-size: 10px;
  font-weight: 760;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.deal-pulse__step a:hover .deal-pulse__index {
  background: var(--stage-color);
  color: #fff;
  transform: translateY(-2px);
}

.deal-pulse__label {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.deal-pulse__step strong {
  font-size: 28px;
  line-height: 1;
}

.deal-pulse__step small {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.deal-pulse__bar {
  width: calc(100% - 8px);
  height: 4px;
  border-radius: 3px;
  background: #e8edf4;
  overflow: hidden;
}

.deal-pulse__bar i {
  display: block;
  width: max(7%, var(--stage-share));
  height: 100%;
  border-radius: inherit;
  background: var(--stage-color);
}

.pulse-legend {
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  gap: 18px;
  font-size: 10px;
}

.pulse-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.signal-dot--teal {
  color: var(--teal);
}

.signal-dot--blue {
  color: var(--cobalt);
}

.signal-dot--amber {
  color: var(--amber);
}

.radar-panel {
  position: relative;
  min-height: 315px;
  padding: 24px 24px 12px;
  scroll-margin-top: 90px;
  border: 1px solid #1c3356;
  border-radius: var(--radius-md);
  background: var(--navy-950);
  color: #b9c8dc;
  overflow: hidden;
}

.radar-panel::before {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(55, 105, 227, 0.13);
  content: "";
  filter: blur(1px);
}

.panel-heading--inverse h2 {
  color: #fff;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(124, 242, 213, 0.22);
  border-radius: 999px;
  background: rgba(16, 133, 112, 0.12);
  color: #82dfcb;
  gap: 6px;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ed0ae;
  box-shadow: 0 0 0 4px rgba(62, 208, 174, 0.12);
}

.live-indicator--light {
  border-color: #a8d9ce;
  background: var(--teal-soft);
  color: #08675e;
}

.signal-field {
  position: relative;
  height: 250px;
  margin: 4px -4px 0;
}

.signal-field__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(108, 144, 198, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one {
  width: 124px;
  height: 124px;
}

.ring-two {
  width: 220px;
  height: 220px;
}

.signal-field__cross {
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(108, 144, 198, 0.14);
  transform: translate(-50%, -50%);
}

.cross-x {
  width: 90%;
  height: 1px;
}

.cross-y {
  width: 1px;
  height: 90%;
}

.signal-field__core {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 86px;
  height: 86px;
  place-content: center;
  border: 1px solid rgba(86, 132, 236, 0.42);
  border-radius: 50%;
  background: #102443;
  text-align: center;
  transform: translate(-50%, -50%);
}

.signal-field__core strong {
  color: #fff;
  font-size: 25px;
  line-height: 1;
}

.signal-field__core span {
  color: #7f96b8;
  font-size: 9px;
}

.radar-signal {
  position: absolute;
  z-index: 3;
  top: var(--y);
  left: var(--x);
  display: grid;
  grid-template-columns: 10px auto;
  color: #d9e4f5;
  column-gap: 5px;
  transform: translate(-50%, -50%);
}

.radar-signal i {
  grid-row: 1 / 3;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--navy-950);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.05);
}

.radar-signal b {
  font-size: 13px;
}

.radar-signal small {
  color: #7186a6;
  font-size: 8px;
  white-space: nowrap;
}

.radar-signal--risk {
  color: #ff7a82;
}

.radar-signal--pending {
  color: #ffc369;
}

.radar-signal--priority {
  color: #8baaff;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 18px;
}

.section-heading > span {
  color: var(--muted);
  font-size: 11px;
}

.project-regions {
  --map-ground: #0b1426;
  --map-line: #4a6b86;
  --map-glow: #79e7e9;
  --map-copy: #c1d2e5;
  margin-bottom: 18px;
  padding: 24px;
  scroll-margin-top: 88px;
}

.project-regions__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  align-items: stretch;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #243852;
  border-radius: var(--radius-md);
  background: var(--map-ground);
  color: var(--map-copy);
}

.project-regions__figure {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 24px 18px 14px;
}

svg.project-regions__map {
  display: block;
  width: 100%;
  max-width: 670px;
  height: auto;
  margin: 0 auto;
  stroke: none;
}

.region-shape,
.region-lift {
  fill: transparent;
  stroke: var(--map-line);
  stroke-width: 1;
  stroke-linejoin: round;
}

.region-shape:not(.has-projects),
.region-lift,
.region-guide,
.region-leader {
  pointer-events: none;
}

.region-shape.has-projects {
  cursor: pointer;
  stroke: #6097a7;
  outline: none;
}

.region-shape.has-projects:hover,
.region-shape.has-projects:focus-visible,
.region-shape[aria-current="true"] {
  stroke: var(--map-glow);
  stroke-width: 1.5;
}

.region-shape:focus-visible .region-count,
.region-shape[aria-current="true"] .region-count {
  fill: #1b4658;
  stroke: var(--map-glow);
}

.region-shape[aria-current="true"] .region-count-label {
  fill: #fff;
}

.region-count {
  fill: #132c42;
  stroke: #436e83;
  stroke-width: .65;
}

.region-count-label {
  fill: #d5fbff;
  stroke: none;
  font-size: 12px;
  font-weight: 690;
  font-variant-numeric: tabular-nums;
}

.region-marker-compact {
  display: none;
}

.region-inset {
  fill: none;
  stroke: #39566e;
  stroke-width: 2;
}

.region-inset-label {
  fill: #9fb6cb;
  font-size: 11px;
}

.region-leader {
  stroke: #77a9b7;
  stroke-width: 1;
}

.region-lift {
  stroke: var(--map-glow);
  stroke-width: 1.5;
  filter: drop-shadow(0 5px 3px #07101d) drop-shadow(0 1px 4px #79e7e95e);
  opacity: 0;
  transform: translateY(0);
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}

.has-selection .region-lift {
  opacity: .95;
  transform: translateY(-3px);
}

.region-guide {
  fill: none;
  stroke: var(--map-glow);
  stroke-width: 1;
  stroke-dasharray: 3 5;
  opacity: .55;
}

.project-regions__figure figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  gap: 8px 14px;
  color: #a3b9cf;
  font-size: 11px;
}

.project-regions__figure figcaption i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--map-glow);
}

.project-regions__figure figcaption a {
  text-underline-offset: 3px;
  text-decoration: underline;
}

.region-projects {
  min-width: 0;
  padding: 20px;
  border-left: 1px solid #243852;
  background: #101e32;
  scroll-margin-top: 92px;
}

.region-projects__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.region-projects__head h3 {
  margin: 0;
  color: #f3f8ff;
  font-size: 17px;
}

.has-selection .region-projects__head h3 {
  color: var(--map-glow);
}

.region-projects__picker {
  display: flex;
  align-items: center;
  gap: 6px;
}

.region-projects__picker select,
.region-projects__picker button {
  width: auto;
  min-height: 44px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #456079;
  border-radius: var(--radius-xs);
  background: #14253b;
  color: #eaf4ff;
  color-scheme: dark;
  font: inherit;
  font-size: 12px;
}

.region-projects__picker button[hidden] {
  display: none;
}

.region-projects__sort {
  margin: 6px 0 14px;
  color: #a3b9cf;
  font-size: 12px;
}

.region-projects__body {
  max-height: 385px;
  min-height: 82px;
  overflow-y: auto;
  scrollbar-color: #4a6b86 transparent;
}

.region-projects__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  margin: 0;
  padding: 2px;
  gap: 8px;
  list-style: none;
}

.region-projects__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  min-height: 65px;
  height: 100%;
  padding: 9px 10px;
  align-content: start;
  align-items: center;
  gap: 5px 4px;
  border: 1px solid #364f6a;
  border-radius: var(--radius-sm);
  background: #13243a;
  color: #ecf4ff;
}

.region-projects__card:hover,
.region-projects__card:focus-visible {
  border-color: var(--map-glow);
  background: #18334a;
}

.region-projects__name {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
}

.region-projects__card svg {
  width: 14px;
  height: 14px;
  color: var(--map-glow);
}

.region-projects__meta {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
  color: #b4c8dc;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.region-projects__message {
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid #364f6a;
  font-size: 13px;
}

.region-projects__pages {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  color: var(--map-glow);
  font-size: 12px;
}

.region-projects__pages a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
  .region-lift,
  .has-selection .region-lift {
    transition: none;
    transform: none;
  }
}

.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 18px;
}

.insight-panel,
.activity-panel {
  min-width: 0;
  padding: 24px;
}

.status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.status-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 10px;
  transition: background-color var(--motion-fast) ease;
}

.status-chip:last-child {
  border-right: 0;
}

.status-chip:hover {
  background: var(--surface-tint);
}

.status-chip strong {
  color: var(--ink);
  font-size: 18px;
}

.distribution-tabs details {
  border-top: 1px solid var(--line);
}

.distribution-tabs summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  list-style-position: inside;
}

.distribution-tabs summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.chart-list {
  display: grid;
  padding: 4px 0 14px;
  gap: 8px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(84px, 0.9fr) minmax(80px, 1.5fr) 28px;
  align-items: center;
  gap: 9px;
  font-size: 10px;
}

.chart-label {
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-track {
  height: 5px;
  border-radius: 3px;
  background: #e6ebf2;
  overflow: hidden;
}

.chart-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.chart-bar--tag {
  background: var(--cobalt);
}

.chart-bar--source {
  background: var(--violet);
}

.chart-row > strong {
  text-align: right;
}

.activity-feed {
  display: grid;
  margin-top: 10px;
}

.activity-feed > a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 70px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  transition: background-color var(--motion-fast) ease;
}

.activity-feed > a:hover {
  background: var(--surface-soft);
}

.activity-feed__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #cbd8ee;
  border-radius: 8px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
  transition: transform var(--motion-fast) ease;
}

.activity-feed > a:hover .activity-feed__icon {
  transform: translateX(2px);
}

.activity-feed__icon svg {
  width: 15px;
  height: 15px;
}

.activity-feed > a > span:nth-child(2) {
  min-width: 0;
}

.activity-feed strong,
.activity-feed small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-feed strong {
  font-size: 12px;
}

.activity-feed small,
.activity-feed time {
  color: var(--muted);
  font-size: 9px;
}

.activity-feed p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

/* Commands and data tables */
.command-bar,
.data-surface,
.form-surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.command-bar {
  margin-bottom: 18px;
  padding: 16px;
}

.command-bar--compact {
  padding-bottom: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(135px, 0.55fr)) auto;
  gap: 9px;
}

.filter-bar label {
  min-width: 0;
}

.search-field {
  position: relative;
  display: block;
}

.search-field > svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: #8290a4;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-field .form-control {
  padding-left: 40px;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #c6d0de;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  caret-color: var(--cobalt);
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

select[multiple] {
  min-height: 112px;
}

.form-control:hover,
input:hover,
select:hover,
textarea:hover {
  border-color: #9cacc0;
}

.form-control:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(36, 89, 224, 0.13);
}

.search-field:focus-within > svg {
  color: var(--cobalt);
}

[data-guard-unsaved][data-submitting="true"] button[aria-disabled="true"]::before {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: submit-spin 700ms linear infinite;
  content: "";
  opacity: 0.8;
}

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

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.command-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 29px;
  padding: 10px 2px 0;
  color: var(--muted);
  gap: 16px;
  font-size: 10px;
}

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

.active-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 6px;
}

.active-filters__label {
  color: var(--muted);
}

.filter-token {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #c7d5f3;
  border-radius: 999px;
  background: var(--cobalt-soft);
  color: var(--cobalt-strong);
  white-space: nowrap;
}

.active-filters a {
  color: var(--cobalt);
  font-weight: 650;
}

.data-surface {
  min-width: 0;
  overflow: hidden;
}

.data-surface__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.data-surface__heading h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.export-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 8px;
}

.export-actions .button {
  min-height: 36px;
  padding: 0 11px;
}

.selection-status {
  min-width: 78px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}

.selection-toggle {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cobalt);
}

.selection-toggle:hover,
.selection-toggle:focus-visible {
  background: var(--cobalt-soft);
}

.selection-toggle__circle {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1.5px solid #9ba9bb;
  border-radius: 50%;
  background: #fff;
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.selection-toggle__circle.is-selected {
  border-color: var(--cobalt);
  background: var(--cobalt);
  box-shadow: inset 0 0 0 3px #fff;
}

.export-select-all[aria-pressed="true"] {
  border-color: #b7c7f4;
  background: var(--cobalt-soft);
  color: var(--cobalt-strong);
}

.export-select-all .selection-toggle__circle {
  margin-right: 2px;
}

.deal-table tr.is-selected {
  background: #f0f5ff;
}

.deal-table .selection-cell {
  width: 64px;
  padding-right: 18px;
  padding-left: 8px;
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  gap: 8px;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination__link,
.pagination__ellipsis {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-decoration: none;
}

.pagination__link:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.pagination__link.is-current {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
}

.pagination__ellipsis {
  min-width: 20px;
  padding: 0;
}

.scroll-cue {
  display: none;
  align-items: center;
  color: var(--muted);
  gap: 5px;
  font-size: 9px;
}

.scroll-cue svg {
  width: 14px;
  height: 14px;
}

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

.table-scroll[data-scrollable="true"]::after,
.chain-track[data-scrollable="true"]::after {
  position: sticky;
  z-index: 5;
  right: 0;
  display: block;
  width: 24px;
  height: 1px;
  margin-left: auto;
  content: "";
  box-shadow: -12px 0 18px 12px rgba(20, 32, 51, 0.08);
  pointer-events: none;
}

.table-scroll[data-at-end="true"]::after,
.chain-track[data-at-end="true"]::after {
  opacity: 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.deal-table,
.company-table {
  min-width: 1100px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #e5e9ef;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f5f7fa;
  color: #627087;
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--ink-soft);
  font-size: 12px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background-color var(--motion-fast) ease;
}

tbody tr:hover {
  background: #f8faff;
}

td small {
  display: block;
  max-width: 250px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 280px;
  color: var(--ink);
  gap: 8px;
  font-size: 13px;
  font-weight: 680;
}

.record-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-title svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: #9ba8b9;
  transition: color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.record-title:hover {
  color: var(--cobalt);
}

.record-title:hover svg {
  color: var(--cobalt);
  transform: translateX(2px);
}

.record-title-static,
.cell-primary {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.plan-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-table .date-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.action-type,
.industry-label {
  color: var(--ink-soft);
  font-weight: 620;
}

@media (min-width: 761px) {
  .deal-table .action-type,
  .deal-table td[data-label="负责人"] {
    white-space: nowrap;
  }

  .deal-table td[data-label="标签"] {
    min-width: 120px;
  }

  .deal-table td[data-label="行业"] {
    min-width: 140px;
  }
}

.company-filter {
  grid-template-columns: minmax(280px, 720px) auto auto;
  justify-content: start;
}

.external-link {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  overflow: hidden;
  color: var(--cobalt);
  gap: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-code {
  color: #59677a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.icon-button:hover {
  border-color: #aab8ca;
  background: var(--cobalt-soft);
  color: var(--cobalt);
}

/* Pipeline */
.pipeline-rail {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  margin-bottom: 14px;
  border: 1px solid #1c3356;
  border-radius: var(--radius-md);
  background: var(--navy-950);
  color: #c8d5e7;
  overflow: hidden;
}

.pipeline-rail__copy {
  display: grid;
  align-content: center;
  min-height: 98px;
  padding: 16px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.pipeline-rail__copy span,
.pipeline-rail__copy small {
  color: #7185a3;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.pipeline-rail__copy strong {
  color: #fff;
  font-size: 28px;
  line-height: 1.15;
}

.pipeline-rail ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  margin: 0;
  padding: 0 14px;
  list-style: none;
  overflow-x: auto;
}

.pipeline-rail li {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 110px;
  padding: 0 10px;
  gap: 8px;
}

.pipeline-rail li::after {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 8px;
  height: 1px;
  background: #51647f;
  content: "";
}

.pipeline-rail li:last-child::after {
  display: none;
}

.pipeline-rail li > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--stage-color) 60%, #7f91ab);
  border-radius: 50%;
  color: color-mix(in srgb, var(--stage-color) 80%, white);
  font-size: 8px;
  font-weight: 760;
}

.pipeline-rail li div {
  display: grid;
}

.pipeline-rail li strong {
  color: #dce6f4;
  font-size: 11px;
}

.pipeline-rail li small {
  color: #778ba8;
  font-size: 8px;
}

.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  color: var(--muted);
  font-size: 10px;
}

.kanban-toolbar > div,
.kanban-toolbar > a {
  display: flex;
  align-items: center;
  gap: 9px;
}

.kanban-toolbar > a {
  color: var(--cobalt);
  font-weight: 650;
}

.kanban-toolbar svg {
  width: 14px;
  height: 14px;
}

.kanban-shell {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

.kanban-board {
  display: grid;
  grid-auto-columns: minmax(286px, 1fr);
  grid-auto-flow: column;
  max-width: 100%;
  padding-bottom: 14px;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
}

.kanban-column {
  min-height: min(660px, calc(100vh - 290px));
  border: 1px solid color-mix(in srgb, var(--stage-color) 34%, var(--line));
  border-radius: 10px;
  background: #e8edf4;
  scroll-snap-align: start;
}

.kanban-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 13px;
  border-bottom: 1px solid #d3dbe6;
}

.kanban-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-heading__index {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--stage-color);
  color: #fff;
  font-size: 8px;
  font-weight: 760;
}

.kanban-heading h2 {
  margin: 0;
  font-size: 13px;
}

.kanban-heading > span {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #c5cedb;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  font-size: 10px;
}

.kanban-cards {
  display: grid;
  align-content: start;
  padding: 10px;
  gap: 9px;
}

.deal-card {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--stage-color) 25%, #d4dce7);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.deal-card:hover {
  border-color: #aebacf;
  transform: translateY(-2px);
}

.deal-card__signal {
  display: flex;
  align-items: center;
  margin-bottom: 7px;
  color: var(--stage-color);
  gap: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.deal-card__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--ink);
  gap: 8px;
  font-size: 13px;
  font-weight: 690;
  line-height: 1.4;
}

.deal-card__title:hover {
  color: var(--cobalt);
}

.deal-card__title svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: #9aa7b8;
}

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

.deal-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 10px;
  padding: 8px 0;
  border-top: 1px solid #e5e9ef;
  border-bottom: 1px solid #e5e9ef;
  gap: 8px;
}

.deal-card__facts div {
  min-width: 0;
}

.deal-card__facts dt {
  color: var(--muted);
  font-size: 8px;
}

.deal-card__facts dd {
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 630;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card__notice {
  display: flex;
  align-items: center;
  min-height: 27px;
  margin-bottom: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: #825000;
  gap: 5px;
  font-size: 9px;
}

.deal-card__notice svg {
  width: 12px;
  height: 12px;
}

.deal-card__next {
  min-height: 31px;
  margin-bottom: 9px !important;
  color: var(--ink-soft) !important;
  line-height: 1.45;
}

.stage-move {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.stage-move select {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 10px;
}

.stage-move button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #b9c4d4;
  border-radius: 6px;
  background: #f7f9fc;
  color: var(--ink-soft);
  gap: 4px;
  font-size: 9px;
  font-weight: 650;
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.stage-move button:hover {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
}

.stage-move button svg {
  width: 12px;
  height: 12px;
}

.empty-column {
  display: grid;
  min-height: 150px;
  place-content: center;
  justify-items: center;
  border: 1px dashed #b9c4d3;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-column > span {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  place-items: center;
  border: 1px solid #b9c4d3;
  border-radius: 50%;
  font-size: 9px;
}

.empty-column p {
  margin-bottom: 1px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.empty-column small {
  font-size: 8px;
}

/* Deal detail */
.deal-identity {
  margin: -36px clamp(-48px, -3vw, -22px) 18px;
  padding: 28px clamp(22px, 3vw, 48px) 0;
  border-bottom: 1px solid #cbd4e0;
  background: var(--surface);
}

.deal-identity__topline,
.deal-identity__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.deal-identity__topline {
  margin-bottom: 18px;
}

.deal-identity__topline nav {
  display: flex;
  align-items: center;
  color: var(--muted);
  gap: 5px;
  font-size: 10px;
}

.deal-identity__topline nav a {
  color: var(--cobalt);
  font-weight: 650;
}

.deal-identity__topline nav svg {
  width: 12px;
  height: 12px;
}

.record-updated {
  display: flex;
  align-items: center;
  color: var(--muted);
  gap: 6px;
  font-size: 9px;
}

.record-updated i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.deal-identity__main {
  align-items: flex-end;
}

.deal-identity__main h1 {
  max-width: 900px;
  margin-bottom: 10px;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.1;
}

.identity-meta {
  margin: -3px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.heading-badges,
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.detail-pulse-wrap {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  margin-top: 28px;
  padding: 14px 0 17px;
  border-top: 1px solid #e4e8ef;
  gap: 12px;
}

.detail-pulse__label {
  display: grid;
}

.detail-pulse__label span {
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.13em;
}

.detail-pulse__label small {
  color: var(--muted);
  font-size: 9px;
}

.detail-pulse {
  display: grid;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.detail-pulse li {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 82px;
  gap: 6px;
}

.detail-pulse li::after {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 0;
  left: 25px;
  height: 2px;
  background: #d6dde7;
  content: "";
}

.detail-pulse li.is-done::after {
  background: var(--teal);
}

.detail-pulse li:last-child::after {
  display: none;
}

.detail-pulse__node {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #c9d2df;
  border-radius: 50%;
  background: var(--surface);
  color: #7d899a;
  font-size: 8px;
  font-weight: 760;
}

.detail-pulse__node svg {
  width: 12px;
  height: 12px;
}

.detail-pulse li.is-done .detail-pulse__node {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.detail-pulse li.is-current .detail-pulse__node {
  border: 5px solid #cddafd;
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 0 0 1px var(--cobalt);
}

.detail-pulse li strong {
  position: relative;
  z-index: 1;
  padding-right: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.detail-pulse li.is-done strong,
.detail-pulse li.is-current strong {
  color: var(--ink-soft);
}

.section-nav {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  overflow-x: auto;
}

.section-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 43px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.section-nav a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.section-nav a.is-current {
  color: var(--cobalt);
}

.section-nav a.is-current::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  background: var(--cobalt);
  content: "";
}

.detail-section-nav {
  position: sticky;
  z-index: 20;
  top: calc(var(--header-height) + 10px);
  width: max-content;
  max-width: 100%;
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(21, 34, 53, 0.07);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 18px;
}

.detail-main {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.detail-section {
  scroll-margin-top: calc(var(--header-height) + 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.section-heading {
  min-height: 76px;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.section-heading > div,
.section-heading > div > div {
  display: flex;
  align-items: center;
}

.section-heading > div {
  gap: 12px;
}

.section-heading > div > div {
  display: block;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 19px;
}

.fact-surface {
  padding: 20px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.fact-grid > div {
  min-width: 0;
  min-height: 75px;
  padding: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.fact-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 640;
}

.next-action-callout {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #b9ccef;
  border-radius: 8px;
  background: var(--surface-tint);
  gap: 12px;
}

.next-action-callout > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 10px;
}

.next-action-callout span {
  color: var(--muted);
  font-size: 9px;
}

.next-action-callout strong {
  color: var(--cobalt-strong);
  font-size: 13px;
}

.next-action-callout p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.state-note {
  display: flex;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #e8c384;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #744600;
  gap: 10px;
}

.state-note > svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.state-note p {
  margin: 1px 0 2px;
  font-size: 11px;
}

.state-note span {
  font-size: 9px;
}

.narrative-surface {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px;
  gap: 1px;
  background: var(--line);
}

.narrative-surface article {
  min-height: 160px;
  padding: 18px;
  background: var(--surface);
}

.narrative-surface article.narrative-lead {
  grid-column: 1 / -1;
  min-height: 180px;
  border: 1px solid #c7d6f3;
  background: var(--surface-tint);
}

.narrative-surface article > span {
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.1em;
}

.narrative-surface h3 {
  margin: 5px 0 10px;
  font-size: 13px;
}

.narrative-surface p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
}

.detail-data-surface {
  border: 0;
  border-radius: 0;
}

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

.inline-form {
  margin: 16px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.inline-form summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  color: var(--cobalt);
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.inline-form summary svg {
  width: 14px;
  height: 14px;
}

.inline-form[open] summary {
  border-bottom: 1px solid var(--line);
}

.inline-form form {
  padding: 16px;
}

.inline-form form > p {
  margin-bottom: 12px;
}

.timeline {
  display: grid;
  padding: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #c8d5ee;
  border-radius: 50%;
  background: var(--cobalt-soft);
  color: var(--cobalt);
}

.timeline-dot::after {
  position: absolute;
  z-index: -1;
  top: 27px;
  left: 13px;
  width: 1px;
  height: calc(100% + 22px);
  background: var(--line);
  content: "";
}

.timeline-item:last-child .timeline-dot::after {
  display: none;
}

.timeline-dot svg {
  width: 13px;
  height: 13px;
}

.timeline-item > div:last-child {
  min-width: 0;
  padding: 2px 0 24px 8px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline-meta strong {
  font-size: 12px;
}

.timeline-meta time,
.timeline-item small {
  color: var(--muted);
  font-size: 9px;
}

.timeline-item p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.file-list,
.review-list {
  display: grid;
  padding: 20px;
  gap: 8px;
}

.file-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 10px;
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.file-row:hover {
  border-color: #aebbd0;
  background: var(--surface-soft);
}

.file-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
}

.file-icon svg,
.file-row__arrow {
  width: 16px;
  height: 16px;
}

.file-row span:nth-child(2) {
  min-width: 0;
}

.file-row strong,
.file-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row strong {
  font-size: 11px;
}

.file-row small {
  color: var(--muted);
  font-size: 9px;
}

.file-row code {
  color: var(--muted);
  font-size: 9px;
}

.file-row__arrow {
  color: #99a6b7;
}

.review-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-list article {
  padding: 16px;
  border: 1px solid #d5cdef;
  border-radius: 8px;
}

.review-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-list time,
.review-list small {
  color: var(--muted);
  font-size: 9px;
}

.review-list h3 {
  margin: 12px 0 6px;
  font-size: 13px;
}

.review-list p {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 11px;
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px;
  gap: 18px;
}

.audit-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.audit-grid h3 {
  display: flex;
  align-items: center;
  min-height: 46px;
  margin: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  gap: 7px;
  font-size: 12px;
}

.audit-grid h3 svg {
  width: 15px;
  height: 15px;
  color: var(--cobalt);
}

.audit-row {
  display: grid;
  min-height: 55px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  gap: 2px;
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-row span {
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  gap: 5px;
  font-size: 10px;
}

.audit-row span svg {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.audit-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-aside {
  display: grid;
  gap: 14px;
}

.action-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.action-panel.sticky-panel {
  position: sticky;
  top: calc(var(--header-height) + 66px);
  box-shadow: 0 14px 34px rgba(21, 34, 53, 0.09);
}

.action-panel__heading {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

.action-panel__heading h2 {
  margin: 0;
  font-size: 17px;
}

.stack-form {
  display: grid;
  gap: 13px;
}

.stack-form label,
.form-grid label,
.form-field {
  display: grid;
  min-width: 0;
  color: var(--ink-soft);
  gap: 6px;
  font-size: 11px;
  font-weight: 620;
}

.stack-form label > span,
.form-grid label > span,
.form-field > span,
.form-field label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.compact-form {
  gap: 10px;
}

.compact-form .form-control,
.compact-form input,
.compact-form select,
.compact-form textarea {
  min-height: 38px;
  font-size: 11px;
}

.compact-form textarea {
  min-height: 76px;
}

.action-divider {
  position: relative;
  display: flex;
  align-items: center;
  margin: 17px 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.12em;
}

.action-divider::before,
.action-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.action-divider span {
  padding: 0 8px;
}

.grant-list {
  display: grid;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  gap: 6px;
}

.grant-list small {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.grant-list small span {
  color: var(--ink-soft);
}

/* Editors and forms */
.editor-heading {
  align-items: center;
}

.deal-editor {
  margin-bottom: 72px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.editor-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  display: grid;
  gap: 12px;
}

.section-nav--vertical {
  display: grid;
  padding: 8px;
  overflow: visible;
}

.section-nav--vertical > span {
  padding: 8px 10px 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-nav--vertical a {
  min-height: 42px;
  padding: 0 10px;
  border-radius: 6px;
  gap: 9px;
}

.section-nav--vertical a i {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.section-nav--vertical a.is-current {
  background: var(--cobalt-soft);
}

.section-nav--vertical a.is-current::after {
  top: 9px;
  right: auto;
  bottom: 9px;
  left: -8px;
  width: 2px;
  height: auto;
}

.editor-note {
  display: flex;
  padding: 12px;
  border: 1px solid #cdd8e8;
  border-radius: 8px;
  background: #f3f6fb;
  color: var(--muted);
  gap: 8px;
}

.editor-note svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--cobalt);
}

.editor-note p {
  margin: 0;
  font-size: 9px;
}

.editor-note strong {
  display: block;
  color: var(--ink-soft);
}

.editor-main {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.form-section {
  scroll-margin-top: calc(var(--header-height) + 22px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.form-section__heading,
.form-surface__heading {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

.form-section__heading > span {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid #c8d5ee;
  border-radius: 50%;
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 760;
}

.form-section__heading h2,
.form-surface__heading h2 {
  margin-bottom: 3px;
  font-size: 19px;
}

.form-section__heading p:last-child,
.form-surface__heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.form-grid,
.section-field-grid,
.company-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-row-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.span-2 {
  grid-column: 1 / -1;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
  gap: 8px;
}

.field-inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 650;
}

.form-field > small,
.form-grid label > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 450;
}

.form-field.field-emphasis textarea {
  border-color: #aebfe4;
  background: #fbfcff;
}

.form-section-card {
  min-width: 0;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.form-section-card:last-child {
  margin-bottom: 0;
}

.form-section-card legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
}

.inline-company-panel {
  padding: 18px;
  border: 1px solid #aebfe4;
  border-radius: 8px;
  background: #f5f8ff;
}

.inline-company-panel .panel-heading {
  margin-bottom: 16px;
}

[hidden] {
  display: none !important;
}

.checkbox-field {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px !important;
}

.checkbox-field > span {
  grid-column: 2;
}

.checkbox-field input[type="checkbox"] {
  grid-row: 1;
  grid-column: 1;
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--cobalt);
}

.checkbox-field small,
.checkbox-field .errorlist {
  grid-column: 2;
}

.save-bar {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 66px;
  padding: 10px max(24px, calc((100vw - 1540px) / 2 + 48px));
  border-top: 1px solid #c7d1df;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 30px rgba(21, 34, 53, 0.08);
  backdrop-filter: blur(12px);
  gap: 24px;
}

.save-bar__status {
  display: flex;
  align-items: center;
  margin-right: auto;
  color: var(--muted);
  gap: 7px;
  font-size: 10px;
}

.save-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa7b7;
}

[data-dirty="true"] .save-status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

[data-submitting="true"] .save-status-dot {
  background: var(--cobalt);
  box-shadow: 0 0 0 4px var(--cobalt-soft);
}

.save-bar > div:last-child {
  display: flex;
  gap: 8px;
}

.form-surface {
  width: min(100%, 920px);
  padding: 24px;
}

.company-editor {
  margin: 0 auto 50px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
  gap: 8px;
}

.form-actions--sticky {
  justify-content: space-between;
  margin: 24px -24px -24px;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.form-actions--sticky > div {
  display: flex;
  gap: 8px;
}

.form-status {
  color: var(--muted);
  font-size: 10px;
}

.duplicate-warning,
.form-errors {
  display: flex;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #e7bd79;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #744600;
  gap: 9px;
  font-size: 11px;
}

.duplicate-warning svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.duplicate-warning p {
  margin: 2px 0 0;
}

.form-errors {
  border-color: #edb2b7;
  background: var(--coral-soft);
  color: #9e2833;
}

.errorlist {
  margin: 0;
  padding: 0;
  color: #ae303b;
  font-size: 9px;
  font-weight: 560;
  list-style: none;
}

.errorlist + input,
.errorlist + select,
.errorlist + textarea,
.form-field:has(.errorlist) input,
.form-field:has(.errorlist) select,
.form-field:has(.errorlist) textarea {
  border-color: var(--coral);
}

/* Chain map */
.map-heading {
  align-items: center;
}

.map-mode {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cad5e3;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  gap: 6px;
  font-size: 9px;
}

.map-mode i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.chain-legend {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  gap: 18px;
  font-size: 9px;
}

.chain-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chain-legend span:last-child {
  margin-left: auto;
}

.chain-legend__line {
  width: 18px;
  height: 2px;
  background: var(--cobalt);
}

.chain-legend__node {
  width: 8px;
  height: 8px;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.chain-map {
  display: grid;
  gap: 12px;
}

.chain-lane {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.chain-lane__header {
  display: flex;
  align-items: center;
  min-height: 190px;
  padding: 22px;
  border-right: 1px solid #243c61;
  background: var(--navy-900);
  color: #fff;
  gap: 10px;
}

.chain-lane__header h2 {
  margin: 0;
  color: #fff;
  font-size: 16px;
}

.chain-track {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
  padding: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.chain-node {
  position: relative;
  display: grid;
  flex: 1 0 210px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-width: 210px;
  max-width: 320px;
  padding: 15px;
  border-top: 2px solid var(--teal);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  gap: 9px;
  transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.chain-node:hover {
  border-top-color: var(--cobalt);
  background: var(--surface-tint);
}

.chain-node__pin {
  display: grid;
  align-content: start;
  justify-items: center;
  color: var(--muted);
  gap: 6px;
  font-size: 8px;
}

.chain-node__pin i {
  width: 11px;
  height: 11px;
  border: 3px solid #b6e1d8;
  border-radius: 50%;
  background: var(--teal);
}

.chain-node h3 {
  margin-bottom: 7px;
  font-size: 13px;
}

.chain-node p {
  margin-bottom: 11px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.content-tags span {
  padding: 2px 7px;
  border: 1px solid #cbd6e7;
  border-radius: 999px;
  background: var(--surface);
  color: #53647b;
  font-size: 8px;
}

.chain-connector {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  background: linear-gradient(#fff 49%, #aebbd0 50%, #fff 51%);
  color: var(--cobalt);
}

.chain-connector svg {
  width: 15px;
  height: 15px;
  padding: 2px;
  border-radius: 50%;
  background: var(--surface);
}

/* Personal center */
.personal-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  align-items: start;
  gap: 18px;
}

.account-identity,
.password-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.account-identity__hero {
  display: flex;
  align-items: center;
  min-height: 150px;
  padding: 24px;
  border-bottom: 1px solid #243c61;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--navy-900);
  color: #fff;
  gap: 16px;
}

.account-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, #2f69f0, #1741af);
  font-size: 25px;
  font-weight: 760;
}

.account-identity__hero h2 {
  margin: 10px 0 1px;
  color: #fff;
  font-size: 20px;
}

.account-identity__hero p {
  margin: 0;
  color: #91a5c2;
  font-size: 11px;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 20px;
}

.account-facts > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-facts > div:nth-child(2n) {
  border-right: 0;
}

.account-facts > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.account-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.account-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 11px;
  font-weight: 630;
}

.account-note {
  display: flex;
  margin: 0 20px 20px;
  padding: 12px;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  gap: 8px;
}

.account-note svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--cobalt);
}

.account-note p {
  margin: 0;
  font-size: 9px;
}

.password-panel {
  padding: 24px;
}

.password-form {
  margin-top: 16px;
}

.password-help ul {
  margin: 5px 0 0;
  padding-left: 18px;
}

.password-guidance {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 11px;
  border: 1px solid #cbd7e7;
  border-radius: 8px;
  background: var(--surface-soft);
  gap: 8px;
}

.password-guidance span {
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 720;
}

.password-guidance p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.password-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  gap: 12px;
}

.password-actions > span {
  color: var(--muted);
  font-size: 9px;
}

/* Login */
.page-login {
  background: var(--navy-950);
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.75fr);
  min-height: 100vh;
}

.login-story {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(30px, 5vw, 72px);
  background-color: var(--navy-950);
  background-image: radial-gradient(circle at 75% 35%, rgba(38, 84, 198, 0.22), transparent 40%);
  color: #b9c8dc;
  overflow: hidden;
}

.login-story::after {
  position: absolute;
  right: -180px;
  bottom: -240px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(100, 140, 210, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 90px rgba(100, 140, 210, 0.03), 0 0 0 180px rgba(100, 140, 210, 0.02);
}

.login-story__brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-story__brand > span:last-child {
  display: grid;
}

.login-story__brand strong {
  color: #fff;
  font-size: 17px;
}

.login-story__brand small {
  color: #7186a6;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.login-story__copy {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  margin: auto 0;
  padding: 70px 0 46px;
}

.login-story__copy h1 {
  margin-bottom: 22px;
  color: #fff;
  font-size: clamp(42px, 5.2vw, 78px);
  line-height: 1.06;
}

.login-story__copy h1 span {
  color: #6d95ff;
}

.login-story__copy > p:last-child {
  max-width: 560px;
  color: #8da0bb;
  font-size: clamp(13px, 1.3vw, 17px);
}

.login-pulse {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  width: min(100%, 760px);
  margin: 0 0 42px;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.login-pulse li {
  position: relative;
  display: grid;
  min-width: 70px;
  gap: 7px;
}

.login-pulse li::after {
  position: absolute;
  top: 15px;
  right: 0;
  left: 31px;
  height: 1px;
  background: #304563;
  content: "";
}

.login-pulse li.is-active::after {
  background: var(--teal);
}

.login-pulse li:last-child::after {
  display: none;
}

.login-pulse span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #3b506f;
  border-radius: 50%;
  background: var(--navy-950);
  color: #7186a5;
  font-size: 8px;
  font-weight: 750;
}

.login-pulse li.is-active span {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.login-pulse b {
  color: #7f92ad;
  font-size: 9px;
}

.login-pulse li.is-active b {
  color: #b9c9dc;
}

.login-story__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #8295b1;
  font-size: 9px;
}

.login-story__footer span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.login-story__footer i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43c9aa;
  box-shadow: 0 0 0 4px rgba(67, 201, 170, 0.12);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 78px);
  background: #f5f7fb;
}

.login-panel__intro {
  margin-bottom: 26px;
}

.login-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid #c9d6ee;
  border-radius: 11px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
}

.login-icon svg {
  width: 20px;
  height: 20px;
}

.login-panel h2 {
  margin-bottom: 7px;
  font-size: clamp(26px, 2.6vw, 36px);
}

.login-panel__intro > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.login-form {
  gap: 16px;
}

.login-form .button {
  min-height: 48px;
  margin-top: 4px;
  justify-content: space-between;
  padding: 0 17px;
}

.login-security {
  display: flex;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  gap: 8px;
}

.login-security svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--teal);
}

.login-security p {
  margin: 0;
  font-size: 9px;
}

@media (max-width: 1280px) {
  .app-header__inner {
    padding: 0 18px;
    gap: 12px;
  }

  .brand-copy small,
  .user-chip > span:last-child,
  .logout-button {
    display: none;
  }

  .nav-link {
    padding: 0 8px;
    font-size: 12px;
  }

  .deal-pulse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 22px;
  }

  .deal-pulse__step:nth-child(3)::after {
    display: none;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 275px;
  }

  .fact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  :root {
    --header-height: 64px;
  }

  .app-header__inner {
    min-height: var(--header-height);
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    z-index: 110;
    top: var(--header-height);
    right: 14px;
    left: 14px;
    display: grid;
    max-height: calc(100vh - var(--header-height) - 24px);
    padding: 10px;
    border: 1px solid #2c405f;
    border-radius: 12px;
    background: var(--navy-950);
    box-shadow: var(--shadow-menu);
    gap: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--motion-base) ease, transform var(--motion-base) ease;
  }

  .nav-is-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    justify-content: space-between;
    min-height: 46px;
    padding: 0 13px;
    font-size: 13px;
  }

  .nav-link svg {
    display: block;
  }

  .nav-link.is-current::after {
    top: 9px;
    right: auto;
    bottom: 9px;
    left: -10px;
    width: 2px;
    height: auto;
  }

  .mobile-nav-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-top: 6px;
    padding: 10px 4px 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 8px;
  }

  .mobile-nav-account > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 7px;
    color: #c8d4e5;
    gap: 9px;
  }

  .mobile-nav-account > a > span:last-child {
    display: grid;
    min-width: 0;
  }

  .mobile-nav-account strong {
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav-account small {
    color: #8193ad;
    font-size: 8px;
  }

  .mobile-nav-account form {
    margin: 0;
  }

  .mobile-nav-account button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    background: transparent;
    color: #aebdd2;
    gap: 5px;
    font-size: 10px;
  }

  .mobile-nav-account button svg {
    width: 14px;
    height: 14px;
  }

  .user-area {
    margin-left: 0;
  }

  .dashboard-lead-grid,
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }

  .radar-panel {
    min-height: 350px;
  }

  .filter-bar {
    grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(130px, 0.6fr));
  }

  .filter-bar .filter-submit {
    grid-column: 3;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-panel.sticky-panel {
    position: static;
    box-shadow: none;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    position: static;
  }

  .section-nav--vertical {
    display: flex;
    padding: 4px;
    overflow-x: auto;
  }

  .section-nav--vertical > span,
  .editor-note {
    display: none;
  }

  .section-nav--vertical a.is-current::after {
    top: auto;
    right: 10px;
    bottom: -4px;
    left: 10px;
    width: auto;
    height: 2px;
  }

  .personal-layout {
    grid-template-columns: 1fr;
  }

  .login-stage {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
  }

  .login-story__copy h1 {
    font-size: clamp(38px, 5vw, 58px);
  }
}

@media (max-width: 760px) {
  .app-header__inner {
    padding: 0 14px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .user-area,
  .environment-banner span,
  .warning-banner span {
    display: none;
  }

  .environment-banner,
  .warning-banner {
    min-height: 34px;
    padding: 6px 14px;
  }

  .page-shell {
    padding: 24px 14px 56px;
  }

  .page-heading {
    align-items: stretch;
    margin-bottom: 20px;
  }

  .page-heading h1 {
    font-size: 30px;
  }

  .page-heading > .button {
    align-self: flex-end;
  }

  .button,
  .form-control,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="url"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="number"],
  input[type="file"],
  select {
    min-height: 44px;
  }

  .skip-link,
  .text-link,
  .kanban-toolbar > a,
  .active-filters a,
  .external-link,
  .record-title,
  .icon-button,
  .section-nav a {
    min-height: 44px;
  }

  .metric-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-ribbon > a {
    min-height: 80px;
    padding: 13px;
    border-bottom: 1px solid var(--line);
  }

  .metric-ribbon > a:nth-child(2) {
    border-right: 0;
  }

  .metric-ribbon > a:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .metric-ribbon strong {
    font-size: 26px;
  }

  .deal-pulse-panel,
  .project-regions,
  .insight-panel,
  .activity-panel {
    padding: 18px;
  }

  .project-regions__layout {
    grid-template-columns: 1fr;
  }

  .project-regions__figure {
    padding: 14px 10px 10px;
  }

  .region-projects {
    padding: 14px;
    border-top: 1px solid #243852;
    border-left: 0;
  }

  .region-guide {
    display: none;
  }

  .region-marker-full {
    display: none;
  }

  .region-marker-compact {
    display: inline;
    transform: scale(1.45);
  }

  .region-projects__body {
    max-height: 360px;
  }

  .deal-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deal-pulse__step:nth-child(3)::after {
    display: block;
  }

  .deal-pulse__step:nth-child(2n)::after {
    display: none;
  }

  .pulse-legend {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .detail-aside,
  .review-list,
  .audit-grid,
  .narrative-surface,
  .form-grid,
  .section-field-grid,
  .company-form-grid {
    grid-template-columns: 1fr;
  }

  .status-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-chip:nth-child(2) {
    border-right: 0;
  }

  .status-chip:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .filter-bar,
  .company-filter {
    grid-template-columns: 1fr;
  }

  .filter-bar .filter-submit {
    grid-column: auto;
  }

  .command-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .active-filters {
    justify-content: flex-start;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .scroll-cue {
    display: inline-flex;
  }

  .deal-table,
  .company-table,
  .compact-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .deal-table thead,
  .company-table thead,
  .compact-table thead {
    display: none;
  }

  .deal-table tbody,
  .company-table tbody,
  .compact-table tbody,
  .deal-table tr,
  .company-table tr,
  .compact-table tr,
  .deal-table td,
  .company-table td,
  .compact-table td {
    display: block;
    width: 100%;
  }

  .deal-table tbody,
  .company-table tbody,
  .compact-table tbody {
    padding: 10px;
  }

  .deal-table tr,
  .company-table tr,
  .compact-table tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #cbd7eb;
    border-radius: 8px;
    background: var(--surface);
  }

  .company-table tr {
    border-color: #bad8d1;
  }

  .compact-table tr {
    border-color: #d6cfeb;
  }

  .deal-table td,
  .company-table td,
  .compact-table td {
    position: relative;
    min-height: 31px;
    padding: 6px 0 6px 105px;
    border-bottom: 1px solid #edf0f4;
    font-size: 11px;
    text-align: right;
    white-space: normal;
  }

  .deal-table td::before,
  .company-table td::before,
  .compact-table td::before {
    position: absolute;
    top: 7px;
    left: 0;
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 650;
    text-align: left;
  }

  .deal-table td:first-child,
  .company-table td:first-child,
  .compact-table td:first-child {
    padding: 3px 0 12px;
    text-align: left;
  }

  .deal-table td:first-child::before,
  .company-table td:first-child::before,
  .compact-table td:first-child::before {
    display: none;
  }

  .deal-table td:last-child,
  .company-table td:last-child,
  .compact-table td:last-child {
    border-bottom: 0;
  }

  .deal-table td[colspan],
  .company-table td[colspan],
  .compact-table td[colspan] {
    padding: 0;
  }

  td small {
    margin-left: auto;
  }

  .record-title {
    max-width: none;
    font-size: 14px;
  }

  .record-title span {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .deal-card__title,
  .stage-move select,
  .stage-move button,
  .compact-form .form-control,
  .compact-form input,
  .compact-form select,
  .compact-form textarea,
  .field-inline-link {
    min-height: 44px;
  }

  .deal-card__title {
    align-items: center;
  }

  .detail-identity__topline nav a,
  .deal-identity__topline nav a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
  }

  .icon-button {
    width: 44px;
  }

  .plan-cell {
    max-width: none;
  }

  .pipeline-rail {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .pipeline-rail__copy {
    padding: 12px;
  }

  .kanban-toolbar > div > span:last-child {
    display: none;
  }

  .deal-identity {
    margin: -24px -14px 14px;
    padding: 20px 14px 0;
  }

  .deal-identity__topline,
  .deal-identity__main {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-updated {
    align-self: flex-end;
    margin-top: -28px;
  }

  .deal-identity__main h1 {
    font-size: 30px;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .button {
    flex: 1;
  }

  .detail-pulse-wrap {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .detail-pulse {
    grid-template-columns: repeat(6, 92px);
  }

  .detail-section-nav {
    top: calc(var(--header-height) + 6px);
  }

  .section-heading {
    min-height: 68px;
    padding: 13px;
  }

  .section-heading > span {
    display: none;
  }

  .fact-surface,
  .narrative-surface,
  .timeline,
  .file-list,
  .review-list,
  .audit-grid {
    padding: 12px;
  }

  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-grid > div {
    min-height: 68px;
    padding: 10px;
  }

  .narrative-surface article.narrative-lead {
    grid-column: 1;
  }

  .file-row {
    grid-template-columns: 36px minmax(0, 1fr) 16px;
  }

  .file-row code {
    display: none;
  }

  .form-section {
    padding: 16px;
  }

  .field-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-2 {
    grid-column: 1;
  }

  .inline-company-panel.span-2,
  .form-field.span-2,
  .field-row-4.span-2 {
    grid-column: 1 / -1;
  }

  .save-bar {
    padding: 9px 14px;
  }

  .save-bar__status {
    display: none;
  }

  .save-bar > div:last-child {
    width: 100%;
  }

  .save-bar > div:last-child .button {
    flex: 1;
  }

  .chain-legend span:last-child {
    display: none;
  }

  .chain-lane {
    grid-template-columns: 1fr;
  }

  .chain-lane__header {
    min-height: 74px;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid #243c61;
  }

  .chain-node {
    flex-basis: 230px;
  }

  .account-facts {
    grid-template-columns: 1fr;
  }

  .account-facts > div,
  .account-facts > div:nth-child(2n),
  .account-facts > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .account-facts > div:last-child {
    border-bottom: 0;
  }

  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: 390px;
    padding: 26px 22px;
  }

  .login-story__copy {
    padding: 60px 0 30px;
  }

  .login-story__copy h1 {
    font-size: 42px;
  }

  .login-pulse {
    margin-bottom: 22px;
  }

  .login-story__footer {
    display: none;
  }

  .login-panel {
    padding: 38px 22px 52px;
  }
}

@media (max-width: 480px) {
  .brand-copy small,
  .page-heading p:last-child,
  .command-meta__hint {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-heading > .button {
    align-self: stretch;
  }

  .metric-ribbon > a {
    grid-template-columns: 1fr;
  }

  .metric-ribbon strong {
    grid-row: auto;
    grid-column: auto;
    margin: 3px 0;
  }

  .radar-panel {
    min-height: 315px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .chart-row {
    grid-template-columns: minmax(74px, 1fr) minmax(70px, 1fr) 24px;
  }

  .activity-feed > a {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .activity-feed time {
    grid-column: 2;
  }

  .kanban-board {
    grid-auto-columns: 84vw;
  }

  .record-updated {
    align-self: flex-start;
    margin-top: 0;
  }

  .fact-grid,
  .field-row-4 {
    grid-template-columns: 1fr;
  }

  .timeline-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .file-row {
    padding: 8px;
  }

  .form-surface,
  .password-panel {
    padding: 18px;
  }

  .form-actions--sticky {
    margin: 20px -18px -18px;
    padding: 12px 18px;
  }

  .form-actions--sticky .form-status {
    display: none;
  }

  .form-actions--sticky > div {
    width: 100%;
  }

  .form-actions--sticky .button {
    flex: 1;
  }

  .account-identity__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .password-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .password-actions .button {
    width: 100%;
  }

  .login-story {
    min-height: 340px;
  }

  .login-story__copy {
    padding: 44px 0 20px;
  }

  .login-story__copy h1 {
    font-size: 36px;
  }

  .login-story__copy > p:last-child {
    display: none;
  }

  .login-pulse {
    grid-template-columns: repeat(6, 64px);
  }
}

@media (max-width: 760px) {
  .data-surface__heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .export-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .export-actions .button,
  .selection-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .selection-status {
    min-width: 0;
  }

  .deal-table td.selection-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    padding: 0;
    border-bottom: 0;
  }

  .deal-table td.selection-cell::before {
    display: none;
  }

  .pagination {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .pagination__link {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
