/* Yield / Kernel — visual defaults from the Claude Component Kitchen. */
:root {
  --ds-font: "Hanken Grotesk", system-ui, sans-serif;
  --ds-text: #0c0d0e;
  --ds-text-secondary: #57605c;
  --ds-text-muted: #767e7a;
  --ds-shell: #0b1512;
  --ds-workspace: #f4f3f0;
  --ds-surface: #fff;
  --ds-subtle: #f9f8f6;
  --ds-line: #eeece8;
  --ds-skeleton: #e7e4dd;
  --ds-border: #e6e4df;
  --ds-control-border: #c5c9c6;
  --ds-action: #d4522a;
  --ds-action-tint: #fdf5f0;
  --ds-success: #375c54;
  --ds-success-tint: #eef3f1;
  --ds-action-hover: #b8431f;
  --ds-action-deep: #8f3316;
  --ds-danger: #b8431f;
  --ds-caution: #8a6d1f;
  --ds-logo-ink: #162521;
  --ds-badge-neutral-ink: #57605c;
  --ds-badge-neutral-bg: #f0eee9;
  --ds-badge-blue-ink: #17405c;
  --ds-badge-blue-bg: #e8f1f8;
  --ds-badge-violet-ink: #4b3a86;
  --ds-badge-violet-bg: #efeafb;
  --ds-badge-amber-ink: #7a4a00;
  --ds-badge-amber-bg: #fff4e0;
  --ds-badge-green-ink: #375c54;
  --ds-badge-green-bg: #e9f2ef;
  --ds-aging-current: #375c54;
  --ds-aging-1-30: #f2d06b;
  --ds-aging-31-60: #e0b43a;
  --ds-aging-61-90: #c7951a;
  --ds-aging-91-120: #e88a74;
  --ds-aging-121-150: #d4522a;
  --ds-aging-151-180: #b8431f;
  --ds-aging-181-360: #8f3316;
  --ds-aging-361: #5e2210;
  --ds-focus: #1477f8;
  --ds-focus-ring: 0 0 0 3px rgb(20 119 248 / 25%);
  --ds-radius-control: 6px;
  --ds-radius-input: 8px;
  --ds-radius-panel: 10px;
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-6: 24px;
  --ds-space-8: 32px;
  --ds-space-12: 48px;
  --ds-shadow-soft:
    0 1px 2px rgb(20 30 26 / 5%), 0 8px 20px -12px rgb(20 30 26 / 18%);
  --ds-shadow-float:
    0 8px 32px rgb(11 21 18 / 14%), 0 1px 4px rgb(11 21 18 / 8%);
  --ds-panel-shadow: none;
  --ds-duration: 140ms;
  --ds-shell-text: rgb(255 255 255 / 72%);
  --ds-shell-dim: rgb(255 255 255 / 45%);
  --ds-shell-faint: rgb(255 255 255 / 40%);
  --ds-shell-raise: rgb(255 255 255 / 10%);
  --ds-shell-well: rgb(255 255 255 / 5%);
  --ds-sidebar-width: 224px;
  --ds-agent-width: 296px;
  --ds-agent-rail: 48px;
  --ds-header-height: 52px;
  --ds-page-gutter: 32px;
  --ds-measure: 72ch;
}
.ds-theme {
  --ds-base-size: 18px;
  color: var(--ds-text);
  background: var(--ds-workspace);
  font: 400 var(--ds-base-size)/1.45 var(--ds-font);
  -webkit-font-smoothing: antialiased;
}
.ds-theme *,
.ds-theme *::before,
.ds-theme *::after {
  box-sizing: border-box;
}
.ds-theme [hidden] {
  display: none !important;
}
.ds-theme :where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
}
.ds-theme :where(a) {
  color: var(--ds-text);
}
.ds-theme :where(a:hover) {
  color: var(--ds-action);
}
.ds-theme
  :where(
    button,
    input,
    select,
    textarea,
    a,
    summary,
    [tabindex]
  ):focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: 2px;
  box-shadow: var(--ds-focus-ring);
}
.ds-theme[data-finish="soft"] {
  --ds-panel-shadow: var(--ds-shadow-soft);
}
.ds-theme[data-text-size="large"] {
  --ds-base-size: 20px;
}
.ds-theme[data-reduced-motion="true"] {
  --ds-duration: 0ms;
}
.ds-title {
  margin: 0;
  font-size: calc(var(--ds-base-size) * 2);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.ds-heading {
  margin: 0;
  font-size: calc(var(--ds-base-size) * 1.556);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.ds-panel-title {
  margin: 0;
  font-size: calc(var(--ds-base-size) * 1.222);
  font-weight: 600;
  line-height: 1.25;
}
.ds-secondary {
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-muted {
  color: var(--ds-text-muted);
  font-size: calc(var(--ds-base-size) * 5 / 6);
}
.ds-caption {
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
}
.ds-number {
  font-variant-numeric: tabular-nums;
}
.ds-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  min-width: 0;
}
.ds-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
}
.ds-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  flex-wrap: wrap;
}
.ds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--ds-space-6);
}
.ds-panel {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  box-shadow: var(--ds-panel-shadow);
  min-width: 0;
}
.ds-panel-header,
.ds-panel-body {
  padding: 24px 28px;
}
.ds-panel-header {
  border-bottom: 1px solid var(--ds-line);
}
.ds-panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--ds-line);
}
.ds-divider {
  border: 0;
  border-top: 1px solid var(--ds-line);
  margin: 0;
}
.ds-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ds-control-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-surface);
  font-size: calc(var(--ds-base-size) * 8 / 9);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--ds-duration),
    border-color var(--ds-duration);
}
.ds-button:hover {
  background: var(--ds-subtle);
  border-color: var(--ds-shell);
  color: var(--ds-text);
}
.ds-button[data-variant="primary"] {
  background: var(--ds-action);
  border-color: transparent;
  color: #fff;
}
.ds-button[data-variant="primary"]:hover {
  background: #bf4722;
  border-color: transparent;
}
.ds-button[data-variant="quiet"] {
  padding-inline: 14px;
  color: var(--ds-text-secondary);
  background: transparent;
  border-color: transparent;
}
.ds-button[data-variant="quiet"]:hover {
  background: var(--ds-line);
}
.ds-button[data-variant="text"] {
  height: 36px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-action);
  font-size: calc(var(--ds-base-size) * 5 / 6);
}
.ds-button[data-variant="text"]:hover {
  background: var(--ds-action-tint);
}
.ds-button[data-variant="danger"] {
  color: var(--ds-action);
  border-color: var(--ds-action);
}
.ds-button[data-variant="danger"]:hover {
  background: var(--ds-action);
  color: #fff;
}
.ds-button[data-size="small"] {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--ds-radius-control);
  font-size: calc(var(--ds-base-size) * 5 / 6);
}
.ds-button[data-icon-only] {
  width: 44px;
  padding: 8px;
}
.ds-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ds-button[aria-busy="true"]::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ds-spin 0.8s linear infinite;
}
.ds-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-label {
  font-weight: 600;
}
.ds-input,
.ds-select,
.ds-textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--ds-control-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-surface);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-textarea {
  min-height: 104px;
  resize: vertical;
}
.ds-input:focus,
.ds-select:focus,
.ds-textarea:focus {
  border-color: var(--ds-shell);
}
.ds-input[aria-invalid="true"],
.ds-textarea[aria-invalid="true"] {
  border-color: var(--ds-action);
}
.ds-help {
  color: var(--ds-text-muted);
  font-size: 0.9375em;
}
.ds-error {
  color: var(--ds-action);
  font-size: 0.9375em;
}
.ds-input-group {
  display: flex;
  align-items: stretch;
}
.ds-input-group > span {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--ds-subtle);
  border: 1px solid var(--ds-control-border);
  border-right: 0;
  border-radius: 8px 0 0 8px;
}
.ds-input-group > .ds-input {
  border-radius: 0 8px 8px 0;
}
.ds-input[data-numeric] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ds-search {
  display: flex;
  align-items: center;
  position: relative;
}
.ds-search > .ds-input {
  padding-right: 44px;
  padding-left: 40px;
}
.ds-search > .ds-search-icon {
  position: absolute;
  left: 12px;
  color: var(--ds-text-muted);
  pointer-events: none;
}
.ds-search > button {
  position: absolute;
  right: 2px;
  min-height: 40px;
  width: 40px;
  padding: 4px;
}
.ds-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: calc(var(--ds-base-size) * 8 / 9);
  cursor: pointer;
}
.ds-choice:has(> .ds-switch) {
  flex-direction: row-reverse;
  justify-content: space-between;
}
.ds-choice input {
  width: 22px;
  height: 22px;
  accent-color: var(--ds-shell);
  flex-shrink: 0;
}
.ds-switch {
  appearance: none;
  width: 46px !important;
  height: 26px !important;
  background: var(--ds-control-border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.ds-switch::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #0002;
  transition: transform var(--ds-duration);
}
.ds-switch:checked {
  background: var(--ds-action);
}
.ds-switch:checked::before {
  transform: translateX(20px);
}
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ds-line);
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
  white-space: nowrap;
}
.ds-badge[data-tone="success"] {
  background: var(--ds-success-tint);
  color: var(--ds-success);
}
.ds-badge[data-tone="attention"] {
  background: var(--ds-action-tint);
  color: var(--ds-action);
}
.ds-badge[data-tone="info"] {
  background: #eef4ff;
  color: #1465cc;
}
.ds-badge[data-tone="danger"] {
  background: var(--ds-action-tint);
  color: var(--ds-danger);
}
.ds-badge[data-tone="caution"] {
  background: var(--ds-badge-amber-bg);
  color: var(--ds-caution);
}
.ds-badge[data-stage="draft"] {
  background: var(--ds-badge-neutral-bg);
  color: var(--ds-badge-neutral-ink);
}
.ds-badge[data-stage="billed"] {
  background: var(--ds-badge-blue-bg);
  color: var(--ds-badge-blue-ink);
}
.ds-badge[data-stage="validated"] {
  background: var(--ds-badge-violet-bg);
  color: var(--ds-badge-violet-ink);
}
.ds-badge[data-stage="collected"] {
  background: var(--ds-badge-amber-bg);
  color: var(--ds-badge-amber-ink);
}
.ds-badge[data-stage="paid"] {
  background: var(--ds-badge-green-bg);
  color: var(--ds-badge-green-ink);
}
.ds-badge[data-dot]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ds-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ds-success-tint);
  color: var(--ds-success);
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
  flex-shrink: 0;
}
.ds-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--ds-border);
  overflow-x: auto;
}
.ds-tab {
  padding: 10px 12px 12px;
  white-space: nowrap;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  background: transparent;
  font-size: calc(var(--ds-base-size) * 8 / 9);
  cursor: pointer;
  color: var(--ds-text-secondary);
}
.ds-tab[aria-selected="true"] {
  border-bottom-color: var(--ds-action);
  color: var(--ds-text);
  font-weight: 600;
}
.ds-segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 8px;
  background: var(--ds-line);
}
.ds-segmented > button {
  border: 0;
  border-radius: 6px;
  min-height: 36px;
  padding: 6px 12px;
  background: transparent;
  cursor: pointer;
  font-size: calc(var(--ds-base-size) * 5 / 6);
}
.ds-segmented > button[aria-pressed="true"] {
  background: var(--ds-surface);
  box-shadow: 0 1px 3px #0001;
}
/* An active filter is an ink pill; the control that adds one is a dashed pill. */
.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 6px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ds-shell);
  color: #fff;
  font-size: calc(var(--ds-base-size) * 5 / 6);
  font-weight: 600;
}
.ds-chip button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.ds-chip button:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.ds-chip-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px dashed var(--ds-text-muted);
  border-radius: 999px;
  background: var(--ds-surface);
  font: inherit;
  font-size: calc(var(--ds-base-size) * 5 / 6);
  color: var(--ds-text-secondary);
  cursor: pointer;
}
.ds-chip-add:hover {
  border-color: var(--ds-shell);
  color: var(--ds-text);
}
.ds-chip-add svg {
  width: 16px;
  height: 16px;
}
/* Preset pills: one pressed, the rest outlined. */
.ds-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ds-pills > button {
  padding: 8px 12px;
  border: 1px solid var(--ds-control-border);
  border-radius: 999px;
  background: var(--ds-surface);
  font: inherit;
  font-size: calc(var(--ds-base-size) * 5 / 6);
  color: var(--ds-text-secondary);
  cursor: pointer;
}
.ds-pills > button[aria-pressed="true"] {
  background: var(--ds-shell);
  border-color: var(--ds-shell);
  color: #fff;
  font-weight: 600;
}
.ds-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: calc(var(--ds-base-size) * 5 / 6);
}
.ds-breadcrumb li + li::before {
  content: "/";
  color: var(--ds-text-muted);
  margin-right: 8px;
}
.ds-breadcrumb a {
  color: var(--ds-text-secondary);
  text-decoration: none;
}
.ds-accordion {
  border-bottom: 1px solid var(--ds-border);
}
.ds-accordion summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
}
.ds-accordion > div {
  padding: 0 0 20px;
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-table-scroll {
  position: relative;
  overflow-x: auto;
}
.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-table th {
  text-align: left;
  line-height: 1.4;
  font-size: 0.875em;
  color: var(--ds-text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ds-table :where(td, th) {
  padding: 12px 20px;
  border-bottom: 1px solid var(--ds-line);
  vertical-align: middle;
}
.ds-table th button {
  font: inherit;
  text-transform: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.ds-table th[aria-sort="ascending"] button::after {
  content: " ↑";
}
.ds-table th[aria-sort="descending"] button::after {
  content: " ↓";
}
.ds-table :where(td, th):has(> .ds-table-checkbox) {
  width: 1%;
  padding-right: 12px;
}
/* The primary cell of a row: a text button that opens the record. */
.ds-record-link {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ds-record-link:hover {
  color: var(--ds-action);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ds-table [data-align="right"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ds-table td[data-align="right"] {
  font-weight: 600;
}
.ds-table .ds-table-actions {
  width: 1%;
  padding-right: 12px;
  text-align: right;
}
.ds-table-actions .ds-button {
  color: var(--ds-text);
}
.ds-table-actions .ds-action-menu-items {
  left: auto;
  right: 0;
}
.ds-table-pagination {
  gap: 10px;
}
.ds-table-pagination .ds-button[data-direction="previous"] svg {
  transform: rotate(90deg);
}
.ds-table-pagination .ds-button[data-direction="next"] svg {
  transform: rotate(-90deg);
}
.ds-table tr[aria-selected="true"] {
  background: var(--ds-success-tint);
}
.ds-table tbody tr:last-child td {
  border-bottom: 0;
}
.ds-list-row {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-list-row > .ds-button {
  height: 36px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--ds-line);
}
.ds-list-row:last-child {
  border-bottom: 0;
}
/* Alerts: left icon, bold lead, plain sentence. Tone comes from the tint and the icon, never a side stripe. */
.ds-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ds-border);
  border-radius: 10px;
  background: var(--ds-surface);
  font-size: calc(var(--ds-base-size) * 8 / 9);
  line-height: 1.45;
}
.ds-alert > svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--ds-focus);
}
.ds-alert-body {
  flex: 1 1 220px;
  min-width: 0;
}
.ds-alert[data-tone="success"] {
  background: var(--ds-success-tint);
  border-color: #d5e2dd;
}
.ds-alert[data-tone="success"] > svg {
  color: var(--ds-success);
}
.ds-alert[data-tone="attention"] {
  background: var(--ds-action-tint);
  border-color: #f0d9cd;
}
.ds-alert[data-tone="attention"] > svg {
  color: var(--ds-action);
}
.ds-alert[data-tone="error"] {
  background: var(--ds-shell);
  color: #fff;
  border-color: var(--ds-shell);
}
.ds-alert[data-tone="error"] > svg {
  color: #fff;
}
.ds-alert[data-tone="error"] :is(.ds-muted, .ds-secondary, .ds-text-secondary) {
  color: rgba(255, 255, 255, 0.7);
}
.ds-empty {
  text-align: center;
  padding: 48px 24px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.ds-empty p {
  margin: 0;
  max-width: 42ch;
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-empty-title {
  font-weight: 600;
}
.ds-empty[data-tone="error"] .ds-empty-title {
  color: var(--ds-danger);
}
.ds-progress {
  appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ds-line);
  accent-color: var(--ds-success);
}
.ds-progress::-webkit-progress-bar {
  background: var(--ds-line);
}
.ds-progress::-webkit-progress-value {
  background: var(--ds-success);
}
.ds-progress::-moz-progress-bar {
  background: var(--ds-success);
}
/* Loading: skeletons in the shape of what arrives, and a bar for a refresh.
   Widths come from data-width so nothing needs an inline style. */
.ds-skeleton {
  display: block;
  height: 14px;
  max-width: 100%;
  border-radius: 4px;
  background: var(--ds-skeleton);
  animation: ds-pulse 1.8s ease-in-out infinite;
}
.ds-skeleton[data-shape="text"] {
  height: 12px;
}
.ds-skeleton[data-shape="title"] {
  width: 260px;
  height: 32px;
  border-radius: 6px;
}
.ds-skeleton[data-shape="heading"] {
  width: 180px;
  height: 20px;
}
.ds-skeleton[data-shape="word"] {
  display: inline-block;
  width: 96px;
  vertical-align: middle;
}
.ds-skeleton[data-shape="metric"] {
  width: 70%;
  height: 28px;
  border-radius: 6px;
}
.ds-skeleton[data-shape="badge"] {
  width: 96px;
  height: 24px;
  border-radius: 999px;
}
.ds-skeleton[data-shape="button"] {
  width: 140px;
  height: 40px;
  border-radius: var(--ds-radius-control);
}
.ds-skeleton[data-shape="input"] {
  width: 100%;
  height: 40px;
  border-radius: var(--ds-radius-input);
}
.ds-skeleton[data-shape="count"] {
  width: 28px;
  height: 22px;
  border-radius: 999px;
}
.ds-skeleton[data-shape="avatar"] {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
}
.ds-skeleton[data-tone="shell"] {
  background: rgb(255 255 255 / 12%);
}
.ds-skeleton[data-width="25"] {
  width: 25%;
}
.ds-skeleton[data-width="40"] {
  width: 40%;
}
.ds-skeleton[data-width="55"] {
  width: 55%;
}
.ds-skeleton[data-width="70"] {
  width: 70%;
}
.ds-skeleton[data-width="85"] {
  width: 85%;
}
.ds-skeleton[data-width="100"] {
  width: 100%;
}
.ds-skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  min-width: 0;
}
.ds-page-skeleton {
  display: contents;
}
.ds-loading-content {
  display: contents;
}
.ds-loading-region,
.ds-panel[data-stale] {
  position: relative;
}
.ds-loading-region[data-stale]::before,
.ds-panel[data-stale]::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 2px;
  border-radius: var(--ds-radius-panel) var(--ds-radius-panel) 0 0;
  background: linear-gradient(
      90deg,
      transparent 0 35%,
      var(--ds-action) 35% 65%,
      transparent 65%
    )
    0 0 / 300% 100%;
  animation: ds-loading-slide 1.2s linear infinite;
}
.ds-loading-region[data-stale] > .ds-loading-content > *,
.ds-panel[data-stale] tbody {
  opacity: 0.55;
  transition: opacity var(--ds-duration);
}
@keyframes ds-loading-slide {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
.ds-dialog {
  color: var(--ds-text);
  font: inherit;
  border: 1px solid var(--ds-border);
  border-radius: 12px;
  background: var(--ds-surface);
  padding: 28px;
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-shadow: var(--ds-shadow-float);
}
.ds-dialog::backdrop {
  background: rgb(11 21 18 / 35%);
}
.ds-dialog[data-drawer] {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: min(440px, 100%);
  border-radius: 0;
}
.ds-dialog[data-drawer][data-size="wide"] {
  width: min(760px, 100%);
}
/* The header and footer stay put; only the body scrolls. */
.ds-dialog[open] {
  display: flex;
  flex-direction: column;
}
.ds-dialog > .ds-stack {
  flex: 1 1 auto;
  min-height: 0;
}
.ds-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin-inline: -28px;
  padding-inline: 28px;
}
.ds-dialog-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--ds-space-3);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-line);
}
.ds-toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  border-radius: 10px;
  color: #fff;
  background: var(--ds-shell);
  box-shadow: var(--ds-shadow-float);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-tooltip {
  position: relative;
  display: inline-flex;
}
.ds-tooltip [role="tooltip"] {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  max-width: 280px;
  background: var(--ds-shell);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: calc(var(--ds-base-size) * 0.778);
  z-index: 10;
}
.ds-tooltip:hover [role="tooltip"],
.ds-tooltip:focus-within [role="tooltip"] {
  display: block;
}
.ds-chart {
  width: 100%;
  display: block;
  overflow: visible;
}
.ds-chart text {
  font-family: var(--ds-font);
  font-size: 14px;
  fill: var(--ds-text-muted);
}
.ds-chart-line {
  fill: none;
  stroke: var(--ds-success);
  stroke-width: 2.5;
}
.ds-chart-area {
  fill: var(--ds-success);
  opacity: 0.08;
}
.ds-chart-grid {
  stroke: var(--ds-line);
  stroke-width: 1;
}
.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@keyframes ds-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes ds-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ds-theme {
    --ds-duration: 0ms;
  }
  .ds-theme *,
  .ds-theme *::before {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
.ds-theme[data-reduced-motion="true"] *,
.ds-theme[data-reduced-motion="true"] *::before {
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .ds-theme [data-stale]::before {
    background: var(--ds-action);
    opacity: 0.4;
  }
}
.ds-theme[data-reduced-motion="true"] [data-stale]::before {
  background: var(--ds-action);
  opacity: 0.4;
}
@media (max-width: 700px) {
  .ds-panel-header,
  .ds-panel-body {
    padding: 20px;
  }
  .ds-table :where(td, th) {
    padding: 12px;
  }
}
.ds-combobox {
  position: relative;
}
.ds-options {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-float);
  z-index: 10;
}
.ds-option {
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.ds-option:hover,
.ds-option[aria-selected="true"] {
  background: var(--ds-line);
}
.ds-table-filters {
  padding: 0 20px;
  border-bottom: 1px solid var(--ds-line);
  gap: 0;
}
.ds-table-filters .ds-button {
  min-height: 0;
  padding: 10px 12px 12px;
  border-radius: 4px 4px 0 0;
  border-bottom: 2px solid transparent;
  font-weight: 400;
}
.ds-table-filters .ds-button .ds-muted {
  margin-left: 4px;
}
.ds-table-filters .ds-button[aria-pressed="true"] {
  border-bottom-color: var(--ds-action);
  font-weight: 600;
}
.ds-table-selection {
  background: var(--ds-success-tint);
  padding: 8px 20px;
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-table-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--ds-shell);
  cursor: pointer;
}
.ds-table td.ds-empty {
  display: table-cell;
  text-align: center;
  padding: 32px;
}
.ds-table td.ds-empty > button {
  margin-left: 16px;
}
.ds-chart-key {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.ds-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-height: 236px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.ds-bar-column {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 44px;
}
.ds-bar-stack {
  display: flex;
  flex-direction: column-reverse;
  width: min(100%, 64px);
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}
.ds-donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ds-donut > span {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--ds-surface);
  font-size: 1.55em;
  font-weight: 600;
}
.ds-breakdown-values {
  flex: 1;
  min-width: 200px;
  margin: 0;
}
.ds-breakdown-values dd {
  margin: 0;
}
.ds-action-menu {
  position: relative;
  display: inline-block;
}
.ds-action-menu > summary {
  list-style: none;
}
.ds-action-menu > summary::-webkit-details-marker {
  display: none;
}
.ds-action-menu > summary svg {
  width: 16px;
  height: 16px;
}
.ds-action-menu-items {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-float);
  z-index: 10;
}
.ds-action-menu-items > button {
  justify-content: flex-start;
  border: 0;
  font-weight: 400;
}
.ds-action-menu-items > button[data-variant="danger"] {
  border-top: 1px solid var(--ds-line);
  border-radius: 0;
}
.ds-error-slot {
  min-height: 1.45em;
}
.ds-aging-bar {
  display: flex;
  gap: 1px;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ds-line);
}
.ds-aging-bar > span {
  min-width: 2px;
}
.ds-aging-legend {
  display: grid;
  gap: var(--ds-space-1);
  margin: 0;
}
.ds-aging-row {
  display: flex;
  justify-content: space-between;
  gap: var(--ds-space-3);
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-aging-row dt {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}
.ds-aging-row dd {
  margin: 0;
  white-space: nowrap;
}
.ds-aging-swatch {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 3px;
}
.ds-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2) var(--ds-space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-step {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  color: var(--ds-text-secondary);
}
.ds-step-marker {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--ds-control-border);
  border-radius: 50%;
  background: var(--ds-surface);
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
}
.ds-step[data-state="done"] .ds-step-marker {
  border-color: var(--ds-success);
  background: var(--ds-success-tint);
  color: var(--ds-success);
}
.ds-step[data-state="current"] {
  color: var(--ds-text);
  font-weight: 600;
}
.ds-step[data-state="current"] .ds-step-marker {
  border-color: var(--ds-action);
  background: var(--ds-action);
  color: #fff;
}
.ds-test-banner {
  padding: var(--ds-space-2) var(--ds-space-4);
  background: var(--ds-shell);
  color: var(--ds-workspace);
  font-size: calc(var(--ds-base-size) * 0.778);
}

