/* Ask David: business work first, with one persistent conversation alongside it. */
/* The page's accents, in one place (ATLAS-3503). On the root, not the page, because the to-do
 * menu is drawn on the body and must read them too. */
:root {
  --dw-cyan: #31d7ff;
  --dw-gold: #e9b85b;
  --dw-ok: #4fe0a6;
  --dw-red: #ff7b92;
}
@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: #31d7ff;
  --gold: #e9b85b;
  display: grid;
  /* One column, one row: the chat is a second column only on a wide page (see the end). */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  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: var(--dw-cyan);
}
.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 var(--dw-cyan);
  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: var(--dw-gold);
}
.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: var(--dw-gold);
}
.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: var(--dw-cyan);
}
.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: var(--dw-gold);
  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: var(--dw-gold);
}
.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: var(--dw-cyan) !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: var(--dw-cyan);
  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: var(--dw-gold);
  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;
}
/* One scroll area at every width (ATLAS-3503): the page is as tall as its frame and the left
 * side scrolls inside it, so the tab bar always sticks and the chat never stacks under it. */
@media (max-width: 1280px) {
  .dw-left {
    padding: 24px;
  }
  .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;
  }
}

/* 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: var(--dw-gold);
  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 var(--dw-gold);
  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(100dvh - 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 var(--dw-gold);
  outline-offset: 2px;
}
.dw-todo-problems {
  flex-basis: 100%;
  color: #d7e2f0;
}
.dw-todo-problems summary {
  cursor: pointer;
  color: var(--dw-cyan);
}
.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: var(--dw-gold);
  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: var(--dw-gold);
  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: var(--dw-gold);
  border-color: var(--dw-gold);
}
.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 var(--dw-gold);
  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 var(--dw-cyan);
  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 var(--dw-gold);
  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;
  }
}

/* ==========================================================================================
 * ATLAS-3503: the tab bar, the sections under it, "Your tabs", and David's chat as a docked
 * column on a wide page or a sheet behind a floating button on a narrow one.
 * ========================================================================================== */

/* --- The page ---------------------------------------------------------------------------- */
.dw-left {
  --dw-gutter: 32px;
  /* The room above the heading. */
  --dw-top: 28px;
  position: relative;
  /* Reaching the end of the page must not scroll the site this frame sits in. */
  overscroll-behavior: contain;
  /* That room is a block of its own (below), not padding: a stuck bar rests on the inside of the
   * scrolling area's padding, which left a band of the page showing, and taking presses, above
   * it. With none, the bar sticks at the very top and nothing passes over it. */
  padding-top: 0;
  /* Room under the last row for the floating button, so it never covers a control. */
  padding-bottom: 96px;
}
.dw-left::before {
  content: '';
  display: block;
  height: var(--dw-top);
}
.dw-chat .chat-transcript {
  overscroll-behavior: contain;
}
.dw-offline {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #e9b85b1a;
  color: #f0d59c;
  font-size: 13px;
}
.dw[data-room-open='true'] .dw-tabbar,
.dw[data-room-open='true'] .dw-tabbar-marker,
.dw[data-room-open='true'] .dw-custom {
  display: none;
}
.dw-customize {
  min-height: 44px;
}
.dw[data-customize='true'] .dw-customize,
.dw-customize-rooms[aria-pressed='true'] {
  border-color: var(--dw-cyan);
  color: var(--dw-cyan) !important;
}

/* --- Tab bar ------------------------------------------------------------------------------ */
/* The room between the heading and the bar. Where it ends is where the bar rests, so the page
 * reads from it how far it scrolls before the bar sticks. */
.dw-tabbar-marker {
  height: 16px;
}
.dw-tabbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 0 calc(-1 * var(--dw-gutter));
  padding: 0 var(--dw-gutter);
  background: #0b111c;
  border-bottom: 1px solid #1f2a3d;
}
/* The tabs and the two arrows either side of them. */
.dw-navstrip {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-end;
  align-self: stretch;
  min-width: 0;
}
.dw-navtabs-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  /* Never a vertical scroll of its own: a vertical wheel the strip does not take goes on to the
   * page, instead of being held by a pixel of the tabs' underline. */
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
/* "‹" and "›" (ATLAS-3503): for a mouse, while the tabs are wider than the bar. They take room
 * beside the strip, so they never cover a tab; each shows only while tabs sit past its edge, and
 * keeps its room while it does not, so the tabs do not jump as the strip moves. */
