/* Load tokens.css first. Preserve selector order. Global demo shell: scope before integrating. */

* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:14px;
  line-height:1.5;
}
button,input,select,textarea {
  font:inherit;
}
button,a,select {
  touch-action:manipulation;
}
button {
  cursor:pointer;
  color:inherit;
}
button,input,select,textarea {
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:8px;
}
button {
  min-height:40px;
  padding:8px 13px;
  transition:background .18s,border-color .18s;
}
button:hover {
  background:var(--raised);
  border-color:var(--detail-657265);
}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible {
  outline:2px solid var(--green);
  outline-offset:3px;
}
button:disabled {
  cursor:default;
  opacity:.45;
}
input,select,textarea {
  color:var(--text);
  padding:10px 12px;
}
select {
  max-width:100%;
  cursor:pointer;
}
textarea {
  resize:vertical;
  width:100%;
}
a {
  color:var(--green);
  text-decoration:none;
}
.muted {
  color:var(--muted);
}
.small {
  font-size:12px;
}
.eyebrow {
  font-size:11px;
  font-weight:650;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.row {
  display:flex;
  align-items:center;
  gap:10px;
}
.between {
  justify-content:space-between;
}
.wrap {
  flex-wrap:wrap;
}
.grow {
  flex:1;
  min-width:0;
}
.icon {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}
.icon-btn {
  width:40px;
  display:inline-grid;
  place-items:center;
  padding:0;
  background:transparent;
}
.primary {
  background:var(--green);
  border-color:var(--green);
  color:var(--green-ink);
  font-weight:650;
}
.primary:hover {
  background:var(--detail-d7eec8);
  color:var(--detail-142111);
}
.ghost {
  background:transparent;
  border-color:transparent;
}
.badge {
  font-size:11px;
  line-height:1.5;
  padding:4px 8px;
  border-radius:5px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--raised);
  color:var(--detail-c4ccc5);
  white-space:nowrap;
}
.green {
  color:var(--green);
  background:var(--detail-293627);
}
.red {
  color:var(--red);
  background:var(--red-bg);
}
.amber {
  color:var(--amber);
  background:var(--detail-363024);
}
.blue {
  color:var(--blue);
  background:var(--detail-27323e);
}
.dot {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}
.topbar {
  height:62px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:20px;
  padding:0 32px;
}
.logo {
  font-size:20px;
  font-weight:750;
  letter-spacing:-1px;
  display:flex;
  align-items:center;
  gap:10px;
}
.logo-mark {
  width:29px;
  height:29px;
  background:var(--green);
  color:var(--green-ink);
  display:grid;
  place-items:center;
  border-radius:7px;
}
.top-sep {
  height:20px;
  width:1px;
  background:var(--line);
}
.top-search {
  color:var(--muted);
  font-size:13px;
  display:flex;
  align-items:center;
  gap:10px;
  background:transparent;
  border:0;
}
.key {
  white-space:nowrap;
  font-size:11px;
  border:1px solid var(--line);
  padding:2px 5px;
  border-radius:4px;
}
.avatar {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  background:var(--detail-303a2e);
  border:1px solid var(--detail-414d3e);
  color:var(--detail-d1e5c7);
  border-radius:10px;
  font-size:12px;
  font-weight:600;
  flex-shrink:0;
}
.main {
  max-width:1680px;
  margin:0 auto;
  padding:25px 36px 120px;
}
.breadcrumb {
  font-size:12px;
  color:var(--muted);
  margin-bottom:14px;
}
.heading {
  margin-bottom:20px;
}
.heading h1 {
  margin:0;
  font-size:29px;
  line-height:1.2;
  letter-spacing:-.8px;
  font-weight:600;
}
.preview-label {
  display:flex;
  gap:7px;
  align-items:center;
  font-size:11px;
  color:var(--muted);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:20px;
  padding:6px 11px;
}
.kpis {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  margin-bottom:22px;
  background:var(--surface);
}
.kpi {
  border:0;
  border-right:1px solid var(--line);
  border-radius:0;
  background:transparent;
  padding:15px 18px;
  text-align:left;
  min-height:110px;
}
.kpi:last-child {
  border-right:0;
}
.kpi-label {
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}
.kpi-value {
  font-size:30px;
  letter-spacing:-1.2px;
  line-height:1.3;
  margin-top:8px;
  font-weight:500;
}
.kpi-foot {
  margin-top:4px;
  font-size:10px;
  color:var(--muted);
}
.kpi:hover {
  background:var(--raised);
}
.kpi.alert .kpi-value {
  color:var(--red);
}
.kpi-unit {
  font-size:13px;
  letter-spacing:0;
  color:var(--muted);
  margin-left:5px;
}
.workspace-tabs {
  border-bottom:1px solid var(--line);
  margin-bottom:17px;
  padding-bottom:11px;
}
.tabs {
  display:flex;
  align-items:center;
  gap:6px;
}
.tab {
  background:transparent;
  border:0;
  color:var(--muted);
  font-weight:600;
}
.tab.active {
  background:var(--raised);
  color:var(--text);
}
.tab.map-tab {
  color:var(--red);
}
.tab.map-tab.active {
  background:var(--red-bg);
}
.count {
  background:var(--detail-ffffff0e);
  border:1px solid var(--detail-ffffff12);
  font-size:11px;
  padding:1px 6px;
  border-radius:4px;
  margin-left:7px;
}
.segmented {
  display:flex;
  background:var(--surface);
  padding:3px;
  border:1px solid var(--line);
  border-radius:8px;
  gap:2px;
}
.segmented button {
  background:transparent;
  border:0;
  min-height:32px;
  padding:5px 12px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
}
.segmented button.active {
  background:var(--detail-343d32);
  color:var(--text);
}
/* More (the head's backup actions, P1A): a menu under its button */
.cm-more {
  position:relative;
}
.cm-more-menu {
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:40;
  display:flex;
  flex-direction:column;
  min-width:240px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  background:var(--raised);
  box-shadow:var(--shadow);
}
.cm-more-menu button {
  justify-content:flex-start;
  border:0;
  background:transparent;
  text-align:left;
  white-space:nowrap;
}
.search-wrap {
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--line);
  border-radius:9px;
  padding:0 13px;
  background:var(--surface);
  height:47px;
}
.search-wrap input {
  border:0;
  background:transparent;
  width:100%;
  outline:none;
  padding-left:0;
}
.search-wrap .icon {
  color:var(--muted);
}
.filters {
  padding:17px 0;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.filter {
  border-radius:20px;
  font-size:12px;
  min-height:34px;
  background:transparent;
  padding:6px 12px;
  color:var(--muted);
}
.filter.active {
  background:var(--text);
  color:var(--bg);
  border-color:var(--text);
}
.filter-select {
  font-size:12px;
  padding:7px 10px;
  background:transparent;
}
.table-wrap {
  border:1px solid var(--line);
  border-radius:10px;
  overflow:auto;
}
.client-table {
  border-collapse:collapse;
  width:100%;
  text-align:left;
  min-width:1120px;
}
.client-table th {
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.065em;
  font-weight:500;
  color:var(--muted);
  background:var(--surface);
  padding:13px 15px;
  white-space:nowrap;
}
.client-table td {
  padding:15px;
  border-top:1px solid var(--detail-272d27);
  font-size:12px;
  vertical-align:middle;
}
.client-table tbody tr {
  cursor:pointer;
  transition:background .15s;
}
.client-table tbody tr:hover {
  background:var(--detail-1b211b);
}
.client-table .name {
  font-size:13px;
  font-weight:550;
}
.company {
  font-size:11px;
  color:var(--muted);
  margin-top:3px;
}
.client-cell {
  min-width:190px;
}
.client-table .avatar {
  width:33px;
  height:33px;
  border-radius:9px;
}
.stage-select {
  font-size:11px;
  max-width:185px;
  min-height:34px;
  padding:6px 23px 6px 9px;
  background:var(--detail-252f26);
  border-color:var(--detail-3a4738);
  color:var(--detail-d0e5c6);
}
.stage-select.waiting {
  color:var(--amber);
  background:var(--detail-332e23);
  border-color:var(--detail-4d4330);
}
.stage-select.live {
  color:var(--green);
  background:var(--detail-263b2b);
  border-color:var(--detail-39543b);
}
.offer-select {
  font-size:11px;
  border:0;
  background:transparent;
  padding:6px 16px 6px 0;
  max-width:138px;
}
.days-over {
  color:var(--red);
  background:var(--red-bg);
  padding:4px 7px;
  border-radius:5px;
  white-space:nowrap;
}
.health-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  display:inline-block;
  margin-right:5px;
}
.table-foot {
  display:flex;
  justify-content:space-between;
  padding:15px 2px;
  color:var(--muted);
  font-size:11px;
}
.dock {
  position:fixed;
  bottom:18px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
  border:1px solid var(--detail-4b5346);
  padding:7px;
  background:var(--detail-262d26ee);
  backdrop-filter:blur(15px);
  border-radius:16px;
  box-shadow:0 8px 35px var(--detail-0006);
  z-index:5;
}
.dock button {
  width:41px;
  height:41px;
  display:grid;
  place-items:center;
  background:transparent;
  border:0;
  padding:0;
  border-radius:10px;
  color:var(--muted);
}
.dock button.active {
  background:var(--green);
  color:var(--green-ink);
}
.dock button:hover {
  background:var(--detail-495645);
  color:var(--text);
}
.dock-divider {
  width:1px;
  background:var(--line);
  margin:6px 4px;
}
.ai-launch {
  position:fixed;
  right:28px;
  bottom:26px;
  z-index:6;
  box-shadow:0 4px 22px var(--detail-0004);
}
.board-intro {
  padding:4px 0 15px;
}
.board {
  display:flex;
  gap:12px;
  overflow:auto;
  max-height:640px;
  min-height:460px;
  padding-bottom:18px;
  align-items:stretch;
  scroll-behavior:smooth;
}
.column {
  flex:0 0 246px;
  border:1px solid var(--line);
  background:var(--detail-141815);
  border-radius:10px;
  padding:10px;
  min-height:440px;
}
.column.empty {
  flex-basis:175px;
}
.column-head {
  position:sticky;
  top:0;
  z-index:1;
  background:var(--detail-141815);
  padding:7px 3px 13px;
  display:flex;
  gap:8px;
  align-items:flex-start;
  border-bottom:1px solid var(--line);
  font-size:12px;
  min-height:63px;
}
.phase-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--blue);
  margin-top:6px;
  flex-shrink:0;
}
.phase-assets .phase-dot {
  background:var(--detail-beb5db);
}
.phase-wait .phase-dot {
  background:var(--amber);
}
.phase-live .phase-dot {
  background:var(--green);
}
.card {
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:9px;
  padding:14px;
  margin-top:11px;
  cursor:grab;
  transition:border-color .2s;
}
.card:hover {
  border-color:var(--detail-74816b);
}
.card.match {
  border-color:var(--green);
  box-shadow:0 0 0 1px var(--green);
}
.card .name {
  font-size:13px;
  font-weight:600;
}
.card .company {
  min-height:31px;
}
.card-bottom {
  margin-top:13px;
  font-size:11px;
  justify-content:space-between;
  color:var(--muted);
}
.card select {
  font-size:10px;
  margin-top:10px;
  width:100%;
  padding:6px;
  background:transparent;
}
.card-note {
  padding:9px;
  background:var(--detail-302c24);
  margin-top:11px;
  border-radius:5px;
  font-size:11px;
  color:var(--amber);
}
.column.drag-over {
  border-color:var(--green);
  background:var(--detail-243121);
}
.add-column {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  width:100%;
  text-align:left;
  margin-top:8px;
}
.empty-note {
  font-size:11px;
  color:var(--muted);
  padding:18px 5px;
}
.overlay {
  position:fixed;
  inset:0;
  background:var(--detail-060906a8);
  backdrop-filter:blur(5px);
  z-index:20;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:25px;
}
.hidden {
  display:none!important;
}
.profile {
  width:1180px;
  max-width:100%;
  height:calc(100vh - 50px);
  background:var(--bg);
  border:1px solid var(--detail-434c40);
  border-radius:15px;
  box-shadow:var(--shadow);
  overflow:auto;
  position:relative;
}
.profile.expanded {
  width:100%;
  height:100%;
  border-radius:0;
}
.overlay:has(.expanded) {
  padding:0;
}
.profile-head {
  position:sticky;
  top:0;
  z-index:3;
  background:var(--detail-191e1afa);
  border-bottom:1px solid var(--line);
  padding:20px 25px;
}
.profile-head h2 {
  font-size:22px;
  letter-spacing:-.5px;
  margin:0;
  line-height:1.2;
}
.profile-head .avatar {
  width:47px;
  height:47px;
  font-size:15px;
}
.profile-badges {
  margin-top:15px;
  gap:8px;
}
.profile-head .stage-select {
  max-width:250px;
}
.profile-actions {
  margin-top:15px;
}
.profile-actions button {
  font-size:11px;
  display:flex;
  align-items:center;
  gap:7px;
  background:var(--detail-232a23);
  min-height:35px;
}
.profile-actions .contact-chip {
  font-size:11px;
  display:flex;
  align-items:center;
  gap:7px;
  min-height:35px;
  padding:8px 13px;
  border:1px solid var(--line);
  border-radius:8px;
  user-select:text;
  overflow-wrap:anywhere;
}
.profile-actions .contact-chip.missing {
  opacity:.45;
}
.profile-actions .icon {
  width:14px;
  height:14px;
}
.profile-body {
  padding:25px;
}
.section-title {
  margin:0 0 16px;
  font-size:14px;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:9px;
}
.section-num {
  font-size:10px;
  color:var(--muted);
  border:1px solid var(--line);
  padding:3px 6px;
  border-radius:5px;
}
.overview-grid {
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:20px;
}
.stack {
  display:flex;
  flex-direction:column;
  gap:17px;
}
.panel {
  border:1px solid var(--line);
  border-radius:10px;
  padding:18px;
  background:var(--surface);
}
.next-step {
  border-color:var(--detail-4b543a);
  background:var(--detail-242b20);
}
.next-step h3 {
  font-size:16px;
  line-height:1.5;
  font-weight:500;
  margin:11px 0 8px;
}
.next-step .eyebrow {
  color:var(--green);
}
.panel h4 {
  font-size:12px;
  font-weight:600;
  margin:0 0 13px;
}
.progress-segments {
  display:grid;
  grid-template-columns:repeat(14,1fr);
  gap:4px;
  margin:14px 0 10px;
}
.progress-segments button, .progress-segments > span {
  border:0;
  padding:0;
  min-height:10px;
  border-radius:3px;
  background:var(--detail-333b33);
}
.progress-segments button.done, .progress-segments > span.done {
  background:var(--detail-678260);
}
.progress-segments button.current, .progress-segments > span.current {
  background:var(--green);
  box-shadow:0 0 0 3px var(--detail-c5e5af17);
}
/* BRIEF FOSP1C, row 4: the journey bar has one segment per board column (the shown FOS steps), however many */
.progress-segments.ghl {
  grid-template-columns:none;
  grid-auto-flow:column;
  grid-auto-columns:1fr;
}
/* green = stages behind the client, yellow = the stage they are in (existing tokens only) */
.progress-segments.ghl > span.done {
  background:var(--green);
}
.progress-segments.ghl > span.current {
  background:var(--amber);
  box-shadow:none;
}
.progress-segments button.optional {
  background:repeating-linear-gradient(45deg,var(--detail-474235),var(--detail-474235) 2px,var(--detail-34372e) 2px,var(--detail-34372e) 4px);
}
.progress-label {
  font-size:11px;
  color:var(--muted);
}
.detail-line {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  font-size:12px;
  min-height:33px;
}
.detail-line>span:first-child {
  color:var(--muted);
}
.detail-value {
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
  overflow-wrap:anywhere;
}
.copy {
  border:0;
  background:transparent;
  width:27px;
  min-height:28px;
  padding:3px;
  color:var(--muted);
}
.copy .icon {
  width:12px;
  height:12px;
}
.quote {
  font-size:13px;
  margin:12px 0 0;
  line-height:1.7;
  color:var(--detail-d7ded5);
}
.link-grid {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}
.link-grid button {
  font-size:11px;
  min-height:33px;
  padding:6px 9px;
}
.profile-section {
  margin-top:32px;
}
.call-row,.doc-row {
  display:flex;
  align-items:center;
  gap:15px;
  padding:16px 0;
  border-top:1px solid var(--line);
}
.call-row:first-child,.doc-row:first-child {
  border-top:0;
  padding-top:0;
}
.call-icon {
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:10px;
  display:grid;
  place-items:center;
  color:var(--green);
  flex-shrink:0;
}
.call-row strong,.doc-row strong {
  font-size:12px;
  font-weight:600;
}
.call-row p {
  font-size:12px;
  margin:5px 0;
  color:var(--muted);
}
.call-row button,.doc-row button {
  font-size:11px;
  white-space:nowrap;
}
.document-date {
  font-size:11px;
  color:var(--muted);
  width:95px;
  text-align:right;
}
.delivery {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
}
.delivery .panel {
  padding:16px;
}
.delivery strong {
  display:block;
  font-size:24px;
  font-weight:500;
  margin-top:10px;
}
.composer {
  padding:15px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:10px;
}
.composer textarea {
  background:transparent;
  border:0;
  min-height:64px;
  padding:3px;
  outline:none;
}
.timeline {
  padding-top:18px;
}
.timeline-item {
  display:flex;
  gap:12px;
  padding:0 0 19px;
  font-size:12px;
}
.timeline-bullet {
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:50%;
  font-size:11px;
  flex-shrink:0;
  color:var(--green);
}
.timeline-item p {
  margin:4px 0;
}
.timeline-tags {
  display:flex;
  gap:5px;
  align-items:center;
}
.expand-btn {
  font-size:11px;
  min-height:34px;
  background:transparent;
}
.profile-footer {
  margin-top:24px;
  padding-top:16px;
  border-top:1px solid var(--line);
  font-size:11px;
  color:var(--muted);
}
.dialog {
  width:470px;
  max-width:100%;
  max-height:88vh;
  overflow:auto;
  background:var(--surface);
  padding:24px;
  border:1px solid var(--detail-4a5545);
  border-radius:14px;
  box-shadow:var(--shadow);
}
.dialog h2 {
  margin:0;
  font-size:20px;
  font-weight:550;
  letter-spacing:-.4px;
}
.dialog p {
  color:var(--muted);
  font-size:13px;
  line-height:1.7;
}
.dialog label {
  display:block;
  font-size:12px;
  margin:18px 0 7px;
}
.dialog select {
  width:100%;
}
.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:20px;
}
.form-error {
  color:var(--red);
  font-size:12px;
  margin-top:7px;
}
.sidepanel {
  position:fixed;
  right:0;
  top:0;
  bottom:0;
  background:var(--surface);
  border-left:1px solid var(--detail-46513f);
  width:420px;
  max-width:100%;
  z-index:30;
  box-shadow:var(--shadow);
  padding:25px;
  overflow:auto;
}
.sidepanel h2 {
  font-size:21px;
  font-weight:550;
  margin:15px 0 8px;
}
.drill-row {
  display:block;
  text-align:left;
  width:100%;
  margin-top:10px;
  padding:15px;
}
.drill-row p {
  font-size:12px;
  color:var(--muted);
  margin:7px 0 0;
}
.mapping-head {
  margin:10px 0 23px;
}
.mapping-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px;
}
.mapping-card {
  padding:19px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
}
.mapping-card h3 {
  font-size:14px;
  font-weight:550;
  margin:13px 0 3px;
}
.mapping-card p {
  color:var(--muted);
  font-size:12px;
  min-height:36px;
}
.mapping-card select {
  width:100%;
  font-size:12px;
  margin:6px 0 12px;
}
.mapping-source {
  font-size:11px;
  color:var(--muted);
}
.toast {
  position:fixed;
  bottom:95px;
  left:50%;
  transform:translateX(-50%);
  border:1px solid var(--detail-718365);
  background:var(--detail-283324);
  color:var(--detail-e4f0dc);
  padding:12px 18px;
  border-radius:9px;
  box-shadow:var(--shadow);
  z-index:80;
  font-size:12px;
  max-width:90vw;
}
.ai-messages {
  margin:22px 0;
  min-height:200px;
}
.ai-message {
  font-size:13px;
  line-height:1.7;
  padding:14px;
  border-radius:10px;
  border:1px solid var(--line);
  margin:12px 0;
}
.ai-message.user {
  background:var(--detail-2f392b);
  border-color:var(--detail-4b5c43);
}
.ai-suggestion {
  display:block;
  width:100%;
  text-align:left;
  font-size:12px;
  margin:8px 0;
}
.ai-compose {
  display:flex;
  gap:8px;
}
.ai-compose input {
  min-width:0;
  flex:1;
}
.no-results {
  padding:60px 20px;
  text-align:center;
  color:var(--muted);
}
.design-note {
  padding:12px 15px;
  border:1px dashed var(--line);
  border-radius:8px;
  color:var(--muted);
  font-size:11px;
  margin-top:18px;
}
.journey-note {
  font-size:11px;
  background:var(--detail-202820);
  padding:10px;
  border-radius:6px;
  margin-top:8px;
}
::-webkit-scrollbar {
  width:8px;
  height:8px;
}
::-webkit-scrollbar-thumb {
  background:var(--detail-4d584a);
  border-radius:8px;
}
::-webkit-scrollbar-track {
  background:var(--detail-181d18);
}
@media(min-width:1600px) {
  .main {
    padding-left:60px;
    padding-right:60px;
  }
}
@media(max-width:1100px) {
  .main {
    padding:25px 22px 115px;
  }
  .kpis {
    grid-template-columns:repeat(4,1fr);
  }
  .kpi {
    border-bottom:1px solid var(--line);
    min-height:110px;
  }
  .kpi:nth-child(4) {
    border-right:0;
  }
  .kpi:nth-child(n+5) {
    border-bottom:0;
  }
  .topbar {
    padding:0 22px;
  }
  .top-search {
    display:none;
  }
  .overview-grid {
    grid-template-columns:1fr 1fr;
  }
  .delivery {
    grid-template-columns:repeat(3,1fr);
  }
}
@media(max-width:700px) {
  .topbar {
    height:59px;
    padding:0 16px;
  }
  .main {
    padding:22px 16px 125px;
  }
  .heading {
    align-items:flex-start;
    gap:15px;
  }
  .heading h1 {
    font-size:25px;
  }
  .preview-label {
    font-size:10px;
  }
  .kpis {
    grid-template-columns:repeat(2,1fr);
  }
  .kpi {
    padding:14px;
    min-height:98px;
    border-bottom:1px solid var(--line)!important;
  }
  .kpi:nth-child(2n) {
    border-right:0;
  }
  .kpi:last-child {
    grid-column:span 2;
    border-bottom:0!important;
    display:grid;
    grid-template-columns:1fr auto;
    align-items:center;
    min-height:66px;
  }
  .kpi:last-child .kpi-value {
    grid-column:2;
    grid-row:1/3;
    margin:0;
  }
  .kpi:last-child .kpi-foot {
    grid-column:1;
  }
  .kpi-value {
    font-size:26px;
  }
  .workspace-tabs {
    align-items:flex-start;
    gap:12px;
    flex-wrap:wrap;
  }
  .tab {
    font-size:12px;
    padding:7px 10px;
  }
  .count {
    margin-left:4px;
  }
  .overview-grid {
    grid-template-columns:1fr;
  }
  .overlay {
    padding:8px;
  }
  .profile {
    height:calc(100dvh - 16px);
  }
  .profile-head {
    padding:16px;
  }
  .profile-body {
    padding:18px;
  }
  .profile-head h2 {
    font-size:19px;
  }
  .profile-head .avatar {
    display:none;
  }
  .profile-badges {
    gap:6px;
  }
  .profile-actions {
    gap:6px;
  }
  .profile-actions button,.profile-actions .contact-chip {
    font-size:10px;
    padding:7px;
  }
  .profile-controls .expand-label {
    display:none;
  }
  .mapping-grid {
    grid-template-columns:1fr;
  }
  .delivery {
    grid-template-columns:repeat(2,1fr);
  }
  .call-row {
    flex-wrap:wrap;
  }
  .call-row .grow {
    min-width:180px;
  }
  .document-date {
    display:none;
  }
  .doc-row {
    gap:9px;
  }
  .doc-row .badge {
    font-size:10px;
  }
  .ai-launch {
    right:16px;
    bottom:88px;
  }
  .dock {
    bottom:14px;
    gap:3px;
    padding:6px;
  }
  .dock button {
    width:36px;
    height:39px;
  }
  .table-foot {
    gap:15px;
  }
  .topbar .top-sep,.workspace-name {
    display:none;
  }
  .header-status {
    display:none;
  }
  .section-title {
    flex-wrap:wrap;
  }
  .dialog {
    padding:20px;
  }
  .sidepanel {
    width:100%;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

/* ── Reeze 2026-10-12: one box per client, a clean line between columns, headers that stay ──
   The board columns are no longer boxes: each client is the only box, and the columns are separated
   by one vertical line. The column titles and the list's header row stay visible while scrolling. */
.board {
  gap:0;
}
.column {
  border:0;
  border-right:1px solid var(--line);
  border-radius:0;
  background:transparent;
  padding:0 12px;
}
.column:last-child {
  border-right:0;
}
.column.drag-over {
  border-color:var(--line);
  background:var(--detail-243121);
}
.column-head {
  position:sticky;
  top:0;
  z-index:2;
  background:var(--bg);
}
.card-note {
  background:transparent;
  padding:0;
  border-radius:0;
}
.card select {
  border:0;
  border-top:1px solid var(--line);
  border-radius:0;
  padding:8px 0 0;
}
.table-wrap {
  max-height:calc(100vh - 220px);
}
.client-table th {
  position:sticky;
  top:0;
  z-index:2;
}
.life-text {
  white-space:nowrap;
}
/* Kevork 2026-10-12: client facts: space between the group boxes, each box collapsible, and air before the next section */
.facts-grid {
  display:flex;
  flex-direction:column;
  gap:14px;
}
.facts-grid .panel.facts-group {
  padding:0;
}
.facts-head {
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:14px 18px;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-size:12px;
  font-weight:600;
  text-align:left;
  cursor:pointer;
}
.facts-head:focus-visible {
  outline:2px solid var(--green);
  outline-offset:-2px;
  border-radius:10px;
}
.facts-title {
  flex:1;
}
.facts-chev {
  color:var(--muted);
  transition:transform .15s ease;
}
.facts-group.open .facts-chev {
  transform:rotate(90deg);
}
.facts-body {
  padding:0 18px 16px;
}
.facts-badge {
  font-size:11px;
  font-weight:600;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(224,122,95,.16);
  color:#f0a08a;
  white-space:nowrap;
}
.facts-badge.prepaid {
  background:rgba(159,211,138,.14);
  color:var(--green);
}
.profile-section.profile-facts {
  margin-bottom:24px;
}

/* 0771: a call's summary, opened from its Summary badge */
.call-sum-btn { cursor:pointer; border:1px solid transparent; font:inherit; font-size:11px; }
.call-sum-btn:hover, .call-sum-btn[aria-expanded="true"] { border-color:var(--detail-c4ccc5); }
.call-summary { padding:10px 12px 14px; margin:-2px 0 8px; border-left:2px solid var(--raised); }
.call-summary-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; }

/* 0772: the client's health on the profile, set by the team */
.health-select { font:inherit; font-size:11px; padding:4px 8px; border-radius:5px; border:1px solid var(--raised); background:var(--raised); color:inherit; }
.health-select.green { color:var(--green); }
.health-select.red { color:var(--red); }

/* 0773: the team-set Stage picker and the nightly suggestion beside it */
.life-select { font:inherit; font-size:12px; padding:4px 8px; border-radius:5px; border:1px solid var(--raised); background:var(--raised); color:inherit; }
.suggest-tag { margin-left:6px; white-space:nowrap; }

/* Stat cards (Reeze's audit 2026-10-15): a row of seven stage cards that filter the list, then launch time and health. */
.kpi-rows .kpis {
  margin-bottom:12px;
}
.kpi-rows .kpis:last-child {
  margin-bottom:22px;
}
.kpis.kpis-4 {
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.kpi.active {
  background:var(--raised);
  box-shadow:inset 0 -2px 0 var(--text);
}
.filter-count {
  margin-left:4px;
  font-variant-numeric:tabular-nums;
  opacity:.7;
}
@media(max-width:1100px) {
  .kpis.kpis-4 .kpi {
    border-bottom:0;
  }
}
@media(max-width:700px) {
  .kpis.kpis-4 .kpi:last-child {
    grid-column:auto;
    display:block;
    min-height:98px;
  }
  .kpis.kpis-4 .kpi:last-child .kpi-value {
    margin-top:8px;
  }
  .kpis.kpis-4 .kpi:nth-last-child(-n+2) {
    border-bottom:0!important;
  }
}

/* Delivery list (0869): numbers right-aligned, % coloured, sortable headers; a second card row of six. */
.client-table td.num {
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.pct-good {
  color:var(--green);
}
.pct-bad {
  color:var(--red);
}
.th-sort {
  padding:0;
  min-height:0;
  font:inherit;
  color:inherit;
  text-transform:inherit;
  letter-spacing:inherit;
  cursor:pointer;
}
.kpis.kpis-6 {
  grid-template-columns:repeat(6,minmax(0,1fr));
}
@media(max-width:1100px) {
  .kpis.kpis-6 {
    grid-template-columns:repeat(3,1fr);
  }
  .kpis.kpis-6 .kpi:nth-child(3) {
    border-right:0;
  }
  .kpis.kpis-6 .kpi:nth-child(n+4) {
    border-bottom:0;
  }
}
@media(max-width:700px) {
  .kpis.kpis-6 {
    grid-template-columns:repeat(2,1fr);
  }
  .kpis.kpis-6 .kpi:last-child {
    grid-column:auto;
    display:block;
    min-height:98px;
  }
  .kpis.kpis-6 .kpi:last-child .kpi-value {
    margin-top:8px;
  }
  .kpis.kpis-6 .kpi:nth-last-child(-n+2) {
    border-bottom:0!important;
  }
}

/* Profile clean-up (Reeze's audit 2026-10-15): Delivery box first, a % bar, record IDs in a footer, plain-text offer. */
.delivery-box {
  margin-bottom:22px;
}
.pct-bar {
  display:inline-block;
  width:90px;
  height:7px;
  border-radius:4px;
  background:var(--line);
  vertical-align:middle;
  overflow:hidden;
  margin-right:6px;
}
.pct-bar i {
  display:block;
  height:100%;
  background:var(--text);
}
.pct-bar i.good {
  background:var(--green);
}
.pct-bar i.bad {
  background:var(--red);
}
.record-ids {
  margin-top:28px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.record-ids code {
  font-size:11px;
}
.offer-text {
  font-size:12px;
  white-space:nowrap;
}
/* phones: the floating "Ask FOS" button covered the search box and filters (and it is read-only here) */
@media(max-width:700px) {
  .ai-launch {
    display:none;
  }
}

/* ── pipeline additions (Reeze's go, 2026-10-18) ── */
/* the hidden attribute always hides, whatever display a class sets (Codex browser test, 2026-10-17) */
[hidden] {
  display:none!important;
}
.pipe-switch button {
  white-space:nowrap;
}
.mute-btn {
  margin-left:12px;
  font-size:11px;
}
.card-next {
  margin-top:9px;
  font-size:11px;
}
.happy-dots {
  display:flex;
  gap:5px;
  margin-top:11px;
}
.happy-dot {
  display:inline-block;
  width:9px;
  height:9px;
  border-radius:50%;
  border:1px solid var(--line);
  background:transparent;
  flex:none;
}
.happy-dot.done {
  background:var(--green);
  border-color:var(--green);
}
.happy-dot.open {
  border-color:var(--amber);
}
.happy-dot.skip {
  border-style:dashed;
  opacity:.5;
}
.happy-dot.needs {
  border-style:dotted;
}
.happy-panel .happy-line input[type=checkbox] {
  margin:0;
}
.cm-confetti {
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:80;
}
.cm-confetti i {
  position:absolute;
  top:-12px;
  width:8px;
  height:13px;
  border-radius:2px;
  animation-name:cm-fall;
  animation-timing-function:cubic-bezier(.2,.6,.4,1);
  animation-fill-mode:forwards;
}
@keyframes cm-fall {
  to {
    top:105vh;
    margin-left:60px;
    opacity:.2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm-confetti {
    display:none;
  }
}
/* the board header holds the pipeline switch, counts and the sound switch: let it wrap on narrow screens */
.board-intro {
  flex-wrap:wrap;
  gap:8px;
}
.board-intro > .row {
  flex-wrap:wrap;
  gap:8px;
}

/* ── the four-tab shell (binding UI spec 11-fos-client-mgmt-ui.md, Reeze 2026-10-18) ── */
.cm-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.cm-title h1 {
  margin:0;
  font-size:29px;
  line-height:1.2;
  letter-spacing:-.8px;
  font-weight:600;
}
.cm-subtitle {
  color:var(--muted);
  font-size:13px;
  margin:4px 0 8px;
}
.cm-title .preview-label {
  display:inline-flex;
}
.cm-head-actions {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.search-wrap.compact {
  height:38px;
  width:230px;
}
.cm-tabs {
  overflow-x:auto;
}
.cm-tabs .tab {
  white-space:nowrap;
}
.link-btn {
  padding:0;
  min-height:0;
  text-decoration:underline;
}
/* Overview */
.ov-tiles {
  margin-bottom:16px;
}
.ov-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:14px;
}
.ov-attention, .cm-health-log {
  margin-bottom:14px;
}
.health-boxes {
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:8px;
}
.health-box {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
  text-align:left;
}
.health-box .hb-value {
  font-size:24px;
  font-weight:600;
}
.health-box .hb-label {
  font-size:12px;
  color:var(--muted);
}
.dist-bar {
  display:flex;
  height:14px;
  border-radius:7px;
  overflow:hidden;
  background:var(--raised);
  margin:6px 0 12px;
}
.dist-bar span {
  display:block;
  height:100%;
}
.badge.why {
  margin:2px 0;
  white-space:nowrap;
}
.client-table.compact td, .client-table.compact th {
  padding-top:9px;
  padding-bottom:9px;
}
/* Pipeline: Cole-size compact cards */
.cm-board .column, .phone-board .column {
  min-width:212px;
  width:212px;
}
.phone-board .column {
  width:100%;
  min-width:0;
}
.column-head .col-add {
  width:24px;
  height:24px;
  min-height:0;
  padding:0;
  margin-left:4px;
}
.column-head .col-add .icon {
  width:13px;
  height:13px;
}
.cm-card {
  padding:10px 11px;
  margin-top:8px;
}
.cm-card .company {
  min-height:0;
  font-size:11px;
}
.cm-card .card-top {
  gap:6px;
  align-items:flex-start;
}
.cm-card .card-bottom {
  margin-top:8px;
}
.cm-card .move-to {
  margin-top:7px;
  opacity:0;
  transition:opacity .15s;
}
.cm-card:hover .move-to, .cm-card:focus-within .move-to {
  opacity:1;
}
.cm-card.pending {
  opacity:.65;
  border-style:dashed;
}
.card-tag {
  margin-top:7px;
  font-size:10px;
  color:var(--amber);
}
.pending-tag {
  color:var(--muted);
}
.est-badge {
  font-size:10px;
  color:var(--amber);
  border-color:var(--amber);
  white-space:nowrap;
}
.clock {
  font-size:11px;
  font-weight:600;
  white-space:nowrap;
}
.clock-late {
  color:var(--red);
}
.clock-good {
  color:var(--green);
}
.clock-unknown {
  color:var(--muted);
}
.phase-none .phase-dot {
  background:var(--muted);
}
.phone-col {
  width:100%;
  margin:6px 0 10px;
}
/* the drawer: right side; "Open full profile" widens it */
.drawer-overlay {
  justify-content:flex-end;
  align-items:stretch;
  padding:0;
}
.profile.drawer {
  width:560px;
  height:100vh;
  border-radius:0;
  border-width:0 0 0 1px;
}
.profile.drawer.expanded {
  width:100%;
}
.profile.drawer .profile-head {
  padding:16px 20px;
}
.profile.drawer .profile-body {
  padding:16px 20px 40px;
}
.profile.drawer #prof-overview .stack {
  display:flex;
  flex-direction:column;
  gap:12px;
}
.profile.drawer:not(.expanded) .full-only, .profile.drawer:not(.expanded) .profile-facts {
  display:none;
}
.profile.drawer.expanded .full-only {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:12px;
}
.next-step select {
  width:100%;
  margin-top:4px;
}
.full-link {
  margin-top:16px;
  width:100%;
}
.needed-panel {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.needed-list h4 {
  margin:0 0 8px;
}
.needed-item {
  display:flex;
  gap:8px;
  align-items:flex-start;
  padding:6px 0;
  border-bottom:1px solid var(--line);
  font-size:13px;
}
.needed-item.done .needed-text {
  text-decoration:line-through;
  color:var(--muted);
}
.needed-meta {
  display:block;
}
.needed-add {
  gap:6px;
  margin-top:8px;
}
.needed-add input {
  flex:1;
  min-width:0;
}
.history-line strong {
  font-weight:600;
}
/* Activity drawer */
.activity-drawer {
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  width:480px;
  max-width:100vw;
  background:var(--bg);
  border-left:1px solid var(--line);
  box-shadow:var(--shadow);
  z-index:30;
  overflow:auto;
  padding:18px 20px 40px;
}
.activity-drawer h2 {
  margin:0;
  font-size:20px;
}
.act-filters {
  gap:8px;
  margin:14px 0;
}
.act-row {
  padding:10px 0;
  border-bottom:1px solid var(--line);
  font-size:13px;
}
.act-row .row {
  gap:8px;
  margin-bottom:3px;
}
.act-pager {
  margin-top:14px;
}
/* the sample preview's switch */
.mock-bar {
  position:fixed;
  left:14px;
  bottom:14px;
  z-index:15;
  display:flex;
  gap:12px;
  align-items:center;
  padding:8px 12px;
  background:var(--raised);
  border:1px dashed var(--amber);
  border-radius:9px;
}
/* tablets and phones */
@media (max-width:1100px) {
  .ov-grid {
    grid-template-columns:1fr;
  }
}
@media (max-width:700px) {
  .main {
    padding:18px 14px 120px;
  }
  .cm-head-actions {
    width:100%;
  }
  .search-wrap.compact {
    width:100%;
  }
  .health-boxes {
    grid-template-columns:repeat(2, 1fr);
  }
  .needed-panel, .profile.drawer.expanded .full-only {
    grid-template-columns:1fr;
  }
  .profile.drawer {
    width:100vw;
  }
  .cm-card .move-to {
    opacity:1;
  }
  .header-status, .workspace-name {
    display:none;
  }
}
/* light mode (per person): every token with its lightness flipped, so dark stays exactly as approved */
[data-theme="light"] {
  --bg:#fbfcfc;
  --surface:#fafafa;
  --raised:#f8f9f8;
  --line:#f4f5f4;
  --text:#2c3529;
  --muted:#545f56;
  --green:#406626;
  --green-ink:#f8fbf8;
  --red:#790606;
  --red-bg:#f8f4f4;
  --amber:#7d5b20;
  --blue:#1b3c6d;
  --detail-0004:#fcfcfc44;
  --detail-0006:#fcfcfc66;
  --detail-0008:#fcfcfc88;
  --detail-060906a8:#fcfdfca8;
  --detail-141815:#fafbfa;
  --detail-142111:#f9fbf9;
  --detail-181d18:#f9faf9;
  --detail-191e1afa:#f9faf9fa;
  --detail-1b211b:#f8faf8;
  --detail-202820:#f7f9f7;
  --detail-232a23:#f7f8f7;
  --detail-242b20:#f7f8f7;
  --detail-243121:#f6f8f5;
  --detail-252f26:#f6f8f6;
  --detail-262d26ee:#f6f7f6ee;
  --detail-263b2b:#f3f7f4;
  --detail-272d27:#f6f7f6;
  --detail-27323e:#f3f5f7;
  --detail-283324:#f6f8f5;
  --detail-293627:#f5f7f4;
  --detail-2f392b:#f4f6f4;
  --detail-302c24:#f8f7f6;
  --detail-303a2e:#f4f6f4;
  --detail-332e23:#f8f7f5;
  --detail-333b33:#f3f5f3;
  --detail-34372e:#f5f6f4;
  --detail-343d32:#f3f5f3;
  --detail-363024:#f8f7f4;
  --detail-39543b:#eef3ef;
  --detail-3a4738:#f1f4f1;
  --detail-414d3e:#f0f2f0;
  --detail-434c40:#f0f2f0;
  --detail-46513f:#f0f2ef;
  --detail-474235:#f4f3f1;
  --detail-495645:#eff1ee;
  --detail-4a5545:#eff1ee;
  --detail-4b5346:#eff1ef;
  --detail-4b543a:#f2f3ee;
  --detail-4b5c43:#eef1ed;
  --detail-4d4330:#f5f3f0;
  --detail-4d584a:#eef0ee;
  --detail-657265:#e8ebe8;
  --detail-678260:#e7ebe5;
  --detail-718365:#e7eae5;
  --detail-74816b:#e7e9e5;
  --detail-beb5db:#3c315d;
  --detail-c4ccc5:#434c44;
  --detail-c5e5af17:#40662617;
  --detail-d0e5c6:#38542a;
  --detail-d1e5c7:#38542a;
  --detail-d7ded5:#394336;
  --detail-d7eec8:#36581f;
  --detail-e4f0dc:#314822;
  --detail-b8c2b8:#495349;
  --detail-bdc8bc:#455144;
  --detail-ffffff0e:#0000000c;
  --detail-ffffff12:#00000014;
  --shadow:0 22px 60px #0002;
  color-scheme:light;
  /* hand-set so surfaces and lines stay distinct, and shadows stay shadows */
  --bg:#f5f7f4;
  --surface:#ffffff;
  --raised:#eaeee8;
  --line:#d3dacf;
  --text:#18201a;
  --muted:#58635a;
  --detail-0004:#0000001a;
  --detail-0006:#00000022;
  --detail-0008:#0000002a;
  --detail-060906a8:#1c241c55;
  --detail-191e1afa:#fffffffa;
  --detail-262d26ee:#ffffffee;
}
/* compact cards: the name button has no padding, and "Move to" takes no room until the card is hovered or focused */
.cm-card .name {
  padding:0;
  min-height:0;
  text-align:left;
  font-size:13px;
}
.cm-card .move-to {
  height:0;
  margin:0;
  padding:0;
  border-width:0;
}
.cm-card:hover .move-to, .cm-card:focus-within .move-to {
  height:auto;
  margin-top:7px;
  padding:5px;
  border-width:1px;
}
.cm-head-actions button {
  display:inline-flex;
  align-items:center;
  gap:6px;
}
#filters:empty {
  display:none;
}
.next-step .stage-select {
  display:block;
  width:100%;
  margin-top:4px;
}
.next-step .drawer-step {
  margin-top:4px;
}
@media (max-width:700px) {
  .cm-card .move-to {
    height:auto;
    margin-top:7px;
    padding:5px;
    border-width:1px;
  }
}
/* "Move to" is visually hidden (still reachable by keyboard) until the card is hovered or focused */
.cm-card {
  position:relative;
}
.cm-card .move-to {
  position:absolute;
  width:1px;
  height:1px;
  min-height:0;
  overflow:hidden;
  opacity:0;
}
.cm-card:hover .move-to, .cm-card:focus-within .move-to {
  position:static;
  width:100%;
  height:auto;
  opacity:1;
}
@media (max-width:700px) {
  .cm-card .move-to {
    position:static;
    width:100%;
    height:auto;
    opacity:1;
  }
  .mock-bar {
    bottom:84px;
    left:8px;
    padding:5px 9px;
  }
}
/* the board's columns are a fixed 212px; on a phone the one column fills the width */
.cm-board .column {
  flex:0 0 212px;
}
.phone-board .column {
  flex:1 1 100%;
  border-right:0;
  padding:0;
  min-height:0;
}

/* ══ RUN 9: visual polish (Reeze 2026-10-19: "too many lines and boxes"; cleaner, apple.com-like) ══
   Fewer borders and dividers, soft cards on a tinted page, subtle shadows, larger radii, a system font stack,
   a quiet type hierarchy, frosted glass for the dock. Behaviour is unchanged. Contrast stays at WCAG AA or better. */
:root {
  --font-body:-apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Inter", Arial, sans-serif;
  --font-display:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Inter", Arial, sans-serif;
  --canvas:#0e100f;
  --card:#181b19;
  --fill:rgba(255, 255, 255, .06);
  --fill-strong:rgba(255, 255, 255, .11);
  --hairline:rgba(255, 255, 255, .07);
  --pill:rgba(255, 255, 255, .07);
  --pill-text:#b9c3bb;
  --late-bg:rgba(255, 120, 120, .14);
  --late-text:#ffb4ab;
  --good-text:#c5e5af;
  --amber-bg:rgba(232, 199, 143, .12);
  --glass:rgba(28, 32, 30, .62);
  --shadow-1:0 1px 2px rgba(0, 0, 0, .35), 0 4px 16px rgba(0, 0, 0, .22);
  --shadow-2:0 6px 24px rgba(0, 0, 0, .38);
  --shadow-drag:0 16px 40px rgba(0, 0, 0, .45);
  --radius-card:14px;
  --radius-panel-lg:18px;
  --ease-soft:cubic-bezier(.2, .8, .2, 1);
}
[data-theme="light"] {
  --canvas:#f5f5f7;
  --card:#ffffff;
  --text:#1d1d1f;
  --muted:#5f6368;
  --fill:rgba(0, 0, 0, .045);
  --fill-strong:rgba(0, 0, 0, .08);
  --hairline:rgba(0, 0, 0, .07);
  --pill:rgba(0, 0, 0, .05);
  --pill-text:#4a4f55;
  --late-bg:#fdecea;
  --late-text:#b3261e;
  --good-text:#1f6b36;
  --amber-bg:#fbf1dc;
  --glass:rgba(255, 255, 255, .72);
  --shadow-1:0 1px 2px rgba(0, 0, 0, .04), 0 2px 12px rgba(0, 0, 0, .05);
  --shadow-2:0 6px 24px rgba(0, 0, 0, .09);
  --shadow-drag:0 18px 44px rgba(0, 0, 0, .16);
}
body {
  background:var(--canvas);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
h1, h2, h3, .cm-title h1 {
  font-family:var(--font-display);
  letter-spacing:-.02em;
}
.cm-title h1 {
  font-weight:600;
}
/* controls: no outlines, a soft fill instead */
button, input, select, textarea {
  border-color:transparent;
  background:var(--fill);
}
button:hover {
  background:var(--fill-strong);
  border-color:transparent;
}
.primary, .primary:hover {
  border-color:transparent;
}
.icon-btn, .ghost {
  background:transparent;
}
.icon-btn:hover, .ghost:hover {
  background:var(--fill);
}
/* the top bar and the header: no rules, just space */
.topbar {
  border-bottom-color:var(--hairline);
  background:var(--glass);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
}
.workspace-tabs {
  border-bottom:0;
}
.tab {
  border-radius:999px;
  padding:7px 14px;
  min-height:34px;
}
.tab.active {
  background:var(--fill-strong);
}
.count {
  background:transparent;
  border:0;
  padding:0;
  margin-left:6px;
  color:var(--muted);
  font-weight:500;
}
.preview-label, .cm-title .preview-label {
  border:0;
  background:var(--fill);
}
.search-wrap, .search-wrap.compact, .segmented {
  border:0;
  background:var(--fill);
  box-shadow:none;
}
.segmented button.active {
  background:var(--card);
  box-shadow:var(--shadow-1);
}
.filter {
  border:0;
  background:transparent;
}
.filter.active {
  background:var(--fill-strong);
  color:var(--text);
}
.filter-select {
  border:0;
  background-color:var(--fill);
  border-radius:999px;
  padding:7px 12px;
}
/* panels, tiles and tables: soft cards, no outlines */
.panel, .health-box, .key-facts {
  border:0;
  background:var(--card);
  border-radius:var(--radius-panel-lg);
  box-shadow:var(--shadow-1);
}
.next-step {
  border:0;
}
.kpis, .kpis.kpis-4 {
  border:0;
  background:transparent;
  gap:12px;
}
.kpi, .ov-tiles .kpi {
  border:0;
  background:var(--card);
  border-radius:var(--radius-panel-lg);
  box-shadow:var(--shadow-1);
  transition:transform .2s var(--ease-soft), box-shadow .2s var(--ease-soft);
}
.kpi:hover {
  background:var(--card);
  transform:translateY(-1px);
  box-shadow:var(--shadow-2);
}
.table-wrap {
  border:0;
  background:var(--card);
  border-radius:var(--radius-panel-lg);
  box-shadow:var(--shadow-1);
}
.client-table th, .client-table td {
  border-color:var(--hairline);
}
.client-table th {
  background:transparent;
  font-weight:500;
}
.client-table tbody tr {
  transition:background .15s;
}
.client-table tbody tr:hover {
  background:var(--fill);
}
.dist-bar {
  background:var(--fill);
}
.badge {
  border:0;
  background:var(--pill);
  color:var(--pill-text);
  border-radius:999px;
}
.design-note {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:12px 2px;
}
.empty-note {
  color:var(--muted);
  border:0;
}
/* ── the kanban: plain column headers, no column outlines, soft cards ── */
.board, .cm-board, .happy-board {
  gap:18px;
  padding:4px 4px 18px;
}
.column, .cm-board .column, .phone-board .column, .cm-column {
  border:0;
  background:transparent;
  border-radius:0;
  padding:0 2px;
  min-height:0;
}
.column-head {
  border:0;
  padding:4px 4px 10px;
  font-size:13px;
  font-weight:600;
  gap:6px;
}
.column-head .phase-dot {
  width:7px;
  height:7px;
}
.column-head .count {
  font-weight:500;
}
.column-head .col-add {
  opacity:0;
  transition:opacity .18s;
  background:transparent;
}
.column:hover .col-add, .column:focus-within .col-add, .column-head .col-add:focus-visible {
  opacity:1;
}
@media (hover:none) {
  .column-head .col-add {
    opacity:1;
  }
}
.card, .cm-card {
  border:0;
  background:var(--card);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-1);
  padding:14px 14px 12px;
  margin-top:10px;
  cursor:grab;
  transition:transform .2s var(--ease-soft), box-shadow .2s var(--ease-soft), opacity .2s;
}
.card:hover, .cm-card:hover {
  border-color:transparent;
  transform:translateY(-2px);
  box-shadow:var(--shadow-2);
}
.cm-card.dragging {
  cursor:grabbing;
  opacity:.92;
  transform:scale(1.02) rotate(.6deg);
  box-shadow:var(--shadow-drag);
}
.cm-card.pending {
  border:0;
  opacity:.6;
}
.column.drag-over {
  background:var(--fill);
  border-radius:var(--radius-card);
}
.cm-card .name {
  font-size:14px;
  font-weight:500;
  letter-spacing:-.005em;
}
.cm-card .company {
  margin-top:2px;
  font-size:12.5px;
  color:var(--muted);
}
.cm-card .card-bottom {
  margin-top:12px;
}
/* Day X of 14: a small, quiet pill; red only when overdue */
.clock {
  display:inline-block;
  font-size:11px;
  font-weight:500;
  line-height:1;
  padding:5px 9px;
  border-radius:999px;
  background:var(--pill);
  color:var(--pill-text);
}
.clock-late {
  background:var(--late-bg);
  color:var(--late-text);
}
.clock-good {
  color:var(--good-text);
}
.clock-unknown {
  color:var(--muted);
}
.notes-count {
  color:var(--muted);
  font-size:12px;
  gap:4px;
}
.notes-count .icon {
  width:15px;
  height:15px;
}
.notes-count.is-empty {
  display:none;
}
.est-badge, .badge.est-badge {
  border:0;
  background:var(--amber-bg);
  color:var(--amber);
}
[data-theme="light"] .est-badge, [data-theme="light"] .badge.est-badge {
  color:#7a5410;
}
.card-tag {
  color:var(--muted);
}
.cm-card .move-to, .card select {
  border:0;
  background:var(--fill);
  border-radius:10px;
}
.happy-dot {
  border-color:var(--fill-strong);
}
/* the drawers: shadow, not a rule */
.profile.drawer, .activity-drawer {
  border:0;
  box-shadow:-12px 0 40px rgba(0, 0, 0, .18);
  background:var(--canvas);
}
.profile-head {
  border-bottom-color:var(--hairline);
  background:var(--glass);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
}
.needed-item, .act-row {
  border-bottom-color:var(--hairline);
}
/* the dock: frosted glass, one visual weight */
.dock {
  border:0;
  background:var(--glass);
  backdrop-filter:saturate(180%) blur(22px);
  -webkit-backdrop-filter:saturate(180%) blur(22px);
  box-shadow:0 8px 30px rgba(0, 0, 0, .12), inset 0 0 0 .5px var(--hairline);
  border-radius:20px;
  padding:6px;
}
.dock button {
  border:0;
  background:transparent;
  color:var(--muted);
}
.dock button:hover {
  background:var(--fill);
  color:var(--text);
}
.dock button.active {
  background:var(--fill-strong);
  color:var(--text);
}
.dock-divider {
  background:var(--hairline);
}
/* Ask FOS: still there, quieter */
.ai-launch, .primary.ai-launch {
  background:var(--glass);
  color:var(--text);
  font-weight:500;
  font-size:13px;
  min-height:38px;
  padding:8px 14px;
  border:0;
  backdrop-filter:saturate(180%) blur(22px);
  -webkit-backdrop-filter:saturate(180%) blur(22px);
  box-shadow:0 8px 30px rgba(0, 0, 0, .12), inset 0 0 0 .5px var(--hairline);
}
.ai-launch .icon {
  color:var(--green);
}
[data-theme="light"] .ai-launch .icon {
  color:var(--good-text);
}
.ai-launch:hover {
  background:var(--glass);
  transform:translateY(-1px);
}
.mock-bar {
  border:0;
  background:var(--glass);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  box-shadow:inset 0 0 0 1px var(--amber-bg), 0 6px 20px rgba(0, 0, 0, .12);
  border-radius:12px;
}
@media (prefers-reduced-motion:reduce) {
  .card, .cm-card, .kpi, .ai-launch {
    transition:none;
  }
  .card:hover, .cm-card:hover, .cm-card.dragging, .kpi:hover, .ai-launch:hover {
    transform:none;
  }
}
/* the sticky column header takes the page colour, so it reads cleanly while scrolling but shows no strip */
.column-head, .cm-board .column-head, .happy-board .column-head {
  background:var(--canvas);
  border-bottom:0;
}
/* a table inside a panel is flat (no card in a card) */
.panel .table-wrap {
  background:transparent;
  box-shadow:none;
  border-radius:0;
}
.panel .health-box {
  box-shadow:none;
  background:var(--fill);
}
/* ── run 9, review fixes (Codex, 2026-10-19) ── */
/* V9: filter counts and the search placeholder meet 4.5:1 in both themes */
.filter-count {
  opacity:1;
  color:var(--muted);
}
#search::placeholder {
  color:var(--muted);
  opacity:1;
}
/* V12: on phones the four Overview tiles sit two by two, and their labels may wrap */
@media (max-width:700px) {
  .ov-tiles.kpis.kpis-4 {
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .ov-tiles .kpi-label {
    white-space:normal;
  }
}
/* Q: Live to Happy milestone dots: unknown, skipped and waiting outlines stay visible (3:1 or better) */
:root {
  --dot-line:#6f7a72;
}
[data-theme="light"] {
  --dot-line:#8b9096;
}
.happy-dot, .happy-dot.needs, .happy-dot.skip {
  border-color:var(--dot-line);
}
.happy-dot.skip {
  opacity:1;
  border-style:dashed;
}

/* ══ RUN 10: polish (Reeze 2026-10-19: "it's messy") ══
   (a) every count shows once per view; (b) a client opens in ONE step: the drawer is wider and holds everything,
   flat (no "Open full profile", no collapsed groups). Apple-style taste: light by default, soft cards, generous space,
   few lines and boxes, red ONLY for overdue (amber for "needs attention" and to-dos), icons only on hover or when
   needed, the frosted dock. */
:root {
  --h-happy:#9ccc84;
  --h-neutral:#7f8a82;
  --h-attention:#e3ad55;
  --h-unrated:rgba(255, 255, 255, .14);
  --warn-text:#e8c78f;
}
[data-theme="light"] {
  --h-happy:#5e9a4a;
  --h-neutral:#a7aeaa;
  --h-attention:#e0a336;
  --h-unrated:#e2e4e7;
  --warn-text:#8a5a00;
}
/* red is only for what is past a deadline */
.late, td.late, .pct-bad, .days-over, .clock-late {
  color:var(--late-text);
}
.days-over {
  background:var(--late-bg);
}
.warn {
  color:var(--warn-text);
}
.badge.warn {
  background:var(--amber-bg);
  color:var(--warn-text);
}
.badge.red {
  background:var(--red-bg);
  color:var(--red);
}
.health-select.warn {
  color:var(--warn-text);
}
.kpi.alert .kpi-value {
  color:inherit;
}
.tab.map-tab, .tab.map-tab.active {
  color:var(--muted);
  background:transparent;
}
.tab.map-tab.active {
  color:var(--text);
  background:var(--fill-strong);
}
.form-error {
  color:var(--warn-text);
}
.req {
  color:var(--muted);
  font-weight:400;
  font-size:12px;
}
.count:empty {
  display:none;
}
/* the header: title, when the data was read; space instead of rules */
.main {
  padding-top:34px;
}
.cm-head {
  margin:0 0 22px;
  align-items:flex-end;
}
.cm-title h1 {
  font-size:32px;
  letter-spacing:-.03em;
}
.cm-subtitle {
  margin:6px 0 0;
  font-size:13px;
}
.cm-head-actions {
  gap:10px;
}
.workspace-tabs {
  margin-bottom:24px;
  padding-bottom:0;
}
/* Overview */
.ov-tiles {
  margin-bottom:18px;
}
.ov-grid {
  gap:18px;
  margin-bottom:18px;
}
.ov-attention .section-title, .panel .section-title {
  margin-bottom:12px;
}
.see-all, .link-btn.see-all {
  font-size:13px;
  text-decoration:none;
  color:var(--good-text);
  min-height:30px;
}
/* the health split: one bar, one legend */
.dist-bar {
  height:10px;
  border-radius:6px;
  gap:2px;
  background:transparent;
  margin:4px 0 14px;
}
.dist-bar span:first-child {
  border-radius:6px 0 0 6px;
}
.dist-bar span:last-child {
  border-radius:0 6px 6px 0;
}
.health-legend {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2px 14px;
}
.health-split .health-legend {
  grid-template-columns:repeat(4, minmax(0, 1fr));
}
.legend-row {
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:38px;
  padding:6px 10px;
  border-radius:10px;
  text-align:left;
  font-size:13px;
}
.legend-dot {
  width:9px;
  height:9px;
  border-radius:50%;
  flex-shrink:0;
}
.legend-value {
  font-weight:600;
  font-variant-numeric:tabular-nums;
}
/* tables: no avatars, quiet reasons, the Stage picker reads as text until the row is hovered */
.client-table.attention-table {
  min-width:780px;
}
.client-table .client-cell .name {
  padding:0;
  min-height:0;
  text-align:left;
  font-size:13px;
  font-weight:550;
}
.client-table td.num, .attention-table td.num {
  font-variant-numeric:tabular-nums;
}
.client-table strong.who {
  font-weight:600;
}
.why-cell .why {
  display:block;
  white-space:nowrap;
  line-height:1.6;
}
.client-table .life-select {
  -webkit-appearance:none;
  appearance:none;
  background:transparent;
  border:0;
  padding:5px 22px 5px 0;
  font-size:12px;
  background-repeat:no-repeat;
  background-position:right 6px center;
  background-size:10px;
}
.client-table tr:hover .life-select, .client-table .life-select:focus-visible {
  background-color:var(--fill);
  padding-left:8px;
  border-radius:8px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.4'/%3E%3C/svg%3E");
}
/* the drawer: one step, one scroll */
.profile.drawer {
  width:680px;
  max-width:100vw;
}
.profile.drawer .profile-head {
  padding:18px 28px 14px;
}
.profile.drawer .profile-body {
  padding:4px 28px 120px;
}
.profile-head h2 {
  font-size:22px;
  font-weight:600;
}
.profile-head .company {
  font-size:13px;
}
.profile-summary {
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px 0 20px;
}
.profile-summary .profile-badges, .profile-summary .profile-actions {
  margin-top:0;
}
.profile-summary .profile-actions {
  gap:6px 20px;
}
.profile-actions .contact-chip {
  border:0;
  padding:0;
  min-height:28px;
  font-size:13px;
  display:inline-flex;
  align-items:center;
  gap:2px;
  color:var(--text);
}
.contact-chip .copy {
  opacity:0;
  transition:opacity .15s;
  width:26px;
  min-height:26px;
}
.contact-chip:hover .copy, .contact-chip:focus-within .copy {
  opacity:1;
}
@media (hover:none) {
  .contact-chip .copy {
    opacity:.75;
  }
}
.profile-actions .ghl-link {
  font-size:13px;
  text-decoration:none;
  color:var(--good-text);
  min-height:28px;
  background:transparent;
}
.profile.drawer .profile-section {
  margin-top:30px;
}
.profile.drawer .section-title {
  margin:0 0 10px;
  font-size:15px;
}
.section-head {
  align-items:baseline;
}
.profile.drawer #prof-overview .stack {
  gap:14px;
}
.next-step, .next-step.panel {
  background:var(--card);
}
.next-label {
  margin-top:16px;
  font-size:12px;
  color:var(--muted);
}
.next-step h3 {
  margin:2px 0 6px;
  font-size:17px;
  font-weight:600;
  letter-spacing:-.01em;
}
.est-line {
  margin-top:8px;
}
.facts-cols {
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:28px;
  row-gap:2px;
}
.facts-cols .kf-more {
  display:contents;
}
.facts-cols .detail-line, .about-group .detail-line {
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:1px;
  padding:7px 0;
  min-height:0;
}
.facts-cols .detail-line > span:first-child, .about-group .detail-line > span:first-child {
  font-size:12px;
}
.facts-cols .detail-value, .about-group .detail-value {
  font-size:14px;
}
.facts-cols .call-summary-text {
  grid-column:1 / -1;
}
.about-group + .about-group {
  margin-top:16px;
}
.about-group h4, .needed-list h4 {
  margin:0 0 4px;
  font-size:12px;
  font-weight:500;
  color:var(--muted);
}
.about-group {
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:28px;
}
.about-group h4 {
  grid-column:1 / -1;
}
.needed-panel {
  gap:20px;
}
.needed-list h4 {
  margin-bottom:6px;
}
.composer {
  border:0;
  background:var(--card);
  box-shadow:var(--shadow-1);
  border-radius:var(--radius-panel-lg);
  padding:12px 14px;
}
.composer textarea {
  min-height:44px;
}
.composer-foot {
  justify-content:flex-end;
}
.notes-section .timeline {
  padding-top:14px;
}
.timeline-bullet {
  border:0;
  background:var(--fill);
}
.record-ids {
  margin-top:30px;
}
/* phones: a compact header (one row of actions, tabs that scroll), and a full-width drawer */
@media (max-width:700px) {
  .main {
    padding-top:20px;
  }
  .cm-title h1 {
    font-size:26px;
  }
  .cm-head-actions {
    display:grid;
    grid-template-columns:auto 1fr 1fr;
    gap:8px;
  }
  .cm-head-actions .search-wrap {
    grid-column:1 / -1;
  }
  .cm-head-actions > button, .cm-head-actions > .cm-more > button {
    min-height:38px;
    padding:7px 10px;
    justify-content:center;
  }
  .cm-head-actions > .cm-more > button {
    width:100%;
  }
  .workspace-tabs {
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:2px;
    margin-bottom:18px;
  }
  .workspace-tabs .cm-tabs {
    overflow:visible;
  }
  .workspace-tabs .tab {
    flex-shrink:0;
    padding:7px 12px;
  }
  .health-split .health-legend {
    grid-template-columns:1fr 1fr;
  }
  .profile.drawer {
    width:100vw;
  }
  .profile.drawer .profile-head {
    padding:14px 16px 10px;
  }
  .profile.drawer .profile-body {
    padding:4px 16px 120px;
  }
  .facts-cols, .about-group, .needed-panel {
    grid-template-columns:1fr;
  }
}
/* run 10, after the first screenshots: space between stacked panels, a compact health legend, the filter selects
   wrap as one group, and on phones the attention lists read as short rows (no sideways scroll) */
#view-content > section.panel + section.panel, #view-content > .ov-grid + section.panel {
  margin-top:18px;
}
.health-split .health-legend {
  display:flex;
  flex-wrap:wrap;
  gap:2px 26px;
}
.health-split .legend-row {
  width:auto;
}
.health-split .legend-row .grow {
  flex:0 1 auto;
}
.filter-selects {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}
.client-table td.due-cell {
  white-space:nowrap;
}
.attention-table .next-cell {
  color:var(--muted);
}
@media (max-width:700px) {
  .map-tab {
    display:none;
  }
  .ov-grid .detail-line {
    flex-direction:column;
    align-items:flex-start;
    gap:1px;
    padding:6px 0;
  }
  .client-table.attention-table {
    min-width:0;
  }
  .attention-table, .attention-table tbody, .attention-table tr, .attention-table td {
    display:block;
  }
  .attention-table thead {
    display:none;
  }
  .attention-table tr {
    padding:12px 2px;
    border-top:1px solid var(--hairline);
  }
  .attention-table tr:first-child {
    border-top:0;
  }
  .attention-table td {
    border:0;
    padding:0;
  }
  .attention-table .step-cell {
    margin-top:4px;
    font-size:12px;
    color:var(--muted);
  }
  .attention-table .next-cell {
    margin-top:2px;
    font-size:12px;
  }
  .attention-table td.num {
    font-size:12px;
    color:var(--muted);
  }
  .attention-table td.num::before {
    content:"Days in step: ";
  }
  .attention-table .why-cell {
    margin-top:4px;
  }
  .attention-table .why-cell .why {
    white-space:normal;
  }
  .attention-table td.due-cell::before {
    content:"Due ";
    color:var(--muted);
  }
  .filter-selects {
    justify-content:flex-start;
  }
}
/* phones: the step picker already names the step and its count, so the one column's head keeps only its "+" */
.phone-board .column-head > .phase-dot, .phone-board .column-head > .grow, .phone-board .column-head > .count,
.phone-board .column-head > .small {
  display:none;
}
.phone-board .column-head {
  justify-content:flex-end;
  padding-bottom:0;
}
/* run 10, round 2: a fact row with nothing to show after launch stays out of the way; tablets keep the reasons readable */
.facts-cols .detail-line.is-empty {
  display:none;
}
.key-call {
  border-bottom:1px solid var(--hairline);
  padding-bottom:8px;
  margin-bottom:4px;
}
@media (min-width:701px) and (max-width:1100px) {
  .client-table.attention-table {
    min-width:640px;
  }
  .why-cell .why {
    white-space:normal;
  }
}
/* phones: the stacked attention rows sit tight (the compact table's cell padding is for the desktop table) */
@media (max-width:700px) {
  .client-table.compact.attention-table td {
    padding:0;
    text-align:left;
  }
  .client-table.compact.attention-table tr {
    padding:12px 2px;
  }
}

/* Targeting dialog (TeamOS 0921, plan 121): asset minimum and target area */
.target-val { display:block; min-width:0; }
.target-line { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; }
.target-line > span { overflow-wrap:anywhere; }
.target-edit { flex:none; padding:0 6px; min-height:24px; font-size:12px; white-space:nowrap; }
.target-picks { gap:6px; margin:8px 0 4px; }
.target-mode { flex-wrap:wrap; margin:6px 0 10px; }
.target-mode label { display:flex; flex:none; align-items:center; gap:6px; padding:5px 10px; font-size:12px; color:var(--muted); cursor:pointer; white-space:nowrap; }
.target-mode label:has(input:checked) { background:var(--detail-343d32); color:var(--text); border-radius:6px; }
#target-search { width:100%; margin-bottom:8px; }
.target-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(64px, 1fr)); gap:4px 8px; max-height:260px; overflow:auto; padding:2px; }
.target-grid.disabled { opacity:.45; pointer-events:none; }
.target-state { display:flex; align-items:center; gap:5px; font-size:12px; white-space:nowrap; cursor:pointer; }
.target-state[hidden] { display:none; }
@media (max-width:600px) { .target-grid { grid-template-columns:repeat(auto-fill, minmax(56px, 1fr)); max-height:200px; } }

