:root {
  color-scheme: light;
  --ink: #191b20;
  --muted: #68707c;
  --paper: #f3f5f7;
  --surface: #ffffff;
  --line: #dce1e7;
  --line-strong: #c5ccd5;
  --blue: #2854c5;
  --blue-dark: #1f429d;
  --coral: #d95d43;
  --green: #187752;
  --yellow: #d89b22;
  --sidebar: #191b20;
  --sidebar-muted: #a9b0bb;
  --shadow: 0 18px 50px rgba(25, 27, 32, 0.13);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(40, 84, 197, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}

.skip-link:focus {
  top: 16px;
}

.demo-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.demo-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px 20px;
  overflow: auto;
  background: var(--sidebar);
  color: #ffffff;
}

.showcase-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.showcase-brand-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
}

.showcase-brand span:last-child {
  display: grid;
  min-width: 0;
}

.showcase-brand strong {
  font-size: 14px;
  line-height: 1.2;
}

.showcase-brand small {
  margin-top: 4px;
  max-width: 150px;
  color: var(--sidebar-muted);
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
}

.showcase-nav {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.nav-group-label {
  margin: 12px 12px 3px;
  color: #7f8793;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-group-label:first-child {
  margin-top: 0;
}

.showcase-nav-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #c7cdd6;
  text-align: left;
}

.showcase-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.showcase-nav-item.is-active {
  border-color: rgba(255, 255, 255, 0.08);
  background: #2a2d34;
  color: #ffffff;
  font-weight: 700;
}

.sidebar-pilot-note {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 15px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-pilot-note span {
  color: var(--sidebar-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.sidebar-pilot-note strong {
  font-size: 13px;
}

.sidebar-pilot-note button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8fb1ff;
  font-size: 13px;
  font-weight: 700;
}

.mobile-demo-header,
.mobile-view-nav {
  display: none;
}

.demo-workspace {
  min-width: 0;
  padding: 0 30px 48px;
}

.demo-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 247, 0.96);
}

.context-label,
.section-kicker {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.demo-topbar h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.demo-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.primary-action,
.client-link-button,
.research-action,
.compact-research-button,
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
}

.primary-action {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
}

.primary-action:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.client-link-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
}

.client-link-button:hover {
  border-color: #969faa;
}

.research-action,
.compact-research-button {
  border: 1px solid #bc4c36;
  background: var(--coral);
  color: #ffffff;
  font-weight: 750;
}

.text-action {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.showcase-view {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 34px;
}

.overview-intro,
.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.overview-intro h2,
.view-heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: 30px;
  line-height: 1.17;
}