.dw-navscroll {
  display: none;
  flex: none;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  /* The whole height of the bar takes the press; a round mark in the middle shows it is one. */
  width: 36px;
  padding: 0 0 3px;
  border: 0;
  background: radial-gradient(circle, #1b2639 0 15px, transparent 16px);
  color: #e6ecf5;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.dw-tabbar[data-overflow='true'] .dw-navscroll {
  display: inline-flex;
}
.dw-navscroll:disabled {
  visibility: hidden;
}
.dw-navscroll:hover {
  background: radial-gradient(circle, #24324a 0 15px, transparent 16px);
  color: var(--dw-cyan);
}
/* A screen worked with a finger only swipes the strip: the arrows would take its room. */
@media (hover: none) and (pointer: coarse) {
  .dw-tabbar[data-overflow='true'] .dw-navscroll {
    display: none;
  }
}
.dw-navtabs-scroll::-webkit-scrollbar {
  display: none;
}
.dw-tabbar[data-fade-end='true'] .dw-navtabs-scroll {
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.dw-tabbar[data-fade-start='true'] .dw-navtabs-scroll {
  mask-image: linear-gradient(to right, transparent, #000 40px);
}
.dw-tabbar[data-fade-start='true'][data-fade-end='true'] .dw-navtabs-scroll {
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 40px,
    #000 calc(100% - 40px),
    transparent
  );
}
.dw-navtabs {
  display: flex;
  gap: 2px;
  width: max-content;
}
.dw-navtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-bottom: -1px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #93a1b5;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}
.dw-navtab:hover {
  color: #e6ecf5;
}
.dw-navtab[aria-selected='true'] {
  border-bottom-color: var(--dw-cyan);
  color: #f4f7fb;
  font-weight: 650;
}
.dw-navtab:focus-visible {
  outline-offset: -3px;
}
.dw-navtab-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: #182234;
  color: #93a1b5;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dw-navtab[aria-selected='true'] .dw-navtab-count {
  background: var(--dw-cyan);
  color: #03121a;
}
.dw-navgear {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #93a1b5;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.dw-navgear:hover,
.dw-navgear[aria-expanded='true'] {
  background: #131b2a;
  color: var(--dw-cyan);
}
.dw-navmenu {
  position: absolute;
  top: calc(100% + 6px);
  right: var(--dw-gutter);
  z-index: 8;
  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 6px;
  border: 1px solid #2a3650;
  border-radius: 12px;
  background: #121a28;
  box-shadow: 0 20px 60px #0008;
}
.dw-navmenu-item {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #e6ecf5;
  text-align: left;
  cursor: pointer;
}
.dw-navmenu-item:hover,
.dw-navmenu-item:focus-visible {
  background: #182234;
}

/* --- "Your tabs" -------------------------------------------------------------------------- */
.dw-custom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--dw-cyan);
  border-radius: 14px;
  background: #31d7ff0f;
}
.dw-custom-head,
.dw-custom-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.dw-custom-head h2 {
  font-size: 15px;
}
.dw-custom-lead {
  flex: 1 1 220px;
  color: #93a1b5;
  font-size: 13px;
}
.dw-custom-foot {
  justify-content: space-between;
}
.dw-custom-note,
.dw-custom-help {
  margin: 0;
}
/* A row is a switch, the tab's name, its size and the two move buttons on one line: 360 px holds
 * them. On a narrower panel the move buttons drop to a second line, to the right. */
.dw-custom-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dw-custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 4px 8px;
  border: 1px solid #1f2a3d;
  border-radius: 10px;
  background: #121a28;
}
.dw-custom-row[draggable='true'] {
  cursor: grab;
}
.dw-custom-row.is-locked {
  opacity: 0.8;
}
.dw-custom-copy {
  display: flex;
  flex: 1 1 80px;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}