/* Delivery type change dialog (TeamOS 0923, plan 121b) */
.dtype-targets, .dtype-when { display:flex; flex-direction:column; gap:6px; margin:8px 0; }
.dtype-targets label, .dtype-when label { display:flex; align-items:baseline; gap:8px; font-size:13px; cursor:pointer; }
#dtype-date { max-width:200px; }
body.preview #profile.cm-folded-profile .profile-body { padding-bottom:28px; }
body.preview #profile.cm-folded-profile .cm-drawer-status { display:grid; gap:8px; padding:4px 0 2px; }
body.preview #profile.cm-folded-profile .cm-drawer-status .section-title { margin:0; }
body.preview #profile.cm-folded-profile .cm-client-details { display:block; padding:0; margin:0; }
/* a folded section's title is already its fold's summary: show it once (v51 1 Nov, "Delivery" twice) */
body.preview #profile.cm-folded-profile .cm-profile-fold .cm-fold-title { display:none; }
/* a count beside a note stays on one line on a phone ("24", never "2" over "4") */
.delivery-box .delivery-num { white-space:nowrap; flex-shrink:0; }
body.preview #profile.cm-folded-profile .cm-client-details > summary,
body.preview #profile.cm-folded-profile .cm-profile-fold > summary,
body.preview #profile.cm-folded-profile .cm-health-detail > summary { cursor:pointer; padding:12px 0; font-size:14px; font-weight:550; }
body.preview #profile.cm-folded-profile summary:focus-visible { outline:2px solid var(--text); outline-offset:3px; }
body.preview #profile.cm-folded-profile .cm-profile-fold { border-top:1px solid var(--line); }
body.preview #profile.cm-folded-profile .cm-profile-fold > .profile-section { margin-top:4px; }
body.preview #profile.cm-folded-profile .cm-profile-edit { display:grid; gap:12px; padding:4px 0 12px; }
body.preview #profile.cm-folded-profile .profile-actions { margin:0; }
body.preview #profile.cm-folded-profile .fos-sub { display:none; }
body.preview #profile.cm-folded-profile .hv-section { margin-top:0; }
body.preview #profile.cm-folded-profile .cm-health-detail { margin-top:8px; }

