/* 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;
  --surface2: #182234;
  --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 a.room-button:not(.secondary) {
  color: var(--ink);
}
.room-tabs a[aria-current='page'] {
  box-shadow: inset 0 -3px 0 currentColor;
}
.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-widget[data-widget='widget-cashflow'] {
  padding: 0;
  overflow: hidden;
}
.dw-widget[data-widget='widget-cashflow'] > .cashflow-cells-card {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.dw-widget[data-widget='widget-cashflow'] .cashflow-cells-head {
  margin: 0;
}
.cashflow-cells-card.is-collapsed {
  padding-block: 12px;
}
.cashflow-cells-compact {
  color: #bdcadd;
  font-size: 13px;
}
.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-add-zone {
  align-self: center;
  color: #93a1b5;
  font-size: 11px;
  white-space: nowrap;
}
.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 {
  border-bottom: 1px solid #18212f;
}
.dw-todo-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 12px;
}
.dw-todo-detail[hidden] {
  display: none;
}
.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-title {
  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-title {
  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;
}
.dw[data-room-open='true'] .dw-heading {
  display: none;
}
.dw-room .room {
  padding: 0;
}
.dw-room input:not([type='checkbox']):not([type='radio']),
.dw-room textarea,
.dw-room select {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #2a3650;
  border-radius: 8px;
  background: #0d1420;
  color: #e6ecf5;
}
.dw-room textarea {
  resize: vertical;
}
.dw-room .connection-settings,
.dw-room [data-spending-panel],
.dw-room .learning-room {
  display: grid;
  gap: 16px;
}
.dw-room [data-client-access],
.dw-room [data-payments-settings] {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #1f2a3d;
  border-radius: 14px;
  background: #121a28;
}
.dw-room [data-client-access] form,
.dw-room [data-payments-settings] form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}
.dw-room [data-client-access] form > h4,
.dw-room [data-client-access] form > p,
.dw-room [data-payments-settings] form > p {
  grid-column: 1 / -1;
}
.dw-room [data-client-access] label,
.dw-room [data-payments-settings] label {
  display: grid;
  gap: 6px;
}
.dw-room [data-client-access] button,
.dw-room [data-payments-settings] button,
.dw-room .owner-correction .primary {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #2a3650;
  border-radius: 8px;
  background: #131b2a;
  color: #e6ecf5;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.dw-room [data-spending-panel] > h2 {
  display: none;
}
.dw-room [data-spending-panel] .atlas-detail-card {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.dw-room [data-spending-panel] .atlas-detail-card > h3,
.dw-room [data-spending-panel] .atlas-detail-card > p {
  flex-basis: 100%;
  margin-block: 0;
}
.dw-room [data-spending-panel] input[type='number'] {
  width: min(14rem, 100%);
}
.dw-room .cat-price-form {
  align-items: center;
}
.dw-room .cat-price-form input {
  flex: 1 1 7rem;
}
.dw-room .business-dashboard {
  margin-top: 0;
}
.dw-room .business-kpi {
  padding: 12px;
  border: 1px solid #1f2a3d;
  border-radius: 10px;
  background: #121a28;
}
.dw .venture-plan {
  color: #e6dcff;
  background: #1c2440;
  border-color: #9984ed;
}
.dw .cashflow-systems-room .eyebrow {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.dw .venture-planning-error {
  color: #ffb6bb;
}
.dw-room-nav .room-button.secondary {
  color: #dce7f4;
  background: #182236;
  border-color: #33455f;
}
@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-detail {
    padding: 0 10px 12px;
    gap: 8px;
  }
  .dw-todo-meta {
    gap: 5px;
  }
  .dw-todo-title {
    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%;
  }
}

/* The workspace scrolls as the to-do list grows. */
.dw-todos {
  height: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dw-todos.is-collapsed {
  height: auto;
}
.dw-todo-heading {
  flex-shrink: 0;
}
.dw-todo-collapse {
  margin-left: auto;
}
.dw-todo-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.dw-todo-body[hidden] {
  display: none;
}
.dw-todo-body > .dw-tabs {
  align-self: flex-start;
  margin: 0 20px 10px;
}
.dw-todo-scroll {
  flex: 1;
  min-height: 0;
  overflow: visible;
}
.dw-todo-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 20px 10px;
}
.dw-todo-filters label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #afc0d6;
  font-size: 12px;
}
.dw-filter,
.dw-priority,
.dw-todo-move button,
.dw-todo-menu button,
.dw-todo-menu a {
  border: 1px solid #34455f;
  border-radius: 6px;
  background: #162033;
  color: #d7e2f0;
  cursor: pointer;
  font-size: 12px;
  min-height: 30px;
  padding: 3px 8px;
}
.dw-filter[aria-pressed='true'],
.dw-priority[data-priority='NOW'] {
  background: #d4a64a;
  color: #1a1406;
}
.dw-priority[data-priority='LATER'] {
  background: #263249;
  color: #d7e2f0;
}
.dw-todo-row {
  position: relative;
}
.dw-todo-detail {
  flex-wrap: wrap;
  padding: 0 12px 8px;
  gap: 8px;
}
.dw-todo-copy {
  flex-basis: 40%;
}
.dw-todo-move {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dw-todo-move button {
  min-height: 24px;
  min-width: 28px;
  padding: 0 5px;
}
.dw-todos button:disabled {
  opacity: 0.55;
  cursor: default;
}
.dw-todos button:focus-visible,
.dw-todo-options summary:focus-visible {
  outline: 2px solid #d4a64a;
  outline-offset: 2px;
}
.dw-todo-options {
  position: relative;
}
.dw-todo-options summary {
  cursor: pointer;
  color: #d7e2f0;
  min-height: 32px;
  min-width: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #34455f;
  border-radius: 6px;
}
.dw-todo-menu {
  position: fixed;
  z-index: 10000;
  display: grid;
  gap: 4px;
  width: 180px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 6px;
  background: #0d1420;
  border: 1px solid #34455f;
  border-radius: 8px;
  box-shadow: 0 8px 20px #0009;
}
.dw-todo-menu button,
.dw-todo-menu a {
  text-align: left;
}
.dw-todo-needs {
  color: #e7c47a;
  flex-basis: 100%;
}
@media (max-width: 600px) {
  .dw-todo-detail {
    display: grid;
    grid-template-columns: 36px 28px minmax(0, 1fr);
    align-items: start;
  }
  .dw-todo-move {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .dw-check {
    grid-column: 2;
    grid-row: 1;
    min-width: 28px;
  }
  .dw-todo-copy {
    grid-column: 3;
  }
  .dw-todo-options {
    grid-column: 2;
  }
  .dw-todo-needs {
    grid-column: 2 / -1;
  }
  .dw-todo-detail > .dw-row-action {
    grid-column: 3;
    justify-self: end;
  }
  .dw-todo-move button {
    min-height: 36px;
    min-width: 36px;
  }
}
.dw-todo-menu button:disabled {
  opacity: 0.55;
  cursor: default;
}
.dw-todo-menu button:focus-visible,
.dw-todo-menu a:focus-visible {
  outline: 2px solid #d4a64a;
  outline-offset: 2px;
}
.dw-todo-problems {
  flex-basis: 100%;
  color: #d7e2f0;
}
.dw-todo-problems summary {
  cursor: pointer;
  color: #7fd6ee;
}
.dw-todo-problems li {
  padding: 4px 0;
}

/* The action menu is portalled to body: keep its typography and controls self-contained. */
.dw-todo-menu {
  color-scheme: dark;
  box-sizing: border-box;
  width: min(248px, calc(100vw - 16px));
  font:
    13px/1.4 Inter,
    system-ui,
    sans-serif;
  padding: 8px;
  background: #141e2e;
  border-color: #4c5e78;
  box-shadow: 0 16px 48px #0009;
}
.dw-todo-menu button,
.dw-todo-menu a {
  display: block;
  min-height: 44px;
  border-radius: 8px;
  border: 0;
  padding: 8px 12px;
  background: transparent;
  color: #e6ecf5;
  font: inherit;
}
.dw-todo-menu button:hover:not(:disabled),
.dw-todo-menu button:focus-visible,
.dw-todo-menu a:hover,
.dw-todo-menu a:focus-visible {
  background: #293951;
}
.dw-todos {
  border: 1px solid #2b374b;
  border-radius: 16px;
  background: #121a28;
  overflow: visible;
}
.dw-todos .dw-tabs {
  display: flex;
  border: 1px solid #34455f;
  background: #0b111c;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.dw-todos button,
.dw-todos summary,
.dw-todos .dw-all-todos {
  min-height: 44px;
  border-radius: 8px;
}
.dw-todos .dw-tab {
  padding: 8px 14px;
  color: #bdcadd;
  border-radius: 8px;
  border: 0;
}
.dw-todos .dw-tab[aria-selected='true'] {
  background: #d4a64a;
  color: #171305;
}
.dw-todo-collapse {
  width: 44px;
  font-size: 22px;
}
.dw-todos .dw-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #4c5e78;
  border-radius: 10px;
  margin: 0 20px 16px;
  background: #0b111c;
}
.dw-todos .dw-add input {
  flex: 1;
  min-width: 0;
  width: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
.dw-todos .dw-add-zone {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  color: #bdcadd;
  cursor: help;
}
.dw-todo-filters .dw-filter {
  border-radius: 24px;
  min-width: 60px;
}
.dw-todo-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #bdcadd;
  font-size: 12px;
}
.dw-todo-switch input {
  appearance: none;
  width: 36px;
  height: 22px;
  border-radius: 20px;
  background: #42516a;
  position: relative;
  flex-shrink: 0;
}
.dw-todo-switch input::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
}
.dw-todo-switch input:checked {
  background: #987322;
}
.dw-todo-switch input:checked::after {
  left: 17px;
}
.dw-todo-group,
.dw-todo-group-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dw-todo-group-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 12px 20px;
  background: #1b2638;
  color: #d7e2f0;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-block: 1px solid #34455f;
}
.dw-todo-group-list .dw-todo-row {
  border-bottom: 1px solid #263247;
}
.dw-todo-group-list .dw-todo-detail {
  display: grid;
  grid-template-columns: 20px 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: start;
  padding: 0 20px 16px;
}