.dw-custom-copy small {
  color: #93a1b5;
  font-size: 12px;
}
.dw-custom-size {
  flex: none;
  width: 96px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid #2a3650;
  border-radius: 8px;
  background: #0d1420;
  color: #e6ecf5;
}
.dw-custom-moves {
  display: flex;
  flex: none;
  gap: 8px;
  margin-left: auto;
}
.dw-custom-move {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid #2a3650;
  border-radius: 8px;
  background: #131b2a;
  color: #e6ecf5;
  cursor: pointer;
}
.dw-custom-subhead {
  margin: 4px 0 0;
  color: #93a1b5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dw-custom-open {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c9d3e2;
}
.dw-custom-start {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #2a3650;
  border-radius: 8px;
  background: #0d1420;
  color: #e6ecf5;
}
.dw-custom-size:disabled,
.dw-custom-start:disabled {
  opacity: 0.55;
}
/* A switch: a 44 px target around a 44 x 26 track. */
.dw-switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dw-switch::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 0;
  width: 44px;
  height: 26px;
  border: 1px solid #2a3650;
  border-radius: 999px;
  background: #131b2a;
}
.dw-switch-knob {
  position: absolute;
  top: 13px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #93a1b5;
  transition: left 120ms;
}
.dw-switch[aria-checked='true']::before {
  border-color: var(--dw-cyan);
  background: var(--dw-cyan);
}
.dw-switch[aria-checked='true'] .dw-switch-knob {
  left: 22px;
  background: #03121a;
}
/* A padlock, drawn: the tab is off for this business and cannot be switched on here. */
.dw-custom-lock {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
}
.dw-custom-lock::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 15px;
  width: 14px;
  height: 11px;
  border-radius: 2px;
  background: var(--dw-gold);
}
.dw-custom-lock::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 17px;
  width: 6px;
  height: 8px;
  border: 2px solid var(--dw-gold);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

/* --- Sections ------------------------------------------------------------------------------ */
.dw-panels {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.dw-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.dw-section-body {
  min-width: 0;
}
/* The heading and "Open ... only" belong to "All"; one section alone needs neither. */
.dw-section-head {
  display: none;
}
.dw[data-mode='all'] .dw-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #1f2a3d;
}
.dw[data-mode='all'] .dw-section:first-child .dw-section-head {
  padding-top: 0;
  border-top: 0;
}
.dw .dw-section-title {
  color: #93a1b5;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dw-section-only {
  min-height: 44px;
  margin-left: auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--dw-cyan);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
/* In "All" the section's heading already names it, so the card does not say it again. */
.dw[data-mode='all'] .dw-launcher > .dw-section-heading > h2,
.dw[data-mode='all'] .dw-todo-heading > h2 {
  display: none;
}
/* The To-do card keeps its own strip for the collapse control in "All", as on main. Taking that
 * strip away put the card's status line in view at the top of the list, so the line a drag writes
 * as it starts ("Moving …") moved the rows under the pointer and the drop missed. */
.dw[data-mode='all'] .dw-todo-heading > .dw-todo-collapse {
  margin-left: auto;
}
/* While a to-do is dragged, the line that says so ("Moving … Drop on another to-do.") is heard,
 * not seen: a sighted person sees the row move. It takes no room for that time, so the rows under
 * the pointer stay where they were when the drag began. */