.overview-intro p:not(.section-kicker),
.view-heading p:not(.section-kicker) {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.today-focus {
  display: grid;
  flex: 0 0 280px;
  gap: 5px;
  padding: 14px 0 14px 18px;
  border-left: 3px solid var(--coral);
}

.today-focus span,
.today-focus small {
  color: var(--muted);
  font-size: 12px;
}

.today-focus strong {
  font-size: 18px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 30px;
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.metric-strip > div {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.metric-strip > div:last-child {
  border-right: 0;
}

.metric-strip span,
.metric-strip small,
.fixation-summary-band span {
  color: var(--muted);
  font-size: 12px;
}

.metric-strip strong {
  font-size: 27px;
}

.attention-section,
.pipeline-section,
.project-focus,
.client-toolbar,
.fixation-summary-band,
.client-table,
.fixation-list,
.link-project-list {
  margin-top: 32px;
}

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

.section-heading-row h3 {
  margin: 0;
  font-size: 20px;
}

.quiet-note {
  color: var(--muted);
  font-size: 12px;
}

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

.attention-row {
  display: grid;
  grid-template-columns: 12px minmax(150px, 0.8fr) minmax(240px, 1.3fr) minmax(130px, 0.6fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 67px;
  border-bottom: 1px solid var(--line);
}

.attention-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}

.attention-marker.is-urgent {
  background: var(--coral);
}

.attention-row strong {
  font-size: 14px;
}

.attention-row span,
.attention-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.attention-row button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 4px;
}

.pipeline-column {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
}

.pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
}

.pipeline-column-header strong {
  font-size: 13px;
}

.pipeline-column-header span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e7ebf0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.pipeline-client-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.pipeline-client {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px 13px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.pipeline-client strong {
  font-size: 13px;
}

.pipeline-client span,
.pipeline-client small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-focus {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.project-focus img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  object-fit: cover;
}

.project-focus h3 {
  margin: 0;
  font-size: 19px;
}

.project-focus p:not(.section-kicker) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.project-focus-actions {
  display: grid;
  gap: 8px;
}

.client-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.search-field {
  display: grid;
  gap: 6px;
  width: min(320px, 100%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  text-transform: none;
}

.stage-filters {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.stage-filters button,
.mobile-view-nav button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.stage-filters button.is-active,
.mobile-view-nav button.is-active {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.client-table {
  border-top: 1px solid var(--line-strong);
}

.client-table-head,
.client-table-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.8fr) 150px minmax(200px, 1.2fr) 110px;
  align-items: center;
  gap: 16px;
}

.client-table-head {
  min-height: 42px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.client-table-row {
  min-height: 76px;
  border-top: 1px solid var(--line);
}

.client-person {
  display: grid;
  gap: 4px;
}

.client-person strong {
  font-size: 14px;
}

.client-person small,
.client-table-row > span,
.client-table-row > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.client-stage-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}

.next-action-text {
  color: var(--ink) !important;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  width: fit-content;
  padding: 0 8px;
  border-radius: 99px;
  background: #e9edf2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.status-chip.is-success {
  background: #dff3e9;
  color: var(--green);
}

.status-chip.is-warning {
  background: #fff0cf;
  color: #875d0c;
}

.status-chip.is-danger {
  background: #fde4de;
  color: #9d3f2d;
}

.status-chip.is-neutral {
  background: #e9edf2;
  color: #515966;
}

.fixation-summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.fixation-summary-band > div {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.fixation-summary-band > div:last-child {
  border-right: 0;
}

.fixation-summary-band strong {
  font-size: 23px;
}

.fixation-list,
.link-project-list {
  display: grid;
  gap: 10px;
}

.fixation-row {
  display: grid;
  grid-template-columns: 140px minmax(170px, 1fr) minmax(170px, 0.8fr) 130px 140px;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.fixation-row strong {
  font-size: 13px;
}

.fixation-row span,
.fixation-row small {
  color: var(--muted);
  font-size: 12px;
}

.link-project-item {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 180px;
  gap: 20px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.link-project-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  object-fit: cover;
}

.link-project-copy {
  min-width: 0;
}

.link-project-copy h3 {
  margin: 0;
  font-size: 18px;
}

.link-project-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.link-project-actions {
  display: grid;
  gap: 8px;
}

.validation-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 30px;
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.validation-metrics > div {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.validation-metrics > div:last-child {
  border-right: 0;
}

.validation-metrics span,
.validation-metrics small {
  color: var(--muted);
  font-size: 12px;
}

.validation-metrics strong {
  font-size: 23px;
  line-height: 1.15;
}

.cross-workspace,
.payout-workspace,
.network-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  gap: 18px;
  margin-top: 28px;
}

.partner-invite-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  align-items: center;
  gap: 26px;
  margin-top: 30px;
  padding: 22px;
  border: 1px solid #bfd0c8;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: #f4faf7;
}

.partner-invite-copy h3 {
  margin: 10px 0 7px;
  font-size: 21px;
}

.partner-invite-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.network-link-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 3px;
  background: #dff3e9;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.partner-invite-action {
  min-width: 0;
}

.partner-invite-action code {
  display: block;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #c9d8d0;
  border-radius: 4px;
  background: var(--surface);
  color: #34443c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-invite-action > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.network-tree {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.network-row {
  position: relative;
  display: grid;
  grid-template-columns: 12px 36px minmax(0, 1fr) 54px 48px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.network-row.level-2 {
  width: calc(100% - 28px);
  margin-left: 28px;
}

.network-row.is-selected {
  border-color: #9eb1e9;
  background: #f4f6ff;
}

.network-branch {
  width: 9px;
  height: 18px;
  border-bottom: 1px solid #aeb7c2;
  border-left: 1px solid #aeb7c2;
}

.network-row.level-1 .network-branch {
  height: 8px;
  border-bottom: 0;
  border-left: 3px solid var(--blue);
}

.network-person,
.network-result {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.network-person small,
.network-result small,
.network-detail-meta,
.network-bonus-result small {
  color: var(--muted);
  font-size: 10px;
}

.network-person small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-result {
  justify-items: end;
}

.network-detail {
  align-self: start;
}

.network-detail-meta {
  display: grid;
  gap: 5px;
  margin-top: 15px;
}

.network-bonus-result {
  display: grid;
  gap: 6px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #c9d8d0;
  border-radius: 5px;
  background: #f4faf7;
}

.network-bonus-result > span {
  color: var(--muted);
  font-size: 11px;
}

.network-bonus-result strong {
  color: var(--green);
  font-size: 27px;
}

.network-rate-button {
  width: 100%;
  margin-top: 16px;
}

.network-boundary {
  margin-top: 18px;
}

.tool-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.tool-panel-heading,
.material-kit-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tool-panel-heading span,
.material-kit-title span,
.mechanic-block > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tool-panel-heading h3,
.material-kit-title h3 {
  margin: 5px 0 0;
  font-size: 19px;
}

.segmented-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-panel .segmented-filter,
.partner-toolbar,
.material-toolbar {
  margin-top: 18px;
}

.segmented-filter button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.segmented-filter button.is-active {
  border-color: #9eb1e9;
  background: #eef2ff;
  color: var(--blue);
  font-weight: 700;
}

.crossmatch-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.crossmatch-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.crossmatch-row.is-selected {
  border-color: #9eb1e9;
  background: #f4f6ff;
}

.company-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #e9edf2;
  color: #3e4652;
  font-weight: 800;
}

.crossmatch-row > span:nth-child(2),
.partner-identity > span:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.crossmatch-row small,
.partner-identity small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlap-score {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.overlap-score strong {
  color: var(--green);
}

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

.cross-detail {
  align-self: start;
}

.fit-label,
.calculation-badge {
  padding: 5px 8px;
  border-radius: 99px;
  background: #dff3e9;
  color: var(--green) !important;
  font-size: 10px !important;
  white-space: nowrap;
}

.cross-detail-metrics,
.calculation-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
  border-block: 1px solid var(--line);
}

.cross-detail-metrics > div,
.calculation-result > div {
  display: grid;
  gap: 6px;
  padding: 16px 12px 16px 0;
}

.cross-detail-metrics > div + div,
.calculation-result > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.cross-detail-metrics span,
.calculation-result span {
  color: var(--muted);
  font-size: 11px;
}

.cross-detail-metrics strong,
.calculation-result strong {
  font-size: 21px;
}

.mechanic-block {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.mechanic-block strong {
  font-size: 16px;
  line-height: 1.45;
}

.mechanic-block p,
.boundary-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.cross-detail-actions,
.material-kit-actions {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.calculator-fields label {
  display: grid;
  gap: 7px;
  color: #444b55;
  font-size: 11px;
  font-weight: 700;
}

.calculator-fields input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}

.calculation-result .is-primary strong {
  color: var(--blue);
}

.boundary-note {
  margin-top: 18px;
  padding: 12px;
  border-left: 3px solid var(--yellow);
  background: #fff8e8;
}

.payout-history {
  display: grid;
  margin-top: 14px;
}

.payout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border-top: 1px solid var(--line);
}

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

.payout-row > span:first-child {
  display: grid;
  gap: 4px;
}

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

.partner-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.partner-performance-table {
  margin-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.partner-table-head,
.partner-performance-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(78px, 0.55fr)) 76px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--line);
}

.partner-table-head {
  min-height: 42px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.partner-performance-row {
  background: var(--surface);
}

.partner-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.performance-score {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #e9edf2;
  font-size: 13px;
  font-weight: 800;
}

.performance-score.is-top {
  background: #dff3e9;
  color: var(--green);
}

.performance-score.is-growth {
  background: #e9efff;
  color: var(--blue);
}

.performance-score.is-risk {
  background: #fde4de;
  color: #9d3f2d;
}

.empty-tool-state {
  padding: 24px 12px;
  color: var(--muted);
}

.material-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.material-kit {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.material-kit > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.material-kit-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.material-kit-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.material-kit-body > small {
  color: var(--muted);
  font-size: 11px;
}

.asset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.asset-list span {
  padding: 4px 7px;
  border-radius: 99px;
  background: #eef1f4;
  color: #4d5662;
  font-size: 10px;
}

.material-kit-actions {
  padding: 0 16px 16px;
}

dialog {
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(18, 20, 24, 0.62);
}

.client-dialog {
  width: 520px;
}

.research-dialog {
  width: 660px;
}

.dialog-frame,
.research-frame {
  display: grid;
  gap: 20px;
  padding: 24px;
}

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

.dialog-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.dialog-heading h2 {
  margin: 5px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.close-button {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.dialog-frame label,
.research-contact-fields label {
  display: grid;
  gap: 7px;
  color: #444b55;
  font-size: 12px;
  font-weight: 700;
}

.dialog-frame input,
.dialog-frame select,
.research-contact-fields input,
.research-contact-fields textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}

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

.research-progress {
  width: 100%;
  height: 4px;
  overflow: hidden;
  background: #e6e9ee;
}

.research-progress span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--coral);
  transition: width 180ms ease;
}

.research-progress span.is-step-1 { width: 20%; }
.research-progress span.is-step-2 { width: 40%; }
.research-progress span.is-step-3 { width: 60%; }
.research-progress span.is-step-4 { width: 80%; }
.research-progress span.is-step-5 { width: 100%; }

#research-form {
  display: grid;
  gap: 18px;
}

.research-question-heading {
  display: grid;
  gap: 8px;
}

.research-question-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.research-question-heading h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.28;
}

.research-options {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.research-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.research-option:hover {
  border-color: #aeb6c1;
}

.research-option.is-selected {
  border-color: var(--blue);
  background: #f0f4ff;
}

.research-option-mark {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  font-size: 12px;
  font-weight: 800;
}

.research-option.is-multiple .research-option-mark {
  border-radius: 4px;
}

.research-option.is-selected .research-option-mark {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.research-contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.research-contact-fields .full-width {
  grid-column: 1 / -1;
}

.consent-row {
  display: flex !important;
  grid-column: 1 / -1;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 9px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.4;
}

.consent-row input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.copy-buffer {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-feedback {
  min-height: 20px;
  margin: 0;
  color: #a33d2a;
  font-size: 12px;
}

.research-success {
  display: grid;
  justify-items: start;
  gap: 11px;
  padding: 16px 0 4px;
}

.success-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #dff3e9;
  color: var(--green);
  font-size: 22px;
  font-weight: 800;
}

.research-success h3 {
  margin: 4px 0 0;
  font-size: 24px;
}

.research-success p {
  max-width: 520px;
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

.demo-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 15px;
  border-radius: 5px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.demo-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .demo-shell {
    grid-template-columns: 204px minmax(0, 1fr);
  }

  .demo-workspace {
    padding-inline: 22px;
  }

  .demo-topbar-actions .client-link-button {
    display: none;
  }

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

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

  .metric-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .attention-row {
    grid-template-columns: 12px minmax(140px, 0.8fr) minmax(200px, 1.2fr) minmax(120px, 0.6fr);
  }

  .attention-row button {
    display: none;
  }

  .project-focus {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .project-focus-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .client-table-head,
  .client-table-row {
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) 140px minmax(170px, 1fr);
  }

  .client-table-head > :last-child,
  .client-table-row > :last-child {
    display: none;
  }

  .fixation-row {
    grid-template-columns: 130px minmax(160px, 1fr) minmax(150px, 0.8fr) 120px;
  }

  .fixation-row > :last-child {
    display: none;
  }

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

  .validation-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .validation-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .cross-workspace,
  .payout-workspace,
  .network-workspace {
    grid-template-columns: 1fr;
  }

  .partner-invite-band {
    grid-template-columns: 1fr;
  }

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

  .partner-table-head,
  .partner-performance-row {
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(74px, 0.55fr)) 70px;
  }

  .partner-table-head > :nth-child(3),
  .partner-performance-row > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 820px) {
  .demo-shell {
    display: block;
  }

  .demo-sidebar {
    display: none;
  }

  .mobile-demo-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 16px;
    background: var(--sidebar);
    color: #ffffff;
  }

  .mobile-demo-header .showcase-brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 17px;
  }

  .mobile-view-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 -16px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .mobile-view-nav button {
    min-width: 0;
    min-height: 34px;
    padding-inline: 5px;
    white-space: normal;
  }

  .demo-workspace {
    padding: 0 16px 40px;
  }

  .demo-topbar {
    position: static;
    min-height: 82px;
  }

  .demo-topbar-actions {
    display: none;
  }

  .showcase-view {
    padding-top: 26px;
  }

  .overview-intro,
  .view-heading {
    display: grid;
    gap: 20px;
  }

  .overview-intro h2,
  .view-heading h2 {
    font-size: 25px;
  }

  .today-focus {
    width: 100%;
    flex-basis: auto;
  }

  .section-heading-row {
    align-items: flex-start;
  }

  .quiet-note {
    display: none;
  }

  .client-toolbar {
    display: grid;
    align-items: stretch;
  }

  .search-field {
    width: 100%;
  }

  .stage-filters {
    margin-inline: -16px;
    padding-inline: 16px;
  }

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

  .fixation-summary-band > div:nth-child(2) {
    border-right: 0;
  }

  .fixation-summary-band > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .link-project-item {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .link-project-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .partner-toolbar {
    display: grid;
    align-items: stretch;
  }
}

@media (max-width: 620px) {
  .mobile-view-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-view-nav button {
    font-size: 12px;
  }

  .mobile-view-nav button[data-showcase-view="materials"] {
    grid-column: 1 / -1;
  }

  .context-label {
    font-size: 10px;
  }

  .demo-topbar h1 {
    font-size: 18px;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .validation-metrics > div {
    min-height: 96px;
    padding: 14px;
  }

  .validation-metrics strong {
    font-size: 19px;
  }

  .metric-strip > div {
    min-height: 104px;
    padding: 15px;
  }

  .metric-strip strong {
    font-size: 23px;
  }

  .attention-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 10px;
    padding-block: 12px;
  }

  .attention-row > :nth-child(3) {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .attention-row > :nth-child(4) {
    grid-column: 3;
    grid-row: 1;
  }

  .project-focus {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .project-focus-actions,
  .link-project-actions {
    grid-template-columns: 1fr;
  }

  .client-table-head {
    display: none;
  }

  .client-table {
    display: grid;
    gap: 10px;
    border-top: 0;
  }

  .client-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
  }

  .client-person,
  .next-action-text {
    grid-column: 1 / -1;
  }

  .client-table-row > :last-child {
    display: block;
    align-self: center;
    justify-self: end;
  }

  .fixation-row {
    grid-template-columns: 1fr auto;
    gap: 9px 14px;
    min-height: 0;
    padding: 14px;
  }

  .fixation-row > :nth-child(2),
  .fixation-row > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .fixation-row > :nth-child(4) {
    grid-column: 2;
    grid-row: 1;
  }

  .link-project-item {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .tool-panel {
    padding: 15px;
  }

  .partner-invite-band {
    padding: 16px;
  }

  .partner-invite-action > div {
    grid-template-columns: 1fr;
  }

  .network-row,
  .network-row.level-2 {
    grid-template-columns: 10px 34px minmax(0, 1fr) 44px;
    width: 100%;
    margin-left: 0;
  }

  .network-row .network-result:last-child {
    display: none;
  }

  .network-person small {
    white-space: normal;
  }

  .crossmatch-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .crossmatch-row small {
    white-space: normal;
  }

  .company-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .cross-detail-metrics,
  .calculation-result,
  .calculator-fields {
    grid-template-columns: 1fr;
  }

  .cross-detail-metrics > div + div,
  .calculation-result > div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .payout-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 10px;
  }

  .payout-row .status-chip {
    grid-column: 1 / -1;
  }

  .partner-table-head {
    display: none;
  }

  .partner-performance-table {
    display: grid;
    gap: 10px;
    border-top: 0;
  }

  .partner-performance-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
  }

  .partner-performance-row > :nth-child(3) {
    display: grid;
  }

  .partner-identity {
    grid-column: 1 / -1;
  }

  .partner-performance-row > strong {
    display: grid;
    gap: 4px;
    font-size: 14px;
  }

  .partner-performance-row > strong::before {
    content: attr(data-mobile-label);
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .partner-performance-row > :nth-child(5) {
    display: none;
  }

  .performance-score {
    position: absolute;
    right: 14px;
    top: 14px;
  }

  .partner-performance-row {
    position: relative;
  }

  .material-library {
    grid-template-columns: 1fr;
  }

  .dialog-frame,
  .research-frame {
    padding: 18px;
  }

  .dialog-heading h2,
  .research-question-heading h3 {
    font-size: 20px;
  }

  .research-contact-fields {
    grid-template-columns: 1fr;
  }

  .research-contact-fields .full-width,
  .consent-row {
    grid-column: auto;
  }

  .research-actions,
  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .research-actions .primary-action,
  .research-actions .client-link-button,
  .dialog-actions .primary-action,
  .dialog-actions .client-link-button {
    width: 100%;
  }

  .demo-toast {
    right: 16px;
    bottom: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