/* Combined pieces. Built from the parts above; no side stripes, no card shadows. */
.ds-button[data-size="link"] {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ds-text);
  font-weight: 600;
  font-size: calc(var(--ds-base-size) * 0.778);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ds-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: var(--ds-space-6);
  margin: 0;
}
.ds-metric {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-1);
  min-width: 0;
}
.ds-metric dt,
.ds-metric dd {
  margin: 0;
}
.ds-metric-label,
.ds-metric-note {
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 0.778);
}
.ds-metric-value {
  font-size: calc(var(--ds-base-size) * 1.5);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.ds-metric-note[data-tone="danger"] {
  color: var(--ds-danger);
}
.ds-metric-note[data-tone="caution"] {
  color: var(--ds-caution);
}
.ds-piece-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-4);
}
.ds-piece-heading {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-1);
  min-width: 0;
}
.ds-piece-heading p {
  margin: 0;
}
.ds-piece-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
}
.ds-piece-band {
  padding: var(--ds-space-4) 28px;
  border-top: 1px solid var(--ds-line);
}
.ds-piece-band.ds-row {
  flex-wrap: wrap;
}
.ds-piece-views {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-2);
}
.ds-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}
.ds-view-switch > button {
  min-height: 36px;
  padding: 0 var(--ds-space-4);
  border: 1px solid var(--ds-control-border);
  border-radius: 999px;
  background: var(--ds-surface);
  color: var(--ds-text);
  font: inherit;
  font-size: calc(var(--ds-base-size) * 0.833);
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--ds-duration),
    color var(--ds-duration),
    border-color var(--ds-duration);
}
.ds-view-switch > button:hover {
  border-color: var(--ds-text-muted);
}
.ds-view-switch > button[aria-pressed="true"] {
  border-color: var(--ds-text);
  background: var(--ds-text);
  color: var(--ds-surface);
}
.ds-facts {
  margin: 0;
  padding-top: var(--ds-space-2);
  padding-bottom: var(--ds-space-2);
}
.ds-fact {
  display: grid;
  grid-template-columns: minmax(120px, 2fr) 3fr;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--ds-line);
}
.ds-fact:last-child {
  border-bottom: 0;
}
.ds-fact dt {
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 0.889);
}
.ds-fact dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ds-fact dd[data-tone="danger"] {
  color: var(--ds-danger);
}
.ds-fact dd[data-tone="caution"] {
  color: var(--ds-caution);
}
.ds-fact dd[data-tone="strong"] {
  font-weight: 600;
}
.ds-room-card .ds-panel-footer {
  margin: 0;
  padding: var(--ds-space-4) 28px;
  background: var(--ds-subtle);
  border-radius: 0 0 var(--ds-radius-panel) var(--ds-radius-panel);
}
.ds-activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-activity-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--ds-space-4);
  padding: var(--ds-space-4) 28px;
  border-bottom: 1px solid var(--ds-line);
}
.ds-activity-item:last-child {
  border-bottom: 0;
}
.ds-activity-time {
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 0.889);
  padding-top: 2px;
}
.ds-activity-text {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-1);
  min-width: 0;
}
.ds-activity-text strong {
  font-weight: 600;
}
.ds-queue-detail {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr);
  gap: var(--ds-space-4);
  align-items: start;
}
@media (max-width: 900px) {
  .ds-queue-detail {
    grid-template-columns: 1fr;
  }
}
.ds-queue-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-queue-list li + li {
  border-top: 1px solid var(--ds-line);
}
.ds-queue-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-1);
  width: 100%;
  padding: var(--ds-space-4) var(--ds-space-6);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--ds-duration);
}
.ds-queue-row:hover {
  background: var(--ds-subtle);
}
.ds-queue-row[aria-current="true"] {
  background: var(--ds-workspace);
}
.ds-queue-list li:last-child .ds-queue-row {
  border-radius: 0 0 var(--ds-radius-panel) var(--ds-radius-panel);
}
.ds-queue-row-top {
  display: flex;
  gap: var(--ds-space-3);
  align-items: baseline;
}
.ds-queue-when {
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 0.889);
}
.ds-queue-title {
  font-weight: 600;
}
.ds-queue-pane {
  min-width: 0;
  transition:
    opacity calc(var(--ds-duration) * 1.5),
    transform calc(var(--ds-duration) * 1.5);
}
.ds-queue-pane[data-enter] {
  opacity: 0;
  transform: translateY(4px);
  transition: none;
}
.ds-thread-list,
.ds-outcome-list,
.ds-checklist-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-thread-message {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  padding: var(--ds-space-4) 28px;
  border-bottom: 1px solid var(--ds-line);
}
.ds-thread-message:last-child {
  border-bottom: 0;
}
.ds-thread-body {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.ds-email-reply .ds-facts {
  border-bottom: 1px solid var(--ds-line);
}
.ds-email-form .ds-error:empty {
  display: none;
}
.ds-email-actions {
  flex-wrap: wrap;
}
.ds-email-spacer {
  flex: 1;
}
.ds-outcomes > .ds-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ds-space-4);
}
.ds-outcome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2) var(--ds-space-4);
  padding: var(--ds-space-4) 28px;
  border-bottom: 1px solid var(--ds-line);
}
.ds-outcome:last-child {
  border-bottom: 0;
}
.ds-outcome-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ds-outcome-actions .ds-select {
  width: auto;
  min-height: 36px;
}
.ds-outcome-done {
  color: var(--ds-success);
  font-size: calc(var(--ds-base-size) * 0.833);
  font-weight: 600;
}
.ds-outcome .ds-error {
  flex-basis: 100%;
  margin: 0;
}
.ds-outcome .ds-error:empty {
  display: none;
}
.ds-connection-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3) var(--ds-space-4);
  padding: var(--ds-space-4) var(--ds-space-6);
}
.ds-connection-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ds-connection-text p {
  margin: 0;
}
/* Integrations: one tile per provider, grouped by what it is for. The whole
   tile is the button that opens the provider's drawer. */
