/* Ask David: business work first, with one persistent conversation alongside it. */
@font-face {
  font-family: Inter;
  src: url('./fonts/Inter-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
.atlas-app[data-embed='david'] .dw {
  color-scheme: dark;
  --text: #e6ecf5;
  --ink: #0b111c;
  --surface: #121a28;
  --line: #1f2a3d;
  --muted: #93a1b5;
  --cyan: #7fd6ee;
  --gold: #d4a64a;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #0b111c;
  color: #e6ecf5;
  font:
    14px/1.45 Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
.dw *,
.dw *::before,
.dw *::after {
  box-sizing: border-box;
}
.dw [hidden] {
  display: none !important;
}
.dw button,
.dw input,
.dw select {
  font: inherit;
}
.dw a {
  color: #7fd6ee;
}
.dw :focus-visible {
  outline: 2px solid #7fd6ee;
  outline-offset: 3px;
}
.dw button:disabled,
.dw input:disabled {
  opacity: 0.55;
  cursor: default;
}
.dw h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #f4f7fb;
}
.dw-left {
  min-width: 0;
  overflow: auto;
  padding: 28px 32px 40px;
}
.dw-heading,
.dw-chat-heading,
.dw-section-heading,
.dw-widget > header,
.dw-room-nav,
.dw-todo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dw-heading {
  align-items: flex-end;
  gap: 16px;
  position: relative;
}
.dw-heading h1 {
  margin: 4px 0;
  font-size: 28px;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.dw-eyebrow {
  padding: 0;
  white-space: normal;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d4a64a;
}
.dw-attention {
  margin: 4px 0 0;
  color: #93a1b5;
}
.dw-status {
  color: #93a1b5;
  font-size: 13px;
}
.dw-status:empty {
  display: none;
}
.dw-home {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}
.dw-settings {
  flex-shrink: 0;
  font-size: 13px;
}
.dw-settings summary {
  list-style: none;
  cursor: pointer;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid #2a3650;
  border-radius: 10px;
  background: #131b2a;
  color: #c9d3e2;
}
.dw-settings summary::-webkit-details-marker {
  display: none;
}
.dw-settings[open] {
  position: relative;
  z-index: 5;
  right: 0;
  top: 0;
  width: min(320px, 100%);
  max-height: 280px;
  overflow: auto;
  background: #121a28;
  padding: 12px;
  border: 1px solid #2a3650;
  border-radius: 12px;
  box-shadow: 0 20px 60px #0008;
}
.dw-settings label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}
.dw-settings input {
  width: 18px;
  height: 18px;
  accent-color: #d4a64a;
}
.dw-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dw-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid #1f2a3d;
  border-radius: 14px;
  background: #121a28;
  text-decoration: none;
}
.dw-stat > span {
  color: #93a1b5;
  font-size: 12px;
}
.dw-stat strong {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e6ecf5;
}
.dw-stat small {
  color: #93a1b5;
  font-size: 12px;
}
.dw .overdue,
.dw .dw-due.overdue {
  color: #f28b6b;
}
.dw .today,
.dw .dw-due.today {
  color: #e7c47a;
}
.dw .cyan {
  color: #7fd6ee;
}
.dw .later {
  color: #93a1b5;
}
.dw-card,
.dw-widget {
  min-width: 0;
  border: 1px solid #1f2a3d;
  border-radius: 16px;
  padding: 18px 20px;
  background: #121a28;
}
.dw-widget {
  overflow: auto;
}
.dw-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.dw-widgets > .dw-widget[data-size='M'] {
  grid-column: span 2;
}
.dw-widgets > .dw-widget[data-size='L'] {
  grid-column: 1 / -1;
}
.dw-lower > .dw-widget[data-size='S'] {
  max-width: 70%;
}
.dw-lower > .dw-widget[data-size='M'] {
  max-width: 85%;
}
.dw-widget > header:empty {
  display: none;
}
.dw-widget > header {
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dw-widget .room-card {
  margin: 0;
  background: transparent;
}
.dw-widget[data-widget='widget-todo'] {
  padding: 0;
  overflow: hidden;
}
.dw-widget[data-widget='widget-todo'] > header:not(:empty) {
  padding: 12px 20px 0;
}
.dw-lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.dw-decision {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #1f2a3d;
  border-radius: 12px;
  background: #0d1420;
}
.dw-decision-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.dw-decision-title strong {
  font-weight: 600;
}
.dw-decision-title .dw-business-chip {
  font-size: 11px;
}
.dw-decision p {
  color: #93a1b5;
  font-size: 13px;
}
.dw-decision-actions {
  display: flex;
  gap: 8px;
}
.dw-decision-actions .dw-primary {
  min-height: 36px;
}
.dw-decisions-all {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-right: 12px;
}
.dw-request-details {
  margin: 10px 0;
  color: #93a1b5;
  font-size: 12px;
}
.dw-request-details dd {
  margin: 0 0 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #e6ecf5;
}
.dw-request-details dt {
  font-weight: 600;
}
.dw-decision-actions a.dw-primary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.client-cost-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.client-cost-header input {
  min-height: 36px;
  max-width: 160px;
  border: 1px solid #2a3650;
  border-radius: 8px;
  background: #0d1420;
  color: #e6ecf5;
  padding: 0 8px;
  color-scheme: dark;
}
.client-cost-table table {
  border-collapse: collapse;
  width: 100%;
  min-width: 570px;
  font-size: 13px;
}
.client-cost-table th,
.client-cost-table td {
  padding: 10px 8px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid #1f2a3d;
  font-variant-numeric: tabular-nums;
}
.client-cost-table th:first-child {
  text-align: left;
  white-space: normal;
  min-width: 110px;
}
.client-cost-table thead,
.client-cost-crm,
.client-cost-methodology {
  color: #93a1b5;
}
.client-cost-crm {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.client-cost-value {
  cursor: help;
}
.client-cost-methodology {
  margin: 12px 0;
  font-size: 12px;
}
.client-cost-roster {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #1f2a3d;
  border-radius: 8px;
}
.dw-request-details > summary,
.dw-widget:has(.client-cost-header) details > summary {
  min-height: 36px;
  line-height: 36px;
  cursor: pointer;
}
.dw-widget:has(.client-cost-header) > header {
  flex-wrap: wrap;
  gap: 12px;
}
.dw-note,
.dw-date-hint {
  color: #93a1b5;
  font-size: 12px;
  line-height: 1.5;
}
.dw-note:empty {
  display: none;
}
.dw-todos > .dw-note,
.dw-engineering {
  margin: 0 20px 10px;
}
.dw-todo-heading {
  flex-wrap: wrap;
  padding: 18px 20px 12px;
}
.dw-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #0d1420;
  border: 1px solid #1f2a3d;
  border-radius: 10px;
}
.dw-tabs button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #93a1b5;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.dw-tabs button[aria-selected='true'] {
  background: #1e2a3f;
  color: #f4f7fb;
}
.dw-add {
  display: flex;
  gap: 8px;
  padding: 0 20px;
}
.dw-add input,
.dw-room-search input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #2a3650;
  border-radius: 10px;
  background: #0d1420;
  color: #e6ecf5;
}
.dw-add input {
  flex: 1;
  width: 100%;
}
.dw .dw-primary {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #d4a64a;
  color: #1a1406;
  font-weight: 600 !important;
  cursor: pointer;
}
.dw-date-hint {
  margin: 8px 20px 12px;
}
.dw-engineering {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 12px;
  color: #93a1b5;
}
.dw-engineering input {
  width: 18px;
  height: 18px;
  accent-color: #d4a64a;
}
.dw-todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #1f2a3d;
}
.dw-todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #18212f;
}
.dw-check {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 44px;
}
.dw-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #5fd39a;
  cursor: pointer;
}
.dw-todo-copy {
  flex: 1;
  min-width: 0;
}
.dw-todo-copy > strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.dw-todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 4px;
  color: #93a1b5;
  font-size: 12px;
}
.dw-business-chip,
.dw-repeat {
  padding: 2px 8px;
  border-radius: 999px;
  background: #1a2436;
  color: #afc0d6;
}
.dw-repeat {
  background: #2a2213;
  color: #e7c47a;
}
.dw-todo-row.is-done .dw-todo-copy > strong {
  color: #93a1b5;
  text-decoration: line-through;
}
.dw-row-action,
.dw-secondary,
.dw-icon-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #2a3650;
  border-radius: 9px;
  background: #162033;
  color: #d7e2f0 !important;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.dw-row-action {
  flex-shrink: 0;
}
.dw-empty {
  margin: 0;
  padding: 20px 0;
  color: #93a1b5;
  font-size: 13px;
}
.dw-todo-list > .dw-empty {
  padding: 24px 20px;
}
.dw-all-todos {
  display: block;
  padding: 12px 20px;
  font-size: 12px;
}
.dw-widget[data-widget='widget-approvals'] .ur-table,
.dw-widget[data-widget='widget-approvals'] .ur-table tbody,
.dw-widget[data-widget='widget-approvals'] .ur-table tr,
.dw-widget[data-widget='widget-approvals'] .ur-table td {
  display: block;
  width: auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}