/* Primary client facts stay compact and readable on touch screens. */
body.preview #profile.cm-folded-profile .cm-top-facts { display:grid; gap:5px; margin:0; }
body.preview #profile.cm-folded-profile .cm-top-facts > div { display:grid; grid-template-columns:100px minmax(0,1fr); gap:8px; }
body.preview #profile.cm-folded-profile .cm-top-facts dt { color:var(--muted); }
body.preview #profile.cm-folded-profile .cm-top-facts dd { margin:0; overflow-wrap:anywhere; }
body.preview #profile.cm-folded-profile .cm-ghl-details { flex-basis:100%; overflow-wrap:anywhere; }
body.preview #profile.cm-folded-profile .cm-ghl-details > summary { cursor:pointer; }

body.preview #profile.cm-folded-profile .next-step .next-label { display:block; margin:0 0 5px; }

/* Plan 126 R2: Prospects uses the profile's section, fact and detail primitives. */
#cm-prospects { min-width: 0; }
.prospect-filters { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin:16px 0; }
.prospect-filters label { display:grid; gap:4px; flex:1 1 140px; min-width:0; }
.prospect-filters input,.prospect-filters select { width:100%; min-width:0; box-sizing:border-box; }
.prospect-totals { gap:12px; }
.prospect-metric { padding:4px 0; }
.prospect-scope { white-space:normal; max-width:100%; box-sizing:border-box; }
.prospect-row { padding:14px 0; border-bottom:1px solid var(--border); overflow-wrap:anywhere; }
.prospect-name { padding:0; font-weight:600; text-align:left; margin-bottom:6px; }
.prospect-bucket,.prospect-batches { padding:10px 0; border-bottom:1px solid var(--border); }
.prospect-bucket summary,.prospect-batches summary { cursor:pointer; }
.prospect-pager { margin-top:14px; gap:12px; }
#prospect-detail { margin-top:20px; overflow-wrap:anywhere; }
#prospect-detail:empty { display:none; }
@media(max-width:600px) { .prospect-filters label { flex-basis:42%; } .prospect-totals { gap:8px 12px; } }