.ds-integrations {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-8);
}
.ds-integration-group {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
}
.ds-integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
  gap: var(--ds-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-integration-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  gap: var(--ds-space-1) var(--ds-space-3);
  width: 100%;
  height: 100%;
  min-height: 148px;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface);
  box-shadow: var(--ds-panel-shadow);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--ds-duration),
    box-shadow var(--ds-duration),
    transform var(--ds-duration);
}
.ds-integration-tile:hover {
  border-color: var(--ds-control-border);
  box-shadow: var(--ds-shadow-soft);
}
.ds-integration-tile:active {
  transform: translateY(1px);
}
.ds-integration-tile:focus-visible {
  outline: none;
  border-color: var(--ds-focus);
  box-shadow: var(--ds-focus-ring);
}
.ds-integration-tile > .ds-integration-mark {
  grid-row: 1 / 3;
}
.ds-integration-name {
  align-self: center;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ds-integration-summary {
  grid-column: 2;
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-integration-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
  padding-top: var(--ds-space-3);
  margin-top: var(--ds-space-2);
  border-top: 1px solid var(--ds-line);
  color: var(--ds-text-muted);
  font-size: calc(var(--ds-base-size) * 0.778);
}
.ds-integration-foot .ds-integration-open {
  margin-left: auto;
  color: var(--ds-text-secondary);
  font-weight: 600;
}
.ds-integration-tile:hover .ds-integration-open {
  color: var(--ds-action);
}
/* The provider's mark: its logo when the caller has one, else its initials
   on a tinted square. */
.ds-integration-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--ds-line);
  background: var(--ds-badge-neutral-bg);
  color: var(--ds-badge-neutral-ink);
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
}
/* Width beyond the height lets a wide wordmark, such as Zoho's, read at tile size. */
.ds-integration-mark > img,
.ds-integration-mark > svg {
  width: 36px;
  height: 28px;
  object-fit: contain;
}
.ds-integration-mark[data-logo] {
  background: var(--ds-surface);
  border-color: var(--ds-border);
}
.ds-integration-mark[data-tone="blue"] {
  background: var(--ds-badge-blue-bg);
  color: var(--ds-badge-blue-ink);
}
.ds-integration-mark[data-tone="violet"] {
  background: var(--ds-badge-violet-bg);
  color: var(--ds-badge-violet-ink);
}
.ds-integration-mark[data-tone="amber"] {
  background: var(--ds-badge-amber-bg);
  color: var(--ds-badge-amber-ink);
}
.ds-integration-mark[data-tone="green"] {
  background: var(--ds-badge-green-bg);
  color: var(--ds-badge-green-ink);
}
.ds-integration-mark[data-tone="action"] {
  background: var(--ds-action-tint);
  color: var(--ds-action-deep);
}
.ds-integration-mark[data-size="large"] {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: calc(var(--ds-base-size) * 0.889);
}
.ds-integration-mark[data-size="large"] > img,
.ds-integration-mark[data-size="large"] > svg {
  width: 46px;
  height: 34px;
}
/* The drawer: who the provider is, how it connects, then the details. */
.ds-integration-intro {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  padding-bottom: var(--ds-space-4);
  border-bottom: 1px solid var(--ds-line);
}
.ds-integration-intro-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-1);
}
.ds-integration-intro p {
  margin: 0;
}
.ds-integration-section {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  padding-block: var(--ds-space-6) 0;
}
.ds-integration-section > h3 {
  margin: 0;
}
form.ds-integration-section {
  gap: var(--ds-space-2);
}
form.ds-integration-section > h3 {
  margin-bottom: var(--ds-space-2);
}
/* A saved secret is never shown again: the row says it is held and offers Replace. */
.ds-secret-saved {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  min-height: 44px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-subtle);
}
.ds-secret-saved-text {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
  color: var(--ds-text-secondary);
}
.ds-secret-saved-text svg {
  flex: none;
  color: var(--ds-success);
}
.ds-integration-steps {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ds-integration-step;
}
.ds-integration-steps > li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--ds-space-3);
  align-items: start;
  counter-increment: ds-integration-step;
}
.ds-integration-steps > li::before {
  content: counter(ds-integration-step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ds-subtle);
  border: 1px solid var(--ds-border);
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 700;
}
.ds-integration-drawer .ds-dialog-footer > .ds-integration-footer-start {
  margin-right: auto;
}
.ds-mapper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--ds-space-4);
}
.ds-checklist-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--ds-space-2);
  min-width: 160px;
}
.ds-checklist-meter {
  appearance: none;
  width: 160px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--ds-line);
  overflow: hidden;
}
.ds-checklist-meter::-webkit-progress-bar {
  background: var(--ds-line);
}
.ds-checklist-meter::-webkit-progress-value {
  background: var(--ds-success);
  transition: width calc(var(--ds-duration) * 3);
}
.ds-checklist-meter::-moz-progress-bar {
  background: var(--ds-success);
}
.ds-checklist-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 3fr) minmax(0, 2fr) auto;
  gap: var(--ds-space-4);
  align-items: start;
  padding: var(--ds-space-4) 28px;
  border-bottom: 1px solid var(--ds-line);
}
.ds-checklist-item:last-child {
  border-bottom: 0;
}
.ds-checklist-marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ds-control-border);
  border-radius: 999px;
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
}
.ds-checklist-item[data-done="true"] .ds-checklist-marker {
  border-color: var(--ds-success);
  background: var(--ds-success-tint);
  color: var(--ds-success);
}
.ds-checklist-text {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-1);
}
.ds-checklist-value {
  font-size: calc(var(--ds-base-size) * 0.889);
}
.ds-permission-table th[scope="row"] {
  font-size: 1em;
  font-weight: 400;
  color: var(--ds-text);
  letter-spacing: 0;
  text-transform: none;
}
.ds-permission-table tbody tr:last-child th {
  border-bottom: 0;
}
.ds-permission-table tr[data-summary] > * {
  background: var(--ds-subtle);
  font-weight: 600;
}
.ds-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
}
.ds-filter-bar .ds-field {
  width: 200px;
}
@media (max-width: 760px) {
  .ds-checklist-item {
    grid-template-columns: 1fr;
  }
}