.dw-widget[data-widget='widget-approvals'] .ur-table thead {
  display: none;
}
.dw-widget[data-widget='widget-approvals'] .ur-table tr {
  padding: 10px 0;
  border-bottom: 1px solid #1f2a3d;
}
.dw-widget[data-widget='widget-approvals'] button {
  white-space: normal;
  min-width: min(100%, 96px);
  min-height: 36px;
}
.dw-widget .approval-request {
  border-radius: 12px;
  background: #0d1420;
  padding: 14px;
  border: 1px solid #1f2a3d;
}
.dw-section-heading {
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dw-section-heading a {
  font-size: 13px;
}
.dw-lead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #18212f;
}
.dw-lead-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #1a2436;
  color: #afc0d6;
  font-size: 12px;
  font-weight: 600;
}
.dw-lead-copy {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.dw-lead-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.dw-lead-copy small {
  color: #93a1b5;
  font-size: 11px;
}
.dw-lead-wait {
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dw-icon-action {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  padding: 0;
  color: #7fd6ee !important;
}
.dw-room-search {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.dw-room-search input {
  width: 190px;
  height: 36px;
  font-size: 13px;
}
.dw-icons {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}
.dw-icon {
  min-width: 0;
  border: 1px solid #1f2a3d;
  border-radius: 12px;
  background: #0d1420;
}
.dw-open {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 14px 5px;
  min-height: 90px;
  border: 0;
  background: transparent;
  color: #c9d3e2;
  cursor: pointer;
  font-size: 11px !important;
  overflow-wrap: anywhere;
}
.dw-symbol {
  color: #7fd6ee;
  font-size: 22px;
  line-height: 28px;
}
.dw-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(1100px, calc(100vw - 32px));
  max-height: 80dvh;
  margin: 0 auto 16px;
  padding: 20px;
  overflow: auto;
  color: #e6ecf5;
  background: #121a28;
  border: 1px solid #2a3650;
  border-radius: 16px;
  box-shadow: 0 -20px 70px #0008;
}
.dw-sheet::backdrop {
  background: #030710b3;
}
.dw-sheet-search {
  width: 100%;
  height: 44px;
  margin-bottom: 16px;
  padding: 0 14px;
  color: #e6ecf5;
  background: #0d1420;
  border: 1px solid #2a3650;
  border-radius: 10px;
}
.dw-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.dw-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px;
}
.dw-controls button,
.dw-controls select {
  min-height: 36px;
  padding: 5px 7px;
  border: 1px solid #2a3650;
  border-radius: 6px;
  background: #121a28;
  color: #c9d3e2;
  cursor: pointer;
  font-size: 12px;
}
.dw-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid #1f2a3d;
  background: #0e1522;
}
.dw-chat-heading {
  padding: 18px 20px;
  border-bottom: 1px solid #1f2a3d;
}
.dw-chat .david-embed-3d,
.dw-chat .dw-toggle {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #2a3650;
  border-radius: 9px;
  background: #162033;
  color: #c9d3e2;
  text-decoration: none;
}
.dw-david-orb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #bff1ff, #2bb6da 55%, #0c4b60);
  box-shadow: 0 0 22px #2bb6da20;
}
.dw-chat-identity {
  flex: 1;
  min-width: 0;
}
.dw-chat-identity strong,
.dw-chat-identity small {
  display: block;
}
.dw-chat-identity small {
  color: #93a1b5;
  font-size: 11px;
}
.dw-chat .chat-transcript {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 20px;
  scroll-padding-bottom: 20px;
}
.dw-chat .chat-transcript > * {
  flex-shrink: 0;
}
.dw-chat .chat-msg {
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #131d2d;
  border: 1px solid #1f2a3d;
}
.dw-chat .chat-owner {
  align-self: flex-end;
  width: fit-content;
  max-width: 85%;
  padding: 0;
  border: 0;
  background: transparent;
}
.dw-chat .chat-owner .chat-pill {
  max-width: 100%;
  padding: 10px 14px;
  color: #e6ecf5;
  border-radius: 14px 14px 4px 14px;
  background: #1e2a3f;
}
.dw-chat .chat-composer {
  margin: 0;
  min-width: 0;
  padding: 0;
}
.dw-chat .composer-box {
  background: #0b111c;
  border-color: #2a3650;
  border-radius: 14px;
}
.dw-chat textarea {
  min-width: 0;
}
.dw-compose {
  padding: 14px 16px 18px;
  border-top: 1px solid #1f2a3d;
}
.dw-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.dw-prompts button {
  min-height: 36px;
  font-size: 11px;
  padding: 0 10px;
  border: 1px solid #2a3650;
  border-radius: 999px;
  background: transparent;
  color: #afc0d6;
  cursor: pointer;
}
.dw-chat .composer-send {
  background: #d4a64a;
  color: #1a1406;
}
.dw-toggle,
.dw-reopen {
  display: none;
}
.dw-room-nav {
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.dw-room .atlas-workspace {
  display: block;
}
.dw-room {
  min-width: 0;
  margin-top: 20px;
}
@media (min-width: 1000px) {
  .dw-toggle {
    display: block;
    font-size: 11px;
    min-height: 36px;
  }
  .dw[data-chat='collapsed'] {
    grid-template-columns: minmax(0, 1fr) 48px !important;
  }
  .dw[data-chat='collapsed'] .dw-chat {
    display: none;
  }
  .dw[data-chat='collapsed'] .dw-reopen {
    display: block;
    writing-mode: vertical-rl;
    border-radius: 0;
  }
}
@media (min-width: 1000px) and (max-width: 1280px) {
  .dw-left {
    padding: 24px;
  }
  .dw-lower {
    grid-template-columns: minmax(0, 1fr);
  }
  .dw-icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 999px) {
  .atlas-app[data-embed='david'],
  .atlas-app[data-embed='david'] .atlas-main {
    height: auto;
    background: #0b111c;
  }
  .atlas-app[data-embed='david'] .dw {
    display: block;
    height: auto;
    overflow: visible;
  }
  .dw-left {
    overflow: visible;
    padding: 24px;
  }
  .dw-chat {
    height: 650px;
    min-height: 500px;
    border-left: 0;
    border-top: 1px solid #1f2a3d;
  }
  .dw-icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .dw-widgets {
    grid-template-columns: minmax(0, 1fr);
  }
  .dw-widgets > .dw-widget {
    grid-column: 1 / -1 !important;
  }
  .dw-lower > .dw-widget {
    max-width: 100%;
  }
  .dw-left {
    padding: 20px 16px 28px;
  }
  .dw-heading {
    flex-wrap: wrap;
  }
  .dw-heading h1 {
    font-size: 25px;
  }
  .dw-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .dw-stat {
    padding: 14px;
  }
  .dw-lower {
    grid-template-columns: minmax(0, 1fr);
  }
  .dw-card,
  .dw-widget {
    padding: 16px;
  }
  .dw-todo-heading {
    padding: 16px 14px 12px;
  }
  .dw-add {
    padding: 0 14px;
  }
  .dw-date-hint {
    margin: 8px 14px 12px;
  }
  .dw-todo-row {
    padding: 12px 10px;
    gap: 8px;
  }
  .dw-todo-meta {
    gap: 5px;
  }
  .dw-todo-copy > strong {
    font-size: 13px;
  }
  .dw-row-action {
    padding: 0 10px;
  }
  .dw-room-search {
    width: 100%;
  }
  .dw-room-search input {
    flex: 1;
    width: 0;
  }
  .dw-chat {
    height: 650px;
  }
  .dw-settings[open] {
    position: relative;
    width: 100%;
  }
}