.dw-todos > .dw-note.dw-todo-note-quiet {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* From 900 px "All" is six columns: a small section takes two, a medium one three and a large one
 * the row, so two halves sit side by side. A half pairs with the next one that fits, which may
 * come after a full-width section. One tab alone, and every section on a narrower page, is the
 * full width whatever its size. */
@media (min-width: 900px) {
  .dw[data-mode='all'] .dw-panels {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: row dense;
    align-items: start;
    gap: 28px 20px;
  }
  .dw[data-mode='all'] .dw-panels > * {
    grid-column: 1 / -1;
  }
  .dw[data-mode='all'] .dw-panels > .dw-section[data-size='S'] {
    grid-column: span 2;
  }
  .dw[data-mode='all'] .dw-panels > .dw-section[data-size='M'] {
    grid-column: span 3;
  }
  /* The page works out where each section lands and says how many columns it takes (`data-span`):
   * a section at its default size is widened to fill a row that would end in a gap, so no row is
   * left half empty. A size the person chose is the span as it stands. */
  .dw[data-mode='all'] .dw-panels > .dw-section[data-span='2'] {
    grid-column: span 2;
  }
  .dw[data-mode='all'] .dw-panels > .dw-section[data-span='3'] {
    grid-column: span 3;
  }
  .dw[data-mode='all'] .dw-panels > .dw-section[data-span='4'] {
    grid-column: span 4;
  }
  .dw[data-mode='all'] .dw-panels > .dw-section[data-span='5'] {
    grid-column: span 5;
  }
  .dw[data-mode='all'] .dw-panels > .dw-section[data-span='6'] {
    grid-column: 1 / -1;
  }
  /* Side by side, every heading sits on the same line: the first section keeps its rule too. */
  .dw[data-mode='all'] .dw-section:first-child .dw-section-head {
    padding-top: 14px;
    border-top: 1px solid #1f2a3d;
  }
}

/* --- The pieces every section draws with -------------------------------------------------- */
.dw-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dw-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.dw-kpi {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid #1f2a3d;
  border-radius: 12px;
  background: #121a28;
  color: #e6ecf5;
  font: inherit;
  text-align: left;
  text-decoration: none;
}
button.dw-kpi,
a.dw-kpi {
  cursor: pointer;
}
/* A tile that is a link keeps the tile's colours, not the page's link colour. */
.dw a.dw-kpi {
  color: #e6ecf5;
}
.dw-decision-edit {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.dw-decision-edit label {
  display: grid;
  gap: 6px;
  color: #93a1b5;
  font-size: 12px;
}
.dw-decision-edit textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid #2a3650;
  border-radius: 10px;
  background: #0d1420;
  color: #e6ecf5;
  font: inherit;
  resize: vertical;
}
button.dw-kpi:hover,
a.dw-kpi:hover {
  border-color: #33455f;
}
.dw-kpi-label {
  color: #93a1b5;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.dw-kpi-value {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.dw-kpi-detail {
  color: #93a1b5;
  font-size: 12px;
}
.dw [data-tone='cyan'] {
  color: var(--dw-cyan);
}
.dw [data-tone='gold'] {
  color: var(--dw-gold);
}
.dw [data-tone='red'] {
  color: var(--dw-red);
}
.dw [data-tone='ok'] {
  color: var(--dw-ok);
}
.dw-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #1f2a3d;
  border-radius: 12px;
  background: #121a28;
}
.dw-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #1f2a3d;
}
.dw-list-head h3 {
  margin: 0;
  color: #f4f7fb;
  font-size: 14px;
  font-weight: 650;
}
.dw-list-note {
  color: #93a1b5;
  font-size: 12px;
}
.dw-list > .dw-empty {
  margin: 0;
  padding: 14px;
}
.dw-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 11px 14px;
  border-bottom: 1px solid #18212f;
}
.dw-list > .dw-row:last-child {
  border-bottom: 0;
}
.dw-row-lead {
  flex: none;
  min-width: 20px;
  color: #93a1b5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.dw-row-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #2a3650;
  border-radius: 50%;
  background: #182234;
  font-size: 10.5px;
  font-weight: 700;
}
.dw-row-copy {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  min-width: 0;
}
.dw-row-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.dw-row-detail {
  color: #93a1b5;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.dw-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dw-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: #182234;
  color: #93a1b5;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.dw-tag[data-tone='red'] {
  background: #ff7b921f;
}
.dw-tag[data-tone='gold'] {
  background: #e9b85b24;
}
.dw-tag[data-tone='cyan'] {
  background: #31d7ff1a;
}
.dw-tag[data-tone='ok'] {
  background: #4fe0a61f;
}
.dw-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #2a3650;
  border-radius: 8px;
  background: #131b2a;
  color: #e6ecf5 !important;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.dw-act.is-primary {
  border-color: var(--dw-cyan);
  background: #31d7ff1a;
  color: var(--dw-cyan) !important;
}
.dw-act-status {
  color: #93a1b5;
  font-size: 12px;
}
.dw-act-status:empty {
  display: none;
}
.dw-empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #2a3650;
  border-radius: 12px;
  color: #93a1b5;
}
.dw-empty-state strong {
  color: #e6ecf5;
  font-size: 15px;
}
.dw-empty-state p {
  margin: 0;
}
.dw-error-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #5a2f3a;
  border-radius: 12px;
  background: #ff7b9212;
  color: #ffd3da;
}
/* The page itself could not be read: the same card, under the heading where the tabs would be. */
.dw-load-error {
  margin-top: 16px;
}
.dw-stale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #e9b85b1a;
  color: #f0d59c;
  font-size: 13px;
}
.dw-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dw-skeleton span {
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(90deg, #121a28, #182234, #121a28);
  background-size: 200% 100%;
  animation: dw-shimmer 1.4s linear infinite;
}
@keyframes dw-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* --- Today, Pipeline, To-do, Rooms -------------------------------------------------------- */
.dw-today-tiles .dw-skeleton {
  flex-direction: row;
}
.dw-today-tiles .dw-skeleton span {
  flex: 1;
  height: 92px;
}
.dw-stage-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}
.dw-stage-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #1f2a3d;
  border-radius: 999px;
  background: #0d1420;
  font-size: 13px;
}
.dw-stage-count strong {
  color: var(--dw-cyan);
  font-variant-numeric: tabular-nums;
}
.dw-waiting h3 {
  margin: 0;
  color: #f4f7fb;
  font-size: 17px;
  font-weight: 600;
}
.dw-lead .dw-icon-action {
  width: auto;
  min-width: 56px;
  min-height: 44px;
  padding: 0 12px;
}
.dw-todo-repeats {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9b85b24;
  color: var(--dw-gold);
  font-size: 11px;
  font-weight: 700;
}
.dw-todo-where {
  overflow: hidden;
  color: #93a1b5;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A folded line in a narrow list (a phone, or a small section beside another one): the title has
 * lines of its own to wrap onto, the count stays beside it, and the businesses the line covers go
 * on a line of their own under it. Measured on the line itself, not on the window. */
.dw-todo-folded {
  container-type: inline-size;
}
@container (max-width: 520px) {
  .dw-todo-folded > .dw-todo-summary {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .dw-todo-folded .dw-todo-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    white-space: normal;
  }
  .dw-todo-folded .dw-todo-where {
    order: 1;
    flex: 0 0 100%;
    padding-left: 20px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
/* A repeat listed under its folded line is set in from it. */
.dw-todo-repeat {
  margin-left: 18px;
  border-left: 2px solid #2a3650;
}
.dw-room-group {
  margin: 14px 0 8px;
  color: #93a1b5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dw-icons-more,
.dw-icons-admin {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.dw-room-settings {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #2a3650;
  border-radius: 12px;
  background: #0d1420;
}
.dw-room-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2px 12px;
}
.dw-room-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.dw-room-checks input {
  width: 18px;
  height: 18px;
  accent-color: var(--dw-gold);
}
/* While a layout saves, the control the keyboard is on is not disabled, so it can keep the
 * keyboard: it is marked unavailable, and looks and answers as the locked ones beside it do. */
.dw-control[aria-disabled='true'],
.dw-room-checks input[aria-disabled='true'] {
  opacity: 0.55;
  cursor: default;
}

/* --- David's chat ------------------------------------------------------------------------- */
/* Below 1180 px the chat is not in the page at all: a floating button opens it as a sheet on
 * the right, at most 380 px wide. It never stacks under the content. */
.dw-chat {
  display: none;
}
.dw-toggle,
.dw-chat-close {
  display: none;
}
/* What is out of sight at the bottom (ATLAS-3511). `--dw-obscured-bottom` is measured by
 * `david-safe-area.js`: the part of the CRM's frame running on under Safari's toolbar. In a frame
 * on an iPhone or iPad the page also keeps a fixed margin clear of that toolbar, because there
 * `env(safe-area-inset-bottom)` is zero and the frame cannot always see where the toolbar is. */
.dw {
  --dw-safe-bottom: env(safe-area-inset-bottom, 0px);
  --dw-obscured: var(--dw-obscured-bottom, 0px);
}
.dw[data-frame='ios'] {
  --dw-safe-bottom: max(env(safe-area-inset-bottom, 0px), 84px);
}
/* The frame-sized box whose visible part measures the visible band: never pressed or seen. */
.dw-visible-sentinel {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}
.dw-reopen {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + max(var(--dw-safe-bottom), var(--dw-obscured)));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px 0 8px;
  border: 1px solid var(--dw-cyan);
  border-radius: 999px;
  background: #121a28;
  color: #e6ecf5;
  font-weight: 650;
  box-shadow: 0 8px 24px #0008;
  cursor: pointer;
}
.dw-reopen .dw-david-orb {
  width: 36px;
  height: 36px;
}
.dw-reopen-dot {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 12px;
  height: 12px;
  border: 2px solid #121a28;
  border-radius: 50%;
  background: var(--dw-gold);
}
.dw[data-chat='open'] .dw-chat {
  position: fixed;
  /* The band that is visible: above a phone's keyboard and Safari's toolbar, and within what the
   * CRM's frame shows. Before it is measured, the small viewport, which leaves the toolbars room. */
  top: var(--dw-visible-top, 0px);
  right: 0;
  z-index: 30;
  display: grid;
  width: min(380px, 100vw);
  height: var(--dw-visible-height, 100svh);
  max-height: 100dvh;
  border-left: 1px solid var(--dw-cyan);
  box-shadow: -20px 0 60px #0008;
}
/* The message box and its send button keep clear of the home indicator, and in an iPhone's frame
 * of the toolbar margin the measured band does not already leave out. */
@media (max-width: 1179.98px) {
  .dw[data-chat='open'] .dw-compose {
    padding-bottom: calc(18px + max(0px, var(--dw-safe-bottom) - var(--dw-obscured)));
  }
}
/* Behind the open sheet the page is dimmed and takes no press of its own: a press there closes
 * the sheet. The page shows the backdrop only while the sheet is open below 1180 px. */
.dw-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: #05080fb3;
}
.dw[data-chat='open'] .dw-reopen {
  display: none;
}
.dw[data-chat='open'] .dw-chat-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
@media (min-width: 1180px) {
  /* From 1180 px the chat is a docked column of 340 px that stays put while the left scrolls. */
  .atlas-app[data-embed='david'] .dw {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .atlas-app[data-embed='david'] .dw[data-chat='collapsed'] {
    grid-template-columns: minmax(0, 1fr);
  }
  .dw-chat,
  .dw[data-chat='open'] .dw-chat {
    position: static;
    z-index: auto;
    display: grid;
    width: auto;
    height: auto;
    max-height: none;
    border-left: 1px solid #1f2a3d;
    box-shadow: none;
  }
  .dw[data-chat='collapsed'] .dw-chat {
    display: none;
  }
  /* A docked chat covers nothing, so nothing is dimmed. */
  .dw-chat-backdrop {
    display: none;
  }
  .dw-reopen,
  .dw[data-chat='open'] .dw-reopen {
    display: none;
  }
  .dw[data-chat='collapsed'] .dw-reopen {
    display: inline-flex;
  }
  .dw-toggle {
    display: block;
    min-width: 44px;
    min-height: 44px;
    font-size: 11px;
  }
  .dw-chat-close,
  .dw[data-chat='open'] .dw-chat-close {
    display: none;
  }
  .dw-left {
    padding-bottom: 40px;
  }
  .dw[data-chat='collapsed'] .dw-left {
    padding-bottom: 96px;
  }
}

/* --- Narrow pages and touch -------------------------------------------------------------- */
@media (max-width: 1280px) {
  .dw-left {
    --dw-gutter: 24px;
    --dw-top: 24px;
  }
  .dw-icons-more,
  .dw-icons-admin {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .dw-left {
    --dw-gutter: 16px;
    --dw-top: 20px;
    padding-bottom: 96px;
  }
  /* The box that finds a room has a row to itself; the two buttons share the next one. */
  .dw-room-search {
    flex-wrap: wrap;
  }
  .dw-room-search input {
    flex: 1 0 100%;
    height: 44px;
  }
  .dw-room-search .dw-secondary {
    flex: 1 1 0;
  }
  .dw-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dw-kpi {
    padding: 12px;
  }
  .dw-kpi-value {
    font-size: 22px;
  }
  .dw-custom-rows {
    grid-template-columns: minmax(0, 1fr);
  }
  .dw-customize {
    width: 100%;
  }
}
/* On a phone four room tiles to a row are too narrow for a room's name, which broke inside its
 * words. There the rooms are two to a row, each a strip with its symbol beside its name, so a name
 * wraps between words only. A room left alone in the last row of its group takes the row. */
@media (max-width: 479px) {
  .dw-icons,
  .dw-icons-more,
  .dw-icons-admin,
  .dw-sheet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dw-icons > .dw-icon:last-child:nth-child(odd),
  .dw-icons-more > .dw-icon:last-child:nth-child(odd),
  .dw-icons-admin > .dw-icon:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .dw-open {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 12px;
    font-size: 12px !important;
    text-align: left;
    overflow-wrap: break-word;
  }
  .dw-symbol {
    flex: none;
  }
}
/* Anything pressed with a finger is at least 44 px. */
@media (pointer: coarse), (max-width: 767px) {
  .dw .dw-secondary,
  .dw .dw-control,
  .dw .dw-prompts button,
  .dw .dw-icon-action,
  .dw .dw-filter,
  .dw .dw-tab,
  .dw .dw-row-action,
  .dw .dw-todo-more,
  .dw-chat .david-embed-3d {
    min-height: 44px;
  }
  .dw .dw-control {
    min-width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dw-skeleton span {
    animation: none;
  }
  .dw-switch-knob {
    transition: none;
  }
}