/* App shell: sidebar, header, page and agent panel (src/shell.ts). The grid
   fills the viewport; the agent column is open, a 48px rail, or absent. */
/* The shell fills the window: no browser margin around it. */
body:has(> .ds-shell) {
  margin: 0;
}
.ds-shell {
  position: relative;
  display: grid;
  grid-template-columns:
    var(--ds-sidebar-width) minmax(0, 1fr)
    var(--ds-agent-width);
  min-height: 100vh;
  background: var(--ds-workspace);
  color: var(--ds-text);
}
.ds-shell[data-agent="rail"] {
  grid-template-columns:
    var(--ds-sidebar-width) minmax(0, 1fr)
    var(--ds-agent-rail);
}
.ds-shell[data-agent="none"] {
  grid-template-columns: var(--ds-sidebar-width) minmax(0, 1fr);
}
.ds-shell-skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 3;
  padding: 8px 12px;
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface);
}
.ds-shell-skip:focus {
  top: 8px;
}
.ds-shell-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 12px 14px;
  background: var(--ds-shell);
  color: #fff;
}
.ds-shell-brand {
  padding: 0 10px 22px;
  font-size: 24px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.02em;
}
.ds-shell-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 22px;
}
.ds-shell-head .ds-shell-brand {
  min-width: 0;
  padding: 0;
}
.ds-shell-back {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ds-shell-well);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%);
  color: var(--ds-shell-text);
}
.ds-theme .ds-shell-back:hover {
  background: var(--ds-shell-raise);
  color: #fff;
}
.ds-shell-back:focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: 2px;
}
.ds-shell-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ds-shell-caption {
  padding: 18px 10px 6px;
  color: var(--ds-shell-faint);
}
.ds-shell-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--ds-radius-control);
  background: transparent;
  color: var(--ds-shell-text);
  font-size: calc(var(--ds-base-size) * 8 / 9);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ds-theme .ds-shell-nav-item:hover {
  background: var(--ds-shell-well);
  color: #fff;
}
.ds-shell-nav-item[aria-current="page"] {
  background: var(--ds-shell-raise);
  color: #fff;
  font-weight: 600;
}
.ds-shell-nav-item[aria-current="page"]::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-action);
}
.ds-shell-nav-item[data-state="proposed"] {
  color: var(--ds-shell-dim);
}
.ds-shell-nav-label {
  flex: 1;
  min-width: 0;
}
.ds-shell-count {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ds-action);
  color: #fff;
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
}
.ds-shell-count[data-tone="neutral"] {
  background: rgb(255 255 255 / 12%);
}
.ds-shell-tag {
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ds-shell-faint);
}
.ds-shell-nav-item[aria-current="page"] .ds-shell-tag {
  color: var(--ds-shell-dim);
}
.ds-shell-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: 16px;
}
.ds-shell-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  border-radius: var(--ds-radius-input);
  background: var(--ds-shell-well);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.ds-shell-user:hover {
  background: var(--ds-shell-raise);
}
.ds-shell-user .ds-avatar {
  width: 32px;
  height: 32px;
  background: var(--ds-border);
  color: var(--ds-text);
}
.ds-shell-user[data-avatar="success"] .ds-avatar {
  background: var(--ds-success);
  color: #fff;
}
.ds-shell-user[data-avatar="info"] .ds-avatar {
  background: var(--ds-focus);
  color: #fff;
}
.ds-shell-user-text {
  flex: 1;
  min-width: 0;
}
.ds-shell-user-name {
  display: block;
  font-size: calc(var(--ds-base-size) * 8 / 9);
  font-weight: 600;
  line-height: 1.2;
}
.ds-shell-user-detail {
  display: block;
  margin-top: 2px;
  font-size: calc(var(--ds-base-size) * 0.778);
  line-height: 1.3;
  color: var(--ds-shell-dim);
}
.ds-shell-user-detail span {
  white-space: nowrap;
}
.ds-shell-user-caret {
  flex: none;
  font-size: 12px;
  color: var(--ds-shell-faint);
}
.ds-shell-org-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ds-success);
  color: #fff;
  font-size: calc(var(--ds-base-size) * 2 / 3);
  font-weight: 600;
}
/* The account menu opens above the user block; the Org list opens beside it. */
.ds-shell-account {
  position: relative;
}
.ds-shell-account-menu,
.ds-shell-account-orgs {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px;
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface);
  color: var(--ds-text);
  font-size: calc(var(--ds-base-size) * 8 / 9);
  box-shadow:
    0 0 0 1px rgb(20 30 26 / 8%),
    0 16px 40px -12px rgb(11 21 18 / 45%);
}
.ds-shell-account-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 5;
  min-width: 240px;
}
.ds-shell-account-menu[hidden],
.ds-shell-account-orgs[hidden] {
  display: none;
}
.ds-shell-account-head {
  margin-bottom: 4px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--ds-border);
}
.ds-shell-account-name {
  font-weight: 600;
}
.ds-shell-account-email {
  color: var(--ds-text-muted);
  overflow-wrap: anywhere;
}
.ds-shell-account-org {
  position: relative;
}
.ds-shell-account-org > .ds-shell-account-org-text {
  display: flex;
  padding: 8px 10px;
}
.ds-shell-account-item,
.ds-shell-account-org-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--ds-radius-control);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ds-shell-account-item:hover,
.ds-shell-account-org-option:hover,
.ds-shell-account-item[aria-expanded="true"] {
  background: var(--ds-workspace);
}
.ds-shell-account-item > svg {
  flex: none;
  color: var(--ds-text-muted);
  transform: rotate(-90deg);
}
.ds-shell-account-org-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.ds-shell-account-org-label {
  color: var(--ds-text-secondary);
}
.ds-shell-account-org-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-shell-account-sep {
  margin: 4px 0;
  border-top: 1px solid var(--ds-border);
}
.ds-shell-account-orgs {
  position: absolute;
  bottom: -6px;
  left: calc(100% + 12px);
  z-index: 6;
  width: 280px;
}
.ds-shell-account-orgs .ds-caption {
  padding: 8px 10px 6px;
}
.ds-shell-account-orgs ul {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-shell-account-org-option .ds-shell-org-tile {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.ds-shell-account-org-option[aria-current="true"] .ds-shell-account-org-name {
  font-weight: 700;
}
.ds-shell-account-org-option > svg {
  flex: none;
  color: var(--ds-success);
}
.ds-shell-account-org-option .ds-shell-account-org-name {
  font-weight: 500;
}
.ds-shell-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ds-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--ds-header-height);
  padding: 0 var(--ds-page-gutter);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-subtle);
}
.ds-shell-header .ds-breadcrumb li:first-child {
  color: var(--ds-text-muted);
}
.ds-shell-header .ds-breadcrumb li:nth-child(2) {
  font-weight: 600;
}
.ds-shell-header .ds-breadcrumb li:nth-child(n + 3) {
  color: var(--ds-text-secondary);
}
.ds-shell-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: 28px var(--ds-page-gutter) var(--ds-page-gutter);
  container: workspace / inline-size;
}
.ds-shell-content:focus {
  outline: none;
}
.ds-shell-agent {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--ds-border);
  background: var(--ds-surface);
}
.ds-shell-agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--ds-header-height);
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--ds-border);
}
.ds-shell-agent-title {
  font-size: calc(var(--ds-base-size) * 8 / 9);
  font-weight: 600;
}
.ds-shell-agent-toggle {
  color: var(--ds-text-muted);
}
.ds-shell-agent-toggle svg {
  transform: rotate(-90deg);
}
.ds-shell-agent-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.ds-shell-agent-footer {
  padding: 12px 16px 16px;
}
.ds-shell-agent-rail-label {
  display: none;
}
.ds-shell[data-agent="rail"] .ds-shell-agent-head {
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 0 12px;
  border-bottom: 0;
}
.ds-shell[data-agent="rail"] .ds-shell-agent-title,
.ds-shell[data-agent="rail"] .ds-shell-agent-body,
.ds-shell[data-agent="rail"] .ds-shell-agent-footer {
  display: none;
}
.ds-shell[data-agent="rail"] .ds-shell-agent-toggle svg {
  transform: rotate(90deg);
}
.ds-shell[data-agent="rail"] .ds-shell-agent-rail-label {
  display: block;
  writing-mode: vertical-rl;
  font-size: calc(var(--ds-base-size) * 0.778);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
}
@media (max-width: 899px) {
  .ds-shell-header,
  .ds-shell-content {
    padding-inline: 20px;
  }
}