/*
 * ATLAS-3368: the row the Owner reads is one line - title, urgency, when it is due - and it keeps
 * that shape when opened, so a list of forty scans as forty lines rather than forty cards. The
 * title is clipped rather than wrapped for the same reason; the control carries the full text.
 */
/* Beats every `display` the open row's own layout sets, whichever rule comes later. */
.dw-todo-row .dw-todo-detail[hidden] {
  display: none;
}
.dw-todo-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 14px 20px;
  border: 0;
  background: none;
  color: #edf2fa;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.dw-todo-summary:disabled {
  cursor: default;
}
.dw-todo-summary::before {
  content: '›';
  flex: none;
  width: 10px;
  color: #a8b8cd;
  font-size: 16px;
  transition: transform 120ms ease-out;
}
.dw-todo-row.is-expanded .dw-todo-summary::before {
  transform: rotate(90deg);
}
.dw-todo-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
}
.dw-todo-badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  background: #263249;
  color: #d7e2f0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.dw-todo-badge[data-priority='NOW'] {
  background: #d4a64a;
  color: #1a1406;
}
.dw-todo-badge[data-priority='NEXT'] {
  background: #173c49;
  color: #a9e8f5;
}
.dw-todo-summary .dw-due {
  flex: none;
  color: #bdcadd;
  font-size: 12px;
  white-space: nowrap;
}
.dw-todo-expand-all {
  margin-left: auto;
}
.dw-todo-handle {
  grid-column: 1;
  padding-top: 10px;
  color: #a8b8cd;
  cursor: grab;
  font-size: 22px;
}
.dw-todo-detail .dw-check {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
}
.dw-todo-detail .dw-check input {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #a1b2cb;
  border-radius: 50%;
  cursor: pointer;
}
.dw-todo-detail .dw-check input:checked {
  background: #d4a64a;
  border-color: #d4a64a;
}
.dw-todo-detail .dw-check input:checked::after {
  content: '✓';
  display: block;
  text-align: center;
  color: #171305;
}
.dw-todo-detail .dw-check input:disabled {
  cursor: default;
  opacity: 0.55;
}
.dw-todo-detail .dw-todo-copy {
  grid-column: 3;
  min-width: 0;
}
.dw-todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  align-items: center;
  color: #bdcadd;
  line-height: 1.7;
}
.dw-todo-meta .dw-business-chip,
.dw-todo-meta .dw-repeat {
  background: #243249;
  color: #d7e2f0;
  border-radius: 6px;
  padding: 2px 8px;
}
.dw-todo-meta .dw-priority {
  min-height: 44px;
  border-radius: 6px;
  font-weight: 700;
}
.dw-todos .dw-priority:disabled {
  opacity: 1;
}
.dw-todo-meta .dw-todo-status::before,
.dw-todo-meta .dw-due::before {
  content: '·';
  margin-right: 8px;
}
.dw-priority[data-priority='NEXT'] {
  background: #173c49;
  color: #a9e8f5;
}
.dw-todo-detail .dw-todo-options {
  grid-column: 4;
  grid-row: 1;
}
.dw-todo-options summary {
  list-style: none;
  width: 44px;
  font-size: 24px;
  background: #1b273b;
}
.dw-todo-options summary::-webkit-details-marker {
  display: none;
}
.dw-todo-detail .dw-todo-needs,
.dw-todo-detail .dw-todo-problems,
.dw-todo-detail > .dw-row-action {
  grid-column: 3 / -1;
  margin: 0;
  justify-self: start;
}
.dw-todo-detail .dw-todo-needs {
  background: #352d1c;
  color: #f3d69a;
  border-left: 2px solid #d4a64a;
  border-radius: 4px;
  padding: 8px 10px;
  line-height: 1.6;
}
.dw-todo-detail .dw-todo-control-reason {
  grid-column: 3 / -1;
  margin: 0;
  padding: 6px 9px;
  border-left: 2px solid #7fd6ee;
  border-radius: 4px;
  background: #18283a;
  color: #d7e2f0;
  line-height: 1.45;
}
.dw-todo-edit,
.dw-todo-direct-actions,
.dw-todo-detail > .dw-todo-renew {
  grid-column: 3 / -1;
}
.dw-todo-edit {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #426078;
  border-radius: 8px;
  background: #111d2c;
}
.dw-todo-edit label {
  display: grid;
  gap: 5px;
  color: #d7e2f0;
}
.dw-todo-edit input,
.dw-todo-edit textarea {
  width: 100%;
}
.dw-todo-edit textarea {
  min-height: 84px;
  resize: vertical;
}
.dw-todo-edit-actions,
.dw-todo-direct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dw-todo-menu-reason {
  display: block;
  padding: 6px 8px;
  color: #b9c7da;
  line-height: 1.4;
}
.dw-todo-problems summary,
.dw-todo-detail > .dw-row-action {
  display: inline-flex;
  align-items: center;
  background: #1c3043;
  color: #b9eaf5;
  border: 1px solid #426078;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;
}
.dw-todos .dw-all-todos {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin: 16px 20px;
  text-decoration: none;
  color: #d7e2f0;
}
.dw-todo-more {
  margin: 12px 20px;
}
.dw-todo-toast:not(:empty) {
  position: fixed;
  bottom: 20px;
  left: 12px;
  width: min(420px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 12px;
  background: #293951;
  border: 1px solid #d4a64a;
  border-radius: 10px;
  z-index: 10001;
  box-shadow: 0 8px 24px #0008;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  pointer-events: none;
}
.dw-todo-toast button {
  pointer-events: auto;
}
.dw-todo-toast-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dw-todo-toast-entry span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.dw-todos input::placeholder {
  color: #a8b8cd;
}
.dw-todo-skeleton {
  list-style: none;
  margin: 16px 20px;
  height: 90px;
  border-radius: 10px;
  background: linear-gradient(100deg, #1b2638 30%, #2d3b52 50%, #1b2638 70%);
  background-size: 200% 100%;
  animation: todo-loading 1.4s ease-in-out infinite;
}
@keyframes todo-loading {
  to {
    background-position: -200% 0;
  }
}
.dw-todos :is(button, a, input, summary, [tabindex]):focus-visible {
  outline: 2px solid #f3cf7c;
  outline-offset: 3px;
}
.dw-todos :is(button, summary, a):hover {
  filter: brightness(1.15);
}
@media (max-width: 600px) {
  .dw-todo-group-list .dw-todo-detail {
    grid-template-columns: 12px 36px minmax(0, 1fr) 44px;
    gap: 4px;
    padding: 0 8px 12px;
  }
  .dw-todo-summary {
    gap: 8px;
    padding: 12px 8px;
  }
  .dw-todo-expand-all {
    margin-left: 0;
  }
  .dw-todos .dw-add,
  .dw-todo-filters,
  .dw-todo-body > .dw-tabs {
    margin-inline: 8px;
  }
  .dw-todos .dw-tab {
    padding-inline: 10px;
  }
  .dw-todo-detail .dw-check {
    width: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dw-todo-skeleton {
    animation: none;
  }
  .dw-todo-summary::before {
    transition: none;
  }
}
.dw-todo-row.is-completing .dw-todo-title,
.dw-todo-row.is-done .dw-todo-title {
  text-decoration: line-through;
  color: #bdcadd;
}
.dw-todo-row.is-completing {
  animation: todo-complete 250ms ease-out;
}
@keyframes todo-complete {
  to {
    opacity: 0.45;
  }
}
.dw-date-info {
  position: relative;
  flex-shrink: 0;
}
.dw-date-info summary {
  list-style: none;
  cursor: pointer;
}
.dw-date-info summary::-webkit-details-marker {
  display: none;
}
.dw-date-help {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 4;
  width: min(270px, 70vw);
  padding: 12px;
  background: #243249;
  border: 1px solid #60728c;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 8px 24px #0008;
}
.david-todo-room {
  background: #121a28;
  border: 1px solid #34455f;
  border-radius: 16px;
  color: #e6ecf5;
}
.david-todo-room :is(button, input, select, textarea, summary, a) {
  min-height: 44px;
  border-radius: 8px;
}
.david-todo-room :is(input, select, textarea) {
  background: #0b111c;
  border: 1px solid #60728c;
  color: #e6ecf5;
  padding: 10px 12px;
  max-width: 100%;
}
.david-todo-room :is(button, a) {
  background: #243249;
  color: #e6ecf5;
  border: 1px solid #60728c;
  padding: 10px 14px;
}
.david-todo-room :is(button, input, select, textarea, summary, a):focus-visible {
  outline: 2px solid #f3cf7c;
  outline-offset: 3px;
}
.david-todo-room .room-card {
  background: #172234;
  border: 1px solid #34455f;
  border-radius: 12px;
  padding: 20px;
  margin-block: 12px;
  overflow-wrap: anywhere;
}
.david-todo-room .dw-business-chip {
  display: inline-block;
  background: #293951;
  color: #d7e2f0;
  border-radius: 6px;
  padding: 4px 8px;
}
.todo-room-group {
  margin-block: 20px;
}
@media (prefers-reduced-motion: reduce) {
  .dw-todo-row.is-completing {
    animation: none;
  }
}