.profile-section:has(#cm-prospects),#prospect-detail { scroll-margin-top:110px; }

/* Onboarding panel design pass (slop list): the status is plain colored text, not a pill; facts are parted by spacing,
   not dot dividers; the Evidence and roadmap folds are a quiet two-column list with no indent and no lines. */
#onboarding-tracking h3 { font-weight:600; }
#onboarding-tracking h3 .badge { background:none; padding:0; border-radius:0; font-size:inherit; font-weight:600; color:var(--text); margin-left:8px; }
#onboarding-tracking h3 .badge.red { color:var(--red); }
#onboarding-tracking .ot-gap { display:inline-block; width:14px; }
#onboarding-tracking details { margin-top:6px; }
#onboarding-tracking summary { cursor:pointer; }
#onboarding-tracking dl { display:grid; grid-template-columns:minmax(0, 9em) minmax(0, 1fr); gap:8px 16px; margin:8px 0 12px; }
#onboarding-tracking dt { color:var(--muted); }
#onboarding-tracking dd { margin:0; min-width:0; overflow-wrap:anywhere; }
@media(max-width:600px) {
  #onboarding-tracking dl { grid-template-columns:minmax(0, 1fr); gap:0; }
  #onboarding-tracking dd { margin-bottom:10px; }
}
/* BRIEF-LINKS274RESCOPE (#274 R1/R2 F4): in the profile Links section a value is one unit that wraps as text, and a
   link never splits from its mark, nor a recording label from its recorder count, at 390 px */
#prof-links .cm-link-unit { display:block; min-width:0; text-align:right; }
#prof-links .cm-nowrap { white-space:nowrap; }
#prof-links .cm-link-why { display:block; }

/* Reserved space for the bottom pill dock (Mik 1 Nov 11:03: the bar never covers rows). The dock sits 18px up and is
   about 57px tall; every scroll area ends above it, list and board, desktop and phone. */
:root { --dock-reserve: 96px; }
body { padding-bottom: var(--dock-reserve); }
/* a floor keeps short screens (a phone on its side) usable: the area stays tall enough and the page scrolls instead (Astra R6) */
.table-wrap { max-height: max(240px, calc(100vh - 220px - var(--dock-reserve))); }
.board { max-height: min(640px, max(320px, calc(100vh - 220px - var(--dock-reserve)))); padding-bottom: 18px; margin-bottom: var(--dock-reserve); }
/* the sticky header row keeps the table's own card color, so scrolled rows never show through it */
.client-table th { background: var(--card); }
/* + New client (FOS-ONEVER-U1; short form FOS-W7-NEWCLIENT-SHORT-R2): four fields in the dialog. Existing tokens
   only; no inner boxes. Phones reach it as the first item in More, so the header button is not drawn there. */
.dialog .cm-nc input {
  display:block;
  width:100%;
  margin-top:7px;
}
.dialog .cm-nc label {
  display:block;
  margin-top:16px;
}
.dialog .cm-nc-hint {
  margin:6px 0 0;
  line-height:1.5;
}
.cm-nc-dup {
  margin-top:18px;
}
.cm-nc-dup .row {
  gap:8px;
  margin-top:10px;
}
@media (max-width:700px) {
  #new-client-btn {
    display:none !important;
  }
}