/* Mobile layout, below 760px (the 390 frame of Room Navigation.dc.html,
   with navigation moved to the bottom). One column: a dark top bar with the
   room's name, the page, and a floating dock at the bottom within thumb
   reach. The dock's menu link opens the sidebar as a drawer (or :target in
   static HTML); a page puts its own navigation in the dock beside it. The
   agent column is left out. The breadcrumb becomes one muted line above the
   title, without Yield and the Org. */
.ds-shell-topbar,
.ds-shell-dock,
.ds-shell-close,
.ds-shell-scrim,
.ds-shell-org,
.ds-subnav-picker {
  display: none;
}
@media (max-width: 759px) {
  .ds-shell,
  .ds-shell[data-agent] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .ds-shell-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--ds-header-height);
    padding: 0 16px;
    background: var(--ds-shell);
    color: #fff;
  }
  .ds-shell-dock {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    /* Above the scrim, also while it fades out. */
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    /* The dock is only a row: the picker and Menu each float on their own. */
    pointer-events: none;
  }
  .ds-shell-dock > * {
    pointer-events: auto;
  }
  .ds-shell-dock:has(.ds-shell-dock-slot:empty) {
    left: auto;
  }
  .ds-shell-dock-slot {
    display: flex;
    flex: 0 1 240px;
    gap: 6px;
    min-width: 0;
  }
  .ds-shell-dock-slot:empty {
    display: none;
  }
  /* While the menu is open, the page's picker steps aside and returns on close. */
  .ds-shell-dock-slot {
    transition:
      opacity 0.14s ease-out,
      transform 0.14s ease-out,
      visibility 0.14s;
  }
  .ds-shell[data-drawer="open"] .ds-shell-dock-slot,
  .ds-shell-side:target ~ .ds-shell-dock .ds-shell-dock-slot {
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px);
  }
  /* Menu is a round orange button; its name comes from aria-label. */
  .ds-shell-menu {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: var(--ds-action);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 28px -8px rgb(11 21 18 / 45%);
  }
  .ds-shell-menu > span {
    display: none;
  }
  .ds-shell-menu {
    transition: transform 0.12s ease-out;
  }
  .ds-shell-menu:active {
    transform: scale(0.96);
  }
  .ds-shell-dock .ds-subnav-picker {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
  }
  /* A white pill with the section's name as a caption over the page. */
  .ds-subnav-picker select {
    width: 100%;
    height: 52px;
    padding: 16px 44px 0 20px;
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    background: var(--ds-surface);
    color: var(--ds-text);
    font: inherit;
    font-size: calc(var(--ds-base-size) * 8 / 9);
    font-weight: 600;
    appearance: none;
    cursor: pointer;
    box-shadow: 0 10px 28px -10px rgb(11 21 18 / 30%);
  }
  .ds-subnav-picker-caption {
    position: absolute;
    top: 8px;
    left: 21px;
    color: var(--ds-text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
  }
  .ds-subnav-picker select:focus-visible {
    outline: 2px solid var(--ds-focus);
    outline-offset: 2px;
  }
  .ds-subnav-picker option,
  .ds-subnav-picker optgroup {
    background: var(--ds-surface);
    color: var(--ds-text);
  }
  .ds-subnav-picker svg {
    position: absolute;
    top: 16px;
    right: 18px;
    color: var(--ds-text-secondary);
    pointer-events: none;
  }
  .ds-shell:has(.ds-shell-dock .ds-subnav-picker) .ds-subnav {
    display: none;
  }
  .ds-shell-close {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--ds-radius-control);
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  .ds-theme .ds-shell-menu:hover {
    background: var(--ds-action-hover);
    color: #fff;
  }
  .ds-theme .ds-shell-close:hover {
    background: var(--ds-shell-raise);
    color: #fff;
  }
  .ds-shell-wordmark {
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 1;
  }
  .ds-shell-context {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding-left: 6px;
    line-height: 1.2;
  }
  .ds-shell-context > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ds-shell-context-title {
    font-size: calc(var(--ds-base-size) * 7 / 9);
    font-weight: 600;
    color: rgb(255 255 255 / 85%);
  }
  .ds-shell-context-detail {
    font-size: calc(var(--ds-base-size) * 2 / 3);
    color: var(--ds-shell-dim);
  }
  /* The sidebar opens as a sheet from the bottom, so its pages sit
     under the thumb that opened it. */
  /* The sheet floats on the right, just above the dock and its Menu
     button. */
  .ds-shell-side {
    position: fixed;
    inset: auto 12px calc(80px + env(safe-area-inset-bottom, 0px)) auto;
    z-index: 30;
    display: none;
    width: min(320px, calc(100vw - 56px));
    max-height: calc(100vh - 160px);
    padding-bottom: 14px;
    border-radius: 28px;
    overflow-y: auto;
    box-shadow: 0 24px 64px -16px rgb(11 21 18 / 55%);
    /* Grows out of the Menu button below it, and shrinks back into it. */
    transform-origin: calc(100% - 40px) 100%;
    opacity: 0;
    transform: translateY(10px) scale(0.92);
    transition:
      opacity 0.14s ease-in,
      transform 0.14s ease-in,
      display 0.14s allow-discrete;
  }
  .ds-shell-side:target,
  .ds-shell[data-drawer="open"] .ds-shell-side {
    display: flex;
    opacity: 1;
    transform: none;
    transition:
      opacity 0.18s ease-out,
      transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
      display 0.24s allow-discrete;
  }
  @starting-style {
    .ds-shell-side:target,
    .ds-shell[data-drawer="open"] .ds-shell-side {
      opacity: 0;
      transform: translateY(10px) scale(0.92);
    }
  }
  .ds-shell-close {
    position: absolute;
    top: 12px;
    right: 8px;
  }
  .ds-shell-head {
    padding-right: 48px;
  }
  .ds-shell-back {
    width: 44px;
    height: 44px;
  }
  .ds-shell-bottom {
    padding-top: 20px;
  }
  /* In the phone sheet the account menu and its Org list open in place. */
  .ds-shell-account-menu,
  .ds-shell-account-orgs {
    position: static;
    width: auto;
    min-width: 0;
    margin-bottom: 8px;
  }
  .ds-shell-account-orgs {
    margin: 4px 0;
    box-shadow: none;
    background: var(--ds-workspace);
  }
  .ds-shell-account-item > svg {
    transform: none;
  }
  .ds-shell-account-item,
  .ds-shell-account-org-option {
    min-height: 44px;
  }
  /* The Org row at the top of the drawer. Its list opens in place, so a
     switch is Menu, the row, then the Org. */
  .ds-shell-org {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 8px;
  }
  .ds-shell-org-current,
  .ds-shell-org-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 8px 10px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    font: inherit;
    text-align: left;
    text-decoration: none;
  }
  .ds-shell-org-current {
    background: var(--ds-shell-raise);
  }
  button.ds-shell-org-current {
    cursor: pointer;
  }
  .ds-shell-org-current svg {
    flex: none;
    transition: transform 0.15s ease-out;
  }
  .ds-shell-org-current[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
  .ds-shell-org-current:focus-visible,
  .ds-shell-org-option:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
  .ds-shell-org-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
  }
  .ds-shell-org-name {
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .ds-shell-org-detail {
    color: var(--ds-shell-dim);
    font-size: calc(var(--ds-base-size) * 7 / 9);
  }
  .ds-shell-org-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 4px 0 0;
    list-style: none;
  }
  .ds-shell-org-list[hidden] {
    display: none;
  }
  .ds-shell-org-option {
    color: var(--ds-shell-text);
  }
  .ds-theme .ds-shell-org-option:hover {
    background: var(--ds-shell-well);
    color: #fff;
  }
  .ds-shell-org-option[aria-current="true"] {
    color: #fff;
  }
  .ds-shell-org-option svg {
    flex: none;
  }
  .ds-shell-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgb(11 21 18 / 40%);
    opacity: 0;
    transition:
      opacity 0.14s ease-in,
      display 0.14s allow-discrete;
  }
  .ds-shell-side:target ~ .ds-shell-scrim,
  .ds-shell[data-drawer="open"] .ds-shell-scrim {
    display: block;
    opacity: 1;
    transition:
      opacity 0.2s ease-out,
      display 0.2s allow-discrete;
  }
  @starting-style {
    .ds-shell-side:target ~ .ds-shell-scrim,
    .ds-shell[data-drawer="open"] .ds-shell-scrim {
      opacity: 0;
    }
  }
  .ds-shell-nav-item,
  .ds-shell-side .ds-shell-user {
    border-radius: 14px;
  }
  .ds-shell-nav-item {
    min-height: 44px;
    padding: 10px;
  }
  .ds-shell-side .ds-shell-close {
    border-radius: 999px;
  }
  .ds-shell-agent {
    display: none;
  }
  .ds-shell-header {
    min-height: 0;
    padding: 20px 16px 0;
    border-bottom: 0;
    background: transparent;
  }
  .ds-shell-header .ds-breadcrumb li:nth-child(-n + 2) {
    display: none;
  }
  .ds-shell-header .ds-breadcrumb li:nth-child(3)::before {
    display: none;
  }
  .ds-shell-header .ds-breadcrumb :where(li, a) {
    color: var(--ds-text-muted);
    font-weight: 400;
  }
  .ds-shell-content {
    /* Room for the dock: 52px controls 12px off the bottom, plus 48px clear
       so the last line of a page never sits under them. */
    padding: 12px 16px calc(112px + env(safe-area-inset-bottom, 0px));
  }
  /* Tables keep each cell on one line and scroll inside ds-table-scroll. */
  .ds-shell-content .ds-table :where(td, th) {
    white-space: nowrap;
  }
  .ds-shell-content .ds-piece-header,
  .ds-shell-content .ds-list-row {
    flex-wrap: wrap;
  }
  .ds-shell-content .ds-list-row > .ds-row:first-child {
    flex-wrap: nowrap;
    min-width: 0;
  }
  /* Label above value, time above the entry: one column of reading. */
  .ds-shell-content .ds-fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .ds-shell-content .ds-activity-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding-inline: 20px;
  }
  .ds-shell-content .ds-activity-time {
    grid-column: 1 / -1;
  }
  .ds-shell-content .ds-button[data-size="small"] {
    height: 44px;
  }
  .ds-shell-content .ds-table-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}
/* Reduced motion: the phone menu fades in place, without the grow. */
@media (prefers-reduced-motion: reduce) {
  .ds-shell-side,
  .ds-shell-dock-slot,
  .ds-shell-menu {
    transform: none !important;
  }
}
.ds-theme[data-reduced-motion="true"]
  :is(.ds-shell-side, .ds-shell-dock-slot, .ds-shell-menu) {
  transform: none !important;
}

/* Page header: title, lead sentence and the view's one primary action. */
.ds-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.ds-page-header-text {
  flex: 1 1 320px;
  min-width: 0;
}
.ds-page-header-text > :first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.ds-page-header p {
  margin: 6px 0 0;
}
.ds-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

/* Keyboard hint, such as the palette shortcut. */
.ds-kbd {
  font: inherit;
  font-size: 13px;
  padding: 2px 6px;
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  color: var(--ds-text-muted);
}
/* The button that opens the command palette, drawn as a search field. */
.ds-palette-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ds-control-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-surface);
  font: inherit;
  font-size: calc(var(--ds-base-size) * 8 / 9);
  color: var(--ds-text-secondary);
  cursor: pointer;
}
.ds-palette-trigger:hover {
  border-color: var(--ds-shell);
}
.ds-palette-trigger svg {
  width: 18px;
  height: 18px;
}
/* Sub-navigation: the sections of a page, such as Settings. A row of pills in
   a narrow workspace; a 208px column beside the page from 860px. */
.ds-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.ds-subnav-group {
  display: contents;
}
.ds-subnav .ds-caption {
  padding: 0 6px 0 8px;
}
.ds-subnav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--ds-radius-control);
  background: transparent;
  color: var(--ds-text-secondary);
  font: inherit;
  font-size: calc(var(--ds-base-size) * 8 / 9);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ds-subnav-item:hover {
  background: var(--ds-line);
  color: var(--ds-text);
}
.ds-subnav-item[aria-current="page"] {
  background: var(--ds-surface);
  color: var(--ds-text);
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgb(20 30 26 / 6%),
    0 1px 2px rgb(20 30 26 / 6%);
}
.ds-subnav-item[data-muted] {
  color: var(--ds-text-muted);
}
.ds-subnav-count {
  color: var(--ds-text-muted);
}
.ds-subnav-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-space-6);
  align-items: start;
}
.ds-subnav-layout > * {
  min-width: 0;
}
@container workspace (min-width: 860px) {
  .ds-subnav-layout {
    grid-template-columns: 208px minmax(0, 1fr);
  }
  .ds-subnav {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 4px;
  }
  .ds-subnav .ds-caption {
    padding: 0 8px 8px;
  }
  .ds-subnav-group + .ds-subnav-group .ds-caption {
    padding-top: 22px;
  }
  .ds-subnav-item {
    width: 100%;
  }
}
/* File drop: a dashed zone over a real file input, then one row per file. */
.ds-file-drop {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  min-width: 0;
}
.ds-file-drop-zone {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  border: 1px dashed var(--ds-text-muted);
  border-radius: 8px;
  background: var(--ds-subtle);
  color: var(--ds-text-secondary);
  font-size: calc(var(--ds-base-size) * 8 / 9);
  cursor: pointer;
  transition:
    background var(--ds-duration),
    border-color var(--ds-duration);
}
.ds-file-drop-zone:hover,
.ds-file-drop-zone[data-drag] {
  border-color: var(--ds-shell);
  background: var(--ds-surface);
}
.ds-file-drop-zone[data-drag] {
  background: var(--ds-success-tint);
}
.ds-file-drop-zone:focus-within {
  outline: 2px solid var(--ds-focus);
  outline-offset: 2px;
}
.ds-file-drop-zone > svg {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--ds-text-secondary);
}
.ds-file-drop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ds-file-drop-label strong {
  color: var(--ds-text);
}
.ds-file-drop-browse {
  color: var(--ds-action);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ds-file-list {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-file-list:empty {
  display: none;
}
.ds-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  background: var(--ds-surface);
  font-size: calc(var(--ds-base-size) * 8 / 9);
}
.ds-file-row > svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--ds-text-muted);
}
.ds-file-row-text {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ds-file-row-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ds-file-row-status[hidden],
.ds-file-row .ds-progress[hidden] {
  display: none;
}
/* Save bar: the footer of a settings panel. The tint says something changed. */
.ds-save-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 20px;
  background: var(--ds-subtle);
  border-radius: 0 0 var(--ds-radius-panel) var(--ds-radius-panel);
  transition: background var(--ds-duration);
}
.ds-save-bar[data-dirty] {
  background: var(--ds-action-tint);
}
.ds-save-bar > .ds-row {
  gap: var(--ds-space-2);
}

/* Phones: tiles become rows, and the drawer rises from the bottom as a sheet
   with its actions full width under the thumb. */
@media (max-width: 759px) {
  .ds-integration-grid {
    gap: var(--ds-space-3);
  }
  .ds-integration-tile {
    min-height: 0;
    grid-template-rows: auto auto auto;
  }
  .ds-dialog.ds-integration-drawer[data-drawer] {
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100dvh - 48px);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px calc(16px + env(safe-area-inset-bottom));
  }
  .ds-integration-drawer .ds-dialog-body {
    margin-inline: -20px;
    padding-inline: 20px;
  }
  .ds-integration-drawer .ds-dialog-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .ds-integration-drawer .ds-dialog-footer .ds-button {
    width: 100%;
    height: 48px;
    justify-content: center;
  }
  .ds-integration-drawer .ds-dialog-footer > .ds-integration-footer-start {
    margin-right: 0;
  }
}
